![]() |
MAK RTIspy API Documentation for HLA 1516
|
DtTestManager runs network connectivity tests between local RTI components. More...
Collaboration diagram for DtTestManager:Classes | |
| struct | DtTrialDetails |
Public Member Functions | |
| DtTestManager (bool initiallyEnabled) | |
| Constructor. More... | |
| DtTestManager (DtFederateMgr *fedMgr, bool initiallyEnabled) | |
| Constructor. More... | |
| virtual | ~DtTestManager () |
| Destructor. More... | |
| DtRIDParameters * | params () |
| Access to RID. More... | |
| DtRIDParameters * | params () const |
| Const access to RID. More... | |
| DtFederateMgr * | fedMgr () |
| Access to federate manager. More... | |
| DtFederateMgr * | fedMgr () const |
| Const access to federate manager. More... | |
| RTI::RTIambassador * | rtiAmb () |
| Access to the federate's RTI Ambassador. More... | |
| RTI::RTIambassador * | rtiAmb () const |
| Const access to the federate's RTI Ambassador. More... | |
| virtual DtConnectionMgr * | connectMgr () |
| Access to the connection manager. More... | |
| virtual DtConnectionMgr * | connectMgr () const |
| Const access to the connection manager. More... | |
| virtual MAKRti::DtTime | time () const |
| return the current time. More... | |
| virtual void | postJoinInit () |
| Perform initializations that will allow tests to be run (e.g., publish and subscribe to test interaction) More... | |
| virtual void | resign () |
| Perform clean up from test instrumentation. More... | |
| virtual void | tick (unsigned long tickCount) |
| Process test activities. More... | |
| virtual float | averageTickPeriod () const |
| Average period between ticks. More... | |
| virtual void | enableNetworkTesting () |
| Enable network testing. More... | |
| virtual void | disableNetworkTesting () |
| Disable network testing. More... | |
| virtual bool | networkTestingEnabled () const |
| Is network testing enabled? More... | |
| void | processResign (const DtResignMsg &msg) |
| Process resign msg to maintain list of known federates. More... | |
| virtual bool | receiveInteraction (DtInteractionClassHandle classHandle, const DtPhvps ¶ms) |
| called by testMgr's installed fedAmbWrapper. More... | |
| virtual bool | testMgrCurrentlySending () const |
| returns whether the test Manager is in a sending state. More... | |
| virtual bool | queueMsgForSend (DtRtiMsg &msg) const |
| Add testID time stamp to message if necessary. More... | |
| virtual void | setTestMgrCurrentlySending (bool isSending, unsigned int testID=0) |
| Mark the test mgr as sending / not sending Also sets / clears the last sent testID. More... | |
| virtual bool | addSendTimeStampMetaDataIfNecessary (DtRtiMsg &msg) |
| If necessary add testing metadata to the message and to the testMgr, return whether timestamp was added. More... | |
| virtual bool | addReceiveTimeStampIfNecessary (DtRtiMsg &msg) |
| If necessary record receive Timestamp. More... | |
| virtual bool | addAsyncQueueMsgOnRecieve (DtRtiMsg &msg) |
| When the message is queued on Receive. More... | |
| virtual bool | isTestInteractionClassHandle (DtInteractionClassHandle classHandle) |
| Return boolean: Is the given interaction handle a test interaction? More... | |
| virtual void | sendStatusMessages () const |
| Update the status.... More... | |
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. More... | |
| virtual void | processUnsub (const DtUnsubInterMsg &msg) |
| Process unsubscribe msg to maintain a list of known federates. More... | |
| virtual void | processChangeLatencyTestStatus (const DtAssistantChangeLatencyTestModeMsg &testMsg) |
| Processes latency test status change messages. More... | |
| 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. More... | |
| virtual void | initiateLatencyTest () |
| if there are queued requests and the most recent trial has finished run a test. More... | |
| virtual void | processLatencyTest () |
| Process an active latency test. More... | |
| 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. More... | |
| virtual void | removeKnownFederate (DtFederateHandle unsubscribedFed) |
| Remove the federate from the list of known federates so we don't sent to it anymore. More... | |
| virtual bool | atLeastOneKnownFederate () const |
| Do we know of at least one federate we can initiate a test with. More... | |
| virtual bool | isKnownFederateHandle (DtFederateHandle handle) const |
| Is the input federate Handle known to us? More... | |
| virtual void | addSendInteractionTimeStamp (unsigned int testID) |
| called by either test initiator or test recipient. More... | |
| virtual void | addNetSendTimeStamp (unsigned int testID, DtRtiMsg &msg) |
| called by either test initiator or test recipient. More... | |
| virtual void | addNetReceiveTimeStamp (unsigned int testID, const DtRtiMsg &msg) |
| called by either test initiator or test recipient. More... | |
| virtual void | addReceiveInteractionTimeStamp (unsigned int testID, MAKRti::DtTime timeToUse) |
| called by either test initiator or test recipient. More... | |
| virtual void | removeKnowledgeOfTestId (unsigned int testID) |
| Remove knowledge of this testID. More... | |
| virtual void | addAsyncQueueMsgTimeStamp (unsigned int &testID, const DtRtiMsg &msg) |
| called by either test initiator or test recipient. More... | |
| MAKRti::DtTransportType | transportTypeForTestID (unsigned int testID) |
| look up the transport type for this testID. More... | |
| virtual unsigned int | lastSentTestID () const |
| called by test initiator only. More... | |
| virtual void | setLastSentTestID (unsigned int testID) |
| Set the Test ID of the last sent interaction. More... | |
| virtual bool | sendSingleLatencyInteraction (unsigned int testID, DtFederateHandle recipient, MAKRti::DtTransportType transport, unsigned int payload) |
| Send a single latency interaction. More... | |
| virtual bool | addMetadataIfNecessary (DtRtiMsg &msg, unsigned int &testID) const |
| Before netsend, set the msgs's metadata from the testID. More... | |
| virtual bool | shouldAddMetadataToMessage (DtRtiMsg &msg) const |
| determine if adding metadata is necessary based on msg type and current state. More... | |
| virtual bool | isInitiatorOfTestID (unsigned int testID) const |
| Was this testID generated by me? More... | |
| virtual void | calculateTickTime (unsigned long tickCount) |
| Calculate Average TickTime. More... | |
| 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. More... | |
Static Protected Member Functions | |
| static void | processSub (const DtSubInterMsg &msg, void *usr) |
| Callback to install for processing subscription messages. More... | |
| static void | processUnsub (const DtUnsubInterMsg &msg, void *usr) |
| Callback to install for processing unsubscribe messages. More... | |
| static void | queueLatencyTestRequest (const DtAssistantChangeLatencyTestModeMsg &testMsg, void *usr) |
| Callback to install for processing initiate latency test messages. More... | |
| static void | processChangeLatencyTestStatus (const DtAssistantChangeLatencyTestModeMsg &testMsg, void *usr) |
| Processes latency test status change messages. More... | |
| static void | processChangeLatencyTestStatus (const DtChangeLatencyTestModeMsg &testMsg, void *usr) |
Protected Attributes | |
| DtFederateMgr * | myFedMgr |
| The federate manager. More... | |
| DtInitiatorLatencyTest * | myInitiatorTest |
| Handles initiating tests with other federates. More... | |
| DtRecipientLatencyTest * | myRecipientTest |
| Handles receiving tests from other federates. More... | |
| DtLatencyTestInteraction * | myLatencyInteraction |
| The latency test interaction. More... | |
| MAKRti::DtClock | myClock |
| Keep track of time. More... | |
| bool | myRunningContinuous |
| Are we currently running a continuous test? More... | |
| DtTrialDetails | myContinuousDetails |
| If so what are the details of the continuous test? More... | |
| std::set< DtInitiatorByType > | myObservers |
| list of observers. More... | |
| DtTestToTimeStampMap | myCompletedAveragedInitiatedTests |
| Storage of my completed initiated tests. More... | |
| bool | mySendingInteraction |
| Set when testMgr sends a message, is cleared by accessor when connectMgr checks whether the last message was a testMgr msg. More... | |
| unsigned int | myTestIDOfLastSentInteraction |
| The testID of the currently running initiated test. More... | |
| unsigned int | myCurrentTrialID |
| What is the current trial number. More... | |
| unsigned int | myInitiatedTrialID |
| What trials am I waiting to complete? More... | |
| DtFederateHandle | myInitiatedFedHandle |
| bool | mySendSubscribe |
| DtTestMgrFedAmbWrapper * | myTestFedAmbWrapper |
| Catches calls to ReceiveInteraction to prevent testInteractions from being delivered to the user. More... | |
| std::list< DtTrialDetails > | myTrialsToInitiate |
| List of trials to initiate. More... | |
| std::set< DtFederateHandle > | myListOfKnownFederates |
| Our list of known federates (not including self). More... | |
| float | myInitialTickTime |
| the earliest tick time we're using for avgTickPeriod. More... | |
| unsigned long | myInitialTickCount |
| the earliest tick count we're using for avgTickPeriod. More... | |
| float | mySecondTickTime |
| the second tick time we're using for avgTickPeriod. More... | |
| unsigned long | mySecondTickCount |
| the second tick count we're using for avgTickPeriod. More... | |
| float | myAverageTickPeriod |
| The average period between ticks. More... | |
| bool | myEnabled |
| Is network testing enabled? More... | |
| unsigned | myNumInitiatedTests |
| The number of tests this federate has initiated. More... | |
| unsigned | myNumTestReportsGenerated |
| The number of test reports this federate has generated. More... | |
| DtMutex | myInitiatorMutex |
| lock for the initiator test More... | |
| DtMutex | myRecipientMutex |
Private Member Functions | |
| DtTestManager (DtTestManager const &orig) | |
| Copy Constructor - not allowed. More... | |
| DtTestManager & | operator= (DtTestManager const &orig) |
| Assignment operator - not allowed. More... | |
DtTestManager runs network connectivity tests between local RTI components.
|
protected |
|
protected |
|
protected |
|
protected |
| DtTestManager::DtTestManager | ( | bool | initiallyEnabled | ) |
Constructor.
| DtTestManager::DtTestManager | ( | DtFederateMgr * | fedMgr, |
| bool | initiallyEnabled | ||
| ) |
Constructor.
|
virtual |
Destructor.
|
private |
Copy Constructor - not allowed.
|
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
|
protectedvirtual |
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.
|
protectedvirtual |
Add the federate to the list of known subscribed federates so we know who to send test interactions to.
|
protectedvirtual |
Before netsend, set the msgs's metadata from the testID.
return whether it was necessary to add metadata.
|
protectedvirtual |
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.
|
protectedvirtual |
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.
|
protectedvirtual |
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
|
virtual |
If necessary record receive Timestamp.
|
protectedvirtual |
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.
|
virtual |
If necessary add testing metadata to the message and to the testMgr, return whether timestamp was added.
|
protectedvirtual |
Do we know of at least one federate we can initiate a test with.
|
virtual |
Average period between ticks.
|
protectedvirtual |
Calculate Average TickTime.
|
protectedvirtual |
Change status according to parameters / initiator.
|
virtual |
Access to the connection manager.
|
virtual |
Const access to the connection manager.
|
virtual |
Disable network testing.
|
virtual |
Enable network testing.
| DtFederateMgr* DtTestManager::fedMgr | ( | ) |
Access to federate manager.
| DtFederateMgr* DtTestManager::fedMgr | ( | ) | const |
Const access to federate manager.
|
protectedvirtual |
|
protectedvirtual |
if there are queued requests and the most recent trial has finished run a test.
|
protectedvirtual |
Was this testID generated by me?
|
protectedvirtual |
Is the input federate Handle known to us?
|
virtual |
Return boolean: Is the given interaction handle a test interaction?
|
protectedvirtual |
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.
|
virtual |
Is network testing enabled?
|
private |
Assignment operator - not allowed.
| DtRIDParameters* DtTestManager::params | ( | ) |
Access to RID.
| DtRIDParameters* DtTestManager::params | ( | ) | const |
Const access to RID.
|
virtual |
Perform initializations that will allow tests to be run (e.g., publish and subscribe to test interaction)
|
protectedvirtual |
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.
|
protectedvirtual |
|
staticprotected |
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.
|
staticprotected |
|
protectedvirtual |
Process an active latency test.
| void DtTestManager::processResign | ( | const DtResignMsg & | msg | ) |
Process resign msg to maintain list of known federates.
|
protectedvirtual |
Process subscribe msg to maintain a list of known federates.
|
staticprotected |
Callback to install for processing subscription messages.
|
protectedvirtual |
Process unsubscribe msg to maintain a list of known federates.
|
staticprotected |
Callback to install for processing unsubscribe messages.
|
staticprotected |
Callback to install for processing initiate latency test messages.
|
virtual |
Add testID time stamp to message if necessary.
|
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.
|
protectedvirtual |
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.
|
protectedvirtual |
Remove the federate from the list of known federates so we don't sent to it anymore.
|
virtual |
Perform clean up from test instrumentation.
| RTI::RTIambassador* DtTestManager::rtiAmb | ( | ) |
Access to the federate's RTI Ambassador.
| RTI::RTIambassador* DtTestManager::rtiAmb | ( | ) | const |
Const access to the federate's RTI Ambassador.
|
protectedvirtual |
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.
|
protectedvirtual |
Send a single latency interaction.
|
virtual |
Update the status....
|
protectedvirtual |
Set the Test ID of the last sent interaction.
|
virtual |
Mark the test mgr as sending / not sending Also sets / clears the last sent testID.
|
protectedvirtual |
determine if adding metadata is necessary based on msg type and current state.
|
virtual |
returns whether the test Manager is in a sending state.
|
virtual |
Process test activities.
|
virtual |
return the current time.
|
protected |
look up the transport type for this testID.
|
protected |
The average period between ticks.
|
protected |
Keep track of time.
|
protected |
Storage of my completed initiated tests.
|
protected |
If so what are the details of the continuous test?
|
protected |
What is the current trial number.
|
protected |
Is network testing enabled?
|
protected |
The federate manager.
|
protected |
the earliest tick count we're using for avgTickPeriod.
|
protected |
the earliest tick time we're using for avgTickPeriod.
|
protected |
|
protected |
What trials am I waiting to complete?
|
protected |
lock for the initiator test
|
protected |
Handles initiating tests with other federates.
|
protected |
The latency test interaction.
|
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.
|
protected |
The number of tests this federate has initiated.
|
protected |
The number of test reports this federate has generated.
|
protected |
list of observers.
|
protected |
|
protected |
Handles receiving tests from other federates.
|
protected |
Are we currently running a continuous test?
|
protected |
the second tick count we're using for avgTickPeriod.
|
protected |
the second tick time we're using for avgTickPeriod.
|
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.
|
protected |
|
protected |
Catches calls to ReceiveInteraction to prevent testInteractions from being delivered to the user.
|
protected |
The testID of the currently running initiated test.
Undefined when not currently running initiated test.
|
protected |
List of trials to initiate.