00001
00002 #ifndef TEST_ROSCPP_SERIALIZATION_PERF_MESSAGE_POINTCLOUD_H
00003 #define TEST_ROSCPP_SERIALIZATION_PERF_MESSAGE_POINTCLOUD_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 #include "std_msgs/Header.h"
00014 #include "test_roscpp_serialization_perf/Point32.h"
00015 #include "test_roscpp_serialization_perf/ChannelFloat32.h"
00016
00017 namespace test_roscpp_serialization_perf
00018 {
00019 template <class ContainerAllocator>
00020 struct PointCloud_ : public ros::Message
00021 {
00022 typedef PointCloud_<ContainerAllocator> Type;
00023
00024 PointCloud_()
00025 : header()
00026 , pts()
00027 , chan()
00028 {
00029 }
00030
00031 PointCloud_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , pts(_alloc)
00034 , chan(_alloc)
00035 {
00036 }
00037
00038 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00039 ::std_msgs::Header_<ContainerAllocator> header;
00040
00041 typedef std::vector< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >::other > _pts_type;
00042 std::vector< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >::other > pts;
00043
00044 typedef std::vector< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> >::other > _chan_type;
00045 std::vector< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> >::other > chan;
00046
00047
00048 ROS_DEPRECATED uint32_t get_pts_size() const { return (uint32_t)pts.size(); }
00049 ROS_DEPRECATED void set_pts_size(uint32_t size) { pts.resize((size_t)size); }
00050 ROS_DEPRECATED void get_pts_vec(std::vector< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >::other > & vec) const { vec = this->pts; }
00051 ROS_DEPRECATED void set_pts_vec(const std::vector< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >::other > & vec) { this->pts = vec; }
00052 ROS_DEPRECATED uint32_t get_chan_size() const { return (uint32_t)chan.size(); }
00053 ROS_DEPRECATED void set_chan_size(uint32_t size) { chan.resize((size_t)size); }
00054 ROS_DEPRECATED void get_chan_vec(std::vector< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> >::other > & vec) const { vec = this->chan; }
00055 ROS_DEPRECATED void set_chan_vec(const std::vector< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> >::other > & vec) { this->chan = vec; }
00056 private:
00057 static const char* __s_getDataType_() { return "test_roscpp_serialization_perf/PointCloud"; }
00058 public:
00059 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00060
00061 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00062
00063 private:
00064 static const char* __s_getMD5Sum_() { return "c47b5cedd2b77d241b27547ed7624840"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00067
00068 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00069
00070 private:
00071 static const char* __s_getMessageDefinition_() { return "Header header\n\
00072 Point32[] pts\n\
00073 ChannelFloat32[] chan\n\
00074 \n\
00075 ================================================================================\n\
00076 MSG: std_msgs/Header\n\
00077 # Standard metadata for higher-level stamped data types.\n\
00078 # This is generally used to communicate timestamped data \n\
00079 # in a particular coordinate frame.\n\
00080 # \n\
00081 # sequence ID: consecutively increasing ID \n\
00082 uint32 seq\n\
00083 #Two-integer timestamp that is expressed as:\n\
00084 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00085 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00086 # time-handling sugar is provided by the client library\n\
00087 time stamp\n\
00088 #Frame this data is associated with\n\
00089 # 0: no frame\n\
00090 # 1: global frame\n\
00091 string frame_id\n\
00092 \n\
00093 ================================================================================\n\
00094 MSG: test_roscpp_serialization_perf/Point32\n\
00095 float32 x\n\
00096 float32 y\n\
00097 float32 z\n\
00098 ================================================================================\n\
00099 MSG: test_roscpp_serialization_perf/ChannelFloat32\n\
00100 string name\n\
00101 float32[] vals\n\
00102 "; }
00103 public:
00104 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00105
00106 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00107
00108 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00109 {
00110 ros::serialization::OStream stream(write_ptr, 1000000000);
00111 ros::serialization::serialize(stream, header);
00112 ros::serialization::serialize(stream, pts);
00113 ros::serialization::serialize(stream, chan);
00114 return stream.getData();
00115 }
00116
00117 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00118 {
00119 ros::serialization::IStream stream(read_ptr, 1000000000);
00120 ros::serialization::deserialize(stream, header);
00121 ros::serialization::deserialize(stream, pts);
00122 ros::serialization::deserialize(stream, chan);
00123 return stream.getData();
00124 }
00125
00126 ROS_DEPRECATED virtual uint32_t serializationLength() const
00127 {
00128 uint32_t size = 0;
00129 size += ros::serialization::serializationLength(header);
00130 size += ros::serialization::serializationLength(pts);
00131 size += ros::serialization::serializationLength(chan);
00132 return size;
00133 }
00134
00135 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> > Ptr;
00136 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> const> ConstPtr;
00137 };
00138 typedef ::test_roscpp_serialization_perf::PointCloud_<std::allocator<void> > PointCloud;
00139
00140 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::PointCloud> PointCloudPtr;
00141 typedef boost::shared_ptr< ::test_roscpp_serialization_perf::PointCloud const> PointCloudConstPtr;
00142
00143
00144 template<typename ContainerAllocator>
00145 std::ostream& operator<<(std::ostream& s, const ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> & v)
00146 {
00147 ros::message_operations::Printer< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> >::stream(s, "", v);
00148 return s;}
00149
00150 }
00151
00152 namespace ros
00153 {
00154 namespace message_traits
00155 {
00156 template<class ContainerAllocator>
00157 struct MD5Sum< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> > {
00158 static const char* value()
00159 {
00160 return "c47b5cedd2b77d241b27547ed7624840";
00161 }
00162
00163 static const char* value(const ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> &) { return value(); }
00164 static const uint64_t static_value1 = 0xc47b5cedd2b77d24ULL;
00165 static const uint64_t static_value2 = 0x1b27547ed7624840ULL;
00166 };
00167
00168 template<class ContainerAllocator>
00169 struct DataType< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> > {
00170 static const char* value()
00171 {
00172 return "test_roscpp_serialization_perf/PointCloud";
00173 }
00174
00175 static const char* value(const ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> &) { return value(); }
00176 };
00177
00178 template<class ContainerAllocator>
00179 struct Definition< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> > {
00180 static const char* value()
00181 {
00182 return "Header header\n\
00183 Point32[] pts\n\
00184 ChannelFloat32[] chan\n\
00185 \n\
00186 ================================================================================\n\
00187 MSG: std_msgs/Header\n\
00188 # Standard metadata for higher-level stamped data types.\n\
00189 # This is generally used to communicate timestamped data \n\
00190 # in a particular coordinate frame.\n\
00191 # \n\
00192 # sequence ID: consecutively increasing ID \n\
00193 uint32 seq\n\
00194 #Two-integer timestamp that is expressed as:\n\
00195 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00196 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00197 # time-handling sugar is provided by the client library\n\
00198 time stamp\n\
00199 #Frame this data is associated with\n\
00200 # 0: no frame\n\
00201 # 1: global frame\n\
00202 string frame_id\n\
00203 \n\
00204 ================================================================================\n\
00205 MSG: test_roscpp_serialization_perf/Point32\n\
00206 float32 x\n\
00207 float32 y\n\
00208 float32 z\n\
00209 ================================================================================\n\
00210 MSG: test_roscpp_serialization_perf/ChannelFloat32\n\
00211 string name\n\
00212 float32[] vals\n\
00213 ";
00214 }
00215
00216 static const char* value(const ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> &) { return value(); }
00217 };
00218
00219 template<class ContainerAllocator> struct HasHeader< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> > : public TrueType {};
00220 template<class ContainerAllocator> struct HasHeader< const ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> > : public TrueType {};
00221 }
00222 }
00223
00224 namespace ros
00225 {
00226 namespace serialization
00227 {
00228
00229 template<class ContainerAllocator> struct Serializer< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> >
00230 {
00231 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00232 {
00233 stream.next(m.header);
00234 stream.next(m.pts);
00235 stream.next(m.chan);
00236 }
00237
00238 ROS_DECLARE_ALLINONE_SERIALIZER;
00239 };
00240 }
00241 }
00242
00243 namespace ros
00244 {
00245 namespace message_operations
00246 {
00247
00248 template<class ContainerAllocator>
00249 struct Printer< ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> >
00250 {
00251 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_roscpp_serialization_perf::PointCloud_<ContainerAllocator> & v)
00252 {
00253 s << indent << "header: ";
00254 s << std::endl;
00255 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00256 s << indent << "pts[]" << std::endl;
00257 for (size_t i = 0; i < v.pts.size(); ++i)
00258 {
00259 s << indent << " pts[" << i << "]: ";
00260 s << std::endl;
00261 s << indent;
00262 Printer< ::test_roscpp_serialization_perf::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.pts[i]);
00263 }
00264 s << indent << "chan[]" << std::endl;
00265 for (size_t i = 0; i < v.chan.size(); ++i)
00266 {
00267 s << indent << " chan[" << i << "]: ";
00268 s << std::endl;
00269 s << indent;
00270 Printer< ::test_roscpp_serialization_perf::ChannelFloat32_<ContainerAllocator> >::stream(s, indent + " ", v.chan[i]);
00271 }
00272 }
00273 };
00274
00275
00276 }
00277 }
00278
00279 #endif // TEST_ROSCPP_SERIALIZATION_PERF_MESSAGE_POINTCLOUD_H
00280