MAK RTIspy API Documentation for HLA Evolved
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtFederateCounterProcessor Class Reference

The DtFederateCounterProcessor class consists of filters for FederateCounter messages for forwarder nodes. More...

+ Collaboration diagram for DtFederateCounterProcessor:

List of all members.

Classes

class  PendingRequest
 Simple helper class to hold status of pending Pings. More...

Public Types

typedef bool(DtFederateCounterProcessor::* CounterMsgHandlerMemberCb )(const DtInetAddrAndPort &src, const DtForwarderCounterMsg &msg)
 Pointer to member function callbacks used by the port filters.
typedef bool(DtFederateCounterProcessor::* DestinationProcessingMemberCb )(const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)

Public Member Functions

 DtFederateCounterProcessor (DtBoost::shared_ptr< DtForwarderNode > parent)
 Default Ctor.
virtual ~DtFederateCounterProcessor ()
 Default Dtor.
virtual bool gotMsgToOutPort (const DtInetAddrAndPort &src, const DtForwarderCounterMsg &msg)
 Got Handshake Message from the IN or LAN Port to the OUT Port.
virtual bool processCounterMsgDestinations (const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)
 Set forwarding destination list based on source (eg.

Static Public Member Functions

static int lostConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr, void *usr)
 Connection loss callback.

Protected Types

typedef std::map
< DtInetAddrAndPort,
PendingRequest
DtDestToRequestMap

Protected Member Functions

virtual int lostConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr)
 Connection loss callback.
virtual void sendResponseMsg (const DtInetAddrAndPort &destination, unsigned int federateCount, const DtInetAddrAndPort *addr=0)
 Send a Count Response based on aggregating all downstream WAN responses.
virtual void requestDownstreamCount (const DtInetAddrAndPort &destination)
 Send a new downstream request indicating that the target is upstream (so all recipients should respond with their federate counts)
virtual void requestDownstreamCount (const DtInetAddrAndPort &destination, const DtRouteMap::DtAddressPortList &destinations)
virtual bool processInToOutMsg (const DtInetAddrAndPort &src, const DtForwarderCounterMsg &msg)
 Got Count Message from the IN Port to the OUT Port.
virtual bool processLanToOutMsg (const DtInetAddrAndPort &src, const DtForwarderCounterMsg &msg)
 Got Count Message from the LAN Port to the OUT Port.

Protected Attributes

DtBoost::shared_ptr
< DtForwarderNode
myParent
DtFederateCounterFiltermyMsgToOutFilter
DtDestToRequestMap myPendingRequests
 Map of outstanding Count Requests to Responses.

Detailed Description

The DtFederateCounterProcessor class consists of filters for FederateCounter messages for forwarder nodes.

The FederateCounter algorithm allows forwarder nodes or the rtiexec to obtain a count of all federates downstream from a given node (including federates directly attached to the specified node). Ie - the rtiexec could obtain a complete federate count by querying the node to which it is directly attached.

Basic Algo:


Member Typedef Documentation

typedef bool(DtFederateCounterProcessor::* DtFederateCounterProcessor::CounterMsgHandlerMemberCb)(const DtInetAddrAndPort &src, const DtForwarderCounterMsg &msg)

Pointer to member function callbacks used by the port filters.


Constructor & Destructor Documentation

Default Dtor.

References myMsgToOutFilter, and myParent.


Member Function Documentation

Got Handshake Message from the IN or LAN Port to the OUT Port.

References myParent, DtRtiMsg::print(), processInToOutMsg(), and processLanToOutMsg().

Referenced by DtFederateCounterProcessor().

int DtFederateCounterProcessor::lostConnection ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort connAddr,
void *  usr 
) [static]

Connection loss callback.

Referenced by DtFederateCounterProcessor().

int DtFederateCounterProcessor::lostConnection ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort connAddr 
) [protected, virtual]

Set forwarding destination list based on source (eg.

which inlet the message was received on) and forwarder network configuration

References myParent.

Referenced by DtFederateCounterProcessor().

bool DtFederateCounterProcessor::processInToOutMsg ( const DtInetAddrAndPort src,
const DtForwarderCounterMsg msg 
) [protected, virtual]
bool DtFederateCounterProcessor::processLanToOutMsg ( const DtInetAddrAndPort src,
const DtForwarderCounterMsg msg 
) [protected, virtual]
void DtFederateCounterProcessor::requestDownstreamCount ( const DtInetAddrAndPort destination) [protected, virtual]

Send a new downstream request indicating that the target is upstream (so all recipients should respond with their federate counts)

References DtForwarderCounterMsg::CounterRequestFromUpstreamTarget, DtForwarderIntfcOut, and myParent.

Referenced by processInToOutMsg(), and processLanToOutMsg().

void DtFederateCounterProcessor::requestDownstreamCount ( const DtInetAddrAndPort destination,
const DtRouteMap::DtAddressPortList destinations 
) [protected, virtual]
void DtFederateCounterProcessor::sendResponseMsg ( const DtInetAddrAndPort destination,
unsigned int  federateCount,
const DtInetAddrAndPort addr = 0 
) [protected, virtual]

Send a Count Response based on aggregating all downstream WAN responses.

References DtForwarderCounterMsg::CounterResponse, DtForwarderIntfcLan, DtForwarderIntfcOut, and myParent.

Referenced by lostConnection(), processInToOutMsg(), and processLanToOutMsg().


Member Data Documentation

DtBoost::shared_ptr<DtForwarderNode> DtFederateCounterProcessor::myParent [protected]

Map of outstanding Count Requests to Responses.

Referenced by lostConnection(), processInToOutMsg(), and processLanToOutMsg().


The documentation for this class was generated from the following files:

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)