1 #ifndef _ROS_SERVICE_MuxSelect_h
2 #define _ROS_SERVICE_MuxSelect_h
11 static const char MUXSELECT[] =
"topic_tools/MuxSelect";
23 virtual int serialize(
unsigned char *outbuffer)
const
26 uint32_t length_topic = strlen(this->
topic);
27 memcpy(outbuffer + offset, &length_topic,
sizeof(uint32_t));
29 memcpy(outbuffer + offset, this->
topic, length_topic);
30 offset += length_topic;
37 uint32_t length_topic;
38 memcpy(&length_topic, (inbuffer + offset),
sizeof(uint32_t));
40 for(
unsigned int k= offset; k< offset+length_topic; ++k){
41 inbuffer[k-1]=inbuffer[k];
43 inbuffer[offset+length_topic-1]=0;
44 this->
topic = (
char *)(inbuffer + offset-1);
45 offset += length_topic;
50 const char *
getMD5(){
return "d8f94bae31b356b24d0427f80426d0c3"; };
64 virtual int serialize(
unsigned char *outbuffer)
const
67 uint32_t length_prev_topic = strlen(this->
prev_topic);
68 memcpy(outbuffer + offset, &length_prev_topic,
sizeof(uint32_t));
70 memcpy(outbuffer + offset, this->
prev_topic, length_prev_topic);
71 offset += length_prev_topic;
78 uint32_t length_prev_topic;
79 memcpy(&length_prev_topic, (inbuffer + offset),
sizeof(uint32_t));
81 for(
unsigned int k= offset; k< offset+length_prev_topic; ++k){
82 inbuffer[k-1]=inbuffer[k];
84 inbuffer[offset+length_prev_topic-1]=0;
85 this->
prev_topic = (
char *)(inbuffer + offset-1);
86 offset += length_prev_topic;
91 const char *
getMD5(){
return "3db0a473debdbafea387c9e49358c320"; };