$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/RumbleControl.msg */ 00002 #ifndef WIIMOTE_MESSAGE_RUMBLECONTROL_H 00003 #define WIIMOTE_MESSAGE_RUMBLECONTROL_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 RumbleControl_ { 00023 typedef RumbleControl_<ContainerAllocator> Type; 00024 00025 RumbleControl_() 00026 : rumble() 00027 { 00028 } 00029 00030 RumbleControl_(const ContainerAllocator& _alloc) 00031 : rumble(_alloc) 00032 { 00033 } 00034 00035 typedef ::wiimote::TimedSwitch_<ContainerAllocator> _rumble_type; 00036 ::wiimote::TimedSwitch_<ContainerAllocator> rumble; 00037 00038 00039 private: 00040 static const char* __s_getDataType_() { return "wiimote/RumbleControl"; } 00041 public: 00042 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00043 00044 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00045 00046 private: 00047 static const char* __s_getMD5Sum_() { return "264ec2f3013a512070cd67c42486214e"; } 00048 public: 00049 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00050 00051 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00052 00053 private: 00054 static const char* __s_getMessageDefinition_() { return "# Message to control the Wiimote rumble (vibrator).\n\ 00055 # We simply use a TimedSwitch. So rumble can\n\ 00056 # be turned on (switch_mode == 1), off (switch_mode == 0),\n\ 00057 # or pulsed with a timing pattern (switch_mode == -1).\n\ 00058 # Number of times the cycle is repeated: num_cycles\n\ 00059 # (-1: repeat till next RumbleControl message). pulse_pattern\n\ 00060 # contains the time on/off pattern. (see also TimedSwitch.msg)\n\ 00061 \n\ 00062 TimedSwitch rumble\n\ 00063 \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, rumble); 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, rumble); 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(rumble); 00130 return size; 00131 } 00132 00133 typedef boost::shared_ptr< ::wiimote::RumbleControl_<ContainerAllocator> > Ptr; 00134 typedef boost::shared_ptr< ::wiimote::RumbleControl_<ContainerAllocator> const> ConstPtr; 00135 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00136 }; // struct RumbleControl 00137 typedef ::wiimote::RumbleControl_<std::allocator<void> > RumbleControl; 00138 00139 typedef boost::shared_ptr< ::wiimote::RumbleControl> RumbleControlPtr; 00140 typedef boost::shared_ptr< ::wiimote::RumbleControl const> RumbleControlConstPtr; 00141 00142 00143 template<typename ContainerAllocator> 00144 std::ostream& operator<<(std::ostream& s, const ::wiimote::RumbleControl_<ContainerAllocator> & v) 00145 { 00146 ros::message_operations::Printer< ::wiimote::RumbleControl_<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::RumbleControl_<ContainerAllocator> > : public TrueType {}; 00156 template<class ContainerAllocator> struct IsMessage< ::wiimote::RumbleControl_<ContainerAllocator> const> : public TrueType {}; 00157 template<class ContainerAllocator> 00158 struct MD5Sum< ::wiimote::RumbleControl_<ContainerAllocator> > { 00159 static const char* value() 00160 { 00161 return "264ec2f3013a512070cd67c42486214e"; 00162 } 00163 00164 static const char* value(const ::wiimote::RumbleControl_<ContainerAllocator> &) { return value(); } 00165 static const uint64_t static_value1 = 0x264ec2f3013a5120ULL; 00166 static const uint64_t static_value2 = 0x70cd67c42486214eULL; 00167 }; 00168 00169 template<class ContainerAllocator> 00170 struct DataType< ::wiimote::RumbleControl_<ContainerAllocator> > { 00171 static const char* value() 00172 { 00173 return "wiimote/RumbleControl"; 00174 } 00175 00176 static const char* value(const ::wiimote::RumbleControl_<ContainerAllocator> &) { return value(); } 00177 }; 00178 00179 template<class ContainerAllocator> 00180 struct Definition< ::wiimote::RumbleControl_<ContainerAllocator> > { 00181 static const char* value() 00182 { 00183 return "# Message to control the Wiimote rumble (vibrator).\n\ 00184 # We simply use a TimedSwitch. So rumble can\n\ 00185 # be turned on (switch_mode == 1), off (switch_mode == 0),\n\ 00186 # or pulsed with a timing pattern (switch_mode == -1).\n\ 00187 # Number of times the cycle is repeated: num_cycles\n\ 00188 # (-1: repeat till next RumbleControl message). pulse_pattern\n\ 00189 # contains the time on/off pattern. (see also TimedSwitch.msg)\n\ 00190 \n\ 00191 TimedSwitch rumble\n\ 00192 \n\ 00193 \n\ 00194 ================================================================================\n\ 00195 MSG: wiimote/TimedSwitch\n\ 00196 # TimedSwitch allows sender to:\n\ 00197 # o turn a switch on,\n\ 00198 # o turn a switch off, and\n\ 00199 # o repeat an on/off pattern forever or for a\n\ 00200 # given number of times.\n\ 00201 # Fields (refer to definitions of constants in the definition body):\n\ 00202 # o switch_mode:\n\ 00203 # ON: turn on (num_cycles and pulse_pattern fields are ignored)\n\ 00204 # OFF: turn off (num_cycles and pulse_pattern fields are ignored)\n\ 00205 # NO_CHANGE: leave LED in its current state\n\ 00206 # REPEAT: repeat an on/off pattern for as long\n\ 00207 # as is indicated in the num_cycles field. The\n\ 00208 # pattern is defined in the pulse_pattern field.\n\ 00209 #\n\ 00210 # o num_cycles:\n\ 00211 # n>=0: run the pattern that is defined in pulse_pattern\n\ 00212 # n times.\n\ 00213 # n==FOREVER: run the pattern that is defined in pulse_pattern\n\ 00214 # until a new TimedSwitch message is sent. \n\ 00215 #\n\ 00216 # o pulse_pattern:\n\ 00217 # A series of time durations in fractions of a second. The\n\ 00218 # first number is the duration for having the switch on.\n\ 00219 # The second number is the duration for which the switch\n\ 00220 # is off. The third is an 'on' period again, etc.\n\ 00221 # A pattern is terminated with the end of the array.\n\ 00222 # \n\ 00223 # Example: [1,1] specifies an on-off sequence of 1 second. \n\ 00224 \n\ 00225 int8 ON = 1\n\ 00226 int8 OFF = 0\n\ 00227 int8 NO_CHANGE = -2\n\ 00228 int8 REPEAT = -1\n\ 00229 int8 FOREVER = -1\n\ 00230 \n\ 00231 int8 switch_mode\n\ 00232 int32 num_cycles\n\ 00233 float32[] pulse_pattern\n\ 00234 \n\ 00235 "; 00236 } 00237 00238 static const char* value(const ::wiimote::RumbleControl_<ContainerAllocator> &) { return value(); } 00239 }; 00240 00241 } // namespace message_traits 00242 } // namespace ros 00243 00244 namespace ros 00245 { 00246 namespace serialization 00247 { 00248 00249 template<class ContainerAllocator> struct Serializer< ::wiimote::RumbleControl_<ContainerAllocator> > 00250 { 00251 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00252 { 00253 stream.next(m.rumble); 00254 } 00255 00256 ROS_DECLARE_ALLINONE_SERIALIZER; 00257 }; // struct RumbleControl_ 00258 } // namespace serialization 00259 } // namespace ros 00260 00261 namespace ros 00262 { 00263 namespace message_operations 00264 { 00265 00266 template<class ContainerAllocator> 00267 struct Printer< ::wiimote::RumbleControl_<ContainerAllocator> > 00268 { 00269 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::wiimote::RumbleControl_<ContainerAllocator> & v) 00270 { 00271 s << indent << "rumble: "; 00272 s << std::endl; 00273 Printer< ::wiimote::TimedSwitch_<ContainerAllocator> >::stream(s, indent + " ", v.rumble); 00274 } 00275 }; 00276 00277 00278 } // namespace message_operations 00279 } // namespace ros 00280 00281 #endif // WIIMOTE_MESSAGE_RUMBLECONTROL_H 00282