/* * Copyright (C) 2009, Willow Garage, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the names of Willow Garage, Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef STD_MSGS_INCLUDING_HEADER_DEPRECATED_DEF #error("Do not include this file directly. Instead, include std_msgs/Header.h") #endif namespace roslib { template struct Header_ : public std_msgs::Header_ { typedef Header_ Type; ROS_DEPRECATED Header_() { } ROS_DEPRECATED Header_(const ContainerAllocator& _alloc) : std_msgs::Header_(_alloc) { } ROS_DEPRECATED Header_(const std_msgs::Header_& rhs) { *this = rhs; } ROS_DEPRECATED Type& operator=(const std_msgs::Header_& rhs) { if (this == &rhs) return *this; this->seq = rhs.seq; this->stamp = rhs.stamp; this->frame_id = rhs.frame_id; return *this; } ROS_DEPRECATED operator std_msgs::Header_() { std_msgs::Header_ h; h.seq = this->seq; h.stamp = this->stamp; h.frame_id = this->frame_id; return h; } private: static const char* __s_getDataType_() { return "roslib/Header"; } public: static const std::string __s_getDataType() { return __s_getDataType_(); } const std::string __getDataType() const { return __s_getDataType_(); } private: static const char* __s_getMD5Sum_() { return "2176decaecbce78abc3b96ef049fabed"; } public: static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } private: static const char* __s_getMessageDefinition_() { return "# Standard metadata for higher-level stamped data types.\n\ # This is generally used to communicate timestamped data \n\ # in a particular coordinate frame.\n\ # \n\ # sequence ID: consecutively increasing ID \n\ uint32 seq\n\ #Two-integer timestamp that is expressed as:\n\ # * stamp.secs: seconds (stamp_secs) since epoch\n\ # * stamp.nsecs: nanoseconds since stamp_secs\n\ # time-handling sugar is provided by the client library\n\ time stamp\n\ #Frame this data is associated with\n\ # 0: no frame\n\ # 1: global frame\n\ string frame_id\n\ \n\ "; } public: static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const { ros::serialization::OStream stream(write_ptr, 1000000000); ros::serialization::serialize(stream, this->seq); ros::serialization::serialize(stream, this->stamp); ros::serialization::serialize(stream, this->frame_id); return stream.getData(); } virtual uint8_t *deserialize(uint8_t *read_ptr) { ros::serialization::IStream stream(read_ptr, 1000000000); ros::serialization::deserialize(stream, this->seq); ros::serialization::deserialize(stream, this->stamp); ros::serialization::deserialize(stream, this->frame_id); return stream.getData(); } virtual uint32_t serializationLength() const { uint32_t size = 0; size += ros::serialization::serializationLength(this->seq); size += ros::serialization::serializationLength(this->stamp); size += ros::serialization::serializationLength(this->frame_id); return size; } typedef boost::shared_ptr< ::roslib::Header_ > Ptr; typedef boost::shared_ptr< ::roslib::Header_ const> ConstPtr; }; // struct Header typedef ::roslib::Header_ > Header; typedef boost::shared_ptr< ::roslib::Header> HeaderPtr; typedef boost::shared_ptr< ::roslib::Header const> HeaderConstPtr; template std::ostream& operator<<(std::ostream& s, const ::roslib::Header_ & v) { ros::message_operations::Printer< ::roslib::Header_ >::stream(s, "", v); return s;} } // namespace roslib namespace ros { namespace message_traits { template struct MD5Sum< ::roslib::Header_ > { static const char* value() { return "2176decaecbce78abc3b96ef049fabed"; } static const char* value(const ::roslib::Header_ &) { return value(); } static const uint64_t static_value1 = 0x2176decaecbce78aULL; static const uint64_t static_value2 = 0xbc3b96ef049fabedULL; }; template struct DataType< ::roslib::Header_ > { static const char* value() { return "roslib/Header"; } static const char* value(const ::roslib::Header_ &) { return value(); } }; template struct Definition< ::roslib::Header_ > { static const char* value() { return "# Standard metadata for higher-level stamped data types.\n\ # This is generally used to communicate timestamped data \n\ # in a particular coordinate frame.\n\ # \n\ # sequence ID: consecutively increasing ID \n\ uint32 seq\n\ #Two-integer timestamp that is expressed as:\n\ # * stamp.secs: seconds (stamp_secs) since epoch\n\ # * stamp.nsecs: nanoseconds since stamp_secs\n\ # time-handling sugar is provided by the client library\n\ time stamp\n\ #Frame this data is associated with\n\ # 0: no frame\n\ # 1: global frame\n\ string frame_id\n\ \n\ "; } static const char* value(const ::roslib::Header_ &) { return value(); } }; } // namespace message_traits } // namespace ros namespace ros { namespace serialization { template struct Serializer< ::roslib::Header_ > { template inline static void allInOne(Stream& stream, T m) { stream.next(m.seq); stream.next(m.stamp); stream.next(m.frame_id); } ROS_DECLARE_ALLINONE_SERIALIZER; }; // struct Header_ } // namespace serialization } // namespace ros namespace ros { namespace message_operations { template struct Printer< ::roslib::Header_ > { template static void stream(Stream& s, const std::string& indent, const ::roslib::Header_ & v) { s << indent << "seq: "; Printer::stream(s, indent + " ", v.seq); s << indent << "stamp: "; Printer::stream(s, indent + " ", v.stamp); s << indent << "frame_id: "; Printer, typename ContainerAllocator::template rebind::other > >::stream(s, indent + " ", v.frame_id); } }; } // namespace message_operations } // namespace ros