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

Monitor Thread MPTK class. More...

#include <monitorThread.hpp>

Inheritance diagram for ifw::ccf::control::MonitorThread:
ifw::ccf::mptk::Thread

Public Member Functions

 MonitorThread (const std::string &thread_name, ifw::ccf::mptk::MessageBus &message_bus, const double period=0.1)
 See ifw::ccf::mptk::Thread.
 
virtual ~MonitorThread ()
 
void Initialise ()
 Initialise the thread. This is invoked after creation.
 
virtual void UserLogic ()
 Monitor Thread user logic.
 
- 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.
 

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
 

Detailed Description

Monitor Thread MPTK class.

Monitor Thread, monitoring the health of the application and generating statistics.

Constructor & Destructor Documentation

◆ MonitorThread()

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

◆ ~MonitorThread()

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

Member Function Documentation

◆ Initialise()

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

Initialise the thread. This is invoked after creation.

◆ UserLogic()

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

Monitor Thread user logic.

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


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