00001 #ifndef _ROS_hector_mapping_HectorDebugInfo_h 00002 #define _ROS_hector_mapping_HectorDebugInfo_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "hector_mapping/HectorIterData.h" 00009 00010 namespace hector_mapping 00011 { 00012 00013 class HectorDebugInfo : public ros::Msg 00014 { 00015 public: 00016 uint8_t iterData_length; 00017 hector_mapping::HectorIterData st_iterData; 00018 hector_mapping::HectorIterData * iterData; 00019 00020 virtual int serialize(unsigned char *outbuffer) const 00021 { 00022 int offset = 0; 00023 *(outbuffer + offset++) = iterData_length; 00024 *(outbuffer + offset++) = 0; 00025 *(outbuffer + offset++) = 0; 00026 *(outbuffer + offset++) = 0; 00027 for( uint8_t i = 0; i < iterData_length; i++){ 00028 offset += this->iterData[i].serialize(outbuffer + offset); 00029 } 00030 return offset; 00031 } 00032 00033 virtual int deserialize(unsigned char *inbuffer) 00034 { 00035 int offset = 0; 00036 uint8_t iterData_lengthT = *(inbuffer + offset++); 00037 if(iterData_lengthT > iterData_length) 00038 this->iterData = (hector_mapping::HectorIterData*)realloc(this->iterData, iterData_lengthT * sizeof(hector_mapping::HectorIterData)); 00039 offset += 3; 00040 iterData_length = iterData_lengthT; 00041 for( uint8_t i = 0; i < iterData_length; i++){ 00042 offset += this->st_iterData.deserialize(inbuffer + offset); 00043 memcpy( &(this->iterData[i]), &(this->st_iterData), sizeof(hector_mapping::HectorIterData)); 00044 } 00045 return offset; 00046 } 00047 00048 const char * getType(){ return "hector_mapping/HectorDebugInfo"; }; 00049 const char * getMD5(){ return "4d33c0696c0c536f5c1447c260756674"; }; 00050 00051 }; 00052 00053 } 00054 #endif