VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
removeEntityInteractionHLA.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef removeEntityInteractionHLA_H_
8 #define removeEntityInteractionHLA_H_
9 
10 #if DtHLA
11 
12 #include "interactionWithEncDec.h"
13 #include "hostStructs.h"
14 #include <matrix/vlMath.h>
15 
16 
17 
21 
24 
25 
27 typedef void (*DtRemoveEntityInteractionCb)(DtRemoveEntityInteraction* inter,
28  void* usr);
29 
34 
35 
36 class DT_DLL_VL DtRemoveEntityInteraction : public DtInteractionWithEncDec
37 {
38 public:
39 
42 
44  virtual ~DtRemoveEntityInteraction();
45 
48 
51 
53  virtual void printData() const;
54 
56  virtual void printDataToStream(std::ostream& stream) const;
57 
59  virtual void setSenderId(const DtEntityIdentifier& id);
60  virtual const DtEntityIdentifier& senderId() const;
61 
63  virtual void setReceiverId(const DtEntityIdentifier& id);
64  virtual const DtEntityIdentifier& receiverId() const;
65 
67  virtual void setRequestId(int id);
68  virtual int requestId() const;
69 
71  virtual const char* name() const;
72 
73 public:
74 
77  static DtInteraction* create();
78 
81  static void addCallback(DtExerciseConn* conn,
82  DtRemoveEntityInteractionCb cb, void* usr,
83  DtDDMRegionSP region = DtDDMRegionSP());
84  static void removeCallback(DtExerciseConn* conn,
85  DtRemoveEntityInteractionCb cb, void* usr,
86  DtDDMRegionSP region = DtDDMRegionSP());
87 
88 protected:
89 
90  DtEntityIdentifier myOrigEnt;
91  DtEntityIdentifier myReceiveEnt;
92  int myRequestId;
93 };
94 
96 {
97  myOrigEnt = id;
98 }
99 
101 {
102  return myOrigEnt;
103 }
104 
106  const DtEntityIdentifier& id)
107 {
108  myReceiveEnt = id;
109 }
110 
112 {
113  return myReceiveEnt;
114 }
115 
116 inline void DtRemoveEntityInteraction::setRequestId(int id)
117 {
118  myRequestId = id;
119 }
120 
121 inline int DtRemoveEntityInteraction::requestId() const
122 {
123  return myRequestId;
124 }
125 
126 inline const char* DtRemoveEntityInteraction::name() const
127 {
128  return "DtRemoveEntityInteraction";
129 }
130 
131 #endif
132 #endif
133 
134 
DtInteraction is an base class for representing DIS PDUs which don&#39;t have state.
Definition: interactionDIS.h:24
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
void setRequestId(int id)
virtual void setSenderId(const DtEntityIdentifier &id)
Set the sender ID.
virtual void setReceiverId(const DtEntityIdentifier &id)
Set the receiver ID.
This file defines math constants and methods which may be useful in simulations.
int requestId() const
Set/Get the request id.
Instances of DtRemoveEntityPdu are used to send/receive remove entity PDUs.
Definition: removeEntityPdu.h:29
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
This file is deprecated - Please see simulationAddress.h, entityIdentifier.h, entityType.h, burstDescriptor.h, and NetStructs.h.
virtual const DtEntityIdentifier & senderId() const
Get the sender ID.
DtRemoveEntityPdu DtRemoveEntityInteraction
Definition: removeEntityPdu.h:20
virtual const DtEntityIdentifier & receiverId() const
Get the receiver ID.

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)