Go to the documentation of this file.00001
00002 #ifndef COB_LIGHT_MESSAGE_LIGHTMODE_H
00003 #define COB_LIGHT_MESSAGE_LIGHTMODE_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/ColorRGBA.h"
00018
00019 namespace cob_light
00020 {
00021 template <class ContainerAllocator>
00022 struct LightMode_ {
00023 typedef LightMode_<ContainerAllocator> Type;
00024
00025 LightMode_()
00026 : mode(0)
00027 , color()
00028 , frequency(0.0)
00029 , timeout(0.0)
00030 , pulses(0)
00031 , priority(0)
00032 {
00033 }
00034
00035 LightMode_(const ContainerAllocator& _alloc)
00036 : mode(0)
00037 , color(_alloc)
00038 , frequency(0.0)
00039 , timeout(0.0)
00040 , pulses(0)
00041 , priority(0)
00042 {
00043 }
00044
00045 typedef uint8_t _mode_type;
00046 uint8_t mode;
00047
00048 typedef ::std_msgs::ColorRGBA_<ContainerAllocator> _color_type;
00049 ::std_msgs::ColorRGBA_<ContainerAllocator> color;
00050
00051 typedef float _frequency_type;
00052 float frequency;
00053
00054 typedef float _timeout_type;
00055 float timeout;
00056
00057 typedef int32_t _pulses_type;
00058 int32_t pulses;
00059
00060 typedef int8_t _priority_type;
00061 int8_t priority;
00062
00063 enum { NONE = 0 };
00064 enum { STATIC = 1 };
00065 enum { FLASH = 2 };
00066 enum { BREATH = 3 };
00067 enum { BREATH_COLOR = 4 };
00068 enum { FADE_COLOR = 5 };
00069
00070 typedef boost::shared_ptr< ::cob_light::LightMode_<ContainerAllocator> > Ptr;
00071 typedef boost::shared_ptr< ::cob_light::LightMode_<ContainerAllocator> const> ConstPtr;
00072 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00073 };
00074 typedef ::cob_light::LightMode_<std::allocator<void> > LightMode;
00075
00076 typedef boost::shared_ptr< ::cob_light::LightMode> LightModePtr;
00077 typedef boost::shared_ptr< ::cob_light::LightMode const> LightModeConstPtr;
00078
00079
00080 template<typename ContainerAllocator>
00081 std::ostream& operator<<(std::ostream& s, const ::cob_light::LightMode_<ContainerAllocator> & v)
00082 {
00083 ros::message_operations::Printer< ::cob_light::LightMode_<ContainerAllocator> >::stream(s, "", v);
00084 return s;}
00085
00086 }
00087
00088 namespace ros
00089 {
00090 namespace message_traits
00091 {
00092 template<class ContainerAllocator> struct IsMessage< ::cob_light::LightMode_<ContainerAllocator> > : public TrueType {};
00093 template<class ContainerAllocator> struct IsMessage< ::cob_light::LightMode_<ContainerAllocator> const> : public TrueType {};
00094 template<class ContainerAllocator>
00095 struct MD5Sum< ::cob_light::LightMode_<ContainerAllocator> > {
00096 static const char* value()
00097 {
00098 return "5c61cdd41b56356f16e4e7ab38a77236";
00099 }
00100
00101 static const char* value(const ::cob_light::LightMode_<ContainerAllocator> &) { return value(); }
00102 static const uint64_t static_value1 = 0x5c61cdd41b56356fULL;
00103 static const uint64_t static_value2 = 0x16e4e7ab38a77236ULL;
00104 };
00105
00106 template<class ContainerAllocator>
00107 struct DataType< ::cob_light::LightMode_<ContainerAllocator> > {
00108 static const char* value()
00109 {
00110 return "cob_light/LightMode";
00111 }
00112
00113 static const char* value(const ::cob_light::LightMode_<ContainerAllocator> &) { return value(); }
00114 };
00115
00116 template<class ContainerAllocator>
00117 struct Definition< ::cob_light::LightMode_<ContainerAllocator> > {
00118 static const char* value()
00119 {
00120 return "uint8 mode\n\
00121 uint8 NONE = 0 # will turn everything off\n\
00122 uint8 STATIC = 1 # will change the LEDs to \"color\"\n\
00123 uint8 FLASH = 2 # will change the LEDs frequently with \"frequency\" from \"color\" to black\n\
00124 uint8 BREATH = 3 # will change the LEDs smoothly with \"frequency\" from \"color\" to black\n\
00125 uint8 BREATH_COLOR = 4 # will change the LEDs smoothly with \"frequency\" from \"color\" to black\n\
00126 # and flips color in time\n\
00127 uint8 FADE_COLOR = 5 # will fade the colors in rainbow\n\
00128 \n\
00129 std_msgs/ColorRGBA color #the color which will be used\n\
00130 float32 frequency # in Hz\n\
00131 float32 timeout # in s, requested mode will be executed for max timout s.\n\
00132 # default is 0 and meens no timeout.\n\
00133 int32 pulses # spezifies the amount of pulses which will be executed.\n\
00134 # eg: mode = flash, pulses = 2. Meens the light will flash two times\n\
00135 int8 priority # priority [-20,20] default = 0. Modes with same or higher priorities will \n\
00136 # be executed.\n\
00137 ================================================================================\n\
00138 MSG: std_msgs/ColorRGBA\n\
00139 float32 r\n\
00140 float32 g\n\
00141 float32 b\n\
00142 float32 a\n\
00143 \n\
00144 ";
00145 }
00146
00147 static const char* value(const ::cob_light::LightMode_<ContainerAllocator> &) { return value(); }
00148 };
00149
00150 template<class ContainerAllocator> struct IsFixedSize< ::cob_light::LightMode_<ContainerAllocator> > : public TrueType {};
00151 }
00152 }
00153
00154 namespace ros
00155 {
00156 namespace serialization
00157 {
00158
00159 template<class ContainerAllocator> struct Serializer< ::cob_light::LightMode_<ContainerAllocator> >
00160 {
00161 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00162 {
00163 stream.next(m.mode);
00164 stream.next(m.color);
00165 stream.next(m.frequency);
00166 stream.next(m.timeout);
00167 stream.next(m.pulses);
00168 stream.next(m.priority);
00169 }
00170
00171 ROS_DECLARE_ALLINONE_SERIALIZER;
00172 };
00173 }
00174 }
00175
00176 namespace ros
00177 {
00178 namespace message_operations
00179 {
00180
00181 template<class ContainerAllocator>
00182 struct Printer< ::cob_light::LightMode_<ContainerAllocator> >
00183 {
00184 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cob_light::LightMode_<ContainerAllocator> & v)
00185 {
00186 s << indent << "mode: ";
00187 Printer<uint8_t>::stream(s, indent + " ", v.mode);
00188 s << indent << "color: ";
00189 s << std::endl;
00190 Printer< ::std_msgs::ColorRGBA_<ContainerAllocator> >::stream(s, indent + " ", v.color);
00191 s << indent << "frequency: ";
00192 Printer<float>::stream(s, indent + " ", v.frequency);
00193 s << indent << "timeout: ";
00194 Printer<float>::stream(s, indent + " ", v.timeout);
00195 s << indent << "pulses: ";
00196 Printer<int32_t>::stream(s, indent + " ", v.pulses);
00197 s << indent << "priority: ";
00198 Printer<int8_t>::stream(s, indent + " ", v.priority);
00199 }
00200 };
00201
00202
00203 }
00204 }
00205
00206 #endif // COB_LIGHT_MESSAGE_LIGHTMODE_H
00207