22namespace localization {
24namespace pyramid_map {
39 return map_node_config;
43 size_t binary_size = 0;
46 const uint16_t *us_p =
reinterpret_cast<const uint16_t *
>(buf);
48 binary_size +=
sizeof(uint16_t);
54 const unsigned char *uc_p =
reinterpret_cast<const unsigned char *
>(us_p);
61 binary_size +=
sizeof(
unsigned int) +
sizeof(
int) +
sizeof(
unsigned int) +
62 sizeof(
unsigned int) +
sizeof(
unsigned int);
64 const unsigned int *ui_p =
reinterpret_cast<const unsigned int *
>(us_p);
69 const int *int_p =
reinterpret_cast<const int *
>(ui_p);
74 ui_p =
reinterpret_cast<const unsigned int *
>(int_p);
85 return static_cast<unsigned int>(binary_size);
89 size_t buf_size)
const {
92 if (buf_size < target_size) {
97 uint16_t *us_p =
reinterpret_cast<uint16_t *
>(buf);
104 unsigned char *uc_p =
reinterpret_cast<unsigned char *
>(us_p);
111 unsigned int *ui_p =
reinterpret_cast<unsigned int *
>(us_p);
116 int *int_p =
reinterpret_cast<int *
>(ui_p);
121 ui_p =
reinterpret_cast<unsigned int *
>(int_p);
130 *ui_p =
static_cast<unsigned int>(
body_size_);
136 size_t binary_size = 0;
140 binary_size +=
sizeof(uint16_t);
152 binary_size +=
sizeof(
unsigned int) +
sizeof(
int) +
sizeof(
unsigned int) +
153 sizeof(
unsigned int);
156 binary_size +=
sizeof(
unsigned int);
157 return static_cast<unsigned int>(binary_size);
virtual ~BaseMapNodeConfig()
virtual std::shared_ptr< BaseMapNodeConfig > Clone()
Alloc a new map node config.
virtual unsigned int GetBinarySize() const
Get the size of the config in bytes.
unsigned char body_md5_[MD5LENTH]
virtual unsigned int CreateBinary(unsigned char *buf, size_t buf_size) const
Create the binary map node config.
virtual unsigned int LoadBinary(const unsigned char *buf)
Load the map node config from a binary chunk.
unsigned int m_
The map node ID at the northing direction.
unsigned int resolution_id_
The ID of the resolution.
unsigned int n_
The map node ID at the easting direction.