WSF
WsfMultiThreadManager::SimulationUpdateThread Class Reference

Implementation of worker thread for updating a platform. More...

#include <WsfMultiThreadManager.hpp>

Inheritance diagram for WsfMultiThreadManager::SimulationUpdateThread:
Collaboration diagram for WsfMultiThreadManager::SimulationUpdateThread:

Public Member Functions

 SimulationUpdateThread (WsfMultiThreadManager *aManagerPtr)
 Constructor and destructor.
 ~SimulationUpdateThread () override
FunctionType DoWork () override
FunctionType Pause () override
bool NoWork ()
 Returns true if there is no work for thread to perform.
Public Member Functions inherited from WsfThread
 WsfThread ()=default
 ~WsfThread () override=default
void Run () override
FunctionType GetFunction () const
bool CriticalWork () const
 Thread Run() function status methods.
bool ReadyForWork () const
bool Stopped () const
bool AssignWork ()
 Thread internal Run() control methods.
bool StopWork ()
bool ForceStopWork ()
bool PauseWork ()
void EndThread ()
void WaitUntilWorkDone ()
bool TryWaitUntilWorkDone (double aTimeoutSecs)
virtual void Available ()
 Methods called by the thread's Run() method.

Public Attributes

WsfMultiThreadManagermManagerPtr

Additional Inherited Members

Public Types inherited from WsfThread
enum  FunctionType {
  STOPPED = 0 , AVAILABLE = 1 , ASSIGNED = 2 , PAUSED = 3 ,
  CRITICAL = 4
}
Protected Member Functions inherited from WsfThread
bool BeginCriticalWork ()
bool EndCriticalWork ()
bool SetFunction (FunctionType aOldFunction, FunctionType aNewFunction)
Protected Attributes inherited from WsfThread
FunctionType mSavedState = STOPPED
std::condition_variable mWorkDoneCond
std::mutex mFunctionWriteMutex

Detailed Description

Implementation of worker thread for updating a platform.

Constructor & Destructor Documentation

◆ SimulationUpdateThread()

WsfMultiThreadManager::SimulationUpdateThread::SimulationUpdateThread ( WsfMultiThreadManager * aManagerPtr)

◆ ~SimulationUpdateThread()

WsfMultiThreadManager::SimulationUpdateThread::~SimulationUpdateThread ( )
inlineoverride

Member Function Documentation

◆ DoWork()

◆ NoWork()

bool WsfMultiThreadManager::SimulationUpdateThread::NoWork ( )

Returns true if there is no work for thread to perform.

References mManagerPtr.

Referenced by DoWork().

◆ Pause()

FunctionType WsfMultiThreadManager::SimulationUpdateThread::Pause ( )
inlineoverridevirtual

The user defines the processing to be performed during the PAUSED state by implementing this method.

Returns
The FunctionType defining the state the thread will be in after completion of the work. If the pause is complete, return either AVAILABLE or ASSIGNED; otherwise return PAUSED.

Implements WsfThread.

References WsfThread::AVAILABLE.

Member Data Documentation

◆ mManagerPtr

WsfMultiThreadManager* WsfMultiThreadManager::SimulationUpdateThread::mManagerPtr

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved