Interface to timestamp management functions.
More...
#include <TimestampInterface.hpp>
|
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 |
| クロックの表現に用いる整数型
|
|
|
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 ×tamp) 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 ×tamp) 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 ×tamp) const noexcept=0 |
| 現在のタイムスタンプ値を計算して取得する。
|
|
virtual bool | ConvertToClock (Rep timestamp, ClockRep &clock) const noexcept=0 |
| タイムスタンプをクロック値に変換する。
|
|
virtual bool | ConvertFromClock (ClockRep clock, Rep ×tamp) const noexcept=0 |
| クロック値をタイムスタンプに変換する。
|
|
Interface to timestamp management functions.
タイムスタンプ管理機能のインターフェース
◆ ConvertFromClock() [1/2]
virtual virtual bool bool zep::TimestampInterface::ConvertFromClock |
( |
ClockRep |
clock, |
|
|
Rep & |
timestamp |
|
) |
| const |
|
pure virtualnoexcept |
Convert clock value to timestamp.
- Parameters
-
clock | Clock value |
timestamp | timestamp value |
- Return values
-
true | Conversion succeeded |
false | Conversion 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
-
timestamp | timestamp value |
clock | clock value |
- Return values
-
true | Conversion succeeded |
false | conversion 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
-
timestamp | where the timestamp value is stored. |
- Return values
-
true | There is a valid timestamp. |
false | timestamp is invalid (cannot be calculated) |
◆ GetCurrentTimestamp() [2/2]
virtual bool zep::TimestampInterface::GetCurrentTimestamp |
( |
Rep & |
timestamp | ) |
const |
|
pure virtualnoexcept |
現在のタイムスタンプ値を計算して取得する。
- Note
- 計算のオーバーヘッドが発生するため、 本関数の呼び出し回数は可能な限り少なくすべき。
-
本関数はスレッドセーフに実装される。
- Parameters
-
- 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
-
numerator | Where the numerator is stored. |
denominator | denominator |
◆ 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
-
timestamp | Current timestamp value |
◆ SetCurrentTimestamp() [2/2]
virtual void zep::TimestampInterface::SetCurrentTimestamp |
( |
Rep |
timestamp | ) |
|
|
pure virtualnoexcept |
現在のタイムスタンプ値を通知する。
- Note
- ハードウェアから得られる値の範囲がRepの表現できる値より小さい場合、 ロールオーバーを適切に処理してRepの表現範囲に拡張して渡すこと。
-
本関数はスレッドセーフに実装される。
- Parameters
-
The documentation for this class was generated from the following files: