ADTF
cSampleStreamingSink

Basic implementation for a Streaming Sink. More...

Inheritance diagram for cSampleStreamingSink:
[legend]

Public Member Functions

 cSampleStreamingSink ()
 CTOR.
 
 cSampleStreamingSink (const char *strName)
 CTOR with name. More...
 
virtual ~cSampleStreamingSink ()
 DTOR.
 
tResult SetState (tStreamingState eState) override
 
IStreamingSink::tStreamingState GetState () override
 
tResult RequestPin (const char *strName, const adtf::ucom::ant::iobject_ptr< const IStreamType > &pType, adtf::ucom::ant::iobject_ptr< IInPin > &pInPin) override
 
tResult RequestPin (const char *strName, const adtf::ucom::ant::iobject_ptr< const IStreamType > &pType, adtf::ucom::ant::iobject_ptr< IOutPin > &pOutPin) override
 
tResult RegisterPin (const ucom::ant::iobject_ptr< IPin > &pPin)
 
tResult Destruct () override
 Destruct transission while changing from tStreamingState::State_Constructed to tStreamState::State_Shutdown. More...
 
tResult StartStreaming () override
 StatrStreaming transission while changing from tStreamState::State_Initialized to tStreamingState::State_Streaming. More...
 
tResult StopStreaming () override
 StopStreaming transission while changing from tStreamingState::State_Streaming to tStreamState::State_Initialized. More...
 
virtual tResult RegisterPin (const ucom::ant::iobject_ptr< IPin > &pIPin)
 Registers a Pin in a pin list. More...
 
tResult RegisterPin (const ucom::ant::iobject_ptr< IInPin > &pIInPin)
 Registers a InPin in a pin list. More...
 
tResult RegisterPin (const ucom::ant::iobject_ptr< IOutPin > &pIOutPin)
 Registers a InPin in a pin list. More...
 
virtual tResult RegisterRunner (const ucom::ant::iobject_ptr< IRunner > &pRunner)
 Registers and publishes a IRunner object to the IRuntimeBehaviour. More...
 
virtual tResult RegisterRunner (const char *strName, base::ant::IRunnable &oRunnable)
 Create and Registers a IRunner object for your oRunnable with the name strName. More...
 
virtual tResult RegisterInnerPipe (const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe)
 Registers and publishes an inner ITriggerPipe object to the IRuntimeBehaviour. More...
 
- Public Member Functions inherited from 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 RegisterRunner (const ucom::ant::iobject_ptr< IRunner > &pRunner)
 Registers and publishes a IRunner object to the IRuntimeBehaviour. More...
 
virtual tResult RegisterRunner (const char *strName, base::ant::IRunnable &oRunnable)
 Create and Registers a IRunner object for your oRunnable with the name strName. More...
 
virtual tResult UnregisterRunner (const ucom::ant::iobject_ptr< IRunner > &pRunner)
 Unregisters a Runner. More...
 
tResult ReleaseRunners ()
 Release every registered Runners
More...
 
virtual tResult RegisterInnerPipe (const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe)
 Registers and publishes an inner ITriggerPipe object to the IRuntimeBehaviour. More...
 
virtual tResult UnregisterInnerPipe (const ucom::ant::iobject_ptr< ITriggerPipe > &pTriggerPipe)
 Unregisters an inner ITriggerPipe object. More...
 
tResult ReleaseTriggerPipes ()
 Release and unregister every registered TriggerPipes. More...
 
- Public Member Functions inherited from level_machine< Subclass, LevelType, START_LEVEL >
template<typename ... InnerHandlers>
tResult ChangeLevel (LevelType eLevel)
 Change Level raise or decrease the Level level by level and call the given hendler methods. More...
 
- Public Member Functions inherited from object< ucom::ant::cClassInfo, base::ant::configuration<>, IDynamicDataBinding, IStreamingService, IStreamingSink, data_binding< named_graph_object< ISampleStreamingSink > > >
tResult GetInterface (const char *i_strIID, void *&o_pInterface) override
 Query interfaces on an object. More...
 
tResult GetInterface (const char *i_strIID, const void *&o_pInterface) const override
 Provides const correct interface querying. More...
 
void Destroy () const override
 Destruct and deallocate instantiations of type IObject. 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...
 

Private Member Functions

 A_UTILS_D (cSampleStreamingSink)
 private d_ptr impl.
 

Additional Inherited Members

- Protected Types inherited from level_machine< Subclass, LevelType, START_LEVEL >
enum  tDirection : uint8_t { Inc = 0 , Dec = 1 }
 Direction of entering a new Level. More...
 
typedef tResult(Subclass::* tChangeMethod) ()
 Defintion of function type called within the handler implementation.
 
