root / scout_avr / src / ros_lib / std_msgs / UInt8.h @ 88fb3a79
History | View | Annotate | Download (809 Bytes)
1 |
#ifndef _ROS_std_msgs_UInt8_h
|
---|---|
2 |
#define _ROS_std_msgs_UInt8_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 UInt8 : public ros::Msg |
13 |
{ |
14 |
public:
|
15 |
uint8_t data; |
16 |
|
17 |
virtual int serialize(unsigned char *outbuffer) const |
18 |
{ |
19 |
int offset = 0; |
20 |
*(outbuffer + offset + 0) = (this->data >> (8 * 0)) & 0xFF; |
21 |
offset += sizeof(this->data);
|
22 |
return offset;
|
23 |
} |
24 |
|
25 |
virtual int deserialize(unsigned char *inbuffer) |
26 |
{ |
27 |
int offset = 0; |
28 |
this->data |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); |
29 |
offset += sizeof(this->data);
|
30 |
return offset;
|
31 |
} |
32 |
|
33 |
const char * getType(){ return "std_msgs/UInt8"; }; |
34 |
const char * getMD5(){ return "7c8164229e7d2c17eb95e9231617fdee"; }; |
35 |
|
36 |
}; |
37 |
|
38 |
} |
39 |
#endif
|