VR-Engage  2.2
Loading...
Searching...
No Matches
vrfRemoteControlConnector.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4******************************************************************************/
5
6//! \file vrfRemoteControlConnector.h
7//! \brief Defines the DtVrfRemoteControlConnector class for communication with VR-Forces backend
8//!
9//! This connector provides functionality to remotely control a VR-Forces backend,
10//! including session management, entity control, and real-time data exchange.
11
12#pragma once
13
16
21
22#include <vrfutil/rwUUID.h>
23
24#include <vlpi/simulationAddress.h>
25
26#include <vector>
27#include <utility>
28
29//! \brief Forward declaration of the exercise connection class
30class DtExerciseConn;
31
32//! \brief Forward declaration of the VRF object message class
33class DtVrfObjectMessage;
34
35//! \brief Forward declaration of the VRF message interface class
36class DtVrfMessageInterface;
37
38//! \brief Forward declaration of the reflected entity list class
39class DtReflectedEntityList;
40
41//! \brief Forward declaration of the entity identifier class
42class DtEntityIdentifier;
43
44//! \brief Forward declaration of the reflected entity class
45class DtReflectedEntity;
46
47//! \brief Forward declaration of the backend map class
48class DtBackendMap;
49
50//! \brief Forward declaration of the reflected extended entity list class
51class DtReflectedExtEntityList;
52
53//! \brief Forward declaration of the reflected extended entity class
54class DtReflectedExtEntity;
55
56//! \brief Forward declaration of the reflected control object list class
57class DtReflectedControlObjectList;
58
59//! \brief Forward declaration of the resource monitor response interface class
60class DtIfResourceMonitorResponse;
61
62//! \brief Forward declaration of the sensor data interface class
63class DtIfSensorData;
64
65//! \brief Forward declaration of the simulation message class
66class DtSimMessage;
67
68//! \brief Forward declaration of the simulation interface content class
69class DtSimInterfaceContent;
70
71//! \brief Forward declaration of the reflected control object class
72class DtReflectedControlObject;
73
74//! \brief Forward declaration of the reflected environment process class
75class DtReflectedEnvironmentProcess;
76
77//! \brief Forward declaration of the communication manager class
78class DtCommunicationManager;
79
80namespace makVrf
81{
82//! \brief Forward declaration of the VR-Link VRF remote controller class
83class DtVrlinkVrfRemoteController;
84} // namespace makVrf
85
86namespace makVrfEvents
87{
88//! \brief Forward declaration of the VRF event class
89class DtEvent;
90} // namespace makVrfEvents
91
92namespace makVre
93{
94//! \brief Structure containing information about a reflected extended entity
95//!
96//! Stores essential identification and type information about an entity in the
97//! simulation, allowing for efficient lookups and entity management
99{
100 //! \brief Entity identifier
101 DtEntityIdentifier myEntityId;
102
103 //! \brief Entity type information
104 DtEntityType myEntityType;
105
106 //! \brief Universally unique identifier for the entity
107 DtUUID myUUID;
108
109 //! \brief Marking text (name/label) for the entity
111};
112
113//! \brief Structure containing entity control capabilities
114//!
115//! Manages the relationship between an entity and its associated roles and
116//! function groups, defining what capabilities are available for controlling the entity
118{
119 //! \brief Default constructor
120 //!
121 //! Initializes the entity ID to a null identifier
122 ControlSet() { entityId = DtEntityIdentifier::nullId(); }
123
124 //! \brief Checks if the control set is valid
125 //! \return True if the entity ID is not null, false otherwise
126 bool valid() { return entityId != DtEntityIdentifier::nullId(); }
127
128 //! \brief Entity identifier
129 DtEntityIdentifier entityId;
130
131 //! \brief Set of function groups available for this entity
132 std::set<DtString> functionGroups;
133
134 //! \brief Vector of roles available for this entity
135 std::vector<std::string> roles;
136};
137
138//! \brief Connector for remote communication with VR-Forces backends
139//!
140//! DtVrfRemoteControlConnector provides a comprehensive interface for controlling
141//! and communicating with a VR-Forces backend. It handles session management,
142//! entity creation/removal, simulation control (run/pause/rewind), and processes
143//! various data types sent from the backend, including radar data, entity updates,
144//! and sensor information.
146{
147public:
148 //! \brief Default constructor
150
151 //! \brief Virtual destructor
153
154 //! \brief Installs the VRF remote control connector with the application and connection
155 //! \param app Pointer to the player station application
156 //! \param communicationManager Pointer to the communication manager
157 //! \param connection Pointer to the protocol-specific VR-Link connection
158 //! \param vrfSessionId Session ID for the VRF backend
159 //!
160 //! Initializes the connector with the provided application, communication manager, and connection,
161 //! registers message handlers for various message types, and sets up the VRF remote controller
162 virtual void install(DtPlayerStationApp* app, DtCommunicationManager* communicationManager,
163 makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection* connection, int vrfSessionId);
164
165 //! \brief Performs periodic processing of backend and session status
166 //!
167 //! Updates backend and session status information, and processes any pending
168 //! entity creations or deletions
169 virtual void tick() override;
170
171 //! \brief Shuts down the VRF remote control connector
172 //!
173 //! Removes message handlers and cleans up resources
174 virtual void shutdown() override;
175
176 //! \brief Gets the VRF remote controller
177 //! \return Pointer to the VRF remote controller
178 virtual makVrf::DtVrlinkVrfRemoteController* vrfRemoteController();
179
180 //! \brief Gets the reflected entity list
181 //! \return Pointer to the reflected entity list
182 virtual DtReflectedEntityList* reflectedEntityList();
183
184 //! \brief Handles the creation of a local entity
185 //! \param name The name of the created entity
186 //! \param id The entity identifier of the created entity
187 //! \param uuid The universally unique identifier of the created entity
188 //!
189 //! Called when a new local entity is created in the simulation. Updates
190 //! internal entity tracking information and notifies listeners.
191 virtual void handleLocalEntityCreated(const DtString& name, const DtEntityIdentifier& id, const DtUUID& uuid);
192
193 //! \brief Processes a resource response event
194 //! \param evt The event containing resource response data
195 //!
196 //! Handles resource response events from the VR-Forces backend, which
197 //! typically include information about available resources like weapons,
198 //! sensors, or other entity equipment.
199 virtual void processResourceResponse(const makVrfEvents::DtEvent& evt);
200
201 //! \brief Handles sensor update data
202 //! \param sensorData Pointer to the sensor data interface
203 //!
204 //! Processes updates from entity sensors, including detection information
205 //! about other entities. Updates the local representation of sensor information
206 //! and forwards relevant data to subscribed components.
207 virtual void handleSensorUpdate(DtIfSensorData* sensorData);
208
209 // virtual void handleWeatherObjectDiscovered(DtReflectedControlObject* obj);
210 // virtual void handleWeatherObjectRemoved(DtReflectedControlObject* obj);
211
212 //! \brief Handles discovery of an action menu control object
213 //! \param obj Pointer to the discovered control object
214 //!
215 //! Called when an action menu control object is discovered in the simulation.
216 //! These objects define available actions that can be performed by entities
217 //! and are used to populate action menus in the user interface.
218 virtual void handleActionMenuControlObjectDiscovered(DtReflectedControlObject* obj);
219
220 //! \brief Handles removal of an action menu control object
221 //! \param obj Pointer to the removed control object
222 //!
223 //! Called when an action menu control object is removed from the simulation.
224 //! Updates the UI to remove any corresponding action menu entries.
225 virtual void handleActionMenuControlObjectRemoved(DtReflectedControlObject* obj);
226
227 //! \brief Handles removal of an entity from the simulation
228 //! \param entity Pointer to the removed entity
229 //!
230 //! Called when an entity is removed from the simulation. Updates internal
231 //! entity tracking information and notifies listeners of the removal.
232 virtual void handleEntityRemoved(const DtReflectedExtEntity* entity);
233 //! \brief Handles addition of an entity to the simulation
234 //! \param entity Pointer to the added entity
235 //!
236 //! Called when a new entity is added to the simulation. Updates internal
237 //! entity tracking information and notifies listeners of the addition.
238 virtual void handleEntityAdded(const DtReflectedExtEntity* entity);
239
240 //! \brief Chat message handling methods
241 //! @{
242
243 //! \brief Processes a chat event from VR-Forces
244 //! \param evt The event containing the chat message data
245 //!
246 //! Processes chat events from the VR-Forces backend and forwards
247 //! them to the appropriate chat interface components.
248 virtual void processChatEvent(const makVrfEvents::DtEvent& evt);
249
250 //! \brief Handles a chat message from VR-Engage
251 //! \param message The chat message to process
252 //! \return Message result indicating how the message was handled
253 //!
254 //! Processes chat messages from VR-Engage components and forwards
255 //! them to the VR-Forces backend for distribution.
257 //! @}
258
259 //! \brief Session status and configuration message handlers
260 //! @{
261
262 //! \brief Handles a request for VRF session status
263 //! \param message The session status request message
264 //! \return Message result indicating how the message was handled
265 //!
266 //! Processes requests for the current session status and sends a response
267 //! containing the session status information.
269
270 //! \brief Handles a request for the session simulation model set list
271 //! \param message The SMS list request message
272 //! \return Message result indicating how the message was handled
273 //!
274 //! Processes requests for the list of simulation model sets (SMS) in the
275 //! current session and sends a response with the SMS list.
277
278 //! \brief Handles a request for the session play state
279 //! \param message The play state request message
280 //! \return Message result indicating how the message was handled
281 //!
282 //! Processes requests for the current play state (running, paused, etc.)
283 //! of the session and sends a response with the play state information.
285
286 //! \brief Handles a request to set the default SMS list
287 //! \param message The set default SMS list message
288 //! \return Message result indicating how the message was handled
289 //!
290 //! Processes requests to set the default list of simulation model sets (SMS)
291 //! for the current session or for new sessions.
293 //! @}
294
295 //! \brief Backend management message handlers
296 //! @{
297
298 //! \brief Handles a request to set backend configuration
299 //! \param message The set backend configuration message
300 //! \return Message result indicating how the message was handled
301 //!
302 //! Processes requests to configure the VR-Forces backend, including
303 //! settings for network communication, simulation parameters, and
304 //! other backend-specific options.
306
307 //! \brief Handles a request to start the backend
308 //! \param message The start backend message
309 //! \return Message result indicating how the message was handled
310 //!
311 //! Processes requests to start the VR-Forces backend process.
312 //! This typically launches the backend executable and establishes
313 //! a connection to it.
315
316 //! \brief Handles a request to stop the backend
317 //! \param message The stop backend message
318 //! \return Message result indicating how the message was handled
319 //!
320 //! Processes requests to stop the VR-Forces backend process.
321 //! This typically terminates the backend executable and releases
322 //! any associated resources.
324
325 //! \brief Handles a request for backend status
326 //! \param message The backend status request message
327 //! \return Message result indicating how the message was handled
328 //!
329 //! Processes requests for the current status of the VR-Forces backend
330 //! and sends a response with the status information.
332
333 //! \brief Handles a request to load a scenario into the backend
334 //! \param message The load backend message
335 //! \return Message result indicating how the message was handled
336 //!
337 //! Processes requests to load a specific scenario file into the
338 //! VR-Forces backend, which initializes the simulation environment
339 //! with predefined entities, settings, and initial conditions.
341 //! @}
342
343 //! \brief Simulation control message handlers
344 //! @{
345
346 //! \brief Handles a request to run the simulation
347 //! \param message The run simulation message
348 //! \return Message result indicating how the message was handled
349 //!
350 //! Processes requests to start or resume the simulation, which begins
351 //! or continues the advancement of simulation time and entity dynamics.
353
354 //! \brief Handles a request to pause the simulation
355 //! \param message The pause simulation message
356 //! \return Message result indicating how the message was handled
357 //!
358 //! Processes requests to pause the simulation, which freezes the advancement
359 //! of simulation time and entity dynamics while maintaining the current state.
361
362 //! \brief Handles a request to rewind the simulation
363 //! \param message The rewind simulation message
364 //! \return Message result indicating how the message was handled
365 //!
366 //! Processes requests to rewind the simulation to its initial state,
367 //! resetting all entities and simulation time to their starting conditions.
369 //! @}
370
371 //! \brief Entity control message handlers
372 //! @{
373
374 //! \brief Handles a request to create a new ownship entity
375 //! \param message The create new ownship message
376 //! \return Message result indicating how the message was handled
377 //!
378 //! Processes requests to create a new entity in the simulation that will be
379 //! directly controlled by the user. This typically creates the entity with
380 //! specific attributes and assigns control of it to the requesting player station.
382
383 //! \brief Handles a request to destroy an ownship entity
384 //! \param message The destroy ownship message
385 //! \return Message result indicating how the message was handled
386 //!
387 //! Processes requests to remove a user-controlled entity from the simulation.
388 //! This releases control of the entity and removes it from the simulation.
390
391 //! \brief Handles a request to take control of an existing entity
392 //! \param message The take control message
393 //! \return Message result indicating how the message was handled
394 //!
395 //! Processes requests to take control of an existing entity in the simulation.
396 //! This assigns control of the specified entity to the requesting player station.
398
399 //! \brief Handles a request to release control of an entity
400 //! \param message The release control message
401 //! \return Message result indicating how the message was handled
402 //!
403 //! Processes requests to release control of an entity. This removes the player
404 //! station's control over the entity but leaves the entity in the simulation.
406 //! @}
407
408 //! \brief Entity manipulation message handlers
409 //! @{
410
411 //! \brief Handles joystick input for entity control
412 //! \param msg The joystick input message
413 //! \return Message result indicating how the message was handled
414 //!
415 //! Processes joystick input messages and applies the corresponding
416 //! movement and control commands to the controlled entity.
418
419 //! \brief Handles a request to reset a player entity
420 //! \param msg The reset player message
421 //! \return Message result indicating how the message was handled
422 //!
423 //! Processes requests to reset a player entity to its initial state,
424 //! typically restoring its position, orientation, and other attributes.
426
427 //! \brief Handles a request to set an entity's location
428 //! \param msg The set location message
429 //! \return Message result indicating how the message was handled
430 //!
431 //! Processes requests to set the position of an entity in the simulation.
433
434 //! \brief Handles a request to set an entity's heading
435 //! \param msg The set heading message
436 //! \return Message result indicating how the message was handled
437 //!
438 //! Processes requests to set the heading (yaw) of an entity in the simulation.
440
441 //! \brief Handles a request to set an entity's pitch
442 //! \param msg The set pitch message
443 //! \return Message result indicating how the message was handled
444 //!
445 //! Processes requests to set the pitch of an entity in the simulation.
447
448 //! \brief Handles a request to set an entity's roll
449 //! \param msg The set roll message
450 //! \return Message result indicating how the message was handled
451 //!
452 //! Processes requests to set the roll of an entity in the simulation.
454
455 //! \brief Handles a request to set an entity's altitude
456 //! \param msg The set altitude message
457 //! \return Message result indicating how the message was handled
458 //!
459 //! Processes requests to set the altitude of an entity in the simulation.
461
462 //! \brief Handles an embark/disembark message
463 //! \param msg The embark message
464 //! \return Message result indicating how the message was handled
465 //!
466 //! Processes requests for an entity to embark into or disembark from another entity.
467 //! This typically involves human entities entering or exiting vehicles.
469
470 //! \brief Handles a request to set an entity's appearance
471 //! \param msg The set appearance message
472 //! \return Message result indicating how the message was handled
473 //!
474 //! Processes requests to change the visual appearance of an entity,
475 //! such as its model, markings, or other visual attributes.
477
478 //! \brief Handles a request to rename an entity
479 //! \param msg The rename message
480 //! \return Message result indicating how the message was handled
481 //!
482 //! Processes requests to change the name or marking text of an entity in the simulation.
484 //! @}
485 //! \brief Simulation state and task message handlers
486 //! @{
487
488 //! \brief Handles requests for simulation state information
489 //! \param msg The request simulation state message
490 //! \return Message result indicating how the message was handled
491 //!
492 //! Processes requests for the current state of the simulation and sends
493 //! a response with comprehensive simulation state information.
495
496 //! \brief Handles task-related messages
497 //! \param msg The VRF task message
498 //! \return Message result indicating how the message was handled
499 //!
500 //! Processes messages related to entity tasks, including task assignment,
501 //! modification, and cancellation. These tasks define the behaviors and
502 //! objectives for entities in the simulation.
504
505 //! \brief Handles data request messages
506 //! \param msg The set data requests message
507 //! \return Message result indicating how the message was handled
508 //!
509 //! Processes messages that configure what data should be regularly sent from
510 //! the VR-Forces backend to the VR-Engage client, such as entity updates,
511 //! sensor data, or other simulation information.
513
514 //! \brief Handles sensor-related messages
515 //! \param msg The VRF sensor message
516 //! \return Message result indicating how the message was handled
517 //!
518 //! Processes messages related to entity sensors, including sensor activation,
519 //! configuration, and mode changes. These control how entities detect and
520 //! track other entities in the simulation.
522
523 //! \brief Handles requests to set a laser code
524 //! \param msg The set laser code message
525 //! \return Message result indicating how the message was handled
526 //!
527 //! Processes messages to set a laser designation code for a weapon system,
528 //! which is used to guide laser-guided munitions to their targets.
530
531 //! \brief Handles scripted set messages
532 //! \param msg The scripted set message
533 //! \return Message result indicating how the message was handled
534 //!
535 //! Processes messages that contain sets of scripted commands or parameters
536 //! to be applied to entities or the simulation environment.
538 //! @}
539
540 //! \brief Entity action and equipment message handlers
541 //! @{
542
543 // These methods are commented out but kept for reference in future implementations
544 // virtual DtVreMessageResult handleCreateWaypoint(DtVreMessage* msg);
545 // virtual DtVreMessageResult handleCreateRoute(DtVreMessage* msg);
546
547 //! \brief Handles requests to set rules of engagement
548 //! \param msg The set rules of engagement message
549 //! \return Message result indicating how the message was handled
550 //!
551 //! Processes messages to configure an entity's rules of engagement, which
552 //! define when and how it can engage targets or respond to threats.
554
555 //! \brief Handles requests to trigger a simulation event
556 //! \param msg The trigger event message
557 //! \return Message result indicating how the message was handled
558 //!
559 //! Processes messages to trigger specific events in the simulation,
560 //! such as scripted actions, effects, or environmental changes.
562
563 //! \brief Handles requests to set an entity's light state
564 //! \param msg The set light state message
565 //! \return Message result indicating how the message was handled
566 //!
567 //! Processes messages to control an entity's lights, such as headlights,
568 //! running lights, or interior lighting.
570
571 //! \brief Handles requests to set a human entity's hand item
572 //! \param msg The set hand item message
573 //! \return Message result indicating how the message was handled
574 //!
575 //! Processes messages to change what item a human entity is holding,
576 //! such as a weapon, tool, or other equipment.
578
579 //! \brief Handles requests to track a specific laser code
580 //! \param msg The track laser code message
581 //! \return Message result indicating how the message was handled
582 //!
583 //! Processes messages to configure a weapon system to track a specific
584 //! laser designation code, typically used for guiding laser-guided munitions.
586 //! @}
587
588 //! \brief Subscription management message handlers
589 //! @{
590
591 //! \brief Handles requests to subscribe to radar warning receiver data
592 //! \param msg The RWR subscription message
593 //! \return Message result indicating how the message was handled
594 //!
595 //! Processes requests to subscribe to radar warning receiver (RWR) data,
596 //! which provides information about radar emissions detected by an entity.
598
599 //! \brief Handles requests to unsubscribe from radar warning receiver data
600 //! \param msg The RWR unsubscription message
601 //! \return Message result indicating how the message was handled
602 //!
603 //! Processes requests to stop receiving radar warning receiver (RWR) data.
605
606 //! \brief Handles requests to subscribe to sensor data
607 //! \param msg The sensor subscription message
608 //! \return Message result indicating how the message was handled
609 //!
610 //! Processes requests to subscribe to entity sensor data, which includes
611 //! information about detections and tracks from the entity's sensors.
613
614 //! \brief Handles requests to unsubscribe from sensor data
615 //! \param msg The sensor unsubscription message
616 //! \return Message result indicating how the message was handled
617 //!
618 //! Processes requests to stop receiving entity sensor data.
620
621 //! \brief Handles requests to subscribe to radar state data
622 //! \param msg The radar state subscription message
623 //! \return Message result indicating how the message was handled
624 //!
625 //! Processes requests to subscribe to radar state data, which includes
626 //! information about the operating parameters and mode of an entity's radar.
628
629 //! \brief Handles requests to unsubscribe from radar state data
630 //! \param msg The radar state unsubscription message
631 //! \return Message result indicating how the message was handled
632 //!
633 //! Processes requests to stop receiving radar state data.
635 //! @}
636
637 //! \brief Targeting and weapon system message handlers
638 //! @{
639
640 //! \brief Handles updates to designated targets
641 //! \param msg The designated targets update message
642 //! \return Message result indicating how the message was handled
643 //!
644 //! Processes messages that update the list of designated targets for
645 //! an entity's weapon systems or sensors.
647
648 //! \brief Handles requests to set an entity's mode and submode
649 //! \param msg The set mode and submode message
650 //! \return Message result indicating how the message was handled
651 //!
652 //! Processes messages to change an entity's operating mode and submode,
653 //! which affect its behavior, capabilities, and available actions.
655 //! @}
656
657 //! \brief Gimbal and sensor control message handlers
658 //! @{
659
660 //! \brief Handles requests to track a location with a gimbal system
661 //! \param msg The set gimbal track location message
662 //! \return Message result indicating how the message was handled
663 //!
664 //! Processes messages to direct a gimbal-mounted sensor or weapon to
665 //! track a specific geographic location.
667
668 //! \brief Handles requests to track an object with a gimbal system
669 //! \param msg The set gimbal track object message
670 //! \return Message result indicating how the message was handled
671 //!
672 //! Processes messages to direct a gimbal-mounted sensor or weapon to
673 //! track a specific entity or object in the simulation.
675
676 //! \brief Handles requests to set the tracking mode of a gimbal system
677 //! \param msg The set gimbal track mode message
678 //! \return Message result indicating how the message was handled
679 //!
680 //! Processes messages to change the tracking mode of a gimbal-mounted
681 //! sensor or weapon, such as manual, auto-track, or scan modes.
683
684 //! \brief Handles requests to set the sweep pattern of an antenna
685 //! \param msg The set antenna sweep message
686 //! \return Message result indicating how the message was handled
687 //!
688 //! Processes messages to configure the sweep pattern of a radar or
689 //! other scanning antenna, including parameters like azimuth, elevation,
690 //! and scan rate.
692 //! @}
693
694 //! \brief Environmental request handlers
695 //! @{
696
697 //! \brief Handles requests for wind information
698 //! \param msg The wind request message
699 //! \return Message result indicating how the message was handled
700 //!
701 //! Processes requests for current wind speed and direction information
702 //! from the simulation environment.
704
706
707 //! \brief Processes environment process discovery criteria
708 //! \param envProcess Pointer to the environment process to evaluate
709 //! \return True if the process meets the discovery criteria, false otherwise
710 //!
711 //! Evaluates whether an environment process (such as weather effects)
712 //! should be discovered and made available to the client. This allows
713 //! filtering of environment processes based on application-specific criteria.
714 virtual bool processEnvProcessDiscoveryCriteria(DtReflectedEnvironmentProcess* envProcess);
715 //! @}
716
717 //! \brief Status and query message handlers
718 //! @{
719
720 //! \brief Handles VR-Engage status messages
721 //! \param message The VRE status message
722 //! \return Message result indicating how the message was handled
723 //!
724 //! Processes status messages from VR-Engage clients, which typically
725 //! include information about the client's state, active entities, and
726 //! other operational parameters.
728
729 //! \brief Handles requests for entities by type
730 //! \param msg The request entities by type message
731 //! \return Message result indicating how the message was handled
732 //!
733 //! Processes requests to retrieve a list of entities of a specific type
734 //! from the simulation. Returns information about matching entities to
735 //! the requesting client.
737 //! @}
738
739 //! \brief Message callback methods
740 //! @{
741
742 //! \brief Static callback for radar warning receiver data messages
743 //! \param msg Pointer to the simulation message containing RWR data
744 //! \param usr Pointer to user data (typically the connector instance)
745 //!
746 //! Static callback function registered with the messaging system to receive
747 //! radar warning receiver data messages. Forwards the message to the
748 //! appropriate instance method for processing.
749 static void rwrDataMessageCallback(DtSimMessage* msg, void* usr);
750
751 //! \brief Processes radar warning receiver data messages
752 //! \param msg Pointer to the simulation message containing RWR data
753 //!
754 //! Processes radar warning receiver data messages from the VR-Forces backend
755 //! and forwards the information to subscribed clients.
756 virtual void processRwrDataMessage(DtSimMessage* msg);
757
758 //! \brief Commented-out sensor data callback methods
759 //!
760 //! These methods are commented out but kept for reference in future implementations
761 //! for handling VR-Forces sensor contact messages.
762 // static void sensorDataMessageCallback(DtSimMessage* msg, void* usr);
763 // virtual void processSensorDataMessage(DtSimMessage* msg);
764
765 //! \brief Static callback for radar data messages
766 //! \param msg Pointer to the simulation message containing radar data
767 //! \param usr Pointer to user data (typically the connector instance)
768 //!
769 //! Static callback function registered with the messaging system to receive
770 //! extended Player Station radar contact messages. Forwards the message to the
771 //! appropriate instance method for processing.
772 static void radarDataMessageCallback(DtSimMessage* msg, void* usr);
773
774 //! \brief Processes radar data messages
775 //! \param msg Pointer to the simulation message containing radar data
776 //!
777 //! Processes radar data messages from the VR-Forces backend, which include
778 //! information about radar contacts, and forwards the information to subscribed clients.
779 virtual void processRadarDataMessage(DtSimMessage* msg);
780
781 //! \brief Static callback for radar state data messages
782 //! \param msg Pointer to the simulation message containing radar state data
783 //! \param usr Pointer to user data (typically the connector instance)
784 //!
785 //! Static callback function registered with the messaging system to receive
786 //! radar state messages. Forwards the message to the appropriate instance method
787 //! for processing.
788 static void radarStateDataMessageCallback(DtSimMessage* msg, void* usr);
789
790 //! \brief Processes radar state data messages
791 //! \param msg Pointer to the simulation message containing radar state data
792 //!
793 //! Processes radar state messages from the VR-Forces backend, which include
794 //! information about radar operating parameters and modes, and forwards the
795 //! information to subscribed clients.
796 virtual void processRadarStateDataMessage(DtSimMessage* msg);
797
798 //! \brief Static callback for assign role player messages
799 //! \param msg Pointer to the simulation message containing role assignment data
800 //! \param usr Pointer to user data (typically the connector instance)
801 //!
802 //! Static callback function registered with the messaging system to receive
803 //! role player assignment messages. Forwards the message to the appropriate
804 //! instance method for processing.
805 static void assignRolePlayerMessageCallback(DtSimMessage* msg, void* usr);
806
807 //! \brief Processes assign role player messages
808 //! \param msg Pointer to the simulation message containing role assignment data
809 //!
810 //! Processes messages that assign a role to a player in the simulation,
811 //! which typically grants control of an entity to a specific player station.
812 virtual void processAssignRolePlayerMessage(DtSimMessage* msg);
813
814 //! \brief Static callback for unassign role player messages
815 //! \param msg Pointer to the simulation message containing role unassignment data
816 //! \param usr Pointer to user data (typically the connector instance)
817 //!
818 //! Static callback function registered with the messaging system to receive
819 //! role player unassignment messages. Forwards the message to the appropriate
820 //! instance method for processing.
821 static void unassignRolePlayerMessageCallback(DtSimMessage* msg, void* usr);
822
823 //! \brief Processes unassign role player messages
824 //! \param msg Pointer to the simulation message containing role unassignment data
825 //!
826 //! Processes messages that remove a role assignment from a player in the simulation,
827 //! which typically revokes control of an entity from a specific player station.
828 virtual void processUnassignRolePlayerMessage(DtSimMessage* msg);
829 //! @}
830
831 //! \brief Static callback for VRE status messages
832 //! \param msg Pointer to the simulation message containing VRE status data
833 //! \param usr Pointer to user data (typically the connector instance)
834 //!
835 //! Static callback function registered with the messaging system to receive
836 //! VR-Engage status messages. Forwards the message to the appropriate
837 //! instance method for processing.
838 static void vreStatusMessageCallback(DtSimMessage* msg, void* usr);
839
840 //! \brief Processes VRE status messages
841 //! \param msg Pointer to the simulation message containing VRE status data
842 //!
843 //! Processes VR-Engage status messages, which include information about
844 //! the state of VR-Engage clients and their controlled entities.
845 virtual void processVreStatusMessage(DtSimMessage* msg);
846
847 //! \brief Static callback for text report messages
848 //! \param msg Pointer to the VRF object message containing text report data
849 //! \param usr Pointer to user data (typically the connector instance)
850 //!
851 //! Static callback function registered with the messaging system to receive
852 //! text report messages. Forwards the message to the appropriate instance
853 //! method for processing.
854 static void textReportCallback(const DtVrfObjectMessage* msg, void* usr);
855
856 //! \brief Processes text report messages
857 //! \param msg Pointer to the VRF object message containing text report data
858 //!
859 //! Processes text report messages from the VR-Forces backend, which typically
860 //! contain status reports or notifications about simulation events.
861 virtual void processTextReport(const DtVrfObjectMessage* msg);
862
863 //! \brief Static callback for tactical data link track list messages
864 //! \param msg Pointer to the simulation message containing TDL track list data
865 //! \param usr Pointer to user data (typically the connector instance)
866 //!
867 //! Static callback function registered with the messaging system to receive
868 //! tactical data link track list messages. Forwards the message to the
869 //! appropriate instance method for processing.
870 static void vreTdlTrackListCallback(DtSimMessage* msg, void* usr);
871
872 //! \brief Processes tactical data link track list messages
873 //! \param msg Pointer to the simulation message containing TDL track list data
874 //!
875 //! Processes tactical data link track list messages, which contain information
876 //! about tracks shared over tactical data links such as Link 16.
877 virtual void processVreTdlTrackList(DtSimMessage* msg);
878
879 //! \brief Static callback for tactical data link engagement status messages
880 //! \param msg Pointer to the simulation message containing TDL engagement status data
881 //! \param usr Pointer to user data (typically the connector instance)
882 //!
883 //! Static callback function registered with the messaging system to receive
884 //! tactical data link engagement status messages. Forwards the message to the
885 //! appropriate instance method for processing.
886 static void vreTdlEngagementStatusCallback(DtSimMessage* msg, void* usr);
887
888 //! \brief Processes tactical data link engagement status messages
889 //! \param msg Pointer to the simulation message containing TDL engagement status data
890 //!
891 //! Processes tactical data link engagement status messages, which contain
892 //! information about weapon engagements shared over tactical data links.
893 virtual void processVreTdlEngagementStatus(DtSimMessage* msg);
894
895 //! \brief Static callback for interface load complete messages
896 //! \param msg Pointer to the simulation message containing load complete data
897 //! \param usr Pointer to user data (typically the connector instance)
898 //!
899 //! Static callback function registered with the messaging system to receive
900 //! interface load complete messages. Forwards the message to the appropriate
901 //! instance method for processing.
902 static void ifLoadCompleteMessageCallback(DtSimMessage* msg, void* usr);
903
904 //! \brief Processes interface load complete messages
905 //! \param msg Pointer to the simulation message containing load complete data
906 //!
907 //! Processes messages indicating that a scenario has finished loading in the
908 //! VR-Forces backend. This typically triggers follow-up actions such as
909 //! verifying entity creation requests.
910 virtual void processLoadCompleteMessage(DtSimMessage* msg);
911
912public:
913 //! \brief Static backend remapping callback
914 //! \param map Pointer to the backend map to update
915 //! \param expectedBackends Set of expected backend simulation addresses
916 //! \param usr Pointer to user data (typically the connector instance)
917 //! \return True if remapping was successful, false otherwise
918 //!
919 //! Static callback function used to remap backend addresses in the simulation.
920 //! This is typically used when backend addresses change or when redirecting
921 //! communication to different backends.
922 static bool backendRemapper(DtBackendMap* map, const std::set<DtSimulationAddress>& expectedBackends, void* usr);
923
924protected:
925 //! \brief Remaps backend addresses for redirection
926 //! \param map Pointer to the backend map to update
927 //! \param expectedBackends Set of expected backend simulation addresses
928 //! \return True if remapping was successful, false otherwise
929 //!
930 //! Updates the backend map to redirect communication to appropriate backend
931 //! addresses. This is typically called when backend addresses change or when
932 //! network topology is reconfigured.
933 virtual bool remapBackends(DtBackendMap* map, const std::set<DtSimulationAddress>& expectedBackends);
934
935 //! \brief Looks up reflected entity information by entity identifier
936 //! \param entityId The entity identifier to search for
937 //! \return Pointer to the reflected entity info, or NULL if not found
938 //!
939 //! Searches for and returns information about a reflected entity with the
940 //! specified entity identifier. This provides access to essential entity
941 //! information such as type, UUID, and marking text.
942 virtual DtReflectedExtEntityInfo* lookupReflectedEntityInfo(const DtEntityIdentifier& entityId);
943
944 //! \brief Looks up a UUID by entity identifier
945 //! \param entityId The entity identifier to search for
946 //! \return The UUID associated with the entity, or a null UUID if not found
947 //!
948 //! Retrieves the universally unique identifier (UUID) associated with the
949 //! specified entity identifier. This is used to uniquely identify entities
950 //! across distributed simulations.
951 virtual DtUUID lookupUUID(const DtEntityIdentifier& entityId);
952
953 //! \brief Finds a UUID for a reflected entity
954 //! \param reflectedEntity Pointer to the reflected entity
955 //! \return The UUID associated with the entity, or a null UUID if not found
956 //!
957 //! Retrieves the universally unique identifier (UUID) associated with the
958 //! specified reflected entity object. This is used when only the entity object
959 //! is available, not its identifier.
960 //! \note Currently no easy accessor for this. TODO fix lookup for non-VRF simulated entities.
961 virtual DtUUID findUUID(DtReflectedExtEntity* reflectedEntity);
962
963 //! \brief Finds an entity identifier from a UUID
964 //! \param uuid The UUID to search for
965 //! \return The entity identifier associated with the UUID, or a null identifier if not found
966 //!
967 //! Performs the reverse lookup of lookupUUID, finding the entity identifier
968 //! associated with a given universally unique identifier.
969 virtual DtEntityIdentifier findEntityIdFromUUID(const DtUUID& uuid);
970
971 //! \brief Sends interface content to the VR-Forces backend
972 //! \param content The interface content to send
973 //!
974 //! Transmits interface content to the VR-Forces backend, which may include
975 //! commands, queries, or data updates. This is a low-level method typically
976 //! called by higher-level message handling methods.
977 virtual void sendInterfaceContent(const DtSimInterfaceContent& content);
978
979 //! \brief Control set management methods
980 //! @{
981
982 //! \brief Finds a control set for a specific entity
983 //! \param entityId The entity identifier to search for
984 //! \return Pointer to the found control set, or NULL if not found
985 //!
986 //! Searches for and returns the control set associated with the specified entity.
987 //! A control set defines what capabilities are available for controlling the entity.
988 virtual ControlSet* findControlSet(const DtEntityIdentifier& entityId);
989
990 //! \brief Adds a new control set for an entity
991 //! \param entityId The entity identifier to create a control set for
992 //! \return Pointer to the newly created control set
993 //!
994 //! Creates and returns a new control set for the specified entity.
995 //! This is typically called when an entity becomes available for control.
996 virtual ControlSet* addControlSet(const DtEntityIdentifier& entityId);
997
998 //! \brief Removes a control set for an entity
999 //! \param entityId The entity identifier to remove the control set for
1000 //! \return True if the control set was found and removed, false otherwise
1001 //!
1002 //! Removes the control set associated with the specified entity.
1003 //! This is typically called when an entity is no longer available for control.
1004 virtual bool removeControlSet(const DtEntityIdentifier& entityId);
1005 //! @}
1006
1007 //! \brief Status update methods
1008 //! @{
1009
1010 //! \brief Updates the internal backend status information
1011 //!
1012 //! Retrieves and updates the current status of the VR-Forces backend,
1013 //! including connection state, load state, and operational parameters.
1014 virtual void updateBackendStatus();
1015
1016 //! \brief Updates the internal session status information
1017 //!
1018 //! Retrieves and updates the current status of the simulation session,
1019 //! including play state, time, and active entities.
1020 virtual void updateSessionStatus();
1021
1022 //! \brief Sends a message with current backend status
1023 //!
1024 //! Creates and sends a message containing the current backend status
1025 //! information to subscribed components.
1027
1028 //! \brief Sends a message with current session status
1029 //!
1030 //! Creates and sends a message containing the current session status
1031 //! information to subscribed components.
1033
1034 //! \brief Sends a message with the current session play state
1035 //!
1036 //! Creates and sends a message containing the current session play state
1037 //! (running, paused, or stopped) to subscribed components.
1038 virtual void sendSessionPlayState();
1039
1040 //! \brief Sends a message with the current session SMS list
1041 //!
1042 //! Creates and sends a message containing the current list of simulation
1043 //! model sets (SMS) in the session to subscribed components.
1044 virtual void sendSessionSmsUpdate();
1045 //! @}
1046
1047 //! \brief Entity creation and management methods
1048 //! @{
1049
1050 //! \brief Verifies that a new ownship entity was created successfully
1051 //!
1052 //! Checks whether a previously requested ownship entity creation was successful.
1053 //! If the entity exists, it clears any pending creation flags. If the entity
1054 //! does not exist but should, it may trigger a new creation request.
1055 virtual void verifyNewOwnship();
1056
1057 //! \brief Sends a request to create a new ownship entity
1058 //!
1059 //! Creates and sends a message requesting the creation of a new ownship entity
1060 //! in the simulation based on previously stored creation parameters.
1061 virtual void sendCreateNewOwnship();
1062
1063 //! \brief Sends a request to delete an ownship entity
1064 //!
1065 //! Creates and sends a message requesting the deletion of a previously created
1066 //! ownship entity from the simulation.
1067 virtual void sendDeleteNewOwnship();
1068 //! @}
1069
1070 //! \brief Checks if the VR-Engage backend exists
1071 //! \return True if the VRE backend exists, false otherwise
1072 //!
1073 //! Determines whether a VR-Engage backend is present in the simulation
1074 //! by checking for its simulation address.
1075 virtual bool doesVreBackendExist() const;
1076
1077 //! \brief Calls virtual method of similar name when backend is discovered
1078 //! \return None
1079 static void BackendDiscovered(const DtSimulationAddress&, void* usr);
1080
1081 //! \brief Adds to internal simulation addresses, and, if the backend we want to launch is
1082 //! using an already discovered address, change it
1083 //! \return None
1084 virtual void processBackendDiscovered(const DtSimulationAddress&);
1085
1086 //! \brief Calls virtual method of similar name when backend is removed
1087 //! \return None
1088 static void BackendRemoved(const DtSimulationAddress&, void* usr);
1089
1090 //! \brief Removes from internal simulation addresses
1091 //! \return None
1092 virtual void processBackendRemoved(const DtSimulationAddress&);
1093protected:
1094 //! \brief Pointer to the VRF message interface
1095 DtVrfMessageInterface* myVrfMessageInterface;
1096
1097 //! \brief Pointer to the reflected extended entity list
1098 DtReflectedExtEntityList* myReflectedEntityList;
1099
1100 //! \brief Pointer to the VRF remote controller
1101 makVrf::DtVrlinkVrfRemoteController* myVrfRemoteController;
1102
1103 //! \brief Cached information about the last reflected entity lookup
1105
1106 //! \brief Pointer to the reflected control object list
1107 DtReflectedControlObjectList* myReflectedControlObjectList;
1108
1109 //! \brief Current session status data
1111
1112 //! \brief Flag indicating whether the session is playing
1114
1115 //! \brief Set of simulation model sets in the current session
1116 std::set<std::string> mySessionSmsList;
1117
1118 //! \brief Simulation address of the VRE backend
1119 DtSimulationAddress myVreBackend;
1122
1123 //! \brief Initial simulation address used when starting the backend
1124 DtSimulationAddress myBackendStartingAddress;
1125
1126 //! \brief Last known backend status data
1128
1129 //! \brief Flag indicating whether this backend is the hosting backend
1131
1132 //! \brief Message describing a new ownship entity to create
1134
1135 //! \brief Information about the created entity
1137
1138 //! \brief Flag indicating whether we're waiting for an ownship to be deleted
1140
1141 //! \brief Flag indicating whether we're waiting for a new ownship to be created
1143
1144 //! \brief Flag indicating whether a newly created ownship needs repositioning
1146
1147 //! \brief Current laser code for laser designation
1149
1150 //! \brief Vector of control sets for managed entities
1151 std::vector<ControlSet*> myControlSets;
1152
1153 //! \brief Last recorded wind speed
1155
1156 //! \brief Last recorded wind direction
1158
1159 //! \brief Unique identifier for this connector instance
1160 unsigned int myId;
1161
1162 //! \brief Cached waypoint target information
1163 //!
1164 //! Stores entity ID and position for waypoint targets which may not be
1165 //! displayed, so their position will need to be updated manually
1166 std::pair<DtEntityIdentifier, DtVector> myWaypointTarget;
1167
1168 //! list of existing back-end address. We will change our internal starting address if there
1169 //! is a similar one to prevent duplicates
1170 std::set<DtSimulationAddress> mySimulationAddresses;
1171};
1172} // namespace makVre
Definition createNewOwnship.h:31
Base class for all simulation event connectors in VREngage.
Definition simEventConnector.h:54
virtual std::string name()
Gets the connector name.
Definition connector.h:64
Top-level class representing the VR-Engage application.
Definition playerStationApp.h:163
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
unsigned int myId
Unique identifier for this connector instance.
Definition vrfRemoteControlConnector.h:1160
virtual DtVreMessageResult handleSetAltitude(DtVreMessage *msg)
Handles a request to set an entity's altitude.
virtual DtUUID findUUID(DtReflectedExtEntity *reflectedEntity)
Finds a UUID for a reflected entity.
virtual void updateBackendStatus()
Status update methods.
DtVrfMessageInterface * myVrfMessageInterface
Pointer to the VRF message interface.
Definition vrfRemoteControlConnector.h:1095
virtual void processBackendDiscovered(const DtSimulationAddress &)
Adds to internal simulation addresses, and, if the backend we want to launch is using an already disc...
virtual DtVreMessageResult handleSetRulesOfEngagement(DtVreMessage *msg)
Entity action and equipment message handlers.
virtual DtVreMessageResult handleSessionPlayStateRequest(DtVreMessage *message)
Handles a request for the session play state.
virtual DtVreMessageResult handleCreateNewOwnship(DtVreMessage *message)
Entity control message handlers.
virtual DtVreMessageResult handleVrfSensorMessages(DtVreMessage *msg)
Handles sensor-related messages.
virtual void processAssignRolePlayerMessage(DtSimMessage *msg)
Processes assign role player messages.
virtual void sendInterfaceContent(const DtSimInterfaceContent &content)
Sends interface content to the VR-Forces backend.
DtReflectedExtEntityInfo * myCachedReflectedEntityInfo
Cached information about the last reflected entity lookup.
Definition vrfRemoteControlConnector.h:1104
virtual DtVreMessageResult handleRadarStateSubscription(DtVreMessage *msg)
Handles requests to subscribe to radar state data.
virtual DtVreMessageResult handleVrfRewind(DtVreMessage *message)
Handles a request to rewind the simulation.
DtSimulationAddress myVreBackend
Simulation address of the VRE backend.
Definition vrfRemoteControlConnector.h:1119
virtual DtVreMessageResult handleSetPitch(DtVreMessage *msg)
Handles a request to set an entity's pitch.
static void textReportCallback(const DtVrfObjectMessage *msg, void *usr)
Static callback for text report messages.
virtual DtEntityIdentifier findEntityIdFromUUID(const DtUUID &uuid)
Finds an entity identifier from a UUID.
virtual DtVreMessageResult handleSetDefaultSmsList(DtVreMessage *message)
Handles a request to set the default SMS list.
virtual void handleLocalEntityCreated(const DtString &name, const DtEntityIdentifier &id, const DtUUID &uuid)
Handles the creation of a local entity.
virtual void sendCreateNewOwnship()
Sends a request to create a new ownship entity.
virtual DtVreMessageResult handleWindRequest(DtVreMessage *msg)
Environmental request handlers.
virtual DtVreMessageResult handleSensorSubscription(DtVreMessage *msg)
Handles requests to subscribe to sensor data.
virtual DtVreMessageResult handleVrfSessionStatusRequest(DtVreMessage *message)
Session status and configuration message handlers.
CreateNewOwnshipMessage * myDesiredCreateEntityMessage
Message describing a new ownship entity to create.
Definition vrfRemoteControlConnector.h:1133
virtual DtVreMessageResult handleSetAppearanceMessage(DtVreMessage *msg)
Handles a request to set an entity's appearance.
virtual DtReflectedExtEntityInfo * lookupReflectedEntityInfo(const DtEntityIdentifier &entityId)
Looks up reflected entity information by entity identifier.
virtual bool removeControlSet(const DtEntityIdentifier &entityId)
Removes a control set for an entity.
virtual DtVreMessageResult handleSetGimbalTrackMode(DtVreMessage *msg)
Handles requests to set the tracking mode of a gimbal system.
virtual bool doesVreBackendExist() const
Checks if the VR-Engage backend exists.
virtual bool processEnvProcessDiscoveryCriteria(DtReflectedEnvironmentProcess *envProcess)
Processes environment process discovery criteria.
static void BackendDiscovered(const DtSimulationAddress &, void *usr)
Calls virtual method of similar name when backend is discovered.
bool myWaitingForOwnshipDelete
Flag indicating whether we're waiting for an ownship to be deleted.
Definition vrfRemoteControlConnector.h:1139
virtual DtVreMessageResult handleSetHeading(DtVreMessage *msg)
Handles a request to set an entity's heading.
virtual DtVreMessageResult handleSensorUnsubscription(DtVreMessage *msg)
Handles requests to unsubscribe from sensor data.
virtual DtVreMessageResult handleScriptedSet(DtVreMessage *msg)
Handles scripted set messages.
virtual DtVreMessageResult handleVrfTaskMessages(DtVreMessage *msg)
Handles task-related messages.
virtual void install(DtPlayerStationApp *app, DtCommunicationManager *communicationManager, makVrv::DT_PROTOCOL_NAMESPACE::DtVrlinkConnection *connection, int vrfSessionId)
Installs the VRF remote control connector with the application and connection.
virtual DtVreMessageResult handleRwrUnsubscription(DtVreMessage *msg)
Handles requests to unsubscribe from radar warning receiver data.
static void BackendRemoved(const DtSimulationAddress &, void *usr)
Calls virtual method of similar name when backend is removed.
virtual void processLoadCompleteMessage(DtSimMessage *msg)
Processes interface load complete messages.
double mySnapshotSimTime
Definition vrfRemoteControlConnector.h:1121
bool myWaitingForOwnshipCreate
Flag indicating whether we're waiting for a new ownship to be created.
Definition vrfRemoteControlConnector.h:1142
static void vreStatusMessageCallback(DtSimMessage *msg, void *usr)
Static callback for VRE status messages.
DtReflectedExtEntityInfo myCreatedEntityInfo
Information about the created entity.
Definition vrfRemoteControlConnector.h:1136
DtVrfRemoteControlConnector()
Default constructor.
virtual DtVreMessageResult handleSessionSmsListRequest(DtVreMessage *message)
Handles a request for the session simulation model set list.
virtual DtVreMessageResult handleSetAntennaSweep(DtVreMessage *msg)
Handles requests to set the sweep pattern of an antenna.
static void radarStateDataMessageCallback(DtSimMessage *msg, void *usr)
Static callback for radar state data messages.
static bool backendRemapper(DtBackendMap *map, const std::set< DtSimulationAddress > &expectedBackends, void *usr)
Static backend remapping callback.
makVrf::DtVrlinkVrfRemoteController * myVrfRemoteController
Pointer to the VRF remote controller.
Definition vrfRemoteControlConnector.h:1101
static void vreTdlEngagementStatusCallback(DtSimMessage *msg, void *usr)
Static callback for tactical data link engagement status messages.
virtual void processRadarDataMessage(DtSimMessage *msg)
Processes radar data messages.
virtual void sendDeleteNewOwnship()
Sends a request to delete an ownship entity.
virtual DtVreMessageResult handleDesignatedTargetsUpdate(DtVreMessage *msg)
Targeting and weapon system message handlers.
virtual DtVreMessageResult handleSetModeAndSubmode(DtVreMessage *msg)
Handles requests to set an entity's mode and submode.
virtual void sendSessionStatusMessage()
Sends a message with current session status.
DtReflectedExtEntityList * myReflectedEntityList
Pointer to the reflected extended entity list.
Definition vrfRemoteControlConnector.h:1098
virtual DtUUID lookupUUID(const DtEntityIdentifier &entityId)
Looks up a UUID by entity identifier.
static void vreTdlTrackListCallback(DtSimMessage *msg, void *usr)
Static callback for tactical data link track list messages.
virtual makVrf::DtVrlinkVrfRemoteController * vrfRemoteController()
Gets the VRF remote controller.
virtual DtVreMessageResult handleTrackLaserCode(DtVreMessage *msg)
Handles requests to track a specific laser code.
VrfSessionStatusMessage::VrfSessionStatusData mySessionStatus
Current session status data.
Definition vrfRemoteControlConnector.h:1110
virtual void processChatEvent(const makVrfEvents::DtEvent &evt)
Chat message handling methods.
virtual DtVreMessageResult handleSetGimbalTrackLocation(DtVreMessage *msg)
Gimbal and sensor control message handlers.
virtual DtVreMessageResult handleSetGimbalTrackObject(DtVreMessage *msg)
Handles requests to track an object with a gimbal system.
virtual void verifyNewOwnship()
Entity creation and management methods.
virtual DtVreMessageResult handleEmbarkMessage(DtVreMessage *msg)
Handles an embark/disembark message.
virtual DtVreMessageResult handleChatEvent(DtVreMessage *message)
Handles a chat message from VR-Engage.
virtual void processResourceResponse(const makVrfEvents::DtEvent &evt)
Processes a resource response event.
std::vector< ControlSet * > myControlSets
Vector of control sets for managed entities.
Definition vrfRemoteControlConnector.h:1151
virtual void processUnassignRolePlayerMessage(DtSimMessage *msg)
Processes unassign role player messages.
virtual void handleActionMenuControlObjectRemoved(DtReflectedControlObject *obj)
Handles removal of an action menu control object.
virtual ~DtVrfRemoteControlConnector() override
Virtual destructor.
std::set< DtSimulationAddress > mySimulationAddresses
list of existing back-end address. We will change our internal starting address if there is a similar...
Definition vrfRemoteControlConnector.h:1170
virtual void tick() override
Performs periodic processing of backend and session status.
virtual void sendSessionSmsUpdate()
Sends a message with the current session SMS list.
virtual void updateSessionStatus()
Updates the internal session status information.
virtual void handleActionMenuControlObjectDiscovered(DtReflectedControlObject *obj)
Handles discovery of an action menu control object.
virtual DtVreMessageResult handleVrfSetDataRequests(DtVreMessage *msg)
Handles data request messages.
virtual DtVreMessageResult handleJoystick(DtVreMessage *msg)
Entity manipulation message handlers.
virtual void handleSensorUpdate(DtIfSensorData *sensorData)
Handles sensor update data.
virtual DtVreMessageResult handleSetLaserCode(DtVreMessage *msg)
Handles requests to set a laser code.
virtual DtVreMessageResult handleSetRoll(DtVreMessage *msg)
Handles a request to set an entity's roll.
virtual ControlSet * findControlSet(const DtEntityIdentifier &entityId)
Control set management methods.
virtual DtVreMessageResult handleRadarStateUnsubscription(DtVreMessage *msg)
Handles requests to unsubscribe from radar state data.
virtual void processRwrDataMessage(DtSimMessage *msg)
Processes radar warning receiver data messages.
virtual DtVreMessageResult handleVrfReleaseControlOf(DtVreMessage *message)
Handles a request to release control of an entity.
virtual DtVreMessageResult handleVreStatus(DtVreMessage *message)
Status and query message handlers.
virtual DtVreMessageResult handleSetBackendConfig(DtVreMessage *message)
Backend management message handlers.
virtual DtVreMessageResult handleRequestBackendStatus(DtVreMessage *message)
Handles a request for backend status.
virtual void processBackendRemoved(const DtSimulationAddress &)
Removes from internal simulation addresses.
virtual DtVreMessageResult handleStopBackend(DtVreMessage *message)
Handles a request to stop the backend.
virtual DtVreMessageResult handleRenameMessage(DtVreMessage *msg)
Handles a request to rename an entity.
virtual void sendBackendStatusMessage()
Sends a message with current backend status.
virtual DtVreMessageResult handleSetLocation(DtVreMessage *msg)
Handles a request to set an entity's location.
virtual DtVreMessageResult handleLoadBackend(DtVreMessage *message)
Handles a request to load a scenario into the backend.
virtual void processTextReport(const DtVrfObjectMessage *msg)
Processes text report messages.
virtual DtVreMessageResult handleTriggerEvent(DtVreMessage *msg)
Handles requests to trigger a simulation event.
virtual void handleEntityRemoved(const DtReflectedExtEntity *entity)
Handles removal of an entity from the simulation.
virtual DtVreMessageResult handleResetPlayer(DtVreMessage *msg)
Handles a request to reset a player entity.
virtual DtReflectedEntityList * reflectedEntityList()
Gets the reflected entity list.
virtual DtVreMessageResult handleDestroyNewOwnship(DtVreMessage *message)
Handles a request to destroy an ownship entity.
std::pair< DtEntityIdentifier, DtVector > myWaypointTarget
Cached waypoint target information.
Definition vrfRemoteControlConnector.h:1166
static void unassignRolePlayerMessageCallback(DtSimMessage *msg, void *usr)
Static callback for unassign role player messages.
virtual void processVreTdlTrackList(DtSimMessage *msg)
Processes tactical data link track list messages.
int myLaserCode
Current laser code for laser designation.
Definition vrfRemoteControlConnector.h:1148
double myLastWindSpeed
Last recorded wind speed.
Definition vrfRemoteControlConnector.h:1154
virtual bool remapBackends(DtBackendMap *map, const std::set< DtSimulationAddress > &expectedBackends)
Remaps backend addresses for redirection.
virtual void processVreStatusMessage(DtSimMessage *msg)
Processes VRE status messages.
virtual void sendSessionPlayState()
Sends a message with the current session play state.
bool myTookSnapshot
Definition vrfRemoteControlConnector.h:1120
virtual DtVreMessageResult handleVrfPause(DtVreMessage *message)
Handles a request to pause the simulation.
DtSimulationAddress myBackendStartingAddress
Initial simulation address used when starting the backend.
Definition vrfRemoteControlConnector.h:1124
double myLastWindDirection
Last recorded wind direction.
Definition vrfRemoteControlConnector.h:1157
std::set< std::string > mySessionSmsList
Set of simulation model sets in the current session.
Definition vrfRemoteControlConnector.h:1116
virtual DtVreMessageResult handleRwrSubscription(DtVreMessage *msg)
Subscription management message handlers.
virtual DtVreMessageResult handleStartBackend(DtVreMessage *message)
Handles a request to start the backend.
virtual DtVreMessageResult handleSetStateProperties(DtVreMessage *msg)
Environmental request handlers.
static void assignRolePlayerMessageCallback(DtSimMessage *msg, void *usr)
Static callback for assign role player messages.
BackendStatusMessage::BackendStatusData myLastBackendStatus
Last known backend status data.
Definition vrfRemoteControlConnector.h:1127
virtual DtVreMessageResult handleSetHandItem(DtVreMessage *msg)
Handles requests to set a human entity's hand item.
static void radarDataMessageCallback(DtSimMessage *msg, void *usr)
Commented-out sensor data callback methods.
virtual DtVreMessageResult handleVrfRun(DtVreMessage *message)
Simulation control message handlers.
bool myBackendIsHost
Flag indicating whether this backend is the hosting backend.
Definition vrfRemoteControlConnector.h:1130
virtual void handleEntityAdded(const DtReflectedExtEntity *entity)
Handles addition of an entity to the simulation.
virtual DtVreMessageResult handleVrfTakeControlOf(DtVreMessage *message)
Handles a request to take control of an existing entity.
virtual DtVreMessageResult handleRequestEntitiesByType(DtVreMessage *msg)
Handles requests for entities by type.
virtual void processVreTdlEngagementStatus(DtSimMessage *msg)
Processes tactical data link engagement status messages.
DtReflectedControlObjectList * myReflectedControlObjectList
Pointer to the reflected control object list.
Definition vrfRemoteControlConnector.h:1107
virtual void processRadarStateDataMessage(DtSimMessage *msg)
Processes radar state data messages.
virtual void shutdown() override
Shuts down the VRF remote control connector.
bool myCreatedOwnshipNeedsReposition
Flag indicating whether a newly created ownship needs repositioning.
Definition vrfRemoteControlConnector.h:1145
bool mySessionIsPlaying
Flag indicating whether the session is playing.
Definition vrfRemoteControlConnector.h:1113
virtual DtVreMessageResult handleSetLightState(DtVreMessage *msg)
Handles requests to set an entity's light state.
static void ifLoadCompleteMessageCallback(DtSimMessage *msg, void *usr)
Static callback for interface load complete messages.
static void rwrDataMessageCallback(DtSimMessage *msg, void *usr)
Message callback methods.
virtual ControlSet * addControlSet(const DtEntityIdentifier &entityId)
Adds a new control set for an entity.
virtual DtVreMessageResult handleRequestSimulationStateMessage(DtVreMessage *msg)
Simulation state and task message handlers.
Defines export macros and protocol namespace for vrePlayerStationConnector.
#define VRL_DLL
Empty definition for non-Windows platforms.
Definition export.h:52
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Definition vrfRemoteControlConnector.h:87
Definition connectorAccessory.h:39
Defines the base DtSimEventConnector class for VREngage simulation events.
Structure containing entity control capabilities.
Definition vrfRemoteControlConnector.h:118
std::set< DtString > functionGroups
Set of function groups available for this entity.
Definition vrfRemoteControlConnector.h:132
DtEntityIdentifier entityId
Entity identifier.
Definition vrfRemoteControlConnector.h:129
ControlSet()
Default constructor.
Definition vrfRemoteControlConnector.h:122
std::vector< std::string > roles
Vector of roles available for this entity.
Definition vrfRemoteControlConnector.h:135
bool valid()
Checks if the control set is valid.
Definition vrfRemoteControlConnector.h:126
Structure containing information about a reflected extended entity.
Definition vrfRemoteControlConnector.h:99
DtUUID myUUID
Universally unique identifier for the entity.
Definition vrfRemoteControlConnector.h:107
DtEntityIdentifier myEntityId
Entity identifier.
Definition vrfRemoteControlConnector.h:101
DtString myMarkingText
Marking text (name/label) for the entity.
Definition vrfRemoteControlConnector.h:110
DtEntityType myEntityType
Entity type information.
Definition vrfRemoteControlConnector.h:104