VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
transferControlManagerHLA.h
Go to the documentation of this file.
1 #pragma once
2 #if DtHLA
6 #include <map>
7 #include <list>
11 
12 class DtExerciseConn;
13 class DtHlaObject;
14 class DtObjClassDesc;
15 class DtEntityPublisher;
16 class DtHlaObjectWithStateRep;
17 class DtReflectedEntity;
19 
21 typedef void (*DtNewTransferredEntityCb)
22 (DtEntityPublisher* newEntityPublisher, DtU32 requestIdentifier, void* usr);
23 
24 typedef void (*DtLostOwnershipOfEntityCb)
25 (DtReflectedEntity* lostHlaObject, void* usr);
26 
27 typedef void(*DtLostOwnershipOfDIGuyCb)
28 (DtReflectedDIGuyObject* lostHlaObject, void* usr);
29 
31 {
33  void* userData;
34 };
35 
37 {
39  void* userData;
40 };
41 
42 struct DtLostOwnershipOfDIGuyCbInfo
43 {
44  DtLostOwnershipOfDIGuyCb cbFunction;
45  void* userData;
46 };
47 
49 {
50 public:
51 
53 
55 
56  virtual void processGainedOwnership(DtHlaObject* hlaObject);
57 
58  virtual void processLostOwnership(DtHlaObject* hlaObject);
59 
60  virtual void sendSetRecordInteraction(DtU32 requestIdentifier);
61 
64  virtual void setNewTransferredEntityCallback(DtNewTransferredEntityCb func, void* usr);
65 
68  virtual void setLostOwnershipOfEntityCallback(DtLostOwnershipOfEntityCb func, void* usr);
69 
72  virtual void setLostOwnershipOfDIGuyCallback(DtLostOwnershipOfDIGuyCb func, void* usr);
73 
74  virtual void processSetRecord(DtSetRecordInteraction* setRec);
75 
77  virtual void invokeNewAndLostObjectCallbacks();
78 
80  virtual void invokeNewObjectCallbacks();
81 
83  virtual void invokeLostObjectCallbacks();
84 
87  virtual DtEntityPublisher* createEntityPublisher(DtHlaObjectWithStateRep* hlaObj, DtExerciseConn* exConn);
88 
91  virtual DtReflectedEntity* createReflectedEntity(DtHlaObjectWithStateRep* hlaObj, DtExerciseConn* exConn);
92 
95  virtual DtReflectedDIGuyObject* createReflectedDIGuyObject(DtHlaObjectWithStateRep* hlaObj, DtExerciseConn* exConn);
96 
97 public:
100  static void gainedOwnershipCallback(DtHlaObject* hlaObject, void* usr);
101 
102  //Static callback function invoked after successfully divesting an object.
104  static void lostOwnershipCallback(DtHlaObject* hlaObject, void* usr);
105 
106 private:
109 
112 
113 protected:
114 
115  DtObjClassDesc* myPhysicalEntityClassDesc;
116  DtObjClassDesc* myDiguyClassDesc;
117  DtNewTransferredEntityCbInfo myNewTransferredEntityFunc;
118  DtLostOwnershipOfEntityCbInfo myLostOwnershipOfEntityFunc;
119  DtLostOwnershipOfDIGuyCbInfo myLostOwnershipOfDIGuyFunc;
120 
121  //Map of request identifiers and related hla objects. HLA Objects
122  //are saved in this map until all setRecord messages related to this transfer have been received.
123  std::map<DtU32, DtHlaObjectWithStateRep*> myAcquiredEntitiesMap;
124 
125  //Map of request identifiers and related hla objects. HLA Objects
126  //are saved in this map until all setRecord messages related to this transfer have been received.
127  std::map<DtU32, DtHlaObjectWithStateRep*> myLostEntitiesMap;
128  std::map<DtU32, DtHlaObjectWithStateRep*> myLostDIGuyMap;
129 
130 };
131 #endif
Instances of this class provide a protocol independent interface to a reflected entity in a DIS envir...
Definition: reflectedEntityDIS.h:39
Definition: transferControlManagerDIS.h:36
Definition: transferControlManagerDIS.h:48
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
This file provides protocol independence for DtAcknowledgeInteraction.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtBaseTransferControlManager & operator=(const DtBaseTransferControlManager &orig)
assignment operator – Not Implemented
class DtSetRecordPdu:
Definition: setRecordPdu.h:35
Definition: baseTransferControlManager.h:47
DtNewTransferredEntityCb cbFunction
Definition: transferControlManagerDIS.h:32
Definition: transferControlManagerDIS.h:30
Instances of DtEntityPublisher are used for local or source simulations of entities, (i.e.
Definition: entityPublisherDIS.h:33
Definition: reflectedDiGuyObject.h:118
void(* DtNewTransferredEntityCb)(DtEntityPublisher *newEntityPublisher, DtU32 requestIdentifier, void *usr)
New Transferred Entity Callback - invoked when successfully acquired a new Entity object...
Definition: transferControlManagerDIS.h:22
void * userData
Definition: transferControlManagerDIS.h:39
virtual void processSetRecord(DtSetRecordInteraction *setRec)
Processes the incoming SetRecord interaction. Tracks the number of records for each individual reques...
virtual void invokeNewAndLostObjectCallbacks()=0
Post drain callback to return publisher objects through callbacks.
void * userData
Definition: transferControlManagerDIS.h:33
void(* DtLostOwnershipOfEntityCb)(DtReflectedEntity *lostObject, void *usr)
Definition: transferControlManagerDIS.h:25
unsigned long DtU32
A 32 bit unsigned integer value.
Definition: vlMachineTypes.h:153
DtLostOwnershipOfEntityCb cbFunction
Definition: transferControlManagerDIS.h:38
virtual void sendSetRecordInteraction(DtU32 requestIdentifier)=0
Pure virtual functions that are protocol specific and must be defined in subclass.

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)