make changes on buffer serial
map_msgs/ProjectedMapInfo.h@0:04ac6be8229a, 2019-11-08 (annotated)
- Committer:
- Gary Servin
- Date:
- Fri Nov 08 14:38:09 2019 -0300
- Revision:
- 0:04ac6be8229a
Initial commit, generated based on a clean melodic-desktop-full
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Gary Servin |
0:04ac6be8229a | 1 | #ifndef _ROS_map_msgs_ProjectedMapInfo_h |
Gary Servin |
0:04ac6be8229a | 2 | #define _ROS_map_msgs_ProjectedMapInfo_h |
Gary Servin |
0:04ac6be8229a | 3 | |
Gary Servin |
0:04ac6be8229a | 4 | #include <stdint.h> |
Gary Servin |
0:04ac6be8229a | 5 | #include <string.h> |
Gary Servin |
0:04ac6be8229a | 6 | #include <stdlib.h> |
Gary Servin |
0:04ac6be8229a | 7 | #include "ros/msg.h" |
Gary Servin |
0:04ac6be8229a | 8 | |
Gary Servin |
0:04ac6be8229a | 9 | namespace map_msgs |
Gary Servin |
0:04ac6be8229a | 10 | { |
Gary Servin |
0:04ac6be8229a | 11 | |
Gary Servin |
0:04ac6be8229a | 12 | class ProjectedMapInfo : public ros::Msg |
Gary Servin |
0:04ac6be8229a | 13 | { |
Gary Servin |
0:04ac6be8229a | 14 | public: |
Gary Servin |
0:04ac6be8229a | 15 | typedef const char* _frame_id_type; |
Gary Servin |
0:04ac6be8229a | 16 | _frame_id_type frame_id; |
Gary Servin |
0:04ac6be8229a | 17 | typedef double _x_type; |
Gary Servin |
0:04ac6be8229a | 18 | _x_type x; |
Gary Servin |
0:04ac6be8229a | 19 | typedef double _y_type; |
Gary Servin |
0:04ac6be8229a | 20 | _y_type y; |
Gary Servin |
0:04ac6be8229a | 21 | typedef double _width_type; |
Gary Servin |
0:04ac6be8229a | 22 | _width_type width; |
Gary Servin |
0:04ac6be8229a | 23 | typedef double _height_type; |
Gary Servin |
0:04ac6be8229a | 24 | _height_type height; |
Gary Servin |
0:04ac6be8229a | 25 | typedef double _min_z_type; |
Gary Servin |
0:04ac6be8229a | 26 | _min_z_type min_z; |
Gary Servin |
0:04ac6be8229a | 27 | typedef double _max_z_type; |
Gary Servin |
0:04ac6be8229a | 28 | _max_z_type max_z; |
Gary Servin |
0:04ac6be8229a | 29 | |
Gary Servin |
0:04ac6be8229a | 30 | ProjectedMapInfo(): |
Gary Servin |
0:04ac6be8229a | 31 | frame_id(""), |
Gary Servin |
0:04ac6be8229a | 32 | x(0), |
Gary Servin |
0:04ac6be8229a | 33 | y(0), |
Gary Servin |
0:04ac6be8229a | 34 | width(0), |
Gary Servin |
0:04ac6be8229a | 35 | height(0), |
Gary Servin |
0:04ac6be8229a | 36 | min_z(0), |
Gary Servin |
0:04ac6be8229a | 37 | max_z(0) |
Gary Servin |
0:04ac6be8229a | 38 | { |
Gary Servin |
0:04ac6be8229a | 39 | } |
Gary Servin |
0:04ac6be8229a | 40 | |
Gary Servin |
0:04ac6be8229a | 41 | virtual int serialize(unsigned char *outbuffer) const |
Gary Servin |
0:04ac6be8229a | 42 | { |
Gary Servin |
0:04ac6be8229a | 43 | int offset = 0; |
Gary Servin |
0:04ac6be8229a | 44 | uint32_t length_frame_id = strlen(this->frame_id); |
Gary Servin |
0:04ac6be8229a | 45 | varToArr(outbuffer + offset, length_frame_id); |
Gary Servin |
0:04ac6be8229a | 46 | offset += 4; |
Gary Servin |
0:04ac6be8229a | 47 | memcpy(outbuffer + offset, this->frame_id, length_frame_id); |
Gary Servin |
0:04ac6be8229a | 48 | offset += length_frame_id; |
Gary Servin |
0:04ac6be8229a | 49 | union { |
Gary Servin |
0:04ac6be8229a | 50 | double real; |
Gary Servin |
0:04ac6be8229a | 51 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 52 | } u_x; |
Gary Servin |
0:04ac6be8229a | 53 | u_x.real = this->x; |
Gary Servin |
0:04ac6be8229a | 54 | *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 55 | *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 56 | *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 57 | *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 58 | *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 59 | *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 60 | *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 61 | *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 62 | offset += sizeof(this->x); |
Gary Servin |
0:04ac6be8229a | 63 | union { |
Gary Servin |
0:04ac6be8229a | 64 | double real; |
Gary Servin |
0:04ac6be8229a | 65 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 66 | } u_y; |
Gary Servin |
0:04ac6be8229a | 67 | u_y.real = this->y; |
Gary Servin |
0:04ac6be8229a | 68 | *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 69 | *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 70 | *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 71 | *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 72 | *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 73 | *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 74 | *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 75 | *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 76 | offset += sizeof(this->y); |
Gary Servin |
0:04ac6be8229a | 77 | union { |
Gary Servin |
0:04ac6be8229a | 78 | double real; |
Gary Servin |
0:04ac6be8229a | 79 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 80 | } u_width; |
Gary Servin |
0:04ac6be8229a | 81 | u_width.real = this->width; |
Gary Servin |
0:04ac6be8229a | 82 | *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 83 | *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 84 | *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 85 | *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 86 | *(outbuffer + offset + 4) = (u_width.base >> (8 * 4)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 87 | *(outbuffer + offset + 5) = (u_width.base >> (8 * 5)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 88 | *(outbuffer + offset + 6) = (u_width.base >> (8 * 6)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 89 | *(outbuffer + offset + 7) = (u_width.base >> (8 * 7)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 90 | offset += sizeof(this->width); |
Gary Servin |
0:04ac6be8229a | 91 | union { |
Gary Servin |
0:04ac6be8229a | 92 | double real; |
Gary Servin |
0:04ac6be8229a | 93 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 94 | } u_height; |
Gary Servin |
0:04ac6be8229a | 95 | u_height.real = this->height; |
Gary Servin |
0:04ac6be8229a | 96 | *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 97 | *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 98 | *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 99 | *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 100 | *(outbuffer + offset + 4) = (u_height.base >> (8 * 4)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 101 | *(outbuffer + offset + 5) = (u_height.base >> (8 * 5)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 102 | *(outbuffer + offset + 6) = (u_height.base >> (8 * 6)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 103 | *(outbuffer + offset + 7) = (u_height.base >> (8 * 7)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 104 | offset += sizeof(this->height); |
Gary Servin |
0:04ac6be8229a | 105 | union { |
Gary Servin |
0:04ac6be8229a | 106 | double real; |
Gary Servin |
0:04ac6be8229a | 107 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 108 | } u_min_z; |
Gary Servin |
0:04ac6be8229a | 109 | u_min_z.real = this->min_z; |
Gary Servin |
0:04ac6be8229a | 110 | *(outbuffer + offset + 0) = (u_min_z.base >> (8 * 0)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 111 | *(outbuffer + offset + 1) = (u_min_z.base >> (8 * 1)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 112 | *(outbuffer + offset + 2) = (u_min_z.base >> (8 * 2)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 113 | *(outbuffer + offset + 3) = (u_min_z.base >> (8 * 3)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 114 | *(outbuffer + offset + 4) = (u_min_z.base >> (8 * 4)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 115 | *(outbuffer + offset + 5) = (u_min_z.base >> (8 * 5)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 116 | *(outbuffer + offset + 6) = (u_min_z.base >> (8 * 6)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 117 | *(outbuffer + offset + 7) = (u_min_z.base >> (8 * 7)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 118 | offset += sizeof(this->min_z); |
Gary Servin |
0:04ac6be8229a | 119 | union { |
Gary Servin |
0:04ac6be8229a | 120 | double real; |
Gary Servin |
0:04ac6be8229a | 121 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 122 | } u_max_z; |
Gary Servin |
0:04ac6be8229a | 123 | u_max_z.real = this->max_z; |
Gary Servin |
0:04ac6be8229a | 124 | *(outbuffer + offset + 0) = (u_max_z.base >> (8 * 0)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 125 | *(outbuffer + offset + 1) = (u_max_z.base >> (8 * 1)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 126 | *(outbuffer + offset + 2) = (u_max_z.base >> (8 * 2)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 127 | *(outbuffer + offset + 3) = (u_max_z.base >> (8 * 3)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 128 | *(outbuffer + offset + 4) = (u_max_z.base >> (8 * 4)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 129 | *(outbuffer + offset + 5) = (u_max_z.base >> (8 * 5)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 130 | *(outbuffer + offset + 6) = (u_max_z.base >> (8 * 6)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 131 | *(outbuffer + offset + 7) = (u_max_z.base >> (8 * 7)) & 0xFF; |
Gary Servin |
0:04ac6be8229a | 132 | offset += sizeof(this->max_z); |
Gary Servin |
0:04ac6be8229a | 133 | return offset; |
Gary Servin |
0:04ac6be8229a | 134 | } |
Gary Servin |
0:04ac6be8229a | 135 | |
Gary Servin |
0:04ac6be8229a | 136 | virtual int deserialize(unsigned char *inbuffer) |
Gary Servin |
0:04ac6be8229a | 137 | { |
Gary Servin |
0:04ac6be8229a | 138 | int offset = 0; |
Gary Servin |
0:04ac6be8229a | 139 | uint32_t length_frame_id; |
Gary Servin |
0:04ac6be8229a | 140 | arrToVar(length_frame_id, (inbuffer + offset)); |
Gary Servin |
0:04ac6be8229a | 141 | offset += 4; |
Gary Servin |
0:04ac6be8229a | 142 | for(unsigned int k= offset; k< offset+length_frame_id; ++k){ |
Gary Servin |
0:04ac6be8229a | 143 | inbuffer[k-1]=inbuffer[k]; |
Gary Servin |
0:04ac6be8229a | 144 | } |
Gary Servin |
0:04ac6be8229a | 145 | inbuffer[offset+length_frame_id-1]=0; |
Gary Servin |
0:04ac6be8229a | 146 | this->frame_id = (char *)(inbuffer + offset-1); |
Gary Servin |
0:04ac6be8229a | 147 | offset += length_frame_id; |
Gary Servin |
0:04ac6be8229a | 148 | union { |
Gary Servin |
0:04ac6be8229a | 149 | double real; |
Gary Servin |
0:04ac6be8229a | 150 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 151 | } u_x; |
Gary Servin |
0:04ac6be8229a | 152 | u_x.base = 0; |
Gary Servin |
0:04ac6be8229a | 153 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
Gary Servin |
0:04ac6be8229a | 154 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
Gary Servin |
0:04ac6be8229a | 155 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
Gary Servin |
0:04ac6be8229a | 156 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
Gary Servin |
0:04ac6be8229a | 157 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
Gary Servin |
0:04ac6be8229a | 158 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
Gary Servin |
0:04ac6be8229a | 159 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
Gary Servin |
0:04ac6be8229a | 160 | u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
Gary Servin |
0:04ac6be8229a | 161 | this->x = u_x.real; |
Gary Servin |
0:04ac6be8229a | 162 | offset += sizeof(this->x); |
Gary Servin |
0:04ac6be8229a | 163 | union { |
Gary Servin |
0:04ac6be8229a | 164 | double real; |
Gary Servin |
0:04ac6be8229a | 165 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 166 | } u_y; |
Gary Servin |
0:04ac6be8229a | 167 | u_y.base = 0; |
Gary Servin |
0:04ac6be8229a | 168 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
Gary Servin |
0:04ac6be8229a | 169 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
Gary Servin |
0:04ac6be8229a | 170 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
Gary Servin |
0:04ac6be8229a | 171 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
Gary Servin |
0:04ac6be8229a | 172 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
Gary Servin |
0:04ac6be8229a | 173 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
Gary Servin |
0:04ac6be8229a | 174 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
Gary Servin |
0:04ac6be8229a | 175 | u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
Gary Servin |
0:04ac6be8229a | 176 | this->y = u_y.real; |
Gary Servin |
0:04ac6be8229a | 177 | offset += sizeof(this->y); |
Gary Servin |
0:04ac6be8229a | 178 | union { |
Gary Servin |
0:04ac6be8229a | 179 | double real; |
Gary Servin |
0:04ac6be8229a | 180 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 181 | } u_width; |
Gary Servin |
0:04ac6be8229a | 182 | u_width.base = 0; |
Gary Servin |
0:04ac6be8229a | 183 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
Gary Servin |
0:04ac6be8229a | 184 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
Gary Servin |
0:04ac6be8229a | 185 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
Gary Servin |
0:04ac6be8229a | 186 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
Gary Servin |
0:04ac6be8229a | 187 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
Gary Servin |
0:04ac6be8229a | 188 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
Gary Servin |
0:04ac6be8229a | 189 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
Gary Servin |
0:04ac6be8229a | 190 | u_width.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
Gary Servin |
0:04ac6be8229a | 191 | this->width = u_width.real; |
Gary Servin |
0:04ac6be8229a | 192 | offset += sizeof(this->width); |
Gary Servin |
0:04ac6be8229a | 193 | union { |
Gary Servin |
0:04ac6be8229a | 194 | double real; |
Gary Servin |
0:04ac6be8229a | 195 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 196 | } u_height; |
Gary Servin |
0:04ac6be8229a | 197 | u_height.base = 0; |
Gary Servin |
0:04ac6be8229a | 198 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
Gary Servin |
0:04ac6be8229a | 199 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
Gary Servin |
0:04ac6be8229a | 200 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
Gary Servin |
0:04ac6be8229a | 201 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
Gary Servin |
0:04ac6be8229a | 202 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
Gary Servin |
0:04ac6be8229a | 203 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
Gary Servin |
0:04ac6be8229a | 204 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
Gary Servin |
0:04ac6be8229a | 205 | u_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
Gary Servin |
0:04ac6be8229a | 206 | this->height = u_height.real; |
Gary Servin |
0:04ac6be8229a | 207 | offset += sizeof(this->height); |
Gary Servin |
0:04ac6be8229a | 208 | union { |
Gary Servin |
0:04ac6be8229a | 209 | double real; |
Gary Servin |
0:04ac6be8229a | 210 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 211 | } u_min_z; |
Gary Servin |
0:04ac6be8229a | 212 | u_min_z.base = 0; |
Gary Servin |
0:04ac6be8229a | 213 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
Gary Servin |
0:04ac6be8229a | 214 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
Gary Servin |
0:04ac6be8229a | 215 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
Gary Servin |
0:04ac6be8229a | 216 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
Gary Servin |
0:04ac6be8229a | 217 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
Gary Servin |
0:04ac6be8229a | 218 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
Gary Servin |
0:04ac6be8229a | 219 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
Gary Servin |
0:04ac6be8229a | 220 | u_min_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
Gary Servin |
0:04ac6be8229a | 221 | this->min_z = u_min_z.real; |
Gary Servin |
0:04ac6be8229a | 222 | offset += sizeof(this->min_z); |
Gary Servin |
0:04ac6be8229a | 223 | union { |
Gary Servin |
0:04ac6be8229a | 224 | double real; |
Gary Servin |
0:04ac6be8229a | 225 | uint64_t base; |
Gary Servin |
0:04ac6be8229a | 226 | } u_max_z; |
Gary Servin |
0:04ac6be8229a | 227 | u_max_z.base = 0; |
Gary Servin |
0:04ac6be8229a | 228 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
Gary Servin |
0:04ac6be8229a | 229 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
Gary Servin |
0:04ac6be8229a | 230 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
Gary Servin |
0:04ac6be8229a | 231 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
Gary Servin |
0:04ac6be8229a | 232 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
Gary Servin |
0:04ac6be8229a | 233 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
Gary Servin |
0:04ac6be8229a | 234 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
Gary Servin |
0:04ac6be8229a | 235 | u_max_z.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
Gary Servin |
0:04ac6be8229a | 236 | this->max_z = u_max_z.real; |
Gary Servin |
0:04ac6be8229a | 237 | offset += sizeof(this->max_z); |
Gary Servin |
0:04ac6be8229a | 238 | return offset; |
Gary Servin |
0:04ac6be8229a | 239 | } |
Gary Servin |
0:04ac6be8229a | 240 | |
Gary Servin |
0:04ac6be8229a | 241 | const char * getType(){ return "map_msgs/ProjectedMapInfo"; }; |
Gary Servin |
0:04ac6be8229a | 242 | const char * getMD5(){ return "2dc10595ae94de23f22f8a6d2a0eef7a"; }; |
Gary Servin |
0:04ac6be8229a | 243 | |
Gary Servin |
0:04ac6be8229a | 244 | }; |
Gary Servin |
0:04ac6be8229a | 245 | |
Gary Servin |
0:04ac6be8229a | 246 | } |
Gary Servin |
0:04ac6be8229a | 247 | #endif |