ADTF  3.13.0
cInterpolatingClock

Interpolating clock. More...

Inheritance diagram for cInterpolatingClock:
[legend]

Public Member Functions

 cInterpolatingClock (const tChar *strName)
 Constructor. More...
 
adtf::base::flash::tNanoSeconds GetTimeNs () const override
 
tResult Reset (tTimeStamp nNewTime)
 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)
 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...
 
tVoid Start ()
 Restarts interpolation after pausing. More...
 
tVoid Pause ()
 Pauses the clock at the current instant. More...
 
- Public Member Functions inherited from cBaseClock
 cBaseClock (const tChar *strName)
 CTOR to set 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 tChar *i_strIID, tVoid *&o_pInterface) override
 Query interfaces on an object. More...
 
tResult GetInterface (const tChar *i_strIID, const tVoid *&o_pInterface) const override
 Provides const correct interface querying. More...
 
tVoid 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::atomic_int_least64_t m_nExternalStreamOffset
 
adtf::base::flash::tNanoSeconds m_nLastInterpolatedTime = adtf::base::flash::tNanoSeconds{0}
 
tBool m_bPaused = tFalse
 

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!
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ cInterpolatingClock()

cInterpolatingClock ( const tChar strName)

Constructor.

Parameters
[in]strNameThe name of the clock.

Member Function Documentation

◆ Pause()

tVoid 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 Reset ( tTimeStamp  nNewTime)

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

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

◆ Reset() [2/2]

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

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

◆ SetTime() [1/2]

tResult 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

◆ SetTime() [2/2]

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()

tVoid Start ( )

Restarts interpolation after pausing.


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Tue Sep 28 2021 by doxygen 1.8.14)