CARLA
 
载入中...
搜索中...
未找到
Twist.h
浏览该文件的文档.
1// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15/*!
16 * @file Twist.h
17 * This header file contains the declaration of the described types in the IDL file.
18 *
19 * This file was generated by the tool gen.
20 */
21
22#ifndef _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWIST_H_
23#define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWIST_H_
24
25#include "Vector3.h"// 包含Vector3类的头文件,Vector3类用于表示三维向量
26
27#include <fastrtps/utils/fixed_size_string.hpp>// 包含一些用于序列化的工具类
28// 包含一些标准库头文件
29#include <stdint.h>
30#include <array>
31#include <string>
32#include <vector>
33#include <map>
34#include <bitset>
35// Windows平台下的DLL导出宏定义
36#if defined(_WIN32)
37#if defined(EPROSIMA_USER_DLL_EXPORT)
38#define eProsima_user_DllExport __declspec( dllexport )
39#else
40#define eProsima_user_DllExport
41#endif // EPROSIMA_USER_DLL_EXPORT
42#else
43#define eProsima_user_DllExport
44#endif // _WIN32
45// Windows平台下的DLL导入/导出宏定义
46#if defined(_WIN32)
47#if defined(EPROSIMA_USER_DLL_EXPORT)
48#if defined(Twist_SOURCE)
49#define Twist_DllAPI __declspec( dllexport )
50#else
51#define Twist_DllAPI __declspec( dllimport )
52#endif // Twist_SOURCE
53#else
54#define Twist_DllAPI
55#endif // EPROSIMA_USER_DLL_EXPORT
56#else
57#define Twist_DllAPI
58#endif // _WIN32
59// 引入fastcdr命名空间,用于序列化
60namespace eprosima {
61namespace fastcdr {
62class Cdr;
63} // namespace fastcdr
64} // namespace eprosima
65// 定义geometry_msgs命名空间,其中包含msg子命名空间
66namespace geometry_msgs {
67 namespace msg {
68 //这个类表示用户在 IDL 文件中定义的 Twist 结构
69 class Twist
70 {
71 public:
72
73 //默认构造函数
75
76 //默认构造函数
78
79 //复制构造函数
80 //将要被复制的对象 geometry_msgs::msg::Twist 的引用
82 const Twist& x);
83
84 //移动构造函数
85 //将要被移动的对象 geometry_msgs::msg::Twist 的引用
87 Twist&& x) noexcept;
88
89 //复制赋值操作符
90 //将要被复制的对象 geometry_msgs::msg::Twist 的引用
92 const Twist& x);
93
94 //移动赋值操作符
95 //将要被移动的对象 geometry_msgs::msg::Twist 的引用
97 Twist&& x) noexcept;
98
99 比较操作符
100 //要比较的 geometry_msgs::msg::Twist 对象
102 const Twist& x) const;
103 //比较运算符
104 //要进行比较的 geometry_msgs::msg::Twist 对象
106 const Twist& x) const;
107
108 //此函数将值复制到成员 linear 中
109 //要复制到成员 linear 中的新值
111 const geometry_msgs::msg::Vector3& _linear);
112
113 //此函数将值移动到成员 linear 中
114 //要移动到成员 linear 中的新值
117
118 //此函数返回对成员 linear 的常量引用
119 //对成员 linear 的常量引用
121
122 //此函数返回对成员 linear 的引用
123 //对成员 linear 的引用
125 //此函数将值复制到成员 angular 中
126 //要复制到成员 angular 中的新值
128 const geometry_msgs::msg::Vector3& _angular);
129
130 //此函数将值移动到成员 angular 中
131 //要移动到成员 angular 中的新值
133 geometry_msgs::msg::Vector3&& _angular);
134
135 //此函数返回对成员 angular 的常量引用
136 //对成员 angular 的常量引用
138
139 //此函数返回对成员 angular 的引用
140 //对成员 angular 的引用
142
143 //此函数返回根据缓冲区对齐方式的对象的最大序列化大小
144 //current_alignment 缓冲区对齐方式
145 //最大序列化大小
147 size_t current_alignment = 0);
148
149 //此函数返回根据缓冲区对齐方式的数据的序列化大小
150 //要计算其序列化大小的数据
151 //current_alignment 缓冲区对齐方式
152 //序列化大小
154 const geometry_msgs::msg::Twist& data,
155 size_t current_alignment = 0);
156
157 //此函数使用 CDR 序列化来序列化一个对象
158 //cdr CDR 序列化对象
160 eprosima::fastcdr::Cdr& cdr) const;
161
162 //此函数使用 CDR 序列化来反序列化一个对象
163 //cdr CDR 序列化对象
165 eprosima::fastcdr::Cdr& cdr);
166
167 //此函数返回根据缓冲区对齐方式的对象键的最大序列化大小
168 //current_alignment 缓冲区对齐方式
169 //最大序列化大小
171 size_t current_alignment = 0);
172
173 //此函数告诉你是否为这种类型定义了键(Key)
175
176 //此函数使用 CDR 序列化来序列化一个对象的键成员
177 //cdr CDR 序列化对象
179 eprosima::fastcdr::Cdr& cdr) const;
180
181 private:
184 };
185 } // namespace msg
186} // namespace geometry_msgs
187
188#endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWIST_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
Definition Twist.cpp:94
eProsima_user_DllExport bool operator!=(const Twist &x) const
Definition Twist.cpp:88
eProsima_user_DllExport Twist()
Definition Twist.cpp:42
eProsima_user_DllExport ~Twist()
Definition Twist.cpp:46
eProsima_user_DllExport Twist & operator=(const Twist &x)
Definition Twist.cpp:64
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
Definition Twist.cpp:119
比较操作符 eProsima_user_DllExport bool operator==(const Twist &x) const
Definition Twist.cpp:82
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
Definition Twist.cpp:215
static eProsima_user_DllExport size_t getCdrSerializedSize(const geometry_msgs::msg::Twist &data, size_t current_alignment=0)
Definition Twist.cpp:101
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
Definition Twist.cpp:203
geometry_msgs::msg::Vector3 m_linear
Definition Twist.h:182
geometry_msgs::msg::Vector3 m_angular
Definition Twist.h:183
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
Definition Twist.cpp:112
static eProsima_user_DllExport bool isKeyDefined()
Definition Twist.cpp:210
eProsima_user_DllExport const geometry_msgs::msg::Vector3 & linear() const
此函数返回成员 linear 的常量引用
Definition Twist.cpp:150
eProsima_user_DllExport const geometry_msgs::msg::Vector3 & angular() const
此函数返回成员 angular 的常量引用
Definition Twist.cpp:188
此类表示用户在 IDL 文件中定义的 Vector3 结构。 <>
Definition Vector3.h:72