Working towards recieving twists

Dependencies:   BufferedSerial

Fork of ros_lib_kinetic by Gary Servin

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers FrameGraph.h Source File

FrameGraph.h

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 tf2_msgs
00009 {
00010 
00011 static const char FRAMEGRAPH[] = "tf2_msgs/FrameGraph";
00012 
00013   class FrameGraphRequest : public ros::Msg
00014   {
00015     public:
00016 
00017     FrameGraphRequest()
00018     {
00019     }
00020 
00021     virtual int serialize(unsigned char *outbuffer) const
00022     {
00023       int offset = 0;
00024       return offset;
00025     }
00026 
00027     virtual int deserialize(unsigned char *inbuffer)
00028     {
00029       int offset = 0;
00030      return offset;
00031     }
00032 
00033     const char * getType(){ return FRAMEGRAPH; };
00034     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00035 
00036   };
00037 
00038   class FrameGraphResponse : public ros::Msg
00039   {
00040     public:
00041       typedef const char* _frame_yaml_type;
00042       _frame_yaml_type frame_yaml;
00043 
00044     FrameGraphResponse():
00045       frame_yaml("")
00046     {
00047     }
00048 
00049     virtual int serialize(unsigned char *outbuffer) const
00050     {
00051       int offset = 0;
00052       uint32_t length_frame_yaml = strlen(this->frame_yaml);
00053       varToArr(outbuffer + offset, length_frame_yaml);
00054       offset += 4;
00055       memcpy(outbuffer + offset, this->frame_yaml, length_frame_yaml);
00056       offset += length_frame_yaml;
00057       return offset;
00058     }
00059 
00060     virtual int deserialize(unsigned char *inbuffer)
00061     {
00062       int offset = 0;
00063       uint32_t length_frame_yaml;
00064       arrToVar(length_frame_yaml, (inbuffer + offset));
00065       offset += 4;
00066       for(unsigned int k= offset; k< offset+length_frame_yaml; ++k){
00067           inbuffer[k-1]=inbuffer[k];
00068       }
00069       inbuffer[offset+length_frame_yaml-1]=0;
00070       this->frame_yaml = (char *)(inbuffer + offset-1);
00071       offset += length_frame_yaml;
00072      return offset;
00073     }
00074 
00075     const char * getType(){ return FRAMEGRAPH; };
00076     const char * getMD5(){ return "437ea58e9463815a0d511c7326b686b0"; };
00077 
00078   };
00079 
00080   class FrameGraph {
00081     public:
00082     typedef FrameGraphRequest Request;
00083     typedef FrameGraphResponse Response;
00084   };
00085 
00086 }
00087 #endif