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
HistogramWithRangeBin.h
00001 #ifndef _ROS_jsk_recognition_msgs_HistogramWithRangeBin_h 00002 #define _ROS_jsk_recognition_msgs_HistogramWithRangeBin_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 HistogramWithRangeBin : public ros::Msg 00013 { 00014 public: 00015 typedef double _min_value_type; 00016 _min_value_type min_value; 00017 typedef double _max_value_type; 00018 _max_value_type max_value; 00019 typedef uint32_t _count_type; 00020 _count_type count; 00021 00022 HistogramWithRangeBin(): 00023 min_value(0), 00024 max_value(0), 00025 count(0) 00026 { 00027 } 00028 00029 virtual int serialize(unsigned char *outbuffer) const 00030 { 00031 int offset = 0; 00032 union { 00033 double real; 00034 uint64_t base; 00035 } u_min_value; 00036 u_min_value.real = this->min_value; 00037 *(outbuffer + offset + 0) = (u_min_value.base >> (8 * 0)) & 0xFF; 00038 *(outbuffer + offset + 1) = (u_min_value.base >> (8 * 1)) & 0xFF; 00039 *(outbuffer + offset + 2) = (u_min_value.base >> (8 * 2)) & 0xFF; 00040 *(outbuffer + offset + 3) = (u_min_value.base >> (8 * 3)) & 0xFF; 00041 *(outbuffer + offset + 4) = (u_min_value.base >> (8 * 4)) & 0xFF; 00042 *(outbuffer + offset + 5) = (u_min_value.base >> (8 * 5)) & 0xFF; 00043 *(outbuffer + offset + 6) = (u_min_value.base >> (8 * 6)) & 0xFF; 00044 *(outbuffer + offset + 7) = (u_min_value.base >> (8 * 7)) & 0xFF; 00045 offset += sizeof(this->min_value); 00046 union { 00047 double real; 00048 uint64_t base; 00049 } u_max_value; 00050 u_max_value.real = this->max_value; 00051 *(outbuffer + offset + 0) = (u_max_value.base >> (8 * 0)) & 0xFF; 00052 *(outbuffer + offset + 1) = (u_max_value.base >> (8 * 1)) & 0xFF; 00053 *(outbuffer + offset + 2) = (u_max_value.base >> (8 * 2)) & 0xFF; 00054 *(outbuffer + offset + 3) = (u_max_value.base >> (8 * 3)) & 0xFF; 00055 *(outbuffer + offset + 4) = (u_max_value.base >> (8 * 4)) & 0xFF; 00056 *(outbuffer + offset + 5) = (u_max_value.base >> (8 * 5)) & 0xFF; 00057 *(outbuffer + offset + 6) = (u_max_value.base >> (8 * 6)) & 0xFF; 00058 *(outbuffer + offset + 7) = (u_max_value.base >> (8 * 7)) & 0xFF; 00059 offset += sizeof(this->max_value); 00060 *(outbuffer + offset + 0) = (this->count >> (8 * 0)) & 0xFF; 00061 *(outbuffer + offset + 1) = (this->count >> (8 * 1)) & 0xFF; 00062 *(outbuffer + offset + 2) = (this->count >> (8 * 2)) & 0xFF; 00063 *(outbuffer + offset + 3) = (this->count >> (8 * 3)) & 0xFF; 00064 offset += sizeof(this->count); 00065 return offset; 00066 } 00067 00068 virtual int deserialize(unsigned char *inbuffer) 00069 { 00070 int offset = 0; 00071 union { 00072 double real; 00073 uint64_t base; 00074 } u_min_value; 00075 u_min_value.base = 0; 00076 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00077 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00078 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00079 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00080 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00081 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00082 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00083 u_min_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00084 this->min_value = u_min_value.real; 00085 offset += sizeof(this->min_value); 00086 union { 00087 double real; 00088 uint64_t base; 00089 } u_max_value; 00090 u_max_value.base = 0; 00091 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00092 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00093 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00094 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00095 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00096 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00097 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00098 u_max_value.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00099 this->max_value = u_max_value.real; 00100 offset += sizeof(this->max_value); 00101 this->count = ((uint32_t) (*(inbuffer + offset))); 00102 this->count |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00103 this->count |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00104 this->count |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00105 offset += sizeof(this->count); 00106 return offset; 00107 } 00108 00109 virtual const char * getType(){ return "jsk_recognition_msgs/HistogramWithRangeBin"; }; 00110 virtual const char * getMD5(){ return "a7fe6c3021fcba2c6357f3db21601551"; }; 00111 00112 }; 00113 00114 } 00115 #endif
Generated on Mon Sep 26 2022 13:47:01 by
