00001
00002 #ifndef MAV_MSGS_MESSAGE_STATE_H
00003 #define MAV_MSGS_MESSAGE_STATE_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 mav_msgs
00020 {
00021 template <class ContainerAllocator>
00022 struct State_ {
00023 typedef State_<ContainerAllocator> Type;
00024
00025 State_()
00026 : header()
00027 , state(0)
00028 {
00029 }
00030
00031 State_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , state(0)
00034 {
00035 }
00036
00037 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00038 ::std_msgs::Header_<ContainerAllocator> header;
00039
00040 typedef uint8_t _state_type;
00041 uint8_t state;
00042
00043
00044 private:
00045 static const char* __s_getDataType_() { return "mav_msgs/State"; }
00046 public:
00047 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00048
00049 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00050
00051 private:
00052 static const char* __s_getMD5Sum_() { return "da95463f5af1db345e11ec4ce9b23d3f"; }
00053 public:
00054 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00055
00056 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00057
00058 private:
00059 static const char* __s_getMessageDefinition_() { return "# Software License Agreement (BSD License)\n\
00060 #\n\
00061 # Copyright (c) 2010\n\
00062 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00063 # All rights reserved.\n\
00064 #\n\
00065 # Redistribution and use in source and binary forms, with or without\n\
00066 # modification, are permitted provided that the following conditions\n\
00067 # are met:\n\
00068 #\n\
00069 # * Redistributions of source code must retain the above copyright\n\
00070 # notice, this list of conditions and the following disclaimer.\n\
00071 # * Redistributions in binary form must reproduce the above\n\
00072 # copyright notice, this list of conditions and the following\n\
00073 # disclaimer in the documentation and/or other materials provided\n\
00074 # with the distribution.\n\
00075 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00076 # contributors may be used to endorse or promote products derived\n\
00077 # from this software without specific prior written permission.\n\
00078 #\n\
00079 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00080 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00081 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00082 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00083 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00084 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00085 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00086 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00087 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00088 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00089 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00090 # POSSIBILITY OF SUCH DAMAGE.\n\
00091 \n\
00092 Header header\n\
00093 \n\
00094 uint8 state\n\
00095 \n\
00096 ================================================================================\n\
00097 MSG: std_msgs/Header\n\
00098 # Standard metadata for higher-level stamped data types.\n\
00099 # This is generally used to communicate timestamped data \n\
00100 # in a particular coordinate frame.\n\
00101 # \n\
00102 # sequence ID: consecutively increasing ID \n\
00103 uint32 seq\n\
00104 #Two-integer timestamp that is expressed as:\n\
00105 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00106 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00107 # time-handling sugar is provided by the client library\n\
00108 time stamp\n\
00109 #Frame this data is associated with\n\
00110 # 0: no frame\n\
00111 # 1: global frame\n\
00112 string frame_id\n\
00113 \n\
00114 "; }
00115 public:
00116 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00117
00118 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00119
00120 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00121 {
00122 ros::serialization::OStream stream(write_ptr, 1000000000);
00123 ros::serialization::serialize(stream, header);
00124 ros::serialization::serialize(stream, state);
00125 return stream.getData();
00126 }
00127
00128 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00129 {
00130 ros::serialization::IStream stream(read_ptr, 1000000000);
00131 ros::serialization::deserialize(stream, header);
00132 ros::serialization::deserialize(stream, state);
00133 return stream.getData();
00134 }
00135
00136 ROS_DEPRECATED virtual uint32_t serializationLength() const
00137 {
00138 uint32_t size = 0;
00139 size += ros::serialization::serializationLength(header);
00140 size += ros::serialization::serializationLength(state);
00141 return size;
00142 }
00143
00144 typedef boost::shared_ptr< ::mav_msgs::State_<ContainerAllocator> > Ptr;
00145 typedef boost::shared_ptr< ::mav_msgs::State_<ContainerAllocator> const> ConstPtr;
00146 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00147 };
00148 typedef ::mav_msgs::State_<std::allocator<void> > State;
00149
00150 typedef boost::shared_ptr< ::mav_msgs::State> StatePtr;
00151 typedef boost::shared_ptr< ::mav_msgs::State const> StateConstPtr;
00152
00153
00154 template<typename ContainerAllocator>
00155 std::ostream& operator<<(std::ostream& s, const ::mav_msgs::State_<ContainerAllocator> & v)
00156 {
00157 ros::message_operations::Printer< ::mav_msgs::State_<ContainerAllocator> >::stream(s, "", v);
00158 return s;}
00159
00160 }
00161
00162 namespace ros
00163 {
00164 namespace message_traits
00165 {
00166 template<class ContainerAllocator> struct IsMessage< ::mav_msgs::State_<ContainerAllocator> > : public TrueType {};
00167 template<class ContainerAllocator> struct IsMessage< ::mav_msgs::State_<ContainerAllocator> const> : public TrueType {};
00168 template<class ContainerAllocator>
00169 struct MD5Sum< ::mav_msgs::State_<ContainerAllocator> > {
00170 static const char* value()
00171 {
00172 return "da95463f5af1db345e11ec4ce9b23d3f";
00173 }
00174
00175 static const char* value(const ::mav_msgs::State_<ContainerAllocator> &) { return value(); }
00176 static const uint64_t static_value1 = 0xda95463f5af1db34ULL;
00177 static const uint64_t static_value2 = 0x5e11ec4ce9b23d3fULL;
00178 };
00179
00180 template<class ContainerAllocator>
00181 struct DataType< ::mav_msgs::State_<ContainerAllocator> > {
00182 static const char* value()
00183 {
00184 return "mav_msgs/State";
00185 }
00186
00187 static const char* value(const ::mav_msgs::State_<ContainerAllocator> &) { return value(); }
00188 };
00189
00190 template<class ContainerAllocator>
00191 struct Definition< ::mav_msgs::State_<ContainerAllocator> > {
00192 static const char* value()
00193 {
00194 return "# Software License Agreement (BSD License)\n\
00195 #\n\
00196 # Copyright (c) 2010\n\
00197 # Ivan Dryanovski <ivan.dryanovski@gmail.com>\n\
00198 # All rights reserved.\n\
00199 #\n\
00200 # Redistribution and use in source and binary forms, with or without\n\
00201 # modification, are permitted provided that the following conditions\n\
00202 # are met:\n\
00203 #\n\
00204 # * Redistributions of source code must retain the above copyright\n\
00205 # notice, this list of conditions and the following disclaimer.\n\
00206 # * Redistributions in binary form must reproduce the above\n\
00207 # copyright notice, this list of conditions and the following\n\
00208 # disclaimer in the documentation and/or other materials provided\n\
00209 # with the distribution.\n\
00210 # * Neither the name of CCNY Robotics Lab nor the names of its\n\
00211 # contributors may be used to endorse or promote products derived\n\
00212 # from this software without specific prior written permission.\n\
00213 #\n\
00214 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\
00215 # \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\
00216 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n\
00217 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n\
00218 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n\
00219 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n\
00220 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\
00221 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n\
00222 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n\
00223 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n\
00224 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n\
00225 # POSSIBILITY OF SUCH DAMAGE.\n\
00226 \n\
00227 Header header\n\
00228 \n\
00229 uint8 state\n\
00230 \n\
00231 ================================================================================\n\
00232 MSG: std_msgs/Header\n\
00233 # Standard metadata for higher-level stamped data types.\n\
00234 # This is generally used to communicate timestamped data \n\
00235 # in a particular coordinate frame.\n\
00236 # \n\
00237 # sequence ID: consecutively increasing ID \n\
00238 uint32 seq\n\
00239 #Two-integer timestamp that is expressed as:\n\
00240 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00241 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00242 # time-handling sugar is provided by the client library\n\
00243 time stamp\n\
00244 #Frame this data is associated with\n\
00245 # 0: no frame\n\
00246 # 1: global frame\n\
00247 string frame_id\n\
00248 \n\
00249 ";
00250 }
00251
00252 static const char* value(const ::mav_msgs::State_<ContainerAllocator> &) { return value(); }
00253 };
00254
00255 template<class ContainerAllocator> struct HasHeader< ::mav_msgs::State_<ContainerAllocator> > : public TrueType {};
00256 template<class ContainerAllocator> struct HasHeader< const ::mav_msgs::State_<ContainerAllocator> > : public TrueType {};
00257 }
00258 }
00259
00260 namespace ros
00261 {
00262 namespace serialization
00263 {
00264
00265 template<class ContainerAllocator> struct Serializer< ::mav_msgs::State_<ContainerAllocator> >
00266 {
00267 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00268 {
00269 stream.next(m.header);
00270 stream.next(m.state);
00271 }
00272
00273 ROS_DECLARE_ALLINONE_SERIALIZER;
00274 };
00275 }
00276 }
00277
00278 namespace ros
00279 {
00280 namespace message_operations
00281 {
00282
00283 template<class ContainerAllocator>
00284 struct Printer< ::mav_msgs::State_<ContainerAllocator> >
00285 {
00286 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::mav_msgs::State_<ContainerAllocator> & v)
00287 {
00288 s << indent << "header: ";
00289 s << std::endl;
00290 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00291 s << indent << "state: ";
00292 Printer<uint8_t>::stream(s, indent + " ", v.state);
00293 }
00294 };
00295
00296
00297 }
00298 }
00299
00300 #endif // MAV_MSGS_MESSAGE_STATE_H
00301