|
WSF
|
A specialization class to handle multi-thread capabilities in the WSF core framework via thread pools. More...
#include <WsfMultiThreadManager.hpp>
Classes | |
| class | PlatformElement |
| class | SensorElement |
| class | SimulationUpdateThread |
| Implementation of worker thread for updating a platform. More... | |
| struct | ThreadFactory |
Public Member Functions | |
| WsfMultiThreadManager (unsigned int aNumberOfThreads, double aBreakUpdateTime, bool aDebugMultiThread, WsfSimulation *aSimulationPtr) | |
| Constructor. | |
| virtual | ~WsfMultiThreadManager () |
| void | Initialize () |
| void | Complete (double aSimTime) |
Priority queue methods. | |
| class | SimulationUpdateThread |
| bool | PlatformsQueued () |
| bool | PopNextPlatformElement (PlatformElement &aPlatformElement) |
| bool | SensorsQueued () |
| bool | PopNextSensorElement (SensorElement &aSensorElement) |
Main update methods. | |
| void | UpdatePlatforms (double aCurrentTime) |
| void | UpdateSensors (double aCurrentTime) |
| bool | BreakUpdate () |
Platform and Sensor methods | |
| void | AddPlatform (double aSimTime, WsfPlatform *aPlatformPtr) |
| void | PlatformIntroduced (double aSimTime, WsfPlatform *aPlatformPtr) |
| void | DeletePlatform (double aSimTime, WsfPlatform *aOldPlatformPtr) |
| void | PlatformDeleted (double aSimTime, WsfPlatform *aOldPlatformPtr) |
| void | TurnSensorOff (double aSimTime, WsfSensor *aSensorPtr) |
| void | TurnSensorOn (double aSimTime, WsfSensor *aSensorPtr) |
A specialization class to handle multi-thread capabilities in the WSF core framework via thread pools.
Current implementation allows for threaded platform (i.e. mover) and sensor updates.
| WsfMultiThreadManager::WsfMultiThreadManager | ( | unsigned int | aNumberOfThreads, |
| double | aBreakUpdateTime, | ||
| bool | aDebugMultiThread, | ||
| WsfSimulation * | aSimulationPtr ) |
|
virtual |
| void WsfMultiThreadManager::AddPlatform | ( | double | aSimTime, |
| WsfPlatform * | aPlatformPtr ) |
References WsfPlatform::GetIndex(), WsfPlatform::GetMover(), WsfPlatform::SetUpdateLocked(), and WsfMover::ThreadSafe().
Referenced by WsfFrameStepSimulation::AddPlatform(), and PlatformIntroduced().
|
inline |
| void WsfMultiThreadManager::Complete | ( | double | aSimTime | ) |
Referenced by WsfEventStepSimulation::Complete(), and WsfFrameStepSimulation::Complete().
| void WsfMultiThreadManager::DeletePlatform | ( | double | aSimTime, |
| WsfPlatform * | aOldPlatformPtr ) |
References WsfComponentList::RoleIterator< T >::AtEnd(), and WsfPlatform::GetIndex().
Referenced by PlatformDeleted().
| void WsfMultiThreadManager::Initialize | ( | ) |
Referenced by WsfEventStepSimulation::Initialize(), and WsfFrameStepSimulation::Initialize().
|
inline |
References DeletePlatform().
Referenced by WsfFrameStepSimulation::DeletePlatform(), and WsfEventStepSimulation::PlatformDeleted().
|
inline |
References AddPlatform().
Referenced by WsfEventStepSimulation::PlatformIntroduced().
|
inlineprotected |
|
protected |
|
protected |
|
inlineprotected |
| void WsfMultiThreadManager::TurnSensorOff | ( | double | aSimTime, |
| WsfSensor * | aSensorPtr ) |
Referenced by WsfPlatformPartEvent::Execute(), and WsfFrameStepSimulation::TurnPartOffP().
| void WsfMultiThreadManager::TurnSensorOn | ( | double | aSimTime, |
| WsfSensor * | aSensorPtr ) |
References WsfPlatformPart::IsExternallyControlled(), WsfSensor::IsSlave(), and WsfSensor::ThreadSafe().
Referenced by WsfPlatformPartEvent::Execute(), and WsfFrameStepSimulation::TurnPartOnP().
| void WsfMultiThreadManager::UpdatePlatforms | ( | double | aCurrentTime | ) |
References WsfObserver::FramePlatformsUpdated(), and platformPtr.
Referenced by WsfFrameStepSimulation::AdvanceFrame().
| void WsfMultiThreadManager::UpdateSensors | ( | double | aCurrentTime | ) |
Referenced by WsfFrameStepSimulation::AdvanceFrame().
|
friend |
References WsfMultiThreadManager().
Referenced by WsfMultiThreadManager::ThreadFactory::operator()().