- Protected Member Functions inherited from cRuntimeBehaviour
 cRuntimeBehaviour ()
 CTOR.
 
virtual ~cRuntimeBehaviour ()
 DTOR.
 
- Protected Member Functions inherited from streaming_level_machine
 streaming_level_machine (const streaming_level_machine &)=delete
 
 streaming_level_machine (streaming_level_machine &&)=delete
 
streaming_level_machineoperator= (const streaming_level_machine &)=delete
 
streaming_level_machineoperator= (streaming_level_machine &&)=delete
 
tResult SetLevel (IStreamingService::tStreamingState eStreamingState)
 
virtual tResult Construct ()
 Construct transission while changing from tStreamingState::State_Shutdown to tStreamState::State_Constructed. More...
 
virtual tResult Init ()
 Init transission while changing from tStreamingState::State_Constructed to tStreamState::State_Initialized. More...
 
virtual tResult Shutdown ()
 Shutdown transission while changing from tStreamState::State_Initialized to tStreamingState::State_Constructed. More...
 
- Protected Member Functions inherited from level_machine< Subclass, LevelType, START_LEVEL >
virtual ~level_machine ()=default
 DTOR.
 
LevelType GetLevel () const
 Returns the current Level of the levelMachine. More...
 
- Protected Member Functions inherited from IObject
 ~IObject ()=default
 Protected destructor --> Use implemented Destroy() instead of delete!
 

Detailed Description

Basic implementation for a Streaming Sink.

This has been superseeded by adtf::filter::flash::cSampleStreamingSink.

This implementation is able to:

Use the provided transission callbacks to override the behaviour but do not forget to call the base type implementation.

  • Construct
  • Destruct
  • Init
  • Shutdown
  • StartStreaming
  • StopStreaming
See also
subsection_sample_stream_sink
adtf::filter::flash::cSampleStreamingSink

Definition at line 45 of file streaming_sink.h.

Constructor & Destructor Documentation

◆ cSampleStreamingSink()

cSampleStreamingSink ( const char *  strName)

CTOR with name.

will immediatelly set the name of the named_graph_object

Parameters
strName[in] Name of the object

Member Function Documentation

◆ Destruct()

tResult Destruct ( )
overridevirtual

Destruct transission while changing from tStreamingState::State_Constructed to tStreamState::State_Shutdown.

Returns
Returns a standard result code which depends on the implementation.

Reimplemented from streaming_level_machine.

◆ RegisterInnerPipe()

virtual tResult RegisterInnerPipe

Registers and publishes an inner ITriggerPipe object to the IRuntimeBehaviour.

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

◆ RegisterPin() [1/3]

tResult RegisterPin

Registers a InPin in a pin list.

Parameters
pIInPin[in] Pin to register.
Returns
Standard result code.

◆ RegisterPin() [2/3]

tResult RegisterPin

Registers a InPin in a pin list.

Parameters
pIOutPin[in] Pin to register.
Returns
Standard result code.

◆ RegisterPin() [3/3]

virtual tResult RegisterPin

Registers a Pin in a pin list.

Parameters
pIPin[in] Pin to register.
Returns
Standard result code.

◆ RegisterRunner() [1/2]

virtual tResult RegisterRunner

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.

◆ RegisterRunner() [2/2]

virtual tResult RegisterRunner

Registers and publishes a IRunner object to the IRuntimeBehaviour.

This makes sure the runner is only registered once. The Runner has to have a name already set. You can not register a Runner with the same name twice.

Parameters
pRunner[in] The object reference to the Runner which will be published.
Returns
Standard Result Code
Return values
ERR_INVALID_ARGA Runner with the same name is already registered.

◆ StartStreaming()

tResult StartStreaming ( )
overridevirtual

StatrStreaming transission while changing from tStreamState::State_Initialized to tStreamingState::State_Streaming.

Use this transission callback to initalize and start threads and timers.

Note
Make sure to call the parent implementation of the used base class at the beginning within your overriding function!
Returns
Returns a standard result code which depends on the implementation.

Reimplemented from streaming_level_machine.

◆ StopStreaming()

tResult StopStreaming ( )
overridevirtual

StopStreaming transission while changing from tStreamingState::State_Streaming to tStreamState::State_Initialized.

Use this transission callback to stop and destroy threads and timers.

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 streaming service has any blocking operations during the handling of triggers, make sure that you cancel them in this function.

Note
Make sure to call the parent implementation of the used base class at the end within your overriding function!
Returns
Returns a standard result code which depends on the implementation.
Return values
ERR_NOERRORSuccessfully constructed
anyError The Streaming Graph will stop starting.

Reimplemented from streaming_level_machine.