Go to the documentation of this file.00001 #ifndef _ROS_moveit_msgs_ObjectColor_h
00002 #define _ROS_moveit_msgs_ObjectColor_h
00003
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 #include "std_msgs/ColorRGBA.h"
00009
00010 namespace moveit_msgs
00011 {
00012
00013 class ObjectColor : public ros::Msg
00014 {
00015 public:
00016 const char* id;
00017 std_msgs::ColorRGBA color;
00018
00019 virtual int serialize(unsigned char *outbuffer) const
00020 {
00021 int offset = 0;
00022 uint32_t length_id = strlen(this->id);
00023 memcpy(outbuffer + offset, &length_id, sizeof(uint32_t));
00024 offset += 4;
00025 memcpy(outbuffer + offset, this->id, length_id);
00026 offset += length_id;
00027 offset += this->color.serialize(outbuffer + offset);
00028 return offset;
00029 }
00030
00031 virtual int deserialize(unsigned char *inbuffer)
00032 {
00033 int offset = 0;
00034 uint32_t length_id;
00035 memcpy(&length_id, (inbuffer + offset), sizeof(uint32_t));
00036 offset += 4;
00037 for(unsigned int k= offset; k< offset+length_id; ++k){
00038 inbuffer[k-1]=inbuffer[k];
00039 }
00040 inbuffer[offset+length_id-1]=0;
00041 this->id = (char *)(inbuffer + offset-1);
00042 offset += length_id;
00043 offset += this->color.deserialize(inbuffer + offset);
00044 return offset;
00045 }
00046
00047 const char * getType(){ return "moveit_msgs/ObjectColor"; };
00048 const char * getMD5(){ return "ec3bd6f103430e64b2ae706a67d8488e"; };
00049
00050 };
00051
00052 }
00053 #endif