kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
PoseArray.h
Go to the documentation of this file.
1 #ifndef _ROS_geometry_msgs_PoseArray_h
2 #define _ROS_geometry_msgs_PoseArray_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 geometry_msgs
12 {
13 
14  class PoseArray : public ros::Msg
15  {
16  public:
18  uint8_t poses_length;
21 
23  header(),
24  poses_length(0), poses(NULL)
25  {
26  }
27 
28  virtual int serialize(unsigned char *outbuffer) const
29  {
30  int offset = 0;
31  offset += this->header.serialize(outbuffer + offset);
32  *(outbuffer + offset++) = poses_length;
33  *(outbuffer + offset++) = 0;
34  *(outbuffer + offset++) = 0;
35  *(outbuffer + offset++) = 0;
36  for( uint8_t i = 0; i < poses_length; i++){
37  offset += this->poses[i].serialize(outbuffer + offset);
38  }
39  return offset;
40  }
41 
42  virtual int deserialize(unsigned char *inbuffer)
43  {
44  int offset = 0;
45  offset += this->header.deserialize(inbuffer + offset);
46  uint8_t poses_lengthT = *(inbuffer + offset++);
47  if(poses_lengthT > poses_length)
48  this->poses = (geometry_msgs::Pose*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::Pose));
49  offset += 3;
50  poses_length = poses_lengthT;
51  for( uint8_t i = 0; i < poses_length; i++){
52  offset += this->st_poses.deserialize(inbuffer + offset);
53  memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::Pose));
54  }
55  return offset;
56  }
57 
58  const char * getType(){ return "geometry_msgs/PoseArray"; };
59  const char * getMD5(){ return "916c28c5764443f268b296bb671b9d97"; };
60 
61  };
62 
63 }
64 #endif
const char * getMD5()
Definition: PoseArray.h:59
virtual int deserialize(unsigned char *inbuffer)
Definition: Header.h:53
std_msgs::Header header
Definition: PoseArray.h:17
PoseArray()
Definition: PoseArray.h:22
virtual int serialize(unsigned char *outbuffer) const
Definition: Header.h:27
uint8_t poses_length
Definition: PoseArray.h:18
virtual int serialize(unsigned char *outbuffer) const
Definition: PoseArray.h:28
virtual int serialize(unsigned char *outbuffer) const
Definition: Pose.h:26
virtual int deserialize(unsigned char *inbuffer)
Definition: Pose.h:34
Definition: Header.h:13
virtual int deserialize(unsigned char *inbuffer)
Definition: PoseArray.h:42
Definition: Pose.h:14
geometry_msgs::Pose * poses
Definition: PoseArray.h:20
geometry_msgs::Pose st_poses
Definition: PoseArray.h:19
const char * getType()
Definition: PoseArray.h:58
Definition: msg.h:43
Definition: PoseArray.h:14