ADTF  3.13.0
IReferenceClockabstract

The IReferenceClock interface provides the reference time source for the filter graph. More...

Inheritance diagram for IReferenceClock:
[legend]

Classes

class  IClock
 Interface for clocks. More...
 
class  IClockListCallback
 Callback for listing of clocks. More...
 
class  ISync2RefChannel
 Interface for synchronizing external timestamps to stream time. More...
 
class  ISync2RefChannelFactory
 Interface for sync2ref class factories. More...
 
class  ISync2RefListCallback
 Callback for listing of sync2ref methods. More...
 
struct  tReferenceClockEvent
 This structure describes the functionality for the adtf::ucom::ant::IEventSource Communication Expansion. More...
 

Public Types

enum  tReferenceClockEventId { EVENT_TimeResetBegin = 0x0000, EVENT_TimeResetEnd = 0x0001, EVENT_TimeUpdate = 0x0004 }
 Event Id enumeration for the tReferenceClockEvent::nEventId. More...
 

Public Member Functions

 ADTF_IID (IReferenceClock, "reference_clock.ant.streaming.adtf.iid")
 Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast. More...
 
virtual tTimeStamp GetTime () const =0
 Retrieves the current reference time. More...
 
virtual tTimeStamp GetStreamTime () const =0
 Retrieves the stream time which is reset at the start of the stream. More...
 
