kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
FrameGraph.h
Go to the documentation of this file.
1 #ifndef _ROS_SERVICE_FrameGraph_h
2 #define _ROS_SERVICE_FrameGraph_h
3 #include <stdint.h>
4 #include <string.h>
5 #include <stdlib.h>
6 #include "ros/msg.h"
7 
8 namespace tf
9 {
10 
11 static const char FRAMEGRAPH[] = "tf/FrameGraph";
12 
13  class FrameGraphRequest : public ros::Msg
14  {
15  public:
16 
18  {
19  }
20 
21  virtual int serialize(unsigned char *outbuffer) const
22  {
23  int offset = 0;
24  return offset;
25  }
26 
27  virtual int deserialize(unsigned char *inbuffer)
28  {
29  int offset = 0;
30  return offset;
31  }
32 
33  const char * getType(){ return FRAMEGRAPH; };
34  const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
35 
36  };
37 
39  {
40  public:
41  const char* dot_graph;
42 
44  dot_graph("")
45  {
46  }
47 
48  virtual int serialize(unsigned char *outbuffer) const
49  {
50  int offset = 0;
51  uint32_t length_dot_graph = strlen(this->dot_graph);
52  memcpy(outbuffer + offset, &length_dot_graph, sizeof(uint32_t));
53  offset += 4;
54  memcpy(outbuffer + offset, this->dot_graph, length_dot_graph);
55  offset += length_dot_graph;
56  return offset;
57  }
58 
59  virtual int deserialize(unsigned char *inbuffer)
60  {
61  int offset = 0;
62  uint32_t length_dot_graph;
63  memcpy(&length_dot_graph, (inbuffer + offset), sizeof(uint32_t));
64  offset += 4;
65  for(unsigned int k= offset; k< offset+length_dot_graph; ++k){
66  inbuffer[k-1]=inbuffer[k];
67  }
68  inbuffer[offset+length_dot_graph-1]=0;
69  this->dot_graph = (char *)(inbuffer + offset-1);
70  offset += length_dot_graph;
71  return offset;
72  }
73 
74  const char * getType(){ return FRAMEGRAPH; };
75  const char * getMD5(){ return "c4af9ac907e58e906eb0b6e3c58478c0"; };
76 
77  };
78 
79  class FrameGraph {
80  public:
83  };
84 
85 }
86 #endif
const char * dot_graph
Definition: FrameGraph.h:41
Definition: FrameGraph.h:13
const char * getType()
Definition: FrameGraph.h:74
virtual int serialize(unsigned char *outbuffer) const
Definition: FrameGraph.h:21
virtual int deserialize(unsigned char *inbuffer)
Definition: FrameGraph.h:59
Definition: FrameGraph.h:79
virtual int deserialize(unsigned char *inbuffer)
Definition: FrameGraph.h:27
const char * getMD5()
Definition: FrameGraph.h:75
FrameGraphResponse Response
Definition: FrameGraph.h:82
virtual int serialize(unsigned char *outbuffer) const
Definition: FrameGraph.h:48
FrameGraphRequest Request
Definition: FrameGraph.h:81
FrameGraphResponse()
Definition: FrameGraph.h:43
static const char FRAMEGRAPH[]
Definition: FrameGraph.h:11
FrameGraphRequest()
Definition: FrameGraph.h:17
const char * getType()
Definition: FrameGraph.h:33
const char * getMD5()
Definition: FrameGraph.h:34
Definition: FrameGraph.h:38
Definition: msg.h:43