VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
transferControlManagerDIS.h
Go to the documentation of this file.
1 #pragma once
2 #if DtDIS
6 #include <map>
7 #include <list>
11 
12 class DtExerciseConn;
13 class DtHlaObject;
14 class DtObjClassDesc;
15 class DtEntityPublisher;
17 class DtHlaObjectWithStateRep;
18 class DtReflectedEntity;
20 
22 typedef void (*DtNewTransferredEntityCb)
23 (DtEntityPublisher* newEntityPublisher, DtU32 requestIdentifier, void* usr);
24 //
25 typedef void (*DtLostOwnershipOfEntityCb)
26 (DtReflectedEntity* lostObject, void* usr);
27 
28 //typedef void(*DtLostOwnershipOfDIGuyCb)
29 //(DtReflectedDIGuyObject* lostHlaObject, void* usr);
30 
32 {
34  void* userData;
35 };
36 
38 {
40  void* userData;
41 };
42 
43 //struct DtLostOwnershipOfDIGuyCbInfo
44 //{
45 // DtLostOwnershipOfDIGuyCb cbFunction;
46 // void* userData;
47 //};
48 
50 {
51 public:
52 
54 
56 
57  virtual void sendSetRecordInteraction(DtU32 requestIdentifier);
58 
61  virtual void setNewTransferredEntityCallback(DtNewTransferredEntityCb func, void* usr);
62 
65  virtual void setLostOwnershipOfEntityCallback(DtLostOwnershipOfEntityCb func, void* usr);
66 
67  virtual void processSetRecord(DtSetRecordInteraction* setRec);
68 
70  virtual void processEventReport(DtEventReportInteraction* eventReport);
71 
72  virtual void invokeNewAndLostObjectCallbacks();
73 
75  virtual void invokeNewObjectCallbacks();
76 
78  virtual void invokeLostObjectCallbacks();
79 
82  virtual DtEntityPublisher* createEntityPublisher(DtEntityStateRepository* objWithSR, DtExerciseConn* exConn);
83 
84  virtual DtReflectedEntity* createReflectedEntity(DtEntityStateRepository* objWithSR, DtExerciseConn* exConn);
85 
87  virtual void printMaps() const;
88 
89 private:
92 
95 
96 protected:
97  virtual void onPositiveAcknowledge(const DtAcknowledgeInteraction& ack, const DtTransferControlInteraction& request);
98  virtual void onNegativeAcknowledge(const DtAcknowledgeInteraction& ack, const DtTransferControlInteraction& request);
100 
103 
104  //Map of request keys and related entity publishers. Publishers
105  //are saved in this map until all setRecord messages related to this transfer have been received.
106  std::map<DtTransferRequestKey, DtEntityIdentifier> myAcquiredEntitiesMap;
107  // Map of request keys and related entity identifiers for lost entities. Identifiers are added to this
108  // map on the receipt of an EventReportPDU indicating the completion of transfer control. LostEntityCallbacks
109  // are then invoked in the post drain callback, and the entries are removed from the map when the callbacks are
110  // invoked.
111  std::map<DtTransferRequestKey, DtEntityStateRepository*> myLostEntitiesMap;
112 
113 
114 };
115 #endif
Instances of this class provide a protocol independent interface to a reflected entity in a DIS envir...
Definition: reflectedEntityDIS.h:39
std::map< DtTransferRequestKey, DtEntityIdentifier > myAcquiredEntitiesMap
Definition: transferControlManagerDIS.h:106
Definition: transferControlManagerDIS.h:37
Definition: transferControlManagerDIS.h:49
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
This file provides protocol independence for DtAcknowledgeInteraction.
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
DtBaseTransferControlManager & operator=(const DtBaseTransferControlManager &orig)
assignment operator – Not Implemented
virtual void onNegativeAcknowledge(const DtAcknowledgeInteraction &ack, const DtTransferControlInteraction &request)
Hook for protocol-specific handling of negative transfer control acknowledges.
Instances of DtTransferControlRequestPdu are used to initiate the dynamic allocation and control of s...
Definition: transferControlRequestPdu.h:34
DtLostOwnershipOfEntityCbInfo myLostOwnershipOfEntityFunc
Definition: transferControlManagerDIS.h:102
class DtSetRecordPdu:
Definition: setRecordPdu.h:35
Definition: baseTransferControlManager.h:112
DtNewTransferredEntityCb cbFunction
Definition: transferControlManagerDIS.h:33
virtual void processEventReport(DtEventReportInteraction *eventReport)
Processes the incoming EventReport interaction.
Definition: transferControlManagerDIS.h:31
Instances of DtEntityPublisher are used for local or source simulations of entities, (i.e.
Definition: entityPublisherDIS.h:33
class DtAcknowledgePdu:
Definition: acknowledgePdu.h:30
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
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:23
virtual void onPositiveAcknowledge(const DtAcknowledgeInteraction &ack, const DtTransferControlInteraction &request)
Hook for protocol-specific handling of positive transfer control acknowledges.
Instances of DtEventReptPdu are used to send/receive event report PDUs.
Definition: eventReportPdu.h:28
void * userData
Definition: transferControlManagerDIS.h:40
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:34
virtual void onOutgoingTransferControlRequestCancelled(const DtTransferControlInteraction &request)
Hook for protocol-specific cleanup when an outgoing request is cancelled.
DtNewTransferredEntityCbInfo myNewTransferredEntityFunc
Definition: transferControlManagerDIS.h:101
void(* DtLostOwnershipOfEntityCb)(DtReflectedEntity *lostObject, void *usr)
Definition: transferControlManagerDIS.h:26
unsigned long DtU32
A 32 bit unsigned integer value.
Definition: vlMachineTypes.h:165
DtLostOwnershipOfEntityCb cbFunction
Definition: transferControlManagerDIS.h:39
std::map< DtTransferRequestKey, DtEntityStateRepository * > myLostEntitiesMap
Definition: transferControlManagerDIS.h:111
virtual void sendSetRecordInteraction(DtU32 requestIdentifier)=0
Pure virtual functions that are protocol specific and must be defined in subclass.

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)