|
WSF
|
Implementation of worker thread for updating a platform. More...
#include <WsfMultiThreadManager.hpp>


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 | |
| WsfMultiThreadManager * | mManagerPtr |
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 |
Implementation of worker thread for updating a platform.
| WsfMultiThreadManager::SimulationUpdateThread::SimulationUpdateThread | ( | WsfMultiThreadManager * | aManagerPtr | ) |
Constructor and destructor.
References mManagerPtr, WsfMultiThreadManager::WsfMultiThreadManager(), and WsfThread::WsfThread().
|
inlineoverride |
|
overridevirtual |
Performs the thread work for updating a platform.
Implements WsfThread.
References WsfThread::ASSIGNED, WsfThread::AVAILABLE, WsfThread::GetFunction(), mManagerPtr, WsfMultiThreadManager::PlatformElement::mPlatformIndex, WsfMultiThreadManager::SensorElement::mSensorPtr, WsfMultiThreadManager::PlatformElement::mSimTime, WsfMultiThreadManager::SensorElement::mSimTime, NoWork(), platformPtr, and WsfSensor::Update().
| bool WsfMultiThreadManager::SimulationUpdateThread::NoWork | ( | ) |
Returns true if there is no work for thread to perform.
References mManagerPtr.
Referenced by DoWork().
|
inlineoverridevirtual |
The user defines the processing to be performed during the PAUSED state by implementing this method.
Implements WsfThread.
References WsfThread::AVAILABLE.
| WsfMultiThreadManager* WsfMultiThreadManager::SimulationUpdateThread::mManagerPtr |
Referenced by DoWork(), NoWork(), and SimulationUpdateThread().