Go to the documentation of this file.00001
00002 #ifndef KOBUKI_COMMS_MESSAGE_POWERSYSTEMEVENT_H
00003 #define KOBUKI_COMMS_MESSAGE_POWERSYSTEMEVENT_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 PowerSystemEvent_ {
00022 typedef PowerSystemEvent_<ContainerAllocator> Type;
00023
00024 PowerSystemEvent_()
00025 : event(0)
00026 {
00027 }
00028
00029 PowerSystemEvent_(const ContainerAllocator& _alloc)
00030 : event(0)
00031 {
00032 }
00033
00034 typedef uint8_t _event_type;
00035 uint8_t event;
00036
00037 enum { UNPLUGGED = 0 };
00038 enum { PLUGGED_TO_ADAPTER = 1 };
00039 enum { PLUGGED_TO_DOCKBASE = 2 };
00040 enum { CHARGE_COMPLETED = 3 };
00041 enum { BATTERY_LOW = 4 };
00042 enum { BATTERY_CRITICAL = 5 };
00043
00044 typedef boost::shared_ptr< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> > Ptr;
00045 typedef boost::shared_ptr< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> const> ConstPtr;
00046 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00047 };
00048 typedef ::kobuki_comms::PowerSystemEvent_<std::allocator<void> > PowerSystemEvent;
00049
00050 typedef boost::shared_ptr< ::kobuki_comms::PowerSystemEvent> PowerSystemEventPtr;
00051 typedef boost::shared_ptr< ::kobuki_comms::PowerSystemEvent const> PowerSystemEventConstPtr;
00052
00053
00054 template<typename ContainerAllocator>
00055 std::ostream& operator<<(std::ostream& s, const ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> & v)
00056 {
00057 ros::message_operations::Printer< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> >::stream(s, "", v);
00058 return s;}
00059
00060 }
00061
00062 namespace ros
00063 {
00064 namespace message_traits
00065 {
00066 template<class ContainerAllocator> struct IsMessage< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> > : public TrueType {};
00067 template<class ContainerAllocator> struct IsMessage< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> const> : public TrueType {};
00068 template<class ContainerAllocator>
00069 struct MD5Sum< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> > {
00070 static const char* value()
00071 {
00072 return "f6464657d6c911b00c7bc7b43a154bf8";
00073 }
00074
00075 static const char* value(const ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> &) { return value(); }
00076 static const uint64_t static_value1 = 0xf6464657d6c911b0ULL;
00077 static const uint64_t static_value2 = 0x0c7bc7b43a154bf8ULL;
00078 };
00079
00080 template<class ContainerAllocator>
00081 struct DataType< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> > {
00082 static const char* value()
00083 {
00084 return "kobuki_comms/PowerSystemEvent";
00085 }
00086
00087 static const char* value(const ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> &) { return value(); }
00088 };
00089
00090 template<class ContainerAllocator>
00091 struct Definition< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> > {
00092 static const char* value()
00093 {
00094 return "# Power system events\n\
00095 # This message is generated by important changes in the power system:\n\
00096 # - plug/unplug to the docking base or adapter\n\
00097 # - transitions to low/critical battery levels\n\
00098 # - battery charge completed\n\
00099 \n\
00100 uint8 UNPLUGGED = 0\n\
00101 uint8 PLUGGED_TO_ADAPTER = 1\n\
00102 uint8 PLUGGED_TO_DOCKBASE = 2\n\
00103 uint8 CHARGE_COMPLETED = 3\n\
00104 uint8 BATTERY_LOW = 4\n\
00105 uint8 BATTERY_CRITICAL = 5\n\
00106 \n\
00107 uint8 event\n\
00108 \n\
00109 ";
00110 }
00111
00112 static const char* value(const ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> &) { return value(); }
00113 };
00114
00115 template<class ContainerAllocator> struct IsFixedSize< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> > : public TrueType {};
00116 }
00117 }
00118
00119 namespace ros
00120 {
00121 namespace serialization
00122 {
00123
00124 template<class ContainerAllocator> struct Serializer< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> >
00125 {
00126 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00127 {
00128 stream.next(m.event);
00129 }
00130
00131 ROS_DECLARE_ALLINONE_SERIALIZER;
00132 };
00133 }
00134 }
00135
00136 namespace ros
00137 {
00138 namespace message_operations
00139 {
00140
00141 template<class ContainerAllocator>
00142 struct Printer< ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> >
00143 {
00144 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::kobuki_comms::PowerSystemEvent_<ContainerAllocator> & v)
00145 {
00146 s << indent << "event: ";
00147 Printer<uint8_t>::stream(s, indent + " ", v.event);
00148 }
00149 };
00150
00151
00152 }
00153 }
00154
00155 #endif // KOBUKI_COMMS_MESSAGE_POWERSYSTEMEVENT_H
00156