11 #include <tbb/mutex.h>
15 #include <json/json.h>
112 for (
const auto& uuid : uuids)
148 bool newSuppressSpatial)
199 std::chrono::steady_clock::time_point
statsStartTime{std::chrono::steady_clock::now()};
206 std::chrono::steady_clock::time_point
lastStatsTime{std::chrono::steady_clock::now()};
220 auto tt = std::chrono::system_clock::to_time_t(
connectedAt);
227 std::ostringstream oss;
228 oss << std::put_time(&tm,
"%Y-%m-%dT%H:%M:%SZ");
uint64_t messagesSent
Definition: webLVCClientSession.h:195
bool isSubscribed(DtWeblvc::DtMessageCategory cat) const
Return true if the client wants to receive messages of the given category. Always true when subscribe...
Definition: webLVCClientSession.h:101
uint64_t lastStatsReceived
Definition: webLVCClientSession.h:203
tbb::mutex mutex
Definition: webLVCClientSession.h:31
std::string getISO8601Timestamp()
Get ISO 8601 formatted timestamp for logging.
Definition: webLVCTypes.h:67
ContactReportAttributeUpdate / ContactReportAttributeUpdateMultiple / ObjectDeleted for contact repor...
DtTimestampFormat
Definition: webLVCTypes.h:26
DtWeblvc::DtTimestampFormat timestampFormat
Definition: webLVCClientSession.h:59
std::set< std::string > knownAggregates
Definition: webLVCClientSession.h:79
std::set< std::string > knownContactReports
Definition: webLVCClientSession.h:85
std::chrono::system_clock::time_point connectedAt
Definition: webLVCClientSession.h:40
std::map< std::string, Json::Value > lastSentAggregateAttributes
Definition: webLVCClientSession.h:82
const char DtClientSessionMutexName[]
std::set< std::string > knownTacticalGraphics
Definition: webLVCClientSession.h:69
std::string message
Definition: webLVCMessage.h:380
AggregateAttributeUpdate / AggregateAttributeUpdateMultiple / ObjectDeleted for aggregates.
void setSubscriptions(const std::set< DtWeblvc::DtMessageCategory > &newCategories, bool newSuppressSpatial)
Replace the subscription set. Categories that are removed have their corresponding known-object sets ...
Definition: webLVCClientSession.h:147
uint64_t messagesReceived
Definition: webLVCClientSession.h:196
DtMessageCategory
Logical categories of server-to-client push messages a client may subscribe to. A client that does no...
Definition: webLVCMessage.h:78
std::chrono::steady_clock::time_point statsStartTime
Definition: webLVCClientSession.h:199
bool onChangeOnly
Definition: webLVCClientSession.h:63
void addLog(const std::string &message)
Definition: webLVCClientSession.h:209
uint64_t bytesReceived
Definition: webLVCClientSession.h:198
std::string connectedAtISO8601() const
Definition: webLVCClientSession.h:218
std::chrono::steady_clock::time_point lastStatsTime
Definition: webLVCClientSession.h:206
std::map< std::string, Json::Value > lastSentTGAttributes
Definition: webLVCClientSession.h:76
uint64_t lastStatsSent
Definition: webLVCClientSession.h:202
std::set< DtWeblvc::DtMessageCategory > subscribedCategories
Definition: webLVCClientSession.h:93
EntityAttributeUpdate / EntityAttributeUpdateMultiple / ObjectDeleted for entities.
void resetAllObjects()
Erase the diff cache for every tracked object across all object families. On the next update tick the...
Definition: webLVCClientSession.h:129
std::string timestamp
Definition: webLVCMessage.h:379
Log entry per Section 5.7.2.
Definition: webLVCMessage.h:377
std::set< std::string > knownObjects
Definition: webLVCClientSession.h:66
void resetObjects(const std::vector< std::string > &uuids)
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.
Definition: webLVCClientSession.h:110
uint64_t bytesSent
Definition: webLVCClientSession.h:197
ScenarioRolesStatus / PlayerRolesStatus.
double updateFrequencyHz
Definition: webLVCClientSession.h:62
std::map< std::string, Json::Value > lastSentAttributes
Definition: webLVCClientSession.h:73
bool connected
Definition: webLVCClientSession.h:34
std::vector< DtWeblvc::DtLogEntry > logEntries
Definition: webLVCClientSession.h:192
std::string clientName
Definition: webLVCClientSession.h:35
uint64_t lastBytesSent
Definition: webLVCClientSession.h:204
static std::set< DtWeblvc::DtMessageCategory > allCategories()
Definition: webLVCClientSession.h:45
std::string hostname
Definition: webLVCClientSession.h:37
uint64_t lastBytesReceived
Definition: webLVCClientSession.h:205
TacticalGraphicAttributeUpdate / TacticalGraphicAttributeUpdateMultiple / ObjectDeleted for TGs...
std::map< std::string, Json::Value > lastSentContactReportAttributes
Definition: webLVCClientSession.h:88
std::string wsUserName
Definition: webLVCClientSession.h:36
WebLVC Client Session - Tracks state for each connected client per SISO-STD-017-2022 Section 5...
Definition: webLVCClientSession.h:28
Interaction / InteractionMultiple.
std::string sessionKey
Definition: webLVCClientSession.h:38
bool suppressSpatial
Suppress spatial/dynamic attributes across all object updates when true (set via SubscribeMessageType...
Definition: webLVCClientSession.h:96
double webLVCVersion
Definition: webLVCClientSession.h:39