ADTF
|
Interface for synchronizing external timestamps to stream time. More...
Public Member Functions | |
ADTF_IID (ISync2RefChannel, "sync2ref_channel.reference_clock.ant.streaming.adtf.iid") | |
Marks the ISync2RefChannel to be castable with the adtf::ucom::ant::ucom_cast. More... | |
virtual tTimeStamp | Sync2RefTime (tTimeStamp tmInputTime)=0 |
Converts an input timestamp to the StreamTime of the framework's ReferenceClock by identifying the clock offset and by compensating the clock drift. More... | |
virtual tTimeStamp | Sync2RefTime (tTimeStamp tmRefStreamTime, tTimeStamp tmInputTime)=0 |
Converts an input timestamp to the given StreamTime of the framework's ReferenceClock by identifying the clock offset and by compensating the clock drift. 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from IObject | |
~IObject ()=default | |
Protected destructor --> Use implemented Destroy() instead of delete! | |
Interface for synchronizing external timestamps to stream time.
Definition at line 138 of file reference_clock_intf.h.
ADTF_IID | ( | ISync2RefChannel | , |
"sync2ref_channel.reference_clock.ant.streaming.adtf.iid" | |||
) |
Marks the ISync2RefChannel
to be castable with the adtf::ucom::ant::ucom_cast.
|
pure 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:
[in] | tmInputTime | The 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. |
|
pure 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.
[in] | tmRefStreamTime | Stream timestamp to reference to [microseconds] |
[in] | tmInputTime | The 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] |