Just changed OUTPUT_SIZE and INPUT_SIZE in ros/node_handle.h
Dependents: WRS2020_mecanum_node
InteractiveMarkerFeedback.h
00001 #ifndef _ROS_visualization_msgs_InteractiveMarkerFeedback_h 00002 #define _ROS_visualization_msgs_InteractiveMarkerFeedback_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "std_msgs/Header.h" 00009 #include "geometry_msgs/Pose.h" 00010 #include "geometry_msgs/Point.h" 00011 00012 namespace visualization_msgs 00013 { 00014 00015 class InteractiveMarkerFeedback : public ros::Msg 00016 { 00017 public: 00018 typedef std_msgs::Header _header_type; 00019 _header_type header; 00020 typedef const char* _client_id_type; 00021 _client_id_type client_id; 00022 typedef const char* _marker_name_type; 00023 _marker_name_type marker_name; 00024 typedef const char* _control_name_type; 00025 _control_name_type control_name; 00026 typedef uint8_t _event_type_type; 00027 _event_type_type event_type; 00028 typedef geometry_msgs::Pose _pose_type; 00029 _pose_type pose; 00030 typedef uint32_t _menu_entry_id_type; 00031 _menu_entry_id_type menu_entry_id; 00032 typedef geometry_msgs::Point _mouse_point_type; 00033 _mouse_point_type mouse_point; 00034 typedef bool _mouse_point_valid_type; 00035 _mouse_point_valid_type mouse_point_valid; 00036 enum { KEEP_ALIVE = 0 }; 00037 enum { POSE_UPDATE = 1 }; 00038 enum { MENU_SELECT = 2 }; 00039 enum { BUTTON_CLICK = 3 }; 00040 enum { MOUSE_DOWN = 4 }; 00041 enum { MOUSE_UP = 5 }; 00042 00043 InteractiveMarkerFeedback(): 00044 header(), 00045 client_id(""), 00046 marker_name(""), 00047 control_name(""), 00048 event_type(0), 00049 pose(), 00050 menu_entry_id(0), 00051 mouse_point(), 00052 mouse_point_valid(0) 00053 { 00054 } 00055 00056 virtual int serialize(unsigned char *outbuffer) const 00057 { 00058 int offset = 0; 00059 offset += this->header.serialize(outbuffer + offset); 00060 uint32_t length_client_id = strlen(this->client_id); 00061 varToArr(outbuffer + offset, length_client_id); 00062 offset += 4; 00063 memcpy(outbuffer + offset, this->client_id, length_client_id); 00064 offset += length_client_id; 00065 uint32_t length_marker_name = strlen(this->marker_name); 00066 varToArr(outbuffer + offset, length_marker_name); 00067 offset += 4; 00068 memcpy(outbuffer + offset, this->marker_name, length_marker_name); 00069 offset += length_marker_name; 00070 uint32_t length_control_name = strlen(this->control_name); 00071 varToArr(outbuffer + offset, length_control_name); 00072 offset += 4; 00073 memcpy(outbuffer + offset, this->control_name, length_control_name); 00074 offset += length_control_name; 00075 *(outbuffer + offset + 0) = (this->event_type >> (8 * 0)) & 0xFF; 00076 offset += sizeof(this->event_type); 00077 offset += this->pose.serialize(outbuffer + offset); 00078 *(outbuffer + offset + 0) = (this->menu_entry_id >> (8 * 0)) & 0xFF; 00079 *(outbuffer + offset + 1) = (this->menu_entry_id >> (8 * 1)) & 0xFF; 00080 *(outbuffer + offset + 2) = (this->menu_entry_id >> (8 * 2)) & 0xFF; 00081 *(outbuffer + offset + 3) = (this->menu_entry_id >> (8 * 3)) & 0xFF; 00082 offset += sizeof(this->menu_entry_id); 00083 offset += this->mouse_point.serialize(outbuffer + offset); 00084 union { 00085 bool real; 00086 uint8_t base; 00087 } u_mouse_point_valid; 00088 u_mouse_point_valid.real = this->mouse_point_valid; 00089 *(outbuffer + offset + 0) = (u_mouse_point_valid.base >> (8 * 0)) & 0xFF; 00090 offset += sizeof(this->mouse_point_valid); 00091 return offset; 00092 } 00093 00094 virtual int deserialize(unsigned char *inbuffer) 00095 { 00096 int offset = 0; 00097 offset += this->header.deserialize(inbuffer + offset); 00098 uint32_t length_client_id; 00099 arrToVar(length_client_id, (inbuffer + offset)); 00100 offset += 4; 00101 for(unsigned int k= offset; k< offset+length_client_id; ++k){ 00102 inbuffer[k-1]=inbuffer[k]; 00103 } 00104 inbuffer[offset+length_client_id-1]=0; 00105 this->client_id = (char *)(inbuffer + offset-1); 00106 offset += length_client_id; 00107 uint32_t length_marker_name; 00108 arrToVar(length_marker_name, (inbuffer + offset)); 00109 offset += 4; 00110 for(unsigned int k= offset; k< offset+length_marker_name; ++k){ 00111 inbuffer[k-1]=inbuffer[k]; 00112 } 00113 inbuffer[offset+length_marker_name-1]=0; 00114 this->marker_name = (char *)(inbuffer + offset-1); 00115 offset += length_marker_name; 00116 uint32_t length_control_name; 00117 arrToVar(length_control_name, (inbuffer + offset)); 00118 offset += 4; 00119 for(unsigned int k= offset; k< offset+length_control_name; ++k){ 00120 inbuffer[k-1]=inbuffer[k]; 00121 } 00122 inbuffer[offset+length_control_name-1]=0; 00123 this->control_name = (char *)(inbuffer + offset-1); 00124 offset += length_control_name; 00125 this->event_type = ((uint8_t) (*(inbuffer + offset))); 00126 offset += sizeof(this->event_type); 00127 offset += this->pose.deserialize(inbuffer + offset); 00128 this->menu_entry_id = ((uint32_t) (*(inbuffer + offset))); 00129 this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00130 this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00131 this->menu_entry_id |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00132 offset += sizeof(this->menu_entry_id); 00133 offset += this->mouse_point.deserialize(inbuffer + offset); 00134 union { 00135 bool real; 00136 uint8_t base; 00137 } u_mouse_point_valid; 00138 u_mouse_point_valid.base = 0; 00139 u_mouse_point_valid.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00140 this->mouse_point_valid = u_mouse_point_valid.real; 00141 offset += sizeof(this->mouse_point_valid); 00142 return offset; 00143 } 00144 00145 const char * getType(){ return "visualization_msgs/InteractiveMarkerFeedback"; }; 00146 const char * getMD5(){ return "ab0f1eee058667e28c19ff3ffc3f4b78"; }; 00147 00148 }; 00149 00150 } 00151 #endif
Generated on Tue Jul 12 2022 18:49:19 by 1.7.2