00001
00002 #ifndef SENSOR_MSGS_MESSAGE_POINTFIELD_H
00003 #define SENSOR_MSGS_MESSAGE_POINTFIELD_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 PointField_ : public ros::Message
00018 {
00019 typedef PointField_<ContainerAllocator> Type;
00020
00021 PointField_()
00022 : name()
00023 , offset(0)
00024 , datatype(0)
00025 , count(0)
00026 {
00027 }
00028
00029 PointField_(const ContainerAllocator& _alloc)
00030 : name(_alloc)
00031 , offset(0)
00032 , datatype(0)
00033 , count(0)
00034 {
00035 }
00036
00037 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00038 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00039
00040 typedef uint32_t _offset_type;
00041 uint32_t offset;
00042
00043 typedef uint8_t _datatype_type;
00044 uint8_t datatype;
00045
00046 typedef uint32_t _count_type;
00047 uint32_t count;
00048
00049 enum { INT8 = 1 };
00050 enum { UINT8 = 2 };
00051 enum { INT16 = 3 };
00052 enum { UINT16 = 4 };
00053 enum { INT32 = 5 };
00054 enum { UINT32 = 6 };
00055 enum { FLOAT32 = 7 };
00056 enum { FLOAT64 = 8 };
00057
00058 private:
00059 static const char* __s_getDataType_() { return "sensor_msgs/PointField"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00062
00063 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00064
00065 private:
00066 static const char* __s_getMD5Sum_() { return "268eacb2962780ceac86cbd17e328150"; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00069
00070 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00071
00072 private:
00073 static const char* __s_getMessageDefinition_() { return "# This message holds the description of one point entry in the\n\
00074 # PointCloud2 message format.\n\
00075 uint8 INT8 = 1\n\
00076 uint8 UINT8 = 2\n\
00077 uint8 INT16 = 3\n\
00078 uint8 UINT16 = 4\n\
00079 uint8 INT32 = 5\n\
00080 uint8 UINT32 = 6\n\
00081 uint8 FLOAT32 = 7\n\
00082 uint8 FLOAT64 = 8\n\
00083 \n\
00084 string name # Name of field\n\
00085 uint32 offset # Offset from start of point struct\n\
00086 uint8 datatype # Datatype enumeration, see above\n\
00087 uint32 count # How many elements in the field\n\
00088 \n\
00089 "; }
00090 public:
00091 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00092
00093 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00094
00095 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00096 {
00097 ros::serialization::OStream stream(write_ptr, 1000000000);
00098 ros::serialization::serialize(stream, name);
00099 ros::serialization::serialize(stream, offset);
00100 ros::serialization::serialize(stream, datatype);
00101 ros::serialization::serialize(stream, count);
00102 return stream.getData();
00103 }
00104
00105 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00106 {
00107 ros::serialization::IStream stream(read_ptr, 1000000000);
00108 ros::serialization::deserialize(stream, name);
00109 ros::serialization::deserialize(stream, offset);
00110 ros::serialization::deserialize(stream, datatype);
00111 ros::serialization::deserialize(stream, count);
00112 return stream.getData();
00113 }
00114
00115 ROS_DEPRECATED virtual uint32_t serializationLength() const
00116 {
00117 uint32_t size = 0;
00118 size += ros::serialization::serializationLength(name);
00119 size += ros::serialization::serializationLength(offset);
00120 size += ros::serialization::serializationLength(datatype);
00121 size += ros::serialization::serializationLength(count);
00122 return size;
00123 }
00124
00125 typedef boost::shared_ptr< ::sensor_msgs::PointField_<ContainerAllocator> > Ptr;
00126 typedef boost::shared_ptr< ::sensor_msgs::PointField_<ContainerAllocator> const> ConstPtr;
00127 };
00128 typedef ::sensor_msgs::PointField_<std::allocator<void> > PointField;
00129
00130 typedef boost::shared_ptr< ::sensor_msgs::PointField> PointFieldPtr;
00131 typedef boost::shared_ptr< ::sensor_msgs::PointField const> PointFieldConstPtr;
00132
00133
00134 template<typename ContainerAllocator>
00135 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::PointField_<ContainerAllocator> & v)
00136 {
00137 ros::message_operations::Printer< ::sensor_msgs::PointField_<ContainerAllocator> >::stream(s, "", v);
00138 return s;}
00139
00140 }
00141
00142 namespace ros
00143 {
00144 namespace message_traits
00145 {
00146 template<class ContainerAllocator>
00147 struct MD5Sum< ::sensor_msgs::PointField_<ContainerAllocator> > {
00148 static const char* value()
00149 {
00150 return "268eacb2962780ceac86cbd17e328150";
00151 }
00152
00153 static const char* value(const ::sensor_msgs::PointField_<ContainerAllocator> &) { return value(); }
00154 static const uint64_t static_value1 = 0x268eacb2962780ceULL;
00155 static const uint64_t static_value2 = 0xac86cbd17e328150ULL;
00156 };
00157
00158 template<class ContainerAllocator>
00159 struct DataType< ::sensor_msgs::PointField_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "sensor_msgs/PointField";
00163 }
00164
00165 static const char* value(const ::sensor_msgs::PointField_<ContainerAllocator> &) { return value(); }
00166 };
00167
00168 template<class ContainerAllocator>
00169 struct Definition< ::sensor_msgs::PointField_<ContainerAllocator> > {
00170 static const char* value()
00171 {
00172 return "# This message holds the description of one point entry in the\n\
00173 # PointCloud2 message format.\n\
00174 uint8 INT8 = 1\n\
00175 uint8 UINT8 = 2\n\
00176 uint8 INT16 = 3\n\
00177 uint8 UINT16 = 4\n\
00178 uint8 INT32 = 5\n\
00179 uint8 UINT32 = 6\n\
00180 uint8 FLOAT32 = 7\n\
00181 uint8 FLOAT64 = 8\n\
00182 \n\
00183 string name # Name of field\n\
00184 uint32 offset # Offset from start of point struct\n\
00185 uint8 datatype # Datatype enumeration, see above\n\
00186 uint32 count # How many elements in the field\n\
00187 \n\
00188 ";
00189 }
00190
00191 static const char* value(const ::sensor_msgs::PointField_<ContainerAllocator> &) { return value(); }
00192 };
00193
00194 }
00195 }
00196
00197 namespace ros
00198 {
00199 namespace serialization
00200 {
00201
00202 template<class ContainerAllocator> struct Serializer< ::sensor_msgs::PointField_<ContainerAllocator> >
00203 {
00204 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00205 {
00206 stream.next(m.name);
00207 stream.next(m.offset);
00208 stream.next(m.datatype);
00209 stream.next(m.count);
00210 }
00211
00212 ROS_DECLARE_ALLINONE_SERIALIZER;
00213 };
00214 }
00215 }
00216
00217 namespace ros
00218 {
00219 namespace message_operations
00220 {
00221
00222 template<class ContainerAllocator>
00223 struct Printer< ::sensor_msgs::PointField_<ContainerAllocator> >
00224 {
00225 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::PointField_<ContainerAllocator> & v)
00226 {
00227 s << indent << "name: ";
00228 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00229 s << indent << "offset: ";
00230 Printer<uint32_t>::stream(s, indent + " ", v.offset);
00231 s << indent << "datatype: ";
00232 Printer<uint8_t>::stream(s, indent + " ", v.datatype);
00233 s << indent << "count: ";
00234 Printer<uint32_t>::stream(s, indent + " ", v.count);
00235 }
00236 };
00237
00238
00239 }
00240 }
00241
00242 #endif // SENSOR_MSGS_MESSAGE_POINTFIELD_H
00243