RequestMessageInfo.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_RequestMessageInfo_h
00002 #define _ROS_SERVICE_RequestMessageInfo_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace rosserial_msgs
00009 {
00010 
00011 static const char REQUESTMESSAGEINFO[] = "rosserial_msgs/RequestMessageInfo";
00012 
00013   class RequestMessageInfoRequest : public ros::Msg
00014   {
00015     public:
00016       const char* type;
00017 
00018     virtual int serialize(unsigned char *outbuffer) const
00019     {
00020       int offset = 0;
00021       uint32_t length_type = strlen(this->type);
00022       memcpy(outbuffer + offset, &length_type, sizeof(uint32_t));
00023       offset += 4;
00024       memcpy(outbuffer + offset, this->type, length_type);
00025       offset += length_type;
00026       return offset;
00027     }
00028 
00029     virtual int deserialize(unsigned char *inbuffer)
00030     {
00031       int offset = 0;
00032       uint32_t length_type;
00033       memcpy(&length_type, (inbuffer + offset), sizeof(uint32_t));
00034       offset += 4;
00035       for(unsigned int k= offset; k< offset+length_type; ++k){
00036           inbuffer[k-1]=inbuffer[k];
00037       }
00038       inbuffer[offset+length_type-1]=0;
00039       this->type = (char *)(inbuffer + offset-1);
00040       offset += length_type;
00041      return offset;
00042     }
00043 
00044     const char * getType(){ return REQUESTMESSAGEINFO; };
00045     const char * getMD5(){ return "dc67331de85cf97091b7d45e5c64ab75"; };
00046 
00047   };
00048 
00049   class RequestMessageInfoResponse : public ros::Msg
00050   {
00051     public:
00052       const char* md5;
00053       const char* definition;
00054 
00055     virtual int serialize(unsigned char *outbuffer) const
00056     {
00057       int offset = 0;
00058       uint32_t length_md5 = strlen(this->md5);
00059       memcpy(outbuffer + offset, &length_md5, sizeof(uint32_t));
00060       offset += 4;
00061       memcpy(outbuffer + offset, this->md5, length_md5);
00062       offset += length_md5;
00063       uint32_t length_definition = strlen(this->definition);
00064       memcpy(outbuffer + offset, &length_definition, sizeof(uint32_t));
00065       offset += 4;
00066       memcpy(outbuffer + offset, this->definition, length_definition);
00067       offset += length_definition;
00068       return offset;
00069     }
00070 
00071     virtual int deserialize(unsigned char *inbuffer)
00072     {
00073       int offset = 0;
00074       uint32_t length_md5;
00075       memcpy(&length_md5, (inbuffer + offset), sizeof(uint32_t));
00076       offset += 4;
00077       for(unsigned int k= offset; k< offset+length_md5; ++k){
00078           inbuffer[k-1]=inbuffer[k];
00079       }
00080       inbuffer[offset+length_md5-1]=0;
00081       this->md5 = (char *)(inbuffer + offset-1);
00082       offset += length_md5;
00083       uint32_t length_definition;
00084       memcpy(&length_definition, (inbuffer + offset), sizeof(uint32_t));
00085       offset += 4;
00086       for(unsigned int k= offset; k< offset+length_definition; ++k){
00087           inbuffer[k-1]=inbuffer[k];
00088       }
00089       inbuffer[offset+length_definition-1]=0;
00090       this->definition = (char *)(inbuffer + offset-1);
00091       offset += length_definition;
00092      return offset;
00093     }
00094 
00095     const char * getType(){ return REQUESTMESSAGEINFO; };
00096     const char * getMD5(){ return "fe452186a069bed40f09b8628fe5eac8"; };
00097 
00098   };
00099 
00100   class RequestMessageInfo {
00101     public:
00102     typedef RequestMessageInfoRequest Request;
00103     typedef RequestMessageInfoResponse Response;
00104   };
00105 
00106 }
00107 #endif


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