SetLoggerLevel.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_SetLoggerLevel_h
00002 #define _ROS_SERVICE_SetLoggerLevel_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace roscpp
00009 {
00010 
00011 static const char SETLOGGERLEVEL[] = "roscpp/SetLoggerLevel";
00012 
00013   class SetLoggerLevelRequest : public ros::Msg
00014   {
00015     public:
00016       char * logger;
00017       char * level;
00018 
00019     virtual int serialize(unsigned char *outbuffer) const
00020     {
00021       int offset = 0;
00022       uint32_t length_logger = strlen( (const char*) this->logger);
00023       memcpy(outbuffer + offset, &length_logger, sizeof(uint32_t));
00024       offset += 4;
00025       memcpy(outbuffer + offset, this->logger, length_logger);
00026       offset += length_logger;
00027       uint32_t length_level = strlen( (const char*) this->level);
00028       memcpy(outbuffer + offset, &length_level, sizeof(uint32_t));
00029       offset += 4;
00030       memcpy(outbuffer + offset, this->level, length_level);
00031       offset += length_level;
00032       return offset;
00033     }
00034 
00035     virtual int deserialize(unsigned char *inbuffer)
00036     {
00037       int offset = 0;
00038       uint32_t length_logger;
00039       memcpy(&length_logger, (inbuffer + offset), sizeof(uint32_t));
00040       offset += 4;
00041       for(unsigned int k= offset; k< offset+length_logger; ++k){
00042           inbuffer[k-1]=inbuffer[k];
00043       }
00044       inbuffer[offset+length_logger-1]=0;
00045       this->logger = (char *)(inbuffer + offset-1);
00046       offset += length_logger;
00047       uint32_t length_level;
00048       memcpy(&length_level, (inbuffer + offset), sizeof(uint32_t));
00049       offset += 4;
00050       for(unsigned int k= offset; k< offset+length_level; ++k){
00051           inbuffer[k-1]=inbuffer[k];
00052       }
00053       inbuffer[offset+length_level-1]=0;
00054       this->level = (char *)(inbuffer + offset-1);
00055       offset += length_level;
00056      return offset;
00057     }
00058 
00059     const char * getType(){ return SETLOGGERLEVEL; };
00060     const char * getMD5(){ return "51da076440d78ca1684d36c868df61ea"; };
00061 
00062   };
00063 
00064   class SetLoggerLevelResponse : public ros::Msg
00065   {
00066     public:
00067 
00068     virtual int serialize(unsigned char *outbuffer) const
00069     {
00070       int offset = 0;
00071       return offset;
00072     }
00073 
00074     virtual int deserialize(unsigned char *inbuffer)
00075     {
00076       int offset = 0;
00077      return offset;
00078     }
00079 
00080     const char * getType(){ return SETLOGGERLEVEL; };
00081     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00082 
00083   };
00084 
00085   class SetLoggerLevel {
00086     public:
00087     typedef SetLoggerLevelRequest Request;
00088     typedef SetLoggerLevelResponse Response;
00089   };
00090 
00091 }
00092 #endif


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