MAK RTIspy API Documentation for HLA Evolved
 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 processResign(const DtResignMsg& msg) override;
66 
68  virtual void resetDdm();
69 
71  virtual DtHandle uniquePubRegSetHandle();
72 
74  virtual DtHandle uniqueSubRegSetHandle();
75 
77  virtual int acceptInteraction(const DtInteractionMsg& msg);
78 
80  virtual bool acceptInteractionChannel(
81  DtInteractionClassHandle classHandle, DtHandle channel);
82 
84  virtual void addLocalAddrMap(DtInteractionClassHandle classHandle,
85  DtHandle regionSetHandle, const MAKRti::DtInetAddr& addr);
86 
88  virtual void removeLocalAddrMap(DtInteractionClassHandle classHandle,
89  DtHandle regionSetHandle);
90 
92  virtual MAKRti::DtInetAddr localAddrMap(DtInteractionClassHandle classHandle,
93  DtHandle regionSetHandle);
94 
96  virtual void addRemoteAddrMap(DtInteractionClassHandle classHandle,
97  DtHandle regionSetHandle, const MAKRti::DtInetAddr& addr);
98 
100  virtual void removeRemoteAddrMap(DtInteractionClassHandle classHandle,
101  DtHandle regionSetHandle);
102 
104  virtual MAKRti::DtInetAddr remoteAddrMap(DtInteractionClassHandle classHandle,
105  DtHandle regionSetHandle);
106 
108  virtual DtInteractionRegionSet* createPubRegionSet(
109  DtRegionRealization& region, DtInteractionClassInfo& classDesc,
110  bool anonymous);
111 
113  virtual DtInteractionRegionSet* createPubRegionSet(
114  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
115  bool anonymous);
116 
119  virtual DtInteractionRegionSet* getPubRegionSet(
120  DtRegionRealization &region, DtInteractionClassInfo& classDesc,
121  bool anonymous);
122 
125  virtual DtInteractionRegionSet* getPubRegionSet(
126  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
127  bool anonymous);
128 
131  virtual DtInteractionRegionSet* createSubRegionSet(
132  DtRegionRealization& region, DtInteractionClassInfo& classDesc,
133  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
134 
137  virtual DtInteractionRegionSet* createSubRegionSet(
138  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
139  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
140 
143  virtual DtInteractionRegionSet* addSubRegion(DtRegionRealization& region,
144  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
145 
148  virtual DtInteractionRegionSet* addSubRegionList(
149  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
150  DtInteractionRegionSet* oldRegionSet);
151 
155  virtual DtInteractionRegionSet* removeSubRegion(DtRegionRealization& region,
156  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
157 
161  virtual DtInteractionRegionSet* removeSubRegionList(
162  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
163  DtInteractionRegionSet* oldRegionSet);
164 
167  virtual DtInteractionRegionSet* createPasRegionSet(
168  DtRegionRealization& region, DtInteractionClassInfo& classDesc,
169  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
170 
173  virtual DtInteractionRegionSet* createPasRegionSet(
174  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
175  DtInteractionRegionSet* oldRegionSet, bool regionIsAdded);
176 
179  virtual DtInteractionRegionSet* addPasRegion(DtRegionRealization& region,
180  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
181 
184  virtual DtInteractionRegionSet* addPasRegionList(
185  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
186  DtInteractionRegionSet* oldRegionSet);
187 
191  virtual DtInteractionRegionSet* removePasRegion(DtRegionRealization& region,
192  DtInteractionClassInfo& classDesc, DtInteractionRegionSet* oldRegionSet);
193 
197  virtual DtInteractionRegionSet* removePasRegionList(
198  DtRegionEntryList const& regionList, DtInteractionClassInfo& classDesc,
199  DtInteractionRegionSet* oldRegionSet);
200 
204  virtual DtInteractionRegionSet* defaultSubRegionSet(
205  DtInteractionClassHandle classHandleValue);
206 
210  virtual DtInteractionRegionSet* defaultPasRegionSet(
211  DtInteractionClassHandle classHandleValue);
212 
216  virtual DtInteractionRegionSet* defaultRemotePubRegionSet(
217  DtInteractionClassHandle classHandleValue);
218 
220  virtual void deleteRegion(DtRegionRealization& region);
221 
223  virtual void processDeleteRegion(DtRegionRealization& region);
224 
226  virtual void notifyAboutRegionModification(DtRegionRealization &region);
227 
229  virtual void processNotifyRegion(DtRegionRealization &region, bool newRegion);
230 
232  virtual void sendRegionSetMsg(DtInterRegSetType type,
233  const DtRegionSet &regionSet,
234  DtInteractionClassHandle classHandleValue,
235  bool anonymous=false, bool forceDualTransmit=false);
236 
239  virtual void addPendingAssociateSubRegions(DtInteractionClassInfo& classDesc);
240 
243  virtual void addPendingAssociatePubRegions(DtInteractionClassInfo& classDesc);
244 
247 
249  virtual void postTick();
250 
252  virtual bool save(DtRtiSaveFile& file);
253 
255  virtual void prepareToRestore();
256 
258  virtual bool restore( DtRtiSaveFile& file );
259 
260 public:
261 
263  static void processRegionSet(const DtInterRegSetMsg& msg, void* usr);
264 
265 protected:
266 
272 
274  virtual void addAddrMapDelay(DtInteractionClassHandle classHandle,
275  DtHandle regionSetHandle);
276 
278  virtual void removeAddrMapDelay(DtInteractionClassHandle classHandle,
279  DtHandle regionSetHandle);
280 
282  virtual bool addrMapDelayExpired(DtInteractionClassHandle classHandle,
283  DtHandle regionSetHandle);
284 
286  virtual void processPubRegionSet(const DtInterRegSetMsg& msg);
287 
289  virtual void processPubRegionSet(DtInteractionRegionSet* regionSet,
290  DtInteractionClassInfo* classDesc);
291 
293  virtual void processSubRegionSet(const DtInterRegSetMsg& msg);
294 
296  virtual void processSubRegionSet(DtInteractionRegionSet* regionSet,
297  DtInteractionClassInfo* classDesc);
298 
300  virtual void addLocalPubRegSet(
301  DtInteractionClassHandle classHandleValue,
302  DtInteractionRegionSet* regSet);
303 
306  virtual void deleteLocalPubRegSet(DtInteractionRegionSet* regSet);
307  virtual DtInteractionRegionSet* localPubRegSet(
308  DtInteractionClassHandle classHandleValue, DtHandle regSetHandle);
309 
311  virtual void addLocalSubRegSet(
312  DtInteractionClassHandle classHandleValue,
313  DtInteractionRegionSet* regSet);
314 
316  virtual void removeLocalSubRegSet(DtInteractionRegionSet* regSet);
317  virtual DtInteractionRegionSet* localSubRegSet(
318  DtInteractionClassHandle classHandleValue);
319 
321  virtual void addPassiveRegSet(
322  DtInteractionClassHandle classHandleValue,
323  DtInteractionRegionSet* regSet);
324 
326  virtual void removePassiveRegSet(DtInteractionRegionSet* regSet);
327  virtual DtInteractionRegionSet* passiveRegSet(
328  DtInteractionClassHandle classHandleValue);
329 
331  virtual void addRemotePubRegSet(
332  DtInteractionClassHandle classHandleValue,
333  DtInteractionRegionSet* regSet);
334 
336  virtual void removeRemotePubRegSet(
337  DtInteractionClassHandle classHandleValue,
338  DtHandle regSetHandle);
339 
341  virtual DtInteractionRegionSet* remotePubRegSet(
342  DtInteractionClassHandle classHandleValue, DtHandle regSetHandle);
343 
345  virtual void addRemoteSubRegSet(DtInteractionRegionSet* regSet);
346 
348  virtual void removeRemoteSubRegSet(DtInteractionRegionSet* regSet,
349  bool removeEmptyClassList=true);
350  virtual DtInteractionRegionSet* remoteSubRegSet(
351  DtFederateHandle federateHandle,
352  DtInteractionClassHandle classHandle);
353 
355  virtual void evaluateOverlap(
356  DtInteractionRegionSet& localRegionSet,
357  DtInteractionRegionSet& remoteRegionSet);
358 
361  virtual void evaluateLocalOverlap(
362  DtRegionSetList& remoteList,
363  DtInteractionRegionSet& localRegionSet);
364 
368  virtual void evaluateLocalMatchOverlap(
369  DtRegionSetList& remoteList,
370  DtInteractionClassInfo* oldMatchClass,
371  DtInteractionClassInfo& classDesc,
372  DtInteractionRegionSet& localRegionSet);
373 
377  virtual void evaluateLocalOverlapSubClasses(
378  DtInteractionClassInfo* oldMatchClass,
379  DtInteractionClassInfo& classDesc,
380  DtInteractionRegionSet& localRegionSet);
381 
384  virtual void evaluateRemoteOverlap(
385  DtInteractionRegionSet& remoteRegionSet,
386  DtInteractionClassInfo& classDesc);
387 
390  virtual void removeLocalOverlap(DtInteractionRegionSet& regionSet);
391 
394  virtual void removeRemoteOverlap(DtInteractionRegionSet& regionSet);
395 
398  virtual void addPendingPubRegionReference(
399  DtHandle regionHandle, DtInteractionRegionSet *regionSet);
400  virtual void addPendingSubRegionReference(
401  DtHandle regionHandle, DtInteractionRegionSet *regionSet);
402 
404  virtual void addPendingPubRegSet(DtInteractionRegionSet* regionSet);
405  virtual void addPendingSubRegSet(DtInteractionRegionSet* regionSet);
406 
407 #if defined(DtIFSPEC13)
408  void calculateRegionSet(DtInteractionClassInfo const& sentClassInfo, unsigned long channel, DtPhvps& paramSet);
409 #else
410  virtual void calculateRegionSet(DtInteractionClassInfo const& sentClassInfo, DtInteractionClassInfo const& receivedClassInfo,
412  unsigned long channel, RTI_API::RegionHandleSet & regionHandles);
413 #endif
414 
416  virtual void writeRegionSetListByClass(DtRtiSaveFile& saveFile,
417  DtRegionSetListByClass& regSetListByClass, DtRtiSaveRegionSetTypes type);
418 
420  virtual void writeRegionSet(DtRtiSaveFile& saveFile,
421  DtInteractionRegionSet* regSet, DtRtiSaveRegionSetTypes type);
422 
424  virtual void restoreLocalRegSet(DtInterRegionSetPacket* packet);
425 
427  virtual void restoreRemoteRegSet(DtInterRegionSetPacket* packet);
428 
430  virtual void destroyRegionLists();
431 
432 protected:
433 
451 
453  DtRegionSetListByClass myLocalPublish;
454  DtRegionSetListByClass myRemotePublish;
455 
457  MAKRti::DtHashList myLocalSubscribe;
458  MAKRti::DtHashList myPassiveSubscribe;
459 
461  MAKRti::DtHashList myRemoteSubscribe;
462 
466  DtRegionSetListByClass myOverlapPublish;
467 
471  DtRegionSetListByClass myMatchPublish;
472 
474  MAKRti::DtHashList myDefaultSubRegionSet;
475  MAKRti::DtHashList myDefaultPasRegionSet;
476 
478  std::map< DtInteractionClassHandle, DtInteractionRegionSet*> myDefaultRemPubRegionSet;
479 
482  DtHandle myNextPubRegSetHandle;
483  DtHandle myNextSubRegSetHandle;
484  MAKRti::DtHashList myUsedPubHandles;
485  MAKRti::DtHashList myUsedSubHandles;
486 
494  typedef std::map<DtHandle, DtInetAddr> DtRegSetHdlToAddrMap;
495  typedef std::map<DtInteractionClassHandle, DtRegSetHdlToAddrMap> DtClassToRegSetAddrMap;
496  DtClassToRegSetAddrMap myLocalRegionSetAddr;
497  DtClassToRegSetAddrMap myRemoteRegionSetAddr;
498 
509  MAKRti::DtHashList myAddrMapDelay;
510 
514  MAKRti::DtHashList myPendingPubRegionReferences;
515  MAKRti::DtHashList myPendingSubRegionReferences;
516 
520  MAKRti::DtList myPendingPubRegSets;
521  MAKRti::DtList myPendingSubRegSets;
522 };
523 
524 #endif
525 #endif
526 
527 
528 
Definition: regSetPacket.h:54
The declaration of the Interaction Manager class.
virtual void checkForRegionalSubscribe(DtInteractionClassInfo &info)
The empty methods below are overridden in the DtInterDataDistMgr and help implement DDM...
Definition: interMgr.h:286
virtual void checkForRegionalPublish(DtInteractionClassInfo &info)
When subscribing, check whether region publication info needs to get sent to other LRCs/rtiexec along...
Definition: interMgr.h:290
virtual void calculateRegionSet(DtInteractionClassInfo const &sentClassInfo, DtInteractionClassInfo const &receivedClassInfo, unsigned long channel, RTI_API::RegionHandleSet &regionHandles)
Calculate region set for processUpdate.
Definition: interMgr.h:390
virtual bool restore(DtRtiSaveFile &file)
Restore the state information from the given file.
Definition: resignMsg.h:36
DtHandle DtInteractionClassHandle
Definition: internalTypes.h:52
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:93
std::set< RegionHandle > RegionHandleSet
Definition: Typedefs.h:39
Instances of DtInteractionMgr manage the sending and receiving of interactions.
Definition: interMgr.h:46
DtHandle DtFederateHandle
Definition: internalTypes.h:46
Definition: fomMgr.h:49
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:40
virtual int acceptInteraction(const DtInteractionMsg &msg)
DtIFSPEC13.
unsigned long DtHandle
The internal types.
Definition: internalTypes.h:41
virtual void processResign(const DtResignMsg &msg)
Process resign message.
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:155
Definition: pHandValSet.h:38
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:26

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)