![]() |
MAK RTIspy API Documentation for HLA Evolved
|
DtTestManager runs network connectivity tests between local RTI components. More...
Collaboration diagram for DtTestManager:Classes | |
| struct | DtTrialDetails |
Public Member Functions | |
| DtTestManager (bool initiallyEnabled) | |
| Constructor. | |
| DtTestManager (DtFederateMgr *fedMgr, bool initiallyEnabled) | |
| Constructor. | |
| virtual | ~DtTestManager () |
| Destructor. | |
| DtRIDParameters * | params () |
| Access to RID. | |
| DtRIDParameters * | params () const |
| Const access to RID. | |
| DtFederateMgr * | fedMgr () |
| Access to federate manager. | |
| DtFederateMgr * | fedMgr () const |
| Const access to federate manager. | |
| RTI::RTIambassador * | rtiAmb () |
| Access to the federate's RTI Ambassador. | |
| RTI::RTIambassador * | rtiAmb () const |
| Const access to the federate's RTI Ambassador. | |
| virtual DtConnectionMgr * | connectMgr () |
| Access to the connection manager. | |
| virtual DtConnectionMgr * | connectMgr () const |
| Const access to the connection manager. | |
| virtual MAKRti::DtTime | time () const |
| return the current time. | |
| virtual void | postJoinInit () |
| Perform initializations that will allow tests to be run (e.g., publish and subscribe to test interaction) | |
| virtual void | resign () |
| Perform clean up from test instrumentation. | |
| virtual void | tick (unsigned long tickCount) |
| Process test activities. | |
| virtual float | averageTickPeriod () const |
| Average period between ticks. | |
| virtual void | enableNetworkTesting () |
| Enable network testing. | |
| virtual void | disableNetworkTesting () |
| Disable network testing. | |
| virtual bool | networkTestingEnabled () const |
| Is network testing enabled? | |
| void | processResign (const DtResignMsg &msg) |
| Process resign msg to maintain list of known federates. | |
| virtual bool | receiveInteraction (DtInteractionClassHandle classHandle, const DtPhvps ¶ms) |
| called by testMgr's installed fedAmbWrapper. | |
| virtual bool | testMgrCurrentlySending () const |
| returns whether the test Manager is in a sending state. | |
| virtual bool | queueMsgForSend (DtRtiMsg &msg) const |
| Add testID time stamp to message if necessary. | |
| virtual void | setTestMgrCurrentlySending (bool isSending, unsigned int testID=0) |
| Mark the test mgr as sending / not sending Also sets / clears the last sent testID. | |
| virtual bool | addSendTimeStampMetaDataIfNecessary (DtRtiMsg &msg) |
| If necessary add testing metadata to the message and to the testMgr, return whether timestamp was added. | |
| virtual bool | addReceiveTimeStampIfNecessary (DtRtiMsg &msg) |
| If necessary record receive Timestamp. | |
| virtual bool | addAsyncQueueMsgOnRecieve (DtRtiMsg &msg) |
| When the message is queued on Receive. | |
| virtual bool | isTestInteractionClassHandle (DtInteractionClassHandle classHandle) |
| Return boolean: Is the given interaction handle a test interaction? | |
| virtual void | sendStatusMessages () const |
| Update the status.... | |
Protected Types | |
| enum | DtInitiatorByType_e { DtInitiatedByExec, DtInitiatedByAssistant } |
| typedef enum DtTestManager::DtInitiatorByType_e | DtInitiatorByType |
| typedef std::multimap < DtMetadataType, MAKRti::DtTime > | DtTimeStampMap |
| typedef std::map< unsigned int, DtTimeStampMap > | DtTestToTimeStampMap |
Protected Member Functions | |
| virtual void | processSub (const DtSubInterMsg &msg) |
| Process subscribe msg to maintain a list of known federates. | |
| virtual void | processUnsub (const DtUnsubInterMsg &msg) |
| Process unsubscribe msg to maintain a list of known federates. | |
| virtual void | processChangeLatencyTestStatus (const DtAssistantChangeLatencyTestModeMsg &testMsg) |
| Processes latency test status change messages. | |
| virtual void | processChangeLatencyTestStatus (const DtChangeLatencyTestModeMsg &testMsg) |
| virtual void | changeLatencyTestRequestByType (bool initiateTest, bool continuousCommand, bool stopContinuous, bool observing, DtInitiatorByType type, MAKRti::DtTime period, unsigned int numInteractions, unsigned int payloadSize) |
| Change status according to parameters / initiator. | |
| virtual void | initiateLatencyTest () |
| if there are queued requests and the most recent trial has finished run a test. | |
| virtual void | processLatencyTest () |
| Process an active latency test. | |
| virtual bool | getTestIDFromMetaData (DtRtiMsg &msg, unsigned int &testID) const |
| virtual void | addKnownFederate (DtFederateHandle subscribedFed) |
| Add the federate to the list of known subscribed federates so we know who to send test interactions to. | |
| virtual void | removeKnownFederate (DtFederateHandle unsubscribedFed) |
| Remove the federate from the list of known federates so we don't sent to it anymore. | |
| virtual bool | atLeastOneKnownFederate () const |
| Do we know of at least one federate we can initiate a test with. | |
| virtual bool | isKnownFederateHandle (DtFederateHandle handle) const |
| Is the input federate Handle known to us? | |
| virtual void | addSendInteractionTimeStamp (unsigned int testID) |
| called by either test initiator or test recipient. | |
| virtual void | addNetSendTimeStamp (unsigned int testID, DtRtiMsg &msg) |
| called by either test initiator or test recipient. | |
| virtual void | addNetReceiveTimeStamp (unsigned int testID, const DtRtiMsg &msg) |
| called by either test initiator or test recipient. | |
| virtual void | addReceiveInteractionTimeStamp (unsigned int testID, MAKRti::DtTime timeToUse) |
| called by either test initiator or test recipient. | |
| virtual void | removeKnowledgeOfTestId (unsigned int testID) |
| Remove knowledge of this testID. | |
| virtual void | addAsyncQueueMsgTimeStamp (unsigned int &testID, const DtRtiMsg &msg) |
| called by either test initiator or test recipient. | |
| MAKRti::DtTransportType | transportTypeForTestID (unsigned int testID) |
| look up the transport type for this testID. | |
| virtual unsigned int | lastSentTestID () const |
| called by test initiator only. | |
| virtual void | setLastSentTestID (unsigned int testID) |
| Set the Test ID of the last sent interaction. | |
| virtual bool | sendSingleLatencyInteraction (unsigned int testID, DtFederateHandle recipient, MAKRti::DtTransportType transport, unsigned int payload) |
| Send a single latency interaction. | |
| virtual bool | addMetadataIfNecessary (DtRtiMsg &msg, unsigned int &testID) const |
| Before netsend, set the msgs's metadata from the testID. | |
| virtual bool | shouldAddMetadataToMessage (DtRtiMsg &msg) const |
| determine if adding metadata is necessary based on msg type and current state. | |
| virtual bool | isInitiatorOfTestID (unsigned int testID) const |
| Was this testID generated by me? | |
| virtual void | calculateTickTime (unsigned long tickCount) |
| Calculate Average TickTime. | |
| virtual bool | sendInteraction (unsigned int testID, DtInteractionClassHandle handle, const DtPhvps ¶ms, unsigned int payloadSize) |
| called by testManager when either a new test interaction is being sent or when a test Interaction is being sent as a response to a received test Interaction. | |
Static Protected Member Functions | |
| static void | processSub (const DtSubInterMsg &msg, void *usr) |
| Callback to install for processing subscription messages. | |
| static void | processUnsub (const DtUnsubInterMsg &msg, void *usr) |
| Callback to install for processing unsubscribe messages. | |
| static void | queueLatencyTestRequest (const DtAssistantChangeLatencyTestModeMsg &testMsg, void *usr) |
| Callback to install for processing initiate latency test messages. | |
| static void | processChangeLatencyTestStatus (const DtAssistantChangeLatencyTestModeMsg &testMsg, void *usr) |
| Processes latency test status change messages. | |
| static void | processChangeLatencyTestStatus (const DtChangeLatencyTestModeMsg &testMsg, void *usr) |
Protected Attributes | |
| DtFederateMgr * | myFedMgr |
| The federate manager. | |
| DtInitiatorLatencyTest * | myInitiatorTest |
| Handles initiating tests with other federates. | |
| DtRecipientLatencyTest * | myRecipientTest |
| Handles receiving tests from other federates. | |
| DtLatencyTestInteraction * | myLatencyInteraction |
| The latency test interaction. | |
| MAKRti::DtClock | myClock |
| Keep track of time. | |
| bool | myRunningContinuous |
| Are we currently running a continuous test? | |
| DtTrialDetails | myContinuousDetails |
| If so what are the details of the continuous test? | |
| std::set< DtInitiatorByType > | myObservers |
| list of observers. | |
| DtTestToTimeStampMap | myCompletedAveragedInitiatedTests |
| Storage of my completed initiated tests. | |
| bool | mySendingInteraction |
| Set when testMgr sends a message, is cleared by accessor when connectMgr checks whether the last message was a testMgr msg. | |
| unsigned int | myTestIDOfLastSentInteraction |
| The testID of the currently running initiated test. | |
| unsigned int | myCurrentTrialID |
| What is the current trial number. | |
| unsigned int | myInitiatedTrialID |
| What trials am I waiting to complete? | |
| DtFederateHandle | myInitiatedFedHandle |
| DtTestMgrFedAmbWrapper * | myTestFedAmbWrapper |
| Catches calls to ReceiveInteraction to prevent testInteractions from being delivered to the user. | |
| std::list< DtTrialDetails > | myTrialsToInitiate |
| List of trials to initiate. | |
| std::set< DtFederateHandle > | myListOfKnownFederates |
| Our list of known federates (not including self). | |
| float | myInitialTickTime |
| the earliest tick time we're using for avgTickPeriod. | |
| unsigned long | myInitialTickCount |
| the earliest tick count we're using for avgTickPeriod. | |
| float | mySecondTickTime |
| the second tick time we're using for avgTickPeriod. | |
| unsigned long | mySecondTickCount |
| the second tick count we're using for avgTickPeriod. | |
| float | myAverageTickPeriod |
| The average period between ticks. | |
| bool | myEnabled |
| Is network testing enabled? | |
| unsigned | myNumInitiatedTests |
| The number of tests this federate has initiated. | |
| unsigned | myNumTestReportsGenerated |
| The number of test reports this federate has generated. | |
| DtMutex | myInitiatorMutex |
| lock for the initiator test | |
| DtMutex | myRecipientMutex |
Private Member Functions | |
| DtTestManager (DtTestManager const &orig) | |
| Copy Constructor - not allowed. | |
| DtTestManager & | operator= (DtTestManager const &orig) |
| Assignment operator - not allowed. | |
DtTestManager runs network connectivity tests between local RTI components.
typedef enum DtTestManager::DtInitiatorByType_e DtTestManager::DtInitiatorByType [protected] |
typedef std::map<unsigned int, DtTimeStampMap > DtTestManager::DtTestToTimeStampMap [protected] |
typedef std::multimap<DtMetadataType, MAKRti::DtTime> DtTestManager::DtTimeStampMap [protected] |
enum DtTestManager::DtInitiatorByType_e [protected] |
| DtTestManager::DtTestManager | ( | bool | initiallyEnabled | ) |
Constructor.
References myInitialTickTime, mySecondTickTime, and time().
| DtTestManager::DtTestManager | ( | DtFederateMgr * | fedMgr, |
| bool | initiallyEnabled | ||
| ) |
Constructor.
References disableNetworkTesting(), enableNetworkTesting(), myEnabled, myInitialTickTime, mySecondTickTime, and time().
| DtTestManager::~DtTestManager | ( | ) | [virtual] |
Destructor.
References connectMgr(), fedMgr(), myInitiatorTest, myLatencyInteraction, myRecipientTest, processChangeLatencyTestStatus(), processSub(), processUnsub(), DtSubInterMsg::removeCallback(), DtUnsubInterMsg::removeCallback(), DtChangeLatencyTestModeMsg::removeCallback(), and DtAssistantChangeLatencyTestModeMsg::removeCallback().
| DtTestManager::DtTestManager | ( | DtTestManager const & | orig | ) | [private] |
Copy Constructor - not allowed.
| bool DtTestManager::addAsyncQueueMsgOnRecieve | ( | DtRtiMsg & | msg | ) | [virtual] |
When the message is queued on Receive.
Synchronous mode: does not occur. Asynchronous mode: does not occur. AsyncProcessMessage mode: after the message's callbacks are converted into a fedAmbQueue Message and its processing is performed
References addAsyncQueueMsgTimeStamp(), and getTestIDFromMetaData().
Referenced by DtAsyncConnectionMgr::processMsgQueueCallbacks(), and DtAsyncConnectionMgr::receivePackets().
| void DtTestManager::addAsyncQueueMsgTimeStamp | ( | unsigned int & | testID, |
| const DtRtiMsg & | msg | ||
| ) | [protected, virtual] |
called by either test initiator or test recipient.
If not test is currently being performed this is a nop Test manager will record the current time and associate it with the appropriate testID extracted from the message's metadata. The testID is returned.
References DtRecipientLatencyTest::addAsyncQueueMsgTimeStamp(), DtInitiatorLatencyTest::addAsyncQueueMsgTimeStamp(), isInitiatorOfTestID(), myInitiatorMutex, myInitiatorTest, myRecipientMutex, and myRecipientTest.
Referenced by addAsyncQueueMsgOnRecieve().
| void DtTestManager::addKnownFederate | ( | DtFederateHandle | subscribedFed | ) | [protected, virtual] |
Add the federate to the list of known subscribed federates so we know who to send test interactions to.
References myListOfKnownFederates, and sendStatusMessages().
Referenced by processSub().
| bool DtTestManager::addMetadataIfNecessary | ( | DtRtiMsg & | msg, |
| unsigned int & | testID | ||
| ) | const [protected, virtual] |
Before netsend, set the msgs's metadata from the testID.
return whether it was necessary to add metadata.
References DtRtiMtdTestId::get(), lastSentTestID(), DtRtiMtdTestId::set(), and shouldAddMetadataToMessage().
Referenced by addSendTimeStampMetaDataIfNecessary(), and queueMsgForSend().
| void DtTestManager::addNetReceiveTimeStamp | ( | unsigned int | testID, |
| const DtRtiMsg & | msg | ||
| ) | [protected, virtual] |
called by either test initiator or test recipient.
If no test is currently being performed this is a nop. Test manager will record the current time and associate it with the appropriate testID extracted from the message's metadata. That testID is returned in the first argument.
References DtRecipientLatencyTest::addNetReceiveTimeStamp(), DtInitiatorLatencyTest::addNetReceiveTimeStamp(), isInitiatorOfTestID(), myInitiatorMutex, myInitiatorTest, myRecipientMutex, and myRecipientTest.
Referenced by addReceiveTimeStampIfNecessary().
| void DtTestManager::addNetSendTimeStamp | ( | unsigned int | testID, |
| DtRtiMsg & | msg | ||
| ) | [protected, virtual] |
called by either test initiator or test recipient.
If no test is currently being performed this is a nop. Test manager will remove all stored timestamps of testID Test manager will set the testMsg flag in the InteractionMsg. and insert them as metadata to the msg.
References DtRecipientLatencyTest::addNetSendTimeStamp(), DtInitiatorLatencyTest::addNetSendTimeStamp(), isInitiatorOfTestID(), myInitiatorMutex, myInitiatorTest, myRecipientMutex, and myRecipientTest.
Referenced by addSendTimeStampMetaDataIfNecessary().
| void DtTestManager::addReceiveInteractionTimeStamp | ( | unsigned int | testID, |
| MAKRti::DtTime | timeToUse | ||
| ) | [protected, virtual] |
called by either test initiator or test recipient.
If no test is currently being performed this is a nop. Test Manager will record the current time and associate it with the testID
References DtRecipientLatencyTest::addReceiveInteractionTimeStamp(), DtInitiatorLatencyTest::addReceiveInteractionTimeStamp(), isInitiatorOfTestID(), myInitiatorMutex, myInitiatorTest, myRecipientMutex, and myRecipientTest.
Referenced by receiveInteraction().
| bool DtTestManager::addReceiveTimeStampIfNecessary | ( | DtRtiMsg & | msg | ) | [virtual] |
If necessary record receive Timestamp.
References addNetReceiveTimeStamp(), and getTestIDFromMetaData().
Referenced by DtConnectionMgr::getMessage(), DtConnectionMgr::processConnection(), and DtAsyncConnectionMgr::receivePacket().
| void DtTestManager::addSendInteractionTimeStamp | ( | unsigned int | testID | ) | [protected, virtual] |
called by either test initiator or test recipient.
If no test is currently being performed this is a nop. Test manager will record the current time and associate it with the input test ID.
References DtRecipientLatencyTest::addSendInteractionTimeStamp(), DtInitiatorLatencyTest::addSendInteractionTimeStamp(), isInitiatorOfTestID(), myInitiatorMutex, myInitiatorTest, myRecipientMutex, and myRecipientTest.
Referenced by sendInteraction().
| bool DtTestManager::addSendTimeStampMetaDataIfNecessary | ( | DtRtiMsg & | msg | ) | [virtual] |
If necessary add testing metadata to the message and to the testMgr, return whether timestamp was added.
References addMetadataIfNecessary(), addNetSendTimeStamp(), and setTestMgrCurrentlySending().
Referenced by DtConnectionMgr::send(), and DtAsyncConnectionMgr::sendPackets().
| bool DtTestManager::atLeastOneKnownFederate | ( | ) | const [protected, virtual] |
Do we know of at least one federate we can initiate a test with.
References myListOfKnownFederates.
Referenced by initiateLatencyTest(), and sendStatusMessages().
| float DtTestManager::averageTickPeriod | ( | ) | const [virtual] |
Average period between ticks.
References myAverageTickPeriod.
Referenced by DtRecipientLatencyTest::addNetSendTimeStamp(), and DtInitiatorLatencyTest::averageReports().
| void DtTestManager::calculateTickTime | ( | unsigned long | tickCount | ) | [protected, virtual] |
Calculate Average TickTime.
References myAverageTickPeriod, myInitialTickCount, myInitialTickTime, mySecondTickCount, mySecondTickTime, and time().
Referenced by tick().
| void DtTestManager::changeLatencyTestRequestByType | ( | bool | initiateTest, |
| bool | continuousCommand, | ||
| bool | stopContinuous, | ||
| bool | observing, | ||
| DtInitiatorByType | type, | ||
| MAKRti::DtTime | period, | ||
| unsigned int | numInteractions, | ||
| unsigned int | payloadSize | ||
| ) | [protected, virtual] |
Change status according to parameters / initiator.
References DtTestManager::DtTrialDetails::continuous, DtTestManager::DtTrialDetails::federateHandle, DtTestManager::DtTrialDetails::initiatorType, myContinuousDetails, myCurrentTrialID, myEnabled, myListOfKnownFederates, myNumInitiatedTests, myObservers, myRunningContinuous, myTrialsToInitiate, DtTestManager::DtTrialDetails::numInteractions, DtTestManager::DtTrialDetails::payLoadSize, DtTestManager::DtTrialDetails::period, sendStatusMessages(), and DtTestManager::DtTrialDetails::trialID.
Referenced by processChangeLatencyTestStatus().
| DtConnectionMgr * DtTestManager::connectMgr | ( | ) | [virtual] |
Access to the connection manager.
References DtFederateMgr::connectMgr(), and fedMgr().
Referenced by DtInitiatorLatencyTest::currTestId(), isInitiatorOfTestID(), postJoinInit(), processResign(), processSub(), processUnsub(), resign(), DtInitiatorLatencyTest::takeCompletedTestReport(), and ~DtTestManager().
| DtConnectionMgr * DtTestManager::connectMgr | ( | ) | const [virtual] |
Const access to the connection manager.
References DtFederateMgr::connectMgr(), and fedMgr().
| void DtTestManager::disableNetworkTesting | ( | ) | [virtual] |
Disable network testing.
References myEnabled, myRunningContinuous, myTrialsToInitiate, and sendStatusMessages().
Referenced by DtTestManager(), and DtFederateMgr::processEnableDisableNetworkTesting().
| void DtTestManager::enableNetworkTesting | ( | ) | [virtual] |
Enable network testing.
References myEnabled, and sendStatusMessages().
Referenced by DtTestManager(), and DtFederateMgr::processEnableDisableNetworkTesting().
Access to federate manager.
References myFedMgr.
Referenced by DtRecipientLatencyTest::addNetSendTimeStamp(), connectMgr(), params(), postJoinInit(), receiveInteraction(), resign(), rtiAmb(), sendInteraction(), sendSingleLatencyInteraction(), DtInitiatorLatencyTest::takeCompletedTestReport(), and ~DtTestManager().
| DtFederateMgr * DtTestManager::fedMgr | ( | ) | const |
Const access to federate manager.
References myFedMgr.
| bool DtTestManager::getTestIDFromMetaData | ( | DtRtiMsg & | msg, |
| unsigned int & | testID | ||
| ) | const [protected, virtual] |
References DtRtiMtdTestId::get(), DtRtiMsg::isInteractionMsgType(), DtNetMsgHeader::metadataInMessage(), and DtRtiMsg::netHeader().
Referenced by addAsyncQueueMsgOnRecieve(), and addReceiveTimeStampIfNecessary().
| void DtTestManager::initiateLatencyTest | ( | ) | [protected, virtual] |
if there are queued requests and the most recent trial has finished run a test.
References atLeastOneKnownFederate(), DtInitiatorLatencyTest::canInitiateTest(), DtTestManager::DtTrialDetails::federateHandle, DtInitiatorLatencyTest::initiateLatencyTest(), myInitiatedFedHandle, myInitiatedTrialID, myInitiatorMutex, myInitiatorTest, myTrialsToInitiate, DtTestManager::DtTrialDetails::numInteractions, DtTestManager::DtTrialDetails::payLoadSize, DtTestManager::DtTrialDetails::period, and DtTestManager::DtTrialDetails::trialID.
Referenced by tick().
| bool DtTestManager::isInitiatorOfTestID | ( | unsigned int | testID | ) | const [protected, virtual] |
Was this testID generated by me?
References connectMgr(), DtRIDParameters::maxObjectsPerFederate(), and params().
Referenced by addAsyncQueueMsgTimeStamp(), addNetReceiveTimeStamp(), addNetSendTimeStamp(), addReceiveInteractionTimeStamp(), addSendInteractionTimeStamp(), receiveInteraction(), and removeKnowledgeOfTestId().
| bool DtTestManager::isKnownFederateHandle | ( | DtFederateHandle | handle | ) | const [protected, virtual] |
Is the input federate Handle known to us?
References myListOfKnownFederates.
| bool DtTestManager::isTestInteractionClassHandle | ( | DtInteractionClassHandle | classHandle | ) | [virtual] |
Return boolean: Is the given interaction handle a test interaction?
References DtTestInteraction::classHandle(), and myLatencyInteraction.
Referenced by processSub(), processUnsub(), and receiveInteraction().
| unsigned int DtTestManager::lastSentTestID | ( | ) | const [protected, virtual] |
called by test initiator only.
TestManager does not support more than one concurrent test to be initiated. Returns whether test can be successfully initiated. returns the testID of the last interaction sendInteraction was called for.
References myTestIDOfLastSentInteraction.
Referenced by addMetadataIfNecessary().
| bool DtTestManager::networkTestingEnabled | ( | ) | const [virtual] |
| DtTestManager& DtTestManager::operator= | ( | DtTestManager const & | orig | ) | [private] |
Assignment operator - not allowed.
Access to RID.
References fedMgr(), and DtFederateMgr::params().
Referenced by DtRecipientLatencyTest::addNetSendTimeStamp(), DtInitiatorLatencyTest::consumeTestId(), DtInitiatorLatencyTest::currTestId(), DtInitiatorLatencyTest::getCompletedReportByTestID(), DtInitiatorLatencyTest::initiateLatencyTest(), isInitiatorOfTestID(), and DtInitiatorLatencyTest::takeCompletedTestReport().
| DtRIDParameters * DtTestManager::params | ( | ) | const |
Const access to RID.
References fedMgr(), and DtFederateMgr::params().
| void DtTestManager::postJoinInit | ( | ) | [virtual] |
Perform initializations that will allow tests to be run (e.g., publish and subscribe to test interaction)
References DtSubInterMsg::addCallback(), DtUnsubInterMsg::addCallback(), DtChangeLatencyTestModeMsg::addCallback(), DtAssistantChangeLatencyTestModeMsg::addCallback(), DtConnectionMgr::addFedAmbWrapper(), addTestToFom(), DtTestInteraction::classHandle(), connectMgr(), fedMgr(), DtFederateMgr::interMgr(), myFedMgr, myInitiatorTest, myLatencyInteraction, myRecipientTest, myTestFedAmbWrapper, processChangeLatencyTestStatus(), processSub(), processUnsub(), DtInteractionMgr::publish(), DtInteractionMgr::subscribe(), and theTestMgrFedAmbWrapperName.
| void DtTestManager::processChangeLatencyTestStatus | ( | const DtAssistantChangeLatencyTestModeMsg & | testMsg | ) | [protected, virtual] |
Processes latency test status change messages.
This includes informing the LRC that there is an observer of the tests, that there is no longer an observer, initiating a test, stopping a test, etc.
References changeLatencyTestRequestByType(), DtAssistantChangeLatencyTestModeMsg::continuousUpdate(), DtInitiatedByAssistant, DtAssistantChangeLatencyTestModeMsg::interactionPeriod(), DtAssistantChangeLatencyTestModeMsg::numInteractions(), DtAssistantChangeLatencyTestModeMsg::observingResults(), DtAssistantChangeLatencyTestModeMsg::payloadBytes(), DtAssistantChangeLatencyTestModeMsg::runTest(), and DtAssistantChangeLatencyTestModeMsg::shouldHaltContinuous().
Referenced by postJoinInit(), processChangeLatencyTestStatus(), and ~DtTestManager().
| void DtTestManager::processChangeLatencyTestStatus | ( | const DtChangeLatencyTestModeMsg & | testMsg | ) | [protected, virtual] |
References changeLatencyTestRequestByType(), DtChangeLatencyTestModeMsg::continuousUpdate(), DtInitiatedByExec, DtFederateMgr::federateHandle(), DtChangeLatencyTestModeMsg::initiator(), DtChangeLatencyTestModeMsg::interactionPeriod(), myFedMgr, DtChangeLatencyTestModeMsg::numInteractions(), DtChangeLatencyTestModeMsg::observingResults(), DtChangeLatencyTestModeMsg::payloadBytes(), DtChangeLatencyTestModeMsg::runTest(), and DtChangeLatencyTestModeMsg::shouldHaltContinuous().
| void DtTestManager::processChangeLatencyTestStatus | ( | const DtAssistantChangeLatencyTestModeMsg & | testMsg, |
| void * | usr | ||
| ) | [static, protected] |
Processes latency test status change messages.
This includes informing the LRC that there is an observer of the tests, that there is no longer an observer, initiating a test, stopping a test, etc.
References processChangeLatencyTestStatus().
| void DtTestManager::processChangeLatencyTestStatus | ( | const DtChangeLatencyTestModeMsg & | testMsg, |
| void * | usr | ||
| ) | [static, protected] |
References processChangeLatencyTestStatus().
| void DtTestManager::processLatencyTest | ( | ) | [protected, virtual] |
Process an active latency test.
References DtFederateMgr::assistantClient(), DtTestManager::DtTrialDetails::continuous, DtInitiatedByAssistant, DtInitiatedByExec, DtTestManager::DtTrialDetails::federateHandle, myContinuousDetails, myCurrentTrialID, myFedMgr, myInitiatedFedHandle, myInitiatedTrialID, myInitiatorMutex, myInitiatorTest, myNumTestReportsGenerated, myObservers, myRunningContinuous, myTrialsToInitiate, networkTestingEnabled(), DtFederateMgr::reportLatencyTestResults(), DtRtiAssistantClient::sendLatencyTestMsg(), sendStatusMessages(), DtInitiatorLatencyTest::takeCompletedTestReport(), DtTestManager::DtTrialDetails::trialID, and DtInitiatorLatencyTest::trialIsFinished().
Referenced by tick().
| void DtTestManager::processResign | ( | const DtResignMsg & | msg | ) |
Process resign msg to maintain list of known federates.
References connectMgr(), DtRtiMsg::federateHandle(), DtConnectionMgr::fedHandle(), and removeKnownFederate().
Referenced by DtFederateMgr::processResign().
| void DtTestManager::processSub | ( | const DtSubInterMsg & | msg | ) | [protected, virtual] |
Process subscribe msg to maintain a list of known federates.
References addKnownFederate(), connectMgr(), DtTestManager::DtTrialDetails::federateHandle, DtRtiMsg::federateHandle(), DtConnectionMgr::fedHandle(), DtSubInterMsg::handle(), isTestInteractionClassHandle(), myContinuousDetails, myCurrentTrialID, myRunningContinuous, myTrialsToInitiate, and DtTestManager::DtTrialDetails::trialID.
Referenced by postJoinInit(), processSub(), resign(), and ~DtTestManager().
| void DtTestManager::processSub | ( | const DtSubInterMsg & | msg, |
| void * | usr | ||
| ) | [static, protected] |
Callback to install for processing subscription messages.
References processSub().
| void DtTestManager::processUnsub | ( | const DtUnsubInterMsg & | msg | ) | [protected, virtual] |
Process unsubscribe msg to maintain a list of known federates.
References connectMgr(), DtRtiMsg::federateHandle(), DtConnectionMgr::fedHandle(), DtUnsubInterMsg::handle(), isTestInteractionClassHandle(), and removeKnownFederate().
Referenced by postJoinInit(), processUnsub(), resign(), and ~DtTestManager().
| void DtTestManager::processUnsub | ( | const DtUnsubInterMsg & | msg, |
| void * | usr | ||
| ) | [static, protected] |
Callback to install for processing unsubscribe messages.
References processUnsub().
| static void DtTestManager::queueLatencyTestRequest | ( | const DtAssistantChangeLatencyTestModeMsg & | testMsg, |
| void * | usr | ||
| ) | [static, protected] |
Callback to install for processing initiate latency test messages.
| bool DtTestManager::queueMsgForSend | ( | DtRtiMsg & | msg | ) | const [virtual] |
Add testID time stamp to message if necessary.
References addMetadataIfNecessary().
Referenced by DtAsyncConnectionMgr::queueMsg().
| bool DtTestManager::receiveInteraction | ( | DtInteractionClassHandle | classHandle, |
| const DtPhvps & | params | ||
| ) | [virtual] |
called by testMgr's installed fedAmbWrapper.
Returns true if Interaction was a networkTest Interaction and has been processed and should be dropped. Else false.
References addReceiveInteractionTimeStamp(), DtFederateMgr::federateHandle(), fedMgr(), isInitiatorOfTestID(), isTestInteractionClassHandle(), myFedMgr, myInitiatorMutex, myInitiatorTest, myLatencyInteraction, myRecipientMutex, myRecipientTest, DtLatencyTestInteraction::parameters(), DtTestInteraction::payloadSize(), removeKnowledgeOfTestId(), sendInteraction(), DtLatencyTestInteraction::setFromParameters(), DtTestInteraction::setTestId(), DtTestInteraction::setTransportType(), DtTestInteraction::targetFederate(), DtTestInteraction::testId(), DtInitiatorLatencyTest::testIsFinished(), time(), and DtLatencyTest::transportTypeForTestID().
| void DtTestManager::removeKnowledgeOfTestId | ( | unsigned int | testID | ) | [protected, virtual] |
Remove knowledge of this testID.
Typically called when we're stored time stamps for a received message and then later determined it was not addressed to us.
References isInitiatorOfTestID(), myInitiatorMutex, myInitiatorTest, myRecipientMutex, myRecipientTest, and DtLatencyTest::removeKnowledgeOfTestId().
Referenced by receiveInteraction().
| void DtTestManager::removeKnownFederate | ( | DtFederateHandle | unsubscribedFed | ) | [protected, virtual] |
Remove the federate from the list of known federates so we don't sent to it anymore.
References myListOfKnownFederates, myTrialsToInitiate, and sendStatusMessages().
Referenced by processResign(), and processUnsub().
| void DtTestManager::resign | ( | ) | [virtual] |
Perform clean up from test instrumentation.
References DtTestInteraction::classHandle(), connectMgr(), fedMgr(), DtFederateMgr::interMgr(), myLatencyInteraction, myTestFedAmbWrapper, processSub(), processUnsub(), DtSubInterMsg::removeCallback(), DtUnsubInterMsg::removeCallback(), DtConnectionMgr::removeFedAmbWrapper(), theTestMgrFedAmbWrapperName, DtInteractionMgr::unpublish(), and DtInteractionMgr::unsubscribe().
Access to the federate's RTI Ambassador.
References fedMgr(), and DtFederateMgr::rtiAmb().
| RTI::RTIambassador * DtTestManager::rtiAmb | ( | ) | const |
Const access to the federate's RTI Ambassador.
References fedMgr(), and DtFederateMgr::rtiAmb().
| bool DtTestManager::sendInteraction | ( | unsigned int | testID, |
| DtInteractionClassHandle | handle, | ||
| const DtPhvps & | params, | ||
| unsigned int | payloadSize | ||
| ) | [protected, virtual] |
called by testManager when either a new test interaction is being sent or when a test Interaction is being sent as a response to a received test Interaction.
Returns true if Interaction was a networkTest Interaction and has been processed and should be dropped. Else false.
References addSendInteractionTimeStamp(), DtTestInteraction::classHandle(), DtDefaultRegionSetHandle, fedMgr(), DtFederateMgr::interMgr(), myLatencyInteraction, DtInteractionMgr::send(), setTestMgrCurrentlySending(), and DtInteractionMgr::setTransport().
Referenced by receiveInteraction(), and sendSingleLatencyInteraction().
| bool DtTestManager::sendSingleLatencyInteraction | ( | unsigned int | testID, |
| DtFederateHandle | recipient, | ||
| MAKRti::DtTransportType | transport, | ||
| unsigned int | payload | ||
| ) | [protected, virtual] |
Send a single latency interaction.
References DtTestInteraction::classHandle(), fedMgr(), myLatencyInteraction, DtLatencyTestInteraction::parameters(), DtTestInteraction::payloadSize(), sendInteraction(), DtTestInteraction::setPayloadSize(), DtTestInteraction::setTargetFederate(), DtTestInteraction::setTestId(), and DtTestInteraction::setTransportType().
Referenced by tick().
| void DtTestManager::sendStatusMessages | ( | ) | const [virtual] |
Update the status....
References DtFederateMgr::assistantClient(), atLeastOneKnownFederate(), DtFederateMgr::federateHandle(), DtFederateMgr::fedExHandle(), myEnabled, myFedMgr, myNumInitiatedTests, myNumTestReportsGenerated, myRunningContinuous, myTrialsToInitiate, DtFederateMgr::reportLatencyTestStatus(), and DtRtiAssistantClient::sendLatencyTestStatusMsg().
Referenced by addKnownFederate(), changeLatencyTestRequestByType(), disableNetworkTesting(), enableNetworkTesting(), processLatencyTest(), and removeKnownFederate().
| void DtTestManager::setLastSentTestID | ( | unsigned int | testID | ) | [protected, virtual] |
Set the Test ID of the last sent interaction.
References myTestIDOfLastSentInteraction.
Referenced by setTestMgrCurrentlySending().
| void DtTestManager::setTestMgrCurrentlySending | ( | bool | isSending, |
| unsigned int | testID = 0 |
||
| ) | [virtual] |
Mark the test mgr as sending / not sending Also sets / clears the last sent testID.
References mySendingInteraction, and setLastSentTestID().
Referenced by addSendTimeStampMetaDataIfNecessary(), and sendInteraction().
| bool DtTestManager::shouldAddMetadataToMessage | ( | DtRtiMsg & | msg | ) | const [protected, virtual] |
determine if adding metadata is necessary based on msg type and current state.
References DtRtiMsg::isInteractionMsgType(), and testMgrCurrentlySending().
Referenced by addMetadataIfNecessary().
| bool DtTestManager::testMgrCurrentlySending | ( | ) | const [virtual] |
returns whether the test Manager is in a sending state.
References mySendingInteraction.
Referenced by shouldAddMetadataToMessage().
| void DtTestManager::tick | ( | unsigned long | tickCount | ) | [virtual] |
Process test activities.
References calculateTickTime(), DtInitiatorLatencyTest::getCurrentTestInfo(), initiateLatencyTest(), myInitiatedTrialID, myInitiatorMutex, myInitiatorTest, processLatencyTest(), sendSingleLatencyInteraction(), and DtInitiatorLatencyTest::tick().
Referenced by DtFederateMgr::tick().
| MAKRti::DtTime DtTestManager::time | ( | ) | const [virtual] |
return the current time.
References myClock.
Referenced by calculateTickTime(), DtTestManager(), DtInitiatorLatencyTest::initiateLatencyTest(), receiveInteraction(), DtInitiatorLatencyTest::tick(), and DtLatencyTest::time().
| MAKRti::DtTransportType DtTestManager::transportTypeForTestID | ( | unsigned int | testID | ) | [protected] |
look up the transport type for this testID.
float DtTestManager::myAverageTickPeriod [protected] |
The average period between ticks.
Referenced by averageTickPeriod(), and calculateTickTime().
MAKRti::DtClock DtTestManager::myClock [protected] |
Keep track of time.
Referenced by time().
Storage of my completed initiated tests.
DtTrialDetails DtTestManager::myContinuousDetails [protected] |
If so what are the details of the continuous test?
Referenced by changeLatencyTestRequestByType(), processLatencyTest(), and processSub().
unsigned int DtTestManager::myCurrentTrialID [protected] |
What is the current trial number.
Referenced by changeLatencyTestRequestByType(), processLatencyTest(), and processSub().
bool DtTestManager::myEnabled [protected] |
Is network testing enabled?
Referenced by changeLatencyTestRequestByType(), disableNetworkTesting(), DtTestManager(), enableNetworkTesting(), networkTestingEnabled(), and sendStatusMessages().
DtFederateMgr* DtTestManager::myFedMgr [protected] |
The federate manager.
Referenced by fedMgr(), postJoinInit(), processChangeLatencyTestStatus(), processLatencyTest(), receiveInteraction(), and sendStatusMessages().
unsigned long DtTestManager::myInitialTickCount [protected] |
the earliest tick count we're using for avgTickPeriod.
Referenced by calculateTickTime().
float DtTestManager::myInitialTickTime [protected] |
the earliest tick time we're using for avgTickPeriod.
Referenced by calculateTickTime(), and DtTestManager().
DtFederateHandle DtTestManager::myInitiatedFedHandle [protected] |
Referenced by initiateLatencyTest(), and processLatencyTest().
unsigned int DtTestManager::myInitiatedTrialID [protected] |
What trials am I waiting to complete?
Referenced by initiateLatencyTest(), processLatencyTest(), and tick().
DtMutex DtTestManager::myInitiatorMutex [protected] |
lock for the initiator test
Referenced by addAsyncQueueMsgTimeStamp(), addNetReceiveTimeStamp(), addNetSendTimeStamp(), addReceiveInteractionTimeStamp(), addSendInteractionTimeStamp(), initiateLatencyTest(), processLatencyTest(), receiveInteraction(), removeKnowledgeOfTestId(), and tick().
DtInitiatorLatencyTest* DtTestManager::myInitiatorTest [protected] |
Handles initiating tests with other federates.
Referenced by addAsyncQueueMsgTimeStamp(), addNetReceiveTimeStamp(), addNetSendTimeStamp(), addReceiveInteractionTimeStamp(), addSendInteractionTimeStamp(), initiateLatencyTest(), postJoinInit(), processLatencyTest(), receiveInteraction(), removeKnowledgeOfTestId(), tick(), and ~DtTestManager().
The latency test interaction.
Referenced by isTestInteractionClassHandle(), postJoinInit(), receiveInteraction(), resign(), sendInteraction(), sendSingleLatencyInteraction(), and ~DtTestManager().
std::set<DtFederateHandle> DtTestManager::myListOfKnownFederates [protected] |
Our list of known federates (not including self).
Populated and maintained through DtTestManager::subInterMsg, and DtTestManager::UnsubInterMsg calls which only monitors the interaction class handles of known testInteractions.
Referenced by addKnownFederate(), atLeastOneKnownFederate(), changeLatencyTestRequestByType(), isKnownFederateHandle(), and removeKnownFederate().
unsigned DtTestManager::myNumInitiatedTests [protected] |
The number of tests this federate has initiated.
Referenced by changeLatencyTestRequestByType(), and sendStatusMessages().
unsigned DtTestManager::myNumTestReportsGenerated [protected] |
The number of test reports this federate has generated.
Referenced by processLatencyTest(), and sendStatusMessages().
std::set<DtInitiatorByType> DtTestManager::myObservers [protected] |
list of observers.
Referenced by changeLatencyTestRequestByType(), and processLatencyTest().
DtMutex DtTestManager::myRecipientMutex [protected] |
DtRecipientLatencyTest* DtTestManager::myRecipientTest [protected] |
Handles receiving tests from other federates.
Referenced by addAsyncQueueMsgTimeStamp(), addNetReceiveTimeStamp(), addNetSendTimeStamp(), addReceiveInteractionTimeStamp(), addSendInteractionTimeStamp(), postJoinInit(), receiveInteraction(), removeKnowledgeOfTestId(), and ~DtTestManager().
bool DtTestManager::myRunningContinuous [protected] |
Are we currently running a continuous test?
Referenced by changeLatencyTestRequestByType(), disableNetworkTesting(), processLatencyTest(), processSub(), and sendStatusMessages().
unsigned long DtTestManager::mySecondTickCount [protected] |
the second tick count we're using for avgTickPeriod.
Referenced by calculateTickTime().
float DtTestManager::mySecondTickTime [protected] |
the second tick time we're using for avgTickPeriod.
Referenced by calculateTickTime(), and DtTestManager().
bool DtTestManager::mySendingInteraction [protected] |
Set when testMgr sends a message, is cleared by accessor when connectMgr checks whether the last message was a testMgr msg.
Should ONLY be changed by a test Manager.
Referenced by setTestMgrCurrentlySending(), and testMgrCurrentlySending().
DtTestMgrFedAmbWrapper* DtTestManager::myTestFedAmbWrapper [protected] |
Catches calls to ReceiveInteraction to prevent testInteractions from being delivered to the user.
Referenced by postJoinInit(), and resign().
unsigned int DtTestManager::myTestIDOfLastSentInteraction [protected] |
The testID of the currently running initiated test.
Undefined when not currently running initiated test.
Referenced by lastSentTestID(), and setLastSentTestID().
std::list<DtTrialDetails> DtTestManager::myTrialsToInitiate [protected] |
List of trials to initiate.
Referenced by changeLatencyTestRequestByType(), disableNetworkTesting(), initiateLatencyTest(), processLatencyTest(), processSub(), removeKnownFederate(), and sendStatusMessages().