kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Vector3.h
Go to the documentation of this file.
1 #ifndef _ROS_geometry_msgs_Vector3_h
2 #define _ROS_geometry_msgs_Vector3_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace geometry_msgs
10 {
11 
12  class Vector3 : public ros::Msg
13  {
14  public:
15  float x;
16  float y;
17  float z;
18 
20  x(0),
21  y(0),
22  z(0)
23  {
24  }
25 
26  virtual int serialize(unsigned char *outbuffer) const
27  {
28  int offset = 0;
29  offset += serializeAvrFloat64(outbuffer + offset, this->x);
30  offset += serializeAvrFloat64(outbuffer + offset, this->y);
31  offset += serializeAvrFloat64(outbuffer + offset, this->z);
32  return offset;
33  }
34 
35  virtual int deserialize(unsigned char *inbuffer)
36  {
37  int offset = 0;
38  offset += deserializeAvrFloat64(inbuffer + offset, &(this->x));
39  offset += deserializeAvrFloat64(inbuffer + offset, &(this->y));
40  offset += deserializeAvrFloat64(inbuffer + offset, &(this->z));
41  return offset;
42  }
43 
44  const char * getType(){ return "geometry_msgs/Vector3"; };
45  const char * getMD5(){ return "4a842b65f413084dc2b10fb484ea7f17"; };
46 
47  };
48 
49 }
50 #endif
static int serializeAvrFloat64(unsigned char *outbuffer, const float f)
This tricky function handles promoting a 32bit float to a 64bit double, so that AVR can publish messa...
Definition: msg.h:62
Vector3()
Definition: Vector3.h:19
float x
Definition: Vector3.h:15
const char * getMD5()
Definition: Vector3.h:45
float y
Definition: Vector3.h:16
virtual int deserialize(unsigned char *inbuffer)
Definition: Vector3.h:35
Definition: Vector3.h:12
const char * getType()
Definition: Vector3.h:44
float z
Definition: Vector3.h:17
Definition: msg.h:43
static int deserializeAvrFloat64(const unsigned char *inbuffer, float *f)
This tricky function handles demoting a 64bit double to a 32bit float, so that AVR can understand mes...
Definition: msg.h:100
virtual int serialize(unsigned char *outbuffer) const
Definition: Vector3.h:26