|
ADTF
|
#include <graph_object.h>
Inherits adtf::streaming::flash::cNamedGraphObject, adtf::streaming::ant::cDataBinding, adtf::streaming::ant::cInterfaceBinding, adtf::streaming::ant::cRuntimeBehaviour, and adtf::base::flash::cConfiguration.
Inherited by adtf::filter::cFilter, adtf::filter::cSampleStreamingSink, and adtf::filter::cSampleStreamingSource.
Classes | |
| class | cDataTriggerHint |
| class | cNoTriggerHint |
| class | cThreadTriggerHint |
| class | cTimerTriggerHint |
| class | cTriggerHint |
Public Types | |
| enum class | tRecoverableAction : uint8_t { Log = 0 , Fatal = 1 } |
Public Member Functions | |
| cGraphObject () | |
| Default Constructor. | |
| ~cGraphObject () override | |
| Destructor. | |
| virtual tResult | Process (base::flash::tNanoSeconds tmTrigger, streaming::ant::IRunner *pRunner) |
| virtual tResult | ProcessInput (base::flash::tNanoSeconds tmTrigger, streaming::flash::ISampleReader *pReader) |
| virtual tResult | ProcessInput (streaming::flash::ISampleReader *pReader, const ucom::ant::iobject_ptr< const streaming::ant::ISample > &pSample) |
| virtual tResult | ProcessInput (streaming::flash::ISampleReader *pReader, base::flash::tNanoSeconds tmSample, const void *pSampleData, size_t nSampleDataSize) |
| template<typename ReaderType = cPinReader> | |
| ReaderType * | CreateInputPin (const char *strName, bool bDataInTrigger=true, bool bForwardTriggerViaOutputPins=true) |
| template<typename ReaderType = cPinReader> | |
| ReaderType * | CreateInputPin (const char *strName, const cStreamTypeHelper &oType, bool bDataInTrigger=true, bool bForwardTriggerViaOutputPins=true) |
| template<typename ReaderType = cPinReader, typename CALLABLE = std::function<tResult(base::flash::tNanoSeconds)>, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, base::flash::tNanoSeconds >, bool > = true> | |
| ReaderType * | CreateInputPinWithCallback (const char *strName, const cStreamTypeHelper &oType, CALLABLE &&fnTriggerCallback, bool bForwardTriggerViaOutputPins=true) |
| template<typename ReaderType = cPinReader, typename CALLABLE = std::function<tResult(const ucom::ant::iobject_ptr<const streaming::ant::ISample>&)>, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, const ucom::ant::iobject_ptr< const streaming::ant::ISample > & >, bool > = true> | |
| ReaderType * | CreateInputPinWithCallback (const char *strName, const cStreamTypeHelper &oType, CALLABLE &&fnSampleCallback, bool bForwardTriggerViaOutputPins=true) |
| template<typename ReaderType = cPinReader, typename CALLABLE = std::function<tResult(base::flash::tNanoSeconds, const void*, size_t)>, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, base::flash::tNanoSeconds, const void *, size_t >, bool > = true> | |
| ReaderType * | CreateInputPinWithCallback (const char *strName, const cStreamTypeHelper &oType, CALLABLE &&fnSampleDataCallback, bool bForwardTriggerViaOutputPins=true) |
| template<typename Type, typename ReaderType = cPinReader, typename CALLABLE = std::function<tResult(base::flash::tNanoSeconds, const Type&)>, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, base::flash::tNanoSeconds, const Type & >, bool > = true> | |
| ReaderType * | CreateInputPinWithCallback (const char *strName, const cStreamTypeHelper &oType, CALLABLE &&fnDataCallback, bool bForwardTriggerViaOutputPins=true) |
| virtual tResult | AcceptType (streaming::flash::ISampleReader *pReader, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType) |
| template<typename WriterType = cPinWriter> | |
| WriterType * | CreateOutputPin (const char *strName) |
| template<typename WriterType = cPinWriter> | |
| WriterType * | CreateOutputPin (const char *strName, const cStreamTypeHelper &oType) |
| template<typename RequestableWriterType = streaming::requestable_writer<>> | |
| RequestableWriterType * | CreateRequestableOutputPin (const char *strName, const cStreamTypeHelper &oType=streaming::ant::stream_meta_type_anonymous()) |
| streaming::ant::IRunner * | CreateRunner (const char *strName, const cTriggerHint &oTriggerHint=cNoTriggerHint(), bool bForwardTriggerViaOutputPins=true) |
| template<typename CALLABLE, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, base::flash::tNanoSeconds >, bool > = true> | |
| streaming::ant::IRunner * | CreateRunner (const char *strName, CALLABLE &&fnRunFunction, const cTriggerHint &oTriggerHint=cNoTriggerHint(), bool bForwardTriggerViaOutputPins=true) |
| template<typename Interface, typename Instance> | |
| void | CreateInterfaceServer (const char *strName, ucom::ant::enable_object_ptr_from_this< Instance > *pInstance) |
| template<typename Interface> | |
| void | CreateInterfaceServer (const char *strName, const ucom::ant::iobject_ptr< Interface > &pInstance) |
| template<typename Interface> | |
| interface_client< Interface > | CreateInterfaceClient (const char *strName) |
| template<typename ReaderType = cPinReader> | |
| std::shared_ptr< ReaderType > | CreateReader (const char *strName, const cStreamTypeHelper &oType) |
| template<typename WriterType = cPinWriter> | |
| std::shared_ptr< WriterType > | CreateWriter (const char *strName, const cStreamTypeHelper &oType) |
| template<typename CALLABLE, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, base::flash::tNanoSeconds >, bool > = true> | |
| ucom::ant::object_ptr< streaming::ant::IRunner > | RegisterRunner (const char *strName, CALLABLE &&fnRunFunction) |
| tResult | RegisterRunner (const ucom::ant::iobject_ptr< streaming::ant::IRunner > &pRunner) override |
| tResult | RegisterRunner (const char *strName, base::flash::IRunnable &oRunnable) |
| tResult | RegisterRunner (const char *strName, adtf::base::ant::IRunnable &oRunnable) override |
| tResult | ConfigureDataInTrigger (const char *strRunnerName, const char *strPinName) |
| tResult | ConfigureDataOutTrigger (const char *strRunnerName, const char *strPinName) |
| tResult | ConfigureTimerTrigger (const char *strRunnerName, tTimeStamp tmPeriod) |
| tResult | ConfigureThreadTrigger (const char *strRunnerName, bool bCallCyclic) |
| virtual tResult | RequestDynamicInputPin (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType) |
| virtual tResult | RequestDynamicOutputPin (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType) |
| virtual tResult | RequestDynamicInterfaceClient (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType) |
| virtual tResult | RequestDynamicInterfaceServer (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType) |
| virtual tResult | EnableSubStream (streaming::flash::ISampleWriter *pWriter, uint32_t nSubStreamId, const base::ant::IProperties *pRequestProperties=nullptr) |
| virtual void | DisableSubStream (streaming::flash::ISampleWriter *pWriter, uint32_t nSubStreamId) |
| tResult | RequestPin (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType, ucom::ant::iobject_ptr< streaming::ant::IInPin > &pInPin) |
| For internal use. This will call RequestDynamicInputPin(). | |
| tResult | RequestPin (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType, ucom::ant::iobject_ptr< streaming::ant::IOutPin > &pOutPin) |
| For internal use. This will call RequestDynamicOutputPin(). | |
| tResult | RequestBindingObject (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType, ucom::ant::iobject_ptr< streaming::ant::IBindingClient > &pClient) |
| For internal use. This will call RequestDynamicInterfaceClient(). | |
| tResult | RequestBindingObject (const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IBindingType > &pType, ucom::ant::iobject_ptr< streaming::ant::IBindingServer > &pServer) |
| For internal use. This will call RequestDynamicInterfaceServer(). | |
| void | RegisterPropertyVariable (const char *strName, base::ant::cPropertyVariable &oPropertyVariable) |
| void | SetDescription (const char *strDescription) |
| void | SetDescription (const char *strItem, const char *strDescription) |
| void | SetEditor (const char *strName, const char *strUrl) |
| void | SetHelpLink (const char *strUrl) |
| tResult | ActivatePins () override |
| util::log::ILogChannel * | CreateLogChannel (std::string_view strName, base::elasto::IErrorHandling::tAction eDefaultErrorAction=base::elasto::IErrorHandling::tAction::Stop, tRecoverableAction eDefaultRecoverableAction=tRecoverableAction::Log, util::log::tLogLevel eDefaultLogLevel=util::log::tLogLevel::Detail) |
| util::log::ILogChannel * | GetLogChannel (std::string_view strName={}) |
| util::log::ILogChannel * | a_util_get_current_log_channel () const noexcept |
| tResult | SetName (const char *strName) |
| tResult | SetParent (const ucom::ant::IObject *oParentObject) |
| ucom::object_ptr< services::ant::IMacroResolver > | GetParentMacroResolver () const |
Public Member Functions inherited from adtf::streaming::flash::cNamedGraphObject | |
| tResult | GetName (base::ant::IString &&strName) const |
| tResult | SetName (const char *strName) |
| tResult | SetParent (const ucom::ant::IObject *pParentObject) |
| tResult | GetParent (const ucom::ant::IObject *&poParentObject) const |
Public Member Functions inherited from adtf::streaming::ant::cDataBinding | |
| tResult | GetPins (ucom::ant::iobject_list< IPin > &lstPins) const |
| private d-pointer | |
| tResult | FindPin (const char *strName, ucom::ant::iobject_ptr< ucom::ant::IObject > &pPin) const |
| virtual tResult | RegisterPin (const ucom::ant::iobject_ptr< IPin > &pIPin) |
| tResult | RegisterPin (const ucom::ant::iobject_ptr< IInPin > &pIInPin) |
| tResult | RegisterPin (const ucom::ant::iobject_ptr< IOutPin > &pIOutPin) |
| virtual tResult | UnregisterPin (const ucom::ant::iobject_ptr< IPin > &pIPin) |
| tResult | ReleasePins () |
| virtual tResult | DeactivatePins () |
| tResult | Disconnect () |
Public Member Functions inherited from adtf::streaming::ant::cInterfaceBinding | |
| cInterfaceBinding () | |
| D Pointer Implementation for private members. | |
| virtual | ~cInterfaceBinding () |
| tResult | GetBindingObjects (ucom::ant::iobject_list< IBindingObject > &lstBindingObject) |
| tResult | GetBindingObjects (ucom::ant::iobject_list< const IBindingObject > &lstBindingObject) const |
| tResult | FindBindingObject (const char *strName, ucom::ant::iobject_ptr< const ucom::ant::IObject > &pIBindingObject) const |
| tResult | FindBindingObject (const char *strName, ucom::ant::iobject_ptr< ucom::ant::IObject > &pIBindingObject) |
| virtual tResult | RegisterBindingObject (const ucom::ant::iobject_ptr< IBindingObject > &pBindingObject) |
| tResult | RegisterBindingObject (const ucom::ant::iobject_ptr< IBindingServer > &pBindingServer) |
| tResult | RegisterBindingObject (const ucom::ant::iobject_ptr< IBindingClient > &pBindingClient) |
| tResult | UnregisterBindingObject (const ucom::ant::iobject_ptr< const IBindingObject > &pBindingObject) |
| tResult | Unbind () |
| tResult | ReleaseBindingObjects () |
Public Member Functions inherited from adtf::streaming::ant::cRuntimeBehaviour | |
| tResult | GetRunners (ucom::ant::iobject_list< IRunner > &lstRunners) const |
| copydoc IRuntimeBehaviour::GetRunners | |
| tResult | FindRunner (const char *strName, ucom::ant::iobject_ptr< ucom::ant::IObject > &pRunner) const |
| copydoc IRuntimeBehaviour::FindRunner | |
| tResult | GetInnerPipes (ucom::ant::iobject_list< ITriggerPipe > &lstInnerpTriggerPipe) const |
| copydoc IRuntimeBehaviour::GetInnerPipes | |
| virtual tResult | UnregisterRunner (const ucom::ant::iobject_ptr< IRunner > &pRunner) |
| tResult | ReleaseRunners () |
| virtual tResult | RegisterInnerPipe (const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe) |
| virtual tResult | UnregisterInnerPipe (const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe) |
| tResult | ReleaseTriggerPipes () |
Public Member Functions inherited from adtf::base::flash::cConfiguration | |
| cConfiguration () | |
| Default constructor. | |
| virtual | ~cConfiguration () |
| Destructor. | |
| tResult | GetProperties (adtf::ucom::ant::iobject_ptr< const IProperties > &pProperties) const |
| tResult | GetProperties (adtf::ucom::ant::iobject_ptr< IProperties > &pProperties) |
| tResult | AttachConfiguration (const char *strName, IConfiguration &oAttachedConfiguration) |
| tResult | DetachConfiguration (const char *strName) |
| tResult | RegisterPropertyVariable (const char *strName, ant::cPropertyVariable &oPropertyVariable) |
Protected Member Functions | |
| void | SetupStreamer (std::shared_ptr< streaming::flash::ISampleStreamer > pStreamer, const char *strName, const ucom::ant::iobject_ptr< const streaming::ant::IStreamType > &pType) |
| void | CreateInputPin (std::shared_ptr< streaming::flash::ISampleReader > pReader, bool bDataInTrigger=true, bool bForwardTriggerViaOutputPins=true) |
| template<typename CALLABLE, std::enable_if_t< std::is_invocable_r_v< tResult, std::decay_t< CALLABLE >, base::flash::tNanoSeconds >, bool > = true> | |
| void | CreateInputPin (std::shared_ptr< streaming::flash::ISampleReader > pReader, CALLABLE &&fnTriggerCallback, bool bForwardTriggerViaOutputPins) |
| void | CreateInputPin (std::shared_ptr< streaming::flash::ISampleReader > pReader, const char *strTriggerFunctionName, bool bForwardTriggerViaOutputPins=true) |
| void | CreateOutputPin (std::shared_ptr< streaming::flash::ISampleWriter > pWriter) |
| void | ConfigureRunner (streaming::ant::IRunner *pRunner, const cTriggerHint &oTriggerHint, bool bForwardTriggerViaOutputPins) |
| std::string | GetFullName () |
Protected Member Functions inherited from adtf::streaming::ant::cDataBinding | |
| cDataBinding () | |
| CTOR. | |
| virtual | ~cDataBinding () |
| DTOR. | |
Protected Member Functions inherited from adtf::streaming::ant::cRuntimeBehaviour | |
| cRuntimeBehaviour () | |
| private _d-pointer | |
| virtual | ~cRuntimeBehaviour () |
| DTOR. | |
Protected Attributes | |
| ucom::ant::object_ptr< services::ant::IReferenceClock > | _clock |
| std::unique_ptr< cImplementation > | m_pImplementation |
Protected Attributes inherited from adtf::streaming::flash::cNamedGraphObject | |
| const adtf::ucom::ant::IObject * | m_pParent = nullptr |
| parent of the named object | |
| std::string | m_strName |
| name of the | |
Base class for adtf::filter::cFilter, adtf::filter::cSampleStreamingSource and adtf::filter::cSampleStreamingSink.
The class provides many convenience member functions that facilitate the following operations:
For the implementation of dynamic pins, interface clients and interface servers overwrite one or more of the following virtual functions:
All Create* methods throw exceptions in case of errors. The ADTF SDK is prepared to cope with exceptions within any of the graph objects methods, especially in your subclasses' constructors. You are also free to throw exceptions (THROW_ERROR_DESC) in methods that return tResult error codes. But if you call methods that return a tResult error code yourself, make sure to wrap them with the appropriate RETURN_IF_FAILED or THROW_IF_FAILED macros.
|
strong |
|
noexcept |
Overload fo ADL based use of the default log channel within LOG_* macros.
|
virtual |
Called whenever a new type is read from a reader that has no other accept type callback (streaming::ant::cSampleReader::SetAcceptTypeCallback) registered.
Override this function to change the default behaviour, call the base implementation at the beginning and perform additional checks and/or react to type changes or similar.
| [in] | pReader | The reader that read the new type. |
| [in] | pType | The new stream type. |
|
overridevirtual |
Activate all pins.
Reimplemented from adtf::streaming::ant::cDataBinding.
| tResult adtf::filter::cGraphObject::ConfigureDataInTrigger | ( | const char * | strRunnerName, |
| const char * | strPinName ) |
This is here for compatibility reasons. CreateInputPin() will do this for you.
| tResult adtf::filter::cGraphObject::ConfigureDataOutTrigger | ( | const char * | strRunnerName, |
| const char * | strPinName ) |
This is here for compatibility reasons. CreateOutputPin() and CreateRunner() will do this for you.
| tResult adtf::filter::cGraphObject::ConfigureThreadTrigger | ( | const char * | strRunnerName, |
| bool | bCallCyclic ) |
This is here for compatibility reasons. CreateRunner() will do this for you.
| tResult adtf::filter::cGraphObject::ConfigureTimerTrigger | ( | const char * | strRunnerName, |
| tTimeStamp | tmPeriod ) |
This is here for compatibility reasons. CreateRunner() will do this for you.
| ReaderType * adtf::filter::cGraphObject::CreateInputPin | ( | const char * | strName, |
| bool | bDataInTrigger = true, | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new input pin with an anonymous stream type.
| ReaderType | The reader implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | bDataInTrigger | If true, an inner trigger pipe will be created from the pin to the ProcessInput() function. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after ProcessInput() was called. |
| tResult | In case of an error. |
| ReaderType * adtf::filter::cGraphObject::CreateInputPin | ( | const char * | strName, |
| const cStreamTypeHelper & | oType, | ||
| bool | bDataInTrigger = true, | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new input pin with a given stream type.
| ReaderType | The reader implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| [in] | bDataInTrigger | If true, an inner trigger pipe will be created from the pin to the ProcessInput() function. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after ProcessInput() was called. |
| tResult | In case of an error. |
|
protected |
The implementation used by CreateInputPin(const char*, bool, bool) and CreateInputPin(const char*, const cStreamTypeHelper&, bool, bool)
|
protected |
The implementation used by CreateInputPin(const char*, const cStreamTypeHelper&, std::function<tResult(base::flash::tNanoSeconds)>, bool)
|
protected |
The implementation used by CreateInputPin(std::shared_ptr<streaming::flash::ISampleReader>, const char*, bool)
| ReaderType * adtf::filter::cGraphObject::CreateInputPinWithCallback | ( | const char * | strName, |
| const cStreamTypeHelper & | oType, | ||
| CALLABLE && | fnDataCallback, | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new input pin with a given stream type.
Mind that the writers are not flushed automatically after your callback finishes, so make sure to call adtf::streaming::flash::ISampleWriter::Flush() after you're done writing.
The specified callback will be called for each currently available sample whenever a trigger occurs on the given input.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
| Type | The data type that the sample data should be cast to. |
| ReaderType | The reader implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| [in] | fnDataCallback | An inner trigger pipe (data in trigger) will be created from the pin to this callback. This will be called with data from each sample cast to the given type available when the trigger occured. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after fnTriggerCallback was called. |
| tResult | In case of an error. |
| ReaderType * adtf::filter::cGraphObject::CreateInputPinWithCallback | ( | const char * | strName, |
| const cStreamTypeHelper & | oType, | ||
| CALLABLE && | fnSampleCallback, | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new input pin with a given stream type.
Mind that the writers are not flushed automatically after your callback finishes, so make sure to call adtf::streaming::flash::ISampleWriter::Flush() after you're done writing.
The specified callback will be called for each currently available sample whenever a trigger occurs on the given input.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
| ReaderType | The reader implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| [in] | fnSampleCallback | An inner trigger pipe (data in trigger) will be created from the pin to this callback. This will be called for each sample available when the trigger occured. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after fnTriggerCallback was called. |
| tResult | In case of an error. |
| ReaderType * adtf::filter::cGraphObject::CreateInputPinWithCallback | ( | const char * | strName, |
| const cStreamTypeHelper & | oType, | ||
| CALLABLE && | fnSampleDataCallback, | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new input pin with a given stream type.
Mind that the writers are not flushed automatically after your callback finishes, so make sure to call adtf::streaming::flash::ISampleWriter::Flush() after you're done writing.
The specified callback will be called for each currently available sample whenever a trigger occurs on the given input.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
| ReaderType | The reader implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| [in] | fnSampleDataCallback | An inner trigger pipe (data in trigger) will be created from the pin to this callback. This will be called with data from each sample available when the trigger occured. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after fnTriggerCallback was called. |
| tResult | In case of an error. |
| ReaderType * adtf::filter::cGraphObject::CreateInputPinWithCallback | ( | const char * | strName, |
| const cStreamTypeHelper & | oType, | ||
| CALLABLE && | fnTriggerCallback, | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new input pin with a given stream type.
Mind that the writers are not flushed automatically after your callback finishes, so make sure to call adtf::streaming::flash::ISampleWriter::Flush() after you're done writing.
The specified callback will be called whenever a trigger occurs on the given input.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
| ReaderType | The reader implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| [in] | fnTriggerCallback | An inner trigger pipe (data in trigger) will be created from the pin to this callback. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after fnTriggerCallback was called. |
| tResult | In case of an error. |
| interface_client< Interface > adtf::filter::cGraphObject::CreateInterfaceClient | ( | const char * | strName | ) |
Creates an interface client binding object.
| Interface | The interface that the client object expects. |
| strName | The name of the client object. |
| tResult | In case of an error. |
| void adtf::filter::cGraphObject::CreateInterfaceServer | ( | const char * | strName, |
| const ucom::ant::iobject_ptr< Interface > & | pInstance ) |
Creates an interface server binding object.
| Interface | The interface that the server object should publish. |
| strName | The name of the server object. |
| pInstance | The object implementing the interface. |
| tResult | In case of an error. |
| void adtf::filter::cGraphObject::CreateInterfaceServer | ( | const char * | strName, |
| ucom::ant::enable_object_ptr_from_this< Instance > * | pInstance ) |
Creates an interface server binding object.
This overload can be used when the interface is implemented by the subclass of cGraphObject directly. To do so your subclass has to inherit from ucom::ant::enable_object_ptr_from_this. This way the server object will store only a weak reference to your object in order to prevent circular references. Due to this fact, you cannot use this overload in your constructor as the ucom::ant::enable_object_ptr_from_this::object_ptr_from_this() is only available after your object has been fully constructed with ucom::ant::make_object_ptr().
| Interface | The interface that the server object should publish. |
| Instance | Automatically deducted, used to differentiate between the template overloads. |
| strName | The name of the server object. |
| pInstance | Pass in the this pointer. |
| tResult | In case of an error. |
| util::log::ILogChannel * adtf::filter::cGraphObject::CreateLogChannel | ( | std::string_view | strName, |
| base::elasto::IErrorHandling::tAction | eDefaultErrorAction = base::elasto::IErrorHandling::tAction::Stop, | ||
| tRecoverableAction | eDefaultRecoverableAction = tRecoverableAction::Log, | ||
| util::log::tLogLevel | eDefaultLogLevel = util::log::tLogLevel::Detail ) |
Creates a new log channel.
This will also create properties for the channel which allow the user to override the default log level and error handling.
Filter:
| [in] | strName | The name of the channel. This will also be used for creating the properties. |
| [in] | eDefaultErrorAction | The default action when a fatal error is reported. |
| [in] | eDefaultRecoverableAction | The default action to perform when a recoverable error is reported. |
| [in] | eDefaultLogLevel | The default log level for this channel. |
| ERR_RESOURCE_IN_USE | when the name is already taken. |
| WriterType * adtf::filter::cGraphObject::CreateOutputPin | ( | const char * | strName | ) |
Creates a new output pin without an initial stream type.
| WriterType | The writer implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| tResult | In case of an error. |
| WriterType * adtf::filter::cGraphObject::CreateOutputPin | ( | const char * | strName, |
| const cStreamTypeHelper & | oType ) |
Creates a new output pin with a given stream type.
| WriterType | The writer implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| tResult | In case of an error. |
|
protected |
The implementation used by CreateOutputPin(const char*, const cStreamTypeHelper&), CreateOutputPin(const char*, const cStreamTypeHelper&).
| std::shared_ptr< ReaderType > adtf::filter::cGraphObject::CreateReader | ( | const char * | strName, |
| const cStreamTypeHelper & | oType ) |
Creates and intializes a new sample reader.
Most of the time you are better off using the CreateInputPin methods instead, but this method is provided for completeness.
| ReaderType | The reader implementation. |
| [in] | strName | The name of the reader (which is used to name pins). |
| [in] | oType | The stream type associated with the reader. |
| tResult | In case of an error. |
| RequestableWriterType * adtf::filter::cGraphObject::CreateRequestableOutputPin | ( | const char * | strName, |
| const cStreamTypeHelper & | oType = streaming::ant::stream_meta_type_anonymous() ) |
Creates a new requestable output pin with a given stream type.
This will support Substream requests via EnableSubStream() and DisableSubStream().
or
| RequestableWriterType | The writer implementation that is associated with the pin. |
| [in] | strName | The name of the pin. |
| [in] | oType | The stream type. |
| tResult | In case of an error. |
| streaming::ant::IRunner * adtf::filter::cGraphObject::CreateRunner | ( | const char * | strName, |
| CALLABLE && | fnRunFunction, | ||
| const cTriggerHint & | oTriggerHint = cNoTriggerHint(), | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new Runner that can be triggered by an Active Runner.
This will call the fnRunFunction callback each time the Runner is triggered.
The calls to the specified callback are not synchronized in any way, so make sure you guard access to shared resources (especially readers) yourself.
Mind that the writers are not flushed automatically after your fnRunFunction finishes, so make sure to call adtf::streaming::flash::ISampleWriter::Flush() after you're done writing.
| [in] | strName | The name of the Runner. |
| [in] | fnRunFunction | The runners callback, called whenever the Runner is triggered. |
| [in] | oTriggerHint | A hint on which Active Runner should be used to trigger the runner. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after fnRunFunction was called. |
| tResult | In case of an error. |
| streaming::ant::IRunner * adtf::filter::cGraphObject::CreateRunner | ( | const char * | strName, |
| const cTriggerHint & | oTriggerHint = cNoTriggerHint(), | ||
| bool | bForwardTriggerViaOutputPins = true ) |
Creates a new Runner that can be triggered by an Active Runner.
This will call the Process() method each time the Runner is triggered.
or
| [in] | strName | The name of the Runner. |
| [in] | oTriggerHint | A hint on which Active Runner should be used to trigger the Runner. |
| [in] | bForwardTriggerViaOutputPins | If true, triggers will be forwarded via all output pins after Process() was called. |
| tResult | In case of an error. |
| std::shared_ptr< WriterType > adtf::filter::cGraphObject::CreateWriter | ( | const char * | strName, |
| const cStreamTypeHelper & | oType ) |
Creates and intializes a new sample reader.
Most of the time you are better off using the CreateOutputPin methods instead, but this method is provided for completeness.
| WriterType | The writer implementation. |
| [in] | strName | The name of the writer (which is used to name pins). |
| [in] | oType | The stream type associated with the writer. |
| tResult | In case of an error. |
|
virtual |
Called when the last consumer cancels its request for the transmission of samples of a given Substream.
Mind that calls to this method are synchronized to the Process() and ProcessInput() methods with the help of a mutex.
| [in] | pWriter | The writer of the pin, that the Substream was requested from. |
| [in] | nSubStreamId | The id of the Substream. |
|
virtual |
This is called when the first consumer requests the transmission of samples of a given Substream.
Mind that calls to this method are synchronized to the Process() and ProcessInput() methods with the help of a mutex.
| [in] | pWriter | The writer of the pin, that the Substream was requested from. |
| [in] | nSubStreamId | The id of the Substream. |
| [in] | pRequestProperties | The request properties, if nullptr, use defaults. |
| util::log::ILogChannel * adtf::filter::cGraphObject::GetLogChannel | ( | std::string_view | strName = {} | ) |
Retrieves a log channel.
Filter:
| [in] | strName | The name of the log channel. If empty, then the default log channel is returned. |
| ERR_NOT_FOUND | when no log channel with the given name exists. |
|
virtual |
The default Runner function of the graph object.
This is called when a trigger occured for a Runner that you created with CreateRunner(const char*, const cTriggerHint&, bool)
The default implementation calls ProcessInput(base::flash::tNanoSeconds, streaming::flash::ISampleReader*) for each input that has no data in triggers set up.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
All writers will be flushed after this method is called.
| [in] | tmTrigger | The trigger timestamp. |
| [in] | pRunner | Pointer to the Runner that was triggered. |
|
virtual |
Provides access to the reader of incoming data.
Called when
This is the first method in the input processing chain:
will be called in order from within the default implementations of these methods. So you are free to override the one that fits your needs.
The default implementation calls ProcessInput(streaming::flash::ISampleReader*, const ucom::ant::iobject_ptr<const streaming::ant::ISample>&) for each sample that is currently available from the reader.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
All writers will be flushed after this method is called.
| [in] | tmTrigger | The trigger timestamp. |
| [in] | pReader | A reader that might have samples available. |
|
virtual |
Provides access to the sample content of incoming data.
Called by the default implementation of ProcessInput(streaming::flash::ISampleReader*, const ucom::ant::iobject_ptr<const streaming::ant::ISample>&) with the data of an accepted sample that the reader provided (see AcceptType()).
This is the third method in the input processing chain:
will be called in order from within the default implementations of these methods. So you are free to override the one that fits your needs.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
All writers will be flushed after this method is called.
| [in] | pReader | The reader that provided the sample. |
| [in] | tmSample | The sample timestamp. |
| [in] | pSampleData | The sample data. |
| [in] | nSampleDataSize | The size of the sample data. |
|
virtual |
Provides access to the sample of incoming data.
Called by the default implementation of ProcessInput(base::flash::tNanoSeconds, streaming::flash::ISampleReader*) for each accepted sample that the given reader currently provides (see AcceptType()).
The default implementation calls ProcessInput(streaming::flash::ISampleReader*, base::flash::tNanoSeconds, const void*, size_t) with the sample data.
This is the second method in the input processing chain:
will be called in order from within the default implementations of these methods. So you are free to override the one that fits your needs.
All calls to Process(), ProcessInput() and the callbacks of CreateInputPinWithCallback() are synchronized with the help of a single recursive mutex.
All writers will be flushed after this method is called.
| [in] | pReader | The reader that provided the sample |
| [in] | pSample | The sample. |
| void adtf::filter::cGraphObject::RegisterPropertyVariable | ( | const char * | strName, |
| base::ant::cPropertyVariable & | oPropertyVariable ) |
Registers a new property variable which will always reflect the value of a property.
| [in] | strName | The name of the property. |
| [in] | oPropertyVariable | The property variable that is associated with the property. |
| tResult | In case of an error. |
|
overridevirtual |
This is here for compatibility reasons. CreateInputPin() and CreateRunner() will do this for you.
Reimplemented from adtf::streaming::ant::cRuntimeBehaviour.
| tResult adtf::filter::cGraphObject::RegisterRunner | ( | const char * | strName, |
| base::flash::IRunnable & | oRunnable ) |
This is here for compatibility reasons. CreateInputPin() and CreateRunner() will do this for you.
| ucom::ant::object_ptr< streaming::ant::IRunner > adtf::filter::cGraphObject::RegisterRunner | ( | const char * | strName, |
| CALLABLE && | fnRunFunction ) |
Creates and registers a new Runner.
Also take a look at CreateRunner() which allows you to create inner pipes etc.
| [in] | strName | The name of the runner. |
| [in] | fnRunFunction | The runners callback. |
| tResult | In case of an error. |
|
overridevirtual |
This is here for compatibility reasons. CreateInputPin() and CreateRunner() will do this for you.
Reimplemented from adtf::streaming::ant::cRuntimeBehaviour.
|
virtual |
Called whenever a new dynamic input pin is requested.
Call the appropriate CreateInputPin() or CreateInputPinWithCallback() method in your overridden implementation.
| [in] | strName | The name of the requested pin. |
| [in] | pType | The type requested for the pin. |
|
virtual |
Called whenever a new dynamic interface client binding object is requested.
Call the appropriate CreateInterfaceClient() method in your overridden implementation.
| [in] | strName | The name of the requested binding object. |
| [in] | pType | The type requested for the binding object (the interface type). |
|
virtual |
Called whenever a new dynamic interface server binding object is requested.
Call the appropriate CreateInterfaceServer() method in your overridden implementation.
| [in] | strName | The name of the requested binding object. |
| [in] | pType | The type requested for the binding object (the interface type). |
|
virtual |
Called whenever a new dynamic output pin is requested.
Call the appropriate CreateOutputPin() method in your overridden implementation.
| [in] | strName | The name of the requested pin. |
| [in] | pType | The type requested for the pin. |
| void adtf::filter::cGraphObject::SetDescription | ( | const char * | strDescription | ) |
Sets the description information that tools can display.
Filter:
| [in] | strDescription | The description. |
| void adtf::filter::cGraphObject::SetDescription | ( | const char * | strItem, |
| const char * | strDescription ) |
Set the description for a data Pin, an Interface Binding Object or a Runner.
| [in] | strItem | The name of the item to set the description for. |
| [in] | strDescription | The description. |
| void adtf::filter::cGraphObject::SetEditor | ( | const char * | strName, |
| const char * | strUrl ) |
Sets the editor information that tools can use to edit the objects properties, pins etc.
Filter:
Editor (myfilter_editor.qml)
| [in] | strName | The name of the editor. |
| [in] | strUrl | The url of the editor implementation (i.e. a qml file). |
| void adtf::filter::cGraphObject::SetHelpLink | ( | const char * | strUrl | ) |
Sets the link to the documentation that tools can display.
| [in] | strUrl | The url to the help document (i.e. an HTML file). |
|
protected |
Used by the templated CreateInputPin() and CreateOutputPin() methods.
Sets the name and type of a sample reader or sample writer.
| [in] | pStreamer | The reader or writer instance. |
| [in] | strName | The name that should be set. |
| [in] | pType | The type that should be associated with the reader or writer. |
| tResult | In case of an error. |
|
protected |
A reference to the Reference Clock Service interface. The variable will be set, in the constructor.
This exists for compatibility reasons only, so please consider retrieving the interface you need from the runtime.