Point Cloud Library (PCL)  1.9.1-dev
PCLHeader.h
1 #pragma once
2 
3 #ifdef USE_ROS
4  #error USE_ROS setup requires PCL to compile against ROS message headers, which is now deprecated
5 #endif
6 
7 #include <string>
8 #include <vector>
9 #include <boost/shared_ptr.hpp>
10 #include <pcl/pcl_macros.h>
11 #include <ostream>
12 
13 namespace pcl
14 {
15  struct PCLHeader
16  {
17  PCLHeader (): seq (0), stamp ()
18  {}
19 
20  /** \brief Sequence number */
21  std::uint32_t seq;
22  /** \brief A timestamp associated with the time when the data was acquired
23  *
24  * The value represents microseconds since 1970-01-01 00:00:00 (the UNIX epoch).
25  */
26  std::uint64_t stamp;
27  /** \brief Coordinate frame ID */
28  std::string frame_id;
29 
30  using Ptr = boost::shared_ptr<PCLHeader>;
31  using ConstPtr = boost::shared_ptr<const PCLHeader>;
32  }; // struct PCLHeader
33 
34  using HeaderPtr = boost::shared_ptr<PCLHeader>;
35  using HeaderConstPtr = boost::shared_ptr<const PCLHeader>;
36 
37  inline std::ostream& operator << (std::ostream& out, const PCLHeader &h)
38  {
39  out << "seq: " << h.seq;
40  out << " stamp: " << h.stamp;
41  out << " frame_id: " << h.frame_id << std::endl;
42  return (out);
43  }
44 
45  inline bool operator== (const PCLHeader &lhs, const PCLHeader &rhs)
46  {
47  return (&lhs == &rhs) ||
48  (lhs.seq == rhs.seq && lhs.stamp == rhs.stamp && lhs.frame_id == rhs.frame_id);
49  }
50 
51 } // namespace pcl
std::uint64_t stamp
A timestamp associated with the time when the data was acquired.
Definition: PCLHeader.h:26
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
boost::shared_ptr< PCLHeader > HeaderPtr
Definition: PCLHeader.h:34
std::string frame_id
Coordinate frame ID.
Definition: PCLHeader.h:28
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
boost::shared_ptr< PCLHeader > Ptr
Definition: PCLHeader.h:30
boost::shared_ptr< const PCLHeader > HeaderConstPtr
Definition: PCLHeader.h:35
bool operator==(const PCLHeader &lhs, const PCLHeader &rhs)
Definition: PCLHeader.h:45
boost::shared_ptr< const PCLHeader > ConstPtr
Definition: PCLHeader.h:31
Defines all the PCL and non-PCL macros used.
std::uint32_t seq
Sequence number.
Definition: PCLHeader.h:21