VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes
DtWebLvcClientSession Struct Reference

WebLVC Client Session - Tracks state for each connected client per SISO-STD-017-2022 Section 5.3.

Thread Safety: Each client has its own mutex for independent parallel access. Lock this mutex when reading or modifying any client-specific data.

Public Member Functions

bool isSubscribed (DtWeblvc::DtMessageCategory cat) const
 
void resetObjects (const std::vector< std::string > &uuids)
 
void resetAllObjects ()
 
void setSubscriptions (const std::set< DtWeblvc::DtMessageCategory > &newCategories, bool newSuppressSpatial)
 
void addLog (const std::string &message)
 
std::string connectedAtISO8601 () const
 

Static Public Member Functions

static std::set
< DtWeblvc::DtMessageCategory > 
allCategories ()
 

Public Attributes

tbb::mutex mutex
 
bool connected = false
 
std::string clientName
 
std::string wsUserName
 
std::string hostname
 
std::string sessionKey
 
double webLVCVersion = 1.0
 
std::chrono::system_clock::time_point connectedAt
 
DtWeblvc::DtTimestampFormat timestampFormat = DtWeblvc::DtTimestampFormat::HexASCII
 
double updateFrequencyHz = 1.0
 
bool onChangeOnly = false
 
std::set< std::string > knownObjects
 
std::set< std::string > knownTacticalGraphics
 
std::map< std::string,
Json::Value > 
lastSentAttributes
 
std::map< std::string,
Json::Value > 
lastSentTGAttributes
 
std::set< std::string > knownAggregates
 
std::map< std::string,
Json::Value > 
lastSentAggregateAttributes
 
std::set< std::string > knownContactReports
 
std::map< std::string,
Json::Value > 
lastSentContactReportAttributes
 
std::set
< DtWeblvc::DtMessageCategory > 
subscribedCategories = allCategories()
 
bool suppressSpatial = false
 
std::vector< DtWeblvc::DtLogEntry > logEntries
 
uint64_t messagesSent = 0
 
uint64_t messagesReceived = 0
 
uint64_t bytesSent = 0
 
uint64_t bytesReceived = 0
 
std::chrono::steady_clock::time_point statsStartTime {std::chrono::steady_clock::now()}
 
uint64_t lastStatsSent = 0
 
uint64_t lastStatsReceived = 0
 
uint64_t lastBytesSent = 0
 
uint64_t lastBytesReceived = 0
 
std::chrono::steady_clock::time_point lastStatsTime {std::chrono::steady_clock::now()}
 

Member Function Documentation

static std::set<DtWeblvc::DtMessageCategory> DtWebLvcClientSession::allCategories ( )
inlinestatic
bool DtWebLvcClientSession::isSubscribed ( DtWeblvc::DtMessageCategory  cat) const
inline

Return true if the client wants to receive messages of the given category. Always true when subscribedCategories contains DtMessageCategory::Unknown (which is never normally added — all standard categories are present by default).

References subscribedCategories.

Referenced by setSubscriptions().

void DtWebLvcClientSession::resetObjects ( const std::vector< std::string > &  uuids)
inline

Erase the diff cache for the specified UUIDs across all object families (entities, tactical graphics, aggregates). On the next update tick the server will re-send full attribute state for each UUID as if it were new. Caller must hold this session's mutex.

References knownAggregates, knownContactReports, knownObjects, knownTacticalGraphics, lastSentAggregateAttributes, lastSentAttributes, lastSentContactReportAttributes, and lastSentTGAttributes.

void DtWebLvcClientSession::resetAllObjects ( )
inline

Erase the diff cache for every tracked object across all object families. On the next update tick the server will re-send full attribute state for all objects as if they were newly discovered. Caller must hold this session's mutex.

References knownAggregates, knownContactReports, knownObjects, knownTacticalGraphics, lastSentAggregateAttributes, lastSentAttributes, lastSentContactReportAttributes, and lastSentTGAttributes.

void DtWebLvcClientSession::setSubscriptions ( const std::set< DtWeblvc::DtMessageCategory > &  newCategories,
bool  newSuppressSpatial 
)
inline

Replace the subscription set. Categories that are removed have their corresponding known-object sets and attribute caches cleared so that re-subscribing triggers a full initial-state burst rather than stale deltas. newSuppressSpatial replaces the current SuppressSpatial flag; toggling it clears all four object-family caches so the next tick sends a fresh full-attribute burst.

References DtWeblvc::Aggregates, DtWeblvc::ContactReports, DtWeblvc::Entities, isSubscribed(), knownAggregates, knownContactReports, knownObjects, knownTacticalGraphics, lastSentAggregateAttributes, lastSentAttributes, lastSentContactReportAttributes, lastSentTGAttributes, subscribedCategories, suppressSpatial, and DtWeblvc::TacticalGraphics.

void DtWebLvcClientSession::addLog ( const std::string &  message)
inline
std::string DtWebLvcClientSession::connectedAtISO8601 ( ) const
inline

References connectedAt.

Member Data Documentation

tbb::mutex DtWebLvcClientSession::mutex
mutable

Referenced by DtWebLvcSendJson().

bool DtWebLvcClientSession::connected = false

Referenced by DtWebLvcSendJson().

std::string DtWebLvcClientSession::clientName
std::string DtWebLvcClientSession::wsUserName
std::string DtWebLvcClientSession::hostname
std::string DtWebLvcClientSession::sessionKey
double DtWebLvcClientSession::webLVCVersion = 1.0
std::chrono::system_clock::time_point DtWebLvcClientSession::connectedAt

Referenced by connectedAtISO8601().

DtWeblvc::DtTimestampFormat DtWebLvcClientSession::timestampFormat = DtWeblvc::DtTimestampFormat::HexASCII
double DtWebLvcClientSession::updateFrequencyHz = 1.0
bool DtWebLvcClientSession::onChangeOnly = false
std::set<std::string> DtWebLvcClientSession::knownObjects
std::set<std::string> DtWebLvcClientSession::knownTacticalGraphics
std::map<std::string, Json::Value> DtWebLvcClientSession::lastSentAttributes
std::map<std::string, Json::Value> DtWebLvcClientSession::lastSentTGAttributes
std::set<std::string> DtWebLvcClientSession::knownAggregates
std::map<std::string, Json::Value> DtWebLvcClientSession::lastSentAggregateAttributes
std::set<std::string> DtWebLvcClientSession::knownContactReports
std::map<std::string, Json::Value> DtWebLvcClientSession::lastSentContactReportAttributes
std::set<DtWeblvc::DtMessageCategory> DtWebLvcClientSession::subscribedCategories = allCategories()

Referenced by isSubscribed(), and setSubscriptions().

bool DtWebLvcClientSession::suppressSpatial = false

Suppress spatial/dynamic attributes across all object updates when true (set via SubscribeMessageTypes.SuppressSpatial).

Referenced by setSubscriptions().

std::vector<DtWeblvc::DtLogEntry> DtWebLvcClientSession::logEntries

Referenced by addLog().

uint64_t DtWebLvcClientSession::messagesSent = 0

Referenced by DtWebLvcSendJson().

uint64_t DtWebLvcClientSession::messagesReceived = 0
uint64_t DtWebLvcClientSession::bytesSent = 0

Referenced by DtWebLvcSendJson().

uint64_t DtWebLvcClientSession::bytesReceived = 0
std::chrono::steady_clock::time_point DtWebLvcClientSession::statsStartTime {std::chrono::steady_clock::now()}
uint64_t DtWebLvcClientSession::lastStatsSent = 0
uint64_t DtWebLvcClientSession::lastStatsReceived = 0
uint64_t DtWebLvcClientSession::lastBytesSent = 0
uint64_t DtWebLvcClientSession::lastBytesReceived = 0
std::chrono::steady_clock::time_point DtWebLvcClientSession::lastStatsTime {std::chrono::steady_clock::now()}

The documentation for this struct was generated from the following file:

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)