VR-Link API Documentation for HLA 4
 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;
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 
43 {
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 
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 DtReflectedEntity are used to represent a simulation entity reflected across a network (...
Definition: reflectedEntityHLA.h:29
Definition: transferControlManagerHLA.h:36
Definition: transferControlManagerHLA.h:48
void(* DtLostOwnershipOfEntityCb)(DtReflectedEntity *lostHlaObject, void *usr)
Definition: transferControlManagerHLA.h:25
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
This file provides protocol independence for DtAcknowledgeInteraction.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtBaseTransferControlManager & operator=(const DtBaseTransferControlManager &orig)
assignment operator – Not Implemented
DtObjClassDesc * myPhysicalEntityClassDesc
Definition: transferControlManagerHLA.h:115
Definition: transferControlManagerHLA.h:42
DtLostOwnershipOfDIGuyCb cbFunction
Definition: transferControlManagerHLA.h:44
std::map< DtU32, DtHlaObjectWithStateRep * > myAcquiredEntitiesMap
Definition: transferControlManagerHLA.h:123
DtLostOwnershipOfEntityCbInfo myLostOwnershipOfEntityFunc
Definition: transferControlManagerHLA.h:118
An instance of DtObjClassDesc is a &quot;class descriptor&quot; for an HLA Object class.
Definition: objClassDesc13.h:41
Definition: baseTransferControlManager.h:47
void * userData
Definition: transferControlManagerHLA.h:45
DtNewTransferredEntityCb cbFunction
Definition: transferControlManagerHLA.h:32
Instances of DtHlaObject are used to represent HLA objects which are communicated across the network...
Definition: hlaObject.h:58
Definition: transferControlManagerHLA.h:30
Instances of DtEntityPublisher are used for local or source simulations of entities (i...
Definition: entityPublisherHLA.h:28
Instances of DtReflectedDIGuyObject are used to represent a simulated HLAobjectRoot.DIGuyObject object reflected across a network.
Definition: reflectedDiGuyObject.h:31
std::map< DtU32, DtHlaObjectWithStateRep * > myLostEntitiesMap
Definition: transferControlManagerHLA.h:127
DtObjClassDesc * myDiguyClassDesc
Definition: transferControlManagerHLA.h:116
void * userData
Definition: transferControlManagerHLA.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: transferControlManagerHLA.h:33
Definition: setRecordInteractionHLA.h:24
DtNewTransferredEntityCbInfo myNewTransferredEntityFunc
Definition: transferControlManagerHLA.h:117
void(* DtLostOwnershipOfDIGuyCb)(DtReflectedDIGuyObject *lostHlaObject, void *usr)
Definition: transferControlManagerHLA.h:28
unsigned long DtU32
A 32 bit unsigned integer value.
Definition: vlMachineTypes.h:153
DtLostOwnershipOfEntityCb cbFunction
Definition: transferControlManagerHLA.h:38
virtual void sendSetRecordInteraction(DtU32 requestIdentifier)=0
Pure virtual functions that are protocol specific and must be defined in subclass.
DtLostOwnershipOfDIGuyCbInfo myLostOwnershipOfDIGuyFunc
Definition: transferControlManagerHLA.h:119
void(* DtNewTransferredEntityCb)(DtEntityPublisher *newEntityPublisher, DtU32 requestIdentifier, void *usr)
New Transferred Entity Callback - invoked when successfully acquired a new Entity object...
Definition: transferControlManagerHLA.h:22
class DtHlaObjectWithStateRep:
Definition: hlaObjectWithStateRep.h:28
std::map< DtU32, DtHlaObjectWithStateRep * > myLostDIGuyMap
Definition: transferControlManagerHLA.h:128

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)