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