00001
00002 #ifndef TEST_ROS_MESSAGE_TESTPRIMITIVES_H
00003 #define TEST_ROS_MESSAGE_TESTPRIMITIVES_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013
00014 namespace test_ros
00015 {
00016 template <class ContainerAllocator>
00017 struct TestPrimitives_ : public ros::Message
00018 {
00019 typedef TestPrimitives_<ContainerAllocator> Type;
00020
00021 TestPrimitives_()
00022 : caller_id()
00023 , orig_caller_id()
00024 , str()
00025 , b(0)
00026 , int16(0)
00027 , int32(0)
00028 , int64(0)
00029 , c(0)
00030 , uint16(0)
00031 , uint32(0)
00032 , uint64(0)
00033 , float32(0.0)
00034 , float64(0.0)
00035 , t()
00036 , d()
00037 {
00038 }
00039
00040 TestPrimitives_(const ContainerAllocator& _alloc)
00041 : caller_id(_alloc)
00042 , orig_caller_id(_alloc)
00043 , str(_alloc)
00044 , b(0)
00045 , int16(0)
00046 , int32(0)
00047 , int64(0)
00048 , c(0)
00049 , uint16(0)
00050 , uint32(0)
00051 , uint64(0)
00052 , float32(0.0)
00053 , float64(0.0)
00054 , t()
00055 , d()
00056 {
00057 }
00058
00059 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _caller_id_type;
00060 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > caller_id;
00061
00062 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _orig_caller_id_type;
00063 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > orig_caller_id;
00064
00065 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _str_type;
00066 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > str;
00067
00068 typedef int8_t _b_type;
00069 int8_t b;
00070
00071 typedef int16_t _int16_type;
00072 int16_t int16;
00073
00074 typedef int32_t _int32_type;
00075 int32_t int32;
00076
00077 typedef int64_t _int64_type;
00078 int64_t int64;
00079
00080 typedef uint8_t _c_type;
00081 uint8_t c;
00082
00083 typedef uint16_t _uint16_type;
00084 uint16_t uint16;
00085
00086 typedef uint32_t _uint32_type;
00087 uint32_t uint32;
00088
00089 typedef uint64_t _uint64_type;
00090 uint64_t uint64;
00091
00092 typedef float _float32_type;
00093 float float32;
00094
00095 typedef double _float64_type;
00096 double float64;
00097
00098 typedef ros::Time _t_type;
00099 ros::Time t;
00100
00101 typedef ros::Duration _d_type;
00102 ros::Duration d;
00103
00104
00105 private:
00106 static const char* __s_getDataType_() { return "test_ros/TestPrimitives"; }
00107 public:
00108 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00109
00110 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00111
00112 private:
00113 static const char* __s_getMD5Sum_() { return "3e70f428a22c0d26ca67f87802c8e00f"; }
00114 public:
00115 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00116
00117 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00118
00119 private:
00120 static const char* __s_getMessageDefinition_() { return "# Integration test message of all primitive types\n\
00121 \n\
00122 # caller_id of most recent node to send this message\n\
00123 string caller_id\n\
00124 # caller_id of the original node to send this message\n\
00125 string orig_caller_id\n\
00126 \n\
00127 string str\n\
00128 byte b\n\
00129 int16 int16\n\
00130 int32 int32\n\
00131 int64 int64\n\
00132 char c\n\
00133 uint16 uint16\n\
00134 uint32 uint32\n\
00135 uint64 uint64\n\
00136 float32 float32\n\
00137 float64 float64\n\
00138 time t\n\
00139 duration d\n\
00140 \n\
00141 \n\
00142 "; }
00143 public:
00144 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00145
00146 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00147
00148 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00149 {
00150 ros::serialization::OStream stream(write_ptr, 1000000000);
00151 ros::serialization::serialize(stream, caller_id);
00152 ros::serialization::serialize(stream, orig_caller_id);
00153 ros::serialization::serialize(stream, str);
00154 ros::serialization::serialize(stream, b);
00155 ros::serialization::serialize(stream, int16);
00156 ros::serialization::serialize(stream, int32);
00157 ros::serialization::serialize(stream, int64);
00158 ros::serialization::serialize(stream, c);
00159 ros::serialization::serialize(stream, uint16);
00160 ros::serialization::serialize(stream, uint32);
00161 ros::serialization::serialize(stream, uint64);
00162 ros::serialization::serialize(stream, float32);
00163 ros::serialization::serialize(stream, float64);
00164 ros::serialization::serialize(stream, t);
00165 ros::serialization::serialize(stream, d);
00166 return stream.getData();
00167 }
00168
00169 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00170 {
00171 ros::serialization::IStream stream(read_ptr, 1000000000);
00172 ros::serialization::deserialize(stream, caller_id);
00173 ros::serialization::deserialize(stream, orig_caller_id);
00174 ros::serialization::deserialize(stream, str);
00175 ros::serialization::deserialize(stream, b);
00176 ros::serialization::deserialize(stream, int16);
00177 ros::serialization::deserialize(stream, int32);
00178 ros::serialization::deserialize(stream, int64);
00179 ros::serialization::deserialize(stream, c);
00180 ros::serialization::deserialize(stream, uint16);
00181 ros::serialization::deserialize(stream, uint32);
00182 ros::serialization::deserialize(stream, uint64);
00183 ros::serialization::deserialize(stream, float32);
00184 ros::serialization::deserialize(stream, float64);
00185 ros::serialization::deserialize(stream, t);
00186 ros::serialization::deserialize(stream, d);
00187 return stream.getData();
00188 }
00189
00190 ROS_DEPRECATED virtual uint32_t serializationLength() const
00191 {
00192 uint32_t size = 0;
00193 size += ros::serialization::serializationLength(caller_id);
00194 size += ros::serialization::serializationLength(orig_caller_id);
00195 size += ros::serialization::serializationLength(str);
00196 size += ros::serialization::serializationLength(b);
00197 size += ros::serialization::serializationLength(int16);
00198 size += ros::serialization::serializationLength(int32);
00199 size += ros::serialization::serializationLength(int64);
00200 size += ros::serialization::serializationLength(c);
00201 size += ros::serialization::serializationLength(uint16);
00202 size += ros::serialization::serializationLength(uint32);
00203 size += ros::serialization::serializationLength(uint64);
00204 size += ros::serialization::serializationLength(float32);
00205 size += ros::serialization::serializationLength(float64);
00206 size += ros::serialization::serializationLength(t);
00207 size += ros::serialization::serializationLength(d);
00208 return size;
00209 }
00210
00211 typedef boost::shared_ptr< ::test_ros::TestPrimitives_<ContainerAllocator> > Ptr;
00212 typedef boost::shared_ptr< ::test_ros::TestPrimitives_<ContainerAllocator> const> ConstPtr;
00213 };
00214 typedef ::test_ros::TestPrimitives_<std::allocator<void> > TestPrimitives;
00215
00216 typedef boost::shared_ptr< ::test_ros::TestPrimitives> TestPrimitivesPtr;
00217 typedef boost::shared_ptr< ::test_ros::TestPrimitives const> TestPrimitivesConstPtr;
00218
00219
00220 template<typename ContainerAllocator>
00221 std::ostream& operator<<(std::ostream& s, const ::test_ros::TestPrimitives_<ContainerAllocator> & v)
00222 {
00223 ros::message_operations::Printer< ::test_ros::TestPrimitives_<ContainerAllocator> >::stream(s, "", v);
00224 return s;}
00225
00226 }
00227
00228 namespace ros
00229 {
00230 namespace message_traits
00231 {
00232 template<class ContainerAllocator>
00233 struct MD5Sum< ::test_ros::TestPrimitives_<ContainerAllocator> > {
00234 static const char* value()
00235 {
00236 return "3e70f428a22c0d26ca67f87802c8e00f";
00237 }
00238
00239 static const char* value(const ::test_ros::TestPrimitives_<ContainerAllocator> &) { return value(); }
00240 static const uint64_t static_value1 = 0x3e70f428a22c0d26ULL;
00241 static const uint64_t static_value2 = 0xca67f87802c8e00fULL;
00242 };
00243
00244 template<class ContainerAllocator>
00245 struct DataType< ::test_ros::TestPrimitives_<ContainerAllocator> > {
00246 static const char* value()
00247 {
00248 return "test_ros/TestPrimitives";
00249 }
00250
00251 static const char* value(const ::test_ros::TestPrimitives_<ContainerAllocator> &) { return value(); }
00252 };
00253
00254 template<class ContainerAllocator>
00255 struct Definition< ::test_ros::TestPrimitives_<ContainerAllocator> > {
00256 static const char* value()
00257 {
00258 return "# Integration test message of all primitive types\n\
00259 \n\
00260 # caller_id of most recent node to send this message\n\
00261 string caller_id\n\
00262 # caller_id of the original node to send this message\n\
00263 string orig_caller_id\n\
00264 \n\
00265 string str\n\
00266 byte b\n\
00267 int16 int16\n\
00268 int32 int32\n\
00269 int64 int64\n\
00270 char c\n\
00271 uint16 uint16\n\
00272 uint32 uint32\n\
00273 uint64 uint64\n\
00274 float32 float32\n\
00275 float64 float64\n\
00276 time t\n\
00277 duration d\n\
00278 \n\
00279 \n\
00280 ";
00281 }
00282
00283 static const char* value(const ::test_ros::TestPrimitives_<ContainerAllocator> &) { return value(); }
00284 };
00285
00286 }
00287 }
00288
00289 namespace ros
00290 {
00291 namespace serialization
00292 {
00293
00294 template<class ContainerAllocator> struct Serializer< ::test_ros::TestPrimitives_<ContainerAllocator> >
00295 {
00296 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00297 {
00298 stream.next(m.caller_id);
00299 stream.next(m.orig_caller_id);
00300 stream.next(m.str);
00301 stream.next(m.b);
00302 stream.next(m.int16);
00303 stream.next(m.int32);
00304 stream.next(m.int64);
00305 stream.next(m.c);
00306 stream.next(m.uint16);
00307 stream.next(m.uint32);
00308 stream.next(m.uint64);
00309 stream.next(m.float32);
00310 stream.next(m.float64);
00311 stream.next(m.t);
00312 stream.next(m.d);
00313 }
00314
00315 ROS_DECLARE_ALLINONE_SERIALIZER;
00316 };
00317 }
00318 }
00319
00320 namespace ros
00321 {
00322 namespace message_operations
00323 {
00324
00325 template<class ContainerAllocator>
00326 struct Printer< ::test_ros::TestPrimitives_<ContainerAllocator> >
00327 {
00328 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_ros::TestPrimitives_<ContainerAllocator> & v)
00329 {
00330 s << indent << "caller_id: ";
00331 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.caller_id);
00332 s << indent << "orig_caller_id: ";
00333 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.orig_caller_id);
00334 s << indent << "str: ";
00335 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.str);
00336 s << indent << "b: ";
00337 Printer<int8_t>::stream(s, indent + " ", v.b);
00338 s << indent << "int16: ";
00339 Printer<int16_t>::stream(s, indent + " ", v.int16);
00340 s << indent << "int32: ";
00341 Printer<int32_t>::stream(s, indent + " ", v.int32);
00342 s << indent << "int64: ";
00343 Printer<int64_t>::stream(s, indent + " ", v.int64);
00344 s << indent << "c: ";
00345 Printer<uint8_t>::stream(s, indent + " ", v.c);
00346 s << indent << "uint16: ";
00347 Printer<uint16_t>::stream(s, indent + " ", v.uint16);
00348 s << indent << "uint32: ";
00349 Printer<uint32_t>::stream(s, indent + " ", v.uint32);
00350 s << indent << "uint64: ";
00351 Printer<uint64_t>::stream(s, indent + " ", v.uint64);
00352 s << indent << "float32: ";
00353 Printer<float>::stream(s, indent + " ", v.float32);
00354 s << indent << "float64: ";
00355 Printer<double>::stream(s, indent + " ", v.float64);
00356 s << indent << "t: ";
00357 Printer<ros::Time>::stream(s, indent + " ", v.t);
00358 s << indent << "d: ";
00359 Printer<ros::Duration>::stream(s, indent + " ", v.d);
00360 }
00361 };
00362
00363
00364 }
00365 }
00366
00367 #endif // TEST_ROS_MESSAGE_TESTPRIMITIVES_H
00368