kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
EStop.h
Go to the documentation of this file.
1 #ifndef _ROS_kitt_sensor_msgs_EStop_h
2 #define _ROS_kitt_sensor_msgs_EStop_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 EStop : public ros::Msg
13  {
14  public:
15  bool stopped;
16 
17  EStop():
18  stopped(0)
19  {
20  }
21 
22  virtual int serialize(unsigned char *outbuffer) const
23  {
24  int offset = 0;
25  union {
26  bool real;
27  uint8_t base;
28  } u_stopped;
29  u_stopped.real = this->stopped;
30  *(outbuffer + offset + 0) = (u_stopped.base >> (8 * 0)) & 0xFF;
31  offset += sizeof(this->stopped);
32  return offset;
33  }
34 
35  virtual int deserialize(unsigned char *inbuffer)
36  {
37  int offset = 0;
38  union {
39  bool real;
40  uint8_t base;
41  } u_stopped;
42  u_stopped.base = 0;
43  u_stopped.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
44  this->stopped = u_stopped.real;
45  offset += sizeof(this->stopped);
46  return offset;
47  }
48 
49  const char * getType(){ return "kitt_sensor_msgs/EStop"; };
50  const char * getMD5(){ return "caab21a24341159709db962b47b01ad1"; };
51 
52  };
53 
54 }
55 #endif
virtual int deserialize(unsigned char *inbuffer)
Definition: EStop.h:35
Definition: EStop.h:12
virtual int serialize(unsigned char *outbuffer) const
Definition: EStop.h:22
EStop()
Definition: EStop.h:17
bool stopped
Definition: EStop.h:15
const char * getType()
Definition: EStop.h:49
Definition: msg.h:43
const char * getMD5()
Definition: EStop.h:50