PlannerInterfaceDescription.h
Go to the documentation of this file.
00001 #ifndef _ROS_moveit_msgs_PlannerInterfaceDescription_h
00002 #define _ROS_moveit_msgs_PlannerInterfaceDescription_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 
00009 namespace moveit_msgs
00010 {
00011 
00012   class PlannerInterfaceDescription : public ros::Msg
00013   {
00014     public:
00015       const char* name;
00016       uint8_t planner_ids_length;
00017       char* st_planner_ids;
00018       char* * planner_ids;
00019 
00020     virtual int serialize(unsigned char *outbuffer) const
00021     {
00022       int offset = 0;
00023       uint32_t length_name = strlen(this->name);
00024       memcpy(outbuffer + offset, &length_name, sizeof(uint32_t));
00025       offset += 4;
00026       memcpy(outbuffer + offset, this->name, length_name);
00027       offset += length_name;
00028       *(outbuffer + offset++) = planner_ids_length;
00029       *(outbuffer + offset++) = 0;
00030       *(outbuffer + offset++) = 0;
00031       *(outbuffer + offset++) = 0;
00032       for( uint8_t i = 0; i < planner_ids_length; i++){
00033       uint32_t length_planner_idsi = strlen(this->planner_ids[i]);
00034       memcpy(outbuffer + offset, &length_planner_idsi, sizeof(uint32_t));
00035       offset += 4;
00036       memcpy(outbuffer + offset, this->planner_ids[i], length_planner_idsi);
00037       offset += length_planner_idsi;
00038       }
00039       return offset;
00040     }
00041 
00042     virtual int deserialize(unsigned char *inbuffer)
00043     {
00044       int offset = 0;
00045       uint32_t length_name;
00046       memcpy(&length_name, (inbuffer + offset), sizeof(uint32_t));
00047       offset += 4;
00048       for(unsigned int k= offset; k< offset+length_name; ++k){
00049           inbuffer[k-1]=inbuffer[k];
00050       }
00051       inbuffer[offset+length_name-1]=0;
00052       this->name = (char *)(inbuffer + offset-1);
00053       offset += length_name;
00054       uint8_t planner_ids_lengthT = *(inbuffer + offset++);
00055       if(planner_ids_lengthT > planner_ids_length)
00056         this->planner_ids = (char**)realloc(this->planner_ids, planner_ids_lengthT * sizeof(char*));
00057       offset += 3;
00058       planner_ids_length = planner_ids_lengthT;
00059       for( uint8_t i = 0; i < planner_ids_length; i++){
00060       uint32_t length_st_planner_ids;
00061       memcpy(&length_st_planner_ids, (inbuffer + offset), sizeof(uint32_t));
00062       offset += 4;
00063       for(unsigned int k= offset; k< offset+length_st_planner_ids; ++k){
00064           inbuffer[k-1]=inbuffer[k];
00065       }
00066       inbuffer[offset+length_st_planner_ids-1]=0;
00067       this->st_planner_ids = (char *)(inbuffer + offset-1);
00068       offset += length_st_planner_ids;
00069         memcpy( &(this->planner_ids[i]), &(this->st_planner_ids), sizeof(char*));
00070       }
00071      return offset;
00072     }
00073 
00074     const char * getType(){ return "moveit_msgs/PlannerInterfaceDescription"; };
00075     const char * getMD5(){ return "ea5f6e6129aa1b110ccda9900d2bf25e"; };
00076 
00077   };
00078 
00079 }
00080 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:56