Zao SDK for Jetson / libzep API リファレンス  1.0.0.0 (2023-05-08)
TimestampInterface.hpp
1 #ifndef ZEP_TIMESTAMP_INTERFACE_HPP_
2 #define ZEP_TIMESTAMP_INTERFACE_HPP_
3 
4 #include <cstdint>
5 
6 namespace zep {
7 
12  public:
16  using Rep = std::uint64_t;
17 
21  using ClockRep = std::uint64_t;
22 
31  virtual void GetRatio(std::intmax_t& numerator,
32  std::intmax_t& denominator) const noexcept = 0;
33 
42  virtual void SetCurrentTimestamp(Rep timestamp) noexcept = 0;
43 
54  virtual bool GetCurrentTimestamp(Rep& timestamp) const noexcept = 0;
55 
64  virtual bool ConvertToClock(Rep timestamp,
65  ClockRep& clock) const noexcept = 0;
66 
75  virtual bool ConvertFromClock(ClockRep clock,
76  Rep& timestamp) const noexcept = 0;
77 
78  virtual ~TimestampInterface() noexcept = default;
79 };
80 
81 } // namespace zep
82 
83 #endif // ZEP_TIMESTAMP_INTERFACE_HPP_
std::uint64_t Rep
タイムスタンプの表現に用いる整数型
Definition: TimestampInterface.hpp:16
virtual bool GetCurrentTimestamp(Rep &timestamp) const noexcept=0
現在のタイムスタンプ値を計算して取得する。
ZEP SDK用名前空間
Definition: FactoryInterface.hpp:10
std::uint64_t ClockRep
クロックの表現に用いる整数型
Definition: TimestampInterface.hpp:21
virtual void SetCurrentTimestamp(Rep timestamp) noexcept=0
現在のタイムスタンプ値を通知する。
タイムスタンプ管理機能のインターフェース
Definition: TimestampInterface.hpp:11
virtual bool ConvertFromClock(ClockRep clock, Rep &timestamp) const noexcept=0
クロック値をタイムスタンプに変換する。
virtual void GetRatio(std::intmax_t &numerator, std::intmax_t &denominator) const noexcept=0
進み具合(1秒に対する比率)を取得する。
virtual bool ConvertToClock(Rep timestamp, ClockRep &clock) const noexcept=0
タイムスタンプをクロック値に変換する。