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