MAK RTIspy API Documentation for HLA 1516
List of all members | 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:

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.

typedef bool(DtFederateCounterProcessor::* DtFederateCounterProcessor::DestinationProcessingMemberCb)(const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)

Constructor & Destructor Documentation

DtFederateCounterProcessor::DtFederateCounterProcessor ( DtBoost::shared_ptr< DtForwarderNode parent)
DtFederateCounterProcessor::~DtFederateCounterProcessor ( )
virtual

Default Dtor.

References myMsgToOutFilter, and myParent.

Member Function Documentation

bool DtFederateCounterProcessor::gotMsgToOutPort ( const DtInetAddrAndPort src,
const DtForwarderCounterMsg msg 
)
virtual

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 
)
protectedvirtual
bool DtFederateCounterProcessor::processCounterMsgDestinations ( const DtInetAddrAndPort src,
DtForwarderPort::DtAddressPortList destinations 
)
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 
)
protectedvirtual
bool DtFederateCounterProcessor::processLanToOutMsg ( const DtInetAddrAndPort src,
const DtForwarderCounterMsg msg 
)
protectedvirtual
void DtFederateCounterProcessor::requestDownstreamCount ( const DtInetAddrAndPort destination)
protectedvirtual

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 
)
protectedvirtual
void DtFederateCounterProcessor::sendResponseMsg ( const DtInetAddrAndPort destination,
unsigned int  federateCount,
const DtInetAddrAndPort addr = 0 
)
protectedvirtual

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

DtFederateCounterFilter* DtFederateCounterProcessor::myMsgToOutFilter
protected
DtBoost::shared_ptr<DtForwarderNode> DtFederateCounterProcessor::myParent
protected
DtDestToRequestMap DtFederateCounterProcessor::myPendingRequests
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 Fri Mar 14 19:08:55 EDT 2014 from SVN revision 137085
Copyright © 2005-2014 VT MÄK Inc. All Rights Reserved (www.mak.com)