ADTF
3.18.2
|
Interpolating clock. More...
Public Member Functions | |
cInterpolatingClock () | |
CTOR make sure you call SetName() | |
cInterpolatingClock (const char *strName) | |
Constructor. More... | |
adtf::base::flash::tNanoSeconds | GetTimeNs () const override |
tResult | Reset (tTimeStamp nNewTime, double fSpeedFactor=1.0) |
Resets the time to the new value and send the reset time events. More... | |
tResult | SetTime (tTimeStamp nNewTime) |
Sets the time to the new value. More... | |
tResult | Reset (adtf::base::flash::tNanoSeconds nNewTime, double fSpeedFactor=1.0) |
Resets the time to the new value and send the reset time events. More... | |
tResult | SetTime (adtf::base::flash::tNanoSeconds nNewTime) |
Sets the time to the new value. More... | |
void | Start () |
Restarts interpolation after pausing. More... | |
void | Pause () |
Pauses the clock at the current instant. More... | |
Public Member Functions inherited from cBaseClock | |
cBaseClock () | |
CTOR make sure you call SetName() | |
cBaseClock (const char *strName) | |
CTOR to set the name of the clock. More... | |
void | SetName (const char *strName) |
Sets the name of the clock. More... | |
tResult | GetName (base::ant::IString &&strName) const override |
tTimeStamp | GetTime () const override |
adtf::base::flash::tNanoSeconds | GetTimeNs () const override |
Public Member Functions inherited from object< services::ant::IReferenceClock::IClock, services::flash::IReferenceClock::IClock, ucom::cEventSource > | |
tResult | GetInterface (const char *i_strIID, void *&o_pInterface) override |
Query interfaces on an object. More... | |
tResult | GetInterface (const char *i_strIID, const void *&o_pInterface) const override |
Provides const correct interface querying. More... | |
void | Destroy () const override |
Destruct and deallocate instantiations of type IObject . More... | |
Public Member Functions inherited from IObject | |
ADTF_IID (IObject, "object.ant.ucom.adtf.iid") | |
Marks the IObject to be castable with the ucom_cast() More... | |
Private Attributes | |
std::unique_ptr< cImplementation > | m_pImplementation |
Additional Inherited Members | |
Protected Member Functions inherited from cBaseClock | |
tResult | SendResetBeginEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const |
Sends the Reset begin event. More... | |
tResult | SendResetEndEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const |
Sends the Reset end event. More... | |
tResult | SendUpdateEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const |
Sends the time update event. More... | |
tResult | SendResetBeginEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const |
Sends the Reset begin event. More... | |
tResult | SendResetEndEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const |
Sends the Reset end event. More... | |
tResult | SendUpdateEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const |
Sends the time update event. More... | |
Protected Member Functions inherited from IObject | |
~IObject ()=default | |
Protected destructor --> Use implemented Destroy() instead of delete! | |
Interpolating clock.
Time is interpolated between calls to SetTime() and Reset() with the help of the system clock.
Definition at line 119 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, |
double | fSpeedFactor = 1.0 |
||
) |
Resets the time to the new value and send the reset time events.
[in] | nNewTime | the new time |
[in] | fSpeedFactor | A factor that slows down or speeds up the clock relative to the hardware clock. |
tResult Reset | ( | tTimeStamp | nNewTime, |
double | fSpeedFactor = 1.0 |
||
) |
Resets the time to the new value and send the reset time events.
[in] | nNewTime | the new time |
[in] | fSpeedFactor | A factor that slows down or speeds up the clock relative to the hardware clock. |
tResult SetTime | ( | adtf::base::flash::tNanoSeconds | nNewTime | ) |
tResult SetTime | ( | tTimeStamp | nNewTime | ) |
void Start | ( | ) |
Restarts interpolation after pausing.