kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
FobMode.h
Go to the documentation of this file.
1 #ifndef _ROS_kitt_sensor_msgs_FobMode_h
2 #define _ROS_kitt_sensor_msgs_FobMode_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace kitt_sensor_msgs
10 {
11 
12  class FobMode : public ros::Msg
13  {
14  public:
15  int8_t fob_mode;
16 
18  fob_mode(0)
19  {
20  }
21 
22  virtual int serialize(unsigned char *outbuffer) const
23  {
24  int offset = 0;
25  union {
26  int8_t real;
27  uint8_t base;
28  } u_fob_mode;
29  u_fob_mode.real = this->fob_mode;
30  *(outbuffer + offset + 0) = (u_fob_mode.base >> (8 * 0)) & 0xFF;
31  offset += sizeof(this->fob_mode);
32  return offset;
33  }
34 
35  virtual int deserialize(unsigned char *inbuffer)
36  {
37  int offset = 0;
38  union {
39  int8_t real;
40  uint8_t base;
41  } u_fob_mode;
42  u_fob_mode.base = 0;
43  u_fob_mode.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
44  this->fob_mode = u_fob_mode.real;
45  offset += sizeof(this->fob_mode);
46  return offset;
47  }
48 
49  const char * getType(){ return "kitt_sensor_msgs/FobMode"; };
50  const char * getMD5(){ return "d6bac72d25e76a9b0ccb289e3cea3dcb"; };
51 
52  };
53 
54 }
55 #endif
FobMode()
Definition: FobMode.h:17
virtual int deserialize(unsigned char *inbuffer)
Definition: FobMode.h:35
int8_t fob_mode
Definition: FobMode.h:15
virtual int serialize(unsigned char *outbuffer) const
Definition: FobMode.h:22
const char * getMD5()
Definition: FobMode.h:50
Definition: FobMode.h:12
Definition: msg.h:43
const char * getType()
Definition: FobMode.h:49