Interpolating clock. More...
#include <interpolating_clock.h>
Public Member Functions | |
cInterpolatingClock (const char *strName) | |
Constructor. | |
adtf::base::flash::tNanoSeconds | GetTimeNs () const override |
tResult | Reset (tTimeStamp nNewTime) |
Resets the time to the new value and send the reset time events. | |
tResult | SetTime (tTimeStamp nNewTime) |
Sets the time to the new value. | |
tResult | Reset (adtf::base::flash::tNanoSeconds nNewTime) |
Resets the time to the new value and send the reset time events. | |
tResult | SetTime (adtf::base::flash::tNanoSeconds nNewTime) |
Sets the time to the new value. | |
void | Start () |
Restarts interpolation after pausing. | |
void | Pause () |
Pauses the clock at the current instant. | |
![]() | |
cBaseClock () | |
CTOR make sure you call SetName() | |
cBaseClock (const char *strName) | |
CTOR to set the name of the clock. | |
void | SetName (const char *strName) |
Sets the name of the clock. | |
tResult | GetName (base::ant::IString &&strName) const override |
tTimeStamp | GetTime () const override |
adtf::base::flash::tNanoSeconds | GetTimeNs () const override |
![]() | |
tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
Query interfaces on an object. | |
tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
Provides const correct interface querying. | |
void | Destroy () const override |
Switch from non-virtual destructor to virtual destructor. | |
tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
Query interfaces on an object. | |
tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
Provides const correct interface querying. | |
void | Destroy () const override |
Switch from non-virtual destructor to virtual destructor. | |
tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
Query interfaces on an object. | |
tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
Provides const correct interface querying. | |
void | Destroy () const override |
Switch from non-virtual destructor to virtual destructor. | |
![]() | |
ADTF_IID (IObject, "object.ant.ucom.adtf.iid") | |
Marks the IObject to be castable with the ucom_cast() | |
Private Attributes | |
std::atomic_int_least64_t | m_nExternalStreamOffset |
adtf::base::flash::tNanoSeconds | m_nLastInterpolatedTime = adtf::base::flash::tNanoSeconds{0} |
bool | m_bPaused = false |
Additional Inherited Members | |
![]() | |
tResult | SendResetBeginEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const |
Sends the Reset begin event. | |
tResult | SendResetEndEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const |
Sends the Reset end event. | |
tResult | SendUpdateEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const |
Sends the time update event. | |
tResult | SendResetBeginEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const |
Sends the Reset begin event. | |
tResult | SendResetEndEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const |
Sends the Reset end event. | |
tResult | SendUpdateEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const |
Sends the time update event. | |
![]() | |
~IObject ()=default | |
Protected destructor --> Only the final implementation can be destroyed! | |
Interpolating clock.
Time is interpolated between calls to SetTime() and Reset() with the help of the system clock.
Definition at line 79 of file interpolating_clock.h.
cInterpolatingClock | ( | const char * | strName | ) |
Constructor.
[in] | strName | The name of the clock. |
void Pause | ( | ) |
Pauses the clock at the current instant.
GetTime will return the same value for all following calls until Start() is called.
tResult Reset | ( | adtf::base::flash::tNanoSeconds | nNewTime | ) |
Resets the time to the new value and send the reset time events.
[in] | nNewTime | the new time |
tResult Reset | ( | tTimeStamp | nNewTime | ) |
Resets the time to the new value and send the reset time events.
[in] | nNewTime | the new time |
tResult SetTime | ( | adtf::base::flash::tNanoSeconds | nNewTime | ) |
tResult SetTime | ( | tTimeStamp | nNewTime | ) |
void Start | ( | ) |
Restarts interpolation after pausing.
|
private |
Definition at line 84 of file interpolating_clock.h.
|
private |
Definition at line 82 of file interpolating_clock.h.
|
mutableprivate |
Definition at line 83 of file interpolating_clock.h.