奥特QT DDS 插件库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

370 line
12KB

  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. * @file DDSSampleMachinePubSubTypes.hpp
  16. * This header file contains the declaration of the serialization functions.
  17. *
  18. * This file was generated by the tool fastddsgen.
  19. */
  20. #ifndef FAST_DDS_GENERATED__SAMPLEMODULE_DDSSAMPLEMACHINE_PUBSUBTYPES_HPP
  21. #define FAST_DDS_GENERATED__SAMPLEMODULE_DDSSAMPLEMACHINE_PUBSUBTYPES_HPP
  22. #include <fastdds/dds/core/policy/QosPolicies.hpp>
  23. #include <fastdds/dds/topic/TopicDataType.hpp>
  24. #include <fastdds/rtps/common/InstanceHandle.hpp>
  25. #include <fastdds/rtps/common/SerializedPayload.hpp>
  26. #include <fastdds/utils/md5.hpp>
  27. #include "DDSSampleMachine.hpp"
  28. #if !defined(FASTDDS_GEN_API_VER) || (FASTDDS_GEN_API_VER != 3)
  29. #error \
  30. Generated DDSSampleMachine is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
  31. #endif // FASTDDS_GEN_API_VER
  32. namespace SampleModule
  33. {
  34. /*!
  35. * @brief This class represents the TopicDataType of the type SampleConfig defined by the user in the IDL file.
  36. * @ingroup DDSSampleMachine
  37. */
  38. class SampleConfigPubSubType : public eprosima::fastdds::dds::TopicDataType
  39. {
  40. public:
  41. typedef SampleConfig type;
  42. eProsima_user_DllExport SampleConfigPubSubType();
  43. eProsima_user_DllExport ~SampleConfigPubSubType() override;
  44. eProsima_user_DllExport bool serialize(
  45. const void* const data,
  46. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  47. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  48. eProsima_user_DllExport bool deserialize(
  49. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  50. void* data) override;
  51. eProsima_user_DllExport uint32_t calculate_serialized_size(
  52. const void* const data,
  53. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  54. eProsima_user_DllExport bool compute_key(
  55. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  56. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  57. bool force_md5 = false) override;
  58. eProsima_user_DllExport bool compute_key(
  59. const void* const data,
  60. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  61. bool force_md5 = false) override;
  62. eProsima_user_DllExport void* create_data() override;
  63. eProsima_user_DllExport void delete_data(
  64. void* data) override;
  65. //Register TypeObject representation in Fast DDS TypeObjectRegistry
  66. eProsima_user_DllExport void register_type_object_representation() override;
  67. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  68. eProsima_user_DllExport inline bool is_bounded() const override
  69. {
  70. return true;
  71. }
  72. #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  73. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  74. eProsima_user_DllExport inline bool is_plain(
  75. eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
  76. {
  77. static_cast<void>(data_representation);
  78. return false;
  79. }
  80. #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  81. #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  82. eProsima_user_DllExport inline bool construct_sample(
  83. void* memory) const override
  84. {
  85. static_cast<void>(memory);
  86. return false;
  87. }
  88. #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  89. private:
  90. eprosima::fastdds::MD5 md5_;
  91. unsigned char* key_buffer_;
  92. };
  93. /*!
  94. * @brief This class represents the TopicDataType of the type SampleCommand defined by the user in the IDL file.
  95. * @ingroup DDSSampleMachine
  96. */
  97. class SampleCommandPubSubType : public eprosima::fastdds::dds::TopicDataType
  98. {
  99. public:
  100. typedef SampleCommand type;
  101. eProsima_user_DllExport SampleCommandPubSubType();
  102. eProsima_user_DllExport ~SampleCommandPubSubType() override;
  103. eProsima_user_DllExport bool serialize(
  104. const void* const data,
  105. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  106. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  107. eProsima_user_DllExport bool deserialize(
  108. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  109. void* data) override;
  110. eProsima_user_DllExport uint32_t calculate_serialized_size(
  111. const void* const data,
  112. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  113. eProsima_user_DllExport bool compute_key(
  114. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  115. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  116. bool force_md5 = false) override;
  117. eProsima_user_DllExport bool compute_key(
  118. const void* const data,
  119. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  120. bool force_md5 = false) override;
  121. eProsima_user_DllExport void* create_data() override;
  122. eProsima_user_DllExport void delete_data(
  123. void* data) override;
  124. //Register TypeObject representation in Fast DDS TypeObjectRegistry
  125. eProsima_user_DllExport void register_type_object_representation() override;
  126. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  127. eProsima_user_DllExport inline bool is_bounded() const override
  128. {
  129. return true;
  130. }
  131. #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  132. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  133. eProsima_user_DllExport inline bool is_plain(
  134. eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
  135. {
  136. static_cast<void>(data_representation);
  137. return false;
  138. }
  139. #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  140. #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  141. eProsima_user_DllExport inline bool construct_sample(
  142. void* memory) const override
  143. {
  144. static_cast<void>(memory);
  145. return false;
  146. }
  147. #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  148. private:
  149. eprosima::fastdds::MD5 md5_;
  150. unsigned char* key_buffer_;
  151. };
  152. /*!
  153. * @brief This class represents the TopicDataType of the type SampleMachineInfo defined by the user in the IDL file.
  154. * @ingroup DDSSampleMachine
  155. */
  156. class SampleMachineInfoPubSubType : public eprosima::fastdds::dds::TopicDataType
  157. {
  158. public:
  159. typedef SampleMachineInfo type;
  160. eProsima_user_DllExport SampleMachineInfoPubSubType();
  161. eProsima_user_DllExport ~SampleMachineInfoPubSubType() override;
  162. eProsima_user_DllExport bool serialize(
  163. const void* const data,
  164. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  165. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  166. eProsima_user_DllExport bool deserialize(
  167. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  168. void* data) override;
  169. eProsima_user_DllExport uint32_t calculate_serialized_size(
  170. const void* const data,
  171. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  172. eProsima_user_DllExport bool compute_key(
  173. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  174. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  175. bool force_md5 = false) override;
  176. eProsima_user_DllExport bool compute_key(
  177. const void* const data,
  178. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  179. bool force_md5 = false) override;
  180. eProsima_user_DllExport void* create_data() override;
  181. eProsima_user_DllExport void delete_data(
  182. void* data) override;
  183. //Register TypeObject representation in Fast DDS TypeObjectRegistry
  184. eProsima_user_DllExport void register_type_object_representation() override;
  185. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  186. eProsima_user_DllExport inline bool is_bounded() const override
  187. {
  188. return true;
  189. }
  190. #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  191. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  192. eProsima_user_DllExport inline bool is_plain(
  193. eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
  194. {
  195. static_cast<void>(data_representation);
  196. return false;
  197. }
  198. #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  199. #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  200. eProsima_user_DllExport inline bool construct_sample(
  201. void* memory) const override
  202. {
  203. static_cast<void>(memory);
  204. return false;
  205. }
  206. #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  207. private:
  208. eprosima::fastdds::MD5 md5_;
  209. unsigned char* key_buffer_;
  210. };
  211. /*!
  212. * @brief This class represents the TopicDataType of the type SamplePoints defined by the user in the IDL file.
  213. * @ingroup DDSSampleMachine
  214. */
  215. class SamplePointsPubSubType : public eprosima::fastdds::dds::TopicDataType
  216. {
  217. public:
  218. typedef SamplePoints type;
  219. eProsima_user_DllExport SamplePointsPubSubType();
  220. eProsima_user_DllExport ~SamplePointsPubSubType() override;
  221. eProsima_user_DllExport bool serialize(
  222. const void* const data,
  223. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  224. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  225. eProsima_user_DllExport bool deserialize(
  226. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  227. void* data) override;
  228. eProsima_user_DllExport uint32_t calculate_serialized_size(
  229. const void* const data,
  230. eprosima::fastdds::dds::DataRepresentationId_t data_representation) override;
  231. eProsima_user_DllExport bool compute_key(
  232. eprosima::fastdds::rtps::SerializedPayload_t& payload,
  233. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  234. bool force_md5 = false) override;
  235. eProsima_user_DllExport bool compute_key(
  236. const void* const data,
  237. eprosima::fastdds::rtps::InstanceHandle_t& ihandle,
  238. bool force_md5 = false) override;
  239. eProsima_user_DllExport void* create_data() override;
  240. eProsima_user_DllExport void delete_data(
  241. void* data) override;
  242. //Register TypeObject representation in Fast DDS TypeObjectRegistry
  243. eProsima_user_DllExport void register_type_object_representation() override;
  244. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  245. eProsima_user_DllExport inline bool is_bounded() const override
  246. {
  247. return true;
  248. }
  249. #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
  250. #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  251. eProsima_user_DllExport inline bool is_plain(
  252. eprosima::fastdds::dds::DataRepresentationId_t data_representation) const override
  253. {
  254. static_cast<void>(data_representation);
  255. return false;
  256. }
  257. #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
  258. #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  259. eProsima_user_DllExport inline bool construct_sample(
  260. void* memory) const override
  261. {
  262. static_cast<void>(memory);
  263. return false;
  264. }
  265. #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
  266. private:
  267. eprosima::fastdds::MD5 md5_;
  268. unsigned char* key_buffer_;
  269. };
  270. } // namespace SampleModule
  271. #endif // FAST_DDS_GENERATED__SAMPLEMODULE_DDSSAMPLEMACHINE_PUBSUBTYPES_HPP