1 #ifndef _ROS_rosserial_arduino_Adc_h
2 #define _ROS_rosserial_arduino_Adc_h
9 namespace rosserial_arduino
32 virtual int serialize(
unsigned char *outbuffer)
const
35 *(outbuffer + offset + 0) = (this->
adc0 >> (8 * 0)) & 0xFF;
36 *(outbuffer + offset + 1) = (this->
adc0 >> (8 * 1)) & 0xFF;
37 offset +=
sizeof(this->
adc0);
38 *(outbuffer + offset + 0) = (this->
adc1 >> (8 * 0)) & 0xFF;
39 *(outbuffer + offset + 1) = (this->
adc1 >> (8 * 1)) & 0xFF;
40 offset +=
sizeof(this->
adc1);
41 *(outbuffer + offset + 0) = (this->
adc2 >> (8 * 0)) & 0xFF;
42 *(outbuffer + offset + 1) = (this->
adc2 >> (8 * 1)) & 0xFF;
43 offset +=
sizeof(this->
adc2);
44 *(outbuffer + offset + 0) = (this->
adc3 >> (8 * 0)) & 0xFF;
45 *(outbuffer + offset + 1) = (this->
adc3 >> (8 * 1)) & 0xFF;
46 offset +=
sizeof(this->
adc3);
47 *(outbuffer + offset + 0) = (this->
adc4 >> (8 * 0)) & 0xFF;
48 *(outbuffer + offset + 1) = (this->
adc4 >> (8 * 1)) & 0xFF;
49 offset +=
sizeof(this->
adc4);
50 *(outbuffer + offset + 0) = (this->
adc5 >> (8 * 0)) & 0xFF;
51 *(outbuffer + offset + 1) = (this->
adc5 >> (8 * 1)) & 0xFF;
52 offset +=
sizeof(this->
adc5);
59 this->
adc0 = ((uint16_t) (*(inbuffer + offset)));
60 this->
adc0 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
61 offset +=
sizeof(this->
adc0);
62 this->
adc1 = ((uint16_t) (*(inbuffer + offset)));
63 this->
adc1 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
64 offset +=
sizeof(this->
adc1);
65 this->
adc2 = ((uint16_t) (*(inbuffer + offset)));
66 this->
adc2 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
67 offset +=
sizeof(this->
adc2);
68 this->
adc3 = ((uint16_t) (*(inbuffer + offset)));
69 this->
adc3 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
70 offset +=
sizeof(this->
adc3);
71 this->
adc4 = ((uint16_t) (*(inbuffer + offset)));
72 this->
adc4 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
73 offset +=
sizeof(this->
adc4);
74 this->
adc5 = ((uint16_t) (*(inbuffer + offset)));
75 this->
adc5 |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
76 offset +=
sizeof(this->
adc5);
80 const char *
getType(){
return "rosserial_arduino/Adc"; };
81 const char *
getMD5(){
return "6d7853a614e2e821319068311f2af25b"; };
uint16_t adc0
Definition: Adc.h:15
const char * getType()
Definition: Adc.h:80
uint16_t adc1
Definition: Adc.h:16
const char * getMD5()
Definition: Adc.h:81
virtual int serialize(unsigned char *outbuffer) const
Definition: Adc.h:32
virtual int deserialize(unsigned char *inbuffer)
Definition: Adc.h:56
uint16_t adc5
Definition: Adc.h:20
Adc()
Definition: Adc.h:22
uint16_t adc4
Definition: Adc.h:19
uint16_t adc3
Definition: Adc.h:18
uint16_t adc2
Definition: Adc.h:17