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