ifw-ccf 5.0.2
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ifw::ccf::control::ProcThread Class Reference

Processing Thread MPTK Thread implementation (see also ifw::ccf::mptk::Thread). More...

#include <procThread.hpp>

Inheritance diagram for ifw::ccf::control::ProcThread:
ifw::ccf::mptk::Thread ifw::ccf::Base

Public Member Functions

 ProcThread (const std::string &thread_name, ifw::ccf::mptk::MessageBus &message_bus, const double period=0.1)
 See ifw::ccf::mptk::Thread.
 
virtual ~ProcThread ()
 
void Initialise ()
 Initialise the thread object.
 
virtual void UserLogic ()
 Implements the user logic, executed periodically.
 
void SetInputQ (std::shared_ptr< ifw::ccf::common::FrameQueue > &queue)
 Set reference to the Application Input Queue from which the thread gets the frames.
 
ifw::ccf::common::FrameQueueGetInputQ ()
 Get reference to the Application Input Queue from which the thread gets the frames.
 
void SetOutputQ (std::shared_ptr< ifw::ccf::common::FrameQueue > &queue)
 Set reference to the Output Queue of this Processing Thread.
 
ifw::ccf::common::FrameQueueGetOutputQ ()
 Get reference to the Output Queue of this Processing Thread.
 
void SetStatus (const ifw::ccf::ProcStatus status)
 Set the Processing Status of this Processing Thread.
 
ifw::ccf::ProcStatus GetStatus () const
 Return the Processing Status of this Processing Thread.
 
void AddRecipe (std::shared_ptr< ifw::ccf::common::RecipeBase > &recipe_obj)
 
uint8_t NbOfRecipes () const
 
const ifw::ccf::common::RecipeBaseGetRecipe (const uint16_t nb)
 
ifw::ccf::common::FrameStatisticsGetFrameStat ()
 Get reference to frame handling statistics.
 
bool GetPipelineEnabled () const
 Return the current enabled status of the Pipeline.
 
- Public Member Functions inherited from ifw::ccf::mptk::Thread
 Thread (const std::string &thread_name, MessageBus &message_bus, const double period=0.1)
 Constructor method, setting up the internal members.
 
virtual ~Thread ()
 
void SetPriority (const int prio=-1)
 If invoked, it will run the thread in real-time mode with the given priority [0; 99].
 
std::string GetName () const
 Return the thread Name.
 
void Run ()
 Method to invoke the user provided business logic of the thread. The method executes internally a loop.
 
void Start ()
 Start the thread execution.
 
void Stop ()
 Stop the thread execution.
 
void Pause ()
 Pause the thread execution.
 
void Continue ()
 Continue a paused thread execution.
 
double GetDrift () const
 
bool GetExecFlag ()
 Check the Thread Execution Flag. The Thread Execution Flag shall be called regularly in the thread, at least during every internal cycle (of LogicUser()). The behavior is as follows: THREAD_EXEC_RUNNING: Return immediately with true. THREAD_EXEC_PAUSED: Wait internally for flag to change to THREAD_EXEC_RUN/_STOP. TRHEAD_EXEC_STOPPED: Return immediately with false. Thread LogicUser() shall return.
 
ThreadExecControl GetExecFlag () const
 Return the value of the Thread Execution Flag.
 
bool Terminated ()
 Returns true if thread no longer running.
 
MessageBusMsgBus ()
 Get acces to the MessageBus associated with this thread object.
 
std::string ToString () const
 Generate ASCII output providing a status of the object.
 
- Public Member Functions inherited from ifw::ccf::Base
 Base ()
 
 ~Base ()
 
const std::string & GetClassName () const
 Return the allocated name of the class.
 

Static Public Member Functions

static void SetStatusAll (const ifw::ccf::ProcStatus status)
 Set the status of all Processing Threads running.
 
- Static Public Member Functions inherited from ifw::ccf::Base
static ifw::ccf::mptk::ManagerMptk ()
 Return reference to internal MPTK instance (singleton).
 

Additional Inherited Members

- Public Types inherited from ifw::ccf::mptk::Thread
enum  ThreadExecControl { THREAD_EXEC_STOPPED = 1 , THREAD_EXEC_RUNNING , THREAD_EXEC_PAUSED }
 Thread execution control/status. More...
 
- Static Public Attributes inherited from ifw::ccf::mptk::Thread
static std::map< std::string, Thread * > s_thread_registry
 
- Protected Member Functions inherited from ifw::ccf::Base
void SetClassName (const std::string &class_name)
 Set the name of the class in question.
 

Detailed Description

Processing Thread MPTK Thread implementation (see also ifw::ccf::mptk::Thread).

Constructor & Destructor Documentation

◆ ProcThread()

ifw::ccf::control::ProcThread::ProcThread ( const std::string & thread_name,
ifw::ccf::mptk::MessageBus & message_bus,
const double period = 0.1 )

◆ ~ProcThread()

ifw::ccf::control::ProcThread::~ProcThread ( )
virtual

Member Function Documentation

◆ AddRecipe()

void ifw::ccf::control::ProcThread::AddRecipe ( std::shared_ptr< ifw::ccf::common::RecipeBase > & recipe_obj)

◆ GetFrameStat()

ifw::ccf::common::FrameStatistics & ifw::ccf::control::ProcThread::GetFrameStat ( )

Get reference to frame handling statistics.

◆ GetInputQ()

ifw::ccf::common::FrameQueue & ifw::ccf::control::ProcThread::GetInputQ ( )

Get reference to the Application Input Queue from which the thread gets the frames.

◆ GetOutputQ()

ifw::ccf::common::FrameQueue & ifw::ccf::control::ProcThread::GetOutputQ ( )

Get reference to the Output Queue of this Processing Thread.

◆ GetPipelineEnabled()

bool ifw::ccf::control::ProcThread::GetPipelineEnabled ( ) const

Return the current enabled status of the Pipeline.

◆ GetRecipe()

const ifw::ccf::common::RecipeBase & ifw::ccf::control::ProcThread::GetRecipe ( const uint16_t nb)

◆ GetStatus()

ifw::ccf::ProcStatus ifw::ccf::control::ProcThread::GetStatus ( ) const

Return the Processing Status of this Processing Thread.

◆ Initialise()

void ifw::ccf::control::ProcThread::Initialise ( )

Initialise the thread object.

◆ NbOfRecipes()

uint8_t ifw::ccf::control::ProcThread::NbOfRecipes ( ) const

◆ SetInputQ()

void ifw::ccf::control::ProcThread::SetInputQ ( std::shared_ptr< ifw::ccf::common::FrameQueue > & queue)

Set reference to the Application Input Queue from which the thread gets the frames.

◆ SetOutputQ()

void ifw::ccf::control::ProcThread::SetOutputQ ( std::shared_ptr< ifw::ccf::common::FrameQueue > & queue)

Set reference to the Output Queue of this Processing Thread.

◆ SetStatus()

void ifw::ccf::control::ProcThread::SetStatus ( const ifw::ccf::ProcStatus status)

Set the Processing Status of this Processing Thread.

◆ SetStatusAll()

void ifw::ccf::control::ProcThread::SetStatusAll ( const ifw::ccf::ProcStatus status)
static

Set the status of all Processing Threads running.

◆ UserLogic()

void ifw::ccf::control::ProcThread::UserLogic ( )
virtual

Implements the user logic, executed periodically.

Reimplemented from ifw::ccf::mptk::Thread.


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