MAK RTIspy API Documentation for HLA 1.3
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtRtiShmQNetMgr Class Reference

The DtRtiShmQNetMgr class implements a network I/O socket manager to filter and exchange messages between a shared memory queue manager and the network. More...

+ Inheritance diagram for DtRtiShmQNetMgr:
+ Collaboration diagram for DtRtiShmQNetMgr:

List of all members.

Public Member Functions

virtual ~DtRtiShmQNetMgr ()
 Destructor.
virtual int init (DtRIDParameters *params)
 Initialize the RTI's exercise parameters and connections Users who wish to override the MAK RTI's network connections should override this function or initConnections()
virtual void setSmConnMgr (DtSmConnectionMgr *smConnMgr)
 Allow the DtRtiShmQNetMgr to access the shared memory connection manager directly to simplify forwarding messages.
virtual void enrollSmFederate (DtFederateHandle federateHandle, int fedExHandle)
 Maintanence methods for Federate to FedEx handle map.
virtual void dropSmFederate (DtFederateHandle federateHandle, int fedExHandle)

Static Public Member Functions

static DtConnectionMgrcreate (DtRIDParameters *p)
 Creates an instance of a DtConnectionMgr; If an alternate creator function has been set, that creator function will be called from within this function.

Protected Types

typedef std::multimap
< DtFederateHandle, int > 
DtFedHandleToFedExHandleMap
 Stores all FedEx handles associated with each Federate Handle serviced by shared memory queue manager.
typedef std::map< int,
DtBitMask * > 
DtRouteMaskFilterByFedexHandle
 Destination list masks.
typedef std::map
< MAKRti::DtString, DtBitMask * > 
DtRouteMaskFilterByFedexName

Protected Member Functions

 DtRtiShmQNetMgr (DtRIDParameters *params)
 Default Constructor.
 DtRtiShmQNetMgr (const DtRtiShmQNetMgr &orig)
 Copy Ctor and Assignment Operator unimplemented.
DtRtiShmQNetMgroperator= (const DtRtiShmQNetMgr &orig)
virtual bool processConnection (DtRtiConnection *conn, MAKRti::DtTransportType trans)
 Override base class methods to allow special processing on inbound messages.
virtual DtNetReadStatus processMsg (const DtRtiMsg &msg)
 this function applies the callbacks to the message
virtual void applyOutboundMsgFilters (DtRtiMsg *msg)
 Special processing is needed on certain inbound and outbound messages.
virtual DtNetReadStatus filterReliableLoopbacks (const DtRtiMsg &msg)
virtual bool performMulticastDiscovery ()
 virtual void addOutboundMsgFilter( DtMessageFilter *filter ); virtual void removeOutboundMsgFilter( DtMessageFilter *filter );

Protected Attributes

MAKRti::DtInetAddr myHostIpAddr
 Need to know host IP address and port used for outbound best effort messages so looped back multicast messages can be filtered.
unsigned int myPort
DtSmConnectionMgrmySmConnMgr
bool myCloseAllConnectionsRequested
 Connection shutdown requested?
DtFedHandleToFedExHandleMap myFedHandleToFedExMap
DtRouteMaskFilterByFedexHandle myFedexHandleFilterList
DtRouteMaskFilterByFedexName myFedexFilterList

Detailed Description

The DtRtiShmQNetMgr class implements a network I/O socket manager to filter and exchange messages between a shared memory queue manager and the network.

It is derived from the DtAsyncConnectionMgr class. DtRtiShmQNetMgr manages connections and message distribution between co-located federates communicating via shared memory and remote federates (via UDP multicast) and remote Forwarders (if any).


Member Typedef Documentation

typedef std::multimap< DtFederateHandle, int > DtRtiShmQNetMgr::DtFedHandleToFedExHandleMap [protected]

Stores all FedEx handles associated with each Federate Handle serviced by shared memory queue manager.

Keyed by FedHandle since it is likely there will be multiple federates within the same FedEx sharing shared memory, so the federate handles will likely be more unique.

typedef std::map< int, DtBitMask* > DtRtiShmQNetMgr::DtRouteMaskFilterByFedexHandle [protected]

Destination list masks.

For each federation execution which has federates serviced by the shared memory queue a destination list mask is maintained which can be used to alter the destination list in all outbound messages.

typedef std::map< MAKRti::DtString, DtBitMask* > DtRtiShmQNetMgr::DtRouteMaskFilterByFedexName [protected]

Constructor & Destructor Documentation

Default Constructor.

Referenced by create().

Destructor.

References myFedHandleToFedExMap.

DtRtiShmQNetMgr::DtRtiShmQNetMgr ( const DtRtiShmQNetMgr orig) [protected]

Copy Ctor and Assignment Operator unimplemented.


Member Function Documentation

void DtRtiShmQNetMgr::applyOutboundMsgFilters ( DtRtiMsg msg) [protected, virtual]

Special processing is needed on certain inbound and outbound messages.

Creates an instance of a DtConnectionMgr; If an alternate creator function has been set, that creator function will be called from within this function.

References DtRtiShmQNetMgr(), DtConnectionMgr::init(), DtConnectionMgr::params(), and DtConnectionMgr::theCreator.

void DtRtiShmQNetMgr::dropSmFederate ( DtFederateHandle  federateHandle,
int  fedExHandle 
) [virtual]

References myFedHandleToFedExMap.

void DtRtiShmQNetMgr::enrollSmFederate ( DtFederateHandle  federateHandle,
int  fedExHandle 
) [virtual]

Maintanence methods for Federate to FedEx handle map.

References myFedHandleToFedExMap.

DtNetReadStatus DtRtiShmQNetMgr::filterReliableLoopbacks ( const DtRtiMsg msg) [protected, virtual]
int DtRtiShmQNetMgr::init ( DtRIDParameters params) [virtual]

Initialize the RTI's exercise parameters and connections Users who wish to override the MAK RTI's network connections should override this function or initConnections()

Reimplemented from DtAsyncConnectionMgr.

References DtConnectionMgr::bestEffortConn(), DtMetadataTypeMcastAddr, DtMetadataTypeTransport, DtRIDParameters::mcastDiscoveryEnabled, DtConnectionMgr::myParams, performMulticastDiscovery(), DtConnectionMgr::setMetadataControl(), DtRtiConnection::socket(), and DtRIDParameters::useRtiExec.

DtRtiShmQNetMgr& DtRtiShmQNetMgr::operator= ( const DtRtiShmQNetMgr orig) [protected]

virtual void addOutboundMsgFilter( DtMessageFilter *filter ); virtual void removeOutboundMsgFilter( DtMessageFilter *filter );

virtual void updateOutboundDestMask( DtBitMask& currentMask, DtFederateHandle fedHandle );

References DtMulitcastDiscoveryMgr::discover(), DtMulticastDiscoveryMsg::DtDiscoverTcpForwarder, DtRIDParameters::DtFomTransportTypeUseBestEffort, DtMulitcastDiscoveryMgr::init(), DtRIDParameters::mcastDiscoveryEnabled, DtConnectionMgr::myParams, DtRIDParameters::setTcpForwarderAddr(), DtRIDParameters::tcpForwarderAddrString(), and DtRIDParameters::useRtiExec.

Referenced by init().

bool DtRtiShmQNetMgr::processConnection ( DtRtiConnection conn,
MAKRti::DtTransportType  trans 
) [protected, virtual]

Override base class methods to allow special processing on inbound messages.

Reimplemented from DtConnectionMgr.

References DtNET_READ_NO_PACKETS, DtNET_READ_SUCCESS, DtAsyncConnectionMgr::handleMsg(), mySmConnMgr, DtRtiConnection::netRead(), NULL, DtConnectionMgr::sendAndDelete(), and DtRtiMsg::setTransportType().

DtNetReadStatus DtRtiShmQNetMgr::processMsg ( const DtRtiMsg msg) [protected, virtual]
void DtRtiShmQNetMgr::setSmConnMgr ( DtSmConnectionMgr smConnMgr) [virtual]

Allow the DtRtiShmQNetMgr to access the shared memory connection manager directly to simplify forwarding messages.

References mySmConnMgr.


Member Data Documentation

Connection shutdown requested?

MAKRti::DtInetAddr DtRtiShmQNetMgr::myHostIpAddr [protected]

Need to know host IP address and port used for outbound best effort messages so looped back multicast messages can be filtered.

unsigned int DtRtiShmQNetMgr::myPort [protected]

Referenced by processConnection(), and setSmConnMgr().


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)