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
WhiteBalancePoints.h
00001 #ifndef _ROS_SERVICE_WhiteBalancePoints_h 00002 #define _ROS_SERVICE_WhiteBalancePoints_h 00003 #include <stdint.h> 00004 #include <string.h> 00005 #include <stdlib.h> 00006 #include "ros/msg.h" 00007 #include "sensor_msgs/PointCloud2.h" 00008 00009 namespace jsk_recognition_msgs 00010 { 00011 00012 static const char WHITEBALANCEPOINTS[] = "jsk_recognition_msgs/WhiteBalancePoints"; 00013 00014 class WhiteBalancePointsRequest : public ros::Msg 00015 { 00016 public: 00017 float reference_color[3]; 00018 typedef sensor_msgs::PointCloud2 _input_type; 00019 _input_type input; 00020 00021 WhiteBalancePointsRequest(): 00022 reference_color(), 00023 input() 00024 { 00025 } 00026 00027 virtual int serialize(unsigned char *outbuffer) const 00028 { 00029 int offset = 0; 00030 for( uint32_t i = 0; i < 3; i++){ 00031 union { 00032 float real; 00033 uint32_t base; 00034 } u_reference_colori; 00035 u_reference_colori.real = this->reference_color[i]; 00036 *(outbuffer + offset + 0) = (u_reference_colori.base >> (8 * 0)) & 0xFF; 00037 *(outbuffer + offset + 1) = (u_reference_colori.base >> (8 * 1)) & 0xFF; 00038 *(outbuffer + offset + 2) = (u_reference_colori.base >> (8 * 2)) & 0xFF; 00039 *(outbuffer + offset + 3) = (u_reference_colori.base >> (8 * 3)) & 0xFF; 00040 offset += sizeof(this->reference_color[i]); 00041 } 00042 offset += this->input.serialize(outbuffer + offset); 00043 return offset; 00044 } 00045 00046 virtual int deserialize(unsigned char *inbuffer) 00047 { 00048 int offset = 0; 00049 for( uint32_t i = 0; i < 3; i++){ 00050 union { 00051 float real; 00052 uint32_t base; 00053 } u_reference_colori; 00054 u_reference_colori.base = 0; 00055 u_reference_colori.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00056 u_reference_colori.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00057 u_reference_colori.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00058 u_reference_colori.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00059 this->reference_color[i] = u_reference_colori.real; 00060 offset += sizeof(this->reference_color[i]); 00061 } 00062 offset += this->input.deserialize(inbuffer + offset); 00063 return offset; 00064 } 00065 00066 virtual const char * getType(){ return WHITEBALANCEPOINTS; }; 00067 virtual const char * getMD5(){ return "c114e8c81fa040c23390d86cd0cb8e3a"; }; 00068 00069 }; 00070 00071 class WhiteBalancePointsResponse : public ros::Msg 00072 { 00073 public: 00074 typedef sensor_msgs::PointCloud2 _output_type; 00075 _output_type output; 00076 00077 WhiteBalancePointsResponse(): 00078 output() 00079 { 00080 } 00081 00082 virtual int serialize(unsigned char *outbuffer) const 00083 { 00084 int offset = 0; 00085 offset += this->output.serialize(outbuffer + offset); 00086 return offset; 00087 } 00088 00089 virtual int deserialize(unsigned char *inbuffer) 00090 { 00091 int offset = 0; 00092 offset += this->output.deserialize(inbuffer + offset); 00093 return offset; 00094 } 00095 00096 virtual const char * getType(){ return WHITEBALANCEPOINTS; }; 00097 virtual const char * getMD5(){ return "6db5ac8d8316fdb3e0c62197115f87cd"; }; 00098 00099 }; 00100 00101 class WhiteBalancePoints { 00102 public: 00103 typedef WhiteBalancePointsRequest Request; 00104 typedef WhiteBalancePointsResponse Response; 00105 }; 00106 00107 } 00108 #endif
Generated on Mon Sep 26 2022 13:47:04 by
