VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
iffComponent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 1992-2026 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
6 // iffComponent.h - encapsulates IFF systems for DtVehicleSim
7 
8 #pragma once
9 
10 #include <vl/exerciseConn.h>
11 #if DtDIS
12 #include <vl/iffAtcNavaidsPdu.h>
13 #endif
14 
15 // Forward declarations to minimize header dependencies
16 class DtIffPublisher;
17 class DtReflectedIffList;
18 class DtReflectedIff;
19 
20 class DtVehicleSim;
23 #if DtHLA
25  class DtReplyInteraction;
26 #endif
27 
29 {
30 public:
33 
36 
38 
39  void enable();
42  void disable();
44  void toggle();
46  void tick(double dt);
48 
50 
51  void enableLethal();
54  void disableLethal();
56  void toggleLethal();
57 
61 
64 
65 protected:
67 
72 
74  bool enabled() const { return myEnabled; }
76  bool lethalEnabled() const { return myLethalEnabled; }
78 
80 
81  static void theLethalInterrogationCb(DtInterrogationInteraction* inter, void* self);
84  static void theIffReplyCb(DtReplyInteraction* inter, void* self);
86  static void iffAddedCb(DtReflectedIff* obj, void* userData);
88  static void iffRemovedCb(DtReflectedIff* obj, void* userData);
90  static void printIff(DtReflectedIff* obj, void* userData);
92 
93 protected:
95 
96 
103 
105 
110 
112  bool myEnabled;
115 };
void enable()
Lifecycle control for IFF transponder and interrogator.
DtReflectedEntityList * myRel
Owning vehicle, shared context, publishers, and reflected objects.
Definition: iffComponent.h:100
DtExerciseConn * myExConn
Owning vehicle, shared context, publishers, and reflected objects.
Definition: iffComponent.h:99
class DtIffPublisher:
Definition: iffPublisherHLA.h:24
class DtReflectedIff:
Definition: reflectedIffHLA.h:42
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:62
void sendLethalInterrogation(const DtGlobalObjectDesignator &tg)
Send a lethal IFF interrogation to a specific target entity.
DtReflectedIffList * myRefIffList
IFF publishers and list of reflected IFF objects in the exercise.
Definition: iffComponent.h:108
Instances of DtReplyInteraction are used to store state data for IFFEmission.Reply interactions...
Definition: replyInteractionHLA.h:29
DtIffPublisher * myIffInterrogatorPub
IFF publishers and list of reflected IFF objects in the exercise.
Definition: iffComponent.h:107
Part of the F18 example.
Definition: f18/vehicleSim.h:29
static void iffRemovedCb(DtReflectedIff *obj, void *userData)
Callback when a reflected IFF object is removed from the list.
void disable()
Disable the IFF transponder and interrogator publishers.
static void printIff(DtReflectedIff *obj, void *userData)
Optional callback for printing reflected IFF state when it changes.
void processLethalInterrogation(DtInterrogationInteraction *inter)
Internal processing helpers and state accessors.
Definition: iffComponent.h:28
void toggleLethal()
Toggle lethal interrogation capability.
static void iffAddedCb(DtReflectedIff *obj, void *userData)
Callback when a reflected IFF object is added to the list.
void disableLethal()
Disable lethal (Mode 5) interrogation capability.
DtIffPublisher * myIffTransponderPub
IFF publishers and list of reflected IFF objects in the exercise.
Definition: iffComponent.h:106
void sendMode5Interrogation(const DtGlobalObjectDesignator &tg)
Send a non-lethal Mode 5 interrogation to a specific target entity.
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
DtVehicleSim * myOwner
Owning vehicle, shared context, publishers, and reflected objects.
Definition: iffComponent.h:98
~DtIffComponent()
Destructor.
Instances of DtReflectedEntityList are used to manage remote entities from the network.
Definition: reflectedEntityListHLA.h:38
This file provides protocol to independence DtExerciseConn.
static void theLethalInterrogationCb(DtInterrogationInteraction *inter, void *self)
Static callbacks used to hook IFF interactions and reflected IFF objects.
static void theIffReplyCb(DtReplyInteraction *inter, void *self)
Callback used to receive replies to interrogations.
void processInterrogationReply(DtReplyInteraction *inter)
Process replies to interrogations sent by this component.
An instance of this class manages the list of &quot;IFF&quot; objects that are simulated remotely, and reflected to us by the RTI.
Definition: reflectedIffListHLA.h:28
void toggle()
Toggle IFF system on or off.
Instances of DtInterrogationInteraction are used to store state data for IFFEmission.Interrogation interactions.
Definition: interrogationInteractionHLA.h:29
DtIffComponent(DtVehicleSim *owner, DtExerciseConn *conn, DtReflectedEntityList *rel, DtEntityStateRepository *esr)
Construct an IFF component bound to a vehicle and its state/network context.
void enableLethal()
Control and use lethal (Mode 5) interrogation capability.
bool myEnabled
Local flags controlling IFF and lethal-mode state.
Definition: iffComponent.h:112
DtEntityStateRepository * myESR
Owning vehicle, shared context, publishers, and reflected objects.
Definition: iffComponent.h:101
void tick(double dt)
Per-frame update; publishes IFF state when enabled.
Instances of DtString are used to represent strings.
Definition: vlString.h:38
bool myLethalEnabled
Definition: iffComponent.h:113
bool enabled() const
Return true if the IFF system is enabled.
Definition: iffComponent.h:74
bool lethalEnabled() const
Return true if lethal interrogation is enabled.
Definition: iffComponent.h:76

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)