ADTF
streaming_level_machine

The Streaming Service Level Machine implementation. More...

Inheritance diagram for streaming_level_machine:
[legend]

Protected Member Functions

 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 Destruct ()
 Destruct transission while changing from tStreamingState::State_Constructed to tStreamState::State_Shutdown. 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...
 
virtual tResult StartStreaming ()
 StatrStreaming transission while changing from tStreamState::State_Initialized to tStreamingState::State_Streaming. More...
 
virtual tResult StopStreaming ()
 StopStreaming transission while changing from tStreamingState::State_Streaming to tStreamState::State_Initialized. 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...
 

Additional Inherited Members

- 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...
 
- 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.
 

Detailed Description

The Streaming Service Level Machine implementation.

Definition at line 28 of file streaming_source.h.

Member Function Documentation

◆ Construct()

virtual tResult Construct ( )
inlineprotectedvirtual

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

Use this transission callback to initialize your service by reading properties, creation of static pins, opening devices to create valid streamtypes for the pins.

After Construct is called, all pins are requested and connected.

Returns
Returns a standard result code which depends on the implementation.
Return values
ERR_NOERRORSuccessfully constructed
anyError The Streaming Graph will stop constructing.

Definition at line 69 of file streaming_source.h.

References RETURN_NOERROR.

◆ Destruct()

virtual tResult Destruct ( )
inlineprotectedvirtual

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

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

Reimplemented in cSampleStreamingSource, and cSampleStreamingSink.

Definition at line 81 of file streaming_source.h.

References RETURN_NOERROR.

◆ Init()

virtual tResult Init ( )
inlineprotectedvirtual

Init transission while changing from tStreamingState::State_Constructed to tStreamState::State_Initialized.

Use this transission callback to initialize your service when it depends on the connections. Before Init is called, all pins are requested and connected.

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.
Return values
ERR_NOERRORSuccessfully constructed
anyError The Streaming Graph will stop initializing.

Reimplemented in cSampleStreamingSource, cSampleStreamingSource, cSampleStreamingSink, and cSampleStreamingSink.

Definition at line 98 of file streaming_source.h.

References RETURN_NOERROR.

◆ Shutdown()

virtual tResult Shutdown ( )
inlineprotectedvirtual

Shutdown transission while changing from tStreamState::State_Initialized to tStreamingState::State_Constructed.

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.

Definition at line 110 of file streaming_source.h.

References RETURN_NOERROR.

◆ StartStreaming()

virtual tResult StartStreaming ( )
inlineprotectedvirtual

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 in cSampleStreamingSource, cSampleStreamingSink, cSampleStreamingSource, cSampleStreamingSource, cSampleStreamingSink, and cSampleStreamingSink.

Definition at line 124 of file streaming_source.h.

References RETURN_NOERROR.

◆ StopStreaming()

virtual tResult StopStreaming ( )
inlineprotectedvirtual

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 in cSampleStreamingSource, cSampleStreamingSink, cSampleStreamingSource, cSampleStreamingSource, cSampleStreamingSink, and cSampleStreamingSink.

Definition at line 144 of file streaming_source.h.

References RETURN_NOERROR.