![]() |
MAK RTIspy API Documentation for HLA 1.3
|
DtRtiMsgForwarder manages connections and message distribution to local federates and remote Forwarders (if any). More...
Inheritance diagram for DtRtiMsgForwarder:
Collaboration diagram for DtRtiMsgForwarder:Classes | |
| struct | ConnectionInfo |
Public Types | |
| typedef DtBoost::shared_ptr < ConnectionInfo > | ConnectionInfoSP |
| typedef DtBoost::weak_ptr < ConnectionInfo > | ConnectionInfoWP |
| typedef std::map< const DtTcpMsgSocket *, ConnectionInfoSP > | SocketToConnInfoMap |
Public Member Functions | |
| virtual | ~DtRtiMsgForwarder () |
| Destructor. | |
| virtual void | init () |
| Initialize the forwarder (called by creator) | |
| virtual bool | hasExec () const |
| Query the rtiExec Handshake monitor for whether it has an exec. | |
| virtual void | run () |
| Main execution routine. | |
| virtual void | setEnableBundling (unsigned int maxBundleSize) |
| Get the rtiexec's socket if known. | |
| virtual void | setUseSmartForwarding (bool yesNo) |
| Enable Smart DM Subscription Filtering. | |
| virtual void | setRouteFedexMessages (bool yesNo) |
| Enable Smart Fedex Message Filtering. | |
| virtual void | addPacketFilter (DtMessageFilter *filter) |
| [Un]Register a forwarding filter on incoming packets | |
| virtual void | removePacketFilter (DtMessageFilter *filter) |
| virtual unsigned long | forwarderId () const |
| Return the forwarder ID (defines the address space for connIds for this forwarder) | |
| virtual void | setForwarderId (unsigned long newId) |
| set the forwarder ID. | |
| void | updateTcpForwarderQueuedSockets () |
| update the tcp forwarders queued sockets | |
| virtual const DtRtiMsgForwarder::SocketToConnInfoMap & | getConnToConnInfoMap () const |
| WARNING: These methods are not thread-safe and may only be called by the back-end forwarder thread! | |
| virtual ConnectionInfoSP | getConnectionInfoByConnId (unsigned long connId) const |
| Get a shared pointer to the connection info for a connection by Conn ID. | |
| virtual ConnectionInfoSP | getConnectionInfoByHandle (unsigned long federateHandle) const |
| Get a shared pointer to the connection info for a connection by Federate Handle. | |
| virtual ConnectionInfoSP | getConnectionInfoBySocket (const DtTcpMsgSocket *sock) const |
| Get a shared pointer to the connection info for a connection by Socket. | |
| virtual std::pair< bool, unsigned long > | rtiExecConnected () const |
| Is the rtiexec connected and if so what is its connId? | |
| virtual void | sendMessage (const DtRtiMsg &msg, const DtTcpMsgSocket *src=0) |
| Send a message to all local sockets (filters will be applied) | |
| virtual void | requestCloseAllConnections () |
| Disconnect all open connections after this pass through run-loop completes. | |
| virtual void | requestKillSingleConnection (const DtTcpMsgSocket *sock) |
| Disconnect the requestedTcpSocket. | |
| virtual void | markConnectionAsAboutToBeDeleted (DtTcpMsgSocket const *socket, unsigned int connectionId) |
| Mark the given socket as one that is to be deleted silently. | |
| virtual bool | isConnectionMarkedForDeletion (unsigned int connectionId) const |
| Return boolean: given connection has been marked for deletion? | |
| virtual void | removeOldConnection (unsigned int connectionId) |
| Remove the socket specified by the given connection. | |
| virtual void | shutdownRequestedByExec () |
| Shutdown the forwarder application. | |
| virtual bool | updateFederateConnectionId (unsigned long orig, unsigned long final) |
| Set a locally connected federate's connId in the associated connection info struct. | |
| virtual bool | updateFederateWebServer (unsigned long connId, MAKRti::DtInetAddr ip, int port) |
| Set a locally connected federate's web server address. | |
| virtual void | updateConnectionProcessParameters (unsigned long connId, unsigned long processId, MAKRti::DtString processName, MAKRti::DtString commandArgs) |
| Set a connections process information. | |
| virtual bool | shouldStop () |
| should this forwarder stop. | |
Static Public Member Functions | |
| static DtRtiMsgForwarder * | create (unsigned long id, const DtRIDParameters ¶ms) |
| Create an instance of a DtRtiMsgForwarder. | |
| static void | setCreatorFunction (DtRtiMsgFwderCreator fn) |
| Call this function to set an alternate creator function With this function, users can replace this DtRtiMsgForwarder with their own derived class. | |
| static void | tcpSocketAdditionCb (DtTcpMsgSocket *sock, void *usr) |
| Callbacks on addition/removal of TCP sockets. | |
| static void | tcpSocketRemovalCb (DtTcpMsgSocket *sock, void *usr) |
Protected Member Functions | |
| DtRtiMsgForwarder (unsigned long id, const DtRIDParameters ¶ms) | |
| Default Constructor. | |
| virtual void | performMcastDiscovery () |
| virtual void | applyRegisteredFilters () |
| Enable / Disable all filters registered with forwarder. | |
| virtual void | disableRegisteredFilters () |
| virtual void | waitForIo () |
| Wait on sockets for next IO event (allows RTIspy users to control the wait mechanism and period) | |
| virtual void | tcpSocketAdditionCb (DtTcpMsgSocket *sock) |
| virtual void | tcpSocketRemovalCb (DtTcpMsgSocket *sock) |
| virtual unsigned long | consumeConnId () |
| Get and consume Connection ID. | |
| virtual void | preRunLoopEvent () |
| Plug-in defined Run Loop operations Gives users the ability to add functionality to the Run() loop without over-riding it completely. | |
| virtual void | runLoopEvent () |
| virtual void | postRunLoopEvent () |
| virtual bool | populateConnectionInformation (unsigned int &numForwarderToForwarderConns, std::vector< MAKRti::DtString > &forwarderIdentifiers, std::vector< MAKRti::DtString > &forwarderConnectionHostNames, std::vector< MAKRti::DtInetAddr > &forwarderConnectionAddrs, unsigned int &numForwarderClientConns, std::vector< MAKRti::DtString > &clientConnectionHostNames, std::vector< MAKRti::DtInetAddr > &clientConnectionAddrs) const |
| virtual void | closeAllConnectionsIfRequested () |
| Disconnect all open connections. | |
| DtRtiMsgForwarder (const DtRtiMsgForwarder &orig) | |
| Copy Ctor and Assignment Operator unimplemented. | |
| DtRtiMsgForwarder & | operator= (const DtRtiMsgForwarder &orig) |
Protected Attributes | |
| unsigned long | myForwarderId |
| Data Members. | |
| MAKRti::DtInetAddr | myForwarderAddr |
| Local host IP address (used by rtiExec monitor filter, among other uses) | |
| bool | myCloseAllConnectionsRequested |
| Connection shutdown requested? | |
| DtFilteredTcpForwarder * | myTcpForwarder |
| Tcp Forwarder with Filtering Capabilities. | |
| DtTcpMsgSocketMgr * | mySocketMgr |
| Tcp Socket Manager (handles passive connections to Federates) | |
| int | myPort |
| Port for local federate connections. | |
| int | myTcpNoDelay |
| unsigned long | myNextConnectionIdOffset |
| The ID to be assigned to the next Federate or Forwarder connection The IDs are offset from the forwarderId. | |
| unsigned int | myPacketBundleSize |
| Packet Bundle size (if bundle size = 0, bundling is disabled) | |
| DtRtiExecTrackingFilter * | myRtiExecMonitor |
| If registered, Monitors rtiexec connection life-cycle. | |
| DtRoutePrinterFilter * | myRoutePrinter |
| Smart DM Forwarding Filters. | |
| DtUpdateInterRoutingFilter * | myDmMsgRouter |
| DtFedexMsgFilter * | myFedexMsgRouter |
| Fedex Routing Filter. | |
| DtConnectConfirmFilter * | myConnectConfirmFilter |
| Extracts info from connect confirm messages. | |
| DtDeleteSocketFilter * | mySocketMonitor |
| Marks sockets that are being disconnected normally so that no complaint is given when they disconnect versus abnormal disconnect. | |
| const DtRIDParameters & | myParams |
| Local access to the RID Parameters. | |
| DtMulitcastDiscoveryMgr | myMcastDiscoveryMgr |
| DtThreadSafe< std::deque < DtMsgFwdrFunctor * > > | myPendingProxyCommands |
| std::vector< DtMessageFilter * > | myRegisteredFilters |
| Registered Message Filters. | |
| SocketToConnInfoMap | myConnToConnInfoMap |
| Map from socket (conn) to ConnectionInfo object for that connection notes: | |
| std::set< DtTcpMsgSocket const * > | myConnectionsAboutToBeDeleted |
| Set of connections that when deleted there should be no complaint. | |
| MAKRti::DtSelectParamWithWrite | mySelectParams |
| bool | myShouldStop |
| should this forwarder stop. | |
Static Protected Attributes | |
| static DtRtiMsgFwderCreator | theCreator = NULL |
DtRtiMsgForwarder manages connections and message distribution to local federates and remote Forwarders (if any).
It is designed to run as a thread, asynchronous to the main execution.
| typedef DtBoost::shared_ptr<ConnectionInfo> DtRtiMsgForwarder::ConnectionInfoSP |
| typedef DtBoost::weak_ptr<ConnectionInfo> DtRtiMsgForwarder::ConnectionInfoWP |
| typedef std::map< const DtTcpMsgSocket*, ConnectionInfoSP > DtRtiMsgForwarder::SocketToConnInfoMap |
| DtRtiMsgForwarder::DtRtiMsgForwarder | ( | unsigned long | id, |
| const DtRIDParameters & | params | ||
| ) | [protected] |
| DtRtiMsgForwarder::~DtRtiMsgForwarder | ( | ) | [virtual] |
Destructor.
References myConnectConfirmFilter, myConnToConnInfoMap, myDmMsgRouter, myFedexMsgRouter, myRoutePrinter, myRtiExecMonitor, mySocketMgr, mySocketMonitor, myTcpForwarder, DtTcpMsgSocketMgr::removeSocketAdditionCallback(), DtTcpMsgSocketMgr::removeSocketRemovalCallback(), tcpSocketAdditionCb(), and tcpSocketRemovalCb().
| DtRtiMsgForwarder::DtRtiMsgForwarder | ( | const DtRtiMsgForwarder & | orig | ) | [protected] |
Copy Ctor and Assignment Operator unimplemented.
| void DtRtiMsgForwarder::addPacketFilter | ( | DtMessageFilter * | filter | ) | [virtual] |
[Un]Register a forwarding filter on incoming packets
References myRegisteredFilters.
Referenced by init(), DtExtendedRtiMsgForwarder::init(), setRouteFedexMessages(), and setUseSmartForwarding().
| void DtRtiMsgForwarder::applyRegisteredFilters | ( | ) | [protected, virtual] |
Enable / Disable all filters registered with forwarder.
References DtFilteredTcpForwarder::addPacketFilter(), myRegisteredFilters, and myTcpForwarder.
Referenced by DtExtendedRtiMsgForwarder::applyFilters(), and run().
| void DtRtiMsgForwarder::closeAllConnectionsIfRequested | ( | ) | [protected, virtual] |
Disconnect all open connections.
References myCloseAllConnectionsRequested, myTcpForwarder, DtTcpMsgSocketMgr::removeAndDelete(), DtTcpForwarder__vl__::socketMgr(), and DtTcpMsgSocketMgr::socketSet().
Referenced by DtExtendedRtiMsgForwarder::getNextMsg(), and run().
| unsigned long DtRtiMsgForwarder::consumeConnId | ( | ) | [protected, virtual] |
Get and consume Connection ID.
References myForwarderId, and myNextConnectionIdOffset.
Referenced by tcpSocketAdditionCb().
| DtRtiMsgForwarder * DtRtiMsgForwarder::create | ( | unsigned long | id, |
| const DtRIDParameters & | params | ||
| ) | [static] |
Create an instance of a DtRtiMsgForwarder.
References DtRtiMsgForwarder(), init(), and theCreator.
| void DtRtiMsgForwarder::disableRegisteredFilters | ( | ) | [protected, virtual] |
References myRegisteredFilters, myTcpForwarder, and DtFilteredTcpForwarder::removePacketFilter().
Referenced by run().
| unsigned long DtRtiMsgForwarder::forwarderId | ( | ) | const [inline, virtual] |
Return the forwarder ID (defines the address space for connIds for this forwarder)
References myForwarderId.
Referenced by DtNetworkMapLanRequestFilter::buildNetworkMap(), and DtNetworkMapLanRequestFilter::doFilter().
| DtRtiMsgForwarder::ConnectionInfoSP DtRtiMsgForwarder::getConnectionInfoByConnId | ( | unsigned long | connId | ) | const [virtual] |
Get a shared pointer to the connection info for a connection by Conn ID.
References myConnToConnInfoMap.
Referenced by DtFederateTrackingFilter::handleJoinConfirmMsg(), DtFederateTrackingFilter::handleJoinMsg(), DtFederateTrackingFilter::handleJoinResponseMsg(), isConnectionMarkedForDeletion(), DtRtiExecDistributedTrackingFilter::processHandshakeMsg(), and removeOldConnection().
| DtRtiMsgForwarder::ConnectionInfoSP DtRtiMsgForwarder::getConnectionInfoByHandle | ( | unsigned long | federateHandle | ) | const [virtual] |
Get a shared pointer to the connection info for a connection by Federate Handle.
References myConnToConnInfoMap.
| DtRtiMsgForwarder::ConnectionInfoSP DtRtiMsgForwarder::getConnectionInfoBySocket | ( | const DtTcpMsgSocket * | sock | ) | const [virtual] |
Get a shared pointer to the connection info for a connection by Socket.
References myConnToConnInfoMap.
Referenced by DtRtiExecTrackingFilter::processReconnectMsg(), DtRtiExecTrackingFilter::processRtiExecConnectMsg(), DtExtendedRtiMsgForwarder::tcpSocketAdditionCb(), and DtExtendedRtiMsgForwarder::tcpSocketRemovalCb().
| const DtRtiMsgForwarder::SocketToConnInfoMap & DtRtiMsgForwarder::getConnToConnInfoMap | ( | ) | const [inline, virtual] |
WARNING: These methods are not thread-safe and may only be called by the back-end forwarder thread!
Get a handle to the connection to connId map
References myConnToConnInfoMap.
Referenced by DtNetworkMapLanRequestFilter::buildNetworkMap(), and DtLanForwarderPort::populateConnectionInformation().
| bool DtRtiMsgForwarder::hasExec | ( | ) | const [virtual] |
Query the rtiExec Handshake monitor for whether it has an exec.
References myRtiExecMonitor, and DtRtiExecTrackingFilter::rtiExecAvailable().
Referenced by DtLanForwarderPort::populateConnectionInformation().
| void DtRtiMsgForwarder::init | ( | ) | [virtual] |
Initialize the forwarder (called by creator)
Reimplemented in DtExtendedRtiMsgForwarder.
References addPacketFilter(), DtDefaultInterfaceAddr(), DtRIDParameters::maxForwarderQueue, myConnectConfirmFilter, myForwarderAddr, myParams, myPort, myRtiExecMonitor, mySocketMgr, mySocketMonitor, myTcpForwarder, myTcpNoDelay, DtRIDParameters::networkInterfaceAddr(), performMcastDiscovery(), DtAssistantPopupHelper::popupAssistantMessage(), DtRIDParameters::responseInterval, DtRIDParameters::rtiExecReconnectPause, DtRtiMtdDestinationList::setMaxDestinations(), setRouteFedexMessages(), DtRtiMsg::setSmartForwardingEnabled(), setUseSmartForwarding(), DtTcpForwarder__vl__::socketMgr(), DtRIDParameters::socketReceiveBufferSize, DtRIDParameters::socketSendBufferSize, tcpSocketAdditionCb(), and tcpSocketRemovalCb().
Referenced by create().
| bool DtRtiMsgForwarder::isConnectionMarkedForDeletion | ( | unsigned int | connectionId | ) | const [virtual] |
Return boolean: given connection has been marked for deletion?
References getConnectionInfoByConnId(), and myConnectionsAboutToBeDeleted.
Referenced by DtRtiExecTrackingFilter::processDisconnectMsg().
| void DtRtiMsgForwarder::markConnectionAsAboutToBeDeleted | ( | DtTcpMsgSocket const * | socket, |
| unsigned int | connectionId | ||
| ) | [virtual] |
Mark the given socket as one that is to be deleted silently.
The forwarder won't complain when the given socket disconnects. If known, the socket connection ID should be provided A confirmation message is returned through the socket.
References myConnectionsAboutToBeDeleted, myParams, sendMessage(), DtRtiMtdTransportType::set(), DtRtiMsg::setFederateHandle(), and DtRtiMsg::setFedEx().
Referenced by DtDeleteSocketFilter::handleDeleteSocketMsg().
| DtRtiMsgForwarder& DtRtiMsgForwarder::operator= | ( | const DtRtiMsgForwarder & | orig | ) | [protected] |
| void DtRtiMsgForwarder::performMcastDiscovery | ( | ) | [protected, virtual] |
References DtMulitcastDiscoveryMgr::discover(), DtIsIpOfLocalInterface(), DtRIDParameters::getFullPathToRidFile(), DtMulitcastDiscoveryMgr::init(), DtRIDParameters::mcastDiscoveryEnabled, myMcastDiscoveryMgr, myParams, DtAssistantPopupHelper::popupAssistantMessage(), DtRIDParameters::tcpForwarderAddr(), and DtRIDParameters::tcpForwarderAddrString().
Referenced by init().
| bool DtRtiMsgForwarder::populateConnectionInformation | ( | unsigned int & | numForwarderToForwarderConns, |
| std::vector< MAKRti::DtString > & | forwarderIdentifiers, | ||
| std::vector< MAKRti::DtString > & | forwarderConnectionHostNames, | ||
| std::vector< MAKRti::DtInetAddr > & | forwarderConnectionAddrs, | ||
| unsigned int & | numForwarderClientConns, | ||
| std::vector< MAKRti::DtString > & | clientConnectionHostNames, | ||
| std::vector< MAKRti::DtInetAddr > & | clientConnectionAddrs | ||
| ) | const [protected, virtual] |
References DtGetLocalHostName(), myForwarderAddr, and myForwarderId.
| virtual void DtRtiMsgForwarder::postRunLoopEvent | ( | ) | [inline, protected, virtual] |
Referenced by run().
| virtual void DtRtiMsgForwarder::preRunLoopEvent | ( | ) | [inline, protected, virtual] |
Plug-in defined Run Loop operations Gives users the ability to add functionality to the Run() loop without over-riding it completely.
Referenced by run().
| void DtRtiMsgForwarder::removeOldConnection | ( | unsigned int | connectionId | ) | [virtual] |
Remove the socket specified by the given connection.
Used by reconnect to clean up orphaned sockets where client detected break but server has not.
References DtMsgSocket::descriptor(), getConnectionInfoByConnId(), myConnectionsAboutToBeDeleted, myConnToConnInfoMap, and mySelectParams.
Referenced by DtRtiExecTrackingFilter::processReconnectMsg().
| void DtRtiMsgForwarder::removePacketFilter | ( | DtMessageFilter * | filter | ) | [virtual] |
References myRegisteredFilters.
Referenced by DtExtendedRtiMsgForwarder::init(), and DtExtendedRtiMsgForwarder::~DtExtendedRtiMsgForwarder().
| void DtRtiMsgForwarder::requestCloseAllConnections | ( | ) | [virtual] |
Disconnect all open connections after this pass through run-loop completes.
References myCloseAllConnectionsRequested.
Referenced by DtRtiExecTrackingFilter::processRtiExecDisconnectMsg().
| void DtRtiMsgForwarder::requestKillSingleConnection | ( | const DtTcpMsgSocket * | sock | ) | [virtual] |
Disconnect the requestedTcpSocket.
Introduced so that the rtiExecTrackingFilter can have connections deleted. The alternative is that the myTcpForwarder be made publicly accessible. Filter will call this on sockets from which it receives rtiExecReconnectMsgs when it is still connected to the rtiExec, and connect and disconnect messages from the exec when we are still connected and are not connected to the rtiExec respectively.
References DtTcpMsgSocket::destination(), myTcpForwarder, DtTcpMsgSocketMgr::removeAndDelete(), and DtTcpForwarder__vl__::socketMgr().
| std::pair< bool, unsigned long > DtRtiMsgForwarder::rtiExecConnected | ( | ) | const [virtual] |
Is the rtiexec connected and if so what is its connId?
References myRtiExecMonitor, DtRtiExecTrackingFilter::rtiExecAvailable(), and DtRtiExecTrackingFilter::rtiExecConnId().
Referenced by DtNetworkMapLanRequestFilter::buildNetworkMap().
| void DtRtiMsgForwarder::run | ( | ) | [virtual] |
Main execution routine.
References applyRegisteredFilters(), closeAllConnectionsIfRequested(), disableRegisteredFilters(), DtRIDParameters::mcastDiscoveryEnabled, myMcastDiscoveryMgr, myParams, myRtiExecMonitor, mySocketMgr, myTcpForwarder, postRunLoopEvent(), preRunLoopEvent(), DtTcpMsgSocketMgr::processConnections(), DtRtiExecTrackingFilter::processTimeout(), DtFilteredTcpForwarder::readAndForward(), runLoopEvent(), shouldStop(), DtMulitcastDiscoveryMgr::tick(), and waitForIo().
| virtual void DtRtiMsgForwarder::runLoopEvent | ( | ) | [inline, protected, virtual] |
Referenced by run().
| void DtRtiMsgForwarder::sendMessage | ( | const DtRtiMsg & | msg, |
| const DtTcpMsgSocket * | src = 0 |
||
| ) | [virtual] |
Send a message to all local sockets (filters will be applied)
References DtFilteredTcpForwarder::filterAndSend(), myParams, myTcpForwarder, and DtRtiMtdTransportType::set().
Referenced by markConnectionAsAboutToBeDeleted(), DtRtiExecTrackingFilter::processDisconnectMsg(), DtRtiExecDistributedTrackingFilter::processHandshakeMsg(), DtRtiExecTrackingFilter::processHandshakeMsg(), DtRtiExecTrackingFilter::processReconnectMsg(), DtRtiExecTrackingFilter::processTimeout(), and tcpSocketRemovalCb().
| void DtRtiMsgForwarder::setCreatorFunction | ( | DtRtiMsgFwderCreator | fn | ) | [static] |
Call this function to set an alternate creator function With this function, users can replace this DtRtiMsgForwarder with their own derived class.
References DtBindCreator(), and theCreator.
| void DtRtiMsgForwarder::setEnableBundling | ( | unsigned int | maxBundleSize | ) | [virtual] |
Get the rtiexec's socket if known.
Enable Message Bundling optimization
References DtTcpMsgSocketMgr::enableBundling(), and mySocketMgr.
| void DtRtiMsgForwarder::setForwarderId | ( | unsigned long | newId | ) | [virtual] |
set the forwarder ID.
References myForwarderId.
Referenced by DtRtiMsgForwarder(), and DtLanForwarderPort::setForwarderId().
| void DtRtiMsgForwarder::setRouteFedexMessages | ( | bool | yesNo | ) | [virtual] |
Enable Smart Fedex Message Filtering.
References addPacketFilter(), myFedexMsgRouter, and myRtiExecMonitor.
Referenced by init().
| void DtRtiMsgForwarder::setUseSmartForwarding | ( | bool | yesNo | ) | [virtual] |
Enable Smart DM Subscription Filtering.
References addPacketFilter(), myConnToConnInfoMap, myDmMsgRouter, and myRoutePrinter.
Referenced by init().
| bool DtRtiMsgForwarder::shouldStop | ( | ) | [virtual] |
should this forwarder stop.
References myShouldStop.
Referenced by DtLanForwarderPort::checkConnectionStatus(), and run().
| void DtRtiMsgForwarder::shutdownRequestedByExec | ( | ) | [virtual] |
Shutdown the forwarder application.
Triggered by the rtiExec sending a forwarderShutdown message to the RTI Forwarder.
References myShouldStop.
Referenced by DtRtiExecTrackingFilter::processShutdownMsg().
| void DtRtiMsgForwarder::tcpSocketAdditionCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
Callbacks on addition/removal of TCP sockets.
References tcpSocketAdditionCb().
Referenced by init(), tcpSocketAdditionCb(), and ~DtRtiMsgForwarder().
| void DtRtiMsgForwarder::tcpSocketAdditionCb | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
Reimplemented in DtExtendedRtiMsgForwarder.
References consumeConnId(), DtMsgSocket::descriptor(), DtTcpMsgSocket::destination(), myConnToConnInfoMap, myForwarderAddr, myParams, mySelectParams, DtTcpMsgSocket::sendMessage(), DtRtiMtdTransportType::set(), DtConnectMsg::setConnectionHandle(), DtRtiMsg::setFederateHandle(), and DtRtiMsg::setFedEx().
| void DtRtiMsgForwarder::tcpSocketRemovalCb | ( | DtTcpMsgSocket * | sock, |
| void * | usr | ||
| ) | [static] |
References tcpSocketRemovalCb().
Referenced by init(), tcpSocketRemovalCb(), and ~DtRtiMsgForwarder().
| void DtRtiMsgForwarder::tcpSocketRemovalCb | ( | DtTcpMsgSocket * | sock | ) | [protected, virtual] |
Reimplemented in DtExtendedRtiMsgForwarder.
References DtMsgSocket::descriptor(), myConnectionsAboutToBeDeleted, myConnToConnInfoMap, myRtiExecMonitor, mySelectParams, DtRtiExecTrackingFilter::rtiExecConnId(), sendMessage(), DtConnectMsg::setConnectionHandle(), DtRtiMsg::setFederateHandle(), and DtRtiMsg::setFedEx().
| void DtRtiMsgForwarder::updateConnectionProcessParameters | ( | unsigned long | connId, |
| unsigned long | processId, | ||
| MAKRti::DtString | processName, | ||
| MAKRti::DtString | commandArgs | ||
| ) | [virtual] |
Set a connections process information.
References myConnToConnInfoMap.
Referenced by DtConnectConfirmFilter::handleConnectConfirmMsg().
| bool DtRtiMsgForwarder::updateFederateConnectionId | ( | unsigned long | orig, |
| unsigned long | final | ||
| ) | [virtual] |
Set a locally connected federate's connId in the associated connection info struct.
This should only need to be invoked when the forwarder is part of the federate's Forwarder Group, but not its primary forwarder.
References myConnToConnInfoMap.
Referenced by DtLanForwarderPort::updateFederateConnectionId().
| bool DtRtiMsgForwarder::updateFederateWebServer | ( | unsigned long | connId, |
| MAKRti::DtInetAddr | ip, | ||
| int | port | ||
| ) | [virtual] |
Set a locally connected federate's web server address.
References myConnToConnInfoMap.
Referenced by DtConnectConfirmFilter::handleConnectConfirmMsg().
update the tcp forwarders queued sockets
References myTcpForwarder, and DtFilteredTcpForwarder::updateQueuedSockets().
Referenced by DtLanForwarderPort::flush().
| void DtRtiMsgForwarder::waitForIo | ( | ) | [protected, virtual] |
Wait on sockets for next IO event (allows RTIspy users to control the wait mechanism and period)
References DtMsgSocket::descriptor(), DtTcpMsgSocket::flush(), mySelectParams, mySocketMgr, and DtTcpMsgSocketMgr::socketSet().
Referenced by run().
Connection shutdown requested?
Referenced by closeAllConnectionsIfRequested(), and requestCloseAllConnections().
Extracts info from connect confirm messages.
Referenced by init(), and ~DtRtiMsgForwarder().
std::set<DtTcpMsgSocket const*> DtRtiMsgForwarder::myConnectionsAboutToBeDeleted [protected] |
Set of connections that when deleted there should be no complaint.
Referenced by isConnectionMarkedForDeletion(), markConnectionAsAboutToBeDeleted(), removeOldConnection(), and tcpSocketRemovalCb().
Map from socket (conn) to ConnectionInfo object for that connection notes:
Referenced by getConnectionInfoByConnId(), getConnectionInfoByHandle(), getConnectionInfoBySocket(), getConnToConnInfoMap(), DtExtendedRtiMsgForwarder::init(), removeOldConnection(), setUseSmartForwarding(), tcpSocketAdditionCb(), tcpSocketRemovalCb(), updateConnectionProcessParameters(), updateFederateConnectionId(), updateFederateWebServer(), and ~DtRtiMsgForwarder().
Referenced by setUseSmartForwarding(), and ~DtRtiMsgForwarder().
DtFedexMsgFilter* DtRtiMsgForwarder::myFedexMsgRouter [protected] |
Fedex Routing Filter.
Referenced by DtExtendedRtiMsgForwarder::init(), setRouteFedexMessages(), and ~DtRtiMsgForwarder().
MAKRti::DtInetAddr DtRtiMsgForwarder::myForwarderAddr [protected] |
Local host IP address (used by rtiExec monitor filter, among other uses)
Referenced by init(), DtExtendedRtiMsgForwarder::init(), populateConnectionInformation(), and tcpSocketAdditionCb().
unsigned long DtRtiMsgForwarder::myForwarderId [protected] |
Data Members.
Address space for connection IDs for this LAN (required to differentiate when there are multiple forwarders)
Referenced by consumeConnId(), forwarderId(), populateConnectionInformation(), and setForwarderId().
Referenced by DtExtendedRtiMsgForwarder::getNextMsg(), performMcastDiscovery(), and run().
unsigned long DtRtiMsgForwarder::myNextConnectionIdOffset [protected] |
The ID to be assigned to the next Federate or Forwarder connection The IDs are offset from the forwarderId.
Referenced by consumeConnId().
unsigned int DtRtiMsgForwarder::myPacketBundleSize [protected] |
Packet Bundle size (if bundle size = 0, bundling is disabled)
const DtRIDParameters& DtRtiMsgForwarder::myParams [protected] |
Local access to the RID Parameters.
Referenced by DtExtendedRtiMsgForwarder::getNextMsg(), init(), DtExtendedRtiMsgForwarder::init(), markConnectionAsAboutToBeDeleted(), performMcastDiscovery(), run(), DtExtendedRtiMsgForwarder::sendBestEffort(), sendMessage(), DtExtendedRtiMsgForwarder::sendMessageToWan(), and tcpSocketAdditionCb().
DtThreadSafe< std::deque<DtMsgFwdrFunctor*> > DtRtiMsgForwarder::myPendingProxyCommands [protected] |
int DtRtiMsgForwarder::myPort [protected] |
Port for local federate connections.
Referenced by init(), and DtExtendedRtiMsgForwarder::init().
std::vector< DtMessageFilter* > DtRtiMsgForwarder::myRegisteredFilters [protected] |
Registered Message Filters.
Referenced by addPacketFilter(), applyRegisteredFilters(), disableRegisteredFilters(), and removePacketFilter().
DtRoutePrinterFilter* DtRtiMsgForwarder::myRoutePrinter [protected] |
Smart DM Forwarding Filters.
Referenced by setUseSmartForwarding(), and ~DtRtiMsgForwarder().
If registered, Monitors rtiexec connection life-cycle.
Referenced by DtExtendedRtiMsgForwarder::addExecConnectionEstablishedCb(), DtExtendedRtiMsgForwarder::addExecConnectionLostCb(), DtExtendedRtiMsgForwarder::getNextMsg(), hasExec(), init(), DtExtendedRtiMsgForwarder::init(), DtExtendedRtiMsgForwarder::removeExecConnectionEstablishedCb(), DtExtendedRtiMsgForwarder::removeExecConnectionLostCb(), rtiExecConnected(), run(), setRouteFedexMessages(), tcpSocketRemovalCb(), and ~DtRtiMsgForwarder().
MAKRti::DtSelectParamWithWrite DtRtiMsgForwarder::mySelectParams [protected] |
Referenced by removeOldConnection(), tcpSocketAdditionCb(), tcpSocketRemovalCb(), and waitForIo().
bool DtRtiMsgForwarder::myShouldStop [protected] |
should this forwarder stop.
Referenced by shouldStop(), and shutdownRequestedByExec().
DtTcpMsgSocketMgr* DtRtiMsgForwarder::mySocketMgr [protected] |
Tcp Socket Manager (handles passive connections to Federates)
Referenced by DtExtendedRtiMsgForwarder::getNextMsg(), init(), run(), setEnableBundling(), waitForIo(), and ~DtRtiMsgForwarder().
DtDeleteSocketFilter* DtRtiMsgForwarder::mySocketMonitor [protected] |
Marks sockets that are being disconnected normally so that no complaint is given when they disconnect versus abnormal disconnect.
Referenced by init(), and ~DtRtiMsgForwarder().
DtFilteredTcpForwarder* DtRtiMsgForwarder::myTcpForwarder [protected] |
Tcp Forwarder with Filtering Capabilities.
Referenced by applyRegisteredFilters(), closeAllConnectionsIfRequested(), disableRegisteredFilters(), DtExtendedRtiMsgForwarder::getNextMsg(), init(), requestKillSingleConnection(), run(), sendMessage(), DtExtendedRtiMsgForwarder::sendToAllReliable(), updateTcpForwarderQueuedSockets(), and ~DtRtiMsgForwarder().
int DtRtiMsgForwarder::myTcpNoDelay [protected] |
Referenced by init().
DtRtiMsgFwderCreator DtRtiMsgForwarder::theCreator = NULL [static, protected] |
Referenced by create(), and setCreatorFunction().