45 return static_cast<hsize
>(header_body_size_ + HEADER_FLAG_SIZE +
59 header_ver_ = header_ver;
61 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(uint32_t));
66 static_cast<hsize
>(Item_Header_Size + 1 + msg_name.length() + 1);
71 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(uint32_t));
74 total_frames_ = total_frames;
76 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(uint32_t));
79 frame_size_ = frame_size;
81 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(
bsize));
84 frame_pos_ = frame_pos;
86 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(
bsize));
91 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(uint32_t));
94 time_stamp_ = time_stamp;
96 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(double));
101 static_cast<hsize
>(Item_Header_Size + 1 +
sizeof(
bsize));
105 template <
typename T,
size_t S>
106 char *SerializeBasicType(
const T *
value,
char *buf,
size_t size) {
107 if (!buf || size < S) {
111 memcpy(res, value, S);
117 template <
typename T,
size_t S>
118 bool DiserializeBasicType(T *value,
const char *buf) {
123 memcpy(temp, buf, S);
124 *value = *(
reinterpret_cast<T *
>(temp));
128 char *SerializeHeaderFlag(
char *buf,
size_t size);
129 char *SerializeHeaderSize(
char *buf,
size_t size);
141 hsize header_body_size_ = 0;
143 &header_ver_, &msg_name_, &msg_id_, &msg_size_, &total_frames_,
144 &frame_size_, &frame_pos_, &index_, &time_stamp_,
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
uint32_t bsize
Definition: bridge_header_item.h:24
constexpr char BRIDGE_HEADER_FLAG[]
Definition: bridge_header.h:29
constexpr size_t HEADER_FLAG_SIZE
Definition: bridge_header.h:30
Definition: bridge_header_item.h:37
apollo::cyber::base::std value
HType
Definition: bridge_header_item.h:26
uint32_t hsize
Definition: bridge_header.h:27
constexpr size_t Item_Header_Size
Definition: bridge_header.h:31