ROS Serial library for Mbed platforms for ROS Indigo Igloo. Check http://wiki.ros.org/rosserial_mbed/ for more information
Dependents: rosserial_mbed_hello_world_publisher rtos_base_control rosserial_mbed_F64MA ROS-RTOS ... more
PointCloud2Update.h
00001 #ifndef _ROS_map_msgs_PointCloud2Update_h 00002 #define _ROS_map_msgs_PointCloud2Update_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "std_msgs/Header.h" 00009 #include "sensor_msgs/PointCloud2.h" 00010 00011 namespace map_msgs 00012 { 00013 00014 class PointCloud2Update : public ros::Msg 00015 { 00016 public: 00017 std_msgs::Header header; 00018 uint32_t type; 00019 sensor_msgs::PointCloud2 points; 00020 enum { ADD = 0 }; 00021 enum { DELETE = 1 }; 00022 00023 PointCloud2Update(): 00024 header(), 00025 type(0), 00026 points() 00027 { 00028 } 00029 00030 virtual int serialize(unsigned char *outbuffer) const 00031 { 00032 int offset = 0; 00033 offset += this->header.serialize(outbuffer + offset); 00034 *(outbuffer + offset + 0) = (this->type >> (8 * 0)) & 0xFF; 00035 *(outbuffer + offset + 1) = (this->type >> (8 * 1)) & 0xFF; 00036 *(outbuffer + offset + 2) = (this->type >> (8 * 2)) & 0xFF; 00037 *(outbuffer + offset + 3) = (this->type >> (8 * 3)) & 0xFF; 00038 offset += sizeof(this->type); 00039 offset += this->points.serialize(outbuffer + offset); 00040 return offset; 00041 } 00042 00043 virtual int deserialize(unsigned char *inbuffer) 00044 { 00045 int offset = 0; 00046 offset += this->header.deserialize(inbuffer + offset); 00047 this->type = ((uint32_t) (*(inbuffer + offset))); 00048 this->type |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00049 this->type |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00050 this->type |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00051 offset += sizeof(this->type); 00052 offset += this->points.deserialize(inbuffer + offset); 00053 return offset; 00054 } 00055 00056 const char * getType(){ return "map_msgs/PointCloud2Update"; }; 00057 const char * getMD5(){ return "6c58e4f249ae9cd2b24fb1ee0f99195e"; }; 00058 00059 }; 00060 00061 } 00062 #endif
Generated on Tue Jul 12 2022 18:39:40 by 1.7.2