the Asynchronous Connection Mgr adds asynchronous I/O to the connectionMgr class.
More...
Public Member Functions |
| virtual | ~DtAsyncConnectionMgr () |
| virtual int | init (DtRIDParameters *params) |
| | Initialize the RTI's exercise connections Users who wish to override the MAK RTI's network connections should override this function After the network connections are set it up creates a thread to monitor the sockets.
|
| virtual void | setFederateMgr (DtFederateMgr *fedMgrPtr) |
| | Set the federate manager.
|
| virtual void | shutdown () |
| | Request shutdown of communication activities.
|
| virtual bool | isAsynchronous () |
| | return if in asynchronous mode
|
| virtual void | disconnectFederation () |
| | The LRC disassociates its connections from the federation.
|
| virtual void | connectFederation (DtLogicalTimeFactory *logicalTimeFactoryPtr, MAKRti::DtString fedExName, DtFederateHandle fedHandle, int fedExHandle) |
| | The LRC associates its federation information with its network connections.
|
| virtual void | queueMsg (DtRtiMsg *msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| | method uses a mutex to lock the send queue while adding a a packet to the queue
|
| virtual int | send (const DtRtiMsg &msg, MAKRti::DtTransportType transport, const MAKRti::DtInetAddr &addr=MAKRti::DtInetAddr::inaddrAny()) |
| | Send a message.
|
| 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 Retraction record of timestamped messages must made here.
|
| virtual bool | tick () |
| | Process the connections for synchronous IO or callbacks.
|
| virtual bool | processConnections () |
| | Check all the connections and process any incoming messages Return boolean: message was received? (i.e.
|
| virtual DtRtiMsg * | getMessage () |
| | Get a message if one exists Message must be destroyed by caller.
|
| virtual DtNetReadStatus | handleMsg (DtRtiMsg &msg) |
| | Handle this message by either processing it or queuing it if save pending.
|
| virtual bool | flush () |
| | Does nothing in Async.
|
| virtual void | receiveThread () |
| | worker thread (called by run)
|
| virtual void | sendThread () |
| virtual bool | wait (MAKRti::DtTime periodInSeconds, 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 | 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 int | waitEvent () |
| | return the waiting handle
|
| virtual void | signalReceiveEvent () |
| | Signal the receive event Used by IO thread to signal federate thread.
|
| virtual void | clearReceiveEvent () |
| | Clear receive event Used by federate thread to clear signal.
|
| virtual void | signalSendEvent () |
| | Signal the send event Used by federate thread to signal IO thread.
|
| virtual void | clearSendEvent () |
| | Clear send event Used by IO thread to clear signal.
|
| virtual void | yield () |
| | Yield processing to allow more data to arrive.
|
| virtual bool | processConnectionsInCallback () |
| | Process the connections while in a callback to get a message (e.g., processing MOM resign) Return OK status of connections.
|
| virtual void | exitServiceCall () |
| | Called by RTI Ambassador services to release mutually exclusive access to RTI managers.
|
| virtual | ~DtConnectionMgr () |
| | Destructor.
|
| 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 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 | 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 | processConnection (DtRtiConnection *conn, MAKRti::DtTransportType trans) |
| | Read from the given connection and process the message (if received) Return boolean: message was received? (i.e.
|
| virtual void | updateBufferSizes () |
| | Update Buffer sizes from Rid params object.
|
| 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 | setupSelectParams (DtSelectParam *params) |
| | adds Read File descriptors to a DtSelectParams Return boolean: file descriptor was added? In case no descriptors have been added, should sleep instead of select as there will be no input.
|
| 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 void | setMsgFactory (DtRtiMsgFactory *fact) |
| | Get/Set the message factory.
|
| virtual DtRtiMsgFactory * | msgFactory () const |
| virtual void | forceDropMulticastGroup (const MAKRti::DtInetAddr &addr, const MAKRti::DtInetAddr &netInterface=MAKRti::DtInetAddr::inaddrAny()) |
| | Override listen count and force drop multicast address.
|
| virtual bool | repairFederationConnection () |
| | Attempt to re-establish a broken connection to the federation Returns true if successful.
|
| 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 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.
|
| bool | isPendingMsgQueueEmpty () |
| | 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 void | listenToMulticastGroup (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 | 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 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 bool | inServiceCall () |
| | Called by RTI Ambassador services query if mutex was set using enterServiceCall()
|
Protected Member Functions |
| | DtAsyncConnectionMgr (DtRIDParameters *params, bool isFederate=false, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient=DtBoost::shared_ptr< DtRtiAssistantLrcClient >()) |
| virtual bool | doReceiveProcessing (unsigned long timeout) |
| | Do the receive processing of the connections.
|
| virtual void | doDisconnectFederation () |
| | Perform actual disconnect.
|
| virtual bool | doWait (MAKRti::DtTime period) |
| | Perform actual wait, called by wait function.
|
| virtual void | processCallbackMsg (const DtFedAmbCallbackMsg &callbackMsg) |
| | Message callback.
|
| virtual bool | sendPackets () |
| | Send buffered packets.
|
| virtual DtNetReadStatus | receivePacket (DtRtiConnection *conn, MAKRti::DtTransportType transportType, unsigned int &receivedPacketCount) |
| | Process a packet from the given connection.
|
| virtual bool | receivePackets () |
| | Process connections and either place packets in receive queue or process messages directly if asynchronous callbacks are enabled.
|
| virtual DtNetReadStatus | processMsgQueueCallbacks (DtRtiMsg &msg, unsigned int &receivedPacketCount) |
| | Process message but queue any resulting federate ambassador callbacks.
|
| virtual void | processPendingMsgQueueCallbacks () |
| | Process a pending message but queue any resulting federate ambassador callbacks.
|
| virtual void | processPendingMsgMakeCallbacks () |
| | Process a pending message and make any resulting federate ambassador callbacks.
|
| virtual void | setMessageTracking (DtRtiMsg &msg) |
| | Set the appropriate tracking values in the message.
|
| virtual void | destroyPackets () |
| | Destroy any packets in the send and receive buffers and queues.
|
| virtual void | destroyRelConn () |
| | Destroy reliable connection.
|
| virtual void | destroyAncillaryRelConn (DtRtiConnection *conn) |
| | Destroy the given ancillary reliable connection.
|
| virtual void | destroyAncillaryRelConns () |
| | Destroy ancillary reliable connections.
|
| virtual void | startAsynchronousReceiveProcessing () |
| | Start asynchronous processing.
|
| virtual void | startAsynchronousSendProcessing () |
| virtual void | stopAsynchronousReceiveProcessing () |
| | Stop asynchronous processing.
|
| virtual void | stopAsynchronousSendProcessing () |
| DtQueuePacket * | getPacket () |
| | Get a packet off of receive buffer Receive buffer is refreshed if empty.
|
| 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 bool | queueReceivePacket (DtRtiMsg *rtiMessage, MAKRti::DtTransportType transportType, bool &overflowWarning) |
| | Put message on receive queue.
|
| virtual void | testIoIndicator (const char *label, unsigned int queueLevel, unsigned int &lowWaterLine, unsigned int &highWaterLine, bool &overflowWarning) |
| | Test if the number of messages in an IO queue has exceeded the diagnostic indicator level.
|
| | DtConnectionMgr (DtRIDParameters *params, bool isFederate=false, DtBoost::shared_ptr< DtRtiAssistantLrcClient > assistantClient=DtBoost::shared_ptr< DtRtiAssistantLrcClient >()) |
| | Constructor is performed through create.
|
| virtual int | initConnections () |
| | Initialize the RTI's exercise connections Users who wish to override the MAK RTI's network connections should override this function.
|
| virtual void | destroyBestEffortConn () |
| | Destroy best effort connection.
|
| virtual bool | createRelConn () |
| | Create reliable connection; Returns true if successful.
|
| virtual unsigned int | createAncillaryRelConns () |
| | Create ancillary reliable connections; Returns count of successful 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.
|