kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
UInt16.h
Go to the documentation of this file.
1 #ifndef _ROS_std_msgs_UInt16_h
2 #define _ROS_std_msgs_UInt16_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 UInt16 : public ros::Msg
13  {
14  public:
15  uint16_t data;
16 
17  UInt16():
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  offset += sizeof(this->data);
28  return offset;
29  }
30 
31  virtual int deserialize(unsigned char *inbuffer)
32  {
33  int offset = 0;
34  this->data = ((uint16_t) (*(inbuffer + offset)));
35  this->data |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
36  offset += sizeof(this->data);
37  return offset;
38  }
39 
40  const char * getType(){ return "std_msgs/UInt16"; };
41  const char * getMD5(){ return "1df79edf208b629fe6b81923a544552d"; };
42 
43  };
44 
45 }
46 #endif
virtual int deserialize(unsigned char *inbuffer)
Definition: UInt16.h:31
Definition: UInt16.h:12
virtual int serialize(unsigned char *outbuffer) const
Definition: UInt16.h:22
const char * getType()
Definition: UInt16.h:40
UInt16()
Definition: UInt16.h:17
const char * getMD5()
Definition: UInt16.h:41
uint16_t data
Definition: UInt16.h:15
Definition: msg.h:43