$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-joystick_drivers/doc_stacks/2013-03-01_15-52-25.763642/joystick_drivers/wiimote/msg/LEDControl.msg */ 00002 #ifndef WIIMOTE_MESSAGE_LEDCONTROL_H 00003 #define WIIMOTE_MESSAGE_LEDCONTROL_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 "wiimote/TimedSwitch.h" 00018 00019 namespace wiimote 00020 { 00021 template <class ContainerAllocator> 00022 struct LEDControl_ { 00023 typedef LEDControl_<ContainerAllocator> Type; 00024 00025 LEDControl_() 00026 : timed_switch_array() 00027 { 00028 } 00029 00030 LEDControl_(const ContainerAllocator& _alloc) 00031 : timed_switch_array(_alloc) 00032 { 00033 } 00034 00035 typedef std::vector< ::wiimote::TimedSwitch_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::wiimote::TimedSwitch_<ContainerAllocator> >::other > _timed_switch_array_type; 00036 std::vector< ::wiimote::TimedSwitch_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::wiimote::TimedSwitch_<ContainerAllocator> >::other > timed_switch_array; 00037 00038 00039 ROS_DEPRECATED uint32_t get_timed_switch_array_size() const { return (uint32_t)timed_switch_array.size(); } 00040 ROS_DEPRECATED void set_timed_switch_array_size(uint32_t size) { timed_switch_array.resize((size_t)size); } 00041 ROS_DEPRECATED void get_timed_switch_array_vec(std::vector< ::wiimote::TimedSwitch_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::wiimote::TimedSwitch_<ContainerAllocator> >::other > & vec) const { vec = this->timed_switch_array; } 00042 ROS_DEPRECATED void set_timed_switch_array_vec(const std::vector< ::wiimote::TimedSwitch_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::wiimote::TimedSwitch_<ContainerAllocator> >::other > & vec) { this->timed_switch_array = vec; } 00043 private: 00044 static const char* __s_getDataType_() { return "wiimote/LEDControl"; } 00045 public: 00046 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00047 00048 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00049 00050 private: 00051 static const char* __s_getMD5Sum_() { return "d0477eee2c164b8a9582a596f92c6f08"; } 00052 public: 00053 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00054 00055 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00056 00057 private: 00058 static const char* __s_getMessageDefinition_() { return "# Message to request Wiimote LED operations. The Wiimote has four\n\ 00059 # LEDs. This message enables its user to turn each individual LED\n\ 00060 # on or off, and to define a blink pattern for each LEDs.\n\ 00061 # See TimedSwitch.msg for details.\n\ 00062 \n\ 00063 TimedSwitch[] timed_switch_array \n\ 00064 \n\ 00065 ================================================================================\n\ 00066 MSG: wiimote/TimedSwitch\n\ 00067 # TimedSwitch allows sender to:\n\ 00068 # o turn a switch on,\n\ 00069 # o turn a switch off, and\n\ 00070 # o repeat an on/off pattern forever or for a\n\ 00071 # given number of times.\n\ 00072 # Fields (refer to definitions of constants in the definition body):\n\ 00073 # o switch_mode:\n\ 00074 # ON: turn on (num_cycles and pulse_pattern fields are ignored)\n\ 00075 # OFF: turn off (num_cycles and pulse_pattern fields are ignored)\n\ 00076 # NO_CHANGE: leave LED in its current state\n\ 00077 # REPEAT: repeat an on/off pattern for as long\n\ 00078 # as is indicated in the num_cycles field. The\n\ 00079 # pattern is defined in the pulse_pattern field.\n\ 00080 #\n\ 00081 # o num_cycles:\n\ 00082 # n>=0: run the pattern that is defined in pulse_pattern\n\ 00083 # n times.\n\ 00084 # n==FOREVER: run the pattern that is defined in pulse_pattern\n\ 00085 # until a new TimedSwitch message is sent. \n\ 00086 #\n\ 00087 # o pulse_pattern:\n\ 00088 # A series of time durations in fractions of a second. The\n\ 00089 # first number is the duration for having the switch on.\n\ 00090 # The second number is the duration for which the switch\n\ 00091 # is off. The third is an 'on' period again, etc.\n\ 00092 # A pattern is terminated with the end of the array.\n\ 00093 # \n\ 00094 # Example: [1,1] specifies an on-off sequence of 1 second. \n\ 00095 \n\ 00096 int8 ON = 1\n\ 00097 int8 OFF = 0\n\ 00098 int8 NO_CHANGE = -2\n\ 00099 int8 REPEAT = -1\n\ 00100 int8 FOREVER = -1\n\ 00101 \n\ 00102 int8 switch_mode\n\ 00103 int32 num_cycles\n\ 00104 float32[] pulse_pattern\n\ 00105 \n\ 00106 "; } 00107 public: 00108 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00109 00110 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00111 00112 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00113 { 00114 ros::serialization::OStream stream(write_ptr, 1000000000); 00115 ros::serialization::serialize(stream, timed_switch_array); 00116 return stream.getData(); 00117 } 00118 00119 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00120 { 00121 ros::serialization::IStream stream(read_ptr, 1000000000); 00122 ros::serialization::deserialize(stream, timed_switch_array); 00123 return stream.getData(); 00124 } 00125 00126 ROS_DEPRECATED virtual uint32_t serializationLength() const 00127 { 00128 uint32_t size = 0; 00129 size += ros::serialization::serializationLength(timed_switch_array); 00130 return size; 00131 } 00132 00133 typedef boost::shared_ptr< ::wiimote::LEDControl_<ContainerAllocator> > Ptr; 00134 typedef boost::shared_ptr< ::wiimote::LEDControl_<ContainerAllocator> const> ConstPtr; 00135 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00136 }; // struct LEDControl 00137 typedef ::wiimote::LEDControl_<std::allocator<void> > LEDControl; 00138 00139 typedef boost::shared_ptr< ::wiimote::LEDControl> LEDControlPtr; 00140 typedef boost::shared_ptr< ::wiimote::LEDControl const> LEDControlConstPtr; 00141 00142 00143 template<typename ContainerAllocator> 00144 std::ostream& operator<<(std::ostream& s, const ::wiimote::LEDControl_<ContainerAllocator> & v) 00145 { 00146 ros::message_operations::Printer< ::wiimote::LEDControl_<ContainerAllocator> >::stream(s, "", v); 00147 return s;} 00148 00149 } // namespace wiimote 00150 00151 namespace ros 00152 { 00153 namespace message_traits 00154 { 00155 template<class ContainerAllocator> struct IsMessage< ::wiimote::LEDControl_<ContainerAllocator> > : public TrueType {}; 00156 template<class ContainerAllocator> struct IsMessage< ::wiimote::LEDControl_<ContainerAllocator> const> : public TrueType {}; 00157 template<class ContainerAllocator> 00158 struct MD5Sum< ::wiimote::LEDControl_<ContainerAllocator> > { 00159 static const char* value() 00160 { 00161 return "d0477eee2c164b8a9582a596f92c6f08"; 00162 } 00163 00164 static const char* value(const ::wiimote::LEDControl_<ContainerAllocator> &) { return value(); } 00165 static const uint64_t static_value1 = 0xd0477eee2c164b8aULL; 00166 static const uint64_t static_value2 = 0x9582a596f92c6f08ULL; 00167 }; 00168 00169 template<class ContainerAllocator> 00170 struct DataType< ::wiimote::LEDControl_<ContainerAllocator> > { 00171 static const char* value() 00172 { 00173 return "wiimote/LEDControl"; 00174 } 00175 00176 static const char* value(const ::wiimote::LEDControl_<ContainerAllocator> &) { return value(); } 00177 }; 00178 00179 template<class ContainerAllocator> 00180 struct Definition< ::wiimote::LEDControl_<ContainerAllocator> > { 00181 static const char* value() 00182 { 00183 return "# Message to request Wiimote LED operations. The Wiimote has four\n\ 00184 # LEDs. This message enables its user to turn each individual LED\n\ 00185 # on or off, and to define a blink pattern for each LEDs.\n\ 00186 # See TimedSwitch.msg for details.\n\ 00187 \n\ 00188 TimedSwitch[] timed_switch_array \n\ 00189 \n\ 00190 ================================================================================\n\ 00191 MSG: wiimote/TimedSwitch\n\ 00192 # TimedSwitch allows sender to:\n\ 00193 # o turn a switch on,\n\ 00194 # o turn a switch off, and\n\ 00195 # o repeat an on/off pattern forever or for a\n\ 00196 # given number of times.\n\ 00197 # Fields (refer to definitions of constants in the definition body):\n\ 00198 # o switch_mode:\n\ 00199 # ON: turn on (num_cycles and pulse_pattern fields are ignored)\n\ 00200 # OFF: turn off (num_cycles and pulse_pattern fields are ignored)\n\ 00201 # NO_CHANGE: leave LED in its current state\n\ 00202 # REPEAT: repeat an on/off pattern for as long\n\ 00203 # as is indicated in the num_cycles field. The\n\ 00204 # pattern is defined in the pulse_pattern field.\n\ 00205 #\n\ 00206 # o num_cycles:\n\ 00207 # n>=0: run the pattern that is defined in pulse_pattern\n\ 00208 # n times.\n\ 00209 # n==FOREVER: run the pattern that is defined in pulse_pattern\n\ 00210 # until a new TimedSwitch message is sent. \n\ 00211 #\n\ 00212 # o pulse_pattern:\n\ 00213 # A series of time durations in fractions of a second. The\n\ 00214 # first number is the duration for having the switch on.\n\ 00215 # The second number is the duration for which the switch\n\ 00216 # is off. The third is an 'on' period again, etc.\n\ 00217 # A pattern is terminated with the end of the array.\n\ 00218 # \n\ 00219 # Example: [1,1] specifies an on-off sequence of 1 second. \n\ 00220 \n\ 00221 int8 ON = 1\n\ 00222 int8 OFF = 0\n\ 00223 int8 NO_CHANGE = -2\n\ 00224 int8 REPEAT = -1\n\ 00225 int8 FOREVER = -1\n\ 00226 \n\ 00227 int8 switch_mode\n\ 00228 int32 num_cycles\n\ 00229 float32[] pulse_pattern\n\ 00230 \n\ 00231 "; 00232 } 00233 00234 static const char* value(const ::wiimote::LEDControl_<ContainerAllocator> &) { return value(); } 00235 }; 00236 00237 } // namespace message_traits 00238 } // namespace ros 00239 00240 namespace ros 00241 { 00242 namespace serialization 00243 { 00244 00245 template<class ContainerAllocator> struct Serializer< ::wiimote::LEDControl_<ContainerAllocator> > 00246 { 00247 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00248 { 00249 stream.next(m.timed_switch_array); 00250 } 00251 00252 ROS_DECLARE_ALLINONE_SERIALIZER; 00253 }; // struct LEDControl_ 00254 } // namespace serialization 00255 } // namespace ros 00256 00257 namespace ros 00258 { 00259 namespace message_operations 00260 { 00261 00262 template<class ContainerAllocator> 00263 struct Printer< ::wiimote::LEDControl_<ContainerAllocator> > 00264 { 00265 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::wiimote::LEDControl_<ContainerAllocator> & v) 00266 { 00267 s << indent << "timed_switch_array[]" << std::endl; 00268 for (size_t i = 0; i < v.timed_switch_array.size(); ++i) 00269 { 00270 s << indent << " timed_switch_array[" << i << "]: "; 00271 s << std::endl; 00272 s << indent; 00273 Printer< ::wiimote::TimedSwitch_<ContainerAllocator> >::stream(s, indent + " ", v.timed_switch_array[i]); 00274 } 00275 } 00276 }; 00277 00278 00279 } // namespace message_operations 00280 } // namespace ros 00281 00282 #endif // WIIMOTE_MESSAGE_LEDCONTROL_H 00283