MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
smConMgr.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: smConMgr.h,v $ $Revision: 1.13 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #ifndef DtSmConnectionMgr_H_
13 #define DtSmConnectionMgr_H_
14 
15 #include "connectMgr.h"
16 #include "smConnection.h"
17 #include <vlutil/vlFilename.h>
18 
19 #define DtSmDEFAULT_SHARED_MEM_NAME "DtRtiSharedMessages"
20 
23 class DtRtiShmQNetMgr;
24 
32 
34 {
35 protected:
36 
37  DtSmConnectionMgr(DtRIDParameters* params, bool isFederate = false,
38  DtBoost::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
39  DtBoost::shared_ptr<DtRtiAssistantLrcClient>());
40 
41 public:
42 
43  virtual ~DtSmConnectionMgr();
44 
48  virtual void initQMgr(DtU32 numBuckets, DtU32 payloadSize, bool reliable,
49  bool forceMgrSubscribe);
50 
52 
55  virtual int send(const DtRtiMsg& msg,
56  MAKRti::DtTransportType transport,
57  const MAKRti::DtInetAddr& addr = MAKRti::DtInetAddr::inaddrAny());
58 
61  virtual bool flush();
62 
64 
67  virtual bool processConnection( DtRtiConnection* conn,
68  MAKRti::DtTransportType trans );
69 
73  virtual bool processConnections();
74 
77  virtual DtRtiMsg* getMessage();
78 
82  virtual DtRtiMsg* getMessageWithNetInfo(MAKRti::DtInetAddr *addr, MAKRti::DtTransportType *trans,
83  DtU32 *priority = NULL);
84  virtual MAKRti::DtInetAddr getLastDestAddr() const;
85  virtual MAKRti::DtTransportType getLastTransportType() const;
86 
90 #ifdef DtIFSPEC1516
91  virtual int readFileDescriptor(rti1516::TransportationType transport);
92 #elif defined(DtIFSPEC1516E)
93  virtual int readFileDescriptor(rti1516e::TransportationType transport);
94 #else
95  virtual int readFileDescriptor(RTI::TransportType transport);
96 #endif
97 
98 #if defined(_WIN32)
99 
100 
101 #ifdef DtIFSPEC1516
102  virtual WSAEVENT readFileEvent(rti1516::TransportationType transport);
103 #elif defined(DtIFSPEC1516E)
104  virtual WSAEVENT readFileEvent(rti1516e::TransportationType transport);
105 #else
106  virtual WSAEVENT readFileEvent(RTI::TransportType transport);
107 #endif
108 #endif
109 
111  virtual DtSmRtiConnection* sharedMemConn() const;
112 
116  virtual void setNetConnMgr( DtRtiShmQNetMgr *smNetConnMgr );
117 
119  virtual bool sm_shutdown(bool ruthless = false);
120 
122  virtual bool setupSelectParams(DtSelectParam* params);
123 
125  virtual void setMsgFactory(DtRtiMsgFactory* fact);
126 
128  virtual void listenToMulticastGroup(const MAKRti::DtInetAddr& addr,
129  const MAKRti::DtInetAddr& netInterface = MAKRti::DtInetAddr::inaddrAny());
130  virtual void dropMulticastGroup(const MAKRti::DtInetAddr& addr,
131  const MAKRti::DtInetAddr& netInterface = MAKRti::DtInetAddr::inaddrAny());
132  virtual void forceDropMulticastGroup(const MAKRti::DtInetAddr& addr,
133  const MAKRti::DtInetAddr& netInterface = MAKRti::DtInetAddr::inaddrAny());
134 
138  virtual void connectFederation(
139 #ifdef DtIFSPEC1516
140  rti1516::FederateAmbassador* fedAmb,
141 #elif defined(DtIFSPEC1516E)
143 #else
144  RTI::FederateAmbassador* fedAmb,
145 #endif
146  DtLogicalTimeFactory* logicalTimeFactoryPtr,
147  MAKRti::DtString fedExName,
148  DtFederateHandle fedHandle,
149  int fedExHandle);
150 
153  virtual bool repairFederationConnection();
154 
158  virtual void disconnectFederation();
159 
162  virtual bool wait(MAKRti::DtTime period = 0.0, bool unlockWhileWaiting = false);
163 
166  virtual int subscriberCount() const;
167 
168 
169 protected:
170 
176  virtual void startSharedMemMgr();
177 
181  virtual int initConnections();
182 
185  virtual bool createSharedMemConn();
186 
187 public:
188 
192  static DtConnectionMgr* create(DtRIDParameters* p, bool isFederate = false,
193  DtBoost::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
194  DtBoost::shared_ptr<DtRtiAssistantLrcClient>());
195 
202  static DtConnectionMgr* createQMgr(DtRIDParameters* params, DtU32 numBuckets,
203  DtU32 payloadSize, bool queueReliable,
204  bool forceMgrSubscribe,
205  bool isFederate = false,
206  DtBoost::shared_ptr<DtRtiAssistantLrcClient> assistantClient =
207  DtBoost::shared_ptr<DtRtiAssistantLrcClient>(),
208  DtRtiShmQNetMgr *smNetConnMgr = 0);
209 
210 protected:
212  MAKRti::DtString mySharedMemName;
214 
217  DtU32 myNumBuckets;
221  DtU32 myReadMask;
222 
227  MAKRti::DtInetAddr myLastDestAddr;
228  MAKRti::DtTransportType myLastTransportType;
229 };
230 
231 #endif
232 

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)