Zao SDK for Jetson / libzao-endpoint API リファレンス 1.2.0.0 (2023-10-30)
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
13 public:
17 using Rep = std::uint64_t;
18
22 using ClockRep = std::uint64_t;
23
32 virtual void GetRatio(std::intmax_t& numerator,
33 std::intmax_t& denominator) const noexcept = 0;
34
44 virtual void SetCurrentTimestamp(Rep timestamp) noexcept = 0;
45
56 virtual bool GetCurrentTimestamp(Rep& timestamp) const noexcept = 0;
57
66 virtual bool ConvertToClock(Rep timestamp,
67 ClockRep& clock) const noexcept = 0;
68
77 virtual bool ConvertFromClock(ClockRep clock,
78 Rep& timestamp) const noexcept = 0;
79
80 virtual ~TimestampInterface() noexcept = default;
81};
82
83} // namespace endpoint
84} // namespace zao
85
86#endif // ZAO_ENDPOINT_TIMESTAMP_INTERFACE_HPP_
タイムスタンプ管理機能のインターフェース
Definition TimestampInterface.hpp:12
std::uint64_t Rep
タイムスタンプの表現に用いる整数型
Definition TimestampInterface.hpp:17
std::uint64_t ClockRep
クロックの表現に用いる整数型
Definition TimestampInterface.hpp:22
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