MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
initiatorLatencyTest.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 VT MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: initiatorLatencyTest.h,v $ $Revision: 1.8 $ $State: Exp $
7 *******************************************************************************/
8 
12 
13 #ifndef DtInitiatorLatencyTest_H_
14 #define DtInitiatorLatencyTestr_H_
15 
16 
17 #include "rtiMsConfig.h"
18 #include "latencyTest.h"
19 #include <vlutil/vlString.h>
20 #include <vlutil/vlTime.h>
21 #include <vlutil/vlFedTarget.h>
22 #include <metadata.h>
23 #include "RIDparams.h"
25 
26 class DtConnectionMgr;
30 
31 
32 
33 
34 
37 
39 {
40 
41 public:
42 
45 
48 
50  virtual ~DtInitiatorLatencyTest();
51 
53  virtual bool tick();
54 
57  virtual void addSendInteractionTimeStamp( unsigned int testID );
58 
61  virtual void addNetSendTimeStamp( unsigned int testID, DtRtiMsg& msg );
62 
65  virtual void addNetReceiveTimeStamp( unsigned int testID, const DtRtiMsg& msg );
66 
69  virtual void addReceiveInteractionTimeStamp( unsigned int testID, MAKRti::DtTime timeToUse );
70 
73  virtual void addAsyncQueueMsgTimeStamp( unsigned int testID, const DtRtiMsg& msg );
74 
76  virtual bool canInitiateTest() const;
77 
78  virtual bool takeCompletedTestReport( unsigned int trialID,
79  DtAveragedLatencyTestReport& takenReport);
80 
82  virtual void initiateLatencyTest(unsigned int trialID,
83  unsigned int numInteractions,
84  unsigned int sizeOfPayload,
85  MAKRti::DtTime periodBetweenSends,
86  DtFederateHandle handle);
87 
89  virtual bool testIsFinished( unsigned int testID ) const;
90 
92  virtual void getCurrentTestInfo(unsigned int& testID,
93  DtFederateHandle& handle,
94  MAKRti::DtTransportType& transport,
95  unsigned int& payloadSize ) const;
96 
98  virtual bool trialIsFinished( unsigned int trialID ) const;
99 
100 
101 protected:
102 
106  virtual bool getCompletedReportByTestID( unsigned int testID,
107  DtLatencyTestReportStruct& report ) const;
108 
110  virtual void averageReports(const std::vector<DtLatencyTestReportStruct*>& bestEffortTests,
111  const std::vector<DtLatencyTestReportStruct*>& reliableTests,
112  DtFederateHandle recipientHandle,
113  DtFederateHandle initiatorHandle,
114  const MAKRti::DtString& recipientName,
115  const MAKRti::DtString& initiatorName,
118  unsigned int numBestEffortDropped,
119  unsigned int numReliableDropped,
120  DtAveragedLatencyTestReport& averaged) const;
121 
122 
124  virtual unsigned int currTestId() const;
125 
127  virtual void consumeTestId();
128 
129 private:
132 
135 
136 protected:
137 
138  MAKRti::DtTime myNextSend;
139  unsigned short myTestOffset;
140 
141  typedef std::pair<unsigned int, MAKRti::DtTransportType> DtNumToTypePair;
142  typedef std::multimap<DtFederateHandle, DtNumToTypePair> DtFedHandleToTestMap;
143 
144  // Storage of my completed initiated tests.
145  DtTestToTimeStampMap myCompletedInitiatedTests;
146  std::map<unsigned int, DtFederateHandle> myFedHandleByTestID;
147 
150  unsigned int myNumTestsToAverage;
151 
155  MAKRti::DtTime myLatencyInterval;
156 
159  unsigned int myPayloadSize;
160 
162  std::map<unsigned int, DtRIDParameters::DtAsynchronousIOModeEnum> myRecipientAsyncIOModeByFedHandle;
163 
166  std::set<unsigned int> myInitiatedTestIDs;
167 
170  std::map<unsigned int, DtFedHandleToTestMap> myNumberOfInteractionsLeftByFederate;
171 
173  std::map<unsigned int, DtRtiMtdFederateHostInformation::DtFederateHostInformation> myRecipientHostInfoMap;
174 
176  std::map<unsigned int, std::set<unsigned int> > myTestIDsByTrial;
177 
179  unsigned int myTestIDOfCurrentTest;
180 
181 
182 };
183 
184 #endif
unsigned short myTestOffset
Definition: initiatorLatencyTest.h:139
std::map< unsigned int, DtRtiMtdFederateHostInformation::DtFederateHostInformation > myRecipientHostInfoMap
Map between federate handle and federate Information.
Definition: initiatorLatencyTest.h:173
DtAsynchronousIOModeEnum
0 == no Async IO 1 == Asynchronous IO, (same as old parameter RTI_asynchronousIO ) 2 == Asynchronous ...
Definition: RIDparams.h:111
std::multimap< DtFederateHandle, DtNumToTypePair > DtFedHandleToTestMap
Definition: initiatorLatencyTest.h:142
std::map< unsigned int, DtFedHandleToTestMap > myNumberOfInteractionsLeftByFederate
Map between trialIdentifier and federates involved in current trial and the number of Test Interactio...
Definition: initiatorLatencyTest.h:170
DtInitiatorLatencyTest runs network connectivity tests between local RTI components.
Definition: initiatorLatencyTest.h:38
virtual void addSendInteractionTimeStamp(unsigned int testID)=0
called by testMgr
virtual bool tick()
Process test activities.
This file contains the declaration of the DtRtiMetadata class which provides a framework for subclass...
unsigned int myTestIDOfCurrentTest
Definition: initiatorLatencyTest.h:179
virtual void addNetSendTimeStamp(unsigned int testID, DtRtiMsg &msg)=0
called by either test initiator or test recipient.
virtual void addAsyncQueueMsgTimeStamp(unsigned int testID, const DtRtiMsg &msg)=0
called by either test initiator or test recipient.
std::pair< unsigned int, MAKRti::DtTransportType > DtNumToTypePair
Definition: initiatorLatencyTest.h:141
std::map< unsigned int, std::set< unsigned int > > myTestIDsByTrial
Map between trialIdentifer and testIDs associated with the trial.
Definition: initiatorLatencyTest.h:176
MAKRti::DtTime myNextSend
Definition: initiatorLatencyTest.h:138
virtual void addReceiveInteractionTimeStamp(unsigned int testID, MAKRti::DtTime timeToUse)=0
called by either test initiator or test recipient.
DtAveragedLatencyTestReport encodes and decodes reports from tests between local RTI components...
Definition: averagedLatencyTestReport.h:48
unsigned int myNumTestsToAverage
When running a latency test we will average results from myNumTestsToAverage latency interactions...
Definition: initiatorLatencyTest.h:150
Instances of DtConnectionMgr manage the communication objects that the RTI will use to either communi...
Definition: connectMgr.h:67
unsigned int myPayloadSize
When running a latency test, what is the size of the payload attached to interactions in bytes...
Definition: initiatorLatencyTest.h:159
Struct contains all report-worth details of a test.
Definition: latencyTest.h:41
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:34
DtHandle DtFederateHandle
Definition: internalTypes.h:46
The DtAssistantChangeLatencyTestModeMsg defines a wrapper for the RTI Assistant initiate latency test...
Definition: assistantChangeLatencyTestModeMsg.h:36
The DtAssistantLatencyReportMsg defines a msg for a client to report the results of a latency test...
Definition: assistantLatencyReportMsg.h:33
DtTestToTimeStampMap myCompletedInitiatedTests
Definition: initiatorLatencyTest.h:145
Defines DtLatencyTest used to run network latency between local RTI components.
DtLatencyTest & operator=(DtLatencyTest const &orig)
Assignment operator - not allowed.
std::map< unsigned int, DtRIDParameters::DtAsynchronousIOModeEnum > myRecipientAsyncIOModeByFedHandle
What is the asynchronous processing mode of the recipient federate by FedHandle.
Definition: initiatorLatencyTest.h:162
MAKRti::DtTime myLatencyInterval
When running a latency test, what is the interval between the myNumTestsToAverage interactions...
Definition: initiatorLatencyTest.h:155
DtLatencyTest runs network latency tests between local RTI components.
Definition: latencyTest.h:35
This file contains the declaration of the DtRtiMtdFederateHostInformation class which defines structu...
virtual void addNetReceiveTimeStamp(unsigned int testID, const DtRtiMsg &msg)=0
called by either test initiator or test recipient.
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
std::map< unsigned int, DtFederateHandle > myFedHandleByTestID
Definition: initiatorLatencyTest.h:146
DtTestManager runs network connectivity tests between local RTI components.
Definition: testManager.h:50
std::set< unsigned int > myInitiatedTestIDs
Set of known tests are not removed when the test is finished.
Definition: initiatorLatencyTest.h:166
DtFederateHandle myFedHandleOfCurrentTest
Definition: initiatorLatencyTest.h:178

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)