MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
latencyTest.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: latencyTest.h,v $ $Revision: 1.6 $ $State: Exp $
7 *******************************************************************************/
8 
13 
14 #ifndef DtLatencyTest_H_
15 #define DtLatencyTest_H_
16 
17 
18 #include "rtiMsConfig.h"
19 #include <vlutil/vlString.h>
20 #include <vlutil/vlTime.h>
21 #include <vlutil/vlFedTarget.h>
22 #include <metadata.h>
23 #include "RIDparams.h"
24 
25 #ifdef DtIFSPEC1516
26 #include "RTI/RTIambassador.h"
27 #include "RTI/LogicalTimeFactory.h"
28 #include "RTI/Enums.h"
29 using namespace rti1516;
30 #elif defined(DtIFSPEC1516E)
31 #include "RTI/RTIambassador.h"
32 #include "RTI/LogicalTimeFactory.h"
33 #include "RTI/Enums.h"
34 using namespace rti1516e;
35 #else
36 #ifdef DtIFSPEC13DLC
37 #include "RTI13.h"
38 #else
39 #include "RTI.hh"
40 #endif
41 #endif
42 
43 class DtTestManager;
44 
48 {
49 
50 public:
51 
54  {
56  testID(0),
57  recipientAsyncMode(DtRIDParameters::DtSynchronousMode),
58  initiatorAsyncMode(DtRIDParameters::DtSynchronousMode),
59  averageInitiatorTickPeriod(0.0f),
60  averageRecipientTickPeriod(0.0f),
61  sizeOfPayload(0),
62  numbersAreReliable(false),
63  initiatorSendInteraction(0.0f),
64  initiatorNetSend(0.0f),
65  recipientNetRead(0.0f),
66  recipientQueueMsg(0.0f),
67  recipReceiveInteraction(0.0f),
68  recipientSendInteraction(0.0f),
69  recipientNetSend(0.0f),
70  initiatorNetRead(0.0f),
71  initiatorQueueMsg(0.0f),
72  initiatorReceiveInteraction(0.0f),
73  recipientName(0.0f)
74  { }
75 
76  unsigned int testID;
81  unsigned int sizeOfPayload;
82 
84 
85  MAKRti::DtTime initiatorSendInteraction;
86  MAKRti::DtTime initiatorNetSend;
87  MAKRti::DtTime recipientNetRead;
88  MAKRti::DtTime recipientQueueMsg;
89  MAKRti::DtTime recipReceiveInteraction;
90  MAKRti::DtTime recipientSendInteraction;
91  MAKRti::DtTime recipientNetSend;
92  MAKRti::DtTime initiatorNetRead;
93  MAKRti::DtTime initiatorQueueMsg;
95  MAKRti::DtString recipientName;
96  };
97 
100 
102  DtLatencyTest();
103 
105  virtual ~DtLatencyTest();
106 
108  virtual bool tick();
109 
112  virtual void postJoinInit();
113 
115  virtual void resign();
116 
117 
119 
123  virtual void addSendInteractionTimeStamp( unsigned int testID ) = 0;
124 
128  virtual void addNetSendTimeStamp( unsigned int testID, DtRtiMsg& msg ) = 0;
129 
133  virtual void addNetReceiveTimeStamp( unsigned int testID, const DtRtiMsg& msg ) = 0;
134 
138  virtual void addReceiveInteractionTimeStamp( unsigned int testID, MAKRti::DtTime timeToUse ) = 0;
139 
143  virtual void addAsyncQueueMsgTimeStamp( unsigned int testID, const DtRtiMsg& msg ) = 0;
144 
146  virtual void addTransportTypeForTestID(unsigned int testID, MAKRti::DtTransportType type );
147 
149  virtual MAKRti::DtTransportType transportTypeForTestID( unsigned int testID ) const;
150 
154  virtual void removeKnowledgeOfTestId( unsigned int testID );
155 
156  // Return the time as reported by the parent test Manager.
157  MAKRti::DtTime time() const;
158 
159 protected:
160 
161 
162 private:
164  DtLatencyTest(DtLatencyTest const& orig);
165 
167  DtLatencyTest& operator= (DtLatencyTest const& orig);
168 
169 protected:
170 
172 
173  typedef std::multimap<DtMetadataType, MAKRti::DtTime> DtTimeStampMap;
174  typedef std::map<unsigned int, DtTimeStampMap > DtTestToTimeStampMap;
175  typedef std::multimap<DtFederateHandle, unsigned int> DtFedHandleToTestMap;
176 
181 
182  std::map<unsigned int, MAKRti::DtTransportType> myTransportByTestID;
183 
184 };
185 
186 #endif
MAKRti::DtTime recipientQueueMsg
Definition: latencyTest.h:88
DtTestManager * myTestManager
Definition: latencyTest.h:171
MAKRti::DtTime initiatorReceiveInteraction
Definition: latencyTest.h:94
float averageRecipientTickPeriod
Definition: latencyTest.h:80
DtAsynchronousIOModeEnum
0 == no Async IO 1 == Asynchronous IO, (same as old parameter RTI_asynchronousIO ) 2 == Asynchronous ...
Definition: RIDparams.h:111
This class manages the RTI&#39;s start-up configuration using both MTL variables and functions.
Definition: RIDparams.h:87
This file contains the declaration of the DtRtiMetadata class which provides a framework for subclass...
MAKRti::DtTime recipientNetSend
Definition: latencyTest.h:91
MAKRti::DtTime recipientNetRead
Definition: latencyTest.h:87
DtRIDParameters::DtAsynchronousIOModeEnum recipientAsyncMode
Definition: latencyTest.h:77
MAKRti::DtTime initiatorNetRead
Definition: latencyTest.h:92
std::map< unsigned int, MAKRti::DtTransportType > myTransportByTestID
Definition: latencyTest.h:182
MAKRti::DtString recipientName
Definition: latencyTest.h:95
MAKRti::DtTime initiatorSendInteraction
Definition: latencyTest.h:85
std::multimap< DtFederateHandle, unsigned int > DtFedHandleToTestMap
Definition: latencyTest.h:175
MAKRti::DtTime initiatorNetSend
Definition: latencyTest.h:86
Struct contains all report-worth details of a test.
Definition: latencyTest.h:53
DtRtiMsg is the base class for messages between RTI components.
Definition: rtiMsg.h:45
DtTestToTimeStampMap myTestsInProgressTimeStamps
TimeStamp storage (by testID) of all my known tests.
Definition: latencyTest.h:180
std::map< unsigned int, DtTimeStampMap > DtTestToTimeStampMap
Definition: latencyTest.h:174
unsigned int sizeOfPayload
Definition: latencyTest.h:81
bool numbersAreReliable
Definition: latencyTest.h:83
DtLatencyTest runs network latency tests between local RTI components.
Definition: latencyTest.h:47
DtLatencyTestReportStruct()
Definition: latencyTest.h:55
DtRIDParameters::DtAsynchronousIOModeEnum initiatorAsyncMode
Definition: latencyTest.h:78
This file contains enumerations used by the interface.
unsigned int testID
Definition: latencyTest.h:76
This file contains the rti1516e::RTIambassador class.
MAKRti::DtTime recipientSendInteraction
Definition: latencyTest.h:90
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
std::multimap< DtMetadataType, MAKRti::DtTime > DtTimeStampMap
Definition: latencyTest.h:173
DtTestManager runs network connectivity tests between local RTI components.
Definition: testManager.h:66
float averageInitiatorTickPeriod
Definition: latencyTest.h:79
MAKRti::DtTime recipReceiveInteraction
Definition: latencyTest.h:89
MAKRti::DtTime initiatorQueueMsg
Definition: latencyTest.h:93

Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)