![]() |
MAK RTIspy API Documentation for HLA 1516
|
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 |
| DtFederateCounterFilter * | myMsgToOutFilter |
| DtDestToRequestMap | myPendingRequests |
| Map of outstanding Count Requests to Responses. | |
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:
| 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) |
|
protected |
| DtFederateCounterProcessor::DtFederateCounterProcessor | ( | DtBoost::shared_ptr< DtForwarderNode > | parent | ) |
Default Ctor.
References gotMsgToOutPort(), lostConnection(), myMsgToOutFilter, myParent, and processCounterMsgDestinations().
|
virtual |
Default Dtor.
References myMsgToOutFilter, and myParent.
|
virtual |
Got Handshake Message from the IN or LAN Port to the OUT Port.
References myParent, DtRtiMsg::print(), processInToOutMsg(), and processLanToOutMsg().
Referenced by DtFederateCounterProcessor().
|
static |
Connection loss callback.
Referenced by DtFederateCounterProcessor().
|
protectedvirtual |
Connection loss callback.
References DtFederateCounterProcessor::PendingRequest::currentCount, DtFederateCounterProcessor::PendingRequest::destinationAddress, myPendingRequests, DtFederateCounterProcessor::PendingRequest::pendingOutResponses, sendResponseMsg(), and DtFederateCounterProcessor::PendingRequest::sourceAddress.
|
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().
|
protectedvirtual |
Got Count Message from the IN Port to the OUT Port.
References DtForwarderCounterMsg::count(), DtForwarderCounterMsg::CounterRequest, DtForwarderCounterMsg::CounterRequestFromUpstreamTarget, DtForwarderCounterMsg::countStatus(), DtFederateCounterProcessor::PendingRequest::currentCount, DtForwarderCounterMsg::destination(), myParent, myPendingRequests, DtForwarderCounterMsg::port(), requestDownstreamCount(), and sendResponseMsg().
Referenced by gotMsgToOutPort().
|
protectedvirtual |
Got Count Message from the LAN Port to the OUT Port.
References DtForwarderCounterMsg::CounterRequest, DtForwarderCounterMsg::countStatus(), DtForwarderCounterMsg::destination(), myParent, myPendingRequests, DtForwarderCounterMsg::port(), requestDownstreamCount(), and sendResponseMsg().
Referenced by gotMsgToOutPort().
|
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().
|
protectedvirtual |
|
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().
|
protected |
Referenced by DtFederateCounterProcessor(), and ~DtFederateCounterProcessor().
|
protected |
|
protected |
Map of outstanding Count Requests to Responses.
Referenced by lostConnection(), processInToOutMsg(), and processLanToOutMsg().