virtual tResult RegisterClock (const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
 Registers a new clock. More...
 
virtual tResult UnregisterClock (const adtf::ucom::ant::iobject_ptr< IClock > &pClock)=0
 Unregisters a clock. More...
 
virtual tResult GetClocks (IClockListCallback &oCallback) const =0
 Lists all available clocks. More...
 
virtual tResult GetClock (const tChar *strName, adtf::ucom::ant::iobject_ptr< IClock > &pClock) const =0
 Find a clock. More...
 
virtual tResult SetMainClock (const tChar *strName)=0
 This will change the main clock to the given clock. More...
 
virtual tResult GetMainClock (adtf::base::ant::IString &&strName) const =0
 Retrieves the name of the current main clock. More...
 
virtual tResult SetStreamClock (const tChar *strName)=0
 Sets the clock of which the time is returned by adtf::services::ant::IReferenceClock::GetStreamTime. More...
 
virtual tResult GetStreamClock (adtf::base::ant::IString &&strName) const =0
 Retrieves the name of the current stream clock. More...
 
virtual tResult RegisterSync2RefFactory (const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
 Registers a new Sync2Ref channel factory. More...
 
virtual tResult UnregisterSync2RefFactory (const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &oSync2RefFactory)=0
 Unregisters a Sync2Ref channel factory. More...
 
virtual tResult ListSync2RefMethods (ISync2RefListCallback &oCallback)=0
 Lists all available Sync2Ref methods. More...
 
virtual tResult GetSync2RefChannel (adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &pSync2RefChannel, const tChar *strName=nullptr, const tChar *strMethod=nullptr) const =0
 Returns a new instance of a Sync2Ref Channel implementation. 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...
 

Static Public Attributes

static const tInt ADTF_MAX_CLOCK_NAME_LENGTH = 256
 The maximum length of clock names, due to length restrictions when storing names in the clock extension of DAT files.
 

Protected Member Functions

 ~IReferenceClock ()=default
 not destructable
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor –> Use implemented Destroy() instead of delete!
 

Detailed Description

The IReferenceClock interface provides the reference time source for the filter graph.

See also Clock Concept for further information on timings within ADTF. Default implementation of provide service is reached by CID_ADTF_REFERENCE_CLOCK.

Definition at line 32 of file reference_clock_intf.h.

Member Enumeration Documentation

◆ tReferenceClockEventId

Event Id enumeration for the tReferenceClockEvent::nEventId.

Enumerator
EVENT_TimeResetBegin 

Event describes the Time reset before setting a new time.

EVENT_TimeResetEnd 

Event describes the Time reset after a new time was set.

EVENT_TimeUpdate 

Event describes that the time has been updated, only emitted by non-contious clocks.

Definition at line 58 of file reference_clock_intf.h.

Member Function Documentation

◆ ADTF_IID()

ADTF_IID ( IReferenceClock  ,
"reference_clock.ant.streaming.adtf.iid"   
)

Marks the IReferenceClock to be castable with the adtf::ucom::ant::ucom_cast.

See also
ADTF_IID(_interface, _striid)

◆ GetClock()

virtual tResult GetClock ( const tChar strName,
adtf::ucom::ant::iobject_ptr< IClock > &  pClock 
) const
pure virtual

Find a clock.

Parameters
[in]strNameThe name of the clock.
[out]pClockThe pointer to the clock interface.
Return values
ERR_NOT_FOUNDThere is no such clock registered.

◆ GetClocks()

virtual tResult GetClocks ( IClockListCallback oCallback) const
pure virtual

Lists all available clocks.

Parameters
[in]oCallbackThe callback that will be called for each clock.
Returns
Standard result, passed on from the callback.

◆ GetMainClock()

virtual tResult GetMainClock ( adtf::base::ant::IString &&  strName) const
pure virtual

Retrieves the name of the current main clock.

Returns
The name of the current main clock

◆ GetStreamClock()

virtual tResult GetStreamClock ( adtf::base::ant::IString &&  strName) const
pure virtual

Retrieves the name of the current stream clock.

Returns
The name of the current stream clock

◆ GetStreamTime()

virtual tTimeStamp GetStreamTime ( ) const
pure virtual

Retrieves the stream time which is reset at the start of the stream.

Returns
Returns the current streamtime in microseconds. (see also Clock Concept for further information)

Referenced by cSampleWriter::ManualTrigger().

◆ GetSync2RefChannel()

virtual tResult GetSync2RefChannel ( adtf::ucom::ant::iobject_ptr< ISync2RefChannel > &  pSync2RefChannel,
const tChar strName = nullptr,
const tChar strMethod = nullptr 
) const
pure virtual

Returns a new instance of a Sync2Ref Channel implementation.

Parameters
[out]pSync2RefChannelThe pointer to the new instance.
[in]strNameAn optional name of the channel (for logging purposes, need not be unique)
[in]strMethodIf given this method will be used, otherwise the set default.
Return values
ERR_NOT_FOUNDThere is no such Sync2Ref method available

◆ GetTime()

virtual tTimeStamp GetTime ( ) const
pure virtual

Retrieves the current reference time.

The GetTime method retrieves the current reference time.

Returns
Returns the current time in microseconds. (see also Clock Concept for further information).

◆ ListSync2RefMethods()

virtual tResult ListSync2RefMethods ( ISync2RefListCallback oCallback)
pure virtual

Lists all available Sync2Ref methods.

Parameters
[in]oCallbackThe callback that will be called for each registered clock.
Returns
The return value from the callback.

◆ RegisterClock()

virtual tResult RegisterClock ( const adtf::ucom::ant::iobject_ptr< IClock > &  pClock)
pure virtual

Registers a new clock.

Parameters
[in]pClockThe new clock.
Return values
ERR_RESSOURCE_IN_USEThere is already a clock registered with the same name.
ERR_INVALID_ARGThe name of the clock is too long.

◆ RegisterSync2RefFactory()

virtual tResult RegisterSync2RefFactory ( const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &  oSync2RefFactory)
pure virtual

Registers a new Sync2Ref channel factory.

Parameters
[in]oSync2RefFactoryThe new factory.
Return values
ERR_RESOURCE_IN_USEThere is already a factory with the same name registered.

◆ SetMainClock()

virtual tResult SetMainClock ( const tChar strName)
pure virtual

This will change the main clock to the given clock.

This is a severe modification of the ADTF framework, change this only if you know what you are doing! For implementational reasons this is only allowed during runlevel adtf::base::ant::tADTFRunLevel "RL_System". To do so you have to create your own clock service and register it in runlevel adtf::base::ant::tADTFRunLevel "RL_System".

Remarks
Mind that this has to be a steady clock, otherwise ADTF might turn into a time machine and leave you stranded back in time with hungry dinosaurs.
Parameters
[in]strNameThe name of the clock.
Return values
ERR_NOT_FOUNDThere is no such clock registered.

◆ SetStreamClock()

virtual tResult SetStreamClock ( const tChar strName)
pure virtual

Sets the clock of which the time is returned by adtf::services::ant::IReferenceClock::GetStreamTime.

Changing this is not allowed during runlevel RL_Running.

Parameters
[in]strNameThe name of the clock.
Return values
ERR_NOT_FOUNDThere is no such clock registered.

◆ UnregisterClock()

virtual tResult UnregisterClock ( const adtf::ucom::ant::iobject_ptr< IClock > &  pClock)
pure virtual

Unregisters a clock.

Parameters
[in]pClockThe clock.
Return values
ERR_NOT_FOUNDThe given clock is not registered.

◆ UnregisterSync2RefFactory()

virtual tResult UnregisterSync2RefFactory ( const adtf::ucom::ant::iobject_ptr< ISync2RefChannelFactory > &  oSync2RefFactory)
pure virtual

Unregisters a Sync2Ref channel factory.

Parameters
[in]oSync2RefFactoryThe factory to unregister.
Return values
ERR_NOT_FOUNDFactory was not registered with the reference clock.

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