Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: rosserial_mbed_hello_world_publisher rtos_base_control rosserial_mbed_F64MA ROS-RTOS ... more
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 uint8_t loggers_length; 00043 roscpp::Logger st_loggers; 00044 roscpp::Logger * loggers; 00045 00046 GetLoggersResponse(): 00047 loggers_length(0), loggers(NULL) 00048 { 00049 } 00050 00051 virtual int serialize(unsigned char *outbuffer) const 00052 { 00053 int offset = 0; 00054 *(outbuffer + offset++) = loggers_length; 00055 *(outbuffer + offset++) = 0; 00056 *(outbuffer + offset++) = 0; 00057 *(outbuffer + offset++) = 0; 00058 for( uint8_t i = 0; i < loggers_length; i++){ 00059 offset += this->loggers[i].serialize(outbuffer + offset); 00060 } 00061 return offset; 00062 } 00063 00064 virtual int deserialize(unsigned char *inbuffer) 00065 { 00066 int offset = 0; 00067 uint8_t loggers_lengthT = *(inbuffer + offset++); 00068 if(loggers_lengthT > loggers_length) 00069 this->loggers = (roscpp::Logger*)realloc(this->loggers, loggers_lengthT * sizeof(roscpp::Logger)); 00070 offset += 3; 00071 loggers_length = loggers_lengthT; 00072 for( uint8_t i = 0; i < loggers_length; i++){ 00073 offset += this->st_loggers.deserialize(inbuffer + offset); 00074 memcpy( &(this->loggers[i]), &(this->st_loggers), sizeof(roscpp::Logger)); 00075 } 00076 return offset; 00077 } 00078 00079 const char * getType(){ return GETLOGGERS; }; 00080 const char * getMD5(){ return "32e97e85527d4678a8f9279894bb64b0"; }; 00081 00082 }; 00083 00084 class GetLoggers { 00085 public: 00086 typedef GetLoggersRequest Request; 00087 typedef GetLoggersResponse Response; 00088 }; 00089 00090 } 00091 #endif
Generated on Tue Jul 12 2022 18:39:39 by
1.7.2