![]() |
MAK RTIspy API Documentation for HLA 1.3
|
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: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 DtConnectionMgr * | create (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. | |
| DtRtiShmQNetMgr & | operator= (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 |
| DtSmConnectionMgr * | mySmConnMgr |
| bool | myCloseAllConnectionsRequested |
| Connection shutdown requested? | |
| DtFedHandleToFedExHandleMap | myFedHandleToFedExMap |
| DtRouteMaskFilterByFedexHandle | myFedexHandleFilterList |
| DtRouteMaskFilterByFedexName | myFedexFilterList |
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).
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] |
| DtRtiShmQNetMgr::DtRtiShmQNetMgr | ( | DtRIDParameters * | params | ) | [protected] |
Default Constructor.
Referenced by create().
| DtRtiShmQNetMgr::~DtRtiShmQNetMgr | ( | ) | [virtual] |
Destructor.
References myFedHandleToFedExMap.
| DtRtiShmQNetMgr::DtRtiShmQNetMgr | ( | const DtRtiShmQNetMgr & | orig | ) | [protected] |
Copy Ctor and Assignment Operator unimplemented.
| void DtRtiShmQNetMgr::applyOutboundMsgFilters | ( | DtRtiMsg * | msg | ) | [protected, virtual] |
Special processing is needed on certain inbound and outbound messages.
| DtConnectionMgr * DtRtiShmQNetMgr::create | ( | DtRIDParameters * | p | ) | [static] |
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] |
References DtNET_READ_FILTERED_PACKET, DtNET_READ_SUCCESS, DtRtiMsg::federateHandle(), DtRtiMsg::fedExHandle(), myFedHandleToFedExMap, and DtRtiMsg::transportType().
Referenced by processMsg().
| 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] |
| bool DtRtiShmQNetMgr::performMulticastDiscovery | ( | ) | [protected, virtual] |
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] |
this function applies the callbacks to the message
Reimplemented from DtConnectionMgr.
References DtNET_READ_SUCCESS, DtRtiMsg::federateHandle(), DtRtiMsg::fedExHandle(), filterReliableLoopbacks(), DtConnectionMgr::logicalTimeFactory(), DtRtiMsg::msgKind(), DtConnectionMgr::myFederateHandle, DtConnectionMgr::myMsgCbMgr, DtConnectionMgr::myReceivedMsgCount, DtConnectionMgr::myWorkingMsgId, DtMessageCallbackManager< T_Message, T_MessageKind >::numCallbacks(), DtRtiMsg::print(), and DtMessageCallbackManager< T_Message, T_MessageKind >::processMsg().
| void DtRtiShmQNetMgr::setSmConnMgr | ( | DtSmConnectionMgr * | smConnMgr | ) | [virtual] |
Allow the DtRtiShmQNetMgr to access the shared memory connection manager directly to simplify forwarding messages.
References mySmConnMgr.
bool DtRtiShmQNetMgr::myCloseAllConnectionsRequested [protected] |
Connection shutdown requested?
Referenced by dropSmFederate(), enrollSmFederate(), filterReliableLoopbacks(), and ~DtRtiShmQNetMgr().
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] |
DtSmConnectionMgr* DtRtiShmQNetMgr::mySmConnMgr [protected] |
Referenced by processConnection(), and setSmConnMgr().