Apollo 10.0
自动驾驶开放平台
underlay_message_type.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#ifndef CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_TYPE_H_
18#define CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_TYPE_H_
19
20#include "cyber/base/macros.h"
21
22#include "fastdds/dds/topic/TopicDataType.hpp"
23#include "fastrtps/utils/md5.h"
25
26namespace apollo {
27namespace cyber {
28namespace transport {
29
35class UnderlayMessageType : public eprosima::fastdds::dds::TopicDataType {
36 public:
38
40 virtual ~UnderlayMessageType();
41 virtual bool serialize( // NOLINT
42 void* data,
43 eprosima::fastrtps::rtps::SerializedPayload_t* payload) override;
44 virtual bool deserialize( // NOLINT
45 eprosima::fastrtps::rtps::SerializedPayload_t* payload,
46 void* data) override;
47 virtual std::function<uint32_t()> getSerializedSizeProvider( // NOLINT
48 void* data) override;
49 virtual bool getKey(void* data, // NOLINT
50 eprosima::fastrtps::rtps::InstanceHandle_t* ihandle,
51 bool force_md5 = false) override;
52 virtual void* createData() override; // NOLINT
53 virtual void deleteData(void* data) override; // NOLINT
54 MD5 m_md5;
55 unsigned char* m_keyBuffer;
56};
57
58} // namespace transport
59} // namespace cyber
60} // namespace apollo
61
62#endif // CYBER_TRANSPORT_RTPS_UNDERLAY_MESSAGE_TYPE_H_
This class represents the TopicDataType of the type UnderlayMessage defined by the user in the IDL fi...
virtual bool serialize(void *data, eprosima::fastrtps::rtps::SerializedPayload_t *payload) override
virtual bool deserialize(eprosima::fastrtps::rtps::SerializedPayload_t *payload, void *data) override
virtual std::function< uint32_t()> getSerializedSizeProvider(void *data) override
virtual bool getKey(void *data, eprosima::fastrtps::rtps::InstanceHandle_t *ihandle, bool force_md5=false) override
This class represents the structure UnderlayMessage defined by the user in the IDL file.
class register implement
Definition arena_queue.h:37