Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of rosserial_mbed_lib by
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 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 virtual const char * getType(){ return FRAMEGRAPH; }; 00030 virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; 00031 00032 }; 00033 00034 class FrameGraphResponse : public ros::Msg 00035 { 00036 public: 00037 char * dot_graph; 00038 00039 virtual int serialize(unsigned char *outbuffer) const 00040 { 00041 int offset = 0; 00042 uint32_t * length_dot_graph = (uint32_t *)(outbuffer + offset); 00043 *length_dot_graph = strlen( (const char*) this->dot_graph); 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 = *(uint32_t *)(inbuffer + offset); 00054 offset += 4; 00055 for(unsigned int k= offset; k< offset+length_dot_graph; ++k){ 00056 inbuffer[k-1]=inbuffer[k]; 00057 } 00058 inbuffer[offset+length_dot_graph-1]=0; 00059 this->dot_graph = (char *)(inbuffer + offset-1); 00060 offset += length_dot_graph; 00061 return offset; 00062 } 00063 00064 virtual const char * getType(){ return FRAMEGRAPH; }; 00065 virtual const char * getMD5(){ return "c4af9ac907e58e906eb0b6e3c58478c0"; }; 00066 00067 }; 00068 00069 class FrameGraph { 00070 public: 00071 typedef FrameGraphRequest Request; 00072 typedef FrameGraphResponse Response; 00073 }; 00074 00075 } 00076 #endif
Generated on Tue Jul 12 2022 19:53:57 by
1.7.2
