VR-Engage  2.2
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 given player station application and
33 //! VR-Link connection, determines the local entity identifier, and
34 //! registers network and message callbacks.
35 virtual void install(DtPlayerStationApp* app,
36 makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection* connection) override;
37
38 //! Per-frame update hook. The example does not require periodic work but
39 //! keeps the standard connector interface.
40 virtual void tick() override;
41
42 //! Removes network and message callbacks and releases connector resources.
43 virtual void shutdown() override;
44
45 //! Handles an incoming Comment interaction from the exercise connection
46 //! and, when addressed to the local entity, converts it into an internal
47 //! CommentMessage queued on the message manager.
48 virtual void handleCommentInteraction(DtCommentInteraction* comment);
49
50 //! Handles an internal CommentMessage and, when sent by the local entity,
51 //! constructs and transmits a corresponding Comment interaction on the
52 //! exercise connection.
54
55protected:
56 //! DIS/HLA entity identifier for the local player station entity.
57 DtEntityIdentifier myEntityId;
58};
59} // namespace makVre
Base class for all simulation event connectors in VREngage.
Definition simEventConnector.h:54
DtEntityIdentifier myEntityId
DIS/HLA entity identifier for the local player station entity.
Definition commentConnector.h:57
virtual void shutdown() override
Removes network and message callbacks and releases connector resources.
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(DtPlayerStationApp *app, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection) override
Installs the connector with the given player station application and VR-Link connection,...
virtual void tick() override
Per-frame update hook. The example does not require periodic work but keeps the standard connector in...
virtual void handleCommentInteraction(DtCommentInteraction *comment)
Handles an incoming Comment interaction from the exercise connection and, when addressed to the local...
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
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.