00001
00002 #ifndef ASCTEC_MSGS_MESSAGE_LLSTATUS_H
00003 #define ASCTEC_MSGS_MESSAGE_LLSTATUS_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014
00015 namespace asctec_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct LLStatus_ : public ros::Message
00019 {
00020 typedef LLStatus_<ContainerAllocator> Type;
00021
00022 LLStatus_()
00023 : header()
00024 , battery_voltage_1(0)
00025 , battery_voltage_2(0)
00026 , status(0)
00027 , cpu_load(0)
00028 , compass_enabled(0)
00029 , chksum_error(0)
00030 , flying(0)
00031 , motors_on(0)
00032 , flightMode(0)
00033 , up_time(0)
00034 {
00035 }
00036
00037 LLStatus_(const ContainerAllocator& _alloc)
00038 : header(_alloc)
00039 , battery_voltage_1(0)
00040 , battery_voltage_2(0)
00041 , status(0)
00042 , cpu_load(0)
00043 , compass_enabled(0)
00044 , chksum_error(0)
00045 , flying(0)
00046 , motors_on(0)
00047 , flightMode(0)
00048 , up_time(0)
00049 {
00050 }
00051
00052 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00053 ::std_msgs::Header_<ContainerAllocator> header;
00054
00055 typedef int16_t _battery_voltage_1_type;
00056 int16_t battery_voltage_1;
00057
00058 typedef int16_t _battery_voltage_2_type;
00059 int16_t battery_voltage_2;
00060
00061 typedef int16_t _status_type;
00062 int16_t status;
00063
00064 typedef int16_t _cpu_load_type;
00065 int16_t cpu_load;
00066
00067 typedef int8_t _compass_enabled_type;
00068 int8_t compass_enabled;
00069
00070 typedef int8_t _chksum_error_type;
00071 int8_t chksum_error;
00072
00073 typedef int8_t _flying_type;
00074 int8_t flying;
00075
00076 typedef int8_t _motors_on_type;
00077 int8_t motors_on;
00078
00079 typedef int16_t _flightMode_type;
00080 int16_t flightMode;
00081
00082 typedef int16_t _up_time_type;
00083 int16_t up_time;
00084
00085
00086 private:
00087 static const char* __s_getDataType_() { return "asctec_msgs/LLStatus"; }
00088 public:
00089 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00090
00091 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00092
00093 private:
00094 static const char* __s_getMD5Sum_() { return "e0dae36eea5774367686a40e1843c5e2"; }
00095 public:
00096 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00097
00098 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00099
00100 private:
00101 static const char* __s_getMessageDefinition_() { return "# Software License Agreement (BSD License)\n\
00102 #\n\
00103 # Copyright (c) 2010\n\
00104 # William Morris <morris@ee.ccny.cuny.edu>\n\
00105 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00106 # All rights reserved.\n\
00107 #\n\
00108 # Redistribution and use in source and binary forms, with or without\n\
00109 # modification, are permitted provided that the following conditions\n\
00110 # are met:\n\
00111 #\n\
00112 # * Redistributions of source code must retain the above copyright\n\
00113 # notice, this list of conditions and the following disclaimer.\n\
00114 # * Redistributions in binary form must reproduce the above\n\
00115 # copyright notice, this list of conditions and the following\n\
00116 # disclaimer in the documentation and/or other materials provided\n\
00117 # with the distribution.\n\
00118 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00119 # contributors may be used to endorse or promote products derived\n\
00120 # from this software without specific prior written permission.\n\
00121 #\n\
00122 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00123 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00124 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00125 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00126 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00127 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00128 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00129 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00130 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00131 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00132 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00133 # POSSIBILITY OF SUCH DAMAGE.\n\
00134 \n\
00135 Header header\n\
00136 # battery voltages in mV\n\
00137 int16 battery_voltage_1\n\
00138 int16 battery_voltage_2\n\
00139 # dont care\n\
00140 int16 status\n\
00141 # Controller cycles per second (should be about 1000)\n\
00142 int16 cpu_load\n\
00143 # dont care\n\
00144 int8 compass_enabled\n\
00145 int8 chksum_error\n\
00146 int8 flying\n\
00147 int8 motors_on\n\
00148 int16 flightMode\n\
00149 # Time motors are turning\n\
00150 int16 up_time\n\
00151 \n\
00152 \n\
00153 ================================================================================\n\
00154 MSG: std_msgs/Header\n\
00155 # Standard metadata for higher-level stamped data types.\n\
00156 # This is generally used to communicate timestamped data \n\
00157 # in a particular coordinate frame.\n\
00158 # \n\
00159 # sequence ID: consecutively increasing ID \n\
00160 uint32 seq\n\
00161 #Two-integer timestamp that is expressed as:\n\
00162 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00163 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00164 # time-handling sugar is provided by the client library\n\
00165 time stamp\n\
00166 #Frame this data is associated with\n\
00167 # 0: no frame\n\
00168 # 1: global frame\n\
00169 string frame_id\n\
00170 \n\
00171 "; }
00172 public:
00173 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00174
00175 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00176
00177 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00178 {
00179 ros::serialization::OStream stream(write_ptr, 1000000000);
00180 ros::serialization::serialize(stream, header);
00181 ros::serialization::serialize(stream, battery_voltage_1);
00182 ros::serialization::serialize(stream, battery_voltage_2);
00183 ros::serialization::serialize(stream, status);
00184 ros::serialization::serialize(stream, cpu_load);
00185 ros::serialization::serialize(stream, compass_enabled);
00186 ros::serialization::serialize(stream, chksum_error);
00187 ros::serialization::serialize(stream, flying);
00188 ros::serialization::serialize(stream, motors_on);
00189 ros::serialization::serialize(stream, flightMode);
00190 ros::serialization::serialize(stream, up_time);
00191 return stream.getData();
00192 }
00193
00194 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00195 {
00196 ros::serialization::IStream stream(read_ptr, 1000000000);
00197 ros::serialization::deserialize(stream, header);
00198 ros::serialization::deserialize(stream, battery_voltage_1);
00199 ros::serialization::deserialize(stream, battery_voltage_2);
00200 ros::serialization::deserialize(stream, status);
00201 ros::serialization::deserialize(stream, cpu_load);
00202 ros::serialization::deserialize(stream, compass_enabled);
00203 ros::serialization::deserialize(stream, chksum_error);
00204 ros::serialization::deserialize(stream, flying);
00205 ros::serialization::deserialize(stream, motors_on);
00206 ros::serialization::deserialize(stream, flightMode);
00207 ros::serialization::deserialize(stream, up_time);
00208 return stream.getData();
00209 }
00210
00211 ROS_DEPRECATED virtual uint32_t serializationLength() const
00212 {
00213 uint32_t size = 0;
00214 size += ros::serialization::serializationLength(header);
00215 size += ros::serialization::serializationLength(battery_voltage_1);
00216 size += ros::serialization::serializationLength(battery_voltage_2);
00217 size += ros::serialization::serializationLength(status);
00218 size += ros::serialization::serializationLength(cpu_load);
00219 size += ros::serialization::serializationLength(compass_enabled);
00220 size += ros::serialization::serializationLength(chksum_error);
00221 size += ros::serialization::serializationLength(flying);
00222 size += ros::serialization::serializationLength(motors_on);
00223 size += ros::serialization::serializationLength(flightMode);
00224 size += ros::serialization::serializationLength(up_time);
00225 return size;
00226 }
00227
00228 typedef boost::shared_ptr< ::asctec_msgs::LLStatus_<ContainerAllocator> > Ptr;
00229 typedef boost::shared_ptr< ::asctec_msgs::LLStatus_<ContainerAllocator> const> ConstPtr;
00230 };
00231 typedef ::asctec_msgs::LLStatus_<std::allocator<void> > LLStatus;
00232
00233 typedef boost::shared_ptr< ::asctec_msgs::LLStatus> LLStatusPtr;
00234 typedef boost::shared_ptr< ::asctec_msgs::LLStatus const> LLStatusConstPtr;
00235
00236
00237 template<typename ContainerAllocator>
00238 std::ostream& operator<<(std::ostream& s, const ::asctec_msgs::LLStatus_<ContainerAllocator> & v)
00239 {
00240 ros::message_operations::Printer< ::asctec_msgs::LLStatus_<ContainerAllocator> >::stream(s, "", v);
00241 return s;}
00242
00243 }
00244
00245 namespace ros
00246 {
00247 namespace message_traits
00248 {
00249 template<class ContainerAllocator>
00250 struct MD5Sum< ::asctec_msgs::LLStatus_<ContainerAllocator> > {
00251 static const char* value()
00252 {
00253 return "e0dae36eea5774367686a40e1843c5e2";
00254 }
00255
00256 static const char* value(const ::asctec_msgs::LLStatus_<ContainerAllocator> &) { return value(); }
00257 static const uint64_t static_value1 = 0xe0dae36eea577436ULL;
00258 static const uint64_t static_value2 = 0x7686a40e1843c5e2ULL;
00259 };
00260
00261 template<class ContainerAllocator>
00262 struct DataType< ::asctec_msgs::LLStatus_<ContainerAllocator> > {
00263 static const char* value()
00264 {
00265 return "asctec_msgs/LLStatus";
00266 }
00267
00268 static const char* value(const ::asctec_msgs::LLStatus_<ContainerAllocator> &) { return value(); }
00269 };
00270
00271 template<class ContainerAllocator>
00272 struct Definition< ::asctec_msgs::LLStatus_<ContainerAllocator> > {
00273 static const char* value()
00274 {
00275 return "# Software License Agreement (BSD License)\n\
00276 #\n\
00277 # Copyright (c) 2010\n\
00278 # William Morris <morris@ee.ccny.cuny.edu>\n\
00279 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00280 # All rights reserved.\n\
00281 #\n\
00282 # Redistribution and use in source and binary forms, with or without\n\
00283 # modification, are permitted provided that the following conditions\n\
00284 # are met:\n\
00285 #\n\
00286 # * Redistributions of source code must retain the above copyright\n\
00287 # notice, this list of conditions and the following disclaimer.\n\
00288 # * Redistributions in binary form must reproduce the above\n\
00289 # copyright notice, this list of conditions and the following\n\
00290 # disclaimer in the documentation and/or other materials provided\n\
00291 # with the distribution.\n\
00292 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00293 # contributors may be used to endorse or promote products derived\n\
00294 # from this software without specific prior written permission.\n\
00295 #\n\
00296 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00297 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00298 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00299 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00300 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00301 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00302 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00303 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00304 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00305 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00306 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00307 # POSSIBILITY OF SUCH DAMAGE.\n\
00308 \n\
00309 Header header\n\
00310 # battery voltages in mV\n\
00311 int16 battery_voltage_1\n\
00312 int16 battery_voltage_2\n\
00313 # dont care\n\
00314 int16 status\n\
00315 # Controller cycles per second (should be about 1000)\n\
00316 int16 cpu_load\n\
00317 # dont care\n\
00318 int8 compass_enabled\n\
00319 int8 chksum_error\n\
00320 int8 flying\n\
00321 int8 motors_on\n\
00322 int16 flightMode\n\
00323 # Time motors are turning\n\
00324 int16 up_time\n\
00325 \n\
00326 \n\
00327 ================================================================================\n\
00328 MSG: std_msgs/Header\n\
00329 # Standard metadata for higher-level stamped data types.\n\
00330 # This is generally used to communicate timestamped data \n\
00331 # in a particular coordinate frame.\n\
00332 # \n\
00333 # sequence ID: consecutively increasing ID \n\
00334 uint32 seq\n\
00335 #Two-integer timestamp that is expressed as:\n\
00336 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00337 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00338 # time-handling sugar is provided by the client library\n\
00339 time stamp\n\
00340 #Frame this data is associated with\n\
00341 # 0: no frame\n\
00342 # 1: global frame\n\
00343 string frame_id\n\
00344 \n\
00345 ";
00346 }
00347
00348 static const char* value(const ::asctec_msgs::LLStatus_<ContainerAllocator> &) { return value(); }
00349 };
00350
00351 template<class ContainerAllocator> struct HasHeader< ::asctec_msgs::LLStatus_<ContainerAllocator> > : public TrueType {};
00352 template<class ContainerAllocator> struct HasHeader< const ::asctec_msgs::LLStatus_<ContainerAllocator> > : public TrueType {};
00353 }
00354 }
00355
00356 namespace ros
00357 {
00358 namespace serialization
00359 {
00360
00361 template<class ContainerAllocator> struct Serializer< ::asctec_msgs::LLStatus_<ContainerAllocator> >
00362 {
00363 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00364 {
00365 stream.next(m.header);
00366 stream.next(m.battery_voltage_1);
00367 stream.next(m.battery_voltage_2);
00368 stream.next(m.status);
00369 stream.next(m.cpu_load);
00370 stream.next(m.compass_enabled);
00371 stream.next(m.chksum_error);
00372 stream.next(m.flying);
00373 stream.next(m.motors_on);
00374 stream.next(m.flightMode);
00375 stream.next(m.up_time);
00376 }
00377
00378 ROS_DECLARE_ALLINONE_SERIALIZER;
00379 };
00380 }
00381 }
00382
00383 namespace ros
00384 {
00385 namespace message_operations
00386 {
00387
00388 template<class ContainerAllocator>
00389 struct Printer< ::asctec_msgs::LLStatus_<ContainerAllocator> >
00390 {
00391 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::asctec_msgs::LLStatus_<ContainerAllocator> & v)
00392 {
00393 s << indent << "header: ";
00394 s << std::endl;
00395 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00396 s << indent << "battery_voltage_1: ";
00397 Printer<int16_t>::stream(s, indent + " ", v.battery_voltage_1);
00398 s << indent << "battery_voltage_2: ";
00399 Printer<int16_t>::stream(s, indent + " ", v.battery_voltage_2);
00400 s << indent << "status: ";
00401 Printer<int16_t>::stream(s, indent + " ", v.status);
00402 s << indent << "cpu_load: ";
00403 Printer<int16_t>::stream(s, indent + " ", v.cpu_load);
00404 s << indent << "compass_enabled: ";
00405 Printer<int8_t>::stream(s, indent + " ", v.compass_enabled);
00406 s << indent << "chksum_error: ";
00407 Printer<int8_t>::stream(s, indent + " ", v.chksum_error);
00408 s << indent << "flying: ";
00409 Printer<int8_t>::stream(s, indent + " ", v.flying);
00410 s << indent << "motors_on: ";
00411 Printer<int8_t>::stream(s, indent + " ", v.motors_on);
00412 s << indent << "flightMode: ";
00413 Printer<int16_t>::stream(s, indent + " ", v.flightMode);
00414 s << indent << "up_time: ";
00415 Printer<int16_t>::stream(s, indent + " ", v.up_time);
00416 }
00417 };
00418
00419
00420 }
00421 }
00422
00423 #endif // ASCTEC_MSGS_MESSAGE_LLSTATUS_H
00424