kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Bool.h
Go to the documentation of this file.
1 #ifndef _ROS_std_msgs_Bool_h
2 #define _ROS_std_msgs_Bool_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace std_msgs
10 {
11 
12  class Bool : public ros::Msg
13  {
14  public:
15  bool data;
16 
17  Bool():
18  data(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_data;
29  u_data.real = this->data;
30  *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF;
31  offset += sizeof(this->data);
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_data;
42  u_data.base = 0;
43  u_data.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
44  this->data = u_data.real;
45  offset += sizeof(this->data);
46  return offset;
47  }
48 
49  const char * getType(){ return "std_msgs/Bool"; };
50  const char * getMD5(){ return "8b94c1b53db61fb6aed406028ad6332a"; };
51 
52  };
53 
54 }
55 #endif
const char * getType()
Definition: Bool.h:49
virtual int deserialize(unsigned char *inbuffer)
Definition: Bool.h:35
bool data
Definition: Bool.h:15
Definition: Bool.h:12
const char * getMD5()
Definition: Bool.h:50
virtual int serialize(unsigned char *outbuffer) const
Definition: Bool.h:22
Bool()
Definition: Bool.h:17
Definition: msg.h:43