![]() |
MAK RTIspy API Documentation for HLA 1.3
|
Instances of DtSmConnectionMgr manage the communication objects that the RTI will use to communicate via shared memory or communicate with the LRC application (using the federate ambassador pointer). More...
Inheritance diagram for DtSmConnectionMgr:
Collaboration diagram for DtSmConnectionMgr:Public Member Functions | |
| virtual | ~DtSmConnectionMgr () |
| virtual void | initQMgr (DtU32 numBuckets, DtU32 payloadSize, bool reliable, bool forceMgrSubscribe) |
| This method is called by the queue manager to setup the queue. | |
| virtual int | send (const DtRtiMsg &msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| Sending. | |
| virtual bool | flush () |
| Send buffered messages. | |
| virtual bool | processConnection (DtRtiConnection *conn, MAKRti::DtTransportType trans) |
| Receiving. | |
| virtual bool | processConnections () |
| Override of base class method. | |
| virtual DtRtiMsg * | getMessage () |
| Get a message if one exists Message must be destroyed by caller. | |
| virtual DtRtiMsg * | getMessageWithNetInfo (MAKRti::DtInetAddr *addr, MAKRti::DtTransportType *trans, DtU32 *priority=NULL) |
| These methods return the network information (destination address, transport method, and priority - if any) associated with a message in shared memory. | |
| virtual MAKRti::DtInetAddr | getLastDestAddr () const |
| virtual MAKRti::DtTransportType | getLastTransportType () const |
| virtual int | readFileDescriptor (RTI::TransportType transport) |
| Returns a file descriptor on which data will be present for the given transport type whenever there is incoming data waiting to be read. | |
| virtual DtSmRtiConnection * | sharedMemConn () const |
| Returns the connection created by createSharedMemConn(). | |
| virtual void | setNetConnMgr (DtRtiShmQNetMgr *smNetConnMgr) |
| Shared memory queue manager will allow messages to be exchanged between the shared memory connection manager and the network I/O connection manager. | |
| virtual bool | sm_shutdown (bool ruthless=false) |
| Attempts to shutdown shared memory queue. | |
| virtual bool | setupSelectParams (DtSelectParam *params) |
| adds Read File descriptors to a DtSelectParams | |
| virtual void | setMsgFactory (DtRtiMsgFactory *fact) |
| Get/Set the message factory. | |
| virtual void | listenToMulticastGroup (const MAKRti::DtInetAddr &addr, const MAKRti::DtInetAddr &netInterface=MAKRti::DtInetAddr::inaddrAny()) |
| Add/Drop multicast groups from the best effort connection. | |
| virtual void | dropMulticastGroup (const MAKRti::DtInetAddr &addr, const MAKRti::DtInetAddr &netInterface=MAKRti::DtInetAddr::inaddrAny()) |
| Add/Drop multicast groups from the best effort connection Listens are accumulated and drops decrement. | |
| virtual void | forceDropMulticastGroup (const MAKRti::DtInetAddr &addr, const MAKRti::DtInetAddr &netInterface=MAKRti::DtInetAddr::inaddrAny()) |
| Override listen count and force drop multicast address. | |
| virtual void | connectFederation (RTI::FederateAmbassador *fedAmb, DtLogicalTimeFactory *logicalTimeFactoryPtr, MAKRti::DtString fedExName, DtFederateHandle fedHandle, int fedExHandle) |
| The LRC associates its federation information with its network connections. | |
| virtual bool | repairFederationConnection () |
| Attempt to re-establish a broken connection to the federation Returns true if successful. | |
| virtual void | disconnectFederation () |
| The LRC disassociates its connections from the federation. | |
| virtual bool | wait (MAKRti::DtTime period=0.0, bool unlockWhileWaiting=false) |
| Wait for data to be ready or the given period of time to expire Return boolean: data is ready for reading? | |
| virtual int | subscriberCount () const |
| Return a count of the number of subscribers currently attached to the shared memory queue. | |
Public Member Functions inherited from DtConnectionMgr | |
| virtual | ~DtConnectionMgr () |
| 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 | initParams (DtRIDParameters *params) |
| Initialize the parameters used by the connection manager. | |
| virtual void | enableSmartForwarding (bool enableSmartForwarding, bool enableInternalMessageSmartForwarding, int maxNumFederates) |
| Enables or disables smart forwarding. | |
| virtual DtRIDParameters * | params () |
| Get a pointer to the RID parameters. | |
| virtual void | setFederateMgr (DtFederateMgr *fedMgrPtr) |
| Set the federate manager. | |
| virtual void | shutdown () |
| Request shutdown of communication activities. | |
| virtual bool | isShuttingDown () |
| Shutdown acknowledged. | |
| virtual int | sendStamped (const DtRtiMsg &msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &=MAKRti::DtInetAddr::inaddrAny()) |
| Send a message stamped with fedEx name and federate ID Retraction record of timestamped messages made here. | |
| virtual int | sendStampedAnonymous (const DtRtiMsg &msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| Send a message stamped with fedEx name, but not federate ID Does not make retraction record of sent messages. | |
| virtual int | sendAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| Send a message and delete the message after it has been sent Returns the size of the data sent. | |
| virtual int | sendDirectedAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, DtFederateHandle fedHandle, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| Send and delete a message stamped with federate ID These messages are sent to a specific entity by using internal smart forwarding if enabled. | |
| virtual int | sendStampedAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &=MAKRti::DtInetAddr::inaddrAny()) |
| Send and delete a message stamped with fedEx name and federate ID Retraction record of timestamped messages made here. | |
| virtual void | sendLoopback (DtRtiMsg *msg) |
| Send a message to be processed by this federate. | |
| virtual bool | drainBacklog (MAKRti::DtTime timeout=0.0) |
| Attempts to flush backlogged messages repeatedly until either all messages are sent or the timeout expires. | |
| virtual void | activateTransmitDelay () |
| Activate a delay timer (based on RID) used by managers to control transmission of internal state Expired delays disable activation for current tick. | |
| virtual bool | delayTransmit () const |
| Return true if retransmission of internal state should be delayed. | |
| virtual void | testTransmitDelay () |
| Test if retransmit delay time has expired. | |
| virtual void | activateAutoProvideDelay () |
| Activate a delay timer (based on RID) used by managers to control timing for autoprovide callbacks Expired delays disable activation for current tick. | |
| virtual bool | delayAutoProvide () const |
| Return true if autoprovides should be delayed. | |
| bool | allProvideUpdateRequestsDelayed () const |
| Return true if all provide update calls should be delayed (not just auto provide). | |
| virtual void | testAutoProvideDelay () |
| Test if autoprovide delay time has expired. | |
| virtual void | processThrottledMessages () |
| Process messages in throttle queue that are being sent at specified rate. | |
| virtual void | flushThrottledMessages () |
| Flush messages in throttle queue. | |
| virtual unsigned long | incrementServiceCallCount () |
| Increment a counter to identify the service call being processed. | |
| virtual unsigned long | serviceCallCount () const |
| Return service call counter. | |
| virtual bool | tick () |
| Receiving. | |
| virtual void | updateBufferSizes () |
| Update Buffer sizes from Rid params object. | |
| virtual DtNetReadStatus | handleMsg (DtRtiMsg &msg) |
| Handle this message by either processing it or queuing it if save pending. | |
| virtual DtNetReadStatus | processMsg (const DtRtiMsg &msg) |
| this function applies the callbacks to the message | |
| virtual DtNetReadStatus | momProcessMsg (const DtRtiMsg &msg) |
| apply MOM callbacks to message | |
| DtFederateMgr * | fedMgr () |
| The federate manager. | |
| DtPartnerMgr * | partnerMgr () |
| Partner manager. | |
| virtual MAKRti::DtTransportType | internalTransportType () const |
| Returns the TransportType associated for the internal connection. | |
| virtual bool | hasTransport (MAKRti::DtTransportType trans) |
| returns true if the specified transport type is available | |
| virtual DtRtiMsg * | create (DtRtiMsgKind kind) |
| Request the RTI message factory for a msg. | |
| virtual DtRtiMsgFactory * | msgFactory () const |
| virtual void | connectFederation (DtLogicalTimeFactory *logicalTimeFactoryPtr, MAKRti::DtString fedExName, DtFederateHandle federateHandle, int fedExHandle) |
| The LRC associates its federation information with its network connections. | |
| virtual RTI::FederateAmbassador * | fedAmb () const |
| Return pointer to Federate Ambassador. | |
| virtual void | addFedAmbWrapper (MAKRti::DtString const &name, DtFedAmbWrapper *fedAmb) |
| Register a Federate Wrapper with the RTI A federate wrapper allows your plugin to monitor any RTI invoked services. | |
| virtual bool | addFedAmbWrapperAtFront (MAKRti::DtString const &name, DtFedAmbWrapper *fedAmb) |
| When the fedAmb Wrapper is installed make certain that this particular wrapper is the first to process the msg. | |
| virtual DtFedAmbWrapper * | removeFedAmbWrapper (MAKRti::DtString const &name) |
| Remove federate wrapper. | |
| virtual unsigned long | connectionId () const |
| Return connection ID. | |
| virtual DtFederateHandle | fedHandle () const |
| Return federate handle. | |
| virtual unsigned long | fedExHandle () const |
| Return federation execution handle. | |
| virtual const MAKRti::DtString & | fedExName () const |
| Return federation execution name. | |
| virtual void | setFederateHandle (DtFederateHandle handle) |
| set federate handle ( this is used by restore and should not be called otherwise ) | |
| virtual DtLogicalTimeFactory * | logicalTimeFactory (DtFederationHandle federationHandle=0) const |
| Get the factory for the given federation that can create logical time/interval instances. | |
| virtual void | addLogicalTimeFactory (DtFederationHandle federationHandle, DtLogicalTimeFactory *timeFactory) |
| Add the factory for the given federation that can create logical time/interval instances. | |
| virtual void | removeLogicalTimeFactory (DtFederationHandle federationHandle) |
| Remove the factory for the given federation that can create logical time/interval instances. | |
| virtual DtRtiMsgQueue * | msgQueue () |
| Set/Get the time managed message queue. | |
| virtual void | setMsgQueue (DtRtiMsgQueue *msgQueuePtr) |
| virtual DtRetractInfoList * | retractList () |
| Set/Get the time managed retract list. | |
| virtual void | setRetractList (DtRetractInfoList *listPtr) |
| virtual void | yield () |
| Yield processing to allow more data to arrive. | |
| virtual bool | saveInProgress () const |
| Set/Get the flag indicating whether a save is in progress Unless a message is marked safe to process during a save a received message is queued for later processing. | |
| virtual void | setSaveInProgress (bool saveIsInProgress) |
| virtual bool | restoreInProgress () const |
| Set/Get the flag indicating whether a restore is in progress Unless a message is marked safe to process during a save a received message is queued for later processing. | |
| virtual void | setRestoreInProgress (bool saveIsInProgress) |
| virtual bool | saveRestoreInProgress () const |
| Return bool: Is save or restore in progress. | |
| virtual void | setMetadataControl (DtMetadataType type, bool onOff) |
| Set/Get metadata control indicators. | |
| virtual bool | isMetadataEnabled (DtMetadataType type) |
| virtual void | sendShutdownForwarderMsg () |
| Called by the rtiExec when it is exiting, only if it started this forwarder. | |
| virtual unsigned long | sequenceNumber () const |
| Get the next sequence number. | |
| virtual void | incrementSequenceNumber () |
| Increment the sequence number. | |
| virtual int | sendDirectedStampedAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, DtFederateHandle fedHandle, const MAKRti::DtInetAddr &=MAKRti::DtInetAddr::inaddrAny()) |
| virtual int | sendDirectedStampedAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, DtBitMask *sendMask, const MAKRti::DtInetAddr &=MAKRti::DtInetAddr::inaddrAny()) |
| virtual int | sendStampedAnonymousAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| virtual int | sendDirectedStampedAnonymousAndDelete (DtRtiMsg *msg, MAKRti::DtTransportType transport, DtFederateHandle fedHandle, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| virtual void | setProcessingTick (bool processingTick) |
| Set/Get tick processing state. | |
| virtual bool | processingTick () const |
| Set/Get tick processing state. | |
| virtual void | setEvokingCallbacks (bool evokingCbs) |
| Set/Get the evoke callbacks state. | |
| virtual bool | evokingCallbacks () const |
| Set/Get the evoke callbacks state. | |
| virtual void | addPendingMsg (DtRtiMsg *msg) |
| Add/get/process a pending message Messages will be processed during the next tick. | |
| virtual bool | processPendingMsg () |
| Add/get/process a pending message Messages will be processed during the next tick. | |
| virtual DtRtiMsg * | nextPendingMsg () |
| Add/get/process a pending message Messages will be processed during the next tick. | |
| virtual void | emptyPendingMsgList () |
| Add/get/process a pending message Messages will be processed during the next tick. | |
| virtual int | pendingMsgCount () |
| Add/get/process a pending message Messages will be processed during the next tick. | |
| virtual void | addMsgCallback (DtRtiMsgKind msgKind, DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false) |
| Message Callbacks These callback functions operate on all of the connections. | |
| virtual void | removeMsgCallback (DtRtiMsgKind msgKind, DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false) |
| Message Callbacks These callback functions operate on all of the connections. | |
| virtual void | addWildcardMsgCallback (DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false) |
| Message Callbacks These callback functions operate on all of the connections. | |
| virtual void | removeWildcardMsgCallback (DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false) |
| Message Callbacks These callback functions operate on all of the connections. | |
| virtual DtRtiConnection * | reliableConn () const |
| Returns the connection created by createTcpConn(). | |
| virtual DtRtiConnection * | bestEffortConn () const |
| Returns the connection created by createBestEffortConn(). | |
| virtual bool | lockServiceCall () |
| Called by asynchronous processing thread to gain mutually exclusive access to RTI managers. | |
| virtual void | unlockServiceCall () |
| Called by asychronous processing thread to release mutually exclusive access to RTI managers. | |
| virtual bool | serviceCallLocked () |
| Called by RTI Ambassador services query if mutex was set using lockServiceCall() | |
| virtual bool | enterServiceCall () |
| Called by RTI Ambassador services to gain mutually exclusive access to RTI managers. | |
| virtual void | exitServiceCall () |
| Called by RTI Ambassador services to release mutually exclusive access to RTI managers. | |
| virtual bool | inServiceCall () |
| Called by RTI Ambassador services query if mutex was set using enterServiceCall() | |
Static Public Member Functions | |
| static DtConnectionMgr * | create (DtRIDParameters *p, bool isFederate=false, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient=DtBoost::shared_ptr< DtRtiAssistantLrcClient >()) |
| Creates an instance of a DtSmConnectionMgr; If an alternate creator function has been set, that creator function will be called from within this function. | |
| static DtConnectionMgr * | createQMgr (DtRIDParameters *params, DtU32 numBuckets, DtU32 payloadSize, bool queueReliable, bool forceMgrSubscribe, bool isFederate=false, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient=DtBoost::shared_ptr< DtRtiAssistantLrcClient >(), DtRtiShmQNetMgr *smNetConnMgr=0) |
| Creates an instance of a DtSmConnectionMgr which acts on behalf of the shared memory queue manager. | |
Static Public Member Functions inherited from DtConnectionMgr | |
| static void | setCreatorFunction (DtConnectionMgrCreator fn) |
| Register a creator function. | |
| static void | setInternalCreatorFunction (DtConnectionMgrCreator fn) |
| Register alternate internal creators. | |
Protected Member Functions | |
| DtSmConnectionMgr (DtRIDParameters *params, bool isFederate=false, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient=DtBoost::shared_ptr< DtRtiAssistantLrcClient >()) | |
| virtual void | startSharedMemMgr () |
| Launch detached process to create the shared memory pool, subscribable message queue, and shared memory manager. | |
| virtual int | initConnections () |
| Initialize the RTI's exercise connections Users who wish to override the MAK RTI's shared memory connections should override these functions. | |
| virtual bool | createSharedMemConn () |
| Create connection (attach) to subscribable shared memory queue; Returns true if successful. | |
Protected Member Functions inherited from DtConnectionMgr | |
| DtConnectionMgr (DtRIDParameters *params, bool isFederate=false, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient=DtBoost::shared_ptr< DtRtiAssistantLrcClient >()) | |
| Constructor is performed through create. | |
| virtual bool | doWait (MAKRti::DtTime period) |
| perform actual wait. Called by wait | |
| virtual bool | createBestEffortConn () |
| Create best effort connection; Returns true if successful Could be that it already exist in which case it is still used. | |
| virtual void | destroyBestEffortConn () |
| Destroy best effort connection. | |
| virtual bool | createRelConn () |
| Create reliable connection; Returns true if successful. | |
| virtual void | destroyRelConn () |
| Destroy reliable connection. | |
| virtual unsigned int | createAncillaryRelConns () |
| Create ancillary reliable connections; Returns count of successful connections. | |
| virtual void | destroyAncillaryRelConn (DtRtiConnection *conn) |
| Destroy the given ancillary reliable connection. | |
| virtual void | destroyAncillaryRelConns () |
| Destroy ancillary reliable connections. | |
| virtual unsigned int | ancillaryReliableConnsCount () const |
| Report number of ancillary reliable connections successfully established. | |
| virtual bool | checkRelConn () |
| Check the reliable connection status. | |
| virtual void | processReadResult (int readError) |
| Process read result to print error diagnostics for example. | |
| virtual int | sendStampedUtilityFunction (DtRtiMsg *msg, MAKRti::DtTransportType transport, bool performDelete, bool isAnonymous, const MAKRti::DtInetAddr &addr) |
| Called by sendStamped, sendStampedAndDelete, sendAnonymousStamped, etc. | |
Protected Attributes | |
| DtSmRtiConnection * | mySharedMemConn |
| MAKRti::DtString | mySharedMemName |
| DtRtiShmQNetMgr * | mySharedMemNetMgr |
| bool | myIsQueueManager |
| These members are specific to the queue manager's connection manager. | |
| DtU32 | myNumBuckets |
| indicates this is the queue manager | |
| DtU32 | myPayloadSize |
| number of message slots in shared memory queue | |
| bool | myQueueReliable |
| number of bytes available in each message slot | |
| bool | myForceSubscribe |
| indicates shared mem queue in reliable mode | |
| DtU32 | myReadMask |
| should only be used by queue manager | |
| MAKRti::DtInetAddr | myLastDestAddr |
| controls what type of messages are read/skipped | |
| MAKRti::DtTransportType | myLastTransportType |
Protected Attributes inherited from DtConnectionMgr | |
| DtRtiMsgFactory * | myMsgFactory |
| The message factory. | |
| DtRtiConnection * | myBestEffortConn |
| The best effort connection. | |
| DtRtiConnection * | myPrimaryReliableConn |
| The primary reliable connection. | |
| DtRtiConnectionList | myReliableConns |
| DtRIDParameters * | myParams |
| The RTI initialization parameters. | |
| DtFederateMgr * | myFedMgr |
| The federate manager. | |
| std::map< MAKRti::DtInetAddr, DtMulticastEntry * > | myMulticastGroups |
| LRC listening to these multicast groups. | |
| DtFedAmbWrapperChain | myFedAmbChain |
| Chain of Federate Ambassador Wrappers. | |
| DtDfltMsgFactory | myDfltMsgFactory |
| Default message factory. | |
| DtRtiMsgCbMgr | myMsgCbMgr |
| Message callback manager. | |
| DtRtiMsgCbMgr | myMomMsgCbMgr |
| MOM message callback manager. | |
| MAKRti::DtTransportType | myInternalTransportType |
| Transport type used for internal messages. | |
| bool | myAddTransportTypeMetadata |
| Metadata control indicators. | |
| bool | myAddMcastMetadata |
| std::map< DtFederationHandle, DtLogicalTimeFactory * > | myLogicalTimeFactories |
| Factories for creating logical time instances. | |
| DtRtiMsgQueue * | myMsgQueue |
| Message queue. | |
| DtRetractInfoList * | myRetractList |
| Message retractions. | |
| std::list< DtRtiMsg * > | myPendingMessages |
| Pending messages. | |
| bool | mySaveInProgress |
| Save status. | |
| bool | myRestoreInProgress |
| Restore status. | |
| unsigned long | myConnectionId |
| "unique" identifier for this connMgr (if there is a good source of unique ids) | |
| MAKRti::DtString | myFedExName |
| Federation execution name. | |
| DtFederateHandle | myFedExHandle |
| Federation execution handle. | |
| DtFederateHandle | myFederateHandle |
| Federate handle. | |
| unsigned long | myReceivedMsgCount |
| Number of received messages. | |
| unsigned long | mySentMsgCount |
| Number of sent messages. | |
| MAKRti::DtList | myWorkingMsgId |
| Diagnostic message ID stack. | |
| DtMessageThrottle * | myMessageThrottle |
| Message output throttle. | |
| bool | myAllProvideUpdateRequestsDelayed |
| Extend auto provide delay to all attribute update requests. | |
| DtMutex * | myCallbackMutex |
| Mutex to synchronize access to RTI and Federate Ambassadors. | |
| unsigned int | myLockService |
| RTI is processing a message. | |
| unsigned int | myInService |
| RTI is processing a service call. | |
| MAKRti::DtClock | myClock |
| Clock for timing. | |
| DtBoost::shared_ptr < DtRtiAssistantLrcClient > | myAssistantClient |
| The assistant client. | |
| bool | myIsFederate |
| Whether this manager is for a federate. | |
| unsigned long | myVersionConflictCount |
| The count of message version conflicts. | |
| MAKRti::DtTime | myVersionConflictNoticationTimer |
| unsigned long | mySizeMismatchCount |
| The count of message size mismatches. | |
| MAKRti::DtTime | mySizeMismatchNoticationTimer |
| DtPartnerMgr * | myPartnerMgr |
| unsigned long | myServiceCallCount |
| Service call counter - increment before processing each service call. | |
| bool | myProcessingTick |
| Tick processing state. | |
| bool | myEvokingCallbacks |
| Indicates if callbacks are being evoked. | |
| bool | myProcessingMessage |
| Indicates if message is being processed. | |
| bool | myShutdown |
| Shutdown requested. | |
| bool | myShuttingDown |
| Shutdown acknowledged. | |
Additional Inherited Members | |
Public Types inherited from DtConnectionMgr | |
| typedef DtConnectionMgr *(* | DtConnectionMgrCreator )(DtRIDParameters *p, bool isFederate, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient) |
| Connection Manager Creator. | |
Protected Types inherited from DtConnectionMgr | |
| typedef std::list < DtRtiConnection * > | DtRtiConnectionList |
| List of all reliable connections (for forwarder load balancing) | |
Static Protected Attributes inherited from DtConnectionMgr | |
| static DtConnectionMgrCreator | theCreator = 0 |
| The plugin creator. | |
| static DtConnectionMgrCreator | theInternalCreator = 0 |
| The internal creator. | |
Instances of DtSmConnectionMgr manage the communication objects that the RTI will use to communicate via shared memory or communicate with the LRC application (using the federate ambassador pointer).
Override this class to change the way in which the MAK RTI communicates with other LRC components (or the rtiexec) using shared memory. Refer to DtConnectionMgr for other methods of communication.
|
protected |
Referenced by create(), and createQMgr().
|
virtual |
References DtConnectionMgr::create(), DtDisconnectMsgKind, DtSmEnrollmentMsgKind, DtSmUnregister, DtConnectionMgr::emptyPendingMsgList(), DtConnectionMgr::internalTransportType(), DtConnectionMgr::myBestEffortConn, DtConnectionMgr::myConnectionId, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myFedExHandle, DtConnectionMgr::myPrimaryReliableConn, mySharedMemConn, DtConnectionMgr::sendAndDelete(), DtSmEnrollmentMsg::set(), DtConnectMsg::setConnectionHandle(), DtRtiMsg::setFederateHandle(), DtRtiMsg::setFedEx(), and DtRtiConnection::socket().
|
virtual |
The LRC associates its federation information with its network connections.
If the LRC is communicating with the rtiexec through a reliable connection, then the best effort connection is created here.
References DtConnectionMgr::addLogicalTimeFactory(), DtMessageThrottle::clear(), DtConnectionMgr::create(), createSharedMemConn(), DtSmEnrollmentMsgKind, DtSmRegister, DtConnectionMgr::fedExHandle(), DtConnectionMgr::fedExName(), DtFedAmbWrapperChain::init(), DtConnectionMgr::myBestEffortConn, DtConnectionMgr::myFedAmbChain, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myFedExHandle, DtConnectionMgr::myFedExName, DtConnectionMgr::myInternalTransportType, DtConnectionMgr::myMessageThrottle, DtConnectionMgr::myPrimaryReliableConn, DtAssistantPopupHelper::popupAssistantMessage(), DtConnectionMgr::sendAndDelete(), DtSmEnrollmentMsg::set(), DtRtiConnection::setFederateHandle(), DtRtiConnection::setFedExHandle(), DtRtiConnection::setFedExName(), and sharedMemConn().
|
static |
Creates an instance of a DtSmConnectionMgr; If an alternate creator function has been set, that creator function will be called from within this function.
Reimplemented from DtConnectionMgr.
References DtSmConnectionMgr().
Referenced by DtRtiExec::DtRtiExec(), and DtRtiAmbassadorBaseImplementor::setupConnection().
|
static |
Creates an instance of a DtSmConnectionMgr which acts on behalf of the shared memory queue manager.
This function prototype is intentionally different than the nominal DtConnectionMgr create method to make it incompatible with the setCreator() method. This will prevent it being set as the default creator of DtConnectionMgr objects. Only one shared memory queue manager should be created (per shared memory queue).
References DtSmConnectionMgr(), DtConnectionMgr::init(), initQMgr(), and setNetConnMgr().
|
protectedvirtual |
Create connection (attach) to subscribable shared memory queue; Returns true if successful.
References DtRtiSmSocket::initializeSmQueue(), DtConnectionMgr::msgFactory(), myForceSubscribe, myIsQueueManager, myNumBuckets, myPayloadSize, myQueueReliable, myReadMask, mySharedMemConn, mySharedMemName, DtRtiConnection::setMsgFactory(), DtRtiSmSocket::setReceiveMask(), and sharedMemConn().
Referenced by connectFederation(), initConnections(), and repairFederationConnection().
|
virtual |
The LRC disassociates its connections from the federation.
If the LRC is communicating with the rtiexec through a reliable connection, then the best effort connection is destroyed here.
Reimplemented from DtConnectionMgr.
References DtMessageThrottle::clear(), DtConnectionMgr::create(), DtSmEnrollmentMsgKind, DtSmUnregister, DtConnectionMgr::emptyPendingMsgList(), DtConnectionMgr::myFedAmbChain, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myFedExHandle, DtConnectionMgr::myFedExName, DtConnectionMgr::myInternalTransportType, DtConnectionMgr::myMessageThrottle, DtConnectionMgr::myMsgQueue, DtConnectionMgr::myReceivedMsgCount, DtConnectionMgr::myRestoreInProgress, DtConnectionMgr::myRetractList, DtConnectionMgr::mySaveInProgress, DtConnectionMgr::myWorkingMsgId, DtConnectionMgr::removeLogicalTimeFactory(), DtFedAmbWrapperChain::reset(), DtConnectionMgr::sendAndDelete(), DtSmEnrollmentMsg::set(), DtRtiConnection::setFederateHandle(), DtRtiConnection::setFedExHandle(), DtRtiConnection::setFedExName(), and sharedMemConn().
|
virtual |
Add/Drop multicast groups from the best effort connection Listens are accumulated and drops decrement.
The multicast is not actually dropped until the listen count goes to zero.
Reimplemented from DtConnectionMgr.
References DtConnectionMgr::bestEffortConn(), DtMulticastEntry::count, DtConnectionMgr::create(), DtMcastConfigureMsgKind, DtMcastDrop, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myInternalTransportType, DtConnectionMgr::myMulticastGroups, DtConnectionMgr::sendAndDelete(), and DtMcastConfigureMsg::set().
|
virtual |
Send buffered messages.
Returns indication of whether the flush is complete or incomplete.
Reimplemented from DtConnectionMgr.
References sharedMemConn().
Referenced by getMessage().
|
virtual |
Override listen count and force drop multicast address.
Listen count goes to zero.
Reimplemented from DtConnectionMgr.
References DtConnectionMgr::bestEffortConn(), DtConnectionMgr::create(), DtMcastConfigureMsgKind, DtMcastDrop, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myInternalTransportType, DtConnectionMgr::myMulticastGroups, DtConnectionMgr::sendAndDelete(), and DtMcastConfigureMsg::set().
|
virtual |
References myLastDestAddr.
|
virtual |
References myLastTransportType.
|
virtual |
Get a message if one exists Message must be destroyed by caller.
Reimplemented from DtConnectionMgr.
References DtRtiMsg::cloneWithTransport(), DtNET_READ_NO_PACKETS, flush(), DtRtiConnection::netRead(), DtConnectionMgr::processReadResult(), DtRtiMsg::setTransportType(), and sharedMemConn().
Referenced by getMessageWithNetInfo().
|
virtual |
These methods return the network information (destination address, transport method, and priority - if any) associated with a message in shared memory.
References getMessage(), and sharedMemConn().
|
protectedvirtual |
Initialize the RTI's exercise connections Users who wish to override the MAK RTI's shared memory connections should override these functions.
Reimplemented from DtConnectionMgr.
References createSharedMemConn(), DtMAX_SHMEMCONN_TRIES, DtSM_WAIT_FOR_SHMMGR, DtConnectionMgr::myBestEffortConn, DtConnectionMgr::myConnectionId, DtConnectionMgr::myInternalTransportType, myIsQueueManager, DtConnectionMgr::myParams, DtConnectionMgr::myPrimaryReliableConn, mySharedMemName, DtAssistantPopupHelper::popupAssistantMessage(), sharedMemConn(), DtRIDParameters::sharedMemName, DtRtiConnection::socket(), startSharedMemMgr(), and DtRIDParameters::useRandomNumberForFedHandle.
|
virtual |
This method is called by the queue manager to setup the queue.
It must be called ONLY by the queue manager and must be called before calling the init() method to ensure proper initialization of the queue manager.
References DtMetadataTypeMcastAddr, DtMetadataTypeTransport, DtSMQ_SKIP_MINE, myForceSubscribe, myIsQueueManager, myNumBuckets, myPayloadSize, myQueueReliable, myReadMask, and DtConnectionMgr::setMetadataControl().
Referenced by createQMgr().
|
virtual |
Add/Drop multicast groups from the best effort connection.
Reimplemented from DtConnectionMgr.
References DtConnectionMgr::bestEffortConn(), DtMulticastEntry::count, DtConnectionMgr::create(), DtMcastConfigureMsgKind, DtMcastListen, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myInternalTransportType, DtConnectionMgr::myMulticastGroups, DtConnectionMgr::sendAndDelete(), and DtMcastConfigureMsg::set().
|
virtual |
Receiving.
Read from the given connection and process the message (if received) Return boolean: message was received? (i.e. could be more input).
Reimplemented from DtConnectionMgr.
References DtNET_READ_NO_PACKETS, DtNET_READ_SUCCESS, DtConnectionMgr::handleMsg(), myLastDestAddr, myLastTransportType, DtRtiConnection::netRead(), and DtRtiMsg::setTransportType().
Referenced by processConnections().
|
virtual |
Override of base class method.
Shared memory only has one connection to worry about, not multiple. Return true if there is more backlogged data to send, false if done.
Reimplemented from DtConnectionMgr.
References DtSmRtiConnection::flush(), DtConnectionMgr::myInternalTransportType, DtConnectionMgr::params(), processConnection(), reconnectEnabled, repairFederationConnection(), and sharedMemConn().
|
virtual |
Returns a file descriptor on which data will be present for the given transport type whenever there is incoming data waiting to be read.
Returns -1 if no such file descriptor.
Reimplemented from DtConnectionMgr.
|
virtual |
Attempt to re-establish a broken connection to the federation Returns true if successful.
Reimplemented from DtConnectionMgr.
References DtConnectionMgr::create(), createSharedMemConn(), DtSmEnrollmentMsgKind, DtSmRegister, DtSmUnregister, federateReconnectPause, DtConnectionMgr::myBestEffortConn, DtConnectionMgr::myFederateHandle, DtConnectionMgr::myFedExHandle, DtConnectionMgr::myFedExName, DtConnectionMgr::myInternalTransportType, DtConnectionMgr::myPrimaryReliableConn, mySharedMemConn, DtConnectionMgr::params(), rtiExecReconnectPause, DtConnectionMgr::sendAndDelete(), DtSmEnrollmentMsg::set(), DtRtiConnection::setFederateHandle(), DtRtiConnection::setFedExHandle(), DtRtiConnection::setFedExName(), sharedMemConn(), and useRtiExec.
Referenced by processConnections().
|
virtual |
Sending.
Send a message Returns the size of the data sent.
Reimplemented from DtConnectionMgr.
References DtMetadataTypeMcastAddr, DtMetadataTypeTransport, DtRtiMsg::fedExHandle(), DtConnectionMgr::isMetadataEnabled(), DtSmRtiConnection::isReliable(), DtConnectionMgr::logicalTimeFactory(), DtRtiMsg::print(), DtSmRtiConnection::send(), DtRtiMtdTransportType::set(), DtRtiMtdMcastAddr::set(), and sharedMemConn().
|
virtual |
Get/Set the message factory.
Reimplemented from DtConnectionMgr.
References DtConnectionMgr::myMsgFactory, DtRtiConnection::setMsgFactory(), and sharedMemConn().
|
virtual |
Shared memory queue manager will allow messages to be exchanged between the shared memory connection manager and the network I/O connection manager.
References mySharedMemNetMgr.
Referenced by createQMgr().
|
virtual |
adds Read File descriptors to a DtSelectParams
Reimplemented from DtConnectionMgr.
|
virtual |
Returns the connection created by createSharedMemConn().
References mySharedMemConn.
Referenced by connectFederation(), createSharedMemConn(), disconnectFederation(), flush(), getMessage(), getMessageWithNetInfo(), initConnections(), processConnections(), repairFederationConnection(), send(), setMsgFactory(), sm_shutdown(), subscriberCount(), and wait().
|
virtual |
Attempts to shutdown shared memory queue.
References myIsQueueManager, sharedMemConn(), and DtSmRtiConnection::sm_shutdown().
|
protectedvirtual |
Launch detached process to create the shared memory pool, subscribable message queue, and shared memory manager.
Will fork new child process, but child will never return control to parent. If a shared memory mgr process is already running the forked process will simply exit, but will not signal the parent.
References DtCreateProcess__rti__(), DtProcFullyDetached__rti__, DtRtiSearchPathList(), DtSHMQMGR_EXEC, DtRIDParameters::getFullPathToRidFile(), and DtConnectionMgr::params().
Referenced by initConnections().
|
virtual |
Return a count of the number of subscribers currently attached to the shared memory queue.
References sharedMemConn(), and DtSmRtiConnection::subscriberCount().
|
virtual |
Wait for data to be ready or the given period of time to expire Return boolean: data is ready for reading?
Reimplemented from DtConnectionMgr.
References DtConnectionMgr::enterServiceCall(), DtConnectionMgr::exitServiceCall(), DtConnectionMgr::inServiceCall(), DtConnectionMgr::lockServiceCall(), DtConnectionMgr::serviceCallLocked(), sharedMemConn(), DtConnectionMgr::unlockServiceCall(), and DtSmRtiConnection::waitForMessages().
|
protected |
indicates shared mem queue in reliable mode
Referenced by createSharedMemConn(), and initQMgr().
|
protected |
These members are specific to the queue manager's connection manager.
Referenced by createSharedMemConn(), initConnections(), initQMgr(), and sm_shutdown().
|
protected |
controls what type of messages are read/skipped
This member is part of an ugly hack to get the destination address from the next message in the shared memory queue so the network I/O manager within the shared memory queue manager knows where to send messages retrieved from shared memory.
Referenced by getLastDestAddr(), and processConnection().
|
protected |
Referenced by getLastTransportType(), and processConnection().
|
protected |
indicates this is the queue manager
Referenced by createSharedMemConn(), and initQMgr().
|
protected |
number of message slots in shared memory queue
Referenced by createSharedMemConn(), and initQMgr().
|
protected |
number of bytes available in each message slot
Referenced by createSharedMemConn(), and initQMgr().
|
protected |
should only be used by queue manager
Referenced by createSharedMemConn(), and initQMgr().
|
protected |
Referenced by createSharedMemConn(), repairFederationConnection(), sharedMemConn(), and ~DtSmConnectionMgr().
|
protected |
Referenced by createSharedMemConn(), and initConnections().
|
protected |
Referenced by setNetConnMgr().