MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtForwarderPort Class Reference

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 DtForwarderPort:
+ Collaboration diagram for DtForwarderPort:

Classes

struct  DtForwarderMsg

Public Types

typedef DtForwarderPort *(* DtForwarderPortCreatorFcn )(const DtRIDParameters *, const DtBoost::shared_ptr< DtRouteMap >, const MAKRti::DtInetAddr &, int, const MAKRti::DtInetEndpoint &)
 DtForwarderPort creator signature.
typedef
DtRouteMap::DtAddressPortList 
DtAddressPortList
typedef DtRouteMap::DtAddressList DtAddressList
typedef
DtRouteMap::DtInterfaceAddrSet 
DtInterfaceAddrSet
typedef std::vector
< DtTcpMsgSocket * > 
DtSocketList
typedef std::set
< DtTcpMsgSocket * > 
DtSocketSet
typedef std::pair
< DtInetAddrAndPort,
DtForwarderMsg
DtAddressMsgPair
typedef std::pair
< DtTcpMsgSocket
*, DtForwarderMsg
DtSockMsgPair
typedef std::map
< DtInetAddrAndPort,
DtTcpMsgSocket * > 
DtAddrToConnMap
typedef std::map
< DtInetAddrAndPort,
MAKRti::DtString > 
DtConnAndNameMap
typedef int(* DtConnectionAddRemoveCb )(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &, void *)
typedef int(* DtConnectionReconnectBegunCb )(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, void *)
typedef int(* DtConnectionReconnectCompleteCb )(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, bool, void *)
typedef int(* DtConnectionChangeCb )(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, void *)
typedef void(* DtFederateAddedCb )(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, void *)
typedef void(* DtFederateRemovedCb )(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, void *)
typedef void(* DtPortReadyCb )(unsigned long, void *)
typedef int(* DtExecAddChangeCb )(const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, const MAKRti::DtString &, bool, void *)
typedef int(* DtExecRemovedChangeCb )(const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, void *)
typedef int(* DtSocketQueueCb )(unsigned int, int, void *)
typedef void(* DtWaitingForFwsCb )(const DtConnAndNameMap &, const DtConnAndNameMap &, void *)
typedef void(* DtNotWaitingForFwsCb )(void *)
typedef std::vector< std::pair
< DtConnectionAddRemoveCb,
void * > > 
DtConnectionAddRemoveCallbackList
typedef std::vector< std::pair
< DtConnectionReconnectBegunCb,
void * > > 
DtConnectionReconnectBegunCallbackList
typedef std::vector< std::pair
< DtConnectionReconnectCompleteCb,
void * > > 
DtConnectionReconnectCompleteCallbackList
typedef std::vector< std::pair
< DtConnectionChangeCb, void * > > 
DtConnectionChangeCallbackList
typedef std::vector< std::pair
< DtFederateAddedCb, void * > > 
DtFederateAddedCallbackList
typedef std::vector< std::pair
< DtFederateRemovedCb, void * > > 
DtFederateRemovedCallbackList
typedef std::vector< std::pair
< DtPortReadyCb, void * > > 
DtPortReadyCallbackList
typedef std::vector< std::pair
< DtExecAddChangeCb, void * > > 
DtExecAddedCallbackList
typedef std::vector< std::pair
< DtExecRemovedChangeCb, void * > > 
DtExecRemovedCallbackList
typedef std::vector< std::pair
< DtSocketQueueCb, void * > > 
DtSocketQueueCallbackList
typedef std::vector< std::pair
< DtWaitingForFwsCb, void * > > 
DtWaitingForFwsCallbackList
typedef std::vector< std::pair
< DtNotWaitingForFwsCb, void * > > 
DtNotWaitingForFwsCallbackList

Public Member Functions

virtual ~DtForwarderPort ()
virtual bool isOk () const
 Is the Port still alive?
virtual bool isReady () const =0
 Is the Port fully usable and available?
virtual DtAddressMsgPair getNextMsg ()=0
 Get the next message to forward and the source connection.
virtual void sendByTransport (const DtForwarderMsg &msg) const =0
 Check transport metadata and send message to appropriate socket(s)
virtual void sendToAllReliable (const DtForwarderMsg &msg) const =0
 Send a message to all available destinations.
virtual void sendToListReliable (const DtForwarderMsg &msg, const DtRouteMap::DtAddressPortList &destinations) const =0
 Send a message to the specified list of destinations excluding the list of filtered destinations.
virtual bool flush ()
 Flush any unsent/buffered packets; return true if flush sent data.
virtual void selectParams (MAKRti::DtSelectParamWithWrite &selectParams)=0
 Add this port's current select() notification set to the passed set.
virtual void updateRoutes ()=0
 Handle changes to the Routing map.
virtual int checkConnectionStatus (const DtInetAddrAndPort *target=0)=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 ()=0
 Clear the list of connections that this forwarder needs to establish.
virtual unsigned int abortPendingConnections ()=0
 Abort any embryonic connections.
virtual unsigned int pendingConnectionsAborted ()=0
 Return count of aborted connections.
virtual DtAddressPortList connections () const =0
 Get the list of all current connections to this port.
virtual bool updateFederateConnectionId (unsigned long orig, unsigned long final)=0
 Update locally connected federate connection ID (LAN-port-only)
virtual void setForwarderId (unsigned long id)
 Set forwarder ID.
virtual void listenToMulticastGroup (const MAKRti::DtInetAddr &mcastAddr)=0
 Listen / drop multicast groups (LAN-port-only)
virtual void dropMulticastGroup (const MAKRti::DtInetAddr &mcastAddr)=0
 Listen / drop multicast groups (LAN-port-only)
virtual void addConnectionEstablishedCb (DtConnectionAddRemoveCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void removeConnectionEstablishedCb (DtConnectionAddRemoveCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void addConnectionLostCb (DtConnectionAddRemoveCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void removeConnectionLostCb (DtConnectionAddRemoveCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void addConnectionChangedCb (DtConnectionChangeCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void removeConnectionChangedCb (DtConnectionChangeCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void addReconnectBegun (DtConnectionReconnectBegunCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void removeReconnectBegun (DtConnectionReconnectBegunCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void addReconnectComplete (DtConnectionReconnectCompleteCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void removeReconnectComplete (DtConnectionReconnectCompleteCb callback, void *usr)
 Register/Unregister callback for addition/removal/change of connections.
virtual void addForwarderPortReadyCb (DtPortReadyCb callback, void *usr)
 Register/Unregister callback for event - forwarder port becomes ready.
virtual void removeForwarderPortReadyCb (DtPortReadyCb callback, void *usr)
 Register/Unregister callback for event - forwarder port becomes ready.
virtual void addFederateJoinedCb (DtFederateAddedCb callback, void *usr)
 Register/Unregister callback for event - federate join/resign.
virtual void removeFederateJoinedCb (DtFederateAddedCb callback, void *usr)
 Register/Unregister callback for event - federate join/resign.
virtual void addFederateResignedCb (DtFederateRemovedCb callback, void *usr)
 Register/Unregister callback for event - federate join/resign.
virtual void removeFederateResignedCb (DtFederateRemovedCb callback, void *usr)
 Register/Unregister callback for event - federate join/resign.
virtual void addSocketQueueCb (DtSocketQueueCb callback, void *usr)
 Register/Unregister callback for event - socket queue status changes.
virtual void removeSocketQueueCb (DtSocketQueueCb callback, void *usr)
 Register/Unregister callback for event - socket queue status changes.
virtual void addWaitingForForwarderConnectionsCb (DtWaitingForFwsCb callback, void *usr)
 Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.
virtual void removeWaitingForForwarderConnectionsCb (DtWaitingForFwsCb callback, void *usr)
 Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.
virtual void addNotWaitingForForwarderConnectionsCb (DtNotWaitingForFwsCb callback, void *usr)
 Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.
virtual void removeNotWaitingForForwarderConnectionsCb (DtNotWaitingForFwsCb callback, void *usr)
 Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.
virtual void addExecConnectionEstablishedCb (DtExecAddChangeCb callback, void *usr)
 Register/Unregister callback for event - exec connected/disconnected.
virtual void removeExecConnectionEstablishedCb (DtExecAddChangeCb callback, void *usr)
 Register/Unregister callback for event - exec connected/disconnected.
virtual void addExecDisconnectedCb (DtExecRemovedChangeCb callback, void *usr)
 Register/Unregister callback for event - exec connected/disconnected.
virtual void removeExecDisconnectedCb (DtExecRemovedChangeCb callback, void *usr)
 Register/Unregister callback for event - exec connected/disconnected.
virtual int execConnected (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &addr, const MAKRti::DtString &hostName, bool fullyCompliant)
 Called when the exec connects/disconnects.
virtual int execDisconnected (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &addr)
 Called when the exec connects/disconnects.

Protected Member Functions

 DtForwarderPort (const DtRIDParameters *params, DtBoost::shared_ptr< DtRouteMap > routes, MAKRti::DtInetAddr host, int forwarderPort, MAKRti::DtInetEndpoint addnlConnection)
virtual void forwarderNodeIsReady (unsigned long id)
 Called when the forwarder port is known and node becomes ready.
virtual int socketQueueStatus (unsigned int connId, int connQueueStatus)
 Called when the socket queue status changes.
virtual void waitingForForwarderConnections (const DtConnAndNameMap &allNeededFws, const DtConnAndNameMap &stillNeededFws)
 Specifies that this port is waiting for other forwarder connections.
virtual void notWaitingForForwarderConnections ()
 Called when exiting from the waiting for forwarder connections state.
virtual int connectionEstablished (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int connID, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &addr)
 Call when connection is added/removed/changed Invokes callbacks registered for this event.
virtual int connectionLost (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int connID, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &addr)
 Call when connection is added/removed/changed Invokes callbacks registered for this event.
virtual int connectionChanged (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int oldConnID, unsigned int newConnID, const DtInetAddrAndPort &addr)
 Call when connection is added/removed/changed Invokes callbacks registered for this event.
int reconnectBegun (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int connID, const DtInetAddrAndPort &addr)
 Call when connection is added/removed/changed Invokes callbacks registered for this event.
int reconnectComplete (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int connID, const DtInetAddrAndPort &addr, bool wasSuccessful)
 Call when connection is added/removed/changed Invokes callbacks registered for this event.
virtual void federateResigned (const MAKRti::DtString &connName, const MAKRti::DtString &connType, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &addr)
 Called when the federate joins/resigns.
virtual void federateJoined (const MAKRti::DtString &connName, const MAKRti::DtString &connType, const MAKRti::DtString &federationName, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &addr, const MAKRti::DtString &hostName, unsigned int processId, const MAKRti::DtString &processName, const MAKRti::DtString &commandArgs, DtHlaVersionId hlaVersion)
 Called when the federate joins/resigns.

Static Protected Member Functions

static int socketQueueStatus (unsigned int connId, int connQueueStatus, void *usr)
 Callback function registered to be called when socket queue status changes.
static void forwarderNodeIsReady (unsigned long id, void *usr)
 Callback function registered to be called when forwarder node is ready (port is known)
static int connectionEstablished (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int connID, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &addr, void *usr)
 Callback function registered to be called when connection is added/removed/changed.
static int connectionLost (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int connID, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &addr, void *usr)
 Callback function registered to be called when connection is added/removed/changed.
static int connectionChanged (const MAKRti::DtString &connName, const MAKRti::DtString &hostName, unsigned int oldConnID, unsigned int newConnID, const DtInetAddrAndPort &addr, void *usr)
 Callback function registered to be called when connection is added/removed/changed.
static void federateJoined (const MAKRti::DtString &connName, const MAKRti::DtString &connType, const MAKRti::DtString &federationName, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &addr, const MAKRti::DtString &hostName, unsigned int processId, const MAKRti::DtString &processName, const MAKRti::DtString &commandArgs, DtHlaVersionId hlaVersion, void *usr)
 Callback function registered to be called when federate joins/resigns.
static void federateResigned (const MAKRti::DtString &connName, const MAKRti::DtString &connType, unsigned int connID, unsigned int fedHandle, const DtInetAddrAndPort &addr, void *usr)
 Callback function registered to be called when federate joins/resigns.
static int execConnected (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &addr, const MAKRti::DtString &hostName, bool fullyCompliant, void *usr)
 Callback function registered to be called when exec connects/disconnects.
static int execDisconnected (const MAKRti::DtString &connName, unsigned int connID, const DtInetAddrAndPort &addr, void *usr)
 Callback function registered to be called when exec connects/disconnects.

Protected Attributes

const DtRIDParametersmyParams
DtBoost::shared_ptr< DtRouteMapmyRoutes
const MAKRti::DtInetAddr myAddress
bool myOk
int myPortToUse
MAKRti::DtInetEndpoint myAdditionalAddrToConnectTo
DtConnectionAddRemoveCallbackList myConnectionEstablishedCbs
DtConnectionAddRemoveCallbackList myConnectionLostCbs
DtConnectionReconnectBegunCallbackList myReconnectBegunCbs
DtConnectionReconnectCompleteCallbackList myReconnectCompleteCbs
DtConnectionChangeCallbackList myConnectionChangedCbs
DtFederateAddedCallbackList myFederateJoinedCbs
DtFederateRemovedCallbackList myFederateResignedCbs
DtPortReadyCallbackList myPortReadyCbs
DtExecAddedCallbackList myExecConnectedCbs
DtExecRemovedCallbackList myExecDisconnectedCbs
DtSocketQueueCallbackList mySocketQueueCbs
DtWaitingForFwsCallbackList myWaitingForFwsCbs
DtNotWaitingForFwsCallbackList myNotWaitingForFwsCbs

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.

Member Typedef Documentation

typedef std::map<DtInetAddrAndPort, MAKRti::DtString> DtForwarderPort::DtConnAndNameMap
typedef int(* DtForwarderPort::DtConnectionAddRemoveCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &, void *)
typedef std::vector< std::pair< DtConnectionChangeCb, void* > > DtForwarderPort::DtConnectionChangeCallbackList
typedef int(* DtForwarderPort::DtConnectionChangeCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, void *)
typedef int(* DtForwarderPort::DtConnectionReconnectBegunCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, void *)
typedef int(* DtForwarderPort::DtConnectionReconnectCompleteCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, bool, void *)
typedef int(* DtForwarderPort::DtExecAddChangeCb)(const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, const MAKRti::DtString &, bool, void *)
typedef std::vector< std::pair< DtExecAddChangeCb, void* > > DtForwarderPort::DtExecAddedCallbackList
typedef std::vector< std::pair< DtExecRemovedChangeCb, void* > > DtForwarderPort::DtExecRemovedCallbackList
typedef int(* DtForwarderPort::DtExecRemovedChangeCb)(const MAKRti::DtString &, unsigned int, const DtInetAddrAndPort &, void *)
typedef std::vector< std::pair< DtFederateAddedCb, void* > > DtForwarderPort::DtFederateAddedCallbackList
typedef void(* DtForwarderPort::DtFederateAddedCb)(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, void *)
typedef std::vector< std::pair< DtFederateRemovedCb, void* > > DtForwarderPort::DtFederateRemovedCallbackList
typedef void(* DtForwarderPort::DtFederateRemovedCb)(const MAKRti::DtString &, const MAKRti::DtString &, unsigned int, unsigned int, const DtInetAddrAndPort &, void *)
typedef DtForwarderPort*(* DtForwarderPort::DtForwarderPortCreatorFcn)(const DtRIDParameters *, const DtBoost::shared_ptr< DtRouteMap >, const MAKRti::DtInetAddr &, int, const MAKRti::DtInetEndpoint &)

DtForwarderPort creator signature.

typedef std::vector< std::pair< DtNotWaitingForFwsCb, void* > > DtForwarderPort::DtNotWaitingForFwsCallbackList
typedef void(* DtForwarderPort::DtNotWaitingForFwsCb)(void *)
typedef std::vector< std::pair< DtPortReadyCb, void*> > DtForwarderPort::DtPortReadyCallbackList
typedef void(* DtForwarderPort::DtPortReadyCb)(unsigned long, void *)
typedef std::vector< std::pair< DtSocketQueueCb, void* > > DtForwarderPort::DtSocketQueueCallbackList
typedef int(* DtForwarderPort::DtSocketQueueCb)(unsigned int, int, void *)
typedef std::vector< std::pair< DtWaitingForFwsCb, void* > > DtForwarderPort::DtWaitingForFwsCallbackList
typedef void(* DtForwarderPort::DtWaitingForFwsCb)(const DtConnAndNameMap &, const DtConnAndNameMap &, void *)

Constructor & Destructor Documentation

DtForwarderPort::DtForwarderPort ( const DtRIDParameters params,
DtBoost::shared_ptr< DtRouteMap routes,
MAKRti::DtInetAddr  host,
int  forwarderPort,
MAKRti::DtInetEndpoint  addnlConnection 
)
inlineprotected
virtual DtForwarderPort::~DtForwarderPort ( )
inlinevirtual

Member Function Documentation

virtual unsigned int DtForwarderPort::abortPendingConnections ( )
pure virtual

Abort any embryonic connections.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

void DtForwarderPort::addConnectionChangedCb ( DtConnectionChangeCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myConnectionChangedCbs.

void DtForwarderPort::addConnectionEstablishedCb ( DtConnectionAddRemoveCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myConnectionEstablishedCbs.

void DtForwarderPort::addConnectionLostCb ( DtConnectionAddRemoveCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myConnectionLostCbs.

void DtForwarderPort::addExecConnectionEstablishedCb ( DtExecAddChangeCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - exec connected/disconnected.

References myExecConnectedCbs.

void DtForwarderPort::addExecDisconnectedCb ( DtExecRemovedChangeCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - exec connected/disconnected.

References myExecDisconnectedCbs.

void DtForwarderPort::addFederateJoinedCb ( DtFederateAddedCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - federate join/resign.

References myFederateJoinedCbs.

void DtForwarderPort::addFederateResignedCb ( DtFederateRemovedCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - federate join/resign.

References myFederateResignedCbs.

void DtForwarderPort::addForwarderPortReadyCb ( DtPortReadyCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - forwarder port becomes ready.

References myPortReadyCbs.

void DtForwarderPort::addNotWaitingForForwarderConnectionsCb ( DtNotWaitingForFwsCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.

References myNotWaitingForFwsCbs.

void DtForwarderPort::addReconnectBegun ( DtConnectionReconnectBegunCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myReconnectBegunCbs.

void DtForwarderPort::addReconnectComplete ( DtConnectionReconnectCompleteCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myReconnectCompleteCbs.

void DtForwarderPort::addSocketQueueCb ( DtSocketQueueCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - socket queue status changes.

References mySocketQueueCbs.

void DtForwarderPort::addWaitingForForwarderConnectionsCb ( DtWaitingForFwsCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.

References myWaitingForFwsCbs.

virtual int DtForwarderPort::checkConnectionStatus ( const DtInetAddrAndPort target = 0)
pure 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.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::clearNeededConnections ( )
pure virtual

Clear the list of connections that this forwarder needs to establish.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

int DtForwarderPort::connectionChanged ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  oldConnID,
unsigned int  newConnID,
const DtInetAddrAndPort addr 
)
inlineprotectedvirtual

Call when connection is added/removed/changed Invokes callbacks registered for this event.

References myConnectionChangedCbs.

int DtForwarderPort::connectionChanged ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  oldConnID,
unsigned int  newConnID,
const DtInetAddrAndPort addr,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when connection is added/removed/changed.

int DtForwarderPort::connectionEstablished ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  connID,
const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &  addr 
)
inlineprotectedvirtual

Call when connection is added/removed/changed Invokes callbacks registered for this event.

References myConnectionEstablishedCbs.

int DtForwarderPort::connectionEstablished ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  connID,
const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &  addr,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when connection is added/removed/changed.

int DtForwarderPort::connectionLost ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  connID,
const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &  addr 
)
inlineprotectedvirtual

Call when connection is added/removed/changed Invokes callbacks registered for this event.

References myConnectionLostCbs.

int DtForwarderPort::connectionLost ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  connID,
const std::pair< DtInetAddrAndPort, DtInetAddrAndPort > &  addr,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when connection is added/removed/changed.

virtual DtAddressPortList DtForwarderPort::connections ( ) const
pure virtual

Get the list of all current connections to this port.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::dropMulticastGroup ( const MAKRti::DtInetAddr &  mcastAddr)
pure virtual

Listen / drop multicast groups (LAN-port-only)

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

int DtForwarderPort::execConnected ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort addr,
const MAKRti::DtString &  hostName,
bool  fullyCompliant 
)
inlinevirtual

Called when the exec connects/disconnects.

Invokes callbacks registered for this event.

References myExecConnectedCbs.

int DtForwarderPort::execConnected ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort addr,
const MAKRti::DtString &  hostName,
bool  fullyCompliant,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when exec connects/disconnects.

int DtForwarderPort::execDisconnected ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort addr 
)
inlinevirtual

Called when the exec connects/disconnects.

Invokes callbacks registered for this event.

References myExecDisconnectedCbs.

int DtForwarderPort::execDisconnected ( const MAKRti::DtString &  connName,
unsigned int  connID,
const DtInetAddrAndPort addr,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when exec connects/disconnects.

void DtForwarderPort::federateJoined ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  connType,
const MAKRti::DtString &  federationName,
unsigned int  connID,
unsigned int  fedHandle,
const DtInetAddrAndPort addr,
const MAKRti::DtString &  hostName,
unsigned int  processId,
const MAKRti::DtString &  processName,
const MAKRti::DtString &  commandArgs,
DtHlaVersionId  hlaVersion 
)
inlineprotectedvirtual

Called when the federate joins/resigns.

Invokes callbacks registered for this event.

References myFederateJoinedCbs.

void DtForwarderPort::federateJoined ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  connType,
const MAKRti::DtString &  federationName,
unsigned int  connID,
unsigned int  fedHandle,
const DtInetAddrAndPort addr,
const MAKRti::DtString &  hostName,
unsigned int  processId,
const MAKRti::DtString &  processName,
const MAKRti::DtString &  commandArgs,
DtHlaVersionId  hlaVersion,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when federate joins/resigns.

void DtForwarderPort::federateResigned ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  connType,
unsigned int  connID,
unsigned int  fedHandle,
const DtInetAddrAndPort addr 
)
inlineprotectedvirtual

Called when the federate joins/resigns.

Invokes callbacks registered for this event.

References myFederateResignedCbs.

void DtForwarderPort::federateResigned ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  connType,
unsigned int  connID,
unsigned int  fedHandle,
const DtInetAddrAndPort addr,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when federate joins/resigns.

bool DtForwarderPort::flush ( )
inlinevirtual

Flush any unsent/buffered packets; return true if flush sent data.

Reimplemented in DtInOutForwarderPort, and DtLanForwarderPort.

void DtForwarderPort::forwarderNodeIsReady ( unsigned long  id)
inlineprotectedvirtual

Called when the forwarder port is known and node becomes ready.

Invokes callbacks registered for this event.

References myPortReadyCbs.

void DtForwarderPort::forwarderNodeIsReady ( unsigned long  id,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when forwarder node is ready (port is known)

virtual DtAddressMsgPair DtForwarderPort::getNextMsg ( )
pure virtual

Get the next message to forward and the source connection.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual bool DtForwarderPort::isOk ( ) const
inlinevirtual

Is the Port still alive?

virtual bool DtForwarderPort::isReady ( ) const
pure virtual

Is the Port fully usable and available?

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::listenToMulticastGroup ( const MAKRti::DtInetAddr &  mcastAddr)
pure virtual

Listen / drop multicast groups (LAN-port-only)

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

void DtForwarderPort::notWaitingForForwarderConnections ( )
inlineprotectedvirtual

Called when exiting from the waiting for forwarder connections state.

Invokes callbacks registered for this event.

References myNotWaitingForFwsCbs.

virtual unsigned int DtForwarderPort::pendingConnectionsAborted ( )
pure virtual

Return count of aborted connections.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

int DtForwarderPort::reconnectBegun ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  connID,
const DtInetAddrAndPort addr 
)
inlineprotected

Call when connection is added/removed/changed Invokes callbacks registered for this event.

References myReconnectBegunCbs.

int DtForwarderPort::reconnectComplete ( const MAKRti::DtString &  connName,
const MAKRti::DtString &  hostName,
unsigned int  connID,
const DtInetAddrAndPort addr,
bool  wasSuccessful 
)
inlineprotected

Call when connection is added/removed/changed Invokes callbacks registered for this event.

References myReconnectCompleteCbs.

void DtForwarderPort::removeConnectionChangedCb ( DtConnectionChangeCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myConnectionChangedCbs.

void DtForwarderPort::removeConnectionEstablishedCb ( DtConnectionAddRemoveCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myConnectionEstablishedCbs.

void DtForwarderPort::removeConnectionLostCb ( DtConnectionAddRemoveCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myConnectionLostCbs.

void DtForwarderPort::removeExecConnectionEstablishedCb ( DtExecAddChangeCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - exec connected/disconnected.

References myExecConnectedCbs.

void DtForwarderPort::removeExecDisconnectedCb ( DtExecRemovedChangeCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - exec connected/disconnected.

References myExecDisconnectedCbs.

void DtForwarderPort::removeFederateJoinedCb ( DtFederateAddedCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - federate join/resign.

References myFederateJoinedCbs.

void DtForwarderPort::removeFederateResignedCb ( DtFederateRemovedCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - federate join/resign.

References myFederateResignedCbs.

void DtForwarderPort::removeForwarderPortReadyCb ( DtPortReadyCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - forwarder port becomes ready.

References myPortReadyCbs.

void DtForwarderPort::removeNotWaitingForForwarderConnectionsCb ( DtNotWaitingForFwsCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.

References myNotWaitingForFwsCbs.

void DtForwarderPort::removeReconnectBegun ( DtConnectionReconnectBegunCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myReconnectBegunCbs.

void DtForwarderPort::removeReconnectComplete ( DtConnectionReconnectCompleteCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for addition/removal/change of connections.

References myReconnectCompleteCbs.

void DtForwarderPort::removeSocketQueueCb ( DtSocketQueueCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - socket queue status changes.

References mySocketQueueCbs.

void DtForwarderPort::removeWaitingForForwarderConnectionsCb ( DtWaitingForFwsCb  callback,
void *  usr 
)
inlinevirtual

Register/Unregister callback for event - entrance/exit the "waiting for forwarder connections" state.

References myWaitingForFwsCbs.

virtual void DtForwarderPort::selectParams ( MAKRti::DtSelectParamWithWrite &  selectParams)
pure virtual

Add this port's current select() notification set to the passed set.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::sendByTransport ( const DtForwarderMsg msg) const
pure virtual

Check transport metadata and send message to appropriate socket(s)

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::sendToAllReliable ( const DtForwarderMsg msg) const
pure virtual

Send a message to all available destinations.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::sendToListReliable ( const DtForwarderMsg msg,
const DtRouteMap::DtAddressPortList destinations 
) const
pure virtual

Send a message to the specified list of destinations excluding the list of filtered destinations.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

void DtForwarderPort::setForwarderId ( unsigned long  id)
inlinevirtual

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 in DtLanForwarderPort.

int DtForwarderPort::socketQueueStatus ( unsigned int  connId,
int  connQueueStatus 
)
inlineprotectedvirtual

Called when the socket queue status changes.

Invokes callbacks registered for this event.

References mySocketQueueCbs.

int DtForwarderPort::socketQueueStatus ( unsigned int  connId,
int  connQueueStatus,
void *  usr 
)
inlinestaticprotected

Callback function registered to be called when socket queue status changes.

virtual bool DtForwarderPort::updateFederateConnectionId ( unsigned long  orig,
unsigned long  final 
)
pure virtual

Update locally connected federate connection ID (LAN-port-only)

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

virtual void DtForwarderPort::updateRoutes ( )
pure virtual

Handle changes to the Routing map.

Implemented in DtInOutForwarderPort, and DtLanForwarderPort.

void DtForwarderPort::waitingForForwarderConnections ( const DtConnAndNameMap allNeededFws,
const DtConnAndNameMap stillNeededFws 
)
inlineprotectedvirtual

Specifies that this port is waiting for other forwarder connections.

Lists the full set of expected forwarders, and the set we are still waiting for. Invokes callbacks registered for this event.

References myWaitingForFwsCbs.

Member Data Documentation

MAKRti::DtInetEndpoint DtForwarderPort::myAdditionalAddrToConnectTo
protected
const MAKRti::DtInetAddr DtForwarderPort::myAddress
protected
DtConnectionChangeCallbackList DtForwarderPort::myConnectionChangedCbs
protected
DtConnectionAddRemoveCallbackList DtForwarderPort::myConnectionEstablishedCbs
protected
DtConnectionAddRemoveCallbackList DtForwarderPort::myConnectionLostCbs
protected
DtExecAddedCallbackList DtForwarderPort::myExecConnectedCbs
protected
DtExecRemovedCallbackList DtForwarderPort::myExecDisconnectedCbs
protected
DtFederateAddedCallbackList DtForwarderPort::myFederateJoinedCbs
protected
DtFederateRemovedCallbackList DtForwarderPort::myFederateResignedCbs
protected
DtNotWaitingForFwsCallbackList DtForwarderPort::myNotWaitingForFwsCbs
protected
bool DtForwarderPort::myOk
protected
const DtRIDParameters* DtForwarderPort::myParams
protected
DtPortReadyCallbackList DtForwarderPort::myPortReadyCbs
protected
int DtForwarderPort::myPortToUse
protected
DtConnectionReconnectBegunCallbackList DtForwarderPort::myReconnectBegunCbs
protected
DtConnectionReconnectCompleteCallbackList DtForwarderPort::myReconnectCompleteCbs
protected
DtBoost::shared_ptr<DtRouteMap> DtForwarderPort::myRoutes
protected
DtSocketQueueCallbackList DtForwarderPort::mySocketQueueCbs
protected
DtWaitingForFwsCallbackList DtForwarderPort::myWaitingForFwsCbs
protected

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

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)