Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DeleteModel.h
00001 #ifndef _ROS_SERVICE_DeleteModel_h 00002 #define _ROS_SERVICE_DeleteModel_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 DELETEMODEL[] = "gazebo_msgs/DeleteModel"; 00012 00013 class DeleteModelRequest : public ros::Msg 00014 { 00015 public: 00016 typedef const char* _model_name_type; 00017 _model_name_type model_name; 00018 00019 DeleteModelRequest(): 00020 model_name("") 00021 { 00022 } 00023 00024 virtual int serialize(unsigned char *outbuffer) const 00025 { 00026 int offset = 0; 00027 uint32_t length_model_name = strlen(this->model_name); 00028 varToArr(outbuffer + offset, length_model_name); 00029 offset += 4; 00030 memcpy(outbuffer + offset, this->model_name, length_model_name); 00031 offset += length_model_name; 00032 return offset; 00033 } 00034 00035 virtual int deserialize(unsigned char *inbuffer) 00036 { 00037 int offset = 0; 00038 uint32_t length_model_name; 00039 arrToVar(length_model_name, (inbuffer + offset)); 00040 offset += 4; 00041 for(unsigned int k= offset; k< offset+length_model_name; ++k){ 00042 inbuffer[k-1]=inbuffer[k]; 00043 } 00044 inbuffer[offset+length_model_name-1]=0; 00045 this->model_name = (char *)(inbuffer + offset-1); 00046 offset += length_model_name; 00047 return offset; 00048 } 00049 00050 const char * getType(){ return DELETEMODEL; }; 00051 const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; 00052 00053 }; 00054 00055 class DeleteModelResponse : 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 DeleteModelResponse(): 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 DELETEMODEL; }; 00111 const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; }; 00112 00113 }; 00114 00115 class DeleteModel { 00116 public: 00117 typedef DeleteModelRequest Request; 00118 typedef DeleteModelResponse Response; 00119 }; 00120 00121 } 00122 #endif
Generated on Tue Jul 12 2022 17:32:44 by
