catchrobo2022 / Mbed 2 deprecated catchrobo2022_mbed

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers RenameRobotStateInWarehouse.h Source File

RenameRobotStateInWarehouse.h

00001 #ifndef _ROS_SERVICE_RenameRobotStateInWarehouse_h
00002 #define _ROS_SERVICE_RenameRobotStateInWarehouse_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace moveit_msgs
00009 {
00010 
00011 static const char RENAMEROBOTSTATEINWAREHOUSE[] = "moveit_msgs/RenameRobotStateInWarehouse";
00012 
00013   class RenameRobotStateInWarehouseRequest : public ros::Msg
00014   {
00015     public:
00016       typedef const char* _old_name_type;
00017       _old_name_type old_name;
00018       typedef const char* _new_name_type;
00019       _new_name_type new_name;
00020       typedef const char* _robot_type;
00021       _robot_type robot;
00022 
00023     RenameRobotStateInWarehouseRequest():
00024       old_name(""),
00025       new_name(""),
00026       robot("")
00027     {
00028     }
00029 
00030     virtual int serialize(unsigned char *outbuffer) const
00031     {
00032       int offset = 0;
00033       uint32_t length_old_name = strlen(this->old_name);
00034       varToArr(outbuffer + offset, length_old_name);
00035       offset += 4;
00036       memcpy(outbuffer + offset, this->old_name, length_old_name);
00037       offset += length_old_name;
00038       uint32_t length_new_name = strlen(this->new_name);
00039       varToArr(outbuffer + offset, length_new_name);
00040       offset += 4;
00041       memcpy(outbuffer + offset, this->new_name, length_new_name);
00042       offset += length_new_name;
00043       uint32_t length_robot = strlen(this->robot);
00044       varToArr(outbuffer + offset, length_robot);
00045       offset += 4;
00046       memcpy(outbuffer + offset, this->robot, length_robot);
00047       offset += length_robot;
00048       return offset;
00049     }
00050 
00051     virtual int deserialize(unsigned char *inbuffer)
00052     {
00053       int offset = 0;
00054       uint32_t length_old_name;
00055       arrToVar(length_old_name, (inbuffer + offset));
00056       offset += 4;
00057       for(unsigned int k= offset; k< offset+length_old_name; ++k){
00058           inbuffer[k-1]=inbuffer[k];
00059       }
00060       inbuffer[offset+length_old_name-1]=0;
00061       this->old_name = (char *)(inbuffer + offset-1);
00062       offset += length_old_name;
00063       uint32_t length_new_name;
00064       arrToVar(length_new_name, (inbuffer + offset));
00065       offset += 4;
00066       for(unsigned int k= offset; k< offset+length_new_name; ++k){
00067           inbuffer[k-1]=inbuffer[k];
00068       }
00069       inbuffer[offset+length_new_name-1]=0;
00070       this->new_name = (char *)(inbuffer + offset-1);
00071       offset += length_new_name;
00072       uint32_t length_robot;
00073       arrToVar(length_robot, (inbuffer + offset));
00074       offset += 4;
00075       for(unsigned int k= offset; k< offset+length_robot; ++k){
00076           inbuffer[k-1]=inbuffer[k];
00077       }
00078       inbuffer[offset+length_robot-1]=0;
00079       this->robot = (char *)(inbuffer + offset-1);
00080       offset += length_robot;
00081      return offset;
00082     }
00083 
00084     virtual const char * getType(){ return RENAMEROBOTSTATEINWAREHOUSE; };
00085     virtual const char * getMD5(){ return "073dc05c3fd313b947cea483c25c46b0"; };
00086 
00087   };
00088 
00089   class RenameRobotStateInWarehouseResponse : public ros::Msg
00090   {
00091     public:
00092 
00093     RenameRobotStateInWarehouseResponse()
00094     {
00095     }
00096 
00097     virtual int serialize(unsigned char *outbuffer) const
00098     {
00099       int offset = 0;
00100       return offset;
00101     }
00102 
00103     virtual int deserialize(unsigned char *inbuffer)
00104     {
00105       int offset = 0;
00106      return offset;
00107     }
00108 
00109     virtual const char * getType(){ return RENAMEROBOTSTATEINWAREHOUSE; };
00110     virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00111 
00112   };
00113 
00114   class RenameRobotStateInWarehouse {
00115     public:
00116     typedef RenameRobotStateInWarehouseRequest Request;
00117     typedef RenameRobotStateInWarehouseResponse Response;
00118   };
00119 
00120 }
00121 #endif