VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aggregateUpdateSender.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 <oatpp-websocket/WebSocket.hpp>
9 #include <json/json.h>
10 #include <vector>
11 #include <utility>
12 
13 #include "dataTypes.h"
14 #include "updateSenderHelpers.h"
15 #include "webLVCClientSession.h"
16 
18 
30 {
31 public:
35  void sendInitialState(
36  const oatpp::websocket::WebSocket& conn,
37  DtWebLvcClientSession& session,
38  DtAggregateProcessor& processor);
39 
45  const oatpp::websocket::WebSocket& conn,
46  DtWebLvcClientSession& session,
47  DtAggregateProcessor& processor);
48 
49 private:
54  DtWebLvcClientSession& session,
56 
60  void sendObjectsDeleted(
61  const oatpp::websocket::WebSocket& conn,
62  DtWebLvcClientSession& session,
63  const std::vector<std::string>& objectNames);
64 
67  const DtDatasource::DtAggregateSnapshot& snapshot,
68  const DtWebLvcClientSession& session);
69 
74  const DtDatasource::DtAggregateSnapshot& snapshot,
75  const DtWebLvcClientSession& session);
76 };
bool matchesSubscription(const DtDatasource::DtAggregateSnapshot &snapshot, const DtWebLvcClientSession &session)
Return true if the snapshot should be sent to this client.
Json::Value buildUpdateMultipleMessage(DtWebLvcClientSession &session, std::vector< DtChangedItem< DtDatasource::DtAggregateSnapshot >> &items)
Build an AggregateAttributeUpdateMultiple message from a list of snapshots. Updates session...
void sendInitialState(const oatpp::websocket::WebSocket &conn, DtWebLvcClientSession &session, DtAggregateProcessor &processor)
Send initial state of all aggregates to a newly connected client. Builds and sends a single Aggregate...
IMGUI_API void Value(const char *prefix, bool b)
DtAggregateProcessor - Lightweight per-client aggregate processor.
Definition: aggregateProcessor.h:29
Definition: updateSenderHelpers.h:17
DtDatasource::DtAggregateSnapshot applyRoleModifications(const DtDatasource::DtAggregateSnapshot &snapshot, const DtWebLvcClientSession &session)
Return a copy of snapshot with role-based field modifications applied (e.g. availableCommands cleared...
void sendPeriodicUpdates(const oatpp::websocket::WebSocket &conn, DtWebLvcClientSession &session, DtAggregateProcessor &processor)
Query all aggregates from the processor, detect changes against the session cache, send a batch AggregateAttributeUpdateMultiple for changed aggregates, and send ObjectDeleted for any that have disappeared. Caller must NOT hold session-&gt;mutex.
DtAggregateSnapshot- Complete state of an aggregate entity at a point in time. VRF-agnostic intermedi...
Definition: dataTypes.h:171
WebLVC Client Session - Tracks state for each connected client per SISO-STD-017-2022 Section 5...
Definition: webLVCClientSession.h:28
DtAggregateUpdateSender - Encapsulates all aggregate-specific WebLVC message building and sending log...
Definition: aggregateUpdateSender.h:29
void sendObjectsDeleted(const oatpp::websocket::WebSocket &conn, DtWebLvcClientSession &session, const std::vector< std::string > &objectNames)
Send an ObjectDeletedMultiple message for a set of aggregates that have disappeared. Clears each object&#39;s cache entry and stats. Caller must NOT hold session.mutex.

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)