![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Inheritance diagram for DtExtendedRtiMsgForwarder:
Collaboration diagram for DtExtendedRtiMsgForwarder:Public Types | |
| typedef DtThreadSafeBufferQueue< char > | DtCharBufferQueue |
Public Member Functions | |
| virtual | ~DtExtendedRtiMsgForwarder () |
| Default Dtor. | |
| virtual void | applyFilters () |
| Instruct the forwarder to register all filters - called after all desired filters are registered (accessor for protected base member: applyRegisteredFilters) | |
| virtual void | sendByTransport (const DtForwarderPort::DtForwarderMsg &msg) |
| Check transport metadata and send message to appropriate socket(s) | |
| virtual void | sendToAllReliable (const DtForwarderPort::DtForwarderMsg &msg) |
| Apply registered filters and send message to unfiltered TCP sockets. | |
| virtual void | sendBestEffort (const DtForwarderPort::DtForwarderMsg &msg) |
| Apply registered filters and send message to LAN via UDP socket. | |
| virtual void | sendMessageToWan (const DtRtiMsg &msg) |
| Allow filters to send messages only to the WAN (not back to the LAN) (useful to distributed forwarder mode filters) | |
| virtual bool | flush () |
| Send buffered messages. | |
| virtual const DtCharBufferQueue::Buffer * | getNextMsg () |
| Get the next message received from the connected sockets. | |
| virtual void | selectParams (MAKRti::DtSelectParamWithWrite &selectParams) |
| Get a set of file descriptors to select against for socket notification. | |
| virtual DtForwarderPort::DtAddressPortList | newConnections () const |
| Get the list of connections created since last call. | |
| virtual DtForwarderPort::DtAddressPortList | droppedConnections () const |
| Get the list of connections lost since last call. | |
| virtual DtForwarderPort::DtAddressPortList | connections () const |
| Get the list of all current connections to this port. | |
| virtual void | listenToMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| Listen / drop multicast groups. | |
| virtual void | dropMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| virtual void | federateJoined (const MAKRti::DtString &, const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, const MAKRti::DtString &, unsigned int, const MAKRti::DtString &, const MAKRti::DtString &, DtHlaVersionId) |
| callbacks when the federate tracking filter notices a federate join/resign event. | |
| virtual void | federateResigned (const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &) |
| virtual void | updateSocketQueueStatus (unsigned int connId, int connQueueStatus) |
| virtual void | addFederateJoinedCb (DtForwarderPort::DtFederateAddedCb callback, void *usr) |
| virtual void | addFederateResignedCb (DtForwarderPort::DtFederateRemovedCb callback, void *usr) |
| virtual void | addSocketAdditionCb (DtForwarderPort::DtConnectionChangeCb cb, void *usr) |
| virtual void | addSocketRemovalCb (DtForwarderPort::DtConnectionChangeCb cb, void *usr) |
| virtual void | addSocketQueueCb (DtForwarderPort::DtSocketQueueCb cb, void *usr) |
| virtual void | addExecConnectionEstablishedCb (DtForwarderPort::DtExecAddChangeCb callback, void *usr) |
| Register/Unregister a callback for new connections. | |
| virtual void | removeExecConnectionEstablishedCb (DtForwarderPort::DtExecAddChangeCb callback, void *usr) |
| virtual void | addExecConnectionLostCb (DtForwarderPort::DtExecRemovedChangeCb callback, void *usr) |
| Register/Unregister a callback for new connections. | |
| virtual void | removeExecConnectionLostCb (DtForwarderPort::DtExecRemovedChangeCb callback, void *usr) |
| virtual const DtFederateTrackingFilter * | fedHandleTrackingFilter () const |
Static Public Member Functions | |
| static DtExtendedRtiMsgForwarder * | create (unsigned int id, const DtRIDParameters ¶ms, bool postMessagesToParent=true) |
| Creator. | |
Static Public Attributes | |
| static const unsigned int | theForwarderId |
| Address space for connection IDs for this LAN. | |
Protected Types | |
| typedef std::pair < DtInetAddrAndPort, int > | DtAddressAndSockIdPair |
| typedef std::pair< bool, DtAddressAndSockIdPair > | DtBoolAddressSocketIdPair |
| These lists are mutable since they are simply used to cache a reflection of back-end thread lists (rather than requiring synchronization) | |
Protected Member Functions | |
| DtExtendedRtiMsgForwarder (unsigned long id, const DtRIDParameters ¶ms, bool postMessagesToParent=true) | |
| Default Ctor. | |
| virtual void | init () |
| Virtual ctor idiom (continues initialization after both base and derived are initialized) | |
| virtual void | tcpSocketAdditionCb (DtTcpMsgSocket *sock) |
| Over-ride socket addition/removal callback to track socket list. | |
| virtual void | tcpSocketRemovalCb (DtTcpMsgSocket *sock) |
| virtual void | refreshConnectionList () const |
| Get all changes to connections since last call This method is const so that const front-end threads can call it. | |
Protected Attributes | |
| DtUdpMsgSocket * | myUdpRcvSocket |
| DtUdpMsgSocket * | myUdpSendSocket |
| std::auto_ptr < DtCharBufferQueue::Buffer > | myLastReceivedMsg |
| DtCharBufferQueue | myInMsgQueue |
| DtCharBufferQueue | myOutMsgQueue |
| DtMessageBufferFilter * | myOutMsgFilter |
| DtNetworkMapLanRequestFilter * | myNetMapRequestFilter |
| DtFederateTrackingFilter * | myFedHandleTracker |
| DtClock | myClock |
| Local timer. | |
| MAKRti::DtTime | myLastDiscoveryTickTime |
| Time of last pass for mcast discovery. | |
| DtForwarderPort::DtFederateAddedCallbackList | myFederateJoinedCbs |
| DtForwarderPort::DtFederateRemovedCallbackList | myFederateResignedCbs |
| DtForwarderPort::DtSocketQueueCallbackList | mySocketQueueCbs |
| DtForwarderPort::DtCallbackList | mySocketAddedCbs |
| DtForwarderPort::DtCallbackList | mySocketRemovedCbs |
| DtThreadSafeQueue < DtBoolAddressSocketIdPair > | mySocketListChanges |
| std::set< DtAddressAndSockIdPair > | myConnections |
| DtForwarderPort::DtAddressPortList | myNewConnections |
| DtForwarderPort::DtAddressPortList | myDroppedConnections |
| bool | myForwardMessagesToParent |
| Should the local forwarder pass a copy of all messages on to the Parent or simply forward within the local LAN (allows optimization when this is a stand-alone forwarder) | |
typedef std::pair< DtInetAddrAndPort, int > DtExtendedRtiMsgForwarder::DtAddressAndSockIdPair [protected] |
typedef std::pair< bool, DtAddressAndSockIdPair > DtExtendedRtiMsgForwarder::DtBoolAddressSocketIdPair [protected] |
These lists are mutable since they are simply used to cache a reflection of back-end thread lists (rather than requiring synchronization)
| DtExtendedRtiMsgForwarder::DtExtendedRtiMsgForwarder | ( | unsigned long | id, |
| const DtRIDParameters & | params, | ||
| bool | postMessagesToParent = true |
||
| ) | [protected] |
Default Ctor.
Referenced by create().
| DtExtendedRtiMsgForwarder::~DtExtendedRtiMsgForwarder | ( | ) | [virtual] |
Default Dtor.
References myFedHandleTracker, myNetMapRequestFilter, myOutMsgFilter, myUdpSendSocket, and DtRtiMsgForwarder::removePacketFilter().
| void DtExtendedRtiMsgForwarder::addExecConnectionEstablishedCb | ( | DtForwarderPort::DtExecAddChangeCb | callback, |
| void * | usr | ||
| ) | [virtual] |
Register/Unregister a callback for new connections.
References DtRtiExecTrackingFilter::addExecConnectionEstablishedCb(), and DtRtiMsgForwarder::myRtiExecMonitor.
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::addExecConnectionLostCb | ( | DtForwarderPort::DtExecRemovedChangeCb | callback, |
| void * | usr | ||
| ) | [virtual] |
Register/Unregister a callback for new connections.
References DtRtiExecTrackingFilter::addExecConnectionLostCb(), and DtRtiMsgForwarder::myRtiExecMonitor.
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::addFederateJoinedCb | ( | DtForwarderPort::DtFederateAddedCb | callback, |
| void * | usr | ||
| ) | [virtual] |
References myFederateJoinedCbs.
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::addFederateResignedCb | ( | DtForwarderPort::DtFederateRemovedCb | callback, |
| void * | usr | ||
| ) | [virtual] |
References myFederateResignedCbs.
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::addSocketAdditionCb | ( | DtForwarderPort::DtConnectionChangeCb | cb, |
| void * | usr | ||
| ) | [virtual] |
References mySocketAddedCbs.
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::addSocketQueueCb | ( | DtForwarderPort::DtSocketQueueCb | cb, |
| void * | usr | ||
| ) | [virtual] |
References mySocketQueueCbs.
| void DtExtendedRtiMsgForwarder::addSocketRemovalCb | ( | DtForwarderPort::DtConnectionChangeCb | cb, |
| void * | usr | ||
| ) | [virtual] |
References mySocketRemovedCbs.
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::applyFilters | ( | ) | [virtual] |
Instruct the forwarder to register all filters - called after all desired filters are registered (accessor for protected base member: applyRegisteredFilters)
References DtRtiMsgForwarder::applyRegisteredFilters().
Referenced by DtLanForwarderPort::DtLanForwarderPort().
| DtForwarderPort::DtAddressPortList DtExtendedRtiMsgForwarder::connections | ( | ) | const [virtual] |
Get the list of all current connections to this port.
References myConnections, and refreshConnectionList().
Referenced by DtLanForwarderPort::connections().
| DtExtendedRtiMsgForwarder * DtExtendedRtiMsgForwarder::create | ( | unsigned int | id, |
| const DtRIDParameters & | params, | ||
| bool | postMessagesToParent = true |
||
| ) | [static] |
Creator.
References DtExtendedRtiMsgForwarder(), and init().
| void DtExtendedRtiMsgForwarder::dropMulticastGroup | ( | const MAKRti::DtInetAddr & | mcastAddr | ) | [virtual] |
References DtUdpMsgSocket::dropMulticastGroup(), and myUdpRcvSocket.
Referenced by DtLanForwarderPort::dropMulticastGroup().
| DtForwarderPort::DtAddressPortList DtExtendedRtiMsgForwarder::droppedConnections | ( | ) | const [virtual] |
Get the list of connections lost since last call.
References myDroppedConnections, and refreshConnectionList().
| void DtExtendedRtiMsgForwarder::federateJoined | ( | const MAKRti::DtString & | federateName, |
| const MAKRti::DtString & | federateType, | ||
| const MAKRti::DtString & | federationName, | ||
| unsigned int | connectId, | ||
| unsigned int | fedHandle, | ||
| const DtInetAddrAndPort & | connAddr, | ||
| const MAKRti::DtString & | connHost, | ||
| unsigned int | processId, | ||
| const MAKRti::DtString & | processName, | ||
| const MAKRti::DtString & | commandArgs, | ||
| DtHlaVersionId | hlaVersion | ||
| ) | [virtual] |
callbacks when the federate tracking filter notices a federate join/resign event.
References myFederateJoinedCbs.
Referenced by DtFederateTrackingFilter::handleJoinConfirmMsg().
| void DtExtendedRtiMsgForwarder::federateResigned | ( | const MAKRti::DtString & | federateName, |
| const MAKRti::DtString & | federateType, | ||
| unsigned int | connectId, | ||
| unsigned int | fedHandle, | ||
| const DtInetAddrAndPort & | connAddr | ||
| ) | [virtual] |
References myFederateResignedCbs.
Referenced by DtFederateTrackingFilter::handleResignMsg().
| virtual const DtFederateTrackingFilter* DtExtendedRtiMsgForwarder::fedHandleTrackingFilter | ( | ) | const [inline, virtual] |
Referenced by DtLanForwarderPort::fedTrackingFilter().
| bool DtExtendedRtiMsgForwarder::flush | ( | ) | [inline, virtual] |
Send buffered messages.
Returns the status indicating error, flush is complete or incomplete.
References DtUdpMsgSocket::flush(), DtUdpMsgSocket::isOpen(), and myUdpSendSocket.
Referenced by DtLanForwarderPort::flush().
| const DtExtendedRtiMsgForwarder::DtCharBufferQueue::Buffer * DtExtendedRtiMsgForwarder::getNextMsg | ( | ) | [virtual] |
Get the next message received from the connected sockets.
References DtRtiMsgForwarder::closeAllConnectionsIfRequested(), Dt_SocketReadAllowance, DtTcpMsgSocket::flush(), DtTcpMsgSocket::isConnected(), DtRIDParameters::mcastDiscoveryEnabled, myClock, myLastDiscoveryTickTime, myLastReceivedMsg, DtRtiMsgForwarder::myMcastDiscoveryMgr, myOutMsgQueue, DtRtiMsgForwarder::myParams, DtRtiMsgForwarder::myRtiExecMonitor, DtRtiMsgForwarder::mySocketMgr, DtRtiMsgForwarder::myTcpForwarder, myUdpRcvSocket, DtThreadSafeBufferQueue< T >::pop(), DtTcpMsgSocketMgr::processConnections(), DtRtiExecTrackingFilter::processTimeout(), DtThreadSafeBufferQueue< T >::push(), DtFilteredTcpForwarder::readAndForward(), DtUdpMsgSocket::recvMessage(), DtThreadSafeBufferQueue< T >::releaseBuffer(), DtTcpMsgSocketMgr::removeAndDelete(), DtThreadSafeBufferQueue< T >::size(), DtTcpMsgSocketMgr::socketSet(), and DtMulitcastDiscoveryMgr::tick().
Referenced by DtLanForwarderPort::getNextMsg().
| void DtExtendedRtiMsgForwarder::init | ( | ) | [protected, virtual] |
Virtual ctor idiom (continues initialization after both base and derived are initialized)
Reimplemented from DtRtiMsgForwarder.
References DtRtiMsgForwarder::addPacketFilter(), DtRIDParameters::bestEffortSendRetryWaitUsec, DtRIDParameters::destAddr(), DtRIDParameters::enableBestEffortSendRetry, DtUdpMsgSocket::enableBundling(), DtUdpMsgSocket::enableCompression(), DtRIDParameters::enablePacketBundling, DtRIDParameters::isUdpCompressionEnabled, DtMsgSocket::localEndpoint(), DtRIDParameters::maxUdpPacketSize, DtRtiMsgForwarder::myConnToConnInfoMap, DtRtiMsgForwarder::myFedexMsgRouter, myFedHandleTracker, DtRtiMsgForwarder::myForwarderAddr, myForwardMessagesToParent, myNetMapRequestFilter, myOutMsgFilter, myOutMsgQueue, DtRtiMsgForwarder::myParams, DtRtiMsgForwarder::myPort, DtRtiMsgForwarder::myRtiExecMonitor, myUdpRcvSocket, myUdpSendSocket, DtRIDParameters::networkInterfaceAddr(), DtUdpMsgSocket::openSocket(), DtRIDParameters::packetBundlingSize, DtRtiMsgForwarder::removePacketFilter(), DtRIDParameters::responseInterval, DtRIDParameters::rtiExecReconnectPause, DtUdpMsgSocket::setFilterPort(), DtUdpMsgSocket::setMcastTtlOption(), DtFedexMsgFilter::setMonitor(), DtMsgSocket::setRecvBufferSize(), DtUdpMsgSocket::setRetryOnSend(), DtMsgSocket::setSendBufferSize(), DtRIDParameters::socketReceiveBufferSize, DtRIDParameters::socketSendBufferSize, and DtRIDParameters::udpCompressionLevel.
Referenced by create().
| void DtExtendedRtiMsgForwarder::listenToMulticastGroup | ( | const MAKRti::DtInetAddr & | mcastAddr | ) | [virtual] |
Listen / drop multicast groups.
References DtUdpMsgSocket::joinMulticastGroup(), and myUdpRcvSocket.
Referenced by DtLanForwarderPort::listenToMulticastGroup().
| DtForwarderPort::DtAddressPortList DtExtendedRtiMsgForwarder::newConnections | ( | ) | const [virtual] |
Get the list of connections created since last call.
References myNewConnections, and refreshConnectionList().
| void DtExtendedRtiMsgForwarder::refreshConnectionList | ( | ) | const [protected, virtual] |
Get all changes to connections since last call This method is const so that const front-end threads can call it.
References myConnections, myDroppedConnections, myNewConnections, mySocketListChanges, and DtThreadSafeQueue< T >::pop().
Referenced by connections(), droppedConnections(), newConnections(), and selectParams().
| void DtExtendedRtiMsgForwarder::removeExecConnectionEstablishedCb | ( | DtForwarderPort::DtExecAddChangeCb | callback, |
| void * | usr | ||
| ) | [virtual] |
References DtRtiMsgForwarder::myRtiExecMonitor, and DtRtiExecTrackingFilter::removeExecConnectionEstablishedCb().
Referenced by DtLanForwarderPort::~DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::removeExecConnectionLostCb | ( | DtForwarderPort::DtExecRemovedChangeCb | callback, |
| void * | usr | ||
| ) | [virtual] |
References DtRtiMsgForwarder::myRtiExecMonitor, and DtRtiExecTrackingFilter::removeExecConnectionLostCb().
Referenced by DtLanForwarderPort::~DtLanForwarderPort().
| void DtExtendedRtiMsgForwarder::selectParams | ( | MAKRti::DtSelectParamWithWrite & | selectParams | ) | [virtual] |
Get a set of file descriptors to select against for socket notification.
References DtMsgSocket::descriptor(), myConnections, myUdpRcvSocket, and refreshConnectionList().
Referenced by DtLanForwarderPort::selectParams().
| void DtExtendedRtiMsgForwarder::sendBestEffort | ( | const DtForwarderPort::DtForwarderMsg & | msg | ) | [virtual] |
Apply registered filters and send message to LAN via UDP socket.
References DtRIDParameters::destAddr(), DtRtiMtdMcastAddr::get(), DtForwarderPort::DtForwarderMsg::length, DtForwarderPort::DtForwarderMsg::msg, DtRtiMsgForwarder::myParams, myUdpSendSocket, and DtUdpMsgSocket::sendMessage().
Referenced by sendByTransport().
| void DtExtendedRtiMsgForwarder::sendByTransport | ( | const DtForwarderPort::DtForwarderMsg & | msg | ) | [virtual] |
Check transport metadata and send message to appropriate socket(s)
References sendBestEffort(), sendToAllReliable(), and DtForwarderPort::DtForwarderMsg::transport.
Referenced by DtLanForwarderPort::sendByTransport().
| void DtExtendedRtiMsgForwarder::sendMessageToWan | ( | const DtRtiMsg & | msg | ) | [virtual] |
Allow filters to send messages only to the WAN (not back to the LAN) (useful to distributed forwarder mode filters)
References myOutMsgQueue, DtRtiMsgForwarder::myParams, DtThreadSafeBufferQueue< T >::push(), and DtRtiMtdTransportType::set().
Referenced by DtNetworkMapLanRequestFilter::doFilter().
| void DtExtendedRtiMsgForwarder::sendToAllReliable | ( | const DtForwarderPort::DtForwarderMsg & | msg | ) | [virtual] |
Apply registered filters and send message to unfiltered TCP sockets.
References DtFilteredTcpForwarder::filterAndSend(), DtForwarderPort::DtForwarderMsg::length, DtForwarderPort::DtForwarderMsg::msg, and DtRtiMsgForwarder::myTcpForwarder.
Referenced by sendByTransport(), DtLanForwarderPort::sendToAllReliable(), and DtLanForwarderPort::sendToListReliable().
| void DtExtendedRtiMsgForwarder::tcpSocketAdditionCb | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
Over-ride socket addition/removal callback to track socket list.
Reimplemented from DtRtiMsgForwarder.
References DtMsgSocket::descriptor(), DtTcpMsgSocket::destination(), DtRtiMsgForwarder::getConnectionInfoBySocket(), mySocketAddedCbs, mySocketListChanges, and DtThreadSafeQueue< T >::push_back().
| void DtExtendedRtiMsgForwarder::tcpSocketRemovalCb | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
| void DtExtendedRtiMsgForwarder::updateSocketQueueStatus | ( | unsigned int | connId, |
| int | connQueueStatus | ||
| ) | [virtual] |
References mySocketQueueCbs.
DtClock DtExtendedRtiMsgForwarder::myClock [protected] |
Local timer.
Referenced by getNextMsg().
std::set< DtAddressAndSockIdPair > DtExtendedRtiMsgForwarder::myConnections [mutable, protected] |
Referenced by connections(), refreshConnectionList(), and selectParams().
DtForwarderPort::DtAddressPortList DtExtendedRtiMsgForwarder::myDroppedConnections [mutable, protected] |
Referenced by droppedConnections(), and refreshConnectionList().
DtForwarderPort::DtFederateAddedCallbackList DtExtendedRtiMsgForwarder::myFederateJoinedCbs [protected] |
Referenced by addFederateJoinedCb(), and federateJoined().
DtForwarderPort::DtFederateRemovedCallbackList DtExtendedRtiMsgForwarder::myFederateResignedCbs [protected] |
Referenced by addFederateResignedCb(), and federateResigned().
Referenced by init(), and ~DtExtendedRtiMsgForwarder().
Should the local forwarder pass a copy of all messages on to the Parent or simply forward within the local LAN (allows optimization when this is a stand-alone forwarder)
Referenced by init().
MAKRti::DtTime DtExtendedRtiMsgForwarder::myLastDiscoveryTickTime [protected] |
Time of last pass for mcast discovery.
Referenced by getNextMsg().
std::auto_ptr<DtCharBufferQueue::Buffer> DtExtendedRtiMsgForwarder::myLastReceivedMsg [protected] |
Referenced by getNextMsg().
Referenced by init(), and ~DtExtendedRtiMsgForwarder().
DtForwarderPort::DtAddressPortList DtExtendedRtiMsgForwarder::myNewConnections [mutable, protected] |
Referenced by newConnections(), and refreshConnectionList().
Referenced by init(), and ~DtExtendedRtiMsgForwarder().
Referenced by getNextMsg(), init(), and sendMessageToWan().
Referenced by addSocketAdditionCb(), and tcpSocketAdditionCb().
DtThreadSafeQueue< DtBoolAddressSocketIdPair > DtExtendedRtiMsgForwarder::mySocketListChanges [mutable, protected] |
Referenced by refreshConnectionList(), tcpSocketAdditionCb(), and tcpSocketRemovalCb().
Referenced by addSocketQueueCb(), and updateSocketQueueStatus().
Referenced by addSocketRemovalCb(), and tcpSocketRemovalCb().
DtUdpMsgSocket* DtExtendedRtiMsgForwarder::myUdpRcvSocket [protected] |
Referenced by dropMulticastGroup(), getNextMsg(), init(), listenToMulticastGroup(), and selectParams().
DtUdpMsgSocket* DtExtendedRtiMsgForwarder::myUdpSendSocket [protected] |
Referenced by flush(), init(), sendBestEffort(), and ~DtExtendedRtiMsgForwarder().
const unsigned int DtExtendedRtiMsgForwarder::theForwarderId [static] |
Address space for connection IDs for this LAN.