catchrobo2022 mbed LPC1768 メインプログラム
Dependencies: mbed
TransformScreenpoint.h
00001 #ifndef _ROS_SERVICE_TransformScreenpoint_h 00002 #define _ROS_SERVICE_TransformScreenpoint_h 00003 #include <stdint.h> 00004 #include <string.h> 00005 #include <stdlib.h> 00006 #include "ros/msg.h" 00007 #include "std_msgs/Header.h" 00008 #include "geometry_msgs/Point.h" 00009 #include "geometry_msgs/Vector3.h" 00010 00011 namespace jsk_recognition_msgs 00012 { 00013 00014 static const char TRANSFORMSCREENPOINT[] = "jsk_recognition_msgs/TransformScreenpoint"; 00015 00016 class TransformScreenpointRequest : public ros::Msg 00017 { 00018 public: 00019 typedef float _x_type; 00020 _x_type x; 00021 typedef float _y_type; 00022 _y_type y; 00023 typedef bool _no_update_type; 00024 _no_update_type no_update; 00025 00026 TransformScreenpointRequest(): 00027 x(0), 00028 y(0), 00029 no_update(0) 00030 { 00031 } 00032 00033 virtual int serialize(unsigned char *outbuffer) const 00034 { 00035 int offset = 0; 00036 union { 00037 float real; 00038 uint32_t base; 00039 } u_x; 00040 u_x.real = this->x; 00041 *(outbuffer + offset + 0) = (u_x.base >> (8 * 0)) & 0xFF; 00042 *(outbuffer + offset + 1) = (u_x.base >> (8 * 1)) & 0xFF; 00043 *(outbuffer + offset + 2) = (u_x.base >> (8 * 2)) & 0xFF; 00044 *(outbuffer + offset + 3) = (u_x.base >> (8 * 3)) & 0xFF; 00045 offset += sizeof(this->x); 00046 union { 00047 float real; 00048 uint32_t base; 00049 } u_y; 00050 u_y.real = this->y; 00051 *(outbuffer + offset + 0) = (u_y.base >> (8 * 0)) & 0xFF; 00052 *(outbuffer + offset + 1) = (u_y.base >> (8 * 1)) & 0xFF; 00053 *(outbuffer + offset + 2) = (u_y.base >> (8 * 2)) & 0xFF; 00054 *(outbuffer + offset + 3) = (u_y.base >> (8 * 3)) & 0xFF; 00055 offset += sizeof(this->y); 00056 union { 00057 bool real; 00058 uint8_t base; 00059 } u_no_update; 00060 u_no_update.real = this->no_update; 00061 *(outbuffer + offset + 0) = (u_no_update.base >> (8 * 0)) & 0xFF; 00062 offset += sizeof(this->no_update); 00063 return offset; 00064 } 00065 00066 virtual int deserialize(unsigned char *inbuffer) 00067 { 00068 int offset = 0; 00069 union { 00070 float real; 00071 uint32_t base; 00072 } u_x; 00073 u_x.base = 0; 00074 u_x.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00075 u_x.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00076 u_x.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00077 u_x.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00078 this->x = u_x.real; 00079 offset += sizeof(this->x); 00080 union { 00081 float real; 00082 uint32_t base; 00083 } u_y; 00084 u_y.base = 0; 00085 u_y.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00086 u_y.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00087 u_y.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00088 u_y.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00089 this->y = u_y.real; 00090 offset += sizeof(this->y); 00091 union { 00092 bool real; 00093 uint8_t base; 00094 } u_no_update; 00095 u_no_update.base = 0; 00096 u_no_update.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00097 this->no_update = u_no_update.real; 00098 offset += sizeof(this->no_update); 00099 return offset; 00100 } 00101 00102 virtual const char * getType(){ return TRANSFORMSCREENPOINT; }; 00103 virtual const char * getMD5(){ return "3796b576f471dba594bd202be056132c"; }; 00104 00105 }; 00106 00107 class TransformScreenpointResponse : public ros::Msg 00108 { 00109 public: 00110 typedef std_msgs::Header _header_type; 00111 _header_type header; 00112 typedef geometry_msgs::Point _point_type; 00113 _point_type point; 00114 typedef geometry_msgs::Vector3 _vector_type; 00115 _vector_type vector; 00116 00117 TransformScreenpointResponse(): 00118 header(), 00119 point(), 00120 vector() 00121 { 00122 } 00123 00124 virtual int serialize(unsigned char *outbuffer) const 00125 { 00126 int offset = 0; 00127 offset += this->header.serialize(outbuffer + offset); 00128 offset += this->point.serialize(outbuffer + offset); 00129 offset += this->vector.serialize(outbuffer + offset); 00130 return offset; 00131 } 00132 00133 virtual int deserialize(unsigned char *inbuffer) 00134 { 00135 int offset = 0; 00136 offset += this->header.deserialize(inbuffer + offset); 00137 offset += this->point.deserialize(inbuffer + offset); 00138 offset += this->vector.deserialize(inbuffer + offset); 00139 return offset; 00140 } 00141 00142 virtual const char * getType(){ return TRANSFORMSCREENPOINT; }; 00143 virtual const char * getMD5(){ return "b4d4e89e36c63a48672ef02dabdec610"; }; 00144 00145 }; 00146 00147 class TransformScreenpoint { 00148 public: 00149 typedef TransformScreenpointRequest Request; 00150 typedef TransformScreenpointResponse Response; 00151 }; 00152 00153 } 00154 #endif
Generated on Mon Sep 26 2022 13:47:04 by
1.7.2