![]() |
MAK RTIspy API Documentation for HLA 1.3
|
The DtForwarderPort is an Abstract Base Class which provides the interface to a collection of connections from which messages may be read and to which messages may be sent. More...
Inheritance diagram for DtLanForwarderPort:
Collaboration diagram for DtLanForwarderPort:Public Member Functions | |
| virtual | ~DtLanForwarderPort () |
| virtual bool | isReady () const |
| Is the Port fully usable and available? | |
| virtual DtAddressMsgPair | getNextMsg () |
| Get the next message to forward and the source connection. | |
| virtual void | sendByTransport (const DtForwarderMsg &msg) const |
| Check transport metadata and send message to appropriate destinations. | |
| virtual void | sendToAllReliable (const DtForwarderMsg &msg) const |
| Send a message via reliable transport to all available destinations. | |
| virtual void | sendToListReliable (const DtForwarderMsg &msg, const DtAddressPortList &destinations) const |
| Send a message via reliable transport to the specified list of destinations. | |
| virtual bool | flush () |
| Flush any unsent/buffered packets; return true if flush sent data. | |
| virtual void | setForwarderId (unsigned long id) |
| Set forwarder ID. | |
| virtual void | selectParams (MAKRti::DtSelectParamWithWrite &selectParams) |
| Add this port's current select() notification set to the passed set. | |
| virtual void | updateRoutes () |
| Handle changes to the Routing map. | |
| virtual int | checkConnectionStatus (const DtInetAddrAndPort *target=0) |
| Test for lost connections - returns true if targeted connection is active or if no target specified returns false if at least one drop detected. | |
| virtual void | clearNeededConnections () |
| Clear the list of connections that this forwarder needs to establish. | |
| virtual unsigned int | abortPendingConnections () |
| Abort any embryonic connections. | |
| unsigned int | pendingConnectionsAborted () |
| Return count of aborted connections. | |
| virtual DtAddressPortList | connections () const |
| Get the list of all current connections to this port. | |
| virtual void | listenToMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| Listen / drop multicast groups (LAN-port-only) | |
| virtual void | dropMulticastGroup (const MAKRti::DtInetAddr &mcastAddr) |
| virtual bool | updateFederateConnectionId (unsigned long orig, unsigned long final) |
| Update locally connected federate connection ID (LAN-port-only) | |
| virtual const DtFederateTrackingFilter * | fedTrackingFilter () const |
| return federateTrackingFilter | |
| virtual bool | populateConnectionInformation (unsigned int &numForwarderClientConns, unsigned int &numForwarderExecConns, std::vector< MAKRti::DtString > &clientConnectionHostNames, std::vector< MAKRti::DtInetAddr > &clientConnectionAddrs) const |
Static Public Member Functions | |
| static DtForwarderPort * | create (const DtRIDParameters *params, const DtBoost::shared_ptr< DtRouteMap > routes, const MAKRti::DtInetAddr &host, int forwarderPort, const MAKRti::DtInetAddr &forwardertoConnectTo) |
| Creates an instance of a DtLanForwarderPort. | |
| static void | setCreatorFunction (DtForwarderPortCreatorFcn creator) |
| Call this function to set an alternate creator function With this function, users can replace this DtLanForwarderPort with their own derived class. | |
Protected Member Functions | |
| DtLanForwarderPort (const DtRIDParameters *params, DtBoost::shared_ptr< DtRouteMap > routes, const MAKRti::DtInetAddr &host, int forwarderPort, const MAKRti::DtInetAddr &forwardertoConnectTo) | |
| Base Ctor - called by default creator. | |
| DtLanForwarderPort () | |
| Default Ctor, Copy Ctor, Assignment - unimplemented. | |
| DtLanForwarderPort (const DtLanForwarderPort &orig) | |
| DtLanForwarderPort & | operator= (const DtLanForwarderPort &orig) |
Protected Attributes | |
| const DtRIDParameters * | myParams |
| DtExtendedRtiMsgForwarder * | myForwarder |
| bool | myIsReady |
Static Protected Attributes | |
| static DtForwarderPortCreatorFcn | theCreator = 0 |
The DtForwarderPort is an Abstract Base Class which provides the interface to a collection of connections from which messages may be read and to which messages may be sent.
| DtLanForwarderPort::DtLanForwarderPort | ( | const DtRIDParameters * | params, |
| DtBoost::shared_ptr< DtRouteMap > | routes, | ||
| const MAKRti::DtInetAddr & | host, | ||
| int | forwarderPort, | ||
| const MAKRti::DtInetAddr & | forwardertoConnectTo | ||
| ) | [protected] |
Base Ctor - called by default creator.
References DtExtendedRtiMsgForwarder::addExecConnectionEstablishedCb(), DtExtendedRtiMsgForwarder::addExecConnectionLostCb(), DtExtendedRtiMsgForwarder::addFederateJoinedCb(), DtExtendedRtiMsgForwarder::addFederateResignedCb(), DtExtendedRtiMsgForwarder::addSocketAdditionCb(), DtExtendedRtiMsgForwarder::addSocketRemovalCb(), DtExtendedRtiMsgForwarder::applyFilters(), DtForwarderPort::connectionEstablished(), DtForwarderPort::connectionLost(), DtForwarderPort::execConnected(), DtForwarderPort::execDisconnected(), DtForwarderPort::federateJoined(), DtForwarderPort::federateResigned(), myForwarder, myIsReady, DtForwarderPort::myRoutes, and DtRIDParameters::tcpPort.
| DtLanForwarderPort::~DtLanForwarderPort | ( | ) | [virtual] |
| DtLanForwarderPort::DtLanForwarderPort | ( | ) | [protected] |
Default Ctor, Copy Ctor, Assignment - unimplemented.
Referenced by create().
| DtLanForwarderPort::DtLanForwarderPort | ( | const DtLanForwarderPort & | orig | ) | [protected] |
| unsigned int DtLanForwarderPort::abortPendingConnections | ( | ) | [virtual] |
Abort any embryonic connections.
Since LAN port does not initiate connections it cannot abort them either, so this method always returns 0
Implements DtForwarderPort.
| int DtLanForwarderPort::checkConnectionStatus | ( | const DtInetAddrAndPort * | target = 0 | ) | [virtual] |
Test for lost connections - returns true if targeted connection is active or if no target specified returns false if at least one drop detected.
Implements DtForwarderPort.
References myForwarder, and DtRtiMsgForwarder::shouldStop().
| void DtLanForwarderPort::clearNeededConnections | ( | ) | [virtual] |
Clear the list of connections that this forwarder needs to establish.
Since the LAN port does not try to establish connections, this method does nothing.
Implements DtForwarderPort.
| DtForwarderPort::DtAddressPortList DtLanForwarderPort::connections | ( | ) | const [virtual] |
Get the list of all current connections to this port.
Implements DtForwarderPort.
References DtExtendedRtiMsgForwarder::connections(), and myForwarder.
Referenced by populateConnectionInformation().
| DtForwarderPort * DtLanForwarderPort::create | ( | const DtRIDParameters * | params, |
| const DtBoost::shared_ptr< DtRouteMap > | routes, | ||
| const MAKRti::DtInetAddr & | host, | ||
| int | forwarderPort, | ||
| const MAKRti::DtInetAddr & | forwardertoConnectTo | ||
| ) | [static] |
Creates an instance of a DtLanForwarderPort.
References DtLanForwarderPort(), and theCreator.
Referenced by setCreatorFunction().
| void DtLanForwarderPort::dropMulticastGroup | ( | const MAKRti::DtInetAddr & | mcastAddr | ) | [virtual] |
Implements DtForwarderPort.
References DtExtendedRtiMsgForwarder::dropMulticastGroup(), and myForwarder.
| const DtFederateTrackingFilter * DtLanForwarderPort::fedTrackingFilter | ( | ) | const [virtual] |
return federateTrackingFilter
References DtExtendedRtiMsgForwarder::fedHandleTrackingFilter(), and myForwarder.
| bool DtLanForwarderPort::flush | ( | ) | [inline, virtual] |
Flush any unsent/buffered packets; return true if flush sent data.
Reimplemented from DtForwarderPort.
References DtExtendedRtiMsgForwarder::flush(), myForwarder, and DtRtiMsgForwarder::updateTcpForwarderQueuedSockets().
Get the next message to forward and the source connection.
Implements DtForwarderPort.
References DtExtendedRtiMsgForwarder::getNextMsg(), DtRtiMsg::kindToString(), DtForwarderPort::myAddress, myForwarder, and DtForwarderPort::myPortToUse.
| bool DtLanForwarderPort::isReady | ( | ) | const [virtual] |
| void DtLanForwarderPort::listenToMulticastGroup | ( | const MAKRti::DtInetAddr & | mcastAddr | ) | [virtual] |
Listen / drop multicast groups (LAN-port-only)
Implements DtForwarderPort.
References DtExtendedRtiMsgForwarder::listenToMulticastGroup(), and myForwarder.
| DtLanForwarderPort& DtLanForwarderPort::operator= | ( | const DtLanForwarderPort & | orig | ) | [protected] |
| unsigned int DtLanForwarderPort::pendingConnectionsAborted | ( | ) | [virtual] |
Return count of aborted connections.
Since LAN port does not initiate connections it cannot abort them either, so this method always returns 0
Implements DtForwarderPort.
| bool DtLanForwarderPort::populateConnectionInformation | ( | unsigned int & | numForwarderClientConns, |
| unsigned int & | numForwarderExecConns, | ||
| std::vector< MAKRti::DtString > & | clientConnectionHostNames, | ||
| std::vector< MAKRti::DtInetAddr > & | clientConnectionAddrs | ||
| ) | const [virtual] |
References connections(), DtRtiMsgForwarder::getConnToConnInfoMap(), DtRtiMsgForwarder::hasExec(), and myForwarder.
Referenced by DtForwarderNode::connectionInformation().
| void DtLanForwarderPort::selectParams | ( | MAKRti::DtSelectParamWithWrite & | selectParams | ) | [virtual] |
Add this port's current select() notification set to the passed set.
Implements DtForwarderPort.
References myForwarder, and DtExtendedRtiMsgForwarder::selectParams().
| void DtLanForwarderPort::sendByTransport | ( | const DtForwarderMsg & | msg | ) | const [virtual] |
Check transport metadata and send message to appropriate destinations.
Implements DtForwarderPort.
References myForwarder, and DtExtendedRtiMsgForwarder::sendByTransport().
| void DtLanForwarderPort::sendToAllReliable | ( | const DtForwarderMsg & | msg | ) | const [virtual] |
Send a message via reliable transport to all available destinations.
Implements DtForwarderPort.
References myForwarder, and DtExtendedRtiMsgForwarder::sendToAllReliable().
| void DtLanForwarderPort::sendToListReliable | ( | const DtForwarderMsg & | msg, |
| const DtAddressPortList & | destinations | ||
| ) | const [virtual] |
Send a message via reliable transport to the specified list of destinations.
Implements DtForwarderPort.
References myForwarder, and DtExtendedRtiMsgForwarder::sendToAllReliable().
| void DtLanForwarderPort::setCreatorFunction | ( | DtForwarderPortCreatorFcn | creator | ) | [static] |
Call this function to set an alternate creator function With this function, users can replace this DtLanForwarderPort with their own derived class.
References create(), DtBindCreator(), and theCreator.
| void DtLanForwarderPort::setForwarderId | ( | unsigned long | id | ) | [virtual] |
Set forwarder ID.
When forwarder is configured via routes files, forwarderID is known at construction, but when configured dynamically it is determined by interactions between peer forwarders and must be set.
Reimplemented from DtForwarderPort.
References myForwarder, myIsReady, DtForwarderPort::myRoutes, and DtRtiMsgForwarder::setForwarderId().
| bool DtLanForwarderPort::updateFederateConnectionId | ( | unsigned long | orig, |
| unsigned long | final | ||
| ) | [virtual] |
Update locally connected federate connection ID (LAN-port-only)
Implements DtForwarderPort.
References myForwarder, and DtRtiMsgForwarder::updateFederateConnectionId().
| void DtLanForwarderPort::updateRoutes | ( | ) | [virtual] |
Handle changes to the Routing map.
Implements DtForwarderPort.
DtExtendedRtiMsgForwarder* DtLanForwarderPort::myForwarder [protected] |
Referenced by checkConnectionStatus(), connections(), dropMulticastGroup(), DtLanForwarderPort(), fedTrackingFilter(), flush(), getNextMsg(), listenToMulticastGroup(), populateConnectionInformation(), selectParams(), sendByTransport(), sendToAllReliable(), sendToListReliable(), setForwarderId(), updateFederateConnectionId(), and ~DtLanForwarderPort().
bool DtLanForwarderPort::myIsReady [protected] |
Referenced by DtLanForwarderPort(), isReady(), and setForwarderId().
const DtRIDParameters* DtLanForwarderPort::myParams [protected] |
Reimplemented from DtForwarderPort.
DtForwarderPort::DtForwarderPortCreatorFcn DtLanForwarderPort::theCreator = 0 [static, protected] |
Referenced by create(), and setCreatorFunction().