Go to the documentation of this file.00001
00002 #ifndef COROBOT_MSGS_MESSAGE_RANGESENSOR_H
00003 #define COROBOT_MSGS_MESSAGE_RANGESENSOR_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017 #include "std_msgs/Header.h"
00018
00019 namespace corobot_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct RangeSensor_ {
00023 typedef RangeSensor_<ContainerAllocator> Type;
00024
00025 RangeSensor_()
00026 : header()
00027 , type(0)
00028 , numberSensors(0)
00029 , range()
00030 {
00031 }
00032
00033 RangeSensor_(const ContainerAllocator& _alloc)
00034 : header(_alloc)
00035 , type(0)
00036 , numberSensors(0)
00037 , range(_alloc)
00038 {
00039 }
00040
00041 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00042 ::std_msgs::Header_<ContainerAllocator> header;
00043
00044 typedef int8_t _type_type;
00045 int8_t type;
00046
00047 typedef int8_t _numberSensors_type;
00048 int8_t numberSensors;
00049
00050 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _range_type;
00051 std::vector<float, typename ContainerAllocator::template rebind<float>::other > range;
00052
00053 enum { ULTRASOUND = 0 };
00054 enum { INFRARED = 1 };
00055
00056 typedef boost::shared_ptr< ::corobot_msgs::RangeSensor_<ContainerAllocator> > Ptr;
00057 typedef boost::shared_ptr< ::corobot_msgs::RangeSensor_<ContainerAllocator> const> ConstPtr;
00058 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00059 };
00060 typedef ::corobot_msgs::RangeSensor_<std::allocator<void> > RangeSensor;
00061
00062 typedef boost::shared_ptr< ::corobot_msgs::RangeSensor> RangeSensorPtr;
00063 typedef boost::shared_ptr< ::corobot_msgs::RangeSensor const> RangeSensorConstPtr;
00064
00065
00066 template<typename ContainerAllocator>
00067 std::ostream& operator<<(std::ostream& s, const ::corobot_msgs::RangeSensor_<ContainerAllocator> & v)
00068 {
00069 ros::message_operations::Printer< ::corobot_msgs::RangeSensor_<ContainerAllocator> >::stream(s, "", v);
00070 return s;}
00071
00072 }
00073
00074 namespace ros
00075 {
00076 namespace message_traits
00077 {
00078 template<class ContainerAllocator> struct IsMessage< ::corobot_msgs::RangeSensor_<ContainerAllocator> > : public TrueType {};
00079 template<class ContainerAllocator> struct IsMessage< ::corobot_msgs::RangeSensor_<ContainerAllocator> const> : public TrueType {};
00080 template<class ContainerAllocator>
00081 struct MD5Sum< ::corobot_msgs::RangeSensor_<ContainerAllocator> > {
00082 static const char* value()
00083 {
00084 return "c9d1786e32e87107225d5ffacf468032";
00085 }
00086
00087 static const char* value(const ::corobot_msgs::RangeSensor_<ContainerAllocator> &) { return value(); }
00088 static const uint64_t static_value1 = 0xc9d1786e32e87107ULL;
00089 static const uint64_t static_value2 = 0x225d5ffacf468032ULL;
00090 };
00091
00092 template<class ContainerAllocator>
00093 struct DataType< ::corobot_msgs::RangeSensor_<ContainerAllocator> > {
00094 static const char* value()
00095 {
00096 return "corobot_msgs/RangeSensor";
00097 }
00098
00099 static const char* value(const ::corobot_msgs::RangeSensor_<ContainerAllocator> &) { return value(); }
00100 };
00101
00102 template<class ContainerAllocator>
00103 struct Definition< ::corobot_msgs::RangeSensor_<ContainerAllocator> > {
00104 static const char* value()
00105 {
00106 return "# Message used to transmit range data (infrared, ultrasounds...)\n\
00107 \n\
00108 Header header # timestamp in the header is the time the distance was read\n\
00109 \n\
00110 # type enums\n\
00111 uint8 ULTRASOUND=0\n\
00112 uint8 INFRARED=1\n\
00113 \n\
00114 # The type of sensor represented by these data. The value can be ULTRASOUND or INFRARED.\n\
00115 int8 type \n\
00116 \n\
00117 #The number of sensors\n\
00118 int8 numberSensors\n\
00119 \n\
00120 #The data for each sensor. The size of this array is the numberSensors variable.\n\
00121 float32[] range\n\
00122 \n\
00123 ================================================================================\n\
00124 MSG: std_msgs/Header\n\
00125 # Standard metadata for higher-level stamped data types.\n\
00126 # This is generally used to communicate timestamped data \n\
00127 # in a particular coordinate frame.\n\
00128 # \n\
00129 # sequence ID: consecutively increasing ID \n\
00130 uint32 seq\n\
00131 #Two-integer timestamp that is expressed as:\n\
00132 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00133 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00134 # time-handling sugar is provided by the client library\n\
00135 time stamp\n\
00136 #Frame this data is associated with\n\
00137 # 0: no frame\n\
00138 # 1: global frame\n\
00139 string frame_id\n\
00140 \n\
00141 ";
00142 }
00143
00144 static const char* value(const ::corobot_msgs::RangeSensor_<ContainerAllocator> &) { return value(); }
00145 };
00146
00147 template<class ContainerAllocator> struct HasHeader< ::corobot_msgs::RangeSensor_<ContainerAllocator> > : public TrueType {};
00148 template<class ContainerAllocator> struct HasHeader< const ::corobot_msgs::RangeSensor_<ContainerAllocator> > : public TrueType {};
00149 }
00150 }
00151
00152 namespace ros
00153 {
00154 namespace serialization
00155 {
00156
00157 template<class ContainerAllocator> struct Serializer< ::corobot_msgs::RangeSensor_<ContainerAllocator> >
00158 {
00159 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00160 {
00161 stream.next(m.header);
00162 stream.next(m.type);
00163 stream.next(m.numberSensors);
00164 stream.next(m.range);
00165 }
00166
00167 ROS_DECLARE_ALLINONE_SERIALIZER;
00168 };
00169 }
00170 }
00171
00172 namespace ros
00173 {
00174 namespace message_operations
00175 {
00176
00177 template<class ContainerAllocator>
00178 struct Printer< ::corobot_msgs::RangeSensor_<ContainerAllocator> >
00179 {
00180 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::corobot_msgs::RangeSensor_<ContainerAllocator> & v)
00181 {
00182 s << indent << "header: ";
00183 s << std::endl;
00184 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00185 s << indent << "type: ";
00186 Printer<int8_t>::stream(s, indent + " ", v.type);
00187 s << indent << "numberSensors: ";
00188 Printer<int8_t>::stream(s, indent + " ", v.numberSensors);
00189 s << indent << "range[]" << std::endl;
00190 for (size_t i = 0; i < v.range.size(); ++i)
00191 {
00192 s << indent << " range[" << i << "]: ";
00193 Printer<float>::stream(s, indent + " ", v.range[i]);
00194 }
00195 }
00196 };
00197
00198
00199 }
00200 }
00201
00202 #endif // COROBOT_MSGS_MESSAGE_RANGESENSOR_H
00203