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.
Dependencies: mbed
SparseOccupancyGridCell.h
00001 #ifndef _ROS_jsk_recognition_msgs_SparseOccupancyGridCell_h 00002 #define _ROS_jsk_recognition_msgs_SparseOccupancyGridCell_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 00009 namespace jsk_recognition_msgs 00010 { 00011 00012 class SparseOccupancyGridCell : public ros::Msg 00013 { 00014 public: 00015 typedef int32_t _row_index_type; 00016 _row_index_type row_index; 00017 typedef float _value_type; 00018 _value_type value; 00019 00020 SparseOccupancyGridCell(): 00021 row_index(0), 00022 value(0) 00023 { 00024 } 00025 00026 virtual int serialize(unsigned char *outbuffer) const 00027 { 00028 int offset = 0; 00029 union { 00030 int32_t real; 00031 uint32_t base; 00032 } u_row_index; 00033 u_row_index.real = this->row_index; 00034 *(outbuffer + offset + 0) = (u_row_index.base >> (8 * 0)) & 0xFF; 00035 *(outbuffer + offset + 1) = (u_row_index.base >> (8 * 1)) & 0xFF; 00036 *(outbuffer + offset + 2) = (u_row_index.base >> (8 * 2)) & 0xFF; 00037 *(outbuffer + offset + 3) = (u_row_index.base >> (8 * 3)) & 0xFF; 00038 offset += sizeof(this->row_index); 00039 union { 00040 float real; 00041 uint32_t base; 00042 } u_value; 00043 u_value.real = this->value; 00044 *(outbuffer + offset + 0) = (u_value.base >> (8 * 0)) & 0xFF; 00045 *(outbuffer + offset + 1) = (u_value.base >> (8 * 1)) & 0xFF; 00046 *(outbuffer + offset + 2) = (u_value.base >> (8 * 2)) & 0xFF; 00047 *(outbuffer + offset + 3) = (u_value.base >> (8 * 3)) & 0xFF; 00048 offset += sizeof(this->value); 00049 return offset; 00050 } 00051 00052 virtual int deserialize(unsigned char *inbuffer) 00053 { 00054 int offset = 0; 00055 union { 00056 int32_t real; 00057 uint32_t base; 00058 } u_row_index; 00059 u_row_index.base = 0; 00060 u_row_index.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00061 u_row_index.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00062 u_row_index.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00063 u_row_index.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00064 this->row_index = u_row_index.real; 00065 offset += sizeof(this->row_index); 00066 union { 00067 float real; 00068 uint32_t base; 00069 } u_value; 00070 u_value.base = 0; 00071 u_value.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00072 u_value.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00073 u_value.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00074 u_value.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00075 this->value = u_value.real; 00076 offset += sizeof(this->value); 00077 return offset; 00078 } 00079 00080 virtual const char * getType(){ return "jsk_recognition_msgs/SparseOccupancyGridCell"; }; 00081 virtual const char * getMD5(){ return "a5179e922852f82ee6322db1f097ab64"; }; 00082 00083 }; 00084 00085 } 00086 #endif
Generated on Mon Sep 26 2022 13:47:03 by
