Just changed OUTPUT_SIZE and INPUT_SIZE in ros/node_handle.h
Dependents: WRS2020_mecanum_node
DeleteLight.h
00001 #ifndef _ROS_SERVICE_DeleteLight_h 00002 #define _ROS_SERVICE_DeleteLight_h 00003 #include <stdint.h> 00004 #include <string.h> 00005 #include <stdlib.h> 00006 #include "ros/msg.h" 00007 00008 namespace gazebo_msgs 00009 { 00010 00011 static const char DELETELIGHT[] = "gazebo_msgs/DeleteLight"; 00012 00013 class DeleteLightRequest : public ros::Msg 00014 { 00015 public: 00016 typedef const char* _light_name_type; 00017 _light_name_type light_name; 00018 00019 DeleteLightRequest(): 00020 light_name("") 00021 { 00022 } 00023 00024 virtual int serialize(unsigned char *outbuffer) const 00025 { 00026 int offset = 0; 00027 uint32_t length_light_name = strlen(this->light_name); 00028 varToArr(outbuffer + offset, length_light_name); 00029 offset += 4; 00030 memcpy(outbuffer + offset, this->light_name, length_light_name); 00031 offset += length_light_name; 00032 return offset; 00033 } 00034 00035 virtual int deserialize(unsigned char *inbuffer) 00036 { 00037 int offset = 0; 00038 uint32_t length_light_name; 00039 arrToVar(length_light_name, (inbuffer + offset)); 00040 offset += 4; 00041 for(unsigned int k= offset; k< offset+length_light_name; ++k){ 00042 inbuffer[k-1]=inbuffer[k]; 00043 } 00044 inbuffer[offset+length_light_name-1]=0; 00045 this->light_name = (char *)(inbuffer + offset-1); 00046 offset += length_light_name; 00047 return offset; 00048 } 00049 00050 const char * getType(){ return DELETELIGHT; }; 00051 const char * getMD5(){ return "4fb676dfb4741fc866365702a859441c"; }; 00052 00053 }; 00054 00055 class DeleteLightResponse : public ros::Msg 00056 { 00057 public: 00058 typedef bool _success_type; 00059 _success_type success; 00060 typedef const char* _status_message_type; 00061 _status_message_type status_message; 00062 00063 DeleteLightResponse(): 00064 success(0), 00065 status_message("") 00066 { 00067 } 00068 00069 virtual int serialize(unsigned char *outbuffer) const 00070 { 00071 int offset = 0; 00072 union { 00073 bool real; 00074 uint8_t base; 00075 } u_success; 00076 u_success.real = this->success; 00077 *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; 00078 offset += sizeof(this->success); 00079 uint32_t length_status_message = strlen(this->status_message); 00080 varToArr(outbuffer + offset, length_status_message); 00081 offset += 4; 00082 memcpy(outbuffer + offset, this->status_message, length_status_message); 00083 offset += length_status_message; 00084 return offset; 00085 } 00086 00087 virtual int deserialize(unsigned char *inbuffer) 00088 { 00089 int offset = 0; 00090 union { 00091 bool real; 00092 uint8_t base; 00093 } u_success; 00094 u_success.base = 0; 00095 u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00096 this->success = u_success.real; 00097 offset += sizeof(this->success); 00098 uint32_t length_status_message; 00099 arrToVar(length_status_message, (inbuffer + offset)); 00100 offset += 4; 00101 for(unsigned int k= offset; k< offset+length_status_message; ++k){ 00102 inbuffer[k-1]=inbuffer[k]; 00103 } 00104 inbuffer[offset+length_status_message-1]=0; 00105 this->status_message = (char *)(inbuffer + offset-1); 00106 offset += length_status_message; 00107 return offset; 00108 } 00109 00110 const char * getType(){ return DELETELIGHT; }; 00111 const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; 00112 00113 }; 00114 00115 class DeleteLight { 00116 public: 00117 typedef DeleteLightRequest Request; 00118 typedef DeleteLightResponse Response; 00119 }; 00120 00121 } 00122 #endif
Generated on Tue Jul 12 2022 18:49:18 by 1.7.2