00001
00002 #ifndef TEST_ROSCPP_SERIALIZATION_PERF_MESSAGE_POINT32_H
00003 #define TEST_ROSCPP_SERIALIZATION_PERF_MESSAGE_POINT32_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_roscpp_serialization_perf
00015 {
00016 template <class ContainerAllocator>
00017 struct Point32_ : public ros::Message
00018 {
00019 typedef Point32_<ContainerAllocator> Type;
00020
00021 Point32_()
00022 : x(0.0)
00023 , y(0.0)
00024 , z(0.0)
00025 {
00026 }
00027
00028 Point32_(const ContainerAllocator& _alloc)
00029 : x(0.0)
00030 , y(0.0)
00031 , z(0.0)
00032 {
00033 }
00034
00035 typedef float _x_type;
00036 float x;
00037
00038 typedef float _y_type;
00039 float y;
00040
00041 typedef float _z_type;
00042 float z;
00043
00044
00045 private:
00046 static const char* __s_getDataType_() { return "test_roscpp_serialization_perf/Point32"; }
00047 public:
00048 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00049
00050 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00051
00052 private:
00053 static const char* __s_getMD5Sum_() { return "cc153912f1453b708d221682bc23d9ac"; }
00054 public:
00055 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00056
00057 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00058
00059 private:
00060 static const char* __s_getMessageDefinition_() { return "float32 x\n\
00061 float32 y\n\
00062 float32 z\n\
00063 "; }
00064 public:
00065 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00066
00067 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00068
00069 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00070 {
00071 ros::serialization::OStream stream(write_ptr, 1000000000);
00072 ros::serialization::serialize(stream, x);
00073 ros::serialization::serialize(stream, y);
00074 ros::serialization::serialize(stream, z);
00075 return stream.getData();
00076 }
00077
00078 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00079 {
00080 ros::serialization::IStream stream(read_ptr, 1000000000);
00081 ros::serialization::deserialize(stream, x);
00082 ros::serialization::deserialize(stream, y);
00083 ros::serialization::deserialize(stream, z);
00084 return stream.getData();
00085 }
00086
00087 ROS_DEPRECATED virtual uint32_t serializationLength() const
00088 {
00089 uint32_t size = 0;
00090 size += ros::serialization::serializationLength(x);
00091 size += ros::serialization::serializationLength(y);
00092 size += ros::serialization::serializationLength(z);
00093 return size;
00094 }
00095
00096 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> > Ptr;
00097 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> const> ConstPtr;
00098 };
00099 typedef ::test_roscpp_serialization_perf::Point32_<std::allocator<void> > Point32;
00100
00101 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::Point32> Point32Ptr;
00102 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::Point32 const> Point32ConstPtr;
00103
00104
00105 template<typename ContainerAllocator>
00106 std::ostream& operator<<(std::ostream& s, const ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> & v)
00107 {
00108 ros::message_operations::Printer< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >::stream(s, "", v);
00109 return s;}
00110
00111 }
00112
00113 namespace ros
00114 {
00115 namespace message_traits
00116 {
00117 template<class ContainerAllocator>
00118 struct MD5Sum< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> > {
00119 static const char* value()
00120 {
00121 return "cc153912f1453b708d221682bc23d9ac";
00122 }
00123
00124 static const char* value(const ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> &) { return value(); }
00125 static const uint64_t static_value1 = 0xcc153912f1453b70ULL;
00126 static const uint64_t static_value2 = 0x8d221682bc23d9acULL;
00127 };
00128
00129 template<class ContainerAllocator>
00130 struct DataType< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> > {
00131 static const char* value()
00132 {
00133 return "test_roscpp_serialization_perf/Point32";
00134 }
00135
00136 static const char* value(const ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> &) { return value(); }
00137 };
00138
00139 template<class ContainerAllocator>
00140 struct Definition< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> > {
00141 static const char* value()
00142 {
00143 return "float32 x\n\
00144 float32 y\n\
00145 float32 z\n\
00146 ";
00147 }
00148
00149 static const char* value(const ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> &) { return value(); }
00150 };
00151
00152 template<class ContainerAllocator> struct IsFixedSize< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> > : public TrueType {};
00153 }
00154 }
00155
00156 namespace ros
00157 {
00158 namespace serialization
00159 {
00160
00161 template<class ContainerAllocator> struct Serializer< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >
00162 {
00163 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00164 {
00165 stream.next(m.x);
00166 stream.next(m.y);
00167 stream.next(m.z);
00168 }
00169
00170 ROS_DECLARE_ALLINONE_SERIALIZER;
00171 };
00172 }
00173 }
00174
00175 namespace ros
00176 {
00177 namespace message_operations
00178 {
00179
00180 template<class ContainerAllocator>
00181 struct Printer< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >
00182 {
00183 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> & v)
00184 {
00185 s << indent << "x: ";
00186 Printer<float>::stream(s, indent + " ", v.x);
00187 s << indent << "y: ";
00188 Printer<float>::stream(s, indent + " ", v.y);
00189 s << indent << "z: ";
00190 Printer<float>::stream(s, indent + " ", v.z);
00191 }
00192 };
00193
00194
00195 }
00196 }
00197
00198 #endif // TEST_ROSCPP_SERIALIZATION_PERF_MESSAGE_POINT32_H
00199