![]() |
MAK RTIspy API Documentation for HLA Evolved
|
Inheritance diagram for DtExtendedRtiMsgForwarder:
Collaboration diagram for DtExtendedRtiMsgForwarder:Public Types | |
| typedef DtThreadSafeBufferQueue< char > | DtCharBufferQueue |
Public Types inherited from DtRtiMsgForwarder | |
| typedef DtBoost::shared_ptr < ConnectionInfo > | ConnectionInfoSP |
| typedef DtBoost::weak_ptr < ConnectionInfo > | ConnectionInfoWP |
| typedef std::map< const DtTcpMsgSocket *, ConnectionInfoSP > | SocketToConnInfoMap |
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 |
Public Member Functions inherited from DtRtiMsgForwarder | |
| virtual | ~DtRtiMsgForwarder () |
| Destructor. | |
| 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 | setUseInternalSmartForwarding (bool yesNo) |
| Enable Smart DM Subscription Filtering for internal messages. | |
| 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 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 DtExtendedRtiMsgForwarder * | create (unsigned int id, const DtRIDParameters ¶ms, bool postMessagesToParent=true) |
| Creator. | |
Static Public Member Functions inherited from DtRtiMsgForwarder | |
| 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) |
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 Member Functions inherited from DtRtiMsgForwarder | |
| 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 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 | |
| DtUdpMsgSocket * | myUdpRcvSocket |
| DtUdpMsgSocket * | myUdpSendSocket |
| std::auto_ptr < DtCharBufferQueue::Buffer > | myLastReceivedMsg |
| DtCharBufferQueue | myInMsgQueue |
| DtCharBufferQueue | myOutMsgQueue |
| DtMessageBufferFilter * | myOutMsgFilter |
| 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) | |
Protected Attributes inherited from DtRtiMsgForwarder | |
| 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. | |
| DtInternalRoutePrinterFilter * | myInternalRoutePrinter |
| DtUpdateInterRoutingFilter * | myDmMsgRouter |
| DtInternalRoutingFilter * | myIntMsgRouter |
| 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. | |
Additional Inherited Members | |
Static Protected Attributes inherited from DtRtiMsgForwarder | |
| static DtRtiMsgFwderCreator | theCreator |
|
protected |
|
protected |
These lists are mutable since they are simply used to cache a reflection of back-end thread lists (rather than requiring synchronization)
|
protected |
Default Ctor.
|
virtual |
Default Dtor.
|
virtual |
Register/Unregister a callback for new connections.
|
virtual |
Register/Unregister a callback for new connections.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Instruct the forwarder to register all filters - called after all desired filters are registered (accessor for protected base member: applyRegisteredFilters)
|
virtual |
Get the list of all current connections to this port.
|
static |
Creator.
|
virtual |
|
virtual |
Get the list of connections lost since last call.
|
virtual |
callbacks when the federate tracking filter notices a federate join/resign event.
|
virtual |
|
inlinevirtual |
|
inlinevirtual |
Send buffered messages.
Returns the status indicating error, flush is complete or incomplete.
References DtUdpMsgSocket::flush(), DtUdpMsgSocket::isOpen(), and myUdpSendSocket.
|
virtual |
Get the next message received from the connected sockets.
|
protectedvirtual |
Virtual ctor idiom (continues initialization after both base and derived are initialized)
Reimplemented from DtRtiMsgForwarder.
|
virtual |
Listen / drop multicast groups.
|
virtual |
Get the list of connections created since last call.
|
protectedvirtual |
Get all changes to connections since last call This method is const so that const front-end threads can call it.
|
virtual |
|
virtual |
|
virtual |
Get a set of file descriptors to select against for socket notification.
|
virtual |
Apply registered filters and send message to LAN via UDP socket.
|
virtual |
Check transport metadata and send message to appropriate socket(s)
|
virtual |
Allow filters to send messages only to the WAN (not back to the LAN) (useful to distributed forwarder mode filters)
|
virtual |
Apply registered filters and send message to unfiltered TCP sockets.
|
protectedvirtual |
Over-ride socket addition/removal callback to track socket list.
Reimplemented from DtRtiMsgForwarder.
|
protectedvirtual |
Reimplemented from DtRtiMsgForwarder.
|
virtual |
|
protected |
Local timer.
|
mutableprotected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
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)
|
protected |
|
protected |
Time of last pass for mcast discovery.
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by flush().
|
static |
Address space for connection IDs for this LAN.