1 #ifndef _ROS_sensor_msgs_PointCloud2_h
2 #define _ROS_sensor_msgs_PointCloud2_h
44 virtual int serialize(
unsigned char *outbuffer)
const
48 *(outbuffer + offset + 0) = (this->
height >> (8 * 0)) & 0xFF;
49 *(outbuffer + offset + 1) = (this->
height >> (8 * 1)) & 0xFF;
50 *(outbuffer + offset + 2) = (this->
height >> (8 * 2)) & 0xFF;
51 *(outbuffer + offset + 3) = (this->
height >> (8 * 3)) & 0xFF;
52 offset +=
sizeof(this->
height);
53 *(outbuffer + offset + 0) = (this->
width >> (8 * 0)) & 0xFF;
54 *(outbuffer + offset + 1) = (this->
width >> (8 * 1)) & 0xFF;
55 *(outbuffer + offset + 2) = (this->
width >> (8 * 2)) & 0xFF;
56 *(outbuffer + offset + 3) = (this->
width >> (8 * 3)) & 0xFF;
57 offset +=
sizeof(this->
width);
59 *(outbuffer + offset++) = 0;
60 *(outbuffer + offset++) = 0;
61 *(outbuffer + offset++) = 0;
70 *(outbuffer + offset + 0) = (u_is_bigendian.base >> (8 * 0)) & 0xFF;
72 *(outbuffer + offset + 0) = (this->
point_step >> (8 * 0)) & 0xFF;
73 *(outbuffer + offset + 1) = (this->
point_step >> (8 * 1)) & 0xFF;
74 *(outbuffer + offset + 2) = (this->
point_step >> (8 * 2)) & 0xFF;
75 *(outbuffer + offset + 3) = (this->
point_step >> (8 * 3)) & 0xFF;
77 *(outbuffer + offset + 0) = (this->
row_step >> (8 * 0)) & 0xFF;
78 *(outbuffer + offset + 1) = (this->
row_step >> (8 * 1)) & 0xFF;
79 *(outbuffer + offset + 2) = (this->
row_step >> (8 * 2)) & 0xFF;
80 *(outbuffer + offset + 3) = (this->
row_step >> (8 * 3)) & 0xFF;
83 *(outbuffer + offset++) = 0;
84 *(outbuffer + offset++) = 0;
85 *(outbuffer + offset++) = 0;
87 *(outbuffer + offset + 0) = (this->
data[i] >> (8 * 0)) & 0xFF;
88 offset +=
sizeof(this->
data[i]);
95 *(outbuffer + offset + 0) = (u_is_dense.base >> (8 * 0)) & 0xFF;
104 this->
height = ((uint32_t) (*(inbuffer + offset)));
105 this->
height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
106 this->
height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
107 this->
height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
108 offset +=
sizeof(this->
height);
109 this->
width = ((uint32_t) (*(inbuffer + offset)));
110 this->
width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
111 this->
width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
112 this->
width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
113 offset +=
sizeof(this->
width);
114 uint8_t fields_lengthT = *(inbuffer + offset++);
127 u_is_bigendian.base = 0;
128 u_is_bigendian.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
131 this->
point_step = ((uint32_t) (*(inbuffer + offset)));
132 this->
point_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
133 this->
point_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
134 this->
point_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
136 this->
row_step = ((uint32_t) (*(inbuffer + offset)));
137 this->
row_step |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
138 this->
row_step |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
139 this->
row_step |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
141 uint8_t data_lengthT = *(inbuffer + offset++);
143 this->
data = (uint8_t*)realloc(this->
data, data_lengthT *
sizeof(uint8_t));
147 this->
st_data = ((uint8_t) (*(inbuffer + offset)));
148 offset +=
sizeof(this->
st_data);
149 memcpy( &(this->
data[i]), &(this->
st_data),
sizeof(uint8_t));
156 u_is_dense.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
162 const char *
getType(){
return "sensor_msgs/PointCloud2"; };
163 const char *
getMD5(){
return "1158d486dd51d683ce2f1be655c3c181"; };
uint8_t st_data
Definition: PointCloud2.h:27
uint32_t row_step
Definition: PointCloud2.h:25
bool is_dense
Definition: PointCloud2.h:29
Definition: PointCloud2.h:14
uint32_t width
Definition: PointCloud2.h:19
virtual int serialize(unsigned char *outbuffer) const
Definition: PointCloud2.h:44
virtual int serialize(unsigned char *outbuffer) const
Definition: PointField.h:36
uint8_t * data
Definition: PointCloud2.h:28
Definition: PointField.h:12
virtual int deserialize(unsigned char *inbuffer)
Definition: PointField.h:59
bool is_bigendian
Definition: PointCloud2.h:23
sensor_msgs::PointField st_fields
Definition: PointCloud2.h:21
uint32_t height
Definition: PointCloud2.h:18
const char * getType()
Definition: PointCloud2.h:162
uint8_t data_length
Definition: PointCloud2.h:26
PointCloud2()
Definition: PointCloud2.h:31
sensor_msgs::PointField * fields
Definition: PointCloud2.h:22
uint8_t fields_length
Definition: PointCloud2.h:20
virtual int deserialize(unsigned char *inbuffer)
Definition: PointCloud2.h:100
const char * getMD5()
Definition: PointCloud2.h:163
std_msgs::Header header
Definition: PointCloud2.h:17
uint32_t point_step
Definition: PointCloud2.h:24