MAK RTIspy API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
federateCounterProcessor.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2005 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: federateCounterProcessor.h,v $ $Revision: 1.4 $ $State: Exp $
7 *********************************************************************/
10 
11 #ifndef DtFederateCounterProcessor_H_
12 #define DtFederateCounterProcessor_H_
13 
14 #include "forwarderNode.h"
15 #include "forwarderCounterMsg.h"
16 #include "routeMap.h"
17 #include "rtiMsConfig.h"
18 
19 #include <vlutil/vlUtil.h>
20 #include <map>
21 #include <set>
22 
24 class DtRtiExecDisconnectFilter;
25 
44 {
45 public:
47  typedef bool (DtFederateCounterProcessor::* CounterMsgHandlerMemberCb)(
48  const DtInetAddrAndPort& src, const DtForwarderCounterMsg& msg );
49  typedef bool (DtFederateCounterProcessor::* DestinationProcessingMemberCb)(
50  const DtInetAddrAndPort& src, DtForwarderPort::DtAddressPortList& destinations );
51 
53  DtFederateCounterProcessor( DtBoost::shared_ptr<DtForwarderNode> parent );
54 
56  virtual ~DtFederateCounterProcessor();
57 
59  virtual bool gotMsgToOutPort( const DtInetAddrAndPort& src,
60  const DtForwarderCounterMsg& msg );
61 
64  virtual bool processCounterMsgDestinations ( const DtInetAddrAndPort& src,
65  DtForwarderPort::DtAddressPortList& destinations );
66 
67 public:
68 
70  static int lostConnection( const MAKRti::DtString& connName,
71  unsigned int connID, const DtInetAddrAndPort& connAddr, void* usr );
72 
73 protected:
74 
76  virtual int lostConnection( const MAKRti::DtString& connName,
77  unsigned int connID, const DtInetAddrAndPort& connAddr );
78 
80  virtual void sendResponseMsg( const DtInetAddrAndPort& destination,
81  unsigned int federateCount, const DtInetAddrAndPort* addr = 0 );
82 
85  virtual void requestDownstreamCount( const DtInetAddrAndPort& destination );
86  virtual void requestDownstreamCount( const DtInetAddrAndPort& destination,
87  const DtRouteMap::DtAddressPortList& destinations );
88 
90  virtual bool processInToOutMsg( const DtInetAddrAndPort& src,
91  const DtForwarderCounterMsg& msg );
92 
94  virtual bool processLanToOutMsg( const DtInetAddrAndPort& src,
95  const DtForwarderCounterMsg& msg );
96 
97 
98 protected:
99 
102  {
103  public:
105  currentCount( 0 ),
106  destinationAddress(),
107  sourceAddress(),
108  pendingOutResponses() {}
109 
111  const DtRouteMap::DtAddressPortList& expectedOutResponses ) :
112  currentCount( 0 ),
113  destinationAddress( dest ),
114  sourceAddress( src ),
115  pendingOutResponses( expectedOutResponses ) {}
116 
117  unsigned int currentCount;
121  };
122 
123  typedef std::map< DtInetAddrAndPort, PendingRequest > DtDestToRequestMap;
124 
125 protected:
126 
127  DtBoost::shared_ptr<DtForwarderNode> myParent;
129 
132 
133 };
134 
135 #endif
136 

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)