MAK RTIspy API Documentation for HLA 1.3
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtForwarderPingProcessor Class Reference

The DtForwarderPingProcessor class consists of filters for ForwarderPing messages for forwarder nodes. More...

+ Collaboration diagram for DtForwarderPingProcessor:

Classes

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

Public Types

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

Public Member Functions

 DtForwarderPingProcessor (DtBoost::shared_ptr< DtForwarderNode > parent)
 Default Ctor.
virtual ~DtForwarderPingProcessor ()
 Default Dtor.
virtual bool gotMsgToLanPort (const DtInetAddrAndPort &src, const DtForwarderPingMsg &msg)
 Got Ping Message at the IN Port, drop the message at IN to LAN processor.
virtual bool gotMsgToOutPort (const DtInetAddrAndPort &src, const DtForwarderPingMsg &msg)
 Got Ping Message from the IN or LAN Port to the OUT Port.
virtual bool processPingMsgDestinations (const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)
 Set forwarding destination list based on source (eg.
virtual bool ignorePingMsgToLan (const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)
 Ping messages are never forwarded out the LAN port and will be filtered out by gotMsgToLanPort anyway, so there's no destination processing necessary.

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< unsigned
long, PendingRequest
DtDestToRequestMap

Protected Member Functions

virtual int lostConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &connAddr)
 Connection loss callback.
virtual void sendResponseMsg (unsigned long target, DtForwarderPingMsg::DtPingStatus status, const DtInetAddrAndPort *addr=0)
 Send a ping Response based on aggregating all Local responses and all downstream WAN responses.
virtual bool processInToOutMsg (const DtInetAddrAndPort &src, const DtForwarderPingMsg &msg)
 Got ping Message from the IN Port to the OUT Port.
virtual bool processLanToOutMsg (const DtInetAddrAndPort &src, const DtForwarderPingMsg &msg)
 Got ping Message from the LAN Port to the OUT Port.

Protected Attributes

DtBoost::shared_ptr
< DtForwarderNode
myParent
DtForwarderPingFiltermyMsgToLanFilter
DtForwarderPingFiltermyMsgToOutFilter
DtDestToRequestMap myPendingRequests
 Map of outstanding Ping Requests to Responses.

Detailed Description

The DtForwarderPingProcessor class consists of filters for ForwarderPing messages for forwarder nodes.

The Ping algorithm allows a node or an RTI Exec to determine whether a path exists to a specified downstream node (NOTE: - currently does not handle pinging federates, but this could be added)

Member Typedef Documentation

typedef bool(DtForwarderPingProcessor::* DtForwarderPingProcessor::DestinationProcessingMemberCb)(const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)
typedef std::map< unsigned long, PendingRequest > DtForwarderPingProcessor::DtDestToRequestMap
protected
typedef bool(DtForwarderPingProcessor::* DtForwarderPingProcessor::PingMsgHandlerMemberCb)(const DtInetAddrAndPort &src, const DtForwarderPingMsg &msg)

Pointer to member function callbacks used by the port filters.

Constructor & Destructor Documentation

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

Default Dtor.

References myMsgToLanFilter, myMsgToOutFilter, and myParent.

Member Function Documentation

bool DtForwarderPingProcessor::gotMsgToLanPort ( const DtInetAddrAndPort src,
const DtForwarderPingMsg msg 
)
virtual

Got Ping Message at the IN Port, drop the message at IN to LAN processor.

Referenced by DtForwarderPingProcessor().

bool DtForwarderPingProcessor::gotMsgToOutPort ( const DtInetAddrAndPort src,
const DtForwarderPingMsg msg 
)
virtual

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

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

Referenced by DtForwarderPingProcessor().

bool DtForwarderPingProcessor::ignorePingMsgToLan ( const DtInetAddrAndPort src,
DtForwarderPort::DtAddressPortList destinations 
)
virtual

Ping messages are never forwarded out the LAN port and will be filtered out by gotMsgToLanPort anyway, so there's no destination processing necessary.

This method is just a dummy for the filter ctor.

Referenced by DtForwarderPingProcessor().

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

Connection loss callback.

Referenced by DtForwarderPingProcessor().

int DtForwarderPingProcessor::lostConnection ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort connAddr 
)
protectedvirtual
bool DtForwarderPingProcessor::processInToOutMsg ( const DtInetAddrAndPort src,
const DtForwarderPingMsg msg 
)
protectedvirtual
bool DtForwarderPingProcessor::processLanToOutMsg ( const DtInetAddrAndPort src,
const DtForwarderPingMsg msg 
)
protectedvirtual
bool DtForwarderPingProcessor::processPingMsgDestinations ( 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 DtForwarderPingProcessor().

void DtForwarderPingProcessor::sendResponseMsg ( unsigned long  target,
DtForwarderPingMsg::DtPingStatus  status,
const DtInetAddrAndPort addr = 0 
)
protectedvirtual

Send a ping Response based on aggregating all Local responses and all downstream WAN responses.

References DtForwarderIntfcLan, DtForwarderIntfcOut, and myParent.

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

Member Data Documentation

DtForwarderPingFilter* DtForwarderPingProcessor::myMsgToLanFilter
protected
DtForwarderPingFilter* DtForwarderPingProcessor::myMsgToOutFilter
protected
DtBoost::shared_ptr<DtForwarderNode> DtForwarderPingProcessor::myParent
protected
DtDestToRequestMap DtForwarderPingProcessor::myPendingRequests
protected

Map of outstanding Ping Requests to Responses.

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


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

Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)