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
RotatedRect.h
00001 #ifndef _ROS_jsk_recognition_msgs_RotatedRect_h 00002 #define _ROS_jsk_recognition_msgs_RotatedRect_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 RotatedRect : public ros::Msg 00013 { 00014 public: 00015 typedef double _x_type; 00016 _x_type x; 00017 typedef double _y_type; 00018 _y_type y; 00019 typedef double _width_type; 00020 _width_type width; 00021 typedef double _height_type; 00022 _height_type height; 00023 typedef double _angle_type; 00024 _angle_type angle; 00025 00026 RotatedRect(): 00027 x(0), 00028 y(0), 00029 width(0), 00030 height(0), 00031 angle(0) 00032 { 00033 } 00034 00035 virtual int serialize(unsigned char *outbuffer) const 00036 { 00037 int offset = 0; 00038 union { 00039 double real; 00040 uint64_t base; 00041 } u_x; 00042 u_x.real = this->x; 00043 *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; 00044 *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; 00045 *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; 00046 *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; 00047 *(outbuffer + offset + 4) = (u_x.base >> (8 * 4)) & 0xFF; 00048 *(outbuffer + offset + 5) = (u_x.base >> (8 * 5)) & 0xFF; 00049 *(outbuffer + offset + 6) = (u_x.base >> (8 * 6)) & 0xFF; 00050 *(outbuffer + offset + 7) = (u_x.base >> (8 * 7)) & 0xFF; 00051 offset += sizeof(this->x); 00052 union { 00053 double real; 00054 uint64_t base; 00055 } u_y; 00056 u_y.real = this->y; 00057 *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; 00058 *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; 00059 *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; 00060 *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; 00061 *(outbuffer + offset + 4) = (u_y.base >> (8 * 4)) & 0xFF; 00062 *(outbuffer + offset + 5) = (u_y.base >> (8 * 5)) & 0xFF; 00063 *(outbuffer + offset + 6) = (u_y.base >> (8 * 6)) & 0xFF; 00064 *(outbuffer + offset + 7) = (u_y.base >> (8 * 7)) & 0xFF; 00065 offset += sizeof(this->y); 00066 union { 00067 double real; 00068 uint64_t base; 00069 } u_width; 00070 u_width.real = this->width; 00071 *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF; 00072 *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF; 00073 *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF; 00074 *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF; 00075 *(outbuffer + offset + 4) = (u_width.base >> (8 * 4)) & 0xFF; 00076 *(outbuffer + offset + 5) = (u_width.base >> (8 * 5)) & 0xFF; 00077 *(outbuffer + offset + 6) = (u_width.base >> (8 * 6)) & 0xFF; 00078 *(outbuffer + offset + 7) = (u_width.base >> (8 * 7)) & 0xFF; 00079 offset += sizeof(this->width); 00080 union { 00081 double real; 00082 uint64_t base; 00083 } u_height; 00084 u_height.real = this->height; 00085 *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF; 00086 *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF; 00087 *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF; 00088 *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF; 00089 *(outbuffer + offset + 4) = (u_height.base >> (8 * 4)) & 0xFF; 00090 *(outbuffer + offset + 5) = (u_height.base >> (8 * 5)) & 0xFF; 00091 *(outbuffer + offset + 6) = (u_height.base >> (8 * 6)) & 0xFF; 00092 *(outbuffer + offset + 7) = (u_height.base >> (8 * 7)) & 0xFF; 00093 offset += sizeof(this->height); 00094 union { 00095 double real; 00096 uint64_t base; 00097 } u_angle; 00098 u_angle.real = this->angle; 00099 *(outbuffer + offset + 0) = (u_angle.base >> (8 * 0)) & 0xFF; 00100 *(outbuffer + offset + 1) = (u_angle.base >> (8 * 1)) & 0xFF; 00101 *(outbuffer + offset + 2) = (u_angle.base >> (8 * 2)) & 0xFF; 00102 *(outbuffer + offset + 3) = (u_angle.base >> (8 * 3)) & 0xFF; 00103 *(outbuffer + offset + 4) = (u_angle.base >> (8 * 4)) & 0xFF; 00104 *(outbuffer + offset + 5) = (u_angle.base >> (8 * 5)) & 0xFF; 00105 *(outbuffer + offset + 6) = (u_angle.base >> (8 * 6)) & 0xFF; 00106 *(outbuffer + offset + 7) = (u_angle.base >> (8 * 7)) & 0xFF; 00107 offset += sizeof(this->angle); 00108 return offset; 00109 } 00110 00111 virtual int deserialize(unsigned char *inbuffer) 00112 { 00113 int offset = 0; 00114 union { 00115 double real; 00116 uint64_t base; 00117 } u_x; 00118 u_x.base = 0; 00119 u_x.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00120 u_x.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00121 u_x.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00122 u_x.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00123 u_x.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00124 u_x.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00125 u_x.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00126 u_x.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00127 this->x = u_x.real; 00128 offset += sizeof(this->x); 00129 union { 00130 double real; 00131 uint64_t base; 00132 } u_y; 00133 u_y.base = 0; 00134 u_y.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00135 u_y.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00136 u_y.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00137 u_y.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00138 u_y.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00139 u_y.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00140 u_y.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00141 u_y.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00142 this->y = u_y.real; 00143 offset += sizeof(this->y); 00144 union { 00145 double real; 00146 uint64_t base; 00147 } u_width; 00148 u_width.base = 0; 00149 u_width.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00150 u_width.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00151 u_width.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00152 u_width.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00153 u_width.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00154 u_width.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00155 u_width.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00156 u_width.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00157 this->width = u_width.real; 00158 offset += sizeof(this->width); 00159 union { 00160 double real; 00161 uint64_t base; 00162 } u_height; 00163 u_height.base = 0; 00164 u_height.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00165 u_height.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00166 u_height.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00167 u_height.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00168 u_height.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00169 u_height.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00170 u_height.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00171 u_height.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00172 this->height = u_height.real; 00173 offset += sizeof(this->height); 00174 union { 00175 double real; 00176 uint64_t base; 00177 } u_angle; 00178 u_angle.base = 0; 00179 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00180 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00181 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00182 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00183 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00184 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00185 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00186 u_angle.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00187 this->angle = u_angle.real; 00188 offset += sizeof(this->angle); 00189 return offset; 00190 } 00191 00192 virtual const char * getType(){ return "jsk_recognition_msgs/RotatedRect"; }; 00193 virtual const char * getMD5(){ return "e970c93bbd35a570f7d9acc8228e9280"; }; 00194 00195 }; 00196 00197 } 00198 #endif
Generated on Mon Sep 26 2022 13:47:03 by
