MAK RTIspy API Documentation for HLA 4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
testInteraction.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: testInteraction.h,v $ $Revision: 1.4 $ $State: Exp $
7 *******************************************************************************/
8 
12 
13 #ifndef DtTestInteraction_H_
14 #define DtTestInteraction_H_
15 
16 
17 #include "rtiMsConfig.h"
18 #include "internalTypes.h"
19 #include "pHandValSet.h"
20 #include "attrHandSet.h"
21 
22 #include <vlutil/vlString.h>
23 #include <vlutil/vlFedTarget.h>
24 
25 class DtFomClassMgr;
26 
27 
35 {
36 public:
37 
39  DtTestInteraction(DtFomClassMgr* fomMgr, MAKRti::DtString className);
40 
42  virtual ~DtTestInteraction();
43 
45  virtual const MAKRti::DtString& className() const;
46 
48  virtual DtInteractionClassHandle classHandle() const;
49 
53  virtual const DtPhvps& parameters() = 0;
54 
57  virtual bool setFromParameters(const DtPhvps& phvps) = 0;
58 
60  virtual DtFederateHandle targetFederate() const;
61 
63  virtual void setTargetFederate(DtFederateHandle handle);
64 
66  virtual void setTransportType(MAKRti::DtTransportType transport);
67 
69  virtual void setPayloadSize(unsigned int payload);
70 
72  virtual unsigned int payloadSize() const;
73 
75  virtual MAKRti::DtU32 testId() const;
76 
78  virtual void setTestId(unsigned int id);
79 
80 protected:
81 
83  virtual void encodeTargetFederate();
84 
86  virtual void encodeTestId();
87 
89  virtual void encodePayload();
90 
93  static bool decodeU32(
94  const DtPhvps& parameters,
95  int index,
96  MAKRti::DtU32& value);
97 
100  static bool decodeU64(
101  const DtPhvps& parameters,
102  int index,
103  MAKRti::DtU64& value);
104 
107  virtual bool decodeTargetFederate(
108  const DtPhvps& parameters,
109  int index);
110 
113  virtual bool decodeTestId(
114  const DtPhvps& parameters,
115  int index);
116 
119  virtual bool decodePayload(
120  const DtPhvps& parameters,
121  int index );
122 
123 private:
126 
128  DtTestInteraction& operator= (DtTestInteraction const& orig);
129 
130 public:
131 
133  static const MAKRti::DtString theNameTargetFederate;
135  static const MAKRti::DtString theNameTestId;
136  static const MAKRti::DtString theNamePayload;
138 
139 protected:
140 
142  MAKRti::DtString myClassName;
145 #if !defined(DtIFSPEC13)
147 #endif
148 
150  DtParameterHandle myHandleTargetFederate;
155 
157  DtFederateHandle myTargetFederate;
159  MAKRti::DtU32 myTestId;
160  MAKRti::DtU32 myPayloadSize;
162 };
165 {
166 public:
167 
170 
172  virtual ~DtLatencyTestInteraction();
173 
175  virtual const DtPhvps& parameters();
176 
179  virtual bool setFromParameters(const DtPhvps& phvps);
180 
181 
182 private:
185 
188 
189 public:
190  static const MAKRti::DtString theInteractionName;
191 
192 protected:
193 
195 
196 };
197 
200 
201 
202 #endif
203 
static const MAKRti::DtString theNameTestId
Parameter name.
Definition: testInteraction.h:135
DtPhvps * myParameters
Definition: testInteraction.h:144
static const MAKRti::DtString theInteractionName
Definition: testInteraction.h:190
MAKRti::DtU32 myTestId
Parameter value.
Definition: testInteraction.h:159
DtInteractionClassHandle myClassHandle
Definition: testInteraction.h:143
DtLatencyTestInteraction holds the data needed to send a test latency interaction.
Definition: testInteraction.h:164
DtHandle DtInteractionClassHandle
Definition: internalTypes.h:52
MAKRti::DtString myClassName
Definition: testInteraction.h:142
DtTestInteraction & operator=(DtTestInteraction const &orig)
Assignment operator - not allowed.
virtual bool setFromParameters(const DtPhvps &phvps)=0
Initialize this interaction using the given parameters Return true if parameters were set successfull...
DtParameterHandle myHandleTestId
Parameter handle.
Definition: testInteraction.h:152
DtHandle DtFederateHandle
Definition: internalTypes.h:46
Definition: fomMgr.h:49
virtual const DtPhvps & parameters()=0
Return the parameter handle value pair set Calling this accessor results in the encoding of member da...
RTI_API::ParameterHandleValueMap myValueMap
Definition: testInteraction.h:146
MAKRti::DtU32 myPayloadSize
Parameter value.
Definition: testInteraction.h:160
void DT_DLL_LRC addTestToFom(DtFomClassMgr &fom)
Incorporate interactions into the FOM.
DtFomClassMgr * myFomMgr
Definition: testInteraction.h:141
#define DT_DLL_LRC
Definition: rtiMsConfig.h:155
Definition: pHandValSet.h:38
The declaration of internal types.
DtHandle DtParameterHandle
Definition: internalTypes.h:56
DtParameterHandle myDataHandle
Definition: testInteraction.h:194
DtParameterHandle myHandlePayload
Parameter handle.
Definition: testInteraction.h:153
std::map< ParameterHandle, VariableLengthData > ParameterHandleValueMap
Definition: Typedefs.h:44
static const MAKRti::DtString theNamePayload
Parameter name.
Definition: testInteraction.h:136
DtTestInteraction holds the data needed to send a test interaction An instance of this interaction be...
Definition: testInteraction.h:34

Document ID: Generated on Sun Jul 20 16:15:30 EDT 2025 from SVN revision 277985
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)