1 #ifndef _ROS_visualization_msgs_MenuEntry_h
2 #define _ROS_visualization_msgs_MenuEntry_h
9 namespace visualization_msgs
33 virtual int serialize(
unsigned char *outbuffer)
const
36 *(outbuffer + offset + 0) = (this->
id >> (8 * 0)) & 0xFF;
37 *(outbuffer + offset + 1) = (this->
id >> (8 * 1)) & 0xFF;
38 *(outbuffer + offset + 2) = (this->
id >> (8 * 2)) & 0xFF;
39 *(outbuffer + offset + 3) = (this->
id >> (8 * 3)) & 0xFF;
40 offset +=
sizeof(this->
id);
41 *(outbuffer + offset + 0) = (this->
parent_id >> (8 * 0)) & 0xFF;
42 *(outbuffer + offset + 1) = (this->
parent_id >> (8 * 1)) & 0xFF;
43 *(outbuffer + offset + 2) = (this->
parent_id >> (8 * 2)) & 0xFF;
44 *(outbuffer + offset + 3) = (this->
parent_id >> (8 * 3)) & 0xFF;
46 uint32_t length_title = strlen(this->
title);
47 memcpy(outbuffer + offset, &length_title,
sizeof(uint32_t));
49 memcpy(outbuffer + offset, this->
title, length_title);
50 offset += length_title;
51 uint32_t length_command = strlen(this->
command);
52 memcpy(outbuffer + offset, &length_command,
sizeof(uint32_t));
54 memcpy(outbuffer + offset, this->
command, length_command);
55 offset += length_command;
56 *(outbuffer + offset + 0) = (this->
command_type >> (8 * 0)) & 0xFF;
64 this->
id = ((uint32_t) (*(inbuffer + offset)));
65 this->
id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
66 this->
id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
67 this->
id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
68 offset +=
sizeof(this->
id);
69 this->
parent_id = ((uint32_t) (*(inbuffer + offset)));
70 this->
parent_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
71 this->
parent_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
72 this->
parent_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
74 uint32_t length_title;
75 memcpy(&length_title, (inbuffer + offset),
sizeof(uint32_t));
77 for(
unsigned int k= offset; k< offset+length_title; ++k){
78 inbuffer[k-1]=inbuffer[k];
80 inbuffer[offset+length_title-1]=0;
81 this->
title = (
char *)(inbuffer + offset-1);
82 offset += length_title;
83 uint32_t length_command;
84 memcpy(&length_command, (inbuffer + offset),
sizeof(uint32_t));
86 for(
unsigned int k= offset; k< offset+length_command; ++k){
87 inbuffer[k-1]=inbuffer[k];
89 inbuffer[offset+length_command-1]=0;
90 this->
command = (
char *)(inbuffer + offset-1);
91 offset += length_command;
97 const char *
getType(){
return "visualization_msgs/MenuEntry"; };
98 const char *
getMD5(){
return "b90ec63024573de83b57aa93eb39be2d"; };