NodeletLoad.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_NodeletLoad_h
00002 #define _ROS_SERVICE_NodeletLoad_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace nodelet
00009 {
00010 
00011 static const char NODELETLOAD[] = "nodelet/NodeletLoad";
00012 
00013   class NodeletLoadRequest : public ros::Msg
00014   {
00015     public:
00016       char * name;
00017       char * type;
00018       uint8_t remap_source_args_length;
00019       char* st_remap_source_args;
00020       char* * remap_source_args;
00021       uint8_t remap_target_args_length;
00022       char* st_remap_target_args;
00023       char* * remap_target_args;
00024       uint8_t my_argv_length;
00025       char* st_my_argv;
00026       char* * my_argv;
00027       char * bond_id;
00028 
00029     virtual int serialize(unsigned char *outbuffer) const
00030     {
00031       int offset = 0;
00032       uint32_t length_name = strlen( (const char*) this->name);
00033       memcpy(outbuffer + offset, &length_name, sizeof(uint32_t));
00034       offset += 4;
00035       memcpy(outbuffer + offset, this->name, length_name);
00036       offset += length_name;
00037       uint32_t length_type = strlen( (const char*) this->type);
00038       memcpy(outbuffer + offset, &length_type, sizeof(uint32_t));
00039       offset += 4;
00040       memcpy(outbuffer + offset, this->type, length_type);
00041       offset += length_type;
00042       *(outbuffer + offset++) = remap_source_args_length;
00043       *(outbuffer + offset++) = 0;
00044       *(outbuffer + offset++) = 0;
00045       *(outbuffer + offset++) = 0;
00046       for( uint8_t i = 0; i < remap_source_args_length; i++){
00047       uint32_t length_remap_source_argsi = strlen( (const char*) this->remap_source_args[i]);
00048       memcpy(outbuffer + offset, &length_remap_source_argsi, sizeof(uint32_t));
00049       offset += 4;
00050       memcpy(outbuffer + offset, this->remap_source_args[i], length_remap_source_argsi);
00051       offset += length_remap_source_argsi;
00052       }
00053       *(outbuffer + offset++) = remap_target_args_length;
00054       *(outbuffer + offset++) = 0;
00055       *(outbuffer + offset++) = 0;
00056       *(outbuffer + offset++) = 0;
00057       for( uint8_t i = 0; i < remap_target_args_length; i++){
00058       uint32_t length_remap_target_argsi = strlen( (const char*) this->remap_target_args[i]);
00059       memcpy(outbuffer + offset, &length_remap_target_argsi, sizeof(uint32_t));
00060       offset += 4;
00061       memcpy(outbuffer + offset, this->remap_target_args[i], length_remap_target_argsi);
00062       offset += length_remap_target_argsi;
00063       }
00064       *(outbuffer + offset++) = my_argv_length;
00065       *(outbuffer + offset++) = 0;
00066       *(outbuffer + offset++) = 0;
00067       *(outbuffer + offset++) = 0;
00068       for( uint8_t i = 0; i < my_argv_length; i++){
00069       uint32_t length_my_argvi = strlen( (const char*) this->my_argv[i]);
00070       memcpy(outbuffer + offset, &length_my_argvi, sizeof(uint32_t));
00071       offset += 4;
00072       memcpy(outbuffer + offset, this->my_argv[i], length_my_argvi);
00073       offset += length_my_argvi;
00074       }
00075       uint32_t length_bond_id = strlen( (const char*) this->bond_id);
00076       memcpy(outbuffer + offset, &length_bond_id, sizeof(uint32_t));
00077       offset += 4;
00078       memcpy(outbuffer + offset, this->bond_id, length_bond_id);
00079       offset += length_bond_id;
00080       return offset;
00081     }
00082 
00083     virtual int deserialize(unsigned char *inbuffer)
00084     {
00085       int offset = 0;
00086       uint32_t length_name;
00087       memcpy(&length_name, (inbuffer + offset), sizeof(uint32_t));
00088       offset += 4;
00089       for(unsigned int k= offset; k< offset+length_name; ++k){
00090           inbuffer[k-1]=inbuffer[k];
00091       }
00092       inbuffer[offset+length_name-1]=0;
00093       this->name = (char *)(inbuffer + offset-1);
00094       offset += length_name;
00095       uint32_t length_type;
00096       memcpy(&length_type, (inbuffer + offset), sizeof(uint32_t));
00097       offset += 4;
00098       for(unsigned int k= offset; k< offset+length_type; ++k){
00099           inbuffer[k-1]=inbuffer[k];
00100       }
00101       inbuffer[offset+length_type-1]=0;
00102       this->type = (char *)(inbuffer + offset-1);
00103       offset += length_type;
00104       uint8_t remap_source_args_lengthT = *(inbuffer + offset++);
00105       if(remap_source_args_lengthT > remap_source_args_length)
00106         this->remap_source_args = (char**)realloc(this->remap_source_args, remap_source_args_lengthT * sizeof(char*));
00107       offset += 3;
00108       remap_source_args_length = remap_source_args_lengthT;
00109       for( uint8_t i = 0; i < remap_source_args_length; i++){
00110       uint32_t length_st_remap_source_args;
00111       memcpy(&length_st_remap_source_args, (inbuffer + offset), sizeof(uint32_t));
00112       offset += 4;
00113       for(unsigned int k= offset; k< offset+length_st_remap_source_args; ++k){
00114           inbuffer[k-1]=inbuffer[k];
00115       }
00116       inbuffer[offset+length_st_remap_source_args-1]=0;
00117       this->st_remap_source_args = (char *)(inbuffer + offset-1);
00118       offset += length_st_remap_source_args;
00119         memcpy( &(this->remap_source_args[i]), &(this->st_remap_source_args), sizeof(char*));
00120       }
00121       uint8_t remap_target_args_lengthT = *(inbuffer + offset++);
00122       if(remap_target_args_lengthT > remap_target_args_length)
00123         this->remap_target_args = (char**)realloc(this->remap_target_args, remap_target_args_lengthT * sizeof(char*));
00124       offset += 3;
00125       remap_target_args_length = remap_target_args_lengthT;
00126       for( uint8_t i = 0; i < remap_target_args_length; i++){
00127       uint32_t length_st_remap_target_args;
00128       memcpy(&length_st_remap_target_args, (inbuffer + offset), sizeof(uint32_t));
00129       offset += 4;
00130       for(unsigned int k= offset; k< offset+length_st_remap_target_args; ++k){
00131           inbuffer[k-1]=inbuffer[k];
00132       }
00133       inbuffer[offset+length_st_remap_target_args-1]=0;
00134       this->st_remap_target_args = (char *)(inbuffer + offset-1);
00135       offset += length_st_remap_target_args;
00136         memcpy( &(this->remap_target_args[i]), &(this->st_remap_target_args), sizeof(char*));
00137       }
00138       uint8_t my_argv_lengthT = *(inbuffer + offset++);
00139       if(my_argv_lengthT > my_argv_length)
00140         this->my_argv = (char**)realloc(this->my_argv, my_argv_lengthT * sizeof(char*));
00141       offset += 3;
00142       my_argv_length = my_argv_lengthT;
00143       for( uint8_t i = 0; i < my_argv_length; i++){
00144       uint32_t length_st_my_argv;
00145       memcpy(&length_st_my_argv, (inbuffer + offset), sizeof(uint32_t));
00146       offset += 4;
00147       for(unsigned int k= offset; k< offset+length_st_my_argv; ++k){
00148           inbuffer[k-1]=inbuffer[k];
00149       }
00150       inbuffer[offset+length_st_my_argv-1]=0;
00151       this->st_my_argv = (char *)(inbuffer + offset-1);
00152       offset += length_st_my_argv;
00153         memcpy( &(this->my_argv[i]), &(this->st_my_argv), sizeof(char*));
00154       }
00155       uint32_t length_bond_id;
00156       memcpy(&length_bond_id, (inbuffer + offset), sizeof(uint32_t));
00157       offset += 4;
00158       for(unsigned int k= offset; k< offset+length_bond_id; ++k){
00159           inbuffer[k-1]=inbuffer[k];
00160       }
00161       inbuffer[offset+length_bond_id-1]=0;
00162       this->bond_id = (char *)(inbuffer + offset-1);
00163       offset += length_bond_id;
00164      return offset;
00165     }
00166 
00167     const char * getType(){ return NODELETLOAD; };
00168     const char * getMD5(){ return "c6e28cc4d2e259249d96cfb50658fbec"; };
00169 
00170   };
00171 
00172   class NodeletLoadResponse : public ros::Msg
00173   {
00174     public:
00175       bool success;
00176 
00177     virtual int serialize(unsigned char *outbuffer) const
00178     {
00179       int offset = 0;
00180       union {
00181         bool real;
00182         uint8_t base;
00183       } u_success;
00184       u_success.real = this->success;
00185       *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
00186       offset += sizeof(this->success);
00187       return offset;
00188     }
00189 
00190     virtual int deserialize(unsigned char *inbuffer)
00191     {
00192       int offset = 0;
00193       union {
00194         bool real;
00195         uint8_t base;
00196       } u_success;
00197       u_success.base = 0;
00198       u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00199       this->success = u_success.real;
00200       offset += sizeof(this->success);
00201      return offset;
00202     }
00203 
00204     const char * getType(){ return NODELETLOAD; };
00205     const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; };
00206 
00207   };
00208 
00209   class NodeletLoad {
00210     public:
00211     typedef NodeletLoadRequest Request;
00212     typedef NodeletLoadResponse Response;
00213   };
00214 
00215 }
00216 #endif


lizi_arduino
Author(s): RoboTiCan
autogenerated on Wed Aug 26 2015 12:24:22