ADTF
Loading...
Searching...
No Matches
adtf::system::lucky::cInterpolatingClock Class Reference

More...

#include <interpolating_clock.h>

Inherits adtf::system::flash::cBaseClock.

Public Member Functions

 cInterpolatingClock ()
 
 cInterpolatingClock (const char *strName)
 
adtf::base::flash::tNanoSeconds GetTimeNs () const override
 
tResult Reset (tTimeStamp nNewTime, double fSpeedFactor=1.0)
 
tResult SetTime (tTimeStamp nNewTime)
 
tResult Reset (adtf::base::flash::tNanoSeconds nNewTime, double fSpeedFactor=1.0)
 
tResult SetTime (adtf::base::flash::tNanoSeconds nNewTime)
 
void Start ()
 
void Pause ()
 
- Public Member Functions inherited from adtf::system::flash::cBaseClock
 cBaseClock ()
 
 cBaseClock (const char *strName)
 
void SetName (const char *strName)
 
tResult GetName (base::ant::IString &&strName) const override
 
tTimeStamp GetTime () const override
 
adtf::base::flash::tNanoSeconds GetTimeNs () const override
 
- Public Member Functions inherited from adtf::ucom::catwo::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.
 
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.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Additional Inherited Members

- Protected Member Functions inherited from adtf::system::flash::cBaseClock
tResult SendResetBeginEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const
 
tResult SendResetEndEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const
 
tResult SendUpdateEvent (tTimeStamp tmOldTime, tTimeStamp tmNewTime) const
 
tResult SendResetBeginEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const
 
tResult SendResetEndEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const
 
tResult SendUpdateEvent (base::flash::tNanoSeconds tmOldTime, base::flash::tNanoSeconds tmNewTime) const
 
- Protected Member Functions inherited from adtf::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

Interpolating clock.

Time is interpolated between calls to SetTime() and Reset() with the help of the system clock.

Constructor & Destructor Documentation

◆ cInterpolatingClock() [1/2]

adtf::system::lucky::cInterpolatingClock::cInterpolatingClock ( )

CTOR make sure you call SetName()

◆ cInterpolatingClock() [2/2]

adtf::system::lucky::cInterpolatingClock::cInterpolatingClock ( const char * strName)

Constructor

Parameters
[in]strNameThe name of the clock.

Member Function Documentation

◆ Pause()

void adtf::system::lucky::cInterpolatingClock::Pause ( )

Pauses the clock at the current instant. GetTime will return the same value for all following calls until Start() is called.

◆ Reset() [1/2]

tResult adtf::system::lucky::cInterpolatingClock::Reset ( adtf::base::flash::tNanoSeconds nNewTime,
double fSpeedFactor = 1.0 )

Resets the time to the new value and send the reset time events.

Parameters
[in]nNewTimethe new time
[in]fSpeedFactorA factor that slows down or speeds up the clock relative to the hardware clock.
Returns
Standard Result Code
ERR_NOERROR time set successfully

◆ Reset() [2/2]

tResult adtf::system::lucky::cInterpolatingClock::Reset ( tTimeStamp nNewTime,
double fSpeedFactor = 1.0 )

Resets the time to the new value and send the reset time events.

Parameters
[in]nNewTimethe new time
[in]fSpeedFactorA factor that slows down or speeds up the clock relative to the hardware clock.
Returns
Standard Result Code
ERR_NOERROR time set successfully

◆ SetTime() [1/2]

tResult adtf::system::lucky::cInterpolatingClock::SetTime ( adtf::base::flash::tNanoSeconds nNewTime)

Sets the time to the new value.

This must be greater or equal to the last value set with Reset() or SetTime().

Parameters
[in]nNewTimethe new time
Returns
Standard Result Code
ERR_NOERROR time set successfully

◆ SetTime() [2/2]

tResult adtf::system::lucky::cInterpolatingClock::SetTime ( tTimeStamp nNewTime)

Sets the time to the new value.

This must be greater or equal to the last value set with Reset() or SetTime().

Parameters
[in]nNewTimethe new time
Returns
Standard Result Code
ERR_NOERROR time set successfully

◆ Start()

void adtf::system::lucky::cInterpolatingClock::Start ( )

Restarts interpolation after pausing.


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