![]() |
VR-Forces Developer's Guide
|
DtAggregateProcessor - Lightweight per-client aggregate processor.
One instance is created per connected WebSocket client and registered with DtVrfManager so that it participates in the tick loop.
queryAll() / query() are the primary read interface used by the WebSocket layer to build initial-state and periodic-update messages.
Thread safety: poll() - caller holds vrfDataMutex exclusively; must NOT re-acquire it dispatchPendingEvents() - caller holds NO locks queryAll() / query() - acquires vrfDataMutex shared; safe from any thread

Public Member Functions | |
| DtAggregateProcessor ()=default | |
| virtual | ~DtAggregateProcessor () override=default |
| virtual void | initialize (const DtVrfContext &context) override |
| virtual void | poll () override |
| virtual void | dispatchPendingEvents () override |
| virtual void | shutdown () override |
| virtual int | count () const override |
| std::vector < DtDatasource::DtAggregateSnapshot > | queryAll () const |
| DtDatasource::DtAggregateSnapshot | query (const std::string &objectName) const |
| virtual void | parameterPropertiesFor (DtTrueAggregateRollUp::Leafs &leafs, DtRwProperties ¶meters) const override |
| virtual const makVrf::DtStateDataWrapper * | lookup (const DtUUID &id) const override |
| virtual std::set< const makVrf::DtStateDataWrapper * > | lookup (const std::set< DtUUID > &ids) const override |
| virtual bool | isValid (const makVrf::DtStateDataWrapper *state) const override |
Public Member Functions inherited from DtProcessor | |
| virtual | ~DtProcessor ()=default |
Public Member Functions inherited from DtTrueAggregateRollUpFunctor | |
| virtual bool | isValid (const DtUUID &id) const |
Protected Member Functions | |
| std::shared_ptr < DtDatasource::DtAggregateSnapshot > | snapshotForAggregate (DtWebServerObjectPtr obj) const |
| void | addHealthToSnapshot (std::shared_ptr< DtDatasource::DtAggregateSnapshot > &snapshot, DtWebServerObjectPtr obj) const |
Private Attributes | |
| DtVrfContext | myVrfContext |
|
default |
|
overridevirtualdefault |
|
overridevirtual |
Called once before the first tick.
| context | VRF runtime objects owned by DtVrfManager. All pointers remain valid for the processor's lifetime. See DtVrfContext for the thread-safety contract. |
Implements DtProcessor.
|
overridevirtual |
Called each tick while the VRF API mutex is held. Collect state changes and queue them internally.
Implements DtProcessor.
|
overridevirtual |
Called each tick AFTER the VRF API mutex is released. Deliver any queued change notifications.
Implements DtProcessor.
|
overridevirtual |
Called on teardown. Release any resources.
Implements DtProcessor.
|
overridevirtual |
Number of objects currently known to this processor.
Implements DtProcessor.
| std::vector<DtDatasource::DtAggregateSnapshot> DtAggregateProcessor::queryAll | ( | ) | const |
Return snapshots for all currently known aggregate entities. TODO: implement once the VRF SDK aggregate API is confirmed.
| DtDatasource::DtAggregateSnapshot DtAggregateProcessor::query | ( | const std::string & | objectName | ) | const |
Return the snapshot for a single aggregate by objectName. Returns a default-constructed DtAggregateSnapshot (empty objectName) when no matching aggregate is found. TODO: implement once the VRF SDK aggregate API is confirmed.
|
overridevirtual |
{ Rollup functor interface
Implements DtTrueAggregateRollUpFunctor.
|
overridevirtual |
Looks up the state data wrapper for the given UUID.
Implements DtTrueAggregateRollUpFunctor.
|
overridevirtual |
Implements DtTrueAggregateRollUpFunctor.
|
overridevirtual |
Implements DtTrueAggregateRollUpFunctor.
|
protected |
}
Build an DtAggregateSnapshot from a tracked VRF object. TODO: verify the VRF SDK methods for:
|
protected |
Adds health-related aggregate data parameter to the snapshot if they exist.
|
private |