Increased buffer size
Fork of ros_lib_kinetic by
Embed:
(wiki syntax)
Show/hide line numbers
LookupTransformGoal.h
00001 #ifndef _ROS_tf2_msgs_LookupTransformGoal_h 00002 #define _ROS_tf2_msgs_LookupTransformGoal_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "ros/time.h" 00009 #include "ros/duration.h" 00010 00011 namespace tf2_msgs 00012 { 00013 00014 class LookupTransformGoal : public ros::Msg 00015 { 00016 public: 00017 typedef const char* _target_frame_type; 00018 _target_frame_type target_frame; 00019 typedef const char* _source_frame_type; 00020 _source_frame_type source_frame; 00021 typedef ros::Time _source_time_type; 00022 _source_time_type source_time; 00023 typedef ros::Duration _timeout_type; 00024 _timeout_type timeout; 00025 typedef ros::Time _target_time_type; 00026 _target_time_type target_time; 00027 typedef const char* _fixed_frame_type; 00028 _fixed_frame_type fixed_frame; 00029 typedef bool _advanced_type; 00030 _advanced_type advanced; 00031 00032 LookupTransformGoal(): 00033 target_frame(""), 00034 source_frame(""), 00035 source_time(), 00036 timeout(), 00037 target_time(), 00038 fixed_frame(""), 00039 advanced(0) 00040 { 00041 } 00042 00043 virtual int serialize(unsigned char *outbuffer) const 00044 { 00045 int offset = 0; 00046 uint32_t length_target_frame = strlen(this->target_frame); 00047 varToArr(outbuffer + offset, length_target_frame); 00048 offset += 4; 00049 memcpy(outbuffer + offset, this->target_frame, length_target_frame); 00050 offset += length_target_frame; 00051 uint32_t length_source_frame = strlen(this->source_frame); 00052 varToArr(outbuffer + offset, length_source_frame); 00053 offset += 4; 00054 memcpy(outbuffer + offset, this->source_frame, length_source_frame); 00055 offset += length_source_frame; 00056 *(outbuffer + offset + 0) = (this->source_time.sec >> (8 * 0)) & 0xFF; 00057 *(outbuffer + offset + 1) = (this->source_time.sec >> (8 * 1)) & 0xFF; 00058 *(outbuffer + offset + 2) = (this->source_time.sec >> (8 * 2)) & 0xFF; 00059 *(outbuffer + offset + 3) = (this->source_time.sec >> (8 * 3)) & 0xFF; 00060 offset += sizeof(this->source_time.sec); 00061 *(outbuffer + offset + 0) = (this->source_time.nsec >> (8 * 0)) & 0xFF; 00062 *(outbuffer + offset + 1) = (this->source_time.nsec >> (8 * 1)) & 0xFF; 00063 *(outbuffer + offset + 2) = (this->source_time.nsec >> (8 * 2)) & 0xFF; 00064 *(outbuffer + offset + 3) = (this->source_time.nsec >> (8 * 3)) & 0xFF; 00065 offset += sizeof(this->source_time.nsec); 00066 *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF; 00067 *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF; 00068 *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF; 00069 *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF; 00070 offset += sizeof(this->timeout.sec); 00071 *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF; 00072 *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF; 00073 *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF; 00074 *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF; 00075 offset += sizeof(this->timeout.nsec); 00076 *(outbuffer + offset + 0) = (this->target_time.sec >> (8 * 0)) & 0xFF; 00077 *(outbuffer + offset + 1) = (this->target_time.sec >> (8 * 1)) & 0xFF; 00078 *(outbuffer + offset + 2) = (this->target_time.sec >> (8 * 2)) & 0xFF; 00079 *(outbuffer + offset + 3) = (this->target_time.sec >> (8 * 3)) & 0xFF; 00080 offset += sizeof(this->target_time.sec); 00081 *(outbuffer + offset + 0) = (this->target_time.nsec >> (8 * 0)) & 0xFF; 00082 *(outbuffer + offset + 1) = (this->target_time.nsec >> (8 * 1)) & 0xFF; 00083 *(outbuffer + offset + 2) = (this->target_time.nsec >> (8 * 2)) & 0xFF; 00084 *(outbuffer + offset + 3) = (this->target_time.nsec >> (8 * 3)) & 0xFF; 00085 offset += sizeof(this->target_time.nsec); 00086 uint32_t length_fixed_frame = strlen(this->fixed_frame); 00087 varToArr(outbuffer + offset, length_fixed_frame); 00088 offset += 4; 00089 memcpy(outbuffer + offset, this->fixed_frame, length_fixed_frame); 00090 offset += length_fixed_frame; 00091 union { 00092 bool real; 00093 uint8_t base; 00094 } u_advanced; 00095 u_advanced.real = this->advanced; 00096 *(outbuffer + offset + 0) = (u_advanced.base >> (8 * 0)) & 0xFF; 00097 offset += sizeof(this->advanced); 00098 return offset; 00099 } 00100 00101 virtual int deserialize(unsigned char *inbuffer) 00102 { 00103 int offset = 0; 00104 uint32_t length_target_frame; 00105 arrToVar(length_target_frame, (inbuffer + offset)); 00106 offset += 4; 00107 for(unsigned int k= offset; k< offset+length_target_frame; ++k){ 00108 inbuffer[k-1]=inbuffer[k]; 00109 } 00110 inbuffer[offset+length_target_frame-1]=0; 00111 this->target_frame = (char *)(inbuffer + offset-1); 00112 offset += length_target_frame; 00113 uint32_t length_source_frame; 00114 arrToVar(length_source_frame, (inbuffer + offset)); 00115 offset += 4; 00116 for(unsigned int k= offset; k< offset+length_source_frame; ++k){ 00117 inbuffer[k-1]=inbuffer[k]; 00118 } 00119 inbuffer[offset+length_source_frame-1]=0; 00120 this->source_frame = (char *)(inbuffer + offset-1); 00121 offset += length_source_frame; 00122 this->source_time.sec = ((uint32_t) (*(inbuffer + offset))); 00123 this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00124 this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00125 this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00126 offset += sizeof(this->source_time.sec); 00127 this->source_time.nsec = ((uint32_t) (*(inbuffer + offset))); 00128 this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00129 this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00130 this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00131 offset += sizeof(this->source_time.nsec); 00132 this->timeout.sec = ((uint32_t) (*(inbuffer + offset))); 00133 this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00134 this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00135 this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00136 offset += sizeof(this->timeout.sec); 00137 this->timeout.nsec = ((uint32_t) (*(inbuffer + offset))); 00138 this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00139 this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00140 this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00141 offset += sizeof(this->timeout.nsec); 00142 this->target_time.sec = ((uint32_t) (*(inbuffer + offset))); 00143 this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00144 this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00145 this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00146 offset += sizeof(this->target_time.sec); 00147 this->target_time.nsec = ((uint32_t) (*(inbuffer + offset))); 00148 this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00149 this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00150 this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00151 offset += sizeof(this->target_time.nsec); 00152 uint32_t length_fixed_frame; 00153 arrToVar(length_fixed_frame, (inbuffer + offset)); 00154 offset += 4; 00155 for(unsigned int k= offset; k< offset+length_fixed_frame; ++k){ 00156 inbuffer[k-1]=inbuffer[k]; 00157 } 00158 inbuffer[offset+length_fixed_frame-1]=0; 00159 this->fixed_frame = (char *)(inbuffer + offset-1); 00160 offset += length_fixed_frame; 00161 union { 00162 bool real; 00163 uint8_t base; 00164 } u_advanced; 00165 u_advanced.base = 0; 00166 u_advanced.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00167 this->advanced = u_advanced.real; 00168 offset += sizeof(this->advanced); 00169 return offset; 00170 } 00171 00172 const char * getType(){ return "tf2_msgs/LookupTransformGoal"; }; 00173 const char * getMD5(){ return "35e3720468131d675a18bb6f3e5f22f8"; }; 00174 00175 }; 00176 00177 } 00178 #endif
Generated on Sun Jul 17 2022 03:09:52 by 1.7.2