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