Color.h
Go to the documentation of this file.
00001 #ifndef _ROS_turtlesim_Color_h
00002 #define _ROS_turtlesim_Color_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 
00009 namespace turtlesim
00010 {
00011 
00012   class Color : public ros::Msg
00013   {
00014     public:
00015       uint8_t r;
00016       uint8_t g;
00017       uint8_t b;
00018 
00019     virtual int serialize(unsigned char *outbuffer) const
00020     {
00021       int offset = 0;
00022       *(outbuffer + offset + 0) = (this->r >> (8 * 0)) & 0xFF;
00023       offset += sizeof(this->r);
00024       *(outbuffer + offset + 0) = (this->g >> (8 * 0)) & 0xFF;
00025       offset += sizeof(this->g);
00026       *(outbuffer + offset + 0) = (this->b >> (8 * 0)) & 0xFF;
00027       offset += sizeof(this->b);
00028       return offset;
00029     }
00030 
00031     virtual int deserialize(unsigned char *inbuffer)
00032     {
00033       int offset = 0;
00034       this->r =  ((uint8_t) (*(inbuffer + offset)));
00035       offset += sizeof(this->r);
00036       this->g =  ((uint8_t) (*(inbuffer + offset)));
00037       offset += sizeof(this->g);
00038       this->b =  ((uint8_t) (*(inbuffer + offset)));
00039       offset += sizeof(this->b);
00040      return offset;
00041     }
00042 
00043     const char * getType(){ return "turtlesim/Color"; };
00044     const char * getMD5(){ return "353891e354491c51aabe32df673fb446"; };
00045 
00046   };
00047 
00048 }
00049 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Thu Aug 27 2015 14:39:49