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

The DtNetworkMapProcessor class registers filters for NetworkMap messages and merges them into the complete map. More...

+ Collaboration diagram for DtNetworkMapProcessor:

List of all members.

Classes

struct  PendingRequest
 Simple helper class to hold status of pending requests. More...

Public Types

typedef bool(DtNetworkMapProcessor::* NetworkMapMsgReqHandlerMemberCb )(const DtInetAddrAndPort &src, const DtNetworkMapReqMsg &msg)
 Pointer to member function callbacks used by the port filters.
typedef bool(DtNetworkMapProcessor::* NetworkMapMsgRspHandlerMemberCb )(const DtInetAddrAndPort &src, const DtNetworkMapRspMsg &msg)
typedef bool(DtNetworkMapProcessor::* DestinationProcessingMemberCb )(const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations)
typedef void(* NetworkMapRequestCompletedCb )(DtNetworkMapRspMsg &msg, void *usr)
 Pointer to function callback used by owner to register for completed Response events.
typedef std::list< std::pair
< NetworkMapRequestCompletedCb,
void * > > 
RequestCompleteCallbackList

Public Member Functions

 DtNetworkMapProcessor (DtBoost::shared_ptr< DtForwarderNode > parent)
 Default Ctor.
virtual ~DtNetworkMapProcessor ()
 Default Dtor.
virtual bool gotNetworkMapRequest (const DtInetAddrAndPort &src, const DtNetworkMapReqMsg &msg)
 Handle a new request for a network map from either :
virtual bool gotNetworkMapResponse (const DtInetAddrAndPort &src, const DtNetworkMapRspMsg &msg)
 Handle an incoming response to a network map request from either :
virtual void addRequestCompletedCb (NetworkMapRequestCompletedCb fn, void *usr)
 (Un)Register a callback function to be called when a request is completed NOTE: callback is only fired when network map is final (not for intermediate response messages)
virtual void removeRequestCompletedCb (NetworkMapRequestCompletedCb fn, void *usr)
virtual bool processNetworkMapMsgDestinations (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 &addr, void *usr)
 Connection loss callback.

Protected Types

typedef DtBoost::shared_ptr
< PendingRequest
PendingRequestSP
typedef std::map< unsigned
long, PendingRequestSP
RequestorToRequestsMap

Protected Member Functions

virtual int lostConnection (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &addr)
 Connection loss callback.
virtual void sendResponseMsg (PendingRequestSP request)
 Send a Network Map Response based on aggregating all downstream WAN responses.
virtual void sendRequestMsg (PendingRequestSP request)
 Send a new downstream request to the LAN and OUT ports indicating that the source is upstream ( for messages from the IN Port, only send to downstream nodes on the OUT port)
virtual bool processInToOutRspMsg (const DtInetAddrAndPort &src, const DtNetworkMapRspMsg &msg)
 Got Network Map response from the IN Port to the OUT Port.
virtual bool processLanToOutRspMsg (const DtInetAddrAndPort &src, const DtNetworkMapRspMsg &msg)
 Got Network Map response from the LAN Port to the OUT Port.

Protected Attributes

DtBoost::shared_ptr
< DtForwarderNode
myParent
DtNetworkMapFiltermyMsgToOutFilter
MAKRti::DtString myNodeName
unsigned long myConnId
DtInetAddrAndPort myIp
DtNetMapForwarderXmlBlock::SiblingList mySiblingForwarders
RequestCompleteCallbackList myCompletedRequestCallbacks
 List of callback functions to be called when a request is complete.
RequestorToRequestsMap myPendingRequests
 Map of outstanding Network Map Requests by requestor ID to pending requests.

Detailed Description

The DtNetworkMapProcessor class registers filters for NetworkMap messages and merges them into the complete map.

The NetworkMap algorithm allows forwarder nodes or the rtiexec to obtain a complete view of all RTI components downstream from a given node ( including components directly attached to the specified node ). NOTES:

ALGO: http://intranet.mak.com/index.php/ MAK_RTI:Specification::Web_Spy::Building_the_Network_Map_at_Runtime


Member Typedef Documentation

