VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  ******************************************************************************/
5 
6 #pragma once
7 
8 #include "iProcessor.h"
9 #include "dataTypes.h"
10 #include "vrfManager.h"
12 
13 #include <string>
14 #include <vector>
15 
30 {
31 public:
32  DtAggregateProcessor() = default;
33  virtual ~DtAggregateProcessor() override = default;
34 
35  // =========================================================================
36  // DtProcessor interface
37  // =========================================================================
38  virtual void initialize(const DtVrfContext& context) override;
39  virtual void poll() override;
40  virtual void dispatchPendingEvents() override;
41  virtual void shutdown() override;
42  virtual int count() const override;
43 
44  // =========================================================================
45  // Query interface
46  // =========================================================================
47 
50  std::vector<DtDatasource::DtAggregateSnapshot> queryAll() const;
51 
56  DtDatasource::DtAggregateSnapshot query(const std::string& objectName) const;
57 
59  virtual void parameterPropertiesFor(DtTrueAggregateRollUp::Leafs& leafs, DtRwProperties& parameters) const override;
60  virtual const makVrf::DtStateDataWrapper* lookup(const DtUUID& id) const override;
61  virtual std::set<const makVrf::DtStateDataWrapper*> lookup(const std::set<DtUUID>& ids) const override;
62  virtual bool isValid(const makVrf::DtStateDataWrapper* state) const override;
64 
65 protected:
71  std::shared_ptr<DtDatasource::DtAggregateSnapshot> snapshotForAggregate(DtWebServerObjectPtr obj) const;
72 
75  std::shared_ptr<DtDatasource::DtAggregateSnapshot>& snapshot, DtWebServerObjectPtr obj) const;
76 
77 private:
79 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtDatasource::DtAggregateSnapshot query(const std::string &objectName) const
Return the snapshot for a single aggregate by objectName. Returns a default-constructed DtAggregateSn...
std::shared_ptr< DtDatasource::DtAggregateSnapshot > snapshotForAggregate(DtWebServerObjectPtr obj) const
}
virtual bool isValid(const makVrf::DtStateDataWrapper *state) const override
virtual void shutdown() override
Called on teardown. Release any resources.
virtual int count() const override
Number of objects currently known to this processor.
virtual void parameterPropertiesFor(DtTrueAggregateRollUp::Leafs &leafs, DtRwProperties &parameters) const override
{ Rollup functor interface
void addHealthToSnapshot(std::shared_ptr< DtDatasource::DtAggregateSnapshot > &snapshot, DtWebServerObjectPtr obj) const
Adds health-related aggregate data parameter to the snapshot if they exist.
virtual void initialize(const DtVrfContext &context) override
Called once before the first tick.
DtVrfContext - Bundles the VRF runtime objects passed to a processor on initialization. All pointers remain valid for the lifetime of the processor.
Definition: vrfManager.h:59
DtProcessor - Abstract base interface for per-client data processors.
Definition: iProcessor.h:25
Abstract interface that is bridging access to both GUI and Webserver through callbacks Cannot use GUI...
Definition: trueAggregateRollUp.h:65
virtual void poll() override
Called each tick while the VRF API mutex is held. Collect state changes and queue them internally...
DtAggregateProcessor - Lightweight per-client aggregate processor.
Definition: aggregateProcessor.h:29
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: stateDataWrapper.h:49
std::set< const makVrf::DtStateDataWrapper * > Leafs
Definition: trueAggregateRollUp.h:27
std::vector< DtDatasource::DtAggregateSnapshot > queryAll() const
Return snapshots for all currently known aggregate entities. TODO: implement once the VRF SDK aggrega...
DtVrfContext myVrfContext
Definition: aggregateProcessor.h:78
DtAggregateProcessor()=default
DtAggregateSnapshot- Complete state of an aggregate entity at a point in time. VRF-agnostic intermedi...
Definition: dataTypes.h:171
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
virtual const makVrf::DtStateDataWrapper * lookup(const DtUUID &id) const override
Looks up the state data wrapper for the given UUID.
std::shared_ptr< DtWebServerObject > DtWebServerObjectPtr
Definition: webServerObject.h:90
virtual ~DtAggregateProcessor() override=default
virtual void dispatchPendingEvents() override
Called each tick AFTER the VRF API mutex is released. Deliver any queued change notifications.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)