$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-asctec_drivers/doc_stacks/2013-03-05_11-30-36.379198/asctec_drivers/asctec_msgs/msg/CtrlInput.msg */ 00002 #ifndef ASCTEC_MSGS_MESSAGE_CTRLINPUT_H 00003 #define ASCTEC_MSGS_MESSAGE_CTRLINPUT_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/Header.h" 00018 00019 namespace asctec_msgs 00020 { 00021 template <class ContainerAllocator> 00022 struct CtrlInput_ { 00023 typedef CtrlInput_<ContainerAllocator> Type; 00024 00025 CtrlInput_() 00026 : header() 00027 , pitch(0) 00028 , roll(0) 00029 , yaw(0) 00030 , thrust(0) 00031 , ctrl(0) 00032 , chksum(0) 00033 { 00034 } 00035 00036 CtrlInput_(const ContainerAllocator& _alloc) 00037 : header(_alloc) 00038 , pitch(0) 00039 , roll(0) 00040 , yaw(0) 00041 , thrust(0) 00042 , ctrl(0) 00043 , chksum(0) 00044 { 00045 } 00046 00047 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00048 ::std_msgs::Header_<ContainerAllocator> header; 00049 00050 typedef int16_t _pitch_type; 00051 int16_t pitch; 00052 00053 typedef int16_t _roll_type; 00054 int16_t roll; 00055 00056 typedef int16_t _yaw_type; 00057 int16_t yaw; 00058 00059 typedef int16_t _thrust_type; 00060 int16_t thrust; 00061 00062 typedef int16_t _ctrl_type; 00063 int16_t ctrl; 00064 00065 typedef int16_t _chksum_type; 00066 int16_t chksum; 00067 00068 00069 private: 00070 static const char* __s_getDataType_() { return "asctec_msgs/CtrlInput"; } 00071 public: 00072 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00073 00074 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00075 00076 private: 00077 static const char* __s_getMD5Sum_() { return "6a2f3591afa7529005dcc3a5acd6e490"; } 00078 public: 00079 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00080 00081 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00082 00083 private: 00084 static const char* __s_getMessageDefinition_() { return "# Software License Agreement (BSD License)\n\ 00085 #\n\ 00086 # Copyright (c) 2010\n\ 00087 # William Morris <morris@ee.ccny.cuny.edu>\n\ 00088 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\ 00089 # All rights reserved.\n\ 00090 #\n\ 00091 # Redistribution and use in source and binary forms, with or without\n\ 00092 # modification, are permitted provided that the following conditions\n\ 00093 # are met:\n\ 00094 #\n\ 00095 # * Redistributions of source code must retain the above copyright\n\ 00096 # notice, this list of conditions and the following disclaimer.\n\ 00097 # * Redistributions in binary form must reproduce the above\n\ 00098 # copyright notice, this list of conditions and the following\n\ 00099 # disclaimer in the documentation and/or other materials provided\n\ 00100 # with the distribution.\n\ 00101 # * Neither the name of CCNY Robotics Lab nor the names of its\n\ 00102 # contributors may be used to endorse or promote products derived\n\ 00103 # from this software without specific prior written permission.\n\ 00104 #\n\ 00105 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\ 00106 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\ 00107 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\ 00108 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\ 00109 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\ 00110 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\ 00111 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\ 00112 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\ 00113 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\ 00114 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\ 00115 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\ 00116 # POSSIBILITY OF SUCH DAMAGE.\n\ 00117 \n\ 00118 Header header\n\ 00119 # serial command (=Scientific Interface)\n\ 00120 # Pitch input: -2047 .. 2047 (0 = neutral)\n\ 00121 int16 pitch\n\ 00122 # Roll input: -2047 .. 2047 (0 = neutral)\n\ 00123 int16 roll\n\ 00124 # R/C Stick input: -2047 .. 2047 (0 = neutral)\n\ 00125 int16 yaw\n\ 00126 # Collective: 0 .. 4095 (= 0 .. 100%)\n\ 00127 int16 thrust\n\ 00128 # control byte:\n\ 00129 # bit 0: pitch control enabled\n\ 00130 # bit 1: roll control enabled\n\ 00131 # bit 2: yaw control enabled\n\ 00132 # bit 3: thrust control enabled\n\ 00133 # These bits can be used to only enable one axis at a time and thus to control\n\ 00134 # the other axes manually. This usually helps a lot to set up and finetune\n\ 00135 # controllers for each axis seperately.\n\ 00136 int16 ctrl\n\ 00137 int16 chksum\n\ 00138 \n\ 00139 ================================================================================\n\ 00140 MSG: std_msgs/Header\n\ 00141 # Standard metadata for higher-level stamped data types.\n\ 00142 # This is generally used to communicate timestamped data \n\ 00143 # in a particular coordinate frame.\n\ 00144 # \n\ 00145 # sequence ID: consecutively increasing ID \n\ 00146 uint32 seq\n\ 00147 #Two-integer timestamp that is expressed as:\n\ 00148 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00149 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00150 # time-handling sugar is provided by the client library\n\ 00151 time stamp\n\ 00152 #Frame this data is associated with\n\ 00153 # 0: no frame\n\ 00154 # 1: global frame\n\ 00155 string frame_id\n\ 00156 \n\ 00157 "; } 00158 public: 00159 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00160 00161 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00162 00163 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00164 { 00165 ros::serialization::OStream stream(write_ptr, 1000000000); 00166 ros::serialization::serialize(stream, header); 00167 ros::serialization::serialize(stream, pitch); 00168 ros::serialization::serialize(stream, roll); 00169 ros::serialization::serialize(stream, yaw); 00170 ros::serialization::serialize(stream, thrust); 00171 ros::serialization::serialize(stream, ctrl); 00172 ros::serialization::serialize(stream, chksum); 00173 return stream.getData(); 00174 } 00175 00176 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00177 { 00178 ros::serialization::IStream stream(read_ptr, 1000000000); 00179 ros::serialization::deserialize(stream, header); 00180 ros::serialization::deserialize(stream, pitch); 00181 ros::serialization::deserialize(stream, roll); 00182 ros::serialization::deserialize(stream, yaw); 00183 ros::serialization::deserialize(stream, thrust); 00184 ros::serialization::deserialize(stream, ctrl); 00185 ros::serialization::deserialize(stream, chksum); 00186 return stream.getData(); 00187 } 00188 00189 ROS_DEPRECATED virtual uint32_t serializationLength() const 00190 { 00191 uint32_t size = 0; 00192 size += ros::serialization::serializationLength(header); 00193 size += ros::serialization::serializationLength(pitch); 00194 size += ros::serialization::serializationLength(roll); 00195 size += ros::serialization::serializationLength(yaw); 00196 size += ros::serialization::serializationLength(thrust); 00197 size += ros::serialization::serializationLength(ctrl); 00198 size += ros::serialization::serializationLength(chksum); 00199 return size; 00200 } 00201 00202 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput_<ContainerAllocator> > Ptr; 00203 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput_<ContainerAllocator> const> ConstPtr; 00204 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00205 }; // struct CtrlInput 00206 typedef ::asctec_msgs::CtrlInput_<std::allocator<void> > CtrlInput; 00207 00208 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput> CtrlInputPtr; 00209 typedef boost::shared_ptr< ::asctec_msgs::CtrlInput const> CtrlInputConstPtr; 00210 00211 00212 template<typename ContainerAllocator> 00213 std::ostream& operator<<(std::ostream& s, const ::asctec_msgs::CtrlInput_<ContainerAllocator> & v) 00214 { 00215 ros::message_operations::Printer< ::asctec_msgs::CtrlInput_<ContainerAllocator> >::stream(s, "", v); 00216 return s;} 00217 00218 } // namespace asctec_msgs 00219 00220 namespace ros 00221 { 00222 namespace message_traits 00223 { 00224 template<class ContainerAllocator> struct IsMessage< ::asctec_msgs::CtrlInput_<ContainerAllocator> > : public TrueType {}; 00225 template<class ContainerAllocator> struct IsMessage< ::asctec_msgs::CtrlInput_<ContainerAllocator> const> : public TrueType {}; 00226 template<class ContainerAllocator> 00227 struct MD5Sum< ::asctec_msgs::CtrlInput_<ContainerAllocator> > { 00228 static const char* value() 00229 { 00230 return "6a2f3591afa7529005dcc3a5acd6e490"; 00231 } 00232 00233 static const char* value(const ::asctec_msgs::CtrlInput_<ContainerAllocator> &) { return value(); } 00234 static const uint64_t static_value1 = 0x6a2f3591afa75290ULL; 00235 static const uint64_t static_value2 = 0x05dcc3a5acd6e490ULL; 00236 }; 00237 00238 template<class ContainerAllocator> 00239 struct DataType< ::asctec_msgs::CtrlInput_<ContainerAllocator> > { 00240 static const char* value() 00241 { 00242 return "asctec_msgs/CtrlInput"; 00243 } 00244 00245 static const char* value(const ::asctec_msgs::CtrlInput_<ContainerAllocator> &) { return value(); } 00246 }; 00247 00248 template<class ContainerAllocator> 00249 struct Definition< ::asctec_msgs::CtrlInput_<ContainerAllocator> > { 00250 static const char* value() 00251 { 00252 return "# Software License Agreement (BSD License)\n\ 00253 #\n\ 00254 # Copyright (c) 2010\n\ 00255 # William Morris <morris@ee.ccny.cuny.edu>\n\ 00256 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\ 00257 # All rights reserved.\n\ 00258 #\n\ 00259 # Redistribution and use in source and binary forms, with or without\n\ 00260 # modification, are permitted provided that the following conditions\n\ 00261 # are met:\n\ 00262 #\n\ 00263 # * Redistributions of source code must retain the above copyright\n\ 00264 # notice, this list of conditions and the following disclaimer.\n\ 00265 # * Redistributions in binary form must reproduce the above\n\ 00266 # copyright notice, this list of conditions and the following\n\ 00267 # disclaimer in the documentation and/or other materials provided\n\ 00268 # with the distribution.\n\ 00269 # * Neither the name of CCNY Robotics Lab nor the names of its\n\ 00270 # contributors may be used to endorse or promote products derived\n\ 00271 # from this software without specific prior written permission.\n\ 00272 #\n\ 00273 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\ 00274 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\ 00275 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\ 00276 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\ 00277 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\ 00278 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\ 00279 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\ 00280 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\ 00281 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\ 00282 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\ 00283 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\ 00284 # POSSIBILITY OF SUCH DAMAGE.\n\ 00285 \n\ 00286 Header header\n\ 00287 # serial command (=Scientific Interface)\n\ 00288 # Pitch input: -2047 .. 2047 (0 = neutral)\n\ 00289 int16 pitch\n\ 00290 # Roll input: -2047 .. 2047 (0 = neutral)\n\ 00291 int16 roll\n\ 00292 # R/C Stick input: -2047 .. 2047 (0 = neutral)\n\ 00293 int16 yaw\n\ 00294 # Collective: 0 .. 4095 (= 0 .. 100%)\n\ 00295 int16 thrust\n\ 00296 # control byte:\n\ 00297 # bit 0: pitch control enabled\n\ 00298 # bit 1: roll control enabled\n\ 00299 # bit 2: yaw control enabled\n\ 00300 # bit 3: thrust control enabled\n\ 00301 # These bits can be used to only enable one axis at a time and thus to control\n\ 00302 # the other axes manually. This usually helps a lot to set up and finetune\n\ 00303 # controllers for each axis seperately.\n\ 00304 int16 ctrl\n\ 00305 int16 chksum\n\ 00306 \n\ 00307 ================================================================================\n\ 00308 MSG: std_msgs/Header\n\ 00309 # Standard metadata for higher-level stamped data types.\n\ 00310 # This is generally used to communicate timestamped data \n\ 00311 # in a particular coordinate frame.\n\ 00312 # \n\ 00313 # sequence ID: consecutively increasing ID \n\ 00314 uint32 seq\n\ 00315 #Two-integer timestamp that is expressed as:\n\ 00316 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00317 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00318 # time-handling sugar is provided by the client library\n\ 00319 time stamp\n\ 00320 #Frame this data is associated with\n\ 00321 # 0: no frame\n\ 00322 # 1: global frame\n\ 00323 string frame_id\n\ 00324 \n\ 00325 "; 00326 } 00327 00328 static const char* value(const ::asctec_msgs::CtrlInput_<ContainerAllocator> &) { return value(); } 00329 }; 00330 00331 template<class ContainerAllocator> struct HasHeader< ::asctec_msgs::CtrlInput_<ContainerAllocator> > : public TrueType {}; 00332 template<class ContainerAllocator> struct HasHeader< const ::asctec_msgs::CtrlInput_<ContainerAllocator> > : public TrueType {}; 00333 } // namespace message_traits 00334 } // namespace ros 00335 00336 namespace ros 00337 { 00338 namespace serialization 00339 { 00340 00341 template<class ContainerAllocator> struct Serializer< ::asctec_msgs::CtrlInput_<ContainerAllocator> > 00342 { 00343 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00344 { 00345 stream.next(m.header); 00346 stream.next(m.pitch); 00347 stream.next(m.roll); 00348 stream.next(m.yaw); 00349 stream.next(m.thrust); 00350 stream.next(m.ctrl); 00351 stream.next(m.chksum); 00352 } 00353 00354 ROS_DECLARE_ALLINONE_SERIALIZER; 00355 }; // struct CtrlInput_ 00356 } // namespace serialization 00357 } // namespace ros 00358 00359 namespace ros 00360 { 00361 namespace message_operations 00362 { 00363 00364 template<class ContainerAllocator> 00365 struct Printer< ::asctec_msgs::CtrlInput_<ContainerAllocator> > 00366 { 00367 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::asctec_msgs::CtrlInput_<ContainerAllocator> & v) 00368 { 00369 s << indent << "header: "; 00370 s << std::endl; 00371 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00372 s << indent << "pitch: "; 00373 Printer<int16_t>::stream(s, indent + " ", v.pitch); 00374 s << indent << "roll: "; 00375 Printer<int16_t>::stream(s, indent + " ", v.roll); 00376 s << indent << "yaw: "; 00377 Printer<int16_t>::stream(s, indent + " ", v.yaw); 00378 s << indent << "thrust: "; 00379 Printer<int16_t>::stream(s, indent + " ", v.thrust); 00380 s << indent << "ctrl: "; 00381 Printer<int16_t>::stream(s, indent + " ", v.ctrl); 00382 s << indent << "chksum: "; 00383 Printer<int16_t>::stream(s, indent + " ", v.chksum); 00384 } 00385 }; 00386 00387 00388 } // namespace message_operations 00389 } // namespace ros 00390 00391 #endif // ASCTEC_MSGS_MESSAGE_CTRLINPUT_H 00392