Go to the documentation of this file.00001
00002 #ifndef KOBUKI_COMMS_MESSAGE_CLIFFEVENT_H
00003 #define KOBUKI_COMMS_MESSAGE_CLIFFEVENT_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
00018 namespace kobuki_comms
00019 {
00020 template <class ContainerAllocator>
00021 struct CliffEvent_ {
00022 typedef CliffEvent_<ContainerAllocator> Type;
00023
00024 CliffEvent_()
00025 : state(0)
00026 , sensor(0)
00027 , bottom(0)
00028 {
00029 }
00030
00031 CliffEvent_(const ContainerAllocator& _alloc)
00032 : state(0)
00033 , sensor(0)
00034 , bottom(0)
00035 {
00036 }
00037
00038 typedef uint8_t _state_type;
00039 uint8_t state;
00040
00041 typedef uint8_t _sensor_type;
00042 uint8_t sensor;
00043
00044 typedef uint16_t _bottom_type;
00045 uint16_t bottom;
00046
00047 enum { LEFT = 0 };
00048 enum { CENTER = 1 };
00049 enum { RIGHT = 2 };
00050 enum { FLOOR = 0 };
00051 enum { CLIFF = 1 };
00052
00053 typedef boost::shared_ptr< ::kobuki_comms::CliffEvent_<ContainerAllocator> > Ptr;
00054 typedef boost::shared_ptr< ::kobuki_comms::CliffEvent_<ContainerAllocator> const> ConstPtr;
00055 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00056 };
00057 typedef ::kobuki_comms::CliffEvent_<std::allocator<void> > CliffEvent;
00058
00059 typedef boost::shared_ptr< ::kobuki_comms::CliffEvent> CliffEventPtr;
00060 typedef boost::shared_ptr< ::kobuki_comms::CliffEvent const> CliffEventConstPtr;
00061
00062
00063 template<typename ContainerAllocator>
00064 std::ostream& operator<<(std::ostream& s, const ::kobuki_comms::CliffEvent_<ContainerAllocator> & v)
00065 {
00066 ros::message_operations::Printer< ::kobuki_comms::CliffEvent_<ContainerAllocator> >::stream(s, "", v);
00067 return s;}
00068
00069 }
00070
00071 namespace ros
00072 {
00073 namespace message_traits
00074 {
00075 template<class ContainerAllocator> struct IsMessage< ::kobuki_comms::CliffEvent_<ContainerAllocator> > : public TrueType {};
00076 template<class ContainerAllocator> struct IsMessage< ::kobuki_comms::CliffEvent_<ContainerAllocator> const> : public TrueType {};
00077 template<class ContainerAllocator>
00078 struct MD5Sum< ::kobuki_comms::CliffEvent_<ContainerAllocator> > {
00079 static const char* value()
00080 {
00081 return "768947926ed252fd64a5711160ff3884";
00082 }
00083
00084 static const char* value(const ::kobuki_comms::CliffEvent_<ContainerAllocator> &) { return value(); }
00085 static const uint64_t static_value1 = 0x768947926ed252fdULL;
00086 static const uint64_t static_value2 = 0x64a5711160ff3884ULL;
00087 };
00088
00089 template<class ContainerAllocator>
00090 struct DataType< ::kobuki_comms::CliffEvent_<ContainerAllocator> > {
00091 static const char* value()
00092 {
00093 return "kobuki_comms/CliffEvent";
00094 }
00095
00096 static const char* value(const ::kobuki_comms::CliffEvent_<ContainerAllocator> &) { return value(); }
00097 };
00098
00099 template<class ContainerAllocator>
00100 struct Definition< ::kobuki_comms::CliffEvent_<ContainerAllocator> > {
00101 static const char* value()
00102 {
00103 return "# Provides a cliff sensor event\n\
00104 # This message is generated whenever the robot approaches or moves away from a cliff\n\
00105 \n\
00106 uint8 LEFT = 0\n\
00107 uint8 CENTER = 1\n\
00108 uint8 RIGHT = 2\n\
00109 \n\
00110 uint8 FLOOR = 0\n\
00111 uint8 CLIFF = 1\n\
00112 \n\
00113 uint8 state\n\
00114 uint8 sensor\n\
00115 uint16 bottom\n\
00116 ";
00117 }
00118
00119 static const char* value(const ::kobuki_comms::CliffEvent_<ContainerAllocator> &) { return value(); }
00120 };
00121
00122 template<class ContainerAllocator> struct IsFixedSize< ::kobuki_comms::CliffEvent_<ContainerAllocator> > : public TrueType {};
00123 }
00124 }
00125
00126 namespace ros
00127 {
00128 namespace serialization
00129 {
00130
00131 template<class ContainerAllocator> struct Serializer< ::kobuki_comms::CliffEvent_<ContainerAllocator> >
00132 {
00133 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00134 {
00135 stream.next(m.state);
00136 stream.next(m.sensor);
00137 stream.next(m.bottom);
00138 }
00139
00140 ROS_DECLARE_ALLINONE_SERIALIZER;
00141 };
00142 }
00143 }
00144
00145 namespace ros
00146 {
00147 namespace message_operations
00148 {
00149
00150 template<class ContainerAllocator>
00151 struct Printer< ::kobuki_comms::CliffEvent_<ContainerAllocator> >
00152 {
00153 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::kobuki_comms::CliffEvent_<ContainerAllocator> & v)
00154 {
00155 s << indent << "state: ";
00156 Printer<uint8_t>::stream(s, indent + " ", v.state);
00157 s << indent << "sensor: ";
00158 Printer<uint8_t>::stream(s, indent + " ", v.sensor);
00159 s << indent << "bottom: ";
00160 Printer<uint16_t>::stream(s, indent + " ", v.bottom);
00161 }
00162 };
00163
00164
00165 }
00166 }
00167
00168 #endif // KOBUKI_COMMS_MESSAGE_CLIFFEVENT_H
00169