ADTF
Loading...
Searching...
No Matches
adtf::services::flash::IReferenceClock::ISync2RefChannel Class Referenceabstract

More...

#include <reference_clock_intf.h>

Inherits adtf::services::ant::IReferenceClock::ISync2RefChannel.

Inherited by adtf::services::giant::IReferenceClock::ISync2RefChannel.

Public Member Functions

 ADTF_IID (ISync2RefChannel, "sync2ref_channel.reference_clock.flash.streaming.adtf.iid")
 
virtual base::flash::tNanoSeconds Sync2RefTime (base::flash::tNanoSeconds tmInputTime)=0
 
virtual base::flash::tNanoSeconds Sync2RefTime (base::flash::tNanoSeconds tmRefStreamTime, base::flash::tNanoSeconds tmInputTime)=0
 
virtual tTimeStamp Sync2RefTime (tTimeStamp tmInputTime)=0
 
virtual tTimeStamp Sync2RefTime (tTimeStamp tmRefStreamTime, tTimeStamp tmInputTime)=0
 
- Public Member Functions inherited from adtf::services::ant::IReferenceClock::ISync2RefChannel
 ADTF_IID (ISync2RefChannel, "sync2ref_channel.reference_clock.ant.streaming.adtf.iid")
 
- 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::ucom::ant::IObject
 ~IObject ()=default
 Protected destructor --> Only the final implementation can be destroyed!
 

Detailed Description

Interface for synchronizing external timestamps to stream time.

Member Function Documentation

◆ ADTF_IID()

adtf::services::flash::IReferenceClock::ISync2RefChannel::ADTF_IID ( ISync2RefChannel ,
"sync2ref_channel.reference_clock.flash.streaming.adtf.iid"  )

◆ Sync2RefTime() [1/2]

virtual tTimeStamp adtf::services::ant::IReferenceClock::ISync2RefChannel::Sync2RefTime ( tTimeStamp tmInputTime)
virtual

Converts an input timestamp to the StreamTime of the framework's ReferenceClock by identifying the clock offset and by compensating the clock drift. Example usage:

// store as SyncChannel as member while initializing !!
_runtime->GetObject(pClock);
//...
pClock->GetSync2RefChannel(m_oSyncChannel);
//...
//use it while creating sample
pNewSample->SetTime(m_oSyncChannel->Sync2RefTime(tmHardwareTime));
Definition object_ptr.h:384
Parameters
[in]tmInputTimeThe input timestamp which must be synchronized.
IMPORTANT: tmInputTime should not be lower than the tmInputTime of the last call of Sync2RefTime. Otherwise this will result in a internal offset reset.
Returns
Synchronized timestamp of StreamTime corresponding to the input timestamp

Implements adtf::services::ant::IReferenceClock::ISync2RefChannel.

◆ Sync2RefTime() [2/2]

virtual tTimeStamp adtf::services::ant::IReferenceClock::ISync2RefChannel::Sync2RefTime ( tTimeStamp tmRefStreamTime,
tTimeStamp tmInputTime )
virtual

Converts an input timestamp to the given StreamTime of the framework's ReferenceClock by identifying the clock offset and by compensating the clock drift.

The main goal of this function is to identify a clock offset between an InputTime (i.e. a hardware time) and the StreamTime.

This function returns a synchronized timestamp of the StreamTime which corresponds to the input timestamp. The return value must be the SampleTime for a new sample that contains the InputData recreated for this input timestamp. (sample timestamp used in adtf::streaming::ant::ISample::SetTime )

The offset will be identified by using the appeared minimum offset between StreamTime and InputTime.

The function will remember the offset of every call and will adjust the internal offset every 5 seconds automatically to compensate a clock drift between the InputTime and StreamTime.

Remind: Every timestamp in tTimeStamp is expected in microseconds as long as the function documentation does not define something else!

The function can only handle positive tmRefStreamTime and tmInputTime values.

Parameters
[in]tmRefStreamTimeStream timestamp to reference to [microseconds]
[in]tmInputTimeThe input timestamp which must be synchronized.
IMPORTANT: tmInputTime should not be lower than the tmInputTime of the last call of Sync2RefTime. Otherwise this will result in a internal offset reset. [microseconds]
Returns
Synchronized timestamp of StreamTime corresponding to the input timestamp

Implements adtf::services::ant::IReferenceClock::ISync2RefChannel.


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