MAK RTIspy API Documentation for HLA Evolved
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes

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:

List of all members.

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 DtForwarderPortcreate (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)
DtLanForwarderPortoperator= (const DtLanForwarderPort &orig)

Protected Attributes

const DtRIDParametersmyParams
DtExtendedRtiMsgForwardermyForwarder
bool myIsReady

Static Protected Attributes

static DtForwarderPortCreatorFcn theCreator = 0

Detailed Description

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.


Constructor & Destructor Documentation

DtLanForwarderPort::DtLanForwarderPort ( const DtRIDParameters params,
DtBoost::shared_ptr< DtRouteMap routes,
const MAKRti::DtInetAddr &  host,
int  forwarderPort,
const MAKRti::DtInetAddr &  forwardertoConnectTo 
) [protected]

Default Ctor, Copy Ctor, Assignment - unimplemented.

Referenced by create().


Member Function Documentation

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().

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.

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]

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]

Is the Port fully usable and available?

Implements DtForwarderPort.

References myIsReady.

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]

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]
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().

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().

Handle changes to the Routing map.

Implements DtForwarderPort.


Member Data Documentation

Reimplemented from DtForwarderPort.

Referenced by create(), and setCreatorFunction().


The documentation for this class was generated from the following files:

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)