![]() |
MAK RTIspy API Documentation for HLA Evolved
|
The DtNetworkMapProcessor class registers filters for NetworkMap messages and merges them into the complete map. More...
Collaboration diagram for DtNetworkMapProcessor: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 |
| DtNetworkMapFilter * | myMsgToOutFilter |
| 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. | |
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
| typedef bool(DtNetworkMapProcessor::* DtNetworkMapProcessor::DestinationProcessingMemberCb)(const DtInetAddrAndPort &src, DtForwarderPort::DtAddressPortList &destinations) |
| 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) |
| typedef void(* DtNetworkMapProcessor::NetworkMapRequestCompletedCb)(DtNetworkMapRspMsg &msg, void *usr) |
Pointer to function callback used by owner to register for completed Response events.
typedef DtBoost::shared_ptr<PendingRequest> DtNetworkMapProcessor::PendingRequestSP [protected] |
| typedef std::list< std::pair< NetworkMapRequestCompletedCb, void* > > DtNetworkMapProcessor::RequestCompleteCallbackList |
typedef std::map< unsigned long, PendingRequestSP > DtNetworkMapProcessor::RequestorToRequestsMap [protected] |
| DtNetworkMapProcessor::DtNetworkMapProcessor | ( | DtBoost::shared_ptr< DtForwarderNode > | parent | ) |
Default Ctor.
References DtNetworkMapFilter, gotNetworkMapRequest(), gotNetworkMapResponse(), lostConnection(), myIp, myMsgToOutFilter, myNodeName, myParent, mySiblingForwarders, and processNetworkMapMsgDestinations().
| DtNetworkMapProcessor::~DtNetworkMapProcessor | ( | ) | [virtual] |
Default Dtor.
References myMsgToOutFilter, and myParent.
| void DtNetworkMapProcessor::addRequestCompletedCb | ( | NetworkMapRequestCompletedCb | fn, |
| void * | usr | ||
| ) | [virtual] |
(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().
| bool DtNetworkMapProcessor::gotNetworkMapRequest | ( | const DtInetAddrAndPort & | src, |
| const DtNetworkMapReqMsg & | msg | ||
| ) | [virtual] |
Handle a new request for a network map from either :
References myConnId, myIp, myNodeName, myParent, myPendingRequests, mySiblingForwarders, DtRtiMsg::print(), DtNetworkMapReqMsg::requestorId(), sendRequestMsg(), sendResponseMsg(), and DtNetworkMapReqMsg::sourceId().
Referenced by DtNetworkMapProcessor(), and DtForwarderWebManager::issueNetworkMapRequest().
| bool DtNetworkMapProcessor::gotNetworkMapResponse | ( | const DtInetAddrAndPort & | src, |
| const DtNetworkMapRspMsg & | msg | ||
| ) | [virtual] |
Handle an incoming response to a network map request from either :
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.
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] |
Got Network Map response from the IN Port to the OUT Port.
References DtNetMapXmlBlock::childForwarders(), myPendingRequests, DtNetworkMapRspMsg::payload(), DtNetworkMapRspMsg::requestorId(), sendResponseMsg(), and DtNetworkMapRspMsg::sourceId().
Referenced by gotNetworkMapResponse().
| 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().
| bool DtNetworkMapProcessor::processNetworkMapMsgDestinations | ( | 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 DtNetworkMapProcessor().
| void DtNetworkMapProcessor::removeRequestCompletedCb | ( | NetworkMapRequestCompletedCb | fn, |
| void * | usr | ||
| ) | [virtual] |
References myCompletedRequestCallbacks.
Referenced by DtForwarderWebManager::~DtForwarderWebManager().
| void DtNetworkMapProcessor::sendRequestMsg | ( | DtNetworkMapProcessor::PendingRequestSP | requestSP | ) | [protected, virtual] |
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().
| void DtNetworkMapProcessor::sendResponseMsg | ( | DtNetworkMapProcessor::PendingRequestSP | requestSP | ) | [protected, virtual] |
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().
List of callback functions to be called when a request is complete.
Referenced by addRequestCompletedCb(), removeRequestCompletedCb(), and sendResponseMsg().
unsigned long DtNetworkMapProcessor::myConnId [protected] |
Referenced by gotNetworkMapRequest(), and sendRequestMsg().
DtInetAddrAndPort DtNetworkMapProcessor::myIp [protected] |
Referenced by DtNetworkMapProcessor(), and gotNetworkMapRequest().
Referenced by DtNetworkMapProcessor(), and ~DtNetworkMapProcessor().
MAKRti::DtString DtNetworkMapProcessor::myNodeName [protected] |
Referenced by DtNetworkMapProcessor(), and gotNetworkMapRequest().
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().
Referenced by DtNetworkMapProcessor(), and gotNetworkMapRequest().