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
Line.h
00001 #ifndef _ROS_jsk_recognition_msgs_Line_h 00002 #define _ROS_jsk_recognition_msgs_Line_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 Line : public ros::Msg 00013 { 00014 public: 00015 typedef double _x1_type; 00016 _x1_type x1; 00017 typedef double _y1_type; 00018 _y1_type y1; 00019 typedef double _x2_type; 00020 _x2_type x2; 00021 typedef double _y2_type; 00022 _y2_type y2; 00023 00024 Line(): 00025 x1(0), 00026 y1(0), 00027 x2(0), 00028 y2(0) 00029 { 00030 } 00031 00032 virtual int serialize(unsigned char *outbuffer) const 00033 { 00034 int offset = 0; 00035 union { 00036 double real; 00037 uint64_t base; 00038 } u_x1; 00039 u_x1.real = this->x1; 00040 *(outbuffer + offset + 0) = (u_x1.base >> (8 * 0)) & 0xFF; 00041 *(outbuffer + offset + 1) = (u_x1.base >> (8 * 1)) & 0xFF; 00042 *(outbuffer + offset + 2) = (u_x1.base >> (8 * 2)) & 0xFF; 00043 *(outbuffer + offset + 3) = (u_x1.base >> (8 * 3)) & 0xFF; 00044 *(outbuffer + offset + 4) = (u_x1.base >> (8 * 4)) & 0xFF; 00045 *(outbuffer + offset + 5) = (u_x1.base >> (8 * 5)) & 0xFF; 00046 *(outbuffer + offset + 6) = (u_x1.base >> (8 * 6)) & 0xFF; 00047 *(outbuffer + offset + 7) = (u_x1.base >> (8 * 7)) & 0xFF; 00048 offset += sizeof(this->x1); 00049 union { 00050 double real; 00051 uint64_t base; 00052 } u_y1; 00053 u_y1.real = this->y1; 00054 *(outbuffer + offset + 0) = (u_y1.base >> (8 * 0)) & 0xFF; 00055 *(outbuffer + offset + 1) = (u_y1.base >> (8 * 1)) & 0xFF; 00056 *(outbuffer + offset + 2) = (u_y1.base >> (8 * 2)) & 0xFF; 00057 *(outbuffer + offset + 3) = (u_y1.base >> (8 * 3)) & 0xFF; 00058 *(outbuffer + offset + 4) = (u_y1.base >> (8 * 4)) & 0xFF; 00059 *(outbuffer + offset + 5) = (u_y1.base >> (8 * 5)) & 0xFF; 00060 *(outbuffer + offset + 6) = (u_y1.base >> (8 * 6)) & 0xFF; 00061 *(outbuffer + offset + 7) = (u_y1.base >> (8 * 7)) & 0xFF; 00062 offset += sizeof(this->y1); 00063 union { 00064 double real; 00065 uint64_t base; 00066 } u_x2; 00067 u_x2.real = this->x2; 00068 *(outbuffer + offset + 0) = (u_x2.base >> (8 * 0)) & 0xFF; 00069 *(outbuffer + offset + 1) = (u_x2.base >> (8 * 1)) & 0xFF; 00070 *(outbuffer + offset + 2) = (u_x2.base >> (8 * 2)) & 0xFF; 00071 *(outbuffer + offset + 3) = (u_x2.base >> (8 * 3)) & 0xFF; 00072 *(outbuffer + offset + 4) = (u_x2.base >> (8 * 4)) & 0xFF; 00073 *(outbuffer + offset + 5) = (u_x2.base >> (8 * 5)) & 0xFF; 00074 *(outbuffer + offset + 6) = (u_x2.base >> (8 * 6)) & 0xFF; 00075 *(outbuffer + offset + 7) = (u_x2.base >> (8 * 7)) & 0xFF; 00076 offset += sizeof(this->x2); 00077 union { 00078 double real; 00079 uint64_t base; 00080 } u_y2; 00081 u_y2.real = this->y2; 00082 *(outbuffer + offset + 0) = (u_y2.base >> (8 * 0)) & 0xFF; 00083 *(outbuffer + offset + 1) = (u_y2.base >> (8 * 1)) & 0xFF; 00084 *(outbuffer + offset + 2) = (u_y2.base >> (8 * 2)) & 0xFF; 00085 *(outbuffer + offset + 3) = (u_y2.base >> (8 * 3)) & 0xFF; 00086 *(outbuffer + offset + 4) = (u_y2.base >> (8 * 4)) & 0xFF; 00087 *(outbuffer + offset + 5) = (u_y2.base >> (8 * 5)) & 0xFF; 00088 *(outbuffer + offset + 6) = (u_y2.base >> (8 * 6)) & 0xFF; 00089 *(outbuffer + offset + 7) = (u_y2.base >> (8 * 7)) & 0xFF; 00090 offset += sizeof(this->y2); 00091 return offset; 00092 } 00093 00094 virtual int deserialize(unsigned char *inbuffer) 00095 { 00096 int offset = 0; 00097 union { 00098 double real; 00099 uint64_t base; 00100 } u_x1; 00101 u_x1.base = 0; 00102 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00103 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00104 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00105 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00106 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00107 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00108 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00109 u_x1.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00110 this->x1 = u_x1.real; 00111 offset += sizeof(this->x1); 00112 union { 00113 double real; 00114 uint64_t base; 00115 } u_y1; 00116 u_y1.base = 0; 00117 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00118 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00119 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00120 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00121 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00122 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00123 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00124 u_y1.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00125 this->y1 = u_y1.real; 00126 offset += sizeof(this->y1); 00127 union { 00128 double real; 00129 uint64_t base; 00130 } u_x2; 00131 u_x2.base = 0; 00132 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00133 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00134 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00135 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00136 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00137 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00138 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00139 u_x2.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00140 this->x2 = u_x2.real; 00141 offset += sizeof(this->x2); 00142 union { 00143 double real; 00144 uint64_t base; 00145 } u_y2; 00146 u_y2.base = 0; 00147 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00148 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00149 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00150 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00151 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00152 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00153 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00154 u_y2.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00155 this->y2 = u_y2.real; 00156 offset += sizeof(this->y2); 00157 return offset; 00158 } 00159 00160 virtual const char * getType(){ return "jsk_recognition_msgs/Line"; }; 00161 virtual const char * getMD5(){ return "3010fad09b09b8d3fdecdd94d144f7a1"; }; 00162 00163 }; 00164 00165 } 00166 #endif
Generated on Mon Sep 26 2022 13:47:01 by
