00001
00002 #ifndef SENSOR_MSGS_MESSAGE_CHANNELFLOAT32_H
00003 #define SENSOR_MSGS_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 sensor_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct ChannelFloat32_ : public ros::Message
00018 {
00019 typedef ChannelFloat32_<ContainerAllocator> Type;
00020
00021 ChannelFloat32_()
00022 : name()
00023 , values()
00024 {
00025 }
00026
00027 ChannelFloat32_(const ContainerAllocator& _alloc)
00028 : name(_alloc)
00029 , values(_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 > _values_type;
00037 std::vector<float, typename ContainerAllocator::template rebind<float>::other > values;
00038
00039
00040 ROS_DEPRECATED uint32_t get_values_size() const { return (uint32_t)values.size(); }
00041 ROS_DEPRECATED void set_values_size(uint32_t size) { values.resize((size_t)size); }
00042 ROS_DEPRECATED void get_values_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->values; }
00043 ROS_DEPRECATED void set_values_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->values = vec; }
00044 private:
00045 static const char* __s_getDataType_() { return "sensor_msgs/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 "3d40139cdd33dfedcb71ffeeeb42ae7f"; }
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 "# This message is used by the PointCloud message to hold optional data\n\
00060 # associated with each point in the cloud. The length of the values\n\
00061 # array should be the same as the length of the points array in the\n\
00062 # PointCloud, and each value should be associated with the corresponding\n\
00063 # point.\n\
00064 \n\
00065 # Channel names in existing practice include:\n\
00066 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00067 # This is opposite to usual conventions but remains for\n\
00068 # historical reasons. The newer PointCloud2 message has no\n\
00069 # such problem.\n\
00070 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00071 # (R,G,B) values packed into the least significant 24 bits,\n\
00072 # in order.\n\
00073 # \"intensity\" - laser or pixel intensity.\n\
00074 # \"distance\"\n\
00075 \n\
00076 # The channel name should give semantics of the channel (e.g.\n\
00077 # \"intensity\" instead of \"value\").\n\
00078 string name\n\
00079 \n\
00080 # The values array should be 1-1 with the elements of the associated\n\
00081 # PointCloud.\n\
00082 float32[] values\n\
00083 \n\
00084 "; }
00085 public:
00086 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00087
00088 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00089
00090 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00091 {
00092 ros::serialization::OStream stream(write_ptr, 1000000000);
00093 ros::serialization::serialize(stream, name);
00094 ros::serialization::serialize(stream, values);
00095 return stream.getData();
00096 }
00097
00098 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00099 {
00100 ros::serialization::IStream stream(read_ptr, 1000000000);
00101 ros::serialization::deserialize(stream, name);
00102 ros::serialization::deserialize(stream, values);
00103 return stream.getData();
00104 }
00105
00106 ROS_DEPRECATED virtual uint32_t serializationLength() const
00107 {
00108 uint32_t size = 0;
00109 size += ros::serialization::serializationLength(name);
00110 size += ros::serialization::serializationLength(values);
00111 return size;
00112 }
00113
00114 typedef boost::shared_ptr< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> > Ptr;
00115 typedef boost::shared_ptr< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> const> ConstPtr;
00116 };
00117 typedef ::sensor_msgs::ChannelFloat32_<std::allocator<void> > ChannelFloat32;
00118
00119 typedef boost::shared_ptr< ::sensor_msgs::ChannelFloat32> ChannelFloat32Ptr;
00120 typedef boost::shared_ptr< ::sensor_msgs::ChannelFloat32 const> ChannelFloat32ConstPtr;
00121
00122
00123 template<typename ContainerAllocator>
00124 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::ChannelFloat32_<ContainerAllocator> & v)
00125 {
00126 ros::message_operations::Printer< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >::stream(s, "", v);
00127 return s;}
00128
00129 }
00130
00131 namespace ros
00132 {
00133 namespace message_traits
00134 {
00135 template<class ContainerAllocator>
00136 struct MD5Sum< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> > {
00137 static const char* value()
00138 {
00139 return "3d40139cdd33dfedcb71ffeeeb42ae7f";
00140 }
00141
00142 static const char* value(const ::sensor_msgs::ChannelFloat32_<ContainerAllocator> &) { return value(); }
00143 static const uint64_t static_value1 = 0x3d40139cdd33dfedULL;
00144 static const uint64_t static_value2 = 0xcb71ffeeeb42ae7fULL;
00145 };
00146
00147 template<class ContainerAllocator>
00148 struct DataType< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> > {
00149 static const char* value()
00150 {
00151 return "sensor_msgs/ChannelFloat32";
00152 }
00153
00154 static const char* value(const ::sensor_msgs::ChannelFloat32_<ContainerAllocator> &) { return value(); }
00155 };
00156
00157 template<class ContainerAllocator>
00158 struct Definition< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> > {
00159 static const char* value()
00160 {
00161 return "# This message is used by the PointCloud message to hold optional data\n\
00162 # associated with each point in the cloud. The length of the values\n\
00163 # array should be the same as the length of the points array in the\n\
00164 # PointCloud, and each value should be associated with the corresponding\n\
00165 # point.\n\
00166 \n\
00167 # Channel names in existing practice include:\n\
00168 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00169 # This is opposite to usual conventions but remains for\n\
00170 # historical reasons. The newer PointCloud2 message has no\n\
00171 # such problem.\n\
00172 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00173 # (R,G,B) values packed into the least significant 24 bits,\n\
00174 # in order.\n\
00175 # \"intensity\" - laser or pixel intensity.\n\
00176 # \"distance\"\n\
00177 \n\
00178 # The channel name should give semantics of the channel (e.g.\n\
00179 # \"intensity\" instead of \"value\").\n\
00180 string name\n\
00181 \n\
00182 # The values array should be 1-1 with the elements of the associated\n\
00183 # PointCloud.\n\
00184 float32[] values\n\
00185 \n\
00186 ";
00187 }
00188
00189 static const char* value(const ::sensor_msgs::ChannelFloat32_<ContainerAllocator> &) { return value(); }
00190 };
00191
00192 }
00193 }
00194
00195 namespace ros
00196 {
00197 namespace serialization
00198 {
00199
00200 template<class ContainerAllocator> struct Serializer< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >
00201 {
00202 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00203 {
00204 stream.next(m.name);
00205 stream.next(m.values);
00206 }
00207
00208 ROS_DECLARE_ALLINONE_SERIALIZER;
00209 };
00210 }
00211 }
00212
00213 namespace ros
00214 {
00215 namespace message_operations
00216 {
00217
00218 template<class ContainerAllocator>
00219 struct Printer< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >
00220 {
00221 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::ChannelFloat32_<ContainerAllocator> & v)
00222 {
00223 s << indent << "name: ";
00224 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00225 s << indent << "values[]" << std::endl;
00226 for (size_t i = 0; i < v.values.size(); ++i)
00227 {
00228 s << indent << " values[" << i << "]: ";
00229 Printer<float>::stream(s, indent + " ", v.values[i]);
00230 }
00231 }
00232 };
00233
00234
00235 }
00236 }
00237
00238 #endif // SENSOR_MSGS_MESSAGE_CHANNELFLOAT32_H
00239