ADTF
Loading...
Searching...
No Matches
adtf::streaming::cFilterBase Class Reference

The cFilterBase class implements a basic filter that supports the ant::IFilter interfaces. More...

#include <filterbase.h>

Inherits adtf::ucom::catwo::object< cFilterLevelmachine, ucom::ant::cClassInfo, runtime_behaviour< interface_binding< data_binding< named_graph_object< IFilter > > > > >.

Public Types

typedef cFilterLevelmachine::tInitStage tInitStage
 private d-pointer
 

Public Member Functions

 cFilterBase ()
 
virtual ~cFilterBase ()
 
tResult Init (tInitStage eStage) override
 
tResult Shutdown (tInitStage eStage) override
 
tResult Start () override
 
tResult Stop () override
 
IFilter::tFilterState GetState () const override
 
tResult SetState (IFilter::tFilterState eState) override
 
tResult RegisterPin (const ucom::ant::iobject_ptr< IPin > &pPin) override
 
tResult RegisterPin (const ucom::ant::iobject_ptr< IInPin > &pIInPin)
 gets cDataBinding RegisterPin Variant visible
 
tResult RegisterPin (const ucom::ant::iobject_ptr< IOutPin > &pIOutPin)
 gets cDataBinding RegisterPin Variant visible
 
tResult UnregisterPin (const ucom::ant::iobject_ptr< IPin > &pPin) override
 
tResult RegisterBindingObject (const ucom::ant::iobject_ptr< IBindingObject > &pBindingObject) override
 
tResult RegisterBindingObject (const ucom::ant::iobject_ptr< IBindingServer > &pBindingServer)
 
tResult RegisterBindingObject (const ucom::ant::iobject_ptr< IBindingClient > &pBindingClient)
 
tResult RegisterRunner (const ucom::ant::iobject_ptr< IRunner > &pBindingObject) override
 
virtual tResult RegisterRunner (const char *strName, base::ant::IRunnable &oRunnable)
 
virtual tResult RegisterInnerPipe (const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe)
 
- Public Member Functions inherited from adtf::ucom::catwo::object< cFilterLevelmachine, ucom::ant::cClassInfo, runtime_behaviour< interface_binding< data_binding< named_graph_object< IFilter > > > > >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object.
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying.
 
void Destroy () const override
 Switch from non-virtual destructor to virtual destructor.
 
- Public Member Functions inherited from adtf::ucom::ant::IObject
 ADTF_IID (IObject, "object.ant.ucom.adtf.iid")
 

Protected Attributes

ucom::object_ptr< services::ant::IReferenceClock_clock
 

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

The cFilterBase class implements a basic filter that supports the ant::IFilter interfaces.

brings latest ant::cFilterBase to users scope.

The cFilterBase uses the cFilterLevelmachine that transforms the the IFilter::SetState calls to the cFilterBase::Init / cFilterBase::Shutdown / cFilterBase::Start and cFilterBase::Stop events.

Remarks
: The default cFilterBase does NOT implement adtf::base::ant::IConfiguration. This Filter has no Properties!

Member Typedef Documentation

◆ tInitStage

typedef cFilterLevelmachine::tInitStage adtf::streaming::ant::cFilterBase::tInitStage

private d-pointer

The tInitStage indicates the Init Stages call.

See also
cFilterBase for the Init Stages.

Constructor & Destructor Documentation

◆ cFilterBase()

adtf::streaming::ant::cFilterBase::cFilterBase ( )

Constructor.

Remarks
The name of the filter is set after the filter is constructed.

◆ ~cFilterBase()

virtual adtf::streaming::ant::cFilterBase::~cFilterBase ( )
virtual

Destructor.

Member Function Documentation

◆ Init()

tResult adtf::streaming::ant::cFilterBase::Init ( tInitStage eStage)
override

Implements the default cFilterLevelmachine state machine call.

This will be called during filter state changes and can be overridden by the filter implementation.

Note
Make sure to call the parent implementation of the used base class at the beginning within your overriding function!
Parameters
[in]eStageThe Init Stage. See state machine documentation in filter_state_machine.
Returns
Standard Result Code. Any Error will break further initialization of the cFilterGraph and the Runlevel change.

◆ RegisterBindingObject() [1/2]

tResult adtf::streaming::ant::cInterfaceBinding::RegisterBindingObject ( const ucom::ant::iobject_ptr< IBindingClient > & pBindingClient)

Registers the given pBindingClient.

Parameters
[in]pBindingClientThe binding client to register.
Returns
see return values of RegisterBindingObject(IBindingObject).

◆ RegisterBindingObject() [2/2]

tResult adtf::streaming::ant::cInterfaceBinding::RegisterBindingObject ( const ucom::ant::iobject_ptr< IBindingServer > & pBindingServer)

Registers the given pBindingServer.

Parameters
[in]pBindingServerThe binding server to register.
Returns
see return values of RegisterBindingObject(IBindingObject).

◆ RegisterInnerPipe()

virtual tResult adtf::streaming::ant::cRuntimeBehaviour::RegisterInnerPipe ( const ucom::ant::iobject_ptr< ITriggerPipe > & pTriggerPipe)

Registers and publishes an inner ITriggerPipe object to the IRuntimeBehaviour.

Parameters
pTriggerPipe[in] The ITriggerPipe to register.
Returns
Standard Result Code

◆ RegisterRunner()

virtual tResult adtf::streaming::ant::cRuntimeBehaviour::RegisterRunner ( const char * strName,
base::ant::IRunnable & oRunnable )

Create and Registers a IRunner object for your oRunnable with the name strName.

Parameters
strName[in] Name of the Runner to create and register.
oRunnable[in] The reference to the Runnable implemetation which will be called.
Remarks
Make sure the instance of the oRunnable lives as long the runner is registered.
Returns
Standard Result Code
Return values
ERR_INVALID_ARGA Runner with the same name is already registered.

◆ SetState()

tResult adtf::streaming::ant::cFilterBase::SetState ( IFilter::tFilterState eState)
override

Sets the state of the filter. The SetState method sets the filters's state (running or stopped). Please see filter_state_machine for further information on when the state of a filter changes.

Parameters
[in]eStateThe filters state to switch to.
Returns
Returns a standard result code.
Remarks
Implements IFilter::SetState.

◆ Shutdown()

tResult adtf::streaming::ant::cFilterBase::Shutdown ( tInitStage eStage)
override

Implements the default cFilterLevelmachine state machine call.

This will be called during filter state changes and can be overridden by the filter implementation.

Note
Make sure to call the parent implementation of the used base class at the end within your overriding function!
Parameters
[in]eStageThe Init Stage. See state machine documentation in filter_state_machine.
Returns
Standard Result Code.

◆ Start()

tResult adtf::streaming::ant::cFilterBase::Start ( )
override

Implements the default cFilterLevelmachine state machine calls.

This will be called during filter state changes and can be overridden by the filter implementation.

Note
Make sure to call the parent implementation of the used base class at the beginning within your overriding function!

See filter_state_machine.

Returns
Standard Result Code.

◆ Stop()

tResult adtf::streaming::ant::cFilterBase::Stop ( )
override

Implements the default cFilterLevelmachine state machine calls.

Keep in mind, that streaming and triggers might still occur during and after this function is called. Streaming will only have stopped completely before any other following state change. If your filter has any blocking operations during the handling of triggers, make sure that you cancel them in this function.

This will be called during filter state changes and can be overridden by the filter implementation.

Note
Make sure to call the parent implementation of the used base class at the end within your overriding function!

See filter_state_machine.

Returns
Standard Result Code.

Member Data Documentation

◆ _clock

ucom::object_ptr<services::ant::IReferenceClock> adtf::streaming::ant::cFilterBase::_clock
protected

A reference to the Reference. The variable will be set, in cFilterBase::Init(StageFirst).

See also
IReferenceClock.
Warning
Always check for NULL, it is possible the filter will run within an environment where the clock is not available.

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