Go to the documentation of this file.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 char * target_frame;
00018 char * source_frame;
00019 ros::Time source_time;
00020 ros::Duration timeout;
00021 ros::Time target_time;
00022 char * fixed_frame;
00023 bool advanced;
00024
00025 virtual int serialize(unsigned char *outbuffer) const
00026 {
00027 int offset = 0;
00028 uint32_t length_target_frame = strlen( (const char*) this->target_frame);
00029 memcpy(outbuffer + offset, &length_target_frame, sizeof(uint32_t));
00030 offset += 4;
00031 memcpy(outbuffer + offset, this->target_frame, length_target_frame);
00032 offset += length_target_frame;
00033 uint32_t length_source_frame = strlen( (const char*) this->source_frame);
00034 memcpy(outbuffer + offset, &length_source_frame, sizeof(uint32_t));
00035 offset += 4;
00036 memcpy(outbuffer + offset, this->source_frame, length_source_frame);
00037 offset += length_source_frame;
00038 *(outbuffer + offset + 0) = (this->source_time.sec >> (8 * 0)) & 0xFF;
00039 *(outbuffer + offset + 1) = (this->source_time.sec >> (8 * 1)) & 0xFF;
00040 *(outbuffer + offset + 2) = (this->source_time.sec >> (8 * 2)) & 0xFF;
00041 *(outbuffer + offset + 3) = (this->source_time.sec >> (8 * 3)) & 0xFF;
00042 offset += sizeof(this->source_time.sec);
00043 *(outbuffer + offset + 0) = (this->source_time.nsec >> (8 * 0)) & 0xFF;
00044 *(outbuffer + offset + 1) = (this->source_time.nsec >> (8 * 1)) & 0xFF;
00045 *(outbuffer + offset + 2) = (this->source_time.nsec >> (8 * 2)) & 0xFF;
00046 *(outbuffer + offset + 3) = (this->source_time.nsec >> (8 * 3)) & 0xFF;
00047 offset += sizeof(this->source_time.nsec);
00048 *(outbuffer + offset + 0) = (this->timeout.sec >> (8 * 0)) & 0xFF;
00049 *(outbuffer + offset + 1) = (this->timeout.sec >> (8 * 1)) & 0xFF;
00050 *(outbuffer + offset + 2) = (this->timeout.sec >> (8 * 2)) & 0xFF;
00051 *(outbuffer + offset + 3) = (this->timeout.sec >> (8 * 3)) & 0xFF;
00052 offset += sizeof(this->timeout.sec);
00053 *(outbuffer + offset + 0) = (this->timeout.nsec >> (8 * 0)) & 0xFF;
00054 *(outbuffer + offset + 1) = (this->timeout.nsec >> (8 * 1)) & 0xFF;
00055 *(outbuffer + offset + 2) = (this->timeout.nsec >> (8 * 2)) & 0xFF;
00056 *(outbuffer + offset + 3) = (this->timeout.nsec >> (8 * 3)) & 0xFF;
00057 offset += sizeof(this->timeout.nsec);
00058 *(outbuffer + offset + 0) = (this->target_time.sec >> (8 * 0)) & 0xFF;
00059 *(outbuffer + offset + 1) = (this->target_time.sec >> (8 * 1)) & 0xFF;
00060 *(outbuffer + offset + 2) = (this->target_time.sec >> (8 * 2)) & 0xFF;
00061 *(outbuffer + offset + 3) = (this->target_time.sec >> (8 * 3)) & 0xFF;
00062 offset += sizeof(this->target_time.sec);
00063 *(outbuffer + offset + 0) = (this->target_time.nsec >> (8 * 0)) & 0xFF;
00064 *(outbuffer + offset + 1) = (this->target_time.nsec >> (8 * 1)) & 0xFF;
00065 *(outbuffer + offset + 2) = (this->target_time.nsec >> (8 * 2)) & 0xFF;
00066 *(outbuffer + offset + 3) = (this->target_time.nsec >> (8 * 3)) & 0xFF;
00067 offset += sizeof(this->target_time.nsec);
00068 uint32_t length_fixed_frame = strlen( (const char*) this->fixed_frame);
00069 memcpy(outbuffer + offset, &length_fixed_frame, sizeof(uint32_t));
00070 offset += 4;
00071 memcpy(outbuffer + offset, this->fixed_frame, length_fixed_frame);
00072 offset += length_fixed_frame;
00073 union {
00074 bool real;
00075 uint8_t base;
00076 } u_advanced;
00077 u_advanced.real = this->advanced;
00078 *(outbuffer + offset + 0) = (u_advanced.base >> (8 * 0)) & 0xFF;
00079 offset += sizeof(this->advanced);
00080 return offset;
00081 }
00082
00083 virtual int deserialize(unsigned char *inbuffer)
00084 {
00085 int offset = 0;
00086 uint32_t length_target_frame;
00087 memcpy(&length_target_frame, (inbuffer + offset), sizeof(uint32_t));
00088 offset += 4;
00089 for(unsigned int k= offset; k< offset+length_target_frame; ++k){
00090 inbuffer[k-1]=inbuffer[k];
00091 }
00092 inbuffer[offset+length_target_frame-1]=0;
00093 this->target_frame = (char *)(inbuffer + offset-1);
00094 offset += length_target_frame;
00095 uint32_t length_source_frame;
00096 memcpy(&length_source_frame, (inbuffer + offset), sizeof(uint32_t));
00097 offset += 4;
00098 for(unsigned int k= offset; k< offset+length_source_frame; ++k){
00099 inbuffer[k-1]=inbuffer[k];
00100 }
00101 inbuffer[offset+length_source_frame-1]=0;
00102 this->source_frame = (char *)(inbuffer + offset-1);
00103 offset += length_source_frame;
00104 this->source_time.sec = ((uint32_t) (*(inbuffer + offset)));
00105 this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00106 this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00107 this->source_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00108 offset += sizeof(this->source_time.sec);
00109 this->source_time.nsec = ((uint32_t) (*(inbuffer + offset)));
00110 this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00111 this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00112 this->source_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00113 offset += sizeof(this->source_time.nsec);
00114 this->timeout.sec = ((uint32_t) (*(inbuffer + offset)));
00115 this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00116 this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00117 this->timeout.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00118 offset += sizeof(this->timeout.sec);
00119 this->timeout.nsec = ((uint32_t) (*(inbuffer + offset)));
00120 this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00121 this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00122 this->timeout.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00123 offset += sizeof(this->timeout.nsec);
00124 this->target_time.sec = ((uint32_t) (*(inbuffer + offset)));
00125 this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00126 this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00127 this->target_time.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00128 offset += sizeof(this->target_time.sec);
00129 this->target_time.nsec = ((uint32_t) (*(inbuffer + offset)));
00130 this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00131 this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00132 this->target_time.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00133 offset += sizeof(this->target_time.nsec);
00134 uint32_t length_fixed_frame;
00135 memcpy(&length_fixed_frame, (inbuffer + offset), sizeof(uint32_t));
00136 offset += 4;
00137 for(unsigned int k= offset; k< offset+length_fixed_frame; ++k){
00138 inbuffer[k-1]=inbuffer[k];
00139 }
00140 inbuffer[offset+length_fixed_frame-1]=0;
00141 this->fixed_frame = (char *)(inbuffer + offset-1);
00142 offset += length_fixed_frame;
00143 union {
00144 bool real;
00145 uint8_t base;
00146 } u_advanced;
00147 u_advanced.base = 0;
00148 u_advanced.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00149 this->advanced = u_advanced.real;
00150 offset += sizeof(this->advanced);
00151 return offset;
00152 }
00153
00154 const char * getType(){ return "tf2_msgs/LookupTransformGoal"; };
00155 const char * getMD5(){ return "35e3720468131d675a18bb6f3e5f22f8"; };
00156
00157 };
00158
00159 }
00160 #endif