kitt_platform
All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
InteractiveMarkerPose.h
Go to the documentation of this file.
1 #ifndef _ROS_visualization_msgs_InteractiveMarkerPose_h
2 #define _ROS_visualization_msgs_InteractiveMarkerPose_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 #include "std_msgs/Header.h"
9 #include "geometry_msgs/Pose.h"
10 
11 namespace visualization_msgs
12 {
13 
15  {
16  public:
19  const char* name;
20 
22  header(),
23  pose(),
24  name("")
25  {
26  }
27 
28  virtual int serialize(unsigned char *outbuffer) const
29  {
30  int offset = 0;
31  offset += this->header.serialize(outbuffer + offset);
32  offset += this->pose.serialize(outbuffer + offset);
33  uint32_t length_name = strlen(this->name);
34  memcpy(outbuffer + offset, &length_name, sizeof(uint32_t));
35  offset += 4;
36  memcpy(outbuffer + offset, this->name, length_name);
37  offset += length_name;
38  return offset;
39  }
40 
41  virtual int deserialize(unsigned char *inbuffer)
42  {
43  int offset = 0;
44  offset += this->header.deserialize(inbuffer + offset);
45  offset += this->pose.deserialize(inbuffer + offset);
46  uint32_t length_name;
47  memcpy(&length_name, (inbuffer + offset), sizeof(uint32_t));
48  offset += 4;
49  for(unsigned int k= offset; k< offset+length_name; ++k){
50  inbuffer[k-1]=inbuffer[k];
51  }
52  inbuffer[offset+length_name-1]=0;
53  this->name = (char *)(inbuffer + offset-1);
54  offset += length_name;
55  return offset;
56  }
57 
58  const char * getType(){ return "visualization_msgs/InteractiveMarkerPose"; };
59  const char * getMD5(){ return "a6e6833209a196a38d798dadb02c81f8"; };
60 
61  };
62 
63 }
64 #endif
virtual int deserialize(unsigned char *inbuffer)
Definition: Header.h:53
const char * name
Definition: InteractiveMarkerPose.h:19
virtual int serialize(unsigned char *outbuffer) const
Definition: Header.h:27
InteractiveMarkerPose()
Definition: InteractiveMarkerPose.h:21
virtual int serialize(unsigned char *outbuffer) const
Definition: Pose.h:26
virtual int deserialize(unsigned char *inbuffer)
Definition: Pose.h:34
virtual int deserialize(unsigned char *inbuffer)
Definition: InteractiveMarkerPose.h:41
geometry_msgs::Pose pose
Definition: InteractiveMarkerPose.h:18
Definition: Header.h:13
Definition: InteractiveMarkerPose.h:14
const char * getType()
Definition: InteractiveMarkerPose.h:58
Definition: Pose.h:14
std_msgs::Header header
Definition: InteractiveMarkerPose.h:17
const char * getMD5()
Definition: InteractiveMarkerPose.h:59
virtual int serialize(unsigned char *outbuffer) const
Definition: InteractiveMarkerPose.h:28
Definition: msg.h:43