typedef bool(DtNetworkMapProcessor::* DtNetworkMapProcessor::NetworkMapMsgReqHandlerMemberCb)(const DtInetAddrAndPort &src, const DtNetworkMapReqMsg &msg)

Pointer to member function callbacks used by the port filters.

typedef bool(DtNetworkMapProcessor::* DtNetworkMapProcessor::NetworkMapMsgRspHandlerMemberCb)(const DtInetAddrAndPort &src, const DtNetworkMapRspMsg &msg)

Pointer to function callback used by owner to register for completed Response events.

typedef DtBoost::shared_ptr<PendingRequest> DtNetworkMapProcessor::PendingRequestSP [protected]
typedef std::map< unsigned long, PendingRequestSP > DtNetworkMapProcessor::RequestorToRequestsMap [protected]

Constructor & Destructor Documentation

Default Dtor.

References myMsgToOutFilter, and myParent.


Member Function Documentation

(Un)Register a callback function to be called when a request is completed NOTE: callback is only fired when network map is final (not for intermediate response messages)

References myCompletedRequestCallbacks.

Referenced by DtForwarderWebManager::DtForwarderWebManager().

Handle a new request for a network map from either :

  • a local connection (generally either from the LAN port, or from the local web-client)
  • or from the IN Port (an upstream forwarder is passing the request down)

References myConnId, myIp, myNodeName, myParent, myPendingRequests, mySiblingForwarders, DtRtiMsg::print(), DtNetworkMapReqMsg::requestorId(), sendRequestMsg(), sendResponseMsg(), and DtNetworkMapReqMsg::sourceId().

Referenced by DtNetworkMapProcessor(), and DtForwarderWebManager::issueNetworkMapRequest().

Handle an incoming response to a network map request from either :

  • the LAN Port ( ie - the list of local connections)
  • the IN Port ( ie - the portion of the network map downstream from that connection )

References myParent, DtRtiMsg::print(), processInToOutRspMsg(), and processLanToOutRspMsg().

Referenced by DtNetworkMapProcessor().

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

Connection loss callback.

  • need to track connection losses in order to close pending requests
  • no need to track new connections (they will simply not be shown in the network map currently being built )

Referenced by DtNetworkMapProcessor().

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

Connection loss callback.

References myParent, myPendingRequests, and sendResponseMsg().

bool DtNetworkMapProcessor::processInToOutRspMsg ( const DtInetAddrAndPort src,
const DtNetworkMapRspMsg msg 
) [protected, virtual]
bool DtNetworkMapProcessor::processLanToOutRspMsg ( const DtInetAddrAndPort src,
const DtNetworkMapRspMsg msg 
) [protected, virtual]

Got Network Map response from the LAN Port to the OUT Port.

References myPendingRequests, DtNetworkMapRspMsg::payload(), DtNetworkMapRspMsg::requestorId(), and sendResponseMsg().

Referenced by gotNetworkMapResponse().

Set forwarding destination list based on source (eg.

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

References myParent.

Referenced by DtNetworkMapProcessor().

Send a new downstream request to the LAN and OUT ports indicating that the source is upstream ( for messages from the IN Port, only send to downstream nodes on the OUT port)

References DtForwarderIntfcLan, DtForwarderIntfcOut, myConnId, and myParent.

Referenced by gotNetworkMapRequest().

Send a Network Map Response based on aggregating all downstream WAN responses.

References DtForwarderIntfcLan, DtForwarderIntfcOut, myCompletedRequestCallbacks, and myParent.

Referenced by gotNetworkMapRequest(), lostConnection(), processInToOutRspMsg(), and processLanToOutRspMsg().


Member Data Documentation

List of callback functions to be called when a request is complete.

Referenced by addRequestCompletedCb(), removeRequestCompletedCb(), and sendResponseMsg().

unsigned long DtNetworkMapProcessor::myConnId [protected]
MAKRti::DtString DtNetworkMapProcessor::myNodeName [protected]
DtBoost::shared_ptr<DtForwarderNode> DtNetworkMapProcessor::myParent [protected]

Map of outstanding Network Map Requests by requestor ID to pending requests.

Referenced by gotNetworkMapRequest(), lostConnection(), processInToOutRspMsg(), and processLanToOutRspMsg().


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)