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
21 public:.
25 using Rep = std::uint64_t;
26 using ClockRep = std::uint64_t;
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 virtual bool
73 virtual bool ConvertToClock(Rep timestamp,
74 ClockRep& clock) const noexcept = 0;
75 virtual bool
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
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 void SetCurrentTimestamp(Rep timestamp) noexcept=0
Notify the current timestamp value.
virtual void GetRatio(std::intmax_t &numerator, std::intmax_t &denominator) const noexcept=0
using ClockRep = std::uint64_t;
virtual virtual bool bool ConvertFromClock(ClockRep clock, Rep &timestamp) const noexcept=0
Convert clock value to timestamp.
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