ListControllers.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_ListControllers_h
00002 #define _ROS_SERVICE_ListControllers_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 #include "controller_manager_msgs/ControllerState.h"
00008 
00009 namespace controller_manager_msgs
00010 {
00011 
00012 static const char LISTCONTROLLERS[] = "controller_manager_msgs/ListControllers";
00013 
00014   class ListControllersRequest : public ros::Msg
00015   {
00016     public:
00017 
00018     virtual int serialize(unsigned char *outbuffer) const
00019     {
00020       int offset = 0;
00021       return offset;
00022     }
00023 
00024     virtual int deserialize(unsigned char *inbuffer)
00025     {
00026       int offset = 0;
00027      return offset;
00028     }
00029 
00030     const char * getType(){ return LISTCONTROLLERS; };
00031     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00032 
00033   };
00034 
00035   class ListControllersResponse : public ros::Msg
00036   {
00037     public:
00038       uint8_t controller_length;
00039       controller_manager_msgs::ControllerState st_controller;
00040       controller_manager_msgs::ControllerState * controller;
00041 
00042     virtual int serialize(unsigned char *outbuffer) const
00043     {
00044       int offset = 0;
00045       *(outbuffer + offset++) = controller_length;
00046       *(outbuffer + offset++) = 0;
00047       *(outbuffer + offset++) = 0;
00048       *(outbuffer + offset++) = 0;
00049       for( uint8_t i = 0; i < controller_length; i++){
00050       offset += this->controller[i].serialize(outbuffer + offset);
00051       }
00052       return offset;
00053     }
00054 
00055     virtual int deserialize(unsigned char *inbuffer)
00056     {
00057       int offset = 0;
00058       uint8_t controller_lengthT = *(inbuffer + offset++);
00059       if(controller_lengthT > controller_length)
00060         this->controller = (controller_manager_msgs::ControllerState*)realloc(this->controller, controller_lengthT * sizeof(controller_manager_msgs::ControllerState));
00061       offset += 3;
00062       controller_length = controller_lengthT;
00063       for( uint8_t i = 0; i < controller_length; i++){
00064       offset += this->st_controller.deserialize(inbuffer + offset);
00065         memcpy( &(this->controller[i]), &(this->st_controller), sizeof(controller_manager_msgs::ControllerState));
00066       }
00067      return offset;
00068     }
00069 
00070     const char * getType(){ return LISTCONTROLLERS; };
00071     const char * getMD5(){ return "12c85fca1984c8ec86264f3d00b938f2"; };
00072 
00073   };
00074 
00075   class ListControllers {
00076     public:
00077     typedef ListControllersRequest Request;
00078     typedef ListControllersResponse Response;
00079   };
00080 
00081 }
00082 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Thu Aug 27 2015 14:39:49