CARLA
 
载入中...
搜索中...
未找到
TwistPubSubTypes.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 TwistPubSubTypes.h
17 * This header file contains the declaration of the serialization functions.
18 *
19 * This file was generated by the tool fastcdrgen.
20 */
21
22#ifndef _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWIST_PUBSUBTYPES_H_
23#define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWIST_PUBSUBTYPES_H_
24
25#include <fastdds/dds/topic/TopicDataType.hpp>
26#include <fastrtps/utils/md5.h>
27
28#include "Twist.h"
29
30#include "Vector3PubSubTypes.h"
31
32#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
33#error \
34 Generated Twist is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
35#endif // GEN_API_VER
36
37namespace geometry_msgs
38{
39 namespace msg
40 {
41
42 #ifndef SWIG
43 namespace detail {
44
45 template<typename Tag, typename Tag::type M>
46 struct Twist_rob
47 {
48 friend constexpr typename Tag::type get(
49 Tag)
50 {
51 return M;
52 }
53 };
54
55 struct Twist_f
56 {
58 friend constexpr type get(
59 Twist_f);
60 };
61
63
64 template <typename T, typename Tag>
65 inline size_t constexpr Twist_offset_of() {
66 return ((::size_t) &reinterpret_cast<char const volatile&>((((T*)0)->*get(Tag()))));
67 }
68 }
69 #endif
70
71 /*!
72 * @brief This class represents the TopicDataType of the type Twist defined by the user in the IDL file.
73 * @ingroup TWIST
74 */
75 class TwistPubSubType : public eprosima::fastdds::dds::TopicDataType
76 {
77 public:
78
79 typedef Twist type;
80
82
84
85 eProsima_user_DllExport virtual bool serialize(
86 void* data,
87 eprosima::fastrtps::rtps::SerializedPayload_t* payload) override;
88
89 eProsima_user_DllExport virtual bool deserialize(
90 eprosima::fastrtps::rtps::SerializedPayload_t* payload,
91 void* data) override;
92
93 eProsima_user_DllExport virtual std::function<uint32_t()> getSerializedSizeProvider(
94 void* data) override;
95
96 eProsima_user_DllExport virtual bool getKey(
97 void* data,
98 eprosima::fastrtps::rtps::InstanceHandle_t* ihandle,
99 bool force_md5 = false) override;
100
101 eProsima_user_DllExport virtual void* createData() override;
102
103 eProsima_user_DllExport virtual void deleteData(
104 void* data) override;
105
106 #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
107 eProsima_user_DllExport inline bool is_bounded() const override
108 {
109 return true;
110 }
111
112 #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
113
114 #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
115 eProsima_user_DllExport inline bool is_plain() const override
116 {
117 return is_plain_impl();
118 }
119
120 #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
121
122 #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
123 eProsima_user_DllExport inline bool construct_sample(
124 void* memory) const override
125 {
126 new (memory) Twist();
127 return true;
128 }
129
130 #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
131 MD5 m_md5;
132 unsigned char* m_keyBuffer;
133 private:
134 static constexpr bool is_plain_impl()
135 {
136 return 48ULL == (detail::Twist_offset_of<Twist, detail::Twist_f>() + sizeof(geometry_msgs::msg::Vector3));
137
138 }};
139 }
140}
141
142#endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWIST_PUBSUBTYPES_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
This class represents the TopicDataType of the type Twist defined by the user in the IDL file.
static constexpr bool is_plain_impl()
This class represents the structure Twist defined by the user in the IDL file.
Definition Twist.h:73
This class represents the structure Vector3 defined by the user in the IDL file.
Definition Vector3.h:72
size_t constexpr Twist_offset_of()
geometry_msgs::msg::Vector3 Twist::* type
friend constexpr type get(Twist_f)
friend constexpr Tag::type get(Tag)