IFW CTD Multiprocessing Toolkit Manager class.
More...
#include <manager.hpp>
|
| Manager () |
|
| ~Manager () |
|
void | Reset () |
| Reset the object. This includes stopping the possible running threads and deleting all thread objects allocated.
|
|
void | StartThreads () |
| Execute all threads registered.
|
|
void | PauseThreads () |
| Pause the threads.
|
|
void | StopThreads () |
| Request threads to end execution.
|
|
int16_t | WaitForThreadTerm (const double time_out=ifw::core::utils::base::NO_TIMEOUT) |
| Wait for threads to terminate execution. Returns the number of threads running.
|
|
int16_t | NbOfThreadsRunning () const |
| Returns the number of threads running; this includes the ones that may be paused.
|
|
MessageBus & | MsgBus () |
| Get reference to Message Bus.
|
|
std::string | ToString () const |
| Generate ASCII output providing a status of the object.
|
|
template<class THREAD_TYPE > |
void | CreateThread (const std::string &thread_name, const double period=0.1, THREAD_TYPE **thread_obj=nullptr) |
| Allocate new MPTK thread object of the given type. The allocated thread object is handled internally in the thread manager.
|
|
template<class THREAD_TYPE > |
void | CreateThread (const THREAD_TYPE &factory_object, const std::string &thread_name, const double period=0.1, THREAD_TYPE **thread_obj=nullptr) |
| Allocate new MPTK thread object of the given type. The allocated thread object is handled internally in the thread manager.
|
|
template<class THREAD_TYPE > |
void | GetThread (const std::string &thread_name, THREAD_TYPE **thread_obj) |
| Get reference to MPTK thread, registered in the Thread Registry.
|
|
void | GetThreadNames (std::list< std::string > &thread_names) const |
| Return list with names of threads registered.
|
|
IFW CTD Multiprocessing Toolkit Manager class.
The Manager class provides the services to manage one MPTK instance, for what concerns the MPTK Threads running in it and the MPTK Message Bus.
◆ Manager()
ifw::ccf::mptk::Manager::Manager |
( |
| ) |
|
◆ ~Manager()
ifw::ccf::mptk::Manager::~Manager |
( |
| ) |
|
◆ CreateThread() [1/2]
template<class THREAD_TYPE >
void ifw::ccf::mptk::Manager::CreateThread |
( |
const std::string & | thread_name, |
|
|
const double | period = 0.1, |
|
|
THREAD_TYPE ** | thread_obj = nullptr ) |
|
inline |
Allocate new MPTK thread object of the given type. The allocated thread object is handled internally in the thread manager.
◆ CreateThread() [2/2]
template<class THREAD_TYPE >
void ifw::ccf::mptk::Manager::CreateThread |
( |
const THREAD_TYPE & | factory_object, |
|
|
const std::string & | thread_name, |
|
|
const double | period = 0.1, |
|
|
THREAD_TYPE ** | thread_obj = nullptr ) |
|
inline |
Allocate new MPTK thread object of the given type. The allocated thread object is handled internally in the thread manager.
◆ GetThread()
template<class THREAD_TYPE >
void ifw::ccf::mptk::Manager::GetThread |
( |
const std::string & | thread_name, |
|
|
THREAD_TYPE ** | thread_obj ) |
|
inline |
Get reference to MPTK thread, registered in the Thread Registry.
◆ GetThreadNames()
void ifw::ccf::mptk::Manager::GetThreadNames |
( |
std::list< std::string > & | thread_names | ) |
const |
Return list with names of threads registered.
◆ MsgBus()
◆ NbOfThreadsRunning()
int16_t ifw::ccf::mptk::Manager::NbOfThreadsRunning |
( |
| ) |
const |
Returns the number of threads running; this includes the ones that may be paused.
◆ PauseThreads()
void ifw::ccf::mptk::Manager::PauseThreads |
( |
| ) |
|
◆ Reset()
void ifw::ccf::mptk::Manager::Reset |
( |
| ) |
|
Reset the object. This includes stopping the possible running threads and deleting all thread objects allocated.
◆ StartThreads()
void ifw::ccf::mptk::Manager::StartThreads |
( |
| ) |
|
Execute all threads registered.
◆ StopThreads()
void ifw::ccf::mptk::Manager::StopThreads |
( |
| ) |
|
Request threads to end execution.
◆ ToString()
std::string ifw::ccf::mptk::Manager::ToString |
( |
| ) |
const |
Generate ASCII output providing a status of the object.
◆ WaitForThreadTerm()
int16_t ifw::ccf::mptk::Manager::WaitForThreadTerm |
( |
const double | time_out = ifw::core::utils::base::NO_TIMEOUT | ) |
|
Wait for threads to terminate execution. Returns the number of threads running.
The documentation for this class was generated from the following files: