It has only one change from original one. I added robotfeedback message on it.
Dependents: RobotFeedback mobileRobotITU
Fork of ros_lib_indigo by
gazebo_msgs/GetModelProperties.h@0:fd24f7ca9688, 2016-03-31 (annotated)
- Committer:
- garyservin
- Date:
- Thu Mar 31 14:22:59 2016 +0000
- Revision:
- 0:fd24f7ca9688
Initial commit, generated based on a clean indigo-desktop-full
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
garyservin | 0:fd24f7ca9688 | 1 | #ifndef _ROS_SERVICE_GetModelProperties_h |
garyservin | 0:fd24f7ca9688 | 2 | #define _ROS_SERVICE_GetModelProperties_h |
garyservin | 0:fd24f7ca9688 | 3 | #include <stdint.h> |
garyservin | 0:fd24f7ca9688 | 4 | #include <string.h> |
garyservin | 0:fd24f7ca9688 | 5 | #include <stdlib.h> |
garyservin | 0:fd24f7ca9688 | 6 | #include "ros/msg.h" |
garyservin | 0:fd24f7ca9688 | 7 | |
garyservin | 0:fd24f7ca9688 | 8 | namespace gazebo_msgs |
garyservin | 0:fd24f7ca9688 | 9 | { |
garyservin | 0:fd24f7ca9688 | 10 | |
garyservin | 0:fd24f7ca9688 | 11 | static const char GETMODELPROPERTIES[] = "gazebo_msgs/GetModelProperties"; |
garyservin | 0:fd24f7ca9688 | 12 | |
garyservin | 0:fd24f7ca9688 | 13 | class GetModelPropertiesRequest : public ros::Msg |
garyservin | 0:fd24f7ca9688 | 14 | { |
garyservin | 0:fd24f7ca9688 | 15 | public: |
garyservin | 0:fd24f7ca9688 | 16 | const char* model_name; |
garyservin | 0:fd24f7ca9688 | 17 | |
garyservin | 0:fd24f7ca9688 | 18 | GetModelPropertiesRequest(): |
garyservin | 0:fd24f7ca9688 | 19 | model_name("") |
garyservin | 0:fd24f7ca9688 | 20 | { |
garyservin | 0:fd24f7ca9688 | 21 | } |
garyservin | 0:fd24f7ca9688 | 22 | |
garyservin | 0:fd24f7ca9688 | 23 | virtual int serialize(unsigned char *outbuffer) const |
garyservin | 0:fd24f7ca9688 | 24 | { |
garyservin | 0:fd24f7ca9688 | 25 | int offset = 0; |
garyservin | 0:fd24f7ca9688 | 26 | uint32_t length_model_name = strlen(this->model_name); |
garyservin | 0:fd24f7ca9688 | 27 | memcpy(outbuffer + offset, &length_model_name, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 28 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 29 | memcpy(outbuffer + offset, this->model_name, length_model_name); |
garyservin | 0:fd24f7ca9688 | 30 | offset += length_model_name; |
garyservin | 0:fd24f7ca9688 | 31 | return offset; |
garyservin | 0:fd24f7ca9688 | 32 | } |
garyservin | 0:fd24f7ca9688 | 33 | |
garyservin | 0:fd24f7ca9688 | 34 | virtual int deserialize(unsigned char *inbuffer) |
garyservin | 0:fd24f7ca9688 | 35 | { |
garyservin | 0:fd24f7ca9688 | 36 | int offset = 0; |
garyservin | 0:fd24f7ca9688 | 37 | uint32_t length_model_name; |
garyservin | 0:fd24f7ca9688 | 38 | memcpy(&length_model_name, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 39 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 40 | for(unsigned int k= offset; k< offset+length_model_name; ++k){ |
garyservin | 0:fd24f7ca9688 | 41 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 42 | } |
garyservin | 0:fd24f7ca9688 | 43 | inbuffer[offset+length_model_name-1]=0; |
garyservin | 0:fd24f7ca9688 | 44 | this->model_name = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 45 | offset += length_model_name; |
garyservin | 0:fd24f7ca9688 | 46 | return offset; |
garyservin | 0:fd24f7ca9688 | 47 | } |
garyservin | 0:fd24f7ca9688 | 48 | |
garyservin | 0:fd24f7ca9688 | 49 | const char * getType(){ return GETMODELPROPERTIES; }; |
garyservin | 0:fd24f7ca9688 | 50 | const char * getMD5(){ return "ea31c8eab6fc401383cf528a7c0984ba"; }; |
garyservin | 0:fd24f7ca9688 | 51 | |
garyservin | 0:fd24f7ca9688 | 52 | }; |
garyservin | 0:fd24f7ca9688 | 53 | |
garyservin | 0:fd24f7ca9688 | 54 | class GetModelPropertiesResponse : public ros::Msg |
garyservin | 0:fd24f7ca9688 | 55 | { |
garyservin | 0:fd24f7ca9688 | 56 | public: |
garyservin | 0:fd24f7ca9688 | 57 | const char* parent_model_name; |
garyservin | 0:fd24f7ca9688 | 58 | const char* canonical_body_name; |
garyservin | 0:fd24f7ca9688 | 59 | uint8_t body_names_length; |
garyservin | 0:fd24f7ca9688 | 60 | char* st_body_names; |
garyservin | 0:fd24f7ca9688 | 61 | char* * body_names; |
garyservin | 0:fd24f7ca9688 | 62 | uint8_t geom_names_length; |
garyservin | 0:fd24f7ca9688 | 63 | char* st_geom_names; |
garyservin | 0:fd24f7ca9688 | 64 | char* * geom_names; |
garyservin | 0:fd24f7ca9688 | 65 | uint8_t joint_names_length; |
garyservin | 0:fd24f7ca9688 | 66 | char* st_joint_names; |
garyservin | 0:fd24f7ca9688 | 67 | char* * joint_names; |
garyservin | 0:fd24f7ca9688 | 68 | uint8_t child_model_names_length; |
garyservin | 0:fd24f7ca9688 | 69 | char* st_child_model_names; |
garyservin | 0:fd24f7ca9688 | 70 | char* * child_model_names; |
garyservin | 0:fd24f7ca9688 | 71 | bool is_static; |
garyservin | 0:fd24f7ca9688 | 72 | bool success; |
garyservin | 0:fd24f7ca9688 | 73 | const char* status_message; |
garyservin | 0:fd24f7ca9688 | 74 | |
garyservin | 0:fd24f7ca9688 | 75 | GetModelPropertiesResponse(): |
garyservin | 0:fd24f7ca9688 | 76 | parent_model_name(""), |
garyservin | 0:fd24f7ca9688 | 77 | canonical_body_name(""), |
garyservin | 0:fd24f7ca9688 | 78 | body_names_length(0), body_names(NULL), |
garyservin | 0:fd24f7ca9688 | 79 | geom_names_length(0), geom_names(NULL), |
garyservin | 0:fd24f7ca9688 | 80 | joint_names_length(0), joint_names(NULL), |
garyservin | 0:fd24f7ca9688 | 81 | child_model_names_length(0), child_model_names(NULL), |
garyservin | 0:fd24f7ca9688 | 82 | is_static(0), |
garyservin | 0:fd24f7ca9688 | 83 | success(0), |
garyservin | 0:fd24f7ca9688 | 84 | status_message("") |
garyservin | 0:fd24f7ca9688 | 85 | { |
garyservin | 0:fd24f7ca9688 | 86 | } |
garyservin | 0:fd24f7ca9688 | 87 | |
garyservin | 0:fd24f7ca9688 | 88 | virtual int serialize(unsigned char *outbuffer) const |
garyservin | 0:fd24f7ca9688 | 89 | { |
garyservin | 0:fd24f7ca9688 | 90 | int offset = 0; |
garyservin | 0:fd24f7ca9688 | 91 | uint32_t length_parent_model_name = strlen(this->parent_model_name); |
garyservin | 0:fd24f7ca9688 | 92 | memcpy(outbuffer + offset, &length_parent_model_name, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 93 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 94 | memcpy(outbuffer + offset, this->parent_model_name, length_parent_model_name); |
garyservin | 0:fd24f7ca9688 | 95 | offset += length_parent_model_name; |
garyservin | 0:fd24f7ca9688 | 96 | uint32_t length_canonical_body_name = strlen(this->canonical_body_name); |
garyservin | 0:fd24f7ca9688 | 97 | memcpy(outbuffer + offset, &length_canonical_body_name, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 98 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 99 | memcpy(outbuffer + offset, this->canonical_body_name, length_canonical_body_name); |
garyservin | 0:fd24f7ca9688 | 100 | offset += length_canonical_body_name; |
garyservin | 0:fd24f7ca9688 | 101 | *(outbuffer + offset++) = body_names_length; |
garyservin | 0:fd24f7ca9688 | 102 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 103 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 104 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 105 | for( uint8_t i = 0; i < body_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 106 | uint32_t length_body_namesi = strlen(this->body_names[i]); |
garyservin | 0:fd24f7ca9688 | 107 | memcpy(outbuffer + offset, &length_body_namesi, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 108 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 109 | memcpy(outbuffer + offset, this->body_names[i], length_body_namesi); |
garyservin | 0:fd24f7ca9688 | 110 | offset += length_body_namesi; |
garyservin | 0:fd24f7ca9688 | 111 | } |
garyservin | 0:fd24f7ca9688 | 112 | *(outbuffer + offset++) = geom_names_length; |
garyservin | 0:fd24f7ca9688 | 113 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 114 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 115 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 116 | for( uint8_t i = 0; i < geom_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 117 | uint32_t length_geom_namesi = strlen(this->geom_names[i]); |
garyservin | 0:fd24f7ca9688 | 118 | memcpy(outbuffer + offset, &length_geom_namesi, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 119 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 120 | memcpy(outbuffer + offset, this->geom_names[i], length_geom_namesi); |
garyservin | 0:fd24f7ca9688 | 121 | offset += length_geom_namesi; |
garyservin | 0:fd24f7ca9688 | 122 | } |
garyservin | 0:fd24f7ca9688 | 123 | *(outbuffer + offset++) = joint_names_length; |
garyservin | 0:fd24f7ca9688 | 124 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 125 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 126 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 127 | for( uint8_t i = 0; i < joint_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 128 | uint32_t length_joint_namesi = strlen(this->joint_names[i]); |
garyservin | 0:fd24f7ca9688 | 129 | memcpy(outbuffer + offset, &length_joint_namesi, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 130 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 131 | memcpy(outbuffer + offset, this->joint_names[i], length_joint_namesi); |
garyservin | 0:fd24f7ca9688 | 132 | offset += length_joint_namesi; |
garyservin | 0:fd24f7ca9688 | 133 | } |
garyservin | 0:fd24f7ca9688 | 134 | *(outbuffer + offset++) = child_model_names_length; |
garyservin | 0:fd24f7ca9688 | 135 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 136 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 137 | *(outbuffer + offset++) = 0; |
garyservin | 0:fd24f7ca9688 | 138 | for( uint8_t i = 0; i < child_model_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 139 | uint32_t length_child_model_namesi = strlen(this->child_model_names[i]); |
garyservin | 0:fd24f7ca9688 | 140 | memcpy(outbuffer + offset, &length_child_model_namesi, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 141 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 142 | memcpy(outbuffer + offset, this->child_model_names[i], length_child_model_namesi); |
garyservin | 0:fd24f7ca9688 | 143 | offset += length_child_model_namesi; |
garyservin | 0:fd24f7ca9688 | 144 | } |
garyservin | 0:fd24f7ca9688 | 145 | union { |
garyservin | 0:fd24f7ca9688 | 146 | bool real; |
garyservin | 0:fd24f7ca9688 | 147 | uint8_t base; |
garyservin | 0:fd24f7ca9688 | 148 | } u_is_static; |
garyservin | 0:fd24f7ca9688 | 149 | u_is_static.real = this->is_static; |
garyservin | 0:fd24f7ca9688 | 150 | *(outbuffer + offset + 0) = (u_is_static.base >> (8 * 0)) & 0xFF; |
garyservin | 0:fd24f7ca9688 | 151 | offset += sizeof(this->is_static); |
garyservin | 0:fd24f7ca9688 | 152 | union { |
garyservin | 0:fd24f7ca9688 | 153 | bool real; |
garyservin | 0:fd24f7ca9688 | 154 | uint8_t base; |
garyservin | 0:fd24f7ca9688 | 155 | } u_success; |
garyservin | 0:fd24f7ca9688 | 156 | u_success.real = this->success; |
garyservin | 0:fd24f7ca9688 | 157 | *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; |
garyservin | 0:fd24f7ca9688 | 158 | offset += sizeof(this->success); |
garyservin | 0:fd24f7ca9688 | 159 | uint32_t length_status_message = strlen(this->status_message); |
garyservin | 0:fd24f7ca9688 | 160 | memcpy(outbuffer + offset, &length_status_message, sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 161 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 162 | memcpy(outbuffer + offset, this->status_message, length_status_message); |
garyservin | 0:fd24f7ca9688 | 163 | offset += length_status_message; |
garyservin | 0:fd24f7ca9688 | 164 | return offset; |
garyservin | 0:fd24f7ca9688 | 165 | } |
garyservin | 0:fd24f7ca9688 | 166 | |
garyservin | 0:fd24f7ca9688 | 167 | virtual int deserialize(unsigned char *inbuffer) |
garyservin | 0:fd24f7ca9688 | 168 | { |
garyservin | 0:fd24f7ca9688 | 169 | int offset = 0; |
garyservin | 0:fd24f7ca9688 | 170 | uint32_t length_parent_model_name; |
garyservin | 0:fd24f7ca9688 | 171 | memcpy(&length_parent_model_name, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 172 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 173 | for(unsigned int k= offset; k< offset+length_parent_model_name; ++k){ |
garyservin | 0:fd24f7ca9688 | 174 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 175 | } |
garyservin | 0:fd24f7ca9688 | 176 | inbuffer[offset+length_parent_model_name-1]=0; |
garyservin | 0:fd24f7ca9688 | 177 | this->parent_model_name = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 178 | offset += length_parent_model_name; |
garyservin | 0:fd24f7ca9688 | 179 | uint32_t length_canonical_body_name; |
garyservin | 0:fd24f7ca9688 | 180 | memcpy(&length_canonical_body_name, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 181 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 182 | for(unsigned int k= offset; k< offset+length_canonical_body_name; ++k){ |
garyservin | 0:fd24f7ca9688 | 183 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 184 | } |
garyservin | 0:fd24f7ca9688 | 185 | inbuffer[offset+length_canonical_body_name-1]=0; |
garyservin | 0:fd24f7ca9688 | 186 | this->canonical_body_name = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 187 | offset += length_canonical_body_name; |
garyservin | 0:fd24f7ca9688 | 188 | uint8_t body_names_lengthT = *(inbuffer + offset++); |
garyservin | 0:fd24f7ca9688 | 189 | if(body_names_lengthT > body_names_length) |
garyservin | 0:fd24f7ca9688 | 190 | this->body_names = (char**)realloc(this->body_names, body_names_lengthT * sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 191 | offset += 3; |
garyservin | 0:fd24f7ca9688 | 192 | body_names_length = body_names_lengthT; |
garyservin | 0:fd24f7ca9688 | 193 | for( uint8_t i = 0; i < body_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 194 | uint32_t length_st_body_names; |
garyservin | 0:fd24f7ca9688 | 195 | memcpy(&length_st_body_names, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 196 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 197 | for(unsigned int k= offset; k< offset+length_st_body_names; ++k){ |
garyservin | 0:fd24f7ca9688 | 198 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 199 | } |
garyservin | 0:fd24f7ca9688 | 200 | inbuffer[offset+length_st_body_names-1]=0; |
garyservin | 0:fd24f7ca9688 | 201 | this->st_body_names = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 202 | offset += length_st_body_names; |
garyservin | 0:fd24f7ca9688 | 203 | memcpy( &(this->body_names[i]), &(this->st_body_names), sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 204 | } |
garyservin | 0:fd24f7ca9688 | 205 | uint8_t geom_names_lengthT = *(inbuffer + offset++); |
garyservin | 0:fd24f7ca9688 | 206 | if(geom_names_lengthT > geom_names_length) |
garyservin | 0:fd24f7ca9688 | 207 | this->geom_names = (char**)realloc(this->geom_names, geom_names_lengthT * sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 208 | offset += 3; |
garyservin | 0:fd24f7ca9688 | 209 | geom_names_length = geom_names_lengthT; |
garyservin | 0:fd24f7ca9688 | 210 | for( uint8_t i = 0; i < geom_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 211 | uint32_t length_st_geom_names; |
garyservin | 0:fd24f7ca9688 | 212 | memcpy(&length_st_geom_names, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 213 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 214 | for(unsigned int k= offset; k< offset+length_st_geom_names; ++k){ |
garyservin | 0:fd24f7ca9688 | 215 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 216 | } |
garyservin | 0:fd24f7ca9688 | 217 | inbuffer[offset+length_st_geom_names-1]=0; |
garyservin | 0:fd24f7ca9688 | 218 | this->st_geom_names = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 219 | offset += length_st_geom_names; |
garyservin | 0:fd24f7ca9688 | 220 | memcpy( &(this->geom_names[i]), &(this->st_geom_names), sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 221 | } |
garyservin | 0:fd24f7ca9688 | 222 | uint8_t joint_names_lengthT = *(inbuffer + offset++); |
garyservin | 0:fd24f7ca9688 | 223 | if(joint_names_lengthT > joint_names_length) |
garyservin | 0:fd24f7ca9688 | 224 | this->joint_names = (char**)realloc(this->joint_names, joint_names_lengthT * sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 225 | offset += 3; |
garyservin | 0:fd24f7ca9688 | 226 | joint_names_length = joint_names_lengthT; |
garyservin | 0:fd24f7ca9688 | 227 | for( uint8_t i = 0; i < joint_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 228 | uint32_t length_st_joint_names; |
garyservin | 0:fd24f7ca9688 | 229 | memcpy(&length_st_joint_names, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 230 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 231 | for(unsigned int k= offset; k< offset+length_st_joint_names; ++k){ |
garyservin | 0:fd24f7ca9688 | 232 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 233 | } |
garyservin | 0:fd24f7ca9688 | 234 | inbuffer[offset+length_st_joint_names-1]=0; |
garyservin | 0:fd24f7ca9688 | 235 | this->st_joint_names = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 236 | offset += length_st_joint_names; |
garyservin | 0:fd24f7ca9688 | 237 | memcpy( &(this->joint_names[i]), &(this->st_joint_names), sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 238 | } |
garyservin | 0:fd24f7ca9688 | 239 | uint8_t child_model_names_lengthT = *(inbuffer + offset++); |
garyservin | 0:fd24f7ca9688 | 240 | if(child_model_names_lengthT > child_model_names_length) |
garyservin | 0:fd24f7ca9688 | 241 | this->child_model_names = (char**)realloc(this->child_model_names, child_model_names_lengthT * sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 242 | offset += 3; |
garyservin | 0:fd24f7ca9688 | 243 | child_model_names_length = child_model_names_lengthT; |
garyservin | 0:fd24f7ca9688 | 244 | for( uint8_t i = 0; i < child_model_names_length; i++){ |
garyservin | 0:fd24f7ca9688 | 245 | uint32_t length_st_child_model_names; |
garyservin | 0:fd24f7ca9688 | 246 | memcpy(&length_st_child_model_names, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 247 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 248 | for(unsigned int k= offset; k< offset+length_st_child_model_names; ++k){ |
garyservin | 0:fd24f7ca9688 | 249 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 250 | } |
garyservin | 0:fd24f7ca9688 | 251 | inbuffer[offset+length_st_child_model_names-1]=0; |
garyservin | 0:fd24f7ca9688 | 252 | this->st_child_model_names = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 253 | offset += length_st_child_model_names; |
garyservin | 0:fd24f7ca9688 | 254 | memcpy( &(this->child_model_names[i]), &(this->st_child_model_names), sizeof(char*)); |
garyservin | 0:fd24f7ca9688 | 255 | } |
garyservin | 0:fd24f7ca9688 | 256 | union { |
garyservin | 0:fd24f7ca9688 | 257 | bool real; |
garyservin | 0:fd24f7ca9688 | 258 | uint8_t base; |
garyservin | 0:fd24f7ca9688 | 259 | } u_is_static; |
garyservin | 0:fd24f7ca9688 | 260 | u_is_static.base = 0; |
garyservin | 0:fd24f7ca9688 | 261 | u_is_static.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); |
garyservin | 0:fd24f7ca9688 | 262 | this->is_static = u_is_static.real; |
garyservin | 0:fd24f7ca9688 | 263 | offset += sizeof(this->is_static); |
garyservin | 0:fd24f7ca9688 | 264 | union { |
garyservin | 0:fd24f7ca9688 | 265 | bool real; |
garyservin | 0:fd24f7ca9688 | 266 | uint8_t base; |
garyservin | 0:fd24f7ca9688 | 267 | } u_success; |
garyservin | 0:fd24f7ca9688 | 268 | u_success.base = 0; |
garyservin | 0:fd24f7ca9688 | 269 | u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); |
garyservin | 0:fd24f7ca9688 | 270 | this->success = u_success.real; |
garyservin | 0:fd24f7ca9688 | 271 | offset += sizeof(this->success); |
garyservin | 0:fd24f7ca9688 | 272 | uint32_t length_status_message; |
garyservin | 0:fd24f7ca9688 | 273 | memcpy(&length_status_message, (inbuffer + offset), sizeof(uint32_t)); |
garyservin | 0:fd24f7ca9688 | 274 | offset += 4; |
garyservin | 0:fd24f7ca9688 | 275 | for(unsigned int k= offset; k< offset+length_status_message; ++k){ |
garyservin | 0:fd24f7ca9688 | 276 | inbuffer[k-1]=inbuffer[k]; |
garyservin | 0:fd24f7ca9688 | 277 | } |
garyservin | 0:fd24f7ca9688 | 278 | inbuffer[offset+length_status_message-1]=0; |
garyservin | 0:fd24f7ca9688 | 279 | this->status_message = (char *)(inbuffer + offset-1); |
garyservin | 0:fd24f7ca9688 | 280 | offset += length_status_message; |
garyservin | 0:fd24f7ca9688 | 281 | return offset; |
garyservin | 0:fd24f7ca9688 | 282 | } |
garyservin | 0:fd24f7ca9688 | 283 | |
garyservin | 0:fd24f7ca9688 | 284 | const char * getType(){ return GETMODELPROPERTIES; }; |
garyservin | 0:fd24f7ca9688 | 285 | const char * getMD5(){ return "b7f370938ef77b464b95f1bab3ec5028"; }; |
garyservin | 0:fd24f7ca9688 | 286 | |
garyservin | 0:fd24f7ca9688 | 287 | }; |
garyservin | 0:fd24f7ca9688 | 288 | |
garyservin | 0:fd24f7ca9688 | 289 | class GetModelProperties { |
garyservin | 0:fd24f7ca9688 | 290 | public: |
garyservin | 0:fd24f7ca9688 | 291 | typedef GetModelPropertiesRequest Request; |
garyservin | 0:fd24f7ca9688 | 292 | typedef GetModelPropertiesResponse Response; |
garyservin | 0:fd24f7ca9688 | 293 | }; |
garyservin | 0:fd24f7ca9688 | 294 | |
garyservin | 0:fd24f7ca9688 | 295 | } |
garyservin | 0:fd24f7ca9688 | 296 | #endif |