GetLoggers.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_GetLoggers_h
00002 #define _ROS_SERVICE_GetLoggers_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 #include "roscpp/Logger.h"
00008 
00009 namespace roscpp
00010 {
00011 
00012 static const char GETLOGGERS[] = "roscpp/GetLoggers";
00013 
00014   class GetLoggersRequest : 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 GETLOGGERS; };
00031     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00032 
00033   };
00034 
00035   class GetLoggersResponse : public ros::Msg
00036   {
00037     public:
00038       uint8_t loggers_length;
00039       roscpp::Logger st_loggers;
00040       roscpp::Logger * loggers;
00041 
00042     virtual int serialize(unsigned char *outbuffer) const
00043     {
00044       int offset = 0;
00045       *(outbuffer + offset++) = loggers_length;
00046       *(outbuffer + offset++) = 0;
00047       *(outbuffer + offset++) = 0;
00048       *(outbuffer + offset++) = 0;
00049       for( uint8_t i = 0; i < loggers_length; i++){
00050       offset += this->loggers[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 loggers_lengthT = *(inbuffer + offset++);
00059       if(loggers_lengthT > loggers_length)
00060         this->loggers = (roscpp::Logger*)realloc(this->loggers, loggers_lengthT * sizeof(roscpp::Logger));
00061       offset += 3;
00062       loggers_length = loggers_lengthT;
00063       for( uint8_t i = 0; i < loggers_length; i++){
00064       offset += this->st_loggers.deserialize(inbuffer + offset);
00065         memcpy( &(this->loggers[i]), &(this->st_loggers), sizeof(roscpp::Logger));
00066       }
00067      return offset;
00068     }
00069 
00070     const char * getType(){ return GETLOGGERS; };
00071     const char * getMD5(){ return "32e97e85527d4678a8f9279894bb64b0"; };
00072 
00073   };
00074 
00075   class GetLoggers {
00076     public:
00077     typedef GetLoggersRequest Request;
00078     typedef GetLoggersResponse Response;
00079   };
00080 
00081 }
00082 #endif


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