Zao SDK for Jetson / libzao-endpoint API リファレンス 1.5.0.0 (2024-09-25)
Loading...
Searching...
No Matches
TimestampInterface.hpp
1#ifndef ZAO_ENDPOINT_TIMESTAMP_INTERFACE_HPP_
2#define ZAO_ENDPOINT_TIMESTAMP_INTERFACE_HPP_
3
4#include <cstdint>
5
6namespace zao {
7namespace endpoint {
8
14 public:
19 using Rep = std::uint64_t;
20
25 using ClockRep = std::uint64_t;
26
40 virtual void GetRatio(std::intmax_t& numerator,
41 std::intmax_t& denominator) const noexcept = 0;
42
58 virtual void SetCurrentTimestamp(Rep timestamp) noexcept = 0;
59
78 virtual bool GetCurrentTimestamp(Rep& timestamp) const noexcept = 0;
79
94 virtual bool ConvertToClock(Rep timestamp,
95 ClockRep& clock) const noexcept = 0;
96
111 virtual bool ConvertFromClock(ClockRep clock,
112 Rep& timestamp) const noexcept = 0;
113
114 virtual ~TimestampInterface() noexcept = default;
115};
116
117} // namespace endpoint
118} // namespace zao
119
120#endif // ZAO_ENDPOINT_TIMESTAMP_INTERFACE_HPP_
タイムスタンプ管理機能のインターフェース
Definition TimestampInterface.hpp:13
std::uint64_t Rep
タイムスタンプの表現に用いる整数型
Definition TimestampInterface.hpp:19
std::uint64_t ClockRep
クロックの表現に用いる整数型
Definition TimestampInterface.hpp:25
virtual bool ConvertToClock(Rep timestamp, ClockRep &clock) const noexcept=0
タイムスタンプをクロック値に変換する。
virtual void GetRatio(std::intmax_t &numerator, std::intmax_t &denominator) const noexcept=0
進み具合(1秒に対する比率)を取得する。
virtual void SetCurrentTimestamp(Rep timestamp) noexcept=0
現在のタイムスタンプ値を通知する。
virtual bool GetCurrentTimestamp(Rep &timestamp) const noexcept=0
現在のタイムスタンプ値を計算して取得する。
virtual bool ConvertFromClock(ClockRep clock, Rep &timestamp) const noexcept=0
クロック値をタイムスタンプに変換する。
Zao製品共通の名前空間
Definition FactoryInterface.hpp:11