VR-Engage  2.2
Loading...
Searching...
No Matches
vreSelectConnectionPageDriverDIS.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreSelectConnectionPageDriverDIS.h
7//! \brief Defines the DIS-specific connection driver for VR-Engage
8//!
9//! This file contains the DtVreSelectConnectionPageDriverDIS class which provides
10//! the implementation of a connection driver for the Distributed Interactive
11//! Simulation (DIS) protocol. It exposes DIS-specific configuration properties
12//! to the connection selection UI and handles the persistence of DIS connection settings.
13
14#pragma once
15
18
19#include <QObject>
20
21class QQuickItem;
22class QStringList;
23
24namespace makVre
25{
26//! \brief Forward declaration of the player station application class
28
29//! \brief DIS protocol connection driver for the connection selection UI
30//!
31//! DtVreSelectConnectionPageDriverDIS is a specialized connection driver for
32//! the Distributed Interactive Simulation (DIS) protocol. It provides properties
33//! and methods for configuring DIS-specific connection settings such as network
34//! addresses, port numbers, exercise IDs, and various behavioral flags. This class
35//! exposes these properties to QML for the connection selection UI and manages
36//! their persistence in the application's configuration.
38{
39 Q_OBJECT;
40
44 Q_PROPERTY(QString subnetMask READ getSubnetMask WRITE setSubnetMask NOTIFY subnetMaskChanged);
45 Q_PROPERTY(QStringList multicastAddresses READ getMulticastAddresses WRITE setMulticastAddresses NOTIFY
51 Q_PROPERTY(
55 Q_PROPERTY(bool useAsynchIO READ getUseAsynchIO WRITE setUseAsynchIO NOTIFY useAsynchIOChanged);
58 Q_PROPERTY(
60 Q_PROPERTY(
62 Q_PROPERTY(int disVersion READ getDisVersion WRITE setDisVersion NOTIFY disVersionChanged);
63 Q_PROPERTY(int exerciseId READ getExerciseId WRITE setExerciseId NOTIFY exerciseIdChanged);
65 Q_PROPERTY(int port READ getPort WRITE setPort NOTIFY portChanged);
66 Q_PROPERTY(
69 Q_PROPERTY(int siteId READ getSiteId WRITE setSiteId NOTIFY siteIdChanged);
73
74public:
75 //! \brief Constructor
76 //! \param parent Optional parent QObject for memory management
77 //!
78 //! Creates a new DIS connection driver with default property values.
79 explicit DtVreSelectConnectionPageDriverDIS(QObject* parent = nullptr);
80
81 //! \brief Destructor
82 //!
83 //! Cleans up resources used by the DIS connection driver.
85
86 //! \brief Sets driver data from a message
87 //! \param msg Pointer to the message containing DIS driver configuration data
88 //!
89 //! Parses and applies DIS-specific configuration data from a message.
90 //! This is typically called when loading saved configurations or
91 //! receiving updates from the network subsystem.
92 virtual void setData(makVre::DtVreMessage* msg) override;
93
94 //! \brief Saves the current DIS driver configuration
95 //!
96 //! Collects the current DIS configuration properties and sends them
97 //! to the network subsystem for persistence and activation. This is
98 //! typically called when the user confirms changes to the connection settings.
99 virtual Q_INVOKABLE void save() override;
100
101 virtual QString getDestinationAddress() const;
102 virtual QString getDeviceAddress() const;
103 virtual QString getSubnetMask() const;
104 virtual QStringList getMulticastAddresses() const;
105 virtual bool getOverrideGlobalViewControl() const;
106 virtual bool getPublishObservers() const;
107 virtual bool getShowSelfReflect() const;
108 virtual bool getTimeoutProcessing() const;
109 virtual bool getUseAbsoluteTimeStamps() const;
110 virtual bool getUseAsynchIO() const;
112 virtual bool getViewControlEnabled() const;
113 virtual int getApplicationNumber() const;
114 virtual int getDisVersion() const;
115 virtual int getExerciseId() const;
116 virtual int getMulticastTtl() const;
117 virtual int getPort() const;
118 virtual int getReceiveBufferSize() const;
119 virtual int getSendBufferSize() const;
120 virtual int getSiteId() const;
121 virtual qreal getConnectionFrameTime() const;
122 virtual qreal getTimeoutInterval() const;
123
124public slots:
125 virtual void setDestinationAddress(QString);
126 virtual void setDeviceAddress(QString);
127 virtual void setSubnetMask(QString);
128 virtual void setMulticastAddresses(QStringList);
130 virtual void setPublishObservers(bool);
131 virtual void setShowSelfReflect(bool);
132 virtual void setTimeoutProcessing(bool);
133 virtual void setUseAbsoluteTimeStamps(bool);
134 virtual void setUseAsynchIO(bool);
136 virtual void setViewControlEnabled(bool);
137 virtual void setApplicationNumber(int);
138 virtual void setDisVersion(int);
139 virtual void setExerciseId(int);
140 virtual void setMulticastTtl(int);
141 virtual void setPort(int);
142 virtual void setReceiveBufferSize(int);
143 virtual void setSendBufferSize(int);
144 virtual void setSiteId(int);
145 virtual void setConnectionFrameTime(qreal);
146 virtual void setTimeoutInterval(qreal);
147
148signals:
150 void deviceAddressChanged(QString);
151 void subnetMaskChanged(QString);
152 void multicastAddressesChanged(QStringList);
165 void portChanged(int);
168 void siteIdChanged(int);
171
172protected:
173 //! \brief Destination IP address for DIS packets
175
176 //! \brief Network device address to bind to
178
179 //! \brief Subnet mask for the network
181
182 //! \brief List of multicast addresses to join
184
185 //! \brief Flag to override global view control settings
187
188 //! \brief Flag to publish observer entities
190
191 //! \brief Flag to show self-reflections
193
194 //! \brief Flag to enable timeout processing for entities
196
197 //! \brief Flag to use absolute timestamps in PDUs
199
200 //! \brief Flag to use asynchronous I/O for network communications
202
203 //! \brief Flag to use topographic data for flat earth vector conversion
205
206 //! \brief Flag to enable view control PDUs
208
209 //! \brief Application ID number for DIS
211
212 //! \brief DIS protocol version
214
215 //! \brief Exercise ID for DIS simulation
217
218 //! \brief Time-to-live for multicast packets
220
221 //! \brief UDP port number for DIS communications
223
224 //! \brief Size of the receive buffer in bytes
226
227 //! \brief Size of the send buffer in bytes
229
230 //! \brief Site ID for DIS
232
233 //! \brief Frame time for connections in seconds
235
236 //! \brief Timeout interval for entities in seconds
238};
239} // namespace makVre
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
qreal myTimeoutInterval
Timeout interval for entities in seconds.
Definition vreSelectConnectionPageDriverDIS.h:237
QStringList myMulticastAddresses
List of multicast addresses to join.
Definition vreSelectConnectionPageDriverDIS.h:183
int siteId
Definition vreSelectConnectionPageDriverDIS.h:69
bool myPublishObservers
Flag to publish observer entities.
Definition vreSelectConnectionPageDriverDIS.h:189
int applicationNumber
Definition vreSelectConnectionPageDriverDIS.h:61
qreal myConnectionFrameTime
Frame time for connections in seconds.
Definition vreSelectConnectionPageDriverDIS.h:234
int sendBufferSize
Definition vreSelectConnectionPageDriverDIS.h:68
QString myDeviceAddress
Network device address to bind to.
Definition vreSelectConnectionPageDriverDIS.h:177
qreal timeoutInterval
Definition vreSelectConnectionPageDriverDIS.h:72
qreal connectionFrameTime
Definition vreSelectConnectionPageDriverDIS.h:71
bool myViewControlEnabled
Flag to enable view control PDUs.
Definition vreSelectConnectionPageDriverDIS.h:207
virtual Q_INVOKABLE void save() override
Saves the current DIS driver configuration.
bool publishObservers
Definition vreSelectConnectionPageDriverDIS.h:49
QString destinationAddress
Definition vreSelectConnectionPageDriverDIS.h:42
virtual bool getUseTopoForFlatEarthVectorConversion() const
bool myOverrideGlobalViewControl
Flag to override global view control settings.
Definition vreSelectConnectionPageDriverDIS.h:186
QStringList multicastAddresses
Definition vreSelectConnectionPageDriverDIS.h:46
int multicastTtl
Definition vreSelectConnectionPageDriverDIS.h:64
virtual void setMulticastAddresses(QStringList)
int exerciseId
Definition vreSelectConnectionPageDriverDIS.h:63
virtual void setUseTopoForFlatEarthVectorConversion(bool)
bool myUseAbsoluteTimeStamps
Flag to use absolute timestamps in PDUs.
Definition vreSelectConnectionPageDriverDIS.h:198
bool timeoutProcessing
Definition vreSelectConnectionPageDriverDIS.h:52
int mySiteId
Site ID for DIS.
Definition vreSelectConnectionPageDriverDIS.h:231
int myDisVersion
DIS protocol version.
Definition vreSelectConnectionPageDriverDIS.h:213
QString mySubnetMask
Subnet mask for the network.
Definition vreSelectConnectionPageDriverDIS.h:180
virtual bool getOverrideGlobalViewControl() const
int myReceiveBufferSize
Size of the receive buffer in bytes.
Definition vreSelectConnectionPageDriverDIS.h:225
bool useTopoForFlatEarthVectorConversion
Definition vreSelectConnectionPageDriverDIS.h:57
int disVersion
Definition vreSelectConnectionPageDriverDIS.h:62
int myPort
UDP port number for DIS communications.
Definition vreSelectConnectionPageDriverDIS.h:222
bool overrideGlobalViewControl
Definition vreSelectConnectionPageDriverDIS.h:48
bool showSelfReflect
Definition vreSelectConnectionPageDriverDIS.h:50
QString subnetMask
Definition vreSelectConnectionPageDriverDIS.h:44
int mySendBufferSize
Size of the send buffer in bytes.
Definition vreSelectConnectionPageDriverDIS.h:228
QString deviceAddress
Definition vreSelectConnectionPageDriverDIS.h:43
int myApplicationNumber
Application ID number for DIS.
Definition vreSelectConnectionPageDriverDIS.h:210
bool useAbsoluteTimeStamps
Definition vreSelectConnectionPageDriverDIS.h:54
virtual qreal getConnectionFrameTime() const
virtual void setData(makVre::DtVreMessage *msg) override
Sets driver data from a message.
int port
Definition vreSelectConnectionPageDriverDIS.h:65
bool myTimeoutProcessing
Flag to enable timeout processing for entities.
Definition vreSelectConnectionPageDriverDIS.h:195
virtual QString getDestinationAddress() const
virtual QString getDeviceAddress() const
QString myDestinationAddress
Destination IP address for DIS packets.
Definition vreSelectConnectionPageDriverDIS.h:174
int receiveBufferSize
Definition vreSelectConnectionPageDriverDIS.h:67
int myMulticastTtl
Time-to-live for multicast packets.
Definition vreSelectConnectionPageDriverDIS.h:219
bool viewControlEnabled
Definition vreSelectConnectionPageDriverDIS.h:59
virtual ~DtVreSelectConnectionPageDriverDIS() override
Destructor.
bool myUseAsynchIO
Flag to use asynchronous I/O for network communications.
Definition vreSelectConnectionPageDriverDIS.h:201
bool myUseTopoForFlatEarthVectorConversion
Flag to use topographic data for flat earth vector conversion.
Definition vreSelectConnectionPageDriverDIS.h:204
bool myShowSelfReflect
Flag to show self-reflections.
Definition vreSelectConnectionPageDriverDIS.h:192
bool useAsynchIO
Definition vreSelectConnectionPageDriverDIS.h:55
virtual QStringList getMulticastAddresses() const
int myExerciseId
Exercise ID for DIS simulation.
Definition vreSelectConnectionPageDriverDIS.h:216
DtVreSelectConnectionPageDriverDIS(QObject *parent=nullptr)
Constructor.
DtVreSelectConnectionPageDriver(QObject *parent=nullptr)
Constructor.
Defines export macros for the VR-Engage Player Station library.
#define PLAYERSTATION_DLL
Definition export.h:24
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Defines the base class for connection drivers in VR-Engage.