CARLA
 
载入中...
搜索中...
未找到
ImagePubSubTypes.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 ImagePubSubTypes.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_SENSOR_MSGS_MSG_IMAGE_PUBSUBTYPES_H_
23#define _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_IMAGE_PUBSUBTYPES_H_
24
25#include <fastdds/dds/topic/TopicDataType.hpp>
26#include <fastrtps/utils/md5.h>
27
28#include "Image.h"
29
30// 如果未定义GEN_API_VER或者GEN_API_VER不等于1
31#if!defined(GEN_API_VER) || (GEN_API_VER!= 1)
32#error \
33 生成的Image与当前安装的Fast DDS不兼容。请使用fastddsgen重新生成它。
34#endif // GEN_API_VER
35
36namespace sensor_msgs
37{
38 namespace msg
39 {
40 /*!
41 * @brief 此类表示用户在IDL文件中定义的Image类型的主题数据类型。
42 * @ingroup IMAGE
43 */
44 class ImagePubSubType : public eprosima::fastdds::dds::TopicDataType
45 {
46 public:
47
48 // 定义类型别名
49 typedef Image type;
50
51 // 导出函数,用于构造ImagePubSubType对象
53
54 // 导出虚函数,用于析构ImagePubSubType对象
56
57 // 导出虚函数,用于序列化数据
59 void* data,
60 eprosima::fastrtps::rtps::SerializedPayload_t* payload) override;
61
62 // 导出虚函数,用于反序列化数据
64 eprosima::fastrtps::rtps::SerializedPayload_t* payload,
65 void* data) override;
66
67 // 导出虚函数,用于获取序列化大小提供者函数
68 eProsima_user_DllExport virtual std::function<uint32_t()> getSerializedSizeProvider(
69 void* data) override;
70
71 // 导出虚函数,用于获取键
73 void* data,
74 eprosima::fastrtps::rtps::InstanceHandle_t* ihandle,
75 bool force_md5 = false) override;
76
77 // 导出虚函数,用于创建数据
78 eProsima_user_DllExport virtual void* createData() override;
79
80 // 导出虚函数,用于删除数据
82 void* data) override;
83
84 #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
85 // 导出内联函数,用于判断是否有界(如果定义了相关宏)
86 eProsima_user_DllExport inline bool is_bounded() const override
87 {
88 return false;
89 }
90
91 #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
92
93 #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
94 // 导出内联函数,用于判断是否为普通类型(如果定义了相关宏)
95 eProsima_user_DllExport inline bool is_plain() const override
96 {
97 return false;
98 }
99
100 #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
101
102 #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
103 // 导出内联函数,用于构造样本(如果定义了相关宏)
104 eProsima_user_DllExport inline bool construct_sample(
105 void* memory) const override
106 {
107 (void)memory;
108 return false;
109 }
110
111 #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
112
113 // MD5对象,用于计算MD5哈希值
114 MD5 m_md5;
115 // 指向存储键的缓冲区的指针
116 unsigned char* m_keyBuffer;
117 };
118 }
119}
120
121#endif // _FAST_DDS_GENERATED_SENSOR_MSGS_MSG_IMAGE_PUBSUBTYPES_H_
#define eProsima_user_DllExport
Definition CameraInfo.h:44
此类表示用户在IDL文件中定义的Image类型的主题数据类型。
eProsima_user_DllExport ImagePubSubType()
virtual eProsima_user_DllExport bool serialize(void *data, eprosima::fastrtps::rtps::SerializedPayload_t *payload) override
virtual eProsima_user_DllExport std::function< uint32_t()> getSerializedSizeProvider(void *data) override
virtual eProsima_user_DllExport void deleteData(void *data) override
virtual eProsima_user_DllExport bool getKey(void *data, eprosima::fastrtps::rtps::InstanceHandle_t *ihandle, bool force_md5=false) override
virtual eProsima_user_DllExport void * createData() override
virtual eProsima_user_DllExport ~ImagePubSubType() override
virtual eProsima_user_DllExport bool deserialize(eprosima::fastrtps::rtps::SerializedPayload_t *payload, void *data) override
This class represents the structure Image defined by the user in the IDL file.这个类表示在 IDL(接口定义语言)文件中由用...