VR-Engage  2.3
Loading...
Searching...
No Matches
commentConnector.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2024 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6#pragma once
7
10
11#include <vl/commentInteraction.h>
12
13namespace makVre
14{
15//! Connector that bridges DIS/HLA Comment PDUs or interactions to internal
16//! CommentMessage traffic and vice versa.
17//!
18//! DtCommentConnector registers a VR-Link callback for incoming
19//! DtCommentInteraction objects and forwards relevant messages into the
20//! VR-Engage message system. It also listens for internal CommentMessage
21//! instances originating from the local player and transmits them as
22//! Comment interactions on the exercise connection.
24{
25public:
26 //! Constructs a connector with no associated player entity identifier.
28
29 //! Virtual destructor to support polymorphic deletion.
30 virtual ~DtCommentConnector() override;
31
32 //! Installs the connector with the VR-Link connection, determines the
33 //! local entity identifier from the App attributes, and registers callbacks.
34 virtual void install(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection* connection) override;
35
36 //! Per-frame update hook. The example does not require periodic work but
37 //! keeps the standard connector interface.
38 virtual void tick(double dt) override;
39
40 //! Removes network and message callbacks and releases connector resources.
41 virtual void shutdown() override;
42
43 //! Handles an incoming Comment interaction from the exercise connection
44 //! and, when addressed to the local entity, converts it into an internal
45 //! CommentMessage queued on the message manager.
46 virtual void handleCommentInteraction(DtCommentInteraction* comment);
47
48 //! Handles an internal CommentMessage and, when sent by the local entity,
49 //! constructs and transmits a corresponding Comment interaction on the
50 //! exercise connection.
52
53protected:
54 //! DIS/HLA entity identifier for the local player station entity.
55 DtEntityIdentifier myEntityId;
56};
57} // namespace makVre
Base class for all simulation event connectors in VREngage.
Definition simEventConnector.h:53
DtEntityIdentifier myEntityId
DIS/HLA entity identifier for the local player station entity.
Definition commentConnector.h:55
virtual void shutdown() override
Removes network and message callbacks and releases connector resources.
virtual void tick(double dt) override
Per-frame update hook. The example does not require periodic work but keeps the standard connector in...
virtual DtVreMessageResult handleCommentMessage(DtVreMessage *msg)
Handles an internal CommentMessage and, when sent by the local entity, constructs and transmits a cor...
DtCommentConnector()
Constructs a connector with no associated player entity identifier.
virtual ~DtCommentConnector() override
Virtual destructor to support polymorphic deletion.
virtual void install(makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection) override
Installs the connector with the VR-Link connection, determines the local entity identifier from the A...
virtual void handleCommentInteraction(DtCommentInteraction *comment)
Handles an incoming Comment interaction from the exercise connection and, when addressed to the local...
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
!
Definition glsVreMessageUtil.h:50
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Defines the base DtSimEventConnector class for VREngage simulation events.
Defines the base class for all VREngage messages.