Point Cloud Library (PCL)  1.10.1-dev
PCLHeader.h
1 #pragma once
2 
3 #include <pcl/memory.h> // for shared_ptr
4 
5 #include <string> // for string
6 #include <ostream> // for ostream
7 
8 namespace pcl
9 {
10  struct PCLHeader
11  {
12  /** \brief Sequence number */
13  std::uint32_t seq = 0;
14  /** \brief A timestamp associated with the time when the data was acquired
15  *
16  * The value represents microseconds since 1970-01-01 00:00:00 (the UNIX epoch).
17  */
18  std::uint64_t stamp = 0;
19  /** \brief Coordinate frame ID */
20  std::string frame_id;
21 
24  }; // struct PCLHeader
25 
28 
29  inline std::ostream& operator << (std::ostream& out, const PCLHeader &h)
30  {
31  out << "seq: " << h.seq;
32  out << " stamp: " << h.stamp;
33  out << " frame_id: " << h.frame_id << std::endl;
34  return (out);
35  }
36 
37  inline bool operator== (const PCLHeader &lhs, const PCLHeader &rhs)
38  {
39  return (&lhs == &rhs) ||
40  (lhs.seq == rhs.seq && lhs.stamp == rhs.stamp && lhs.frame_id == rhs.frame_id);
41  }
42 
43 } // namespace pcl
44 
Defines functions, macros and traits for allocating and using memory.
std::uint64_t stamp
A timestamp associated with the time when the data was acquired.
Definition: PCLHeader.h:18
std::string frame_id
Coordinate frame ID.
Definition: PCLHeader.h:20
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
PCLHeader::Ptr HeaderPtr
Definition: PCLHeader.h:26
PCLHeader::ConstPtr HeaderConstPtr
Definition: PCLHeader.h:27
shared_ptr< const PCLHeader > ConstPtr
Definition: PCLHeader.h:23
bool operator==(const PCLHeader &lhs, const PCLHeader &rhs)
Definition: PCLHeader.h:37
shared_ptr< PCLHeader > Ptr
Definition: PCLHeader.h:22
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Definition: memory.h:81
std::uint32_t seq
Sequence number.
Definition: PCLHeader.h:13