DtResourceCache — subscribes to VRF resource monitoring and keeps per-entity resource data current on their DtWebServerObject instances.
Life cycle:
- Construct with a reference to the shared DtWebServerObjectList.
- Call initialize() once DtScenarioManager is ready.
- Call onEntityAdded() for each entry from DtWebServerObjectList::addedObjects().
- Call onEntityRemoved() from DtVrfManager::onStateDataAboutToBeRemoved().
- Call shutdown() before destroying DtScenarioManager.
Thread safety: all methods must be called from the VRF update thread only.
- Parameters
-
| trackedObjects | The live object registry owned by DtVrfManager. Must outlive this instance. |
| void DtResourceCache::shutdown |
( |
| ) |
|
Stop all active monitoring subscriptions and disconnect the signal. Must be called before the DtScenarioManager is destroyed.
Notify that a new simulation object has been discovered. When autoSubscribeResources is true, sends a startMonitoring request to VRF.
| void DtResourceCache::onEntityRemoved |
( |
const DtUUID & |
uuid | ) |
|
Notify that a simulation object is about to be removed. Stops monitoring if an active subscription exists for this UUID.
| bool DtResourceCache::isAutoSubscribeEnabled |
( |
| ) |
const |
|
inline |
| boost::signals2::connection DtResourceCache::myResponseConnection |
|
private |
| std::set<DtUUID> DtResourceCache::myMonitoredUuids |
|
private |
| bool DtResourceCache::myAutoSubscribe = false |
|
private |
The documentation for this class was generated from the following file:
- /data/exports/nrhent7-1/nightly/docs/vrForces.vrf5-3-branch/appsrc/vrfWebServer/resourceCache.h