MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
interDdmMgr.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: interDdmMgr.h,v $ $Revision: 1.33 $ $State: Exp $
7 *********************************************************************/
8 #ifndef interDdmMgr_H_
9 #define interDdmMgr_H_
10 
11 #ifdef DDM
12 
15 
16 #include "interMgr.h"
17 #include "distributedDdmMgr.h"
18 #include <vlutil/vlHashlist.h>
19 #include "regionSetList.h"
20 #include "regMatchList.h"
21 #include "interRegSet.h"
22 #include "regSetPacket.h"
23 #include "intRegSetMsg.h"
24 
26 class DtRegionRealization;
27 class DtFomClassMgr;
28 
35 class DT_DLL_LRC DtInterDataDistMgr : public DtInteractionMgr
36 {
37 protected:
38 
40  DtInterDataDistMgr(DtFederateMgr* fedMgr);
41 
42 public:
43 
45  virtual ~DtInterDataDistMgr();
46 
47 private:
48 
50  DtInterDataDistMgr(DtInterDataDistMgr const& other);
51 
53  DtInterDataDistMgr& operator=(DtInterDataDistMgr const& other);
54 
55 public:
56 
58  virtual DtDistributedDataDistMgr* ddmMgr();
59  virtual DtDistributedDataDistMgr* ddmMgr() const;
60 
62  virtual void postJoinInit();
63 
65  virtual void resetDdm();
66 
68  virtual DtHandle uniquePubRegSetHandle();
69 
71  virtual DtHandle uniqueSubRegSetHandle();
72 
74  virtual int acceptInteraction(const DtInteractionMsg& msg);
75 
77  virtual bool acceptInteractionChannel(
78  DtInteractionClassHandle classHandle, DtHandle channel);
79 
81  virtual void addLocalAddrMap(DtInteractionClassHandle classHandle,
82  DtHandle regionSetHandle, const MAKRti::DtInetAddr& addr);
83 
85  virtual void removeLocalAddrMap(DtInteractionClassHandle classHandle,
86  DtHandle regionSetHandle);
87 
89  virtual MAKRti::DtInetAddr localAddrMap(DtInteractionClassHandle classHandle,
90  DtHandle regionSetHandle);
91 
93  virtual void addRemoteAddrMap(DtInteractionClassHandle classHandle,
94  DtHandle regionSetHandle, const MAKRti::DtInetAddr& addr);
95 
97  virtual void removeRemoteAddrMap(DtInteractionClassHandle classHandle,
98  DtHandle regionSetHandle);
99 
101  virtual MAKRti::DtInetAddr remoteAddrMap(DtInteractionClassHandle classHandle,
102  DtHandle regionSetHandle);
103 
105  virtual DtInteractionRegionSet* createPubRegionSet(
106  DtRegionRealization& region, DtInteractionClassInfo& classDesc,
107  bool anonymous);
108 
110  virtual DtInteractionRegionSet* createPubRegionSet(
111  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
112  bool anonymous);
113 
116  virtual DtInteractionRegionSet* getPubRegionSet(
117  DtRegionRealization &region, DtInteractionClassInfo& classDesc,
118  bool anonymous);
119 
122  virtual DtInteractionRegionSet* getPubRegionSet(
123  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
124  bool anonymous);
125 
128  virtual DtInteractionRegionSet* createSubRegionSet(
129  DtRegionRealization& region, DtInteractionClassInfo& classDesc,
130  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
131 
134  virtual DtInteractionRegionSet* createSubRegionSet(
135  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
136  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
137 
140  virtual DtInteractionRegionSet* addSubRegion(DtRegionRealization& region,
141  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
142 
145  virtual DtInteractionRegionSet* addSubRegionList(
146  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
147  DtInteractionRegionSet* oldRegionSet);
148 
152  virtual DtInteractionRegionSet* removeSubRegion(DtRegionRealization& region,
153  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
154 
158  virtual DtInteractionRegionSet* removeSubRegionList(
159  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
160  DtInteractionRegionSet* oldRegionSet);
161 
164  virtual DtInteractionRegionSet* createPasRegionSet(
165  DtRegionRealization& region, DtInteractionClassInfo& classDesc,
166  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
167 
170  virtual DtInteractionRegionSet* createPasRegionSet(
171  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
172  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
173 
176  virtual DtInteractionRegionSet* addPasRegion(DtRegionRealization& region,
177  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
178 
181  virtual DtInteractionRegionSet* addPasRegionList(
182  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
183  DtInteractionRegionSet* oldRegionSet);
184 
188  virtual DtInteractionRegionSet* removePasRegion(DtRegionRealization& region,
189  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
190 
194  virtual DtInteractionRegionSet* removePasRegionList(
195  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
196  DtInteractionRegionSet* oldRegionSet);
197 
201  virtual DtInteractionRegionSet* defaultSubRegionSet(
202  DtInteractionClassHandle classHandleValue);
203 
207  virtual DtInteractionRegionSet* defaultPasRegionSet(
208  DtInteractionClassHandle classHandleValue);
209 
213  virtual DtInteractionRegionSet* defaultRemotePubRegionSet(
214  DtInteractionClassHandle classHandleValue);
215 
217  virtual void deleteRegion(DtRegionRealization& region);
218 
220  virtual void processDeleteRegion(DtRegionRealization& region);
221 
223  virtual void notifyAboutRegionModification(DtRegionRealization &region);
224 
226  virtual void processNotifyRegion(DtRegionRealization &region, bool newRegion);
227 
229  virtual void sendRegionSetMsg(DtInterRegSetType type,
230  const DtRegionSet &regionSet,
231  DtInteractionClassHandle classHandleValue,
232  bool anonymous=false, bool forceDualTransmit=false);
233 
236  virtual void addPendingAssociateSubRegions(DtInteractionClassInfo& classDesc);
237 
240  virtual void addPendingAssociatePubRegions(DtInteractionClassInfo& classDesc);
241 
242  virtual void checkForRegionalSubscribe(DtInteractionClassInfo& info);
243  virtual void checkForRegionalPublish(DtInteractionClassInfo& info);
244 
246  virtual void postTick();
247 
249  virtual bool save(DtRtiSaveFile& file);
250 
252  virtual void prepareToRestore();
253 
255  virtual bool restore( DtRtiSaveFile& file );
256 
257 public:
258 
260  static void processRegionSet(const DtInterRegSetMsg& msg, void* usr);
261 
262 protected:
263 
269 
271  virtual void addAddrMapDelay(DtInteractionClassHandle classHandle,
272  DtHandle regionSetHandle);
273 
275  virtual void removeAddrMapDelay(DtInteractionClassHandle classHandle,
276  DtHandle regionSetHandle);
277 
279  virtual bool addrMapDelayExpired(DtInteractionClassHandle classHandle,
280  DtHandle regionSetHandle);
281 
283  virtual void processPubRegionSet(const DtInterRegSetMsg& msg);
284 
286  virtual void processPubRegionSet(DtInteractionRegionSet* regionSet,
287  DtInteractionClassInfo* classDesc);
288 
290  virtual void processSubRegionSet(const DtInterRegSetMsg& msg);
291 
293  virtual void processSubRegionSet(DtInteractionRegionSet* regionSet,
294  DtInteractionClassInfo* classDesc);
295 
297  virtual void addLocalPubRegSet(
298  DtInteractionClassHandle classHandleValue,
299  DtInteractionRegionSet* regSet);
300 
303  virtual void deleteLocalPubRegSet(DtInteractionRegionSet* regSet);
304  virtual DtInteractionRegionSet* localPubRegSet(
305  DtInteractionClassHandle classHandleValue, DtHandle regSetHandle);
306 
308  virtual void addLocalSubRegSet(
309  DtInteractionClassHandle classHandleValue,
310  DtInteractionRegionSet* regSet);
311 
313  virtual void removeLocalSubRegSet(DtInteractionRegionSet* regSet);
314  virtual DtInteractionRegionSet* localSubRegSet(
315  DtInteractionClassHandle classHandleValue);
316 
318  virtual void addPassiveRegSet(
319  DtInteractionClassHandle classHandleValue,
320  DtInteractionRegionSet* regSet);
321 
323  virtual void removePassiveRegSet(DtInteractionRegionSet* regSet);
324  virtual DtInteractionRegionSet* passiveRegSet(
325  DtInteractionClassHandle classHandleValue);
326 
328  virtual void addRemotePubRegSet(
329  DtInteractionClassHandle classHandleValue,
330  DtInteractionRegionSet* regSet);
331 
333  virtual void removeRemotePubRegSet(
334  DtInteractionClassHandle classHandleValue,
335  DtHandle regSetHandle);
336 
338  virtual DtInteractionRegionSet* remotePubRegSet(
339  DtInteractionClassHandle classHandleValue, DtHandle regSetHandle);
340 
342  virtual void addRemoteSubRegSet(DtInteractionRegionSet* regSet);
343 
345  virtual void removeRemoteSubRegSet(DtInteractionRegionSet* regSet,
346  bool removeEmptyClassList=true);
347  virtual DtInteractionRegionSet* remoteSubRegSet(
348  DtFederateHandle federateHandle,
349  DtInteractionClassHandle classHandle);
350 
352  virtual void evaluateOverlap(
353  DtInteractionRegionSet& localRegionSet,
354  DtInteractionRegionSet& remoteRegionSet);
355 
358  virtual void evaluateLocalOverlap(
359  DtRegionSetList& remoteList,
360  DtInteractionRegionSet& localRegionSet);
361 
365  virtual void evaluateLocalMatchOverlap(
366  DtRegionSetList& remoteList,
367  DtInteractionClassInfo* oldMatchClass,
368  DtInteractionClassInfo& classDesc,
369  DtInteractionRegionSet& localRegionSet);
370 
374  virtual void evaluateLocalOverlapSubClasses(
375  DtInteractionClassInfo* oldMatchClass,
376  DtInteractionClassInfo& classDesc,
377  DtInteractionRegionSet& localRegionSet);
378 
381  virtual void evaluateRemoteOverlap(
382  DtInteractionRegionSet& remoteRegionSet,
383  DtInteractionClassInfo& classDesc);
384 
387  virtual void removeLocalOverlap(DtInteractionRegionSet& regionSet);
388 
391  virtual void removeRemoteOverlap(DtInteractionRegionSet& regionSet);
392 
395  virtual void addPendingPubRegionReference(
396  DtHandle regionHandle, DtInteractionRegionSet *regionSet);
397  virtual void addPendingSubRegionReference(
398  DtHandle regionHandle, DtInteractionRegionSet *regionSet);
399 
401  virtual void addPendingPubRegSet(DtInteractionRegionSet* regionSet);
402  virtual void addPendingSubRegSet(DtInteractionRegionSet* regionSet);
403 
404 #ifdef DtIFSPEC1516
405  virtual void calculateRegionSet(
407  DtInteractionClassInfo const& sentClassInfo,
408  DtInteractionClassInfo const& receivedClassInfo,
409  unsigned long channel,
410  rti1516::RegionHandleSet & regionHandles);
411 #elif defined(DtIFSPEC1516E)
412  virtual void calculateRegionSet(
414  DtInteractionClassInfo const& sentClassInfo,
415  DtInteractionClassInfo const& receivedClassInfo,
416  unsigned long channel,
417  rti1516e::RegionHandleSet & regionHandles);
418 #else
419  void calculateRegionSet(
420  DtInteractionClassInfo const& sentClassInfo,
421  unsigned long channel, DtPhvps& paramSet);
422 #endif
423 
425  virtual void writeRegionSetListByClass(DtRtiSaveFile& saveFile,
426  DtRegionSetListByClass& regSetListByClass, DtRtiSaveRegionSetTypes type);
427 
429  virtual void writeRegionSet(DtRtiSaveFile& saveFile,
430  DtInteractionRegionSet* regSet, DtRtiSaveRegionSetTypes type);
431 
433  virtual void restoreLocalRegSet(DtInterRegionSetPacket* packet);
434 
436  virtual void restoreRemoteRegSet(DtInterRegionSetPacket* packet);
437 
439  virtual void destroyRegionLists();
440 
441 protected:
442 
460 
462  DtRegionSetListByClass myLocalPublish;
463  DtRegionSetListByClass myRemotePublish;
464 
466  MAKRti::DtHashList myLocalSubscribe;
467  MAKRti::DtHashList myPassiveSubscribe;
468 
470  MAKRti::DtHashList myRemoteSubscribe;
471 
475  DtRegionSetListByClass myOverlapPublish;
476 
480  DtRegionSetListByClass myMatchPublish;
481 
483  MAKRti::DtHashList myDefaultSubRegionSet;
484  MAKRti::DtHashList myDefaultPasRegionSet;
485 
487  std::map< DtInteractionClassHandle, DtInteractionRegionSet*> myDefaultRemPubRegionSet;
488 
491  DtHandle myNextPubRegSetHandle;
492  DtHandle myNextSubRegSetHandle;
493  MAKRti::DtHashList myUsedPubHandles;
494  MAKRti::DtHashList myUsedSubHandles;
495 
503  typedef std::map<DtHandle, DtInetAddr> DtRegSetHdlToAddrMap;
504  typedef std::map<DtInteractionClassHandle, DtRegSetHdlToAddrMap> DtClassToRegSetAddrMap;
505  DtClassToRegSetAddrMap myLocalRegionSetAddr;
506  DtClassToRegSetAddrMap myRemoteRegionSetAddr;
507 
518  MAKRti::DtHashList myAddrMapDelay;
519 
523  MAKRti::DtHashList myPendingPubRegionReferences;
524  MAKRti::DtHashList myPendingSubRegionReferences;
525 
529  MAKRti::DtList myPendingPubRegSets;
530  MAKRti::DtList myPendingSubRegSets;
531 };
532 
533 #endif
534 #endif
535 
536 
537 
virtual void deleteRegion(Region *theRegion)
Definition: regSetPacket.h:54
The declaration of the Interaction Manager class.
virtual void notifyAboutRegionModification(Region &theRegion)
virtual bool restore(DtRtiSaveFile &file)
Restore the state information from the given file.
DtHandle DtInteractionClassHandle
Definition: internalTypes.h:35
virtual MAKRti::DtInetAddr localAddrMap(DtInteractionClassHandle theClass, DtHandle theChannel)
Map the class and channel to a multicast address.
Instances of DtFederateMgr process federation-level messages (such as create, destroy, join, resign, and sync points) and manages the objects responsible for handling general communication, objects, interactions, the FOM, MOM, and data distribution mmg.
Definition: fedMgr.h:84
Instances of DtInteractionMgr manage the sending and receiving of interactions.
Definition: interMgr.h:45
DtHandle DtFederateHandle
Definition: internalTypes.h:29
Definition: fomMgr.h:53
DtRtiSaveRegionSetTypes
Definition: regSetPacket.h:20
virtual void postTick()
Called after processing messages in RTI ambassador tick / evoke callbacks.
virtual void postJoinInit()
Post join processing. All managers shall have been created and initialized.
Definition: intClassInfo.h:41
virtual int acceptInteraction(const DtInteractionMsg &msg)
DDM.
unsigned long DtHandle
The internal types.
Definition: internalTypes.h:25
DtInteractionMgr & operator=(DtInteractionMgr const &other)
Assignment operator not implemented – Assignment not allowed!
virtual bool save(DtRtiSaveFile &file)
Save the state information to the given file.
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
Definition: saveFile.h:21
virtual void prepareToRestore()
Prepare the state information to be restored (i.e., clear out existing data).
DtInteractionMsg is a message type that represents an HLA Interaction.
Definition: interactMsg.h:27

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)