00001
00002 #ifndef STD_MSGS_MESSAGE_HEADER_H
00003 #define STD_MSGS_MESSAGE_HEADER_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
00018 namespace std_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct Header_ {
00022 typedef Header_<ContainerAllocator> Type;
00023
00024 Header_()
00025 : seq(0)
00026 , stamp()
00027 , frame_id()
00028 {
00029 }
00030
00031 Header_(const ContainerAllocator& _alloc)
00032 : seq(0)
00033 , stamp()
00034 , frame_id(_alloc)
00035 {
00036 }
00037
00038 typedef uint32_t _seq_type;
00039 uint32_t seq;
00040
00041 typedef ros::Time _stamp_type;
00042 ros::Time stamp;
00043
00044 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _frame_id_type;
00045 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > frame_id;
00046
00047
00048 private:
00049 static const char* __s_getDataType_() { return "std_msgs/Header"; }
00050 public:
00051 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00052
00053 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00054
00055 private:
00056 static const char* __s_getMD5Sum_() { return "2176decaecbce78abc3b96ef049fabed"; }
00057 public:
00058 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00059
00060 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00061
00062 private:
00063 static const char* __s_getMessageDefinition_() { return "# Standard metadata for higher-level stamped data types.\n\
00064 # This is generally used to communicate timestamped data \n\
00065 # in a particular coordinate frame.\n\
00066 # \n\
00067 # sequence ID: consecutively increasing ID \n\
00068 uint32 seq\n\
00069 #Two-integer timestamp that is expressed as:\n\
00070 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00071 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00072 # time-handling sugar is provided by the client library\n\
00073 time stamp\n\
00074 #Frame this data is associated with\n\
00075 # 0: no frame\n\
00076 # 1: global frame\n\
00077 string frame_id\n\
00078 \n\
00079 "; }
00080 public:
00081 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00082
00083 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00084
00085 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00086 {
00087 ros::serialization::OStream stream(write_ptr, 1000000000);
00088 ros::serialization::serialize(stream, seq);
00089 ros::serialization::serialize(stream, stamp);
00090 ros::serialization::serialize(stream, frame_id);
00091 return stream.getData();
00092 }
00093
00094 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00095 {
00096 ros::serialization::IStream stream(read_ptr, 1000000000);
00097 ros::serialization::deserialize(stream, seq);
00098 ros::serialization::deserialize(stream, stamp);
00099 ros::serialization::deserialize(stream, frame_id);
00100 return stream.getData();
00101 }
00102
00103 ROS_DEPRECATED virtual uint32_t serializationLength() const
00104 {
00105 uint32_t size = 0;
00106 size += ros::serialization::serializationLength(seq);
00107 size += ros::serialization::serializationLength(stamp);
00108 size += ros::serialization::serializationLength(frame_id);
00109 return size;
00110 }
00111
00112 typedef boost::shared_ptr< ::std_msgs::Header_<ContainerAllocator> > Ptr;
00113 typedef boost::shared_ptr< ::std_msgs::Header_<ContainerAllocator> const> ConstPtr;
00114 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00115 };
00116 typedef ::std_msgs::Header_<std::allocator<void> > Header;
00117
00118 typedef boost::shared_ptr< ::std_msgs::Header> HeaderPtr;
00119 typedef boost::shared_ptr< ::std_msgs::Header const> HeaderConstPtr;
00120
00121
00122 template<typename ContainerAllocator>
00123 std::ostream& operator<<(std::ostream& s, const ::std_msgs::Header_<ContainerAllocator> & v)
00124 {
00125 ros::message_operations::Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, "", v);
00126 return s;}
00127
00128 }
00129
00130 namespace ros
00131 {
00132 namespace message_traits
00133 {
00134 template<class ContainerAllocator> struct IsMessage< ::std_msgs::Header_<ContainerAllocator> > : public TrueType {};
00135 template<class ContainerAllocator> struct IsMessage< ::std_msgs::Header_<ContainerAllocator> const> : public TrueType {};
00136 template<class ContainerAllocator>
00137 struct MD5Sum< ::std_msgs::Header_<ContainerAllocator> > {
00138 static const char* value()
00139 {
00140 return "2176decaecbce78abc3b96ef049fabed";
00141 }
00142
00143 static const char* value(const ::std_msgs::Header_<ContainerAllocator> &) { return value(); }
00144 static const uint64_t static_value1 = 0x2176decaecbce78aULL;
00145 static const uint64_t static_value2 = 0xbc3b96ef049fabedULL;
00146 };
00147
00148 template<class ContainerAllocator>
00149 struct DataType< ::std_msgs::Header_<ContainerAllocator> > {
00150 static const char* value()
00151 {
00152 return "std_msgs/Header";
00153 }
00154
00155 static const char* value(const ::std_msgs::Header_<ContainerAllocator> &) { return value(); }
00156 };
00157
00158 template<class ContainerAllocator>
00159 struct Definition< ::std_msgs::Header_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "# Standard metadata for higher-level stamped data types.\n\
00163 # This is generally used to communicate timestamped data \n\
00164 # in a particular coordinate frame.\n\
00165 # \n\
00166 # sequence ID: consecutively increasing ID \n\
00167 uint32 seq\n\
00168 #Two-integer timestamp that is expressed as:\n\
00169 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00170 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00171 # time-handling sugar is provided by the client library\n\
00172 time stamp\n\
00173 #Frame this data is associated with\n\
00174 # 0: no frame\n\
00175 # 1: global frame\n\
00176 string frame_id\n\
00177 \n\
00178 ";
00179 }
00180
00181 static const char* value(const ::std_msgs::Header_<ContainerAllocator> &) { return value(); }
00182 };
00183
00184 }
00185 }
00186
00187 namespace ros
00188 {
00189 namespace serialization
00190 {
00191
00192 template<class ContainerAllocator> struct Serializer< ::std_msgs::Header_<ContainerAllocator> >
00193 {
00194 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00195 {
00196 stream.next(m.seq);
00197 stream.next(m.stamp);
00198 stream.next(m.frame_id);
00199 }
00200
00201 ROS_DECLARE_ALLINONE_SERIALIZER;
00202 };
00203 }
00204 }
00205
00206 namespace ros
00207 {
00208 namespace message_operations
00209 {
00210
00211 template<class ContainerAllocator>
00212 struct Printer< ::std_msgs::Header_<ContainerAllocator> >
00213 {
00214 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::std_msgs::Header_<ContainerAllocator> & v)
00215 {
00216 s << indent << "seq: ";
00217 Printer<uint32_t>::stream(s, indent + " ", v.seq);
00218 s << indent << "stamp: ";
00219 Printer<ros::Time>::stream(s, indent + " ", v.stamp);
00220 s << indent << "frame_id: ";
00221 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.frame_id);
00222 }
00223 };
00224
00225
00226 }
00227 }
00228
00229 #define STD_MSGS_INCLUDING_HEADER_DEPRECATED_DEF 1
00230 #include <std_msgs/header_deprecated_def.h>
00231 #undef STD_MSGS_INCLUDING_HEADER_DEPRECATED_DEF
00232
00233 #endif // STD_MSGS_MESSAGE_HEADER_H
00234