Go to the documentation of this file.00001
00002 #ifndef ROVIO_SHARED_MESSAGE_MAN_DRV_H
00003 #define ROVIO_SHARED_MESSAGE_MAN_DRV_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 rovio_shared
00019 {
00020 template <class ContainerAllocator>
00021 struct man_drv_ {
00022 typedef man_drv_<ContainerAllocator> Type;
00023
00024 man_drv_()
00025 : drive(0)
00026 , speed(0)
00027 {
00028 }
00029
00030 man_drv_(const ContainerAllocator& _alloc)
00031 : drive(0)
00032 , speed(0)
00033 {
00034 }
00035
00036 typedef int8_t _drive_type;
00037 int8_t drive;
00038
00039 typedef int8_t _speed_type;
00040 int8_t speed;
00041
00042 enum { STOP = 0 };
00043 enum { FORWARD = 1 };
00044 enum { BACKWARD = 2 };
00045 enum { STRAIGHT_LEFT = 3 };
00046 enum { STRAIGHT_RIGHT = 4 };
00047 enum { ROTATE_LEFT = 5 };
00048 enum { ROTATE_RIGHT = 6 };
00049 enum { DIAGONAL_FORWARD_LEFT = 7 };
00050 enum { DIAGONAL_FORWARD_RIGHT = 8 };
00051 enum { DIAGONAL_BACKWARD_LEFT = 9 };
00052 enum { DIAGONAL_BACKWARD_RIGHT = 10 };
00053 enum { HEAD_UP = 11 };
00054 enum { HEAD_DOWN = 12 };
00055 enum { HEAD_MIDDLE = 13 };
00056 enum { ROTATE_LEFT_20_DEG = 17 };
00057 enum { ROTATE_RIGHT_20_DEG = 18 };
00058 enum { MIN_DRIVE_VAL = 0 };
00059 enum { MAX_DRIVE_VAL = 18 };
00060 enum { FASTEST = 1 };
00061 enum { SLOWEST = 10 };
00062 enum { MIN_SPEED_VAL = 1 };
00063 enum { MAX_SPEED_VAL = 10 };
00064
00065 typedef boost::shared_ptr< ::rovio_shared::man_drv_<ContainerAllocator> > Ptr;
00066 typedef boost::shared_ptr< ::rovio_shared::man_drv_<ContainerAllocator> const> ConstPtr;
00067 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00068 };
00069 typedef ::rovio_shared::man_drv_<std::allocator<void> > man_drv;
00070
00071 typedef boost::shared_ptr< ::rovio_shared::man_drv> man_drvPtr;
00072 typedef boost::shared_ptr< ::rovio_shared::man_drv const> man_drvConstPtr;
00073
00074
00075 template<typename ContainerAllocator>
00076 std::ostream& operator<<(std::ostream& s, const ::rovio_shared::man_drv_<ContainerAllocator> & v)
00077 {
00078 ros::message_operations::Printer< ::rovio_shared::man_drv_<ContainerAllocator> >::stream(s, "", v);
00079 return s;}
00080
00081 }
00082
00083 namespace ros
00084 {
00085 namespace message_traits
00086 {
00087 template<class ContainerAllocator> struct IsMessage< ::rovio_shared::man_drv_<ContainerAllocator> > : public TrueType {};
00088 template<class ContainerAllocator> struct IsMessage< ::rovio_shared::man_drv_<ContainerAllocator> const> : public TrueType {};
00089 template<class ContainerAllocator>
00090 struct MD5Sum< ::rovio_shared::man_drv_<ContainerAllocator> > {
00091 static const char* value()
00092 {
00093 return "14675853bd9417686a1390c3fb2eaae6";
00094 }
00095
00096 static const char* value(const ::rovio_shared::man_drv_<ContainerAllocator> &) { return value(); }
00097 static const uint64_t static_value1 = 0x14675853bd941768ULL;
00098 static const uint64_t static_value2 = 0x6a1390c3fb2eaae6ULL;
00099 };
00100
00101 template<class ContainerAllocator>
00102 struct DataType< ::rovio_shared::man_drv_<ContainerAllocator> > {
00103 static const char* value()
00104 {
00105 return "rovio_shared/man_drv";
00106 }
00107
00108 static const char* value(const ::rovio_shared::man_drv_<ContainerAllocator> &) { return value(); }
00109 };
00110
00111 template<class ContainerAllocator>
00112 struct Definition< ::rovio_shared::man_drv_<ContainerAllocator> > {
00113 static const char* value()
00114 {
00115 return "# Constants for the 'drive' value as defined by the Rovio API\n\
00116 int8 STOP=0\n\
00117 int8 FORWARD=1\n\
00118 int8 BACKWARD=2 \n\
00119 int8 STRAIGHT_LEFT=3\n\
00120 int8 STRAIGHT_RIGHT=4\n\
00121 int8 ROTATE_LEFT=5\n\
00122 int8 ROTATE_RIGHT=6\n\
00123 int8 DIAGONAL_FORWARD_LEFT=7\n\
00124 int8 DIAGONAL_FORWARD_RIGHT=8\n\
00125 int8 DIAGONAL_BACKWARD_LEFT=9\n\
00126 int8 DIAGONAL_BACKWARD_RIGHT=10\n\
00127 int8 HEAD_UP=11\n\
00128 int8 HEAD_DOWN=12\n\
00129 int8 HEAD_MIDDLE=13\n\
00130 # 14, 15, and 16 are reserved values\n\
00131 int8 ROTATE_LEFT_20_DEG=17\n\
00132 int8 ROTATE_RIGHT_20_DEG=18\n\
00133 int8 MIN_DRIVE_VAL=0\n\
00134 int8 MAX_DRIVE_VAL=18\n\
00135 \n\
00136 # Constants useful for the 'speed' value as defined by the Rovio API\n\
00137 int8 FASTEST=1 \n\
00138 int8 SLOWEST=10\n\
00139 int8 MIN_SPEED_VAL=1\n\
00140 int8 MAX_SPEED_VAL=10\n\
00141 \n\
00142 # The manual drive message contains a 'drive' and 'speed' value as defined by the Rovio API\n\
00143 int8 drive\n\
00144 int8 speed\n\
00145 \n\
00146 ";
00147 }
00148
00149 static const char* value(const ::rovio_shared::man_drv_<ContainerAllocator> &) { return value(); }
00150 };
00151
00152 template<class ContainerAllocator> struct IsFixedSize< ::rovio_shared::man_drv_<ContainerAllocator> > : public TrueType {};
00153 }
00154 }
00155
00156 namespace ros
00157 {
00158 namespace serialization
00159 {
00160
00161 template<class ContainerAllocator> struct Serializer< ::rovio_shared::man_drv_<ContainerAllocator> >
00162 {
00163 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00164 {
00165 stream.next(m.drive);
00166 stream.next(m.speed);
00167 }
00168
00169 ROS_DECLARE_ALLINONE_SERIALIZER;
00170 };
00171 }
00172 }
00173
00174 namespace ros
00175 {
00176 namespace message_operations
00177 {
00178
00179 template<class ContainerAllocator>
00180 struct Printer< ::rovio_shared::man_drv_<ContainerAllocator> >
00181 {
00182 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::rovio_shared::man_drv_<ContainerAllocator> & v)
00183 {
00184 s << indent << "drive: ";
00185 Printer<int8_t>::stream(s, indent + " ", v.drive);
00186 s << indent << "speed: ";
00187 Printer<int8_t>::stream(s, indent + " ", v.speed);
00188 }
00189 };
00190
00191
00192 }
00193 }
00194
00195 #endif // ROVIO_SHARED_MESSAGE_MAN_DRV_H
00196