|
ifw-ccf
3.0.0-pre2
|
Processing Thread MPTK Thread implementation (see also ccf::mptk::Thread). More...
#include <procThread.hpp>
Public Member Functions | |
| ProcThread (const std::string &thread_name, ccf::mptk::MessageBus &message_bus, const double period=0.1) | |
| See ccf::mptk::Thread. More... | |
| virtual | ~ProcThread () |
| void | Initialise () |
| Initialise the thread object. More... | |
| virtual void | UserLogic () |
| Implements the user logic, executed periodically. More... | |
| void | SetInputQ (std::shared_ptr< ccf::common::FrameQueue > &queue) |
| Set reference to the Application Input Queue from which the thread gets the frames. More... | |
| ccf::common::FrameQueue & | GetInputQ () |
| Get reference to the Application Input Queue from which the thread gets the frames. More... | |
| void | SetOutputQ (std::shared_ptr< ccf::common::FrameQueue > &queue) |
| Set reference to the Output Queue of this Processing Thread. More... | |
| ccf::common::FrameQueue & | GetOutputQ () |
| Get reference to the Output Queue of this Processing Thread. More... | |
| void | SetStatus (const ccf::ProcStatus status) |
| Set the Processing Status of this Processing Thread. More... | |
| ccf::ProcStatus | GetStatus () const |
| Return the Processing Status of this Processing Thread. More... | |
| void | AddRecipe (std::shared_ptr< ccf::common::RecipeBase > &recipe_obj) |
| uint8_t | NbOfRecipes () const |
| const ccf::common::RecipeBase & | GetRecipe (const uint16_t nb) |
| ccf::common::FrameStatistics & | GetFrameStat () |
| Get reference to frame handling statistics. More... | |
Public Member Functions inherited from ccf::mptk::Thread | |
| Thread (const std::string &thread_name, MessageBus &message_bus, const double period=0.1) | |
| Constructor method, setting up the internal members. More... | |
| 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]. More... | |
| std::string | GetName () const |
| Return the thread Name. More... | |
| void | Run () |
| Method to invoke the user provided business logic of the thread. The method executes internally a loop. More... | |
| void | Start () |
| Start the thread execution. More... | |
| void | Stop () |
| Stop the thread execution. More... | |
| void | Pause () |
| Pause the thread execution. More... | |
| void | Continue () |
| Continue a paused thread execution. More... | |
| 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. More... | |
| ThreadExecControl | GetExecFlag () const |
| Return the value of the Thread Execution Flag. More... | |
| bool | Terminated () |
| Returns true if thread no longer running. More... | |
| MessageBus & | MsgBus () |
| Get acces to the MessageBus associated with this thread object. More... | |
| std::string | ToString () const |
| Generate ASCII output providing a status of the object. More... | |
Public Member Functions inherited from ccf::Base | |
| Base () | |
| ~Base () | |
| const std::string & | GetClassName () const |
| Return the allocated name of the class. More... | |
| log4cplus::Logger & | Loggger () |
| Return reference to logger used in this context. More... | |
Static Public Member Functions | |
| static void | SetStatusAll (const ccf::ProcStatus status) |
| Set the status of all Processing Threads running. More... | |
Static Public Member Functions inherited from ccf::Base | |
| static ccf::mptk::Manager & | Mptk () |
| Return reference to internal MPTK instance (singleton). More... | |
| static void | SetLogLevel (const ccf::LogLevel log_level) |
| Set the log level. More... | |
| static ccf::LogLevel | GetLogLevel () |
| Return the current CCF log level. More... | |
Additional Inherited Members | |
Public Types inherited from 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 ccf::mptk::Thread | |
| static std::map< std::string, Thread * > | s_thread_registry |
Protected Member Functions inherited from ccf::Base | |
| void | SetClassName (const std::string &class_name) |
| Set the name of the class in question. More... | |
| void | SetLogger (log4cplus::Logger &logger) |
| Set reference to logger used in this context. More... | |
Protected Attributes inherited from ccf::Base | |
| log4cplus::Logger | m_logger |
Processing Thread MPTK Thread implementation (see also ccf::mptk::Thread).
| ccf::control::ProcThread::ProcThread | ( | const std::string & | thread_name, |
| ccf::mptk::MessageBus & | message_bus, | ||
| const double | period = 0.1 |
||
| ) |
See ccf::mptk::Thread.
|
virtual |
| void ccf::control::ProcThread::AddRecipe | ( | std::shared_ptr< ccf::common::RecipeBase > & | recipe_obj | ) |
| ccf::common::FrameStatistics & ccf::control::ProcThread::GetFrameStat | ( | ) |
Get reference to frame handling statistics.
| ccf::common::FrameQueue & ccf::control::ProcThread::GetInputQ | ( | ) |
Get reference to the Application Input Queue from which the thread gets the frames.
| ccf::common::FrameQueue & ccf::control::ProcThread::GetOutputQ | ( | ) |
Get reference to the Output Queue of this Processing Thread.
| const ccf::common::RecipeBase & ccf::control::ProcThread::GetRecipe | ( | const uint16_t | nb | ) |
| ccf::ProcStatus ccf::control::ProcThread::GetStatus | ( | ) | const |
Return the Processing Status of this Processing Thread.
| void ccf::control::ProcThread::Initialise | ( | ) |
Initialise the thread object.
| uint8_t ccf::control::ProcThread::NbOfRecipes | ( | ) | const |
| void ccf::control::ProcThread::SetInputQ | ( | std::shared_ptr< ccf::common::FrameQueue > & | queue | ) |
Set reference to the Application Input Queue from which the thread gets the frames.
| void ccf::control::ProcThread::SetOutputQ | ( | std::shared_ptr< ccf::common::FrameQueue > & | queue | ) |
Set reference to the Output Queue of this Processing Thread.
| void ccf::control::ProcThread::SetStatus | ( | const ccf::ProcStatus | status | ) |
Set the Processing Status of this Processing Thread.
|
static |
Set the status of all Processing Threads running.
|
virtual |
Implements the user logic, executed periodically.
Reimplemented from ccf::mptk::Thread.