Just changed OUTPUT_SIZE and INPUT_SIZE in ros/node_handle.h
Dependents: WRS2020_mecanum_node
GetLoggers.h
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 GetLoggersRequest() 00019 { 00020 } 00021 00022 virtual int serialize(unsigned char *outbuffer) const 00023 { 00024 int offset = 0; 00025 return offset; 00026 } 00027 00028 virtual int deserialize(unsigned char *inbuffer) 00029 { 00030 int offset = 0; 00031 return offset; 00032 } 00033 00034 const char * getType(){ return GETLOGGERS; }; 00035 const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; 00036 00037 }; 00038 00039 class GetLoggersResponse : public ros::Msg 00040 { 00041 public: 00042 uint32_t loggers_length; 00043 typedef roscpp::Logger _loggers_type; 00044 _loggers_type st_loggers; 00045 _loggers_type * loggers; 00046 00047 GetLoggersResponse(): 00048 loggers_length(0), loggers(NULL) 00049 { 00050 } 00051 00052 virtual int serialize(unsigned char *outbuffer) const 00053 { 00054 int offset = 0; 00055 *(outbuffer + offset + 0) = (this->loggers_length >> (8 * 0)) & 0xFF; 00056 *(outbuffer + offset + 1) = (this->loggers_length >> (8 * 1)) & 0xFF; 00057 *(outbuffer + offset + 2) = (this->loggers_length >> (8 * 2)) & 0xFF; 00058 *(outbuffer + offset + 3) = (this->loggers_length >> (8 * 3)) & 0xFF; 00059 offset += sizeof(this->loggers_length); 00060 for( uint32_t i = 0; i < loggers_length; i++){ 00061 offset += this->loggers[i].serialize(outbuffer + offset); 00062 } 00063 return offset; 00064 } 00065 00066 virtual int deserialize(unsigned char *inbuffer) 00067 { 00068 int offset = 0; 00069 uint32_t loggers_lengthT = ((uint32_t) (*(inbuffer + offset))); 00070 loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00071 loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00072 loggers_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00073 offset += sizeof(this->loggers_length); 00074 if(loggers_lengthT > loggers_length) 00075 this->loggers = (roscpp::Logger*)realloc(this->loggers, loggers_lengthT * sizeof(roscpp::Logger)); 00076 loggers_length = loggers_lengthT; 00077 for( uint32_t i = 0; i < loggers_length; i++){ 00078 offset += this->st_loggers.deserialize(inbuffer + offset); 00079 memcpy( &(this->loggers[i]), &(this->st_loggers), sizeof(roscpp::Logger)); 00080 } 00081 return offset; 00082 } 00083 00084 const char * getType(){ return GETLOGGERS; }; 00085 const char * getMD5(){ return "32e97e85527d4678a8f9279894bb64b0"; }; 00086 00087 }; 00088 00089 class GetLoggers { 00090 public: 00091 typedef GetLoggersRequest Request; 00092 typedef GetLoggersResponse Response; 00093 }; 00094 00095 } 00096 #endif
Generated on Tue Jul 12 2022 18:49:18 by 1.7.2