capstone_finish

Dependencies:   BufferedSerial motor_sn7544

Committer:
Jeonghoon
Date:
Tue Aug 13 05:53:22 2019 +0000
Revision:
3:2a3664dc6634
with ROS;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jeonghoon 3:2a3664dc6634 1 #ifndef _ROS_sensor_msgs_MultiEchoLaserScan_h
Jeonghoon 3:2a3664dc6634 2 #define _ROS_sensor_msgs_MultiEchoLaserScan_h
Jeonghoon 3:2a3664dc6634 3
Jeonghoon 3:2a3664dc6634 4 #include <stdint.h>
Jeonghoon 3:2a3664dc6634 5 #include <string.h>
Jeonghoon 3:2a3664dc6634 6 #include <stdlib.h>
Jeonghoon 3:2a3664dc6634 7 #include "ros/msg.h"
Jeonghoon 3:2a3664dc6634 8 #include "std_msgs/Header.h"
Jeonghoon 3:2a3664dc6634 9 #include "sensor_msgs/LaserEcho.h"
Jeonghoon 3:2a3664dc6634 10
Jeonghoon 3:2a3664dc6634 11 namespace sensor_msgs
Jeonghoon 3:2a3664dc6634 12 {
Jeonghoon 3:2a3664dc6634 13
Jeonghoon 3:2a3664dc6634 14 class MultiEchoLaserScan : public ros::Msg
Jeonghoon 3:2a3664dc6634 15 {
Jeonghoon 3:2a3664dc6634 16 public:
Jeonghoon 3:2a3664dc6634 17 typedef std_msgs::Header _header_type;
Jeonghoon 3:2a3664dc6634 18 _header_type header;
Jeonghoon 3:2a3664dc6634 19 typedef float _angle_min_type;
Jeonghoon 3:2a3664dc6634 20 _angle_min_type angle_min;
Jeonghoon 3:2a3664dc6634 21 typedef float _angle_max_type;
Jeonghoon 3:2a3664dc6634 22 _angle_max_type angle_max;
Jeonghoon 3:2a3664dc6634 23 typedef float _angle_increment_type;
Jeonghoon 3:2a3664dc6634 24 _angle_increment_type angle_increment;
Jeonghoon 3:2a3664dc6634 25 typedef float _time_increment_type;
Jeonghoon 3:2a3664dc6634 26 _time_increment_type time_increment;
Jeonghoon 3:2a3664dc6634 27 typedef float _scan_time_type;
Jeonghoon 3:2a3664dc6634 28 _scan_time_type scan_time;
Jeonghoon 3:2a3664dc6634 29 typedef float _range_min_type;
Jeonghoon 3:2a3664dc6634 30 _range_min_type range_min;
Jeonghoon 3:2a3664dc6634 31 typedef float _range_max_type;
Jeonghoon 3:2a3664dc6634 32 _range_max_type range_max;
Jeonghoon 3:2a3664dc6634 33 uint32_t ranges_length;
Jeonghoon 3:2a3664dc6634 34 typedef sensor_msgs::LaserEcho _ranges_type;
Jeonghoon 3:2a3664dc6634 35 _ranges_type st_ranges;
Jeonghoon 3:2a3664dc6634 36 _ranges_type * ranges;
Jeonghoon 3:2a3664dc6634 37 uint32_t intensities_length;
Jeonghoon 3:2a3664dc6634 38 typedef sensor_msgs::LaserEcho _intensities_type;
Jeonghoon 3:2a3664dc6634 39 _intensities_type st_intensities;
Jeonghoon 3:2a3664dc6634 40 _intensities_type * intensities;
Jeonghoon 3:2a3664dc6634 41
Jeonghoon 3:2a3664dc6634 42 MultiEchoLaserScan():
Jeonghoon 3:2a3664dc6634 43 header(),
Jeonghoon 3:2a3664dc6634 44 angle_min(0),
Jeonghoon 3:2a3664dc6634 45 angle_max(0),
Jeonghoon 3:2a3664dc6634 46 angle_increment(0),
Jeonghoon 3:2a3664dc6634 47 time_increment(0),
Jeonghoon 3:2a3664dc6634 48 scan_time(0),
Jeonghoon 3:2a3664dc6634 49 range_min(0),
Jeonghoon 3:2a3664dc6634 50 range_max(0),
Jeonghoon 3:2a3664dc6634 51 ranges_length(0), ranges(NULL),
Jeonghoon 3:2a3664dc6634 52 intensities_length(0), intensities(NULL)
Jeonghoon 3:2a3664dc6634 53 {
Jeonghoon 3:2a3664dc6634 54 }
Jeonghoon 3:2a3664dc6634 55
Jeonghoon 3:2a3664dc6634 56 virtual int serialize(unsigned char *outbuffer) const
Jeonghoon 3:2a3664dc6634 57 {
Jeonghoon 3:2a3664dc6634 58 int offset = 0;
Jeonghoon 3:2a3664dc6634 59 offset += this->header.serialize(outbuffer + offset);
Jeonghoon 3:2a3664dc6634 60 union {
Jeonghoon 3:2a3664dc6634 61 float real;
Jeonghoon 3:2a3664dc6634 62 uint32_t base;
Jeonghoon 3:2a3664dc6634 63 } u_angle_min;
Jeonghoon 3:2a3664dc6634 64 u_angle_min.real = this->angle_min;
Jeonghoon 3:2a3664dc6634 65 *(outbuffer + offset + 0) = (u_angle_min.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 66 *(outbuffer + offset + 1) = (u_angle_min.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 67 *(outbuffer + offset + 2) = (u_angle_min.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 68 *(outbuffer + offset + 3) = (u_angle_min.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 69 offset += sizeof(this->angle_min);
Jeonghoon 3:2a3664dc6634 70 union {
Jeonghoon 3:2a3664dc6634 71 float real;
Jeonghoon 3:2a3664dc6634 72 uint32_t base;
Jeonghoon 3:2a3664dc6634 73 } u_angle_max;
Jeonghoon 3:2a3664dc6634 74 u_angle_max.real = this->angle_max;
Jeonghoon 3:2a3664dc6634 75 *(outbuffer + offset + 0) = (u_angle_max.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 76 *(outbuffer + offset + 1) = (u_angle_max.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 77 *(outbuffer + offset + 2) = (u_angle_max.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 78 *(outbuffer + offset + 3) = (u_angle_max.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 79 offset += sizeof(this->angle_max);
Jeonghoon 3:2a3664dc6634 80 union {
Jeonghoon 3:2a3664dc6634 81 float real;
Jeonghoon 3:2a3664dc6634 82 uint32_t base;
Jeonghoon 3:2a3664dc6634 83 } u_angle_increment;
Jeonghoon 3:2a3664dc6634 84 u_angle_increment.real = this->angle_increment;
Jeonghoon 3:2a3664dc6634 85 *(outbuffer + offset + 0) = (u_angle_increment.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 86 *(outbuffer + offset + 1) = (u_angle_increment.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 87 *(outbuffer + offset + 2) = (u_angle_increment.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 88 *(outbuffer + offset + 3) = (u_angle_increment.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 89 offset += sizeof(this->angle_increment);
Jeonghoon 3:2a3664dc6634 90 union {
Jeonghoon 3:2a3664dc6634 91 float real;
Jeonghoon 3:2a3664dc6634 92 uint32_t base;
Jeonghoon 3:2a3664dc6634 93 } u_time_increment;
Jeonghoon 3:2a3664dc6634 94 u_time_increment.real = this->time_increment;
Jeonghoon 3:2a3664dc6634 95 *(outbuffer + offset + 0) = (u_time_increment.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 96 *(outbuffer + offset + 1) = (u_time_increment.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 97 *(outbuffer + offset + 2) = (u_time_increment.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 98 *(outbuffer + offset + 3) = (u_time_increment.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 99 offset += sizeof(this->time_increment);
Jeonghoon 3:2a3664dc6634 100 union {
Jeonghoon 3:2a3664dc6634 101 float real;
Jeonghoon 3:2a3664dc6634 102 uint32_t base;
Jeonghoon 3:2a3664dc6634 103 } u_scan_time;
Jeonghoon 3:2a3664dc6634 104 u_scan_time.real = this->scan_time;
Jeonghoon 3:2a3664dc6634 105 *(outbuffer + offset + 0) = (u_scan_time.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 106 *(outbuffer + offset + 1) = (u_scan_time.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 107 *(outbuffer + offset + 2) = (u_scan_time.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 108 *(outbuffer + offset + 3) = (u_scan_time.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 109 offset += sizeof(this->scan_time);
Jeonghoon 3:2a3664dc6634 110 union {
Jeonghoon 3:2a3664dc6634 111 float real;
Jeonghoon 3:2a3664dc6634 112 uint32_t base;
Jeonghoon 3:2a3664dc6634 113 } u_range_min;
Jeonghoon 3:2a3664dc6634 114 u_range_min.real = this->range_min;
Jeonghoon 3:2a3664dc6634 115 *(outbuffer + offset + 0) = (u_range_min.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 116 *(outbuffer + offset + 1) = (u_range_min.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 117 *(outbuffer + offset + 2) = (u_range_min.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 118 *(outbuffer + offset + 3) = (u_range_min.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 119 offset += sizeof(this->range_min);
Jeonghoon 3:2a3664dc6634 120 union {
Jeonghoon 3:2a3664dc6634 121 float real;
Jeonghoon 3:2a3664dc6634 122 uint32_t base;
Jeonghoon 3:2a3664dc6634 123 } u_range_max;
Jeonghoon 3:2a3664dc6634 124 u_range_max.real = this->range_max;
Jeonghoon 3:2a3664dc6634 125 *(outbuffer + offset + 0) = (u_range_max.base >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 126 *(outbuffer + offset + 1) = (u_range_max.base >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 127 *(outbuffer + offset + 2) = (u_range_max.base >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 128 *(outbuffer + offset + 3) = (u_range_max.base >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 129 offset += sizeof(this->range_max);
Jeonghoon 3:2a3664dc6634 130 *(outbuffer + offset + 0) = (this->ranges_length >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 131 *(outbuffer + offset + 1) = (this->ranges_length >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 132 *(outbuffer + offset + 2) = (this->ranges_length >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 133 *(outbuffer + offset + 3) = (this->ranges_length >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 134 offset += sizeof(this->ranges_length);
Jeonghoon 3:2a3664dc6634 135 for( uint32_t i = 0; i < ranges_length; i++){
Jeonghoon 3:2a3664dc6634 136 offset += this->ranges[i].serialize(outbuffer + offset);
Jeonghoon 3:2a3664dc6634 137 }
Jeonghoon 3:2a3664dc6634 138 *(outbuffer + offset + 0) = (this->intensities_length >> (8 * 0)) & 0xFF;
Jeonghoon 3:2a3664dc6634 139 *(outbuffer + offset + 1) = (this->intensities_length >> (8 * 1)) & 0xFF;
Jeonghoon 3:2a3664dc6634 140 *(outbuffer + offset + 2) = (this->intensities_length >> (8 * 2)) & 0xFF;
Jeonghoon 3:2a3664dc6634 141 *(outbuffer + offset + 3) = (this->intensities_length >> (8 * 3)) & 0xFF;
Jeonghoon 3:2a3664dc6634 142 offset += sizeof(this->intensities_length);
Jeonghoon 3:2a3664dc6634 143 for( uint32_t i = 0; i < intensities_length; i++){
Jeonghoon 3:2a3664dc6634 144 offset += this->intensities[i].serialize(outbuffer + offset);
Jeonghoon 3:2a3664dc6634 145 }
Jeonghoon 3:2a3664dc6634 146 return offset;
Jeonghoon 3:2a3664dc6634 147 }
Jeonghoon 3:2a3664dc6634 148
Jeonghoon 3:2a3664dc6634 149 virtual int deserialize(unsigned char *inbuffer)
Jeonghoon 3:2a3664dc6634 150 {
Jeonghoon 3:2a3664dc6634 151 int offset = 0;
Jeonghoon 3:2a3664dc6634 152 offset += this->header.deserialize(inbuffer + offset);
Jeonghoon 3:2a3664dc6634 153 union {
Jeonghoon 3:2a3664dc6634 154 float real;
Jeonghoon 3:2a3664dc6634 155 uint32_t base;
Jeonghoon 3:2a3664dc6634 156 } u_angle_min;
Jeonghoon 3:2a3664dc6634 157 u_angle_min.base = 0;
Jeonghoon 3:2a3664dc6634 158 u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 159 u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 160 u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 161 u_angle_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 162 this->angle_min = u_angle_min.real;
Jeonghoon 3:2a3664dc6634 163 offset += sizeof(this->angle_min);
Jeonghoon 3:2a3664dc6634 164 union {
Jeonghoon 3:2a3664dc6634 165 float real;
Jeonghoon 3:2a3664dc6634 166 uint32_t base;
Jeonghoon 3:2a3664dc6634 167 } u_angle_max;
Jeonghoon 3:2a3664dc6634 168 u_angle_max.base = 0;
Jeonghoon 3:2a3664dc6634 169 u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 170 u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 171 u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 172 u_angle_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 173 this->angle_max = u_angle_max.real;
Jeonghoon 3:2a3664dc6634 174 offset += sizeof(this->angle_max);
Jeonghoon 3:2a3664dc6634 175 union {
Jeonghoon 3:2a3664dc6634 176 float real;
Jeonghoon 3:2a3664dc6634 177 uint32_t base;
Jeonghoon 3:2a3664dc6634 178 } u_angle_increment;
Jeonghoon 3:2a3664dc6634 179 u_angle_increment.base = 0;
Jeonghoon 3:2a3664dc6634 180 u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 181 u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 182 u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 183 u_angle_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 184 this->angle_increment = u_angle_increment.real;
Jeonghoon 3:2a3664dc6634 185 offset += sizeof(this->angle_increment);
Jeonghoon 3:2a3664dc6634 186 union {
Jeonghoon 3:2a3664dc6634 187 float real;
Jeonghoon 3:2a3664dc6634 188 uint32_t base;
Jeonghoon 3:2a3664dc6634 189 } u_time_increment;
Jeonghoon 3:2a3664dc6634 190 u_time_increment.base = 0;
Jeonghoon 3:2a3664dc6634 191 u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 192 u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 193 u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 194 u_time_increment.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 195 this->time_increment = u_time_increment.real;
Jeonghoon 3:2a3664dc6634 196 offset += sizeof(this->time_increment);
Jeonghoon 3:2a3664dc6634 197 union {
Jeonghoon 3:2a3664dc6634 198 float real;
Jeonghoon 3:2a3664dc6634 199 uint32_t base;
Jeonghoon 3:2a3664dc6634 200 } u_scan_time;
Jeonghoon 3:2a3664dc6634 201 u_scan_time.base = 0;
Jeonghoon 3:2a3664dc6634 202 u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 203 u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 204 u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 205 u_scan_time.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 206 this->scan_time = u_scan_time.real;
Jeonghoon 3:2a3664dc6634 207 offset += sizeof(this->scan_time);
Jeonghoon 3:2a3664dc6634 208 union {
Jeonghoon 3:2a3664dc6634 209 float real;
Jeonghoon 3:2a3664dc6634 210 uint32_t base;
Jeonghoon 3:2a3664dc6634 211 } u_range_min;
Jeonghoon 3:2a3664dc6634 212 u_range_min.base = 0;
Jeonghoon 3:2a3664dc6634 213 u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 214 u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 215 u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 216 u_range_min.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 217 this->range_min = u_range_min.real;
Jeonghoon 3:2a3664dc6634 218 offset += sizeof(this->range_min);
Jeonghoon 3:2a3664dc6634 219 union {
Jeonghoon 3:2a3664dc6634 220 float real;
Jeonghoon 3:2a3664dc6634 221 uint32_t base;
Jeonghoon 3:2a3664dc6634 222 } u_range_max;
Jeonghoon 3:2a3664dc6634 223 u_range_max.base = 0;
Jeonghoon 3:2a3664dc6634 224 u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
Jeonghoon 3:2a3664dc6634 225 u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 226 u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 227 u_range_max.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 228 this->range_max = u_range_max.real;
Jeonghoon 3:2a3664dc6634 229 offset += sizeof(this->range_max);
Jeonghoon 3:2a3664dc6634 230 uint32_t ranges_lengthT = ((uint32_t) (*(inbuffer + offset)));
Jeonghoon 3:2a3664dc6634 231 ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 232 ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 233 ranges_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 234 offset += sizeof(this->ranges_length);
Jeonghoon 3:2a3664dc6634 235 if(ranges_lengthT > ranges_length)
Jeonghoon 3:2a3664dc6634 236 this->ranges = (sensor_msgs::LaserEcho*)realloc(this->ranges, ranges_lengthT * sizeof(sensor_msgs::LaserEcho));
Jeonghoon 3:2a3664dc6634 237 ranges_length = ranges_lengthT;
Jeonghoon 3:2a3664dc6634 238 for( uint32_t i = 0; i < ranges_length; i++){
Jeonghoon 3:2a3664dc6634 239 offset += this->st_ranges.deserialize(inbuffer + offset);
Jeonghoon 3:2a3664dc6634 240 memcpy( &(this->ranges[i]), &(this->st_ranges), sizeof(sensor_msgs::LaserEcho));
Jeonghoon 3:2a3664dc6634 241 }
Jeonghoon 3:2a3664dc6634 242 uint32_t intensities_lengthT = ((uint32_t) (*(inbuffer + offset)));
Jeonghoon 3:2a3664dc6634 243 intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Jeonghoon 3:2a3664dc6634 244 intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Jeonghoon 3:2a3664dc6634 245 intensities_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Jeonghoon 3:2a3664dc6634 246 offset += sizeof(this->intensities_length);
Jeonghoon 3:2a3664dc6634 247 if(intensities_lengthT > intensities_length)
Jeonghoon 3:2a3664dc6634 248 this->intensities = (sensor_msgs::LaserEcho*)realloc(this->intensities, intensities_lengthT * sizeof(sensor_msgs::LaserEcho));
Jeonghoon 3:2a3664dc6634 249 intensities_length = intensities_lengthT;
Jeonghoon 3:2a3664dc6634 250 for( uint32_t i = 0; i < intensities_length; i++){
Jeonghoon 3:2a3664dc6634 251 offset += this->st_intensities.deserialize(inbuffer + offset);
Jeonghoon 3:2a3664dc6634 252 memcpy( &(this->intensities[i]), &(this->st_intensities), sizeof(sensor_msgs::LaserEcho));
Jeonghoon 3:2a3664dc6634 253 }
Jeonghoon 3:2a3664dc6634 254 return offset;
Jeonghoon 3:2a3664dc6634 255 }
Jeonghoon 3:2a3664dc6634 256
Jeonghoon 3:2a3664dc6634 257 const char * getType(){ return "sensor_msgs/MultiEchoLaserScan"; };
Jeonghoon 3:2a3664dc6634 258 const char * getMD5(){ return "6fefb0c6da89d7c8abe4b339f5c2f8fb"; };
Jeonghoon 3:2a3664dc6634 259
Jeonghoon 3:2a3664dc6634 260 };
Jeonghoon 3:2a3664dc6634 261
Jeonghoon 3:2a3664dc6634 262 }
Jeonghoon 3:2a3664dc6634 263 #endif