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 tf2_msgs
9 {
10 
11 static const char FRAMEGRAPH[] = "tf2_msgs/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* frame_yaml;
42 
44  frame_yaml("")
45  {
46  }
47 
48  virtual int serialize(unsigned char *outbuffer) const
49  {
50  int offset = 0;
51  uint32_t length_frame_yaml = strlen(this->frame_yaml);
52  memcpy(outbuffer + offset, &length_frame_yaml, sizeof(uint32_t));
53  offset += 4;
54  memcpy(outbuffer + offset, this->frame_yaml, length_frame_yaml);
55  offset += length_frame_yaml;
56  return offset;
57  }
58 
59  virtual int deserialize(unsigned char *inbuffer)
60  {
61  int offset = 0;
62  uint32_t length_frame_yaml;
63  memcpy(&length_frame_yaml, (inbuffer + offset), sizeof(uint32_t));
64  offset += 4;
65  for(unsigned int k= offset; k< offset+length_frame_yaml; ++k){
66  inbuffer[k-1]=inbuffer[k];
67  }
68  inbuffer[offset+length_frame_yaml-1]=0;
69  this->frame_yaml = (char *)(inbuffer + offset-1);
70  offset += length_frame_yaml;
71  return offset;
72  }
73 
74  const char * getType(){ return FRAMEGRAPH; };
75  const char * getMD5(){ return "437ea58e9463815a0d511c7326b686b0"; };
76 
77  };
78 
79  class FrameGraph {
80  public:
83  };
84 
85 }
86 #endif
Definition: FrameGraph.h:38
virtual int serialize(unsigned char *outbuffer) const
Definition: FrameGraph.h:21
virtual int serialize(unsigned char *outbuffer) const
Definition: FrameGraph.h:48
virtual int deserialize(unsigned char *inbuffer)
Definition: FrameGraph.h:27
const char * getMD5()
Definition: FrameGraph.h:75
FrameGraphRequest()
Definition: FrameGraph.h:17
const char * getMD5()
Definition: FrameGraph.h:34
FrameGraphRequest Request
Definition: FrameGraph.h:81
FrameGraphResponse()
Definition: FrameGraph.h:43
static const char FRAMEGRAPH[]
Definition: FrameGraph.h:11
const char * getType()
Definition: FrameGraph.h:33
virtual int deserialize(unsigned char *inbuffer)
Definition: FrameGraph.h:59
const char * getType()
Definition: FrameGraph.h:74
Definition: FrameGraph.h:79
FrameGraphResponse Response
Definition: FrameGraph.h:82
Definition: msg.h:43
Definition: FrameGraph.h:13
const char * frame_yaml
Definition: FrameGraph.h:41