Zao SDK for Jetson / libzep API Reference
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
zep::TimestampInterface Class Referenceabstract

Interface to timestamp management functions. More...

#include <TimestampInterface.hpp>

Public Types

using Rep = std::uint64_t
 Integer type used to represent timestamps.
 
using ClockRep = std::uint64_t
 integer type used to represent the clock
 
using Rep = std::uint64_t
 タイムスタンプの表現に用いる整数型
 
using ClockRep = std::uint64_t
 クロックの表現に用いる整数型
 

Public Member Functions

virtual void GetRatio (std::intmax_t &numerator, std::intmax_t &denominator) const noexcept=0
 using ClockRep = std::uint64_t;
 
virtual void SetCurrentTimestamp (Rep timestamp) noexcept=0
 Notify the current timestamp value.
 
virtual bool GetCurrentTimestamp (Rep &timestamp) const noexcept=0
 Get the current timestamp value by calculation.
 
virtual virtual bool bool ConvertToClock (Rep timestamp, ClockRep &clock) const noexcept=0
 Convert timestamp to clock value.
 
virtual virtual bool bool ConvertFromClock (ClockRep clock, Rep &timestamp) const noexcept=0
 Convert clock value to timestamp.
 
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 ConvertToClock (Rep timestamp, ClockRep &clock) const noexcept=0
 タイムスタンプをクロック値に変換する。
 
virtual bool ConvertFromClock (ClockRep clock, Rep &timestamp) const noexcept=0
 クロック値をタイムスタンプに変換する。
 

Detailed Description

Interface to timestamp management functions.

タイムスタンプ管理機能のインターフェース

Member Function Documentation

◆ ConvertFromClock() [1/2]

virtual virtual bool bool zep::TimestampInterface::ConvertFromClock ( ClockRep  clock,
Rep timestamp 
) const
pure virtualnoexcept

Convert clock value to timestamp.

Parameters
clockClock value
timestamptimestamp value
Return values
trueConversion succeeded
falseConversion failure (missing parameter required for conversion)

◆ ConvertFromClock() [2/2]

virtual bool zep::TimestampInterface::ConvertFromClock ( ClockRep  clock,
Rep timestamp 
) const
pure virtualnoexcept

クロック値をタイムスタンプに変換する。

Parameters
clockクロック値
timestampタイムスタンプ値
Return values
true変換成功
false変換失敗(変換に必要なパラメータが不足している)

◆ ConvertToClock() [1/2]

virtual virtual bool bool zep::TimestampInterface::ConvertToClock ( Rep  timestamp,
ClockRep clock 
) const
pure virtualnoexcept

Convert timestamp to clock value.

Parameters
timestamptimestamp value
clockclock value
Return values
trueConversion succeeded
falseconversion failure (missing parameter required for conversion)

◆ ConvertToClock() [2/2]

virtual bool zep::TimestampInterface::ConvertToClock ( Rep  timestamp,
ClockRep clock 
) const
pure virtualnoexcept

タイムスタンプをクロック値に変換する。

Parameters
timestampタイムスタンプ値
clockクロック値
Return values
true変換成功
false変換失敗(変換に必要なパラメータが不足している)

◆ GetCurrentTimestamp() [1/2]

virtual bool zep::TimestampInterface::GetCurrentTimestamp ( Rep timestamp) const
pure virtualnoexcept

Get the current timestamp value by calculation.

Note
Because of the calculation overhead,
The number of calls to this function should be as few as possible because of the calculation overhead.
This function is implemented in a thread-safe manner.
Parameters
timestampwhere the timestamp value is stored.
Return values
trueThere is a valid timestamp.
falsetimestamp is invalid (cannot be calculated)

◆ GetCurrentTimestamp() [2/2]

virtual bool zep::TimestampInterface::GetCurrentTimestamp ( Rep timestamp) const
pure virtualnoexcept

現在のタイムスタンプ値を計算して取得する。

Note
計算のオーバーヘッドが発生するため、 本関数の呼び出し回数は可能な限り少なくすべき。
本関数はスレッドセーフに実装される。
Parameters
timestampタイムスタンプ値の格納先
Return values
true有効なタイムスタンプ有り
falseタイムスタンプが無効(計算不可)

◆ GetRatio() [1/2]

virtual void zep::TimestampInterface::GetRatio ( std::intmax_t &  numerator,
std::intmax_t &  denominator 
) const
pure virtualnoexcept

using ClockRep = std::uint64_t;

*

/**

Get the progress (as a percentage of 1 second).

Note
The returned value may be an abstraction.
This function is implemented in a thread-safe manner.
Parameters
numeratorWhere the numerator is stored.
denominatordenominator

◆ GetRatio() [2/2]

virtual void zep::TimestampInterface::GetRatio ( std::intmax_t &  numerator,
std::intmax_t &  denominator 
) const
pure virtualnoexcept

進み具合(1秒に対する比率)を取得する。

Note
返却される値は、約分されている可能性がある。
本関数はスレッドセーフに実装される。
Parameters
numerator分子の格納先
denominator分母の格納先

◆ SetCurrentTimestamp() [1/2]

virtual void zep::TimestampInterface::SetCurrentTimestamp ( Rep  timestamp)
pure virtualnoexcept

Notify the current timestamp value.

Note
If the range of values obtained from the hardware is smaller than what Rep can represent,
Rollover shall be properly handled to extend the range of values to the Rep's representation range and pass it on.
This function is implemented in a thread-safe manner.
Parameters
timestampCurrent timestamp value

◆ SetCurrentTimestamp() [2/2]

virtual void zep::TimestampInterface::SetCurrentTimestamp ( Rep  timestamp)
pure virtualnoexcept

現在のタイムスタンプ値を通知する。

Note
ハードウェアから得られる値の範囲がRepの表現できる値より小さい場合、 ロールオーバーを適切に処理してRepの表現範囲に拡張して渡すこと。
本関数はスレッドセーフに実装される。
Parameters
timestamp現在のタイムスタンプ値

The documentation for this class was generated from the following files: