MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rtiExecHandshakeProcessor.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: rtiExecHandshakeProcessor.h,v $ $Revision: 1.8 $ $State: Exp $
7 *********************************************************************/
10 
11 #ifndef DtRtiExecHandshakeProcessor_H_
12 #define DtRtiExecHandshakeProcessor_H_
13 
14 #include "forwarderNode.h"
15 #include "execHandshakeMsg.h"
16 #include "routeMap.h"
17 #include "rtiMsConfig.h"
18 
19 #include <vlutil/vlUtil.h>
20 #include <map>
21 #include <set>
22 
25 template< typename ParentType > class DtRtiExecConnectionFilter;
28 
38 {
39 public:
41  typedef bool (DtRtiExecHandshakeProcessor::* HandshakeMsgHandlerMemberCb)(
42  const DtInetAddrAndPort& src, const DtRtiExecHandshakeMsg& msg );
43  typedef bool (DtRtiExecHandshakeProcessor::* DestinationProcessingMemberCb)(
44  const DtInetAddrAndPort& src, DtForwarderPort::DtAddressPortList& destinations );
45 
47  DtRtiExecHandshakeProcessor( DtBoost::shared_ptr<DtForwarderNode> parent );
48 
50  virtual ~DtRtiExecHandshakeProcessor();
51 
53  virtual bool gotMsgToLanPort( const DtInetAddrAndPort& src,
54  const DtRtiExecHandshakeMsg& msg );
55 
57  virtual bool gotMsgToOutPort( const DtInetAddrAndPort& src,
58  const DtRtiExecHandshakeMsg& msg );
59 
61  virtual bool gotRtiExecConnect( const DtInetAddrAndPort& src,
62  const DtRtiExecConnectMsg& msg );
63 
65  virtual bool gotRtiExecDisconnect( const DtInetAddrAndPort& src,
66  const DtRtiExecDisconnectMsg& msg );
67 
70  virtual bool processExecHandshakeDestinations ( const DtInetAddrAndPort& src,
71  DtForwarderPort::DtAddressPortList& destinations );
72 
75  virtual bool ignoreExecHandshakeDestinations ( const DtInetAddrAndPort& src,
76  DtForwarderPort::DtAddressPortList& destinations );
77 
80  virtual bool ignoreExecConnectDestinations ( const DtInetAddrAndPort& src,
81  DtForwarderPort::DtAddressPortList& destinations );
82 
84  virtual bool isLocalGroupMember( const DtInetAddrAndPort& addr );
85  virtual DtInetAddrAndPort locateGroupPortal( const DtInetAddrAndPort& addr );
86 
88  virtual DtInetAddrAndPort localNodeAddress();
89 
90 public:
91 
93  static int lostConnection( const MAKRti::DtString& connName, unsigned int connID,
94  const DtInetAddrAndPort& connAddr, void* usr );
95 
96 protected:
97 
99  virtual int lostConnection( const MAKRti::DtString& connName,
100  unsigned int connID, const DtInetAddrAndPort& connAddr );
101 
104  virtual void sendResponseMsg( DtRtiExecHandshakeMsg::DtHandshakeStatus status,
105  DtHandle src, DtHandle dest, const MAKRti::DtString& hostName, bool fullyCompliant,
106  const DtInetAddrAndPort* addr = 0 );
107 
109  virtual bool processInToOutMsg( const DtInetAddrAndPort& src,
110  const DtRtiExecHandshakeMsg& msg );
111 
113  virtual bool processLanToOutMsg( const DtInetAddrAndPort& src,
114  const DtRtiExecHandshakeMsg& msg );
115 
116 
117 protected:
118 
120  typedef std::set< unsigned int > DtConnIdList;
121  typedef std::map< unsigned int, PendingRequest > DtConnIdToRequestMap;
122 
125  {
126  public:
127  typedef std::set< unsigned int > DtConnIdList;
128 
130  currentStatus( DtRtiExecHandshakeMsg::HsResponseGranted ),
131  destinationHandle( 0 ),
132  sourceHandle( 0 ),
133  sourceAddress(),
134  pendingOutResponses(),
135  pendingLanResponses() {}
136 
137  PendingRequest( const DtInetAddrAndPort& src, DtHandle destHandle,
138  DtHandle srcHandle,
139  const DtRouteMap::DtAddressPortList& expectedOutResponses,
140  const DtConnIdList& expectedLanResponses ) :
141  currentStatus( DtRtiExecHandshakeMsg::HsResponseGranted ),
142  destinationHandle( destHandle ),
143  sourceHandle( srcHandle ),
144  sourceAddress( src ),
145  pendingOutResponses( expectedOutResponses ),
146  pendingLanResponses( expectedLanResponses ) {}
147 
154  };
155 
156 
157 protected:
158 
159  DtBoost::shared_ptr<DtForwarderNode> myParent;
163 
166 
169 
173 
174 };
175 
176 #endif
177 

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)