18 #ifndef _ROS_SERVICE_InitPins_h 19 #define _ROS_SERVICE_InitPins_h 28 static const char INITPINS[] =
"cob_hand_bridge/InitPins";
41 input_pins_length(0), input_pins(NULL),
42 output_pins_length(0), output_pins(NULL)
46 virtual int serialize(
unsigned char *outbuffer)
const 49 *(outbuffer + offset++) = input_pins_length;
50 *(outbuffer + offset++) = 0;
51 *(outbuffer + offset++) = 0;
52 *(outbuffer + offset++) = 0;
54 *(outbuffer + offset + 0) = (this->input_pins[i] >> (8 * 0)) & 0xFF;
55 offset +=
sizeof(this->input_pins[i]);
57 *(outbuffer + offset++) = output_pins_length;
58 *(outbuffer + offset++) = 0;
59 *(outbuffer + offset++) = 0;
60 *(outbuffer + offset++) = 0;
62 *(outbuffer + offset + 0) = (this->output_pins[i] >> (8 * 0)) & 0xFF;
63 offset +=
sizeof(this->output_pins[i]);
71 uint8_t input_pins_lengthT = *(inbuffer + offset++);
72 if(input_pins_lengthT > input_pins_length)
73 this->input_pins = (uint8_t*)realloc(this->input_pins, input_pins_lengthT *
sizeof(uint8_t));
75 input_pins_length = input_pins_lengthT;
77 this->st_input_pins = ((uint8_t) (*(inbuffer + offset)));
79 memcpy( &(this->input_pins[i]), &(this->st_input_pins),
sizeof(uint8_t));
81 uint8_t output_pins_lengthT = *(inbuffer + offset++);
82 if(output_pins_lengthT > output_pins_length)
83 this->output_pins = (uint8_t*)realloc(this->output_pins, output_pins_lengthT *
sizeof(uint8_t));
85 output_pins_length = output_pins_lengthT;
87 this->st_output_pins = ((uint8_t) (*(inbuffer + offset)));
89 memcpy( &(this->output_pins[i]), &(this->st_output_pins),
sizeof(uint8_t));
95 const char *
getMD5(){
return "842fe571cf71231e47b423e75069e2bd"; };
116 u_success.real = this->success;
117 *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
118 offset +=
sizeof(this->success);
130 u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
131 this->success = u_success.real;
132 offset +=
sizeof(this->success);
137 const char *
getMD5(){
return "358e233cde0c8a8bcfea4ce193f8fc15"; };
virtual int deserialize(unsigned char *inbuffer)
InitPinsResponse Response
virtual int deserialize(unsigned char *inbuffer)
virtual int serialize(unsigned char *outbuffer) const
static const char INITPINS[]
virtual int serialize(unsigned char *outbuffer) const
uint8_t output_pins_length
uint8_t input_pins_length