Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
TimestampInterface.hpp
1/*
2 * Copyright (c) 2022-2023, Soliton Systems K.K. All rights reserved.
3 * Use in source and binary forms, with or without modification,
4 * is permitted provided that the following a condition is met:
5 *
6 * Use is permitted only in accordance with the terms and
7 * conditions set forth in the Software License Agreement available
8 * at https://zao-sdk.org/license-agreement/.
9 */
10#ifndef ZEP_TIMESTAMP_INTERFACE_HPP_
11#define ZEP_TIMESTAMP_INTERFACE_HPP_
12
13#include <cstdint>
14
15namespace zep {
16
20class TimestampInterface {
21 public:
25 using Rep = std::uint64_t;
26
30 using ClockRep = std::uint64_t;
31
40 virtual void GetRatio(std::intmax_t& numerator,
41 std::intmax_t& denominator) const noexcept = 0;
42
51 virtual void SetCurrentTimestamp(Rep timestamp) noexcept = 0;
52
63 virtual bool GetCurrentTimestamp(Rep& timestamp) const noexcept = 0;
64
73 virtual bool ConvertToClock(Rep timestamp,
74 ClockRep& clock) const noexcept = 0;
75
84 virtual bool ConvertFromClock(ClockRep clock,
85 Rep& timestamp) const noexcept = 0;
86
87 virtual ~TimestampInterface() noexcept = default;
88};
89
90} // namespace zep
91
92#endif // ZEP_TIMESTAMP_INTERFACE_HPP_
Interface to timestamp management functions.
Definition TimestampInterface.hpp:20
virtual bool GetCurrentTimestamp(Rep &timestamp) const noexcept=0
現在のタイムスタンプ値を計算して取得する。
virtual void SetCurrentTimestamp(Rep timestamp) noexcept=0
現在のタイムスタンプ値を通知する。
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
タイムスタンプをクロック値に変換する。
std::uint64_t Rep
Integer type used to represent timestamps.
Definition TimestampInterface.hpp:25
std::uint64_t ClockRep
integer type used to represent the clock
Definition TimestampInterface.hpp:29
Namespace for ZEP SDK.
Definition FactoryInterface.hpp:19