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

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. More...
 
virtual int send (const DtRtiMsg &msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny())
 Sending. More...
 
virtual bool flush ()
 Send buffered messages. More...
 
virtual bool processConnection (DtRtiConnection *conn, MAKRti::DtTransportType trans)
 Receiving. More...
 
virtual bool processConnections ()
 Override of base class method. More...
 
virtual DtRtiMsggetMessage ()
 Get a message if one exists Message must be destroyed by caller. More...
 
virtual DtRtiMsggetMessageWithNetInfo (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. More...
 
virtual MAKRti::DtInetAddr getLastDestAddr () const
 
virtual MAKRti::DtTransportType getLastTransportType () const
 
virtual int readFileDescriptor (DtRtiApiTransportationType 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. More...
 
virtual DtSmRtiConnectionsharedMemConn () const
 Returns the connection created by createSharedMemConn(). More...
 
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. More...
 
virtual bool sm_shutdown (bool ruthless=false)
 Attempts to shutdown shared memory queue. More...
 
virtual bool setupSelectParams (DtSelectParam *params)
 adds Read File descriptors to a DtSelectParams More...
 
virtual void setMsgFactory (DtRtiMsgFactory *fact)
 Get/Set the message factory. More...
 
virtual void listenToMulticastGroup (const MAKRti::DtInetAddr &addr, const MAKRti::DtInetAddr &netInterface=MAKRti::DtInetAddr::inaddrAny())
 Add/Drop multicast groups from the best effort connection. More...
 
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. More...
 
virtual void forceDropMulticastGroup (const MAKRti::DtInetAddr &addr, const MAKRti::DtInetAddr &netInterface=MAKRti::DtInetAddr::inaddrAny())
 Override listen count and force drop multicast address. More...
 
virtual void connectFederation (RTI_API::FederateAmbassador *fedAmb, DtLogicalTimeFactory *logicalTimeFactoryPtr, MAKRti::DtString fedExName, DtFederateHandle fedHandle, int fedExHandle)
 The LRC associates its federation information with its network connections. More...
 
virtual bool repairFederationConnection ()
 Attempt to re-establish a broken connection to the federation Returns true if successful. More...
 
virtual void disconnectFederation ()
 The LRC disassociates its connections from the federation. More...
 
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? More...
 
virtual int subscriberCount () const
 Return a count of the number of subscribers currently attached to the shared memory queue. More...
 
- Public Member Functions inherited from DtConnectionMgr
virtual ~DtConnectionMgr ()
 Destructor. More...
 
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() More...
 
virtual void initParams (DtRIDParameters *params)
 Initialize the parameters used by the connection manager. More...
 
virtual void enableSmartForwarding (bool enableSmartForwarding, bool enableInternalMessageSmartForwarding, int maxNumFederates)
 Enables or disables smart forwarding. More...
 
virtual DtRIDParametersparams ()
 Get a pointer to the RID parameters. More...
 
virtual void setFederateMgr (DtFederateMgr *fedMgrPtr)
 Set the federate manager. More...
 
virtual void shutdown ()
 Request shutdown of communication activities. More...
 
virtual bool isShuttingDown ()
 Shutdown acknowledged. More...
 
virtual void setFederateAmbassador (RTI_API::FederateAmbassador *fedAmb)
 Set the federate ambassador. More...
 
virtual
RTI_API::AuthorizationResult::Code 
authorizationResult () const
 Connection is authorized? More...
 
virtual const MAKRti::DtString & authorizationMessage () const
 Authorization message. More...
 
virtual bool authorizationIsEnabled () const
 Return true if authorization is enabled. More...
 
virtual bool isAuthorized () const
 Return true if authorized. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual void sendLoopback (DtRtiMsg *msg)
 Send a message to be processed by this federate. More...
 
virtual bool drainBacklog (MAKRti::DtTime timeout=0.0)
 Attempts to flush backlogged messages repeatedly until either all messages are sent or the timeout expires. More...
 
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. More...
 
virtual bool delayTransmit () const
 Return true if retransmission of internal state should be delayed. More...
 
virtual void testTransmitDelay ()
 Test if retransmit delay time has expired. More...
 
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. More...
 
virtual bool delayAutoProvide () const
 Return true if autoprovides should be delayed. More...
 
bool allProvideUpdateRequestsDelayed () const
 Return true if all provide update calls should be delayed (not just auto provide). More...
 
virtual void testAutoProvideDelay ()
 Test if autoprovide delay time has expired. More...
 
virtual void processThrottledMessages ()
 Process messages in throttle queue that are being sent at specified rate. More...
 
virtual void flushThrottledMessages ()
 Flush messages in throttle queue. More...
 
virtual unsigned long incrementServiceCallCount () const
 Increment a (mutable) counter to identify the service call being processed. More...
 
virtual unsigned long serviceCallCount () const
 Return service call counter. More...
 
virtual bool tick ()
 Receiving. More...
 
virtual bool processConnectionsInCallback ()
 
virtual void updateBufferSizes ()
 Update Buffer sizes from Rid params object. More...
 
virtual DtNetReadStatus handleMsg (DtRtiMsg &msg)
 Handle this message by either processing it or queuing it if save pending. More...
 
virtual DtNetReadStatus processMsg (const DtRtiMsg &msg)
 this function applies the callbacks to the message More...
 
virtual DtNetReadStatus momProcessMsg (const DtRtiMsg &msg)
 apply MOM callbacks to message More...
 
DtFederateMgrfedMgr ()
 The federate manager. More...
 
DtPartnerMgrpartnerMgr ()
 Partner manager. More...
 
virtual MAKRti::DtTransportType internalTransportType () const
 Returns the TransportType associated for the internal connection. More...
 
virtual bool hasTransport (MAKRti::DtTransportType trans)
 returns true if the specified transport type is available More...
 
virtual DtRtiMsgcreate (DtRtiMsgKind kind)
 Request the RTI message factory for a msg. More...
 
virtual DtRtiMsgFactorymsgFactory () const
 
virtual void connectFederation (DtLogicalTimeFactory *logicalTimeFactoryPtr, MAKRti::DtString fedExName, DtFederateHandle federateHandle, int fedExHandle)
 The LRC associates its federation information with its network connections. More...
 
virtual void prepareToDisconnect ()
 Make preparations to disconnect. More...
 
virtual
RTI_API::FederateAmbassador * 
fedAmb () const
 Return pointer to Federate Ambassador. More...
 
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. More...
 
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. More...
 
virtual DtFedAmbWrapperremoveFedAmbWrapper (MAKRti::DtString const &name)
 Remove federate wrapper. More...
 
virtual unsigned long connectionId () const
 Return connection ID. More...
 
virtual DtFederateHandle fedHandle () const
 Return federate handle. More...
 
virtual unsigned long fedExHandle () const
 Return federation execution handle. More...
 
virtual const MAKRti::DtString & fedExName () const
 Return federation execution name. More...
 
virtual void setFederateHandle (DtFederateHandle handle)
 set federate handle ( this is used by restore and should not be called otherwise ) More...
 
virtual RTI_API::FederateHandle apiFederateHandle (DtFederateHandle handle) const
 Return the API federate handle encoded from the given internal handle. More...
 
virtual RTI_API::FederateHandle apiFederateHandle () const
 Return the API federate handle encoded from this federate's handle. More...
 
virtual DtLogicalTimeFactorylogicalTimeFactory (DtFederationHandle federationHandle=0) const
 Get the factory for the given federation that can create logical time/interval instances. More...
 
virtual void addLogicalTimeFactory (DtFederationHandle federationHandle, DtLogicalTimeFactory *timeFactory)
 Add the factory for the given federation that can create logical time/interval instances. More...
 
virtual void removeLogicalTimeFactory (DtFederationHandle federationHandle)
 Remove the factory for the given federation that can create logical time/interval instances. More...
 
virtual DtRtiMsgQueuemsgQueue ()
 Set/Get the time managed message queue. More...
 
virtual void setMsgQueue (DtRtiMsgQueue *msgQueuePtr)
 
virtual DtRetractInfoListretractList ()
 Set/Get the time managed retract list. More...
 
virtual void setRetractList (DtRetractInfoList *listPtr)
 
virtual void yield ()
 Yield processing to allow more data to arrive. More...
 
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. More...
 
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. More...
 
virtual void setRestoreInProgress (bool saveIsInProgress)
 
virtual bool saveRestoreInProgress () const
 Return bool: Is save or restore in progress. More...
 
virtual void setMetadataControl (DtMetadataType type, bool onOff)
 Set/Get metadata control indicators. More...
 
virtual bool isMetadataEnabled (DtMetadataType type)
 
virtual void sendShutdownForwarderMsg ()
 Called by the rtiExec when it is exiting, only if it started this forwarder. More...
 
virtual unsigned long sequenceNumber () const
 Get the next sequence number. More...
 
virtual void incrementSequenceNumber ()
 Increment the sequence number. More...
 
virtual bool connectionLost ()
 Indicates that the connection of the RTI has been lost. More...
 
virtual void resetConnectionLost ()
 Status Reset For Connection Lost Flag *Should be called after the connection loss has been handled. More...
 
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. More...
 
virtual bool processingTick () const
 Set/Get tick processing state. More...
 
virtual void setEvokingCallbacks (bool evokingCbs)
 Set/Get the evoke callbacks state. More...
 
virtual bool evokingCallbacks () const
 Set/Get the evoke callbacks state. More...
 
virtual void addPendingMsg (DtRtiMsg *msg)
 Add/get/process a pending message Messages will be processed during the next tick. More...
 
virtual bool processPendingMsg ()
 Add/get/process a pending message Messages will be processed during the next tick. More...
 
virtual DtRtiMsgnextPendingMsg ()
 Add/get/process a pending message Messages will be processed during the next tick. More...
 
virtual void emptyPendingMsgList ()
 Add/get/process a pending message Messages will be processed during the next tick. More...
 
bool isPendingMsgQueueEmpty ()
 Add/get/process a pending message Messages will be processed during the next tick. More...
 
virtual void addMsgCallback (DtRtiMsgKind msgKind, DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false)
 Message Callbacks These callback functions operate on all of the connections. More...
 
virtual void removeMsgCallback (DtRtiMsgKind msgKind, DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false)
 Message Callbacks These callback functions operate on all of the connections. More...
 
virtual void addWildcardMsgCallback (DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false)
 Message Callbacks These callback functions operate on all of the connections. More...
 
virtual void removeWildcardMsgCallback (DtRtiMsgCbMgr::DtCallbackFcn fcn, void *usr, bool isMomCallback=false)
 Message Callbacks These callback functions operate on all of the connections. More...
 
virtual DtRtiConnectionreliableConn () const
 Returns the connection created by createTcpConn(). More...
 
virtual DtRtiConnectionbestEffortConn () const
 Returns the connection created by createBestEffortConn(). More...
 
virtual bool lockServiceCall ()
 Called by asynchronous processing thread to gain mutually exclusive access to RTI managers. More...
 
virtual void unlockServiceCall ()
 Called by asychronous processing thread to release mutually exclusive access to RTI managers. More...
 
virtual bool serviceCallLocked ()
 Called by RTI Ambassador services query if mutex was set using lockServiceCall() More...
 
virtual bool enterServiceCall ()
 Called by RTI Ambassador services to gain mutually exclusive access to RTI managers. More...
 
virtual void exitServiceCall ()
 Called by RTI Ambassador services to release mutually exclusive access to RTI managers. More...
 
virtual bool inServiceCall ()
 Called by RTI Ambassador services query if mutex was set using enterServiceCall() More...
 

Static Public Member Functions

static DtConnectionMgrcreate (DtRIDParameters *p, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::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. More...
 
static DtConnectionMgrcreateQMgr (DtRIDParameters *params, DtU32 numBuckets, DtU32 payloadSize, bool queueReliable, bool forceMgrSubscribe, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::shared_ptr< DtRtiAssistantLrcClient >(), DtRtiShmQNetMgr *smNetConnMgr=0)
 Creates an instance of a DtSmConnectionMgr which acts on behalf of the shared memory queue manager. More...
 
- Static Public Member Functions inherited from DtConnectionMgr
static DtConnectionMgrcreate (DtRIDParameters *p, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::shared_ptr< DtRtiAssistantLrcClient >())
 A Connection Manager instance is created, initialized and its pointer is returned. More...
 
static void setCreatorFunction (DtConnectionMgrCreator fn)
 Register a creator function. More...
 
static void setInternalCreatorFunction (DtConnectionMgrCreator fn)
 Register alternate internal creators. More...
 

Protected Member Functions

 DtSmConnectionMgr (DtRIDParameters *params, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::shared_ptr< DtRtiAssistantLrcClient >())
 
virtual void startSharedMemMgr ()
 Launch detached process to create the shared memory pool, subscribable message queue, and shared memory manager. More...
 
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. More...
 
virtual bool createSharedMemConn ()
 Create connection (attach) to subscribable shared memory queue; Returns true if successful. More...
 
- Protected Member Functions inherited from DtConnectionMgr
 DtConnectionMgr (DtRIDParameters *params, bool isFederate=false, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient=std::shared_ptr< DtRtiAssistantLrcClient >())
 Constructor is performed through create. More...
 
virtual bool doWait (MAKRti::DtTime period)
 perform actual wait. Called by wait More...
 
virtual bool createBestEffortConn ()
 Create best effort connection; Returns true if successful Could be that it already exist in which case it is still used. More...
 
virtual void destroyBestEffortConn ()
 Destroy best effort connection. More...
 
virtual bool createRelConn ()
 Create reliable connection; Returns true if successful. More...
 
virtual void destroyRelConn ()
 Destroy reliable connection. More...
 
virtual unsigned int createAncillaryRelConns ()
 Create ancillary reliable connections; Returns count of successful connections. More...
 
virtual void destroyAncillaryRelConn (DtRtiConnection *conn)
 Destroy the given ancillary reliable connection. More...
 
virtual void destroyAncillaryRelConns ()
 Destroy ancillary reliable connections. More...
 
virtual unsigned int ancillaryReliableConnsCount () const
 Report number of ancillary reliable connections successfully established. More...
 
virtual bool checkRelConn ()
 Check the reliable connection status. More...
 
virtual void processReadResult (int readError)
 Process read result to print error diagnostics for example. More...
 
virtual int sendStampedUtilityFunction (DtRtiMsg *msg, MAKRti::DtTransportType transport, bool performDelete, bool isAnonymous, const MAKRti::DtInetAddr &addr)
 Called by sendStamped, sendStampedAndDelete, sendAnonymousStamped, etc. More...
 
virtual void handleConnectMessage (const DtConnectMsg *message)
 Handle the connect message from the forwarder. More...
 
virtual void handleAuthorizationMessage (const DtAuthorizationResultMsg *resultMessage)
 Handle the authorization result message from the forwarder. More...
 

Protected Attributes

DtSmRtiConnectionmySharedMemConn
 
MAKRti::DtString mySharedMemName
 
DtRtiShmQNetMgrmySharedMemNetMgr
 
bool myIsQueueManager
 These members are specific to the queue manager's connection manager. More...
 
DtU32 myNumBuckets
 indicates this is the queue manager More...
 
DtU32 myPayloadSize
 number of message slots in shared memory queue More...
 
bool myQueueReliable
 number of bytes available in each message slot More...
 
bool myForceSubscribe
 indicates shared mem queue in reliable mode More...
 
DtU32 myReadMask
 should only be used by queue manager More...
 
MAKRti::DtInetAddr myLastDestAddr
 controls what type of messages are read/skipped More...
 
MAKRti::DtTransportType myLastTransportType
 
- Protected Attributes inherited from DtConnectionMgr
DtRtiMsgFactorymyMsgFactory
 The message factory. More...
 
DtRtiConnectionmyBestEffortConn
 The best effort connection. More...
 
DtRtiConnectionmyPrimaryReliableConn
 The primary reliable connection. More...
 
DtRtiConnectionList myReliableConns
 
DtRIDParametersmyParams
 The RTI initialization parameters. More...
 
DtFederateMgrmyFedMgr
 The federate manager. More...
 
std::map< MAKRti::DtInetAddr,
DtMulticastEntry * > 
myMulticastGroups
 LRC listening to these multicast groups. More...
 
DtFedAmbWrapperChain myFedAmbChain
 Chain of Federate Ambassador Wrappers. More...
 
DtDfltMsgFactory myDfltMsgFactory
 Default message factory. More...
 
DtRtiMsgCbMgr myMsgCbMgr
 Message callback manager. More...
 
DtRtiMsgCbMgr myMomMsgCbMgr
 MOM message callback manager. More...
 
MAKRti::DtTransportType myInternalTransportType
 Transport type used for internal messages. More...
 
bool myAddTransportTypeMetadata
 Metadata control indicators. More...
 
bool myAddMcastMetadata
 
std::map< DtFederationHandle,
DtLogicalTimeFactory * > 
myLogicalTimeFactories
 Factories for creating logical time instances. More...
 
DtRtiMsgQueuemyMsgQueue
 Message queue. More...
 
DtRetractInfoListmyRetractList
 Message retractions. More...
 
DtMessageQueueType myPendingMessages
 Pending messages. More...
 
bool myConnectionLost
 Connection Lost. More...
 
bool mySaveInProgress
 Save status. More...
 
bool myRestoreInProgress
 Restore status. More...
 
bool myAuthorizationIsEnabled
 Is authorization enabled. More...
 
RTI_API::AuthorizationResult::Code myAuthorizationResult
 
MAKRti::DtString myAuthorizationMessage
 Authorization message (mainly in case of failed authorization) More...
 
bool myDisconnectPending
 Disconnect from federation is pending. More...
 
unsigned long myConnectionId
 "unique" identifier for this connMgr (if there is a good source of unique ids) More...
 
MAKRti::DtString myFedExName
 Federation execution name. More...
 
DtFederateHandle myFedExHandle
 Federation execution handle. More...
 
DtFederateHandle myFederateHandle
 Federate handle. More...
 
unsigned long myReceivedMsgCount
 Number of received messages. More...
 
unsigned long mySentMsgCount
 Number of sent messages. More...
 
MAKRti::DtList myWorkingMsgId
 Diagnostic message ID stack. More...
 
DtMessageThrottlemyMessageThrottle
 Message output throttle. More...
 
bool myAllProvideUpdateRequestsDelayed
 Extend auto provide delay to all attribute update requests. More...
 
DtMutex * myCallbackMutex
 Mutex to synchronize access to RTI and Federate Ambassadors. More...
 
unsigned int myLockService
 RTI is processing a message. More...
 
unsigned int myInService
 RTI is processing a service call. More...
 
MAKRti::DtClock myClock
 Clock for timing. More...
 
std::shared_ptr
< DtRtiAssistantLrcClient
myAssistantClient
 The assistant client. More...
 
bool myIsFederate
 Whether this manager is for a federate. More...
 
unsigned long myVersionConflictCount
 The count of message version conflicts. More...
 
MAKRti::DtTime myVersionConflictNoticationTimer
 
unsigned long mySizeMismatchCount
 The count of message size mismatches. More...
 
MAKRti::DtTime mySizeMismatchNoticationTimer
 
DtPartnerMgrmyPartnerMgr
 
unsigned long myServiceCallCount
 Service call counter - increment before processing each service call. More...
 
bool myProcessingTick
 Tick processing state. More...
 
bool myEvokingCallbacks
 Indicates if callbacks are being evoked. More...
 
bool myProcessingMessage
 Indicates if message is being processed. More...
 
bool myShutdown
 Shutdown requested. More...
 
bool mySendShuttingDown
 Shutdown acknowledged. More...
 
bool myReceiveShuttingDown
 Shutdown acknowledged. More...
 
unsigned long myTickCount
 
const DtRtiApiTransportationType myBestEffortTransportType
 
const DtRtiApiTransportationType myReliableTransportType
 

Additional Inherited Members

- Public Types inherited from DtConnectionMgr
typedef DtConnectionMgr *(* DtConnectionMgrCreator )(DtRIDParameters *p, bool isFederate, std::shared_ptr< DtRtiAssistantLrcClient > assistantClient)
 Connection Manager Creator. More...
 
- Protected Types inherited from DtConnectionMgr
typedef std::list
< DtRtiConnection * > 
DtRtiConnectionList
 List of all reliable connections (for forwarder load balancing) More...
 
- Static Protected Attributes inherited from DtConnectionMgr
static DtConnectionMgrCreator theCreator
 The plugin creator. More...
 
static DtConnectionMgrCreator theInternalCreator
 The internal creator. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

DtSmConnectionMgr::DtSmConnectionMgr ( DtRIDParameters params,
bool  isFederate = false,
std::shared_ptr< DtRtiAssistantLrcClient assistantClient = std::shared_ptr< DtRtiAssistantLrcClient >() 
)
protected
virtual DtSmConnectionMgr::~DtSmConnectionMgr ( )
virtual

Member Function Documentation

virtual void DtSmConnectionMgr::connectFederation ( RTI_API::FederateAmbassador *  fedAmb,
DtLogicalTimeFactory logicalTimeFactoryPtr,
MAKRti::DtString  fedExName,
DtFederateHandle  fedHandle,
int  fedExHandle 
)
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.

static DtConnectionMgr* DtSmConnectionMgr::create ( DtRIDParameters p,
bool  isFederate = false,
std::shared_ptr< DtRtiAssistantLrcClient assistantClient = std::shared_ptr< DtRtiAssistantLrcClient >() 
)
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.

static DtConnectionMgr* DtSmConnectionMgr::createQMgr ( DtRIDParameters params,
DtU32  numBuckets,
DtU32  payloadSize,
bool  queueReliable,
bool  forceMgrSubscribe,
bool  isFederate = false,
std::shared_ptr< DtRtiAssistantLrcClient assistantClient = std::shared_ptr< DtRtiAssistantLrcClient >(),
DtRtiShmQNetMgr smNetConnMgr = 0 
)
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).

virtual bool DtSmConnectionMgr::createSharedMemConn ( )
protectedvirtual

Create connection (attach) to subscribable shared memory queue; Returns true if successful.

virtual void DtSmConnectionMgr::disconnectFederation ( )
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.

virtual void DtSmConnectionMgr::dropMulticastGroup ( const MAKRti::DtInetAddr &  addr,
const MAKRti::DtInetAddr &  netInterface = MAKRti::DtInetAddr::inaddrAny() 
)
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.

virtual bool DtSmConnectionMgr::flush ( )
virtual

Send buffered messages.

Returns indication of whether the flush is complete or incomplete.

Reimplemented from DtConnectionMgr.

virtual void DtSmConnectionMgr::forceDropMulticastGroup ( const MAKRti::DtInetAddr &  addr,
const MAKRti::DtInetAddr &  netInterface = MAKRti::DtInetAddr::inaddrAny() 
)
virtual

Override listen count and force drop multicast address.

Listen count goes to zero.

Reimplemented from DtConnectionMgr.

virtual MAKRti::DtInetAddr DtSmConnectionMgr::getLastDestAddr ( ) const
virtual
virtual MAKRti::DtTransportType DtSmConnectionMgr::getLastTransportType ( ) const
virtual
virtual DtRtiMsg* DtSmConnectionMgr::getMessage ( )
virtual

Get a message if one exists Message must be destroyed by caller.

Reimplemented from DtConnectionMgr.

virtual DtRtiMsg* DtSmConnectionMgr::getMessageWithNetInfo ( MAKRti::DtInetAddr *  addr,
MAKRti::DtTransportType *  trans,
DtU32 *  priority = NULL 
)
virtual

These methods return the network information (destination address, transport method, and priority - if any) associated with a message in shared memory.

virtual int DtSmConnectionMgr::initConnections ( )
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.

virtual void DtSmConnectionMgr::initQMgr ( DtU32  numBuckets,
DtU32  payloadSize,
bool  reliable,
bool  forceMgrSubscribe 
)
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.

virtual void DtSmConnectionMgr::listenToMulticastGroup ( const MAKRti::DtInetAddr &  addr,
const MAKRti::DtInetAddr &  netInterface = MAKRti::DtInetAddr::inaddrAny() 
)
virtual

Add/Drop multicast groups from the best effort connection.

Reimplemented from DtConnectionMgr.

virtual bool DtSmConnectionMgr::processConnection ( DtRtiConnection conn,
MAKRti::DtTransportType  trans 
)
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.

virtual bool DtSmConnectionMgr::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.

virtual int DtSmConnectionMgr::readFileDescriptor ( DtRtiApiTransportationType  transport)
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 bool DtSmConnectionMgr::repairFederationConnection ( )
virtual

Attempt to re-establish a broken connection to the federation Returns true if successful.

Reimplemented from DtConnectionMgr.

virtual int DtSmConnectionMgr::send ( const DtRtiMsg msg,
MAKRti::DtTransportType  transport,
const MAKRti::DtInetAddr &  addr = MAKRti::DtInetAddr::inaddrAny() 
)
virtual

Sending.

Send a message Returns the size of the data sent.

Reimplemented from DtConnectionMgr.

virtual void DtSmConnectionMgr::setMsgFactory ( DtRtiMsgFactory fact)
virtual

Get/Set the message factory.

Reimplemented from DtConnectionMgr.

virtual void DtSmConnectionMgr::setNetConnMgr ( DtRtiShmQNetMgr smNetConnMgr)
virtual

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 DtSmConnectionMgr::setupSelectParams ( DtSelectParam *  params)
virtual

adds Read File descriptors to a DtSelectParams

Reimplemented from DtConnectionMgr.

virtual DtSmRtiConnection* DtSmConnectionMgr::sharedMemConn ( ) const
virtual

Returns the connection created by createSharedMemConn().

virtual bool DtSmConnectionMgr::sm_shutdown ( bool  ruthless = false)
virtual

Attempts to shutdown shared memory queue.

virtual void DtSmConnectionMgr::startSharedMemMgr ( )
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.

virtual int DtSmConnectionMgr::subscriberCount ( ) const
virtual

Return a count of the number of subscribers currently attached to the shared memory queue.

virtual bool DtSmConnectionMgr::wait ( MAKRti::DtTime  period = 0.0,
bool  unlockWhileWaiting = false 
)
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.

Member Data Documentation

bool DtSmConnectionMgr::myForceSubscribe
protected

indicates shared mem queue in reliable mode

bool DtSmConnectionMgr::myIsQueueManager
protected

These members are specific to the queue manager's connection manager.

MAKRti::DtInetAddr DtSmConnectionMgr::myLastDestAddr
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.

MAKRti::DtTransportType DtSmConnectionMgr::myLastTransportType
protected
DtU32 DtSmConnectionMgr::myNumBuckets
protected

indicates this is the queue manager

DtU32 DtSmConnectionMgr::myPayloadSize
protected

number of message slots in shared memory queue

bool DtSmConnectionMgr::myQueueReliable
protected

number of bytes available in each message slot

DtU32 DtSmConnectionMgr::myReadMask
protected

should only be used by queue manager

DtSmRtiConnection* DtSmConnectionMgr::mySharedMemConn
protected
MAKRti::DtString DtSmConnectionMgr::mySharedMemName
protected
DtRtiShmQNetMgr* DtSmConnectionMgr::mySharedMemNetMgr
protected

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

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)