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 | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
DtInitiatorLatencyTest Class Reference

DtInitiatorLatencyTest runs network connectivity tests between local RTI components. More...

+ Inheritance diagram for DtInitiatorLatencyTest:
+ Collaboration diagram for DtInitiatorLatencyTest:

Public Member Functions

 DtInitiatorLatencyTest (DtTestManager *parent)
 Constructor.
 DtInitiatorLatencyTest ()
 Constructor.
virtual ~DtInitiatorLatencyTest ()
 Destructor.
virtual bool tick ()
 Process test activities.
virtual void addSendInteractionTimeStamp (unsigned int testID)
 Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a send Interaction time stamp.
virtual void addNetSendTimeStamp (unsigned int testID, DtRtiMsg &msg)
 Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a net send time stamp.
virtual void addNetReceiveTimeStamp (unsigned int testID, const DtRtiMsg &msg)
 Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a net receive time stamp.
virtual void addReceiveInteractionTimeStamp (unsigned int testID, MAKRti::DtTime timeToUse)
 Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a receive interaction time stamp.
virtual void addAsyncQueueMsgTimeStamp (unsigned int testID, const DtRtiMsg &msg)
 Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a async Queue Msg time stamp.
virtual bool canInitiateTest () const
 Make sure we're not currently running a test and that there are other federates to send to.
virtual bool takeCompletedTestReport (unsigned int trialID, DtAveragedLatencyTestReport &takenReport)
virtual void initiateLatencyTest (unsigned int trialID, unsigned int numInteractions, unsigned int sizeOfPayload, MAKRti::DtTime periodBetweenSends, DtFederateHandle handle)
 Initiate a Latency Test.
virtual bool testIsFinished (unsigned int testID) const
 Query whether this test is finished.
virtual void getCurrentTestInfo (unsigned int &testID, DtFederateHandle &handle, MAKRti::DtTransportType &transport, unsigned int &payloadSize) const
 the FederateHandle of the current recipient.
virtual bool trialIsFinished (unsigned int trialID) const
 Is the trial finished.
- Public Member Functions inherited from DtLatencyTest
 DtLatencyTest (DtTestManager *parent)
 Constructor.
 DtLatencyTest ()
 Default constructor. Not implemented.
virtual ~DtLatencyTest ()
 Destructor.
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 addTransportTypeForTestID (unsigned int testID, MAKRti::DtTransportType type)
 Add a mapping for this testID to this transport type.
virtual MAKRti::DtTransportType transportTypeForTestID (unsigned int testID) const
 look up the transport type for this testID.
virtual void removeKnowledgeOfTestId (unsigned int testID)
 Remove knowledge of this testID.
MAKRti::DtTime time () const

Protected Types

typedef std::pair< unsigned
int, MAKRti::DtTransportType > 
DtNumToTypePair
typedef std::multimap
< DtFederateHandle,
DtNumToTypePair
DtFedHandleToTestMap
- Protected Types inherited from DtLatencyTest
typedef std::multimap
< DtMetadataType,
MAKRti::DtTime > 
DtTimeStampMap
typedef std::map< unsigned int,
DtTimeStampMap
DtTestToTimeStampMap
typedef std::multimap
< DtFederateHandle, unsigned
int > 
DtFedHandleToTestMap

Protected Member Functions

virtual bool getCompletedReportByTestID (unsigned int testID, DtLatencyTestReportStruct &report) const
 generate a report of the specified testID.
virtual void averageReports (const std::vector< DtLatencyTestReportStruct * > &bestEffortTests, const std::vector< DtLatencyTestReportStruct * > &reliableTests, DtFederateHandle recipientHandle, DtFederateHandle initiatorHandle, const MAKRti::DtString &recipientName, const MAKRti::DtString &initiatorName, DtRIDParameters::DtAsynchronousIOModeEnum recipientAsyncMode, DtRIDParameters::DtAsynchronousIOModeEnum initiatorAsyncMode, unsigned int numBestEffortDropped, unsigned int numReliableDropped, DtAveragedLatencyTestReport &averaged) const
 Average contents of set of reports.
virtual unsigned int currTestId () const
 Return the current test id.
virtual void consumeTestId ()
 set myInitatedTestId and advance the currentTestId.

Protected Attributes

MAKRti::DtTime myNextSend
unsigned short myTestOffset
DtTestToTimeStampMap myCompletedInitiatedTests
std::map< unsigned int,
DtFederateHandle
myFedHandleByTestID
unsigned int myNumTestsToAverage
 When running a latency test we will average results from myNumTestsToAverage latency interactions.
MAKRti::DtTime myLatencyInterval
 When running a latency test, what is the interval between the myNumTestsToAverage interactions.
unsigned int myPayloadSize
 When running a latency test, what is the size of the payload attached to interactions in bytes.
std::map< unsigned int,
DtRIDParameters::DtAsynchronousIOModeEnum
myRecipientAsyncIOModeByFedHandle
 What is the asynchronous processing mode of the recipient federate by FedHandle.
std::set< unsigned int > myInitiatedTestIDs
 Set of known tests are not removed when the test is finished.
std::map< unsigned int,
DtFedHandleToTestMap
myNumberOfInteractionsLeftByFederate
 Map between trialIdentifier and federates involved in current trial and the number of Test Interactions we still have to send to each of them.
std::map< unsigned int,
DtRtiMtdFederateHostInformation::DtFederateHostInformation
myRecipientHostInfoMap
 Map between federate handle and federate Information.
std::map< unsigned int,
std::set< unsigned int > > 
myTestIDsByTrial
 Map between trialIdentifer and testIDs associated with the trial.
DtFederateHandle myFedHandleOfCurrentTest
unsigned int myTestIDOfCurrentTest
- Protected Attributes inherited from DtLatencyTest
DtTestManagermyTestManager
DtTestToTimeStampMap myTestsInProgressTimeStamps
 TimeStamp storage (by testID) of all my known tests.
std::map< unsigned int,
MAKRti::DtTransportType > 
myTransportByTestID

Private Member Functions

 DtInitiatorLatencyTest (DtInitiatorLatencyTest const &orig)
 Copy Constructor - not allowed.
DtInitiatorLatencyTestoperator= (DtInitiatorLatencyTest const &orig)
 Assignment operator - not allowed.

Detailed Description

DtInitiatorLatencyTest runs network connectivity tests between local RTI components.

Member Typedef Documentation

typedef std::pair<unsigned int, MAKRti::DtTransportType> DtInitiatorLatencyTest::DtNumToTypePair
protected

Constructor & Destructor Documentation

DtInitiatorLatencyTest::DtInitiatorLatencyTest ( DtTestManager parent)

Constructor.

DtInitiatorLatencyTest::DtInitiatorLatencyTest ( )

Constructor.

virtual DtInitiatorLatencyTest::~DtInitiatorLatencyTest ( )
virtual

Destructor.

DtInitiatorLatencyTest::DtInitiatorLatencyTest ( DtInitiatorLatencyTest const &  orig)
private

Copy Constructor - not allowed.

Member Function Documentation

virtual void DtInitiatorLatencyTest::addAsyncQueueMsgTimeStamp ( unsigned int  testID,
const DtRtiMsg msg 
)
virtual

Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a async Queue Msg time stamp.

Implements DtLatencyTest.

virtual void DtInitiatorLatencyTest::addNetReceiveTimeStamp ( unsigned int  testID,
const DtRtiMsg msg 
)
virtual

Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a net receive time stamp.

Implements DtLatencyTest.

virtual void DtInitiatorLatencyTest::addNetSendTimeStamp ( unsigned int  testID,
DtRtiMsg msg 
)
virtual

Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a net send time stamp.

Implements DtLatencyTest.

virtual void DtInitiatorLatencyTest::addReceiveInteractionTimeStamp ( unsigned int  testID,
MAKRti::DtTime  timeToUse 
)
virtual

Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a receive interaction time stamp.

Implements DtLatencyTest.

virtual void DtInitiatorLatencyTest::addSendInteractionTimeStamp ( unsigned int  testID)
virtual

Record the current time and associate it with the input test ID in myTestsInProgressTimeStamp with a send Interaction time stamp.

Implements DtLatencyTest.

virtual void DtInitiatorLatencyTest::averageReports ( const std::vector< DtLatencyTestReportStruct * > &  bestEffortTests,
const std::vector< DtLatencyTestReportStruct * > &  reliableTests,
DtFederateHandle  recipientHandle,
DtFederateHandle  initiatorHandle,
const MAKRti::DtString &  recipientName,
const MAKRti::DtString &  initiatorName,
DtRIDParameters::DtAsynchronousIOModeEnum  recipientAsyncMode,
DtRIDParameters::DtAsynchronousIOModeEnum  initiatorAsyncMode,
unsigned int  numBestEffortDropped,
unsigned int  numReliableDropped,
DtAveragedLatencyTestReport averaged 
) const
protectedvirtual

Average contents of set of reports.

virtual bool DtInitiatorLatencyTest::canInitiateTest ( ) const
virtual

Make sure we're not currently running a test and that there are other federates to send to.

virtual void DtInitiatorLatencyTest::consumeTestId ( )
protectedvirtual

set myInitatedTestId and advance the currentTestId.

virtual unsigned int DtInitiatorLatencyTest::currTestId ( ) const
protectedvirtual

Return the current test id.

virtual bool DtInitiatorLatencyTest::getCompletedReportByTestID ( unsigned int  testID,
DtLatencyTestReportStruct report 
) const
protectedvirtual

generate a report of the specified testID.

If the report has completed it returns the averaged report information in the report argument

virtual void DtInitiatorLatencyTest::getCurrentTestInfo ( unsigned int &  testID,
DtFederateHandle handle,
MAKRti::DtTransportType &  transport,
unsigned int &  payloadSize 
) const
virtual

the FederateHandle of the current recipient.

virtual void DtInitiatorLatencyTest::initiateLatencyTest ( unsigned int  trialID,
unsigned int  numInteractions,
unsigned int  sizeOfPayload,
MAKRti::DtTime  periodBetweenSends,
DtFederateHandle  handle 
)
virtual

Initiate a Latency Test.

DtInitiatorLatencyTest& DtInitiatorLatencyTest::operator= ( DtInitiatorLatencyTest const &  orig)
private

Assignment operator - not allowed.

virtual bool DtInitiatorLatencyTest::takeCompletedTestReport ( unsigned int  trialID,
DtAveragedLatencyTestReport takenReport 
)
virtual
virtual bool DtInitiatorLatencyTest::testIsFinished ( unsigned int  testID) const
virtual

Query whether this test is finished.

virtual bool DtInitiatorLatencyTest::tick ( )
virtual

Process test activities.

Reimplemented from DtLatencyTest.

virtual bool DtInitiatorLatencyTest::trialIsFinished ( unsigned int  trialID) const
virtual

Is the trial finished.

Member Data Documentation

DtTestToTimeStampMap DtInitiatorLatencyTest::myCompletedInitiatedTests
protected
std::map<unsigned int, DtFederateHandle> DtInitiatorLatencyTest::myFedHandleByTestID
protected
DtFederateHandle DtInitiatorLatencyTest::myFedHandleOfCurrentTest
protected
std::set<unsigned int> DtInitiatorLatencyTest::myInitiatedTestIDs
protected

Set of known tests are not removed when the test is finished.

myInitiatedTestIds is populated with all initiated test Ids

MAKRti::DtTime DtInitiatorLatencyTest::myLatencyInterval
protected

When running a latency test, what is the interval between the myNumTestsToAverage interactions.

This should be greater than the expected round trip latency interaction time.

MAKRti::DtTime DtInitiatorLatencyTest::myNextSend
protected
std::map<unsigned int, DtFedHandleToTestMap> DtInitiatorLatencyTest::myNumberOfInteractionsLeftByFederate
protected

Map between trialIdentifier and federates involved in current trial and the number of Test Interactions we still have to send to each of them.

unsigned int DtInitiatorLatencyTest::myNumTestsToAverage
protected

When running a latency test we will average results from myNumTestsToAverage latency interactions.

unsigned int DtInitiatorLatencyTest::myPayloadSize
protected

When running a latency test, what is the size of the payload attached to interactions in bytes.

std::map<unsigned int, DtRIDParameters::DtAsynchronousIOModeEnum> DtInitiatorLatencyTest::myRecipientAsyncIOModeByFedHandle
protected

What is the asynchronous processing mode of the recipient federate by FedHandle.

std::map<unsigned int, DtRtiMtdFederateHostInformation::DtFederateHostInformation> DtInitiatorLatencyTest::myRecipientHostInfoMap
protected

Map between federate handle and federate Information.

unsigned int DtInitiatorLatencyTest::myTestIDOfCurrentTest
protected
std::map<unsigned int, std::set<unsigned int> > DtInitiatorLatencyTest::myTestIDsByTrial
protected

Map between trialIdentifer and testIDs associated with the trial.

unsigned short DtInitiatorLatencyTest::myTestOffset
protected

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

Document ID: Generated on Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)