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  /** \brief Sequence number */
18  std::uint32_t seq = 0;
19  /** \brief A timestamp associated with the time when the data was acquired
20  *
21  * The value represents microseconds since 1970-01-01 00:00:00 (the UNIX epoch).
22  */
23  std::uint64_t stamp = 0;
24  /** \brief Coordinate frame ID */
25  std::string frame_id;
26 
27  using Ptr = boost::shared_ptr<PCLHeader>;
28  using ConstPtr = boost::shared_ptr<const PCLHeader>;
29  }; // struct PCLHeader
30 
33 
34  inline std::ostream& operator << (std::ostream& out, const PCLHeader &h)
35  {
36  out << "seq: " << h.seq;
37  out << " stamp: " << h.stamp;
38  out << " frame_id: " << h.frame_id << std::endl;
39  return (out);
40  }
41 
42  inline bool operator== (const PCLHeader &lhs, const PCLHeader &rhs)
43  {
44  return (&lhs == &rhs) ||
45  (lhs.seq == rhs.seq && lhs.stamp == rhs.stamp && lhs.frame_id == rhs.frame_id);
46  }
47 
48 } // namespace pcl
std::uint64_t stamp
A timestamp associated with the time when the data was acquired.
Definition: PCLHeader.h:23
This file defines compatibility wrappers for low level I/O functions.
Definition: convolution.h:45
std::string frame_id
Coordinate frame ID.
Definition: PCLHeader.h:25
std::ostream & operator<<(std::ostream &os, const BivariatePolynomialT< real > &p)
PCLHeader::Ptr HeaderPtr
Definition: PCLHeader.h:31
PCLHeader::ConstPtr HeaderConstPtr
Definition: PCLHeader.h:32
boost::shared_ptr< PCLHeader > Ptr
Definition: PCLHeader.h:27
bool operator==(const PCLHeader &lhs, const PCLHeader &rhs)
Definition: PCLHeader.h:42
boost::shared_ptr< const PCLHeader > ConstPtr
Definition: PCLHeader.h:28
Defines all the PCL and non-PCL macros used.
std::uint32_t seq
Sequence number.
Definition: PCLHeader.h:18