LoadMap.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_LoadMap_h
00002 #define _ROS_SERVICE_LoadMap_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace moveit_msgs
00009 {
00010 
00011 static const char LOADMAP[] = "moveit_msgs/LoadMap";
00012 
00013   class LoadMapRequest : public ros::Msg
00014   {
00015     public:
00016       const char* filename;
00017 
00018     virtual int serialize(unsigned char *outbuffer) const
00019     {
00020       int offset = 0;
00021       uint32_t length_filename = strlen(this->filename);
00022       memcpy(outbuffer + offset, &length_filename, sizeof(uint32_t));
00023       offset += 4;
00024       memcpy(outbuffer + offset, this->filename, length_filename);
00025       offset += length_filename;
00026       return offset;
00027     }
00028 
00029     virtual int deserialize(unsigned char *inbuffer)
00030     {
00031       int offset = 0;
00032       uint32_t length_filename;
00033       memcpy(&length_filename, (inbuffer + offset), sizeof(uint32_t));
00034       offset += 4;
00035       for(unsigned int k= offset; k< offset+length_filename; ++k){
00036           inbuffer[k-1]=inbuffer[k];
00037       }
00038       inbuffer[offset+length_filename-1]=0;
00039       this->filename = (char *)(inbuffer + offset-1);
00040       offset += length_filename;
00041      return offset;
00042     }
00043 
00044     const char * getType(){ return LOADMAP; };
00045     const char * getMD5(){ return "030824f52a0628ead956fb9d67e66ae9"; };
00046 
00047   };
00048 
00049   class LoadMapResponse : public ros::Msg
00050   {
00051     public:
00052       bool success;
00053 
00054     virtual int serialize(unsigned char *outbuffer) const
00055     {
00056       int offset = 0;
00057       union {
00058         bool real;
00059         uint8_t base;
00060       } u_success;
00061       u_success.real = this->success;
00062       *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
00063       offset += sizeof(this->success);
00064       return offset;
00065     }
00066 
00067     virtual int deserialize(unsigned char *inbuffer)
00068     {
00069       int offset = 0;
00070       union {
00071         bool real;
00072         uint8_t base;
00073       } u_success;
00074       u_success.base = 0;
00075       u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00076       this->success = u_success.real;
00077       offset += sizeof(this->success);
00078      return offset;
00079     }
00080 
00081     const char * getType(){ return LOADMAP; };
00082     const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; };
00083 
00084   };
00085 
00086   class LoadMap {
00087     public:
00088     typedef LoadMapRequest Request;
00089     typedef LoadMapResponse Response;
00090   };
00091 
00092 }
00093 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:55