00001
00002 #ifndef TEST_ROSTOPIC_MESSAGE_SIMPLE_H
00003 #define TEST_ROSTOPIC_MESSAGE_SIMPLE_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_rostopic
00015 {
00016 template <class ContainerAllocator>
00017 struct Simple_ : public ros::Message
00018 {
00019 typedef Simple_<ContainerAllocator> Type;
00020
00021 Simple_()
00022 : b(0)
00023 , int16(0)
00024 , int32(0)
00025 , int64(0)
00026 , c(0)
00027 , uint16(0)
00028 , uint32(0)
00029 , uint64(0)
00030 , str()
00031 {
00032 }
00033
00034 Simple_(const ContainerAllocator& _alloc)
00035 : b(0)
00036 , int16(0)
00037 , int32(0)
00038 , int64(0)
00039 , c(0)
00040 , uint16(0)
00041 , uint32(0)
00042 , uint64(0)
00043 , str(_alloc)
00044 {
00045 }
00046
00047 typedef int8_t _b_type;
00048 int8_t b;
00049
00050 typedef int16_t _int16_type;
00051 int16_t int16;
00052
00053 typedef int32_t _int32_type;
00054 int32_t int32;
00055
00056 typedef int64_t _int64_type;
00057 int64_t int64;
00058
00059 typedef uint8_t _c_type;
00060 uint8_t c;
00061
00062 typedef uint16_t _uint16_type;
00063 uint16_t uint16;
00064
00065 typedef uint32_t _uint32_type;
00066 uint32_t uint32;
00067
00068 typedef uint64_t _uint64_type;
00069 uint64_t uint64;
00070
00071 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _str_type;
00072 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > str;
00073
00074
00075 private:
00076 static const char* __s_getDataType_() { return "test_rostopic/Simple"; }
00077 public:
00078 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00079
00080 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00081
00082 private:
00083 static const char* __s_getMD5Sum_() { return "c9940b1313e61fed87cd22c50742578f"; }
00084 public:
00085 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00086
00087 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00088
00089 private:
00090 static const char* __s_getMessageDefinition_() { return "byte b\n\
00091 int16 int16\n\
00092 int32 int32\n\
00093 int64 int64\n\
00094 char c\n\
00095 uint16 uint16\n\
00096 uint32 uint32\n\
00097 uint64 uint64\n\
00098 string str\n\
00099 \n\
00100 "; }
00101 public:
00102 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00103
00104 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00105
00106 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00107 {
00108 ros::serialization::OStream stream(write_ptr, 1000000000);
00109 ros::serialization::serialize(stream, b);
00110 ros::serialization::serialize(stream, int16);
00111 ros::serialization::serialize(stream, int32);
00112 ros::serialization::serialize(stream, int64);
00113 ros::serialization::serialize(stream, c);
00114 ros::serialization::serialize(stream, uint16);
00115 ros::serialization::serialize(stream, uint32);
00116 ros::serialization::serialize(stream, uint64);
00117 ros::serialization::serialize(stream, str);
00118 return stream.getData();
00119 }
00120
00121 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00122 {
00123 ros::serialization::IStream stream(read_ptr, 1000000000);
00124 ros::serialization::deserialize(stream, b);
00125 ros::serialization::deserialize(stream, int16);
00126 ros::serialization::deserialize(stream, int32);
00127 ros::serialization::deserialize(stream, int64);
00128 ros::serialization::deserialize(stream, c);
00129 ros::serialization::deserialize(stream, uint16);
00130 ros::serialization::deserialize(stream, uint32);
00131 ros::serialization::deserialize(stream, uint64);
00132 ros::serialization::deserialize(stream, str);
00133 return stream.getData();
00134 }
00135
00136 ROS_DEPRECATED virtual uint32_t serializationLength() const
00137 {
00138 uint32_t size = 0;
00139 size += ros::serialization::serializationLength(b);
00140 size += ros::serialization::serializationLength(int16);
00141 size += ros::serialization::serializationLength(int32);
00142 size += ros::serialization::serializationLength(int64);
00143 size += ros::serialization::serializationLength(c);
00144 size += ros::serialization::serializationLength(uint16);
00145 size += ros::serialization::serializationLength(uint32);
00146 size += ros::serialization::serializationLength(uint64);
00147 size += ros::serialization::serializationLength(str);
00148 return size;
00149 }
00150
00151 typedef boost::shared_ptr< ::test_rostopic::Simple_<ContainerAllocator> > Ptr;
00152 typedef boost::shared_ptr< ::test_rostopic::Simple_<ContainerAllocator> const> ConstPtr;
00153 };
00154 typedef ::test_rostopic::Simple_<std::allocator<void> > Simple;
00155
00156 typedef boost::shared_ptr< ::test_rostopic::Simple> SimplePtr;
00157 typedef boost::shared_ptr< ::test_rostopic::Simple const> SimpleConstPtr;
00158
00159
00160 template<typename ContainerAllocator>
00161 std::ostream& operator<<(std::ostream& s, const ::test_rostopic::Simple_<ContainerAllocator> & v)
00162 {
00163 ros::message_operations::Printer< ::test_rostopic::Simple_<ContainerAllocator> >::stream(s, "", v);
00164 return s;}
00165
00166 }
00167
00168 namespace ros
00169 {
00170 namespace message_traits
00171 {
00172 template<class ContainerAllocator>
00173 struct MD5Sum< ::test_rostopic::Simple_<ContainerAllocator> > {
00174 static const char* value()
00175 {
00176 return "c9940b1313e61fed87cd22c50742578f";
00177 }
00178
00179 static const char* value(const ::test_rostopic::Simple_<ContainerAllocator> &) { return value(); }
00180 static const uint64_t static_value1 = 0xc9940b1313e61fedULL;
00181 static const uint64_t static_value2 = 0x87cd22c50742578fULL;
00182 };
00183
00184 template<class ContainerAllocator>
00185 struct DataType< ::test_rostopic::Simple_<ContainerAllocator> > {
00186 static const char* value()
00187 {
00188 return "test_rostopic/Simple";
00189 }
00190
00191 static const char* value(const ::test_rostopic::Simple_<ContainerAllocator> &) { return value(); }
00192 };
00193
00194 template<class ContainerAllocator>
00195 struct Definition< ::test_rostopic::Simple_<ContainerAllocator> > {
00196 static const char* value()
00197 {
00198 return "byte b\n\
00199 int16 int16\n\
00200 int32 int32\n\
00201 int64 int64\n\
00202 char c\n\
00203 uint16 uint16\n\
00204 uint32 uint32\n\
00205 uint64 uint64\n\
00206 string str\n\
00207 \n\
00208 ";
00209 }
00210
00211 static const char* value(const ::test_rostopic::Simple_<ContainerAllocator> &) { return value(); }
00212 };
00213
00214 }
00215 }
00216
00217 namespace ros
00218 {
00219 namespace serialization
00220 {
00221
00222 template<class ContainerAllocator> struct Serializer< ::test_rostopic::Simple_<ContainerAllocator> >
00223 {
00224 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00225 {
00226 stream.next(m.b);
00227 stream.next(m.int16);
00228 stream.next(m.int32);
00229 stream.next(m.int64);
00230 stream.next(m.c);
00231 stream.next(m.uint16);
00232 stream.next(m.uint32);
00233 stream.next(m.uint64);
00234 stream.next(m.str);
00235 }
00236
00237 ROS_DECLARE_ALLINONE_SERIALIZER;
00238 };
00239 }
00240 }
00241
00242 namespace ros
00243 {
00244 namespace message_operations
00245 {
00246
00247 template<class ContainerAllocator>
00248 struct Printer< ::test_rostopic::Simple_<ContainerAllocator> >
00249 {
00250 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_rostopic::Simple_<ContainerAllocator> & v)
00251 {
00252 s << indent << "b: ";
00253 Printer<int8_t>::stream(s, indent + " ", v.b);
00254 s << indent << "int16: ";
00255 Printer<int16_t>::stream(s, indent + " ", v.int16);
00256 s << indent << "int32: ";
00257 Printer<int32_t>::stream(s, indent + " ", v.int32);
00258 s << indent << "int64: ";
00259 Printer<int64_t>::stream(s, indent + " ", v.int64);
00260 s << indent << "c: ";
00261 Printer<uint8_t>::stream(s, indent + " ", v.c);
00262 s << indent << "uint16: ";
00263 Printer<uint16_t>::stream(s, indent + " ", v.uint16);
00264 s << indent << "uint32: ";
00265 Printer<uint32_t>::stream(s, indent + " ", v.uint32);
00266 s << indent << "uint64: ";
00267 Printer<uint64_t>::stream(s, indent + " ", v.uint64);
00268 s << indent << "str: ";
00269 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.str);
00270 }
00271 };
00272
00273
00274 }
00275 }
00276
00277 #endif // TEST_ROSTOPIC_MESSAGE_SIMPLE_H
00278