FrameGraph.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_FrameGraph_h
00002 #define _ROS_SERVICE_FrameGraph_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace tf
00009 {
00010 
00011 static const char FRAMEGRAPH[] = "tf/FrameGraph";
00012 
00013   class FrameGraphRequest : public ros::Msg
00014   {
00015     public:
00016 
00017     virtual int serialize(unsigned char *outbuffer) const
00018     {
00019       int offset = 0;
00020       return offset;
00021     }
00022 
00023     virtual int deserialize(unsigned char *inbuffer)
00024     {
00025       int offset = 0;
00026      return offset;
00027     }
00028 
00029     const char * getType(){ return FRAMEGRAPH; };
00030     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00031 
00032   };
00033 
00034   class FrameGraphResponse : public ros::Msg
00035   {
00036     public:
00037       const char* dot_graph;
00038 
00039     virtual int serialize(unsigned char *outbuffer) const
00040     {
00041       int offset = 0;
00042       uint32_t length_dot_graph = strlen(this->dot_graph);
00043       memcpy(outbuffer + offset, &length_dot_graph, sizeof(uint32_t));
00044       offset += 4;
00045       memcpy(outbuffer + offset, this->dot_graph, length_dot_graph);
00046       offset += length_dot_graph;
00047       return offset;
00048     }
00049 
00050     virtual int deserialize(unsigned char *inbuffer)
00051     {
00052       int offset = 0;
00053       uint32_t length_dot_graph;
00054       memcpy(&length_dot_graph, (inbuffer + offset), sizeof(uint32_t));
00055       offset += 4;
00056       for(unsigned int k= offset; k< offset+length_dot_graph; ++k){
00057           inbuffer[k-1]=inbuffer[k];
00058       }
00059       inbuffer[offset+length_dot_graph-1]=0;
00060       this->dot_graph = (char *)(inbuffer + offset-1);
00061       offset += length_dot_graph;
00062      return offset;
00063     }
00064 
00065     const char * getType(){ return FRAMEGRAPH; };
00066     const char * getMD5(){ return "c4af9ac907e58e906eb0b6e3c58478c0"; };
00067 
00068   };
00069 
00070   class FrameGraph {
00071     public:
00072     typedef FrameGraphRequest Request;
00073     typedef FrameGraphResponse Response;
00074   };
00075 
00076 }
00077 #endif


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