kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
DistanceDisplacement1D.h
Go to the documentation of this file.
1 #ifndef _ROS_kitt_sensor_msgs_DistanceDisplacement1D_h
2 #define _ROS_kitt_sensor_msgs_DistanceDisplacement1D_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 
10 namespace kitt_sensor_msgs
11 {
12 
14  {
15  public:
17  float displacement;
18  float min_value;
19  float max_value;
20 
22  header(),
23  displacement(0),
24  min_value(0),
25  max_value(0)
26  {
27  }
28 
29  virtual int serialize(unsigned char *outbuffer) const
30  {
31  int offset = 0;
32  offset += this->header.serialize(outbuffer + offset);
33  offset += serializeAvrFloat64(outbuffer + offset, this->displacement);
34  offset += serializeAvrFloat64(outbuffer + offset, this->min_value);
35  offset += serializeAvrFloat64(outbuffer + offset, this->max_value);
36  return offset;
37  }
38 
39  virtual int deserialize(unsigned char *inbuffer)
40  {
41  int offset = 0;
42  offset += this->header.deserialize(inbuffer + offset);
43  offset += deserializeAvrFloat64(inbuffer + offset, &(this->displacement));
44  offset += deserializeAvrFloat64(inbuffer + offset, &(this->min_value));
45  offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_value));
46  return offset;
47  }
48 
49  const char * getType(){ return "kitt_sensor_msgs/DistanceDisplacement1D"; };
50  const char * getMD5(){ return "afa70106431765ada2f22387570345d8"; };
51 
52  };
53 
54 }
55 #endif
virtual int deserialize(unsigned char *inbuffer)
Definition: Header.h:53
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
virtual int serialize(unsigned char *outbuffer) const
Definition: DistanceDisplacement1D.h:29
float displacement
Definition: DistanceDisplacement1D.h:17
Definition: DistanceDisplacement1D.h:13
virtual int serialize(unsigned char *outbuffer) const
Definition: Header.h:27
float max_value
Definition: DistanceDisplacement1D.h:19
const char * getType()
Definition: DistanceDisplacement1D.h:49
const char * getMD5()
Definition: DistanceDisplacement1D.h:50
Definition: Header.h:13
DistanceDisplacement1D()
Definition: DistanceDisplacement1D.h:21
float min_value
Definition: DistanceDisplacement1D.h:18
virtual int deserialize(unsigned char *inbuffer)
Definition: DistanceDisplacement1D.h:39
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
std_msgs::Header header
Definition: DistanceDisplacement1D.h:16