MAK RTIspy API Documentation for HLA 1.3
 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 <vlutil/vlString.h>
19 #include <vlutil/vlFedTarget.h>
20 #include "internalTypes.h"
21 #include "pHandValSet.h"
22 #include "attrHandSet.h"
23 
24 class DtFomClassMgr;
25 
26 
34 {
35 public:
36 
38  DtTestInteraction(DtFomClassMgr* fomMgr, MAKRti::DtString className);
39 
41  virtual ~DtTestInteraction();
42 
44  virtual const MAKRti::DtString& className() const;
45 
47  virtual DtInteractionClassHandle classHandle() const;
48 
52  virtual const DtPhvps& parameters() = 0;
53 
56  virtual bool setFromParameters(const DtPhvps& phvps) = 0;
57 
59  virtual DtFederateHandle targetFederate() const;
60 
62  virtual void setTargetFederate(DtFederateHandle handle);
63 
65  virtual void setTransportType(MAKRti::DtTransportType transport);
66 
68  virtual void setPayloadSize(unsigned int payload);
69 
71  virtual unsigned int payloadSize() const;
72 
74  virtual MAKRti::DtU32 testId() const;
75 
77  virtual void setTestId(unsigned int id);
78 
79 protected:
80 
82  virtual void encodeTargetFederate();
83 
85  virtual void encodeTestId();
86 
88  virtual void encodePayload();
89 
92  static bool decodeU32(
93  const DtPhvps& parameters,
94  int index,
95  MAKRti::DtU32& value);
96 
99  static bool decodeU64(
100  const DtPhvps& parameters,
101  int index,
102  MAKRti::DtU64& value);
103 
106  virtual bool decodeTargetFederate(
107  const DtPhvps& parameters,
108  int index);
109 
112  virtual bool decodeTestId(
113  const DtPhvps& parameters,
114  int index);
115 
118  virtual bool decodePayload(
119  const DtPhvps& parameters,
120  int index );
121 
122 private:
125 
127  DtTestInteraction& operator= (DtTestInteraction const& orig);
128 
129 public:
130 
132  static const MAKRti::DtString theNameTargetFederate;
134  static const MAKRti::DtString theNameTestId;
135  static const MAKRti::DtString theNamePayload;
137 
138 protected:
139 
141  MAKRti::DtString myClassName;
143  DtPhvps *myParameters;
144 #ifdef DtIFSPEC1516
145  rti1516::ParameterHandleValueMap myValueMap;
146 #elif defined(DtIFSPEC1516E)
147  rti1516e::ParameterHandleValueMap myValueMap;
148 #endif
149 
151  DtParameterHandle myHandleTargetFederate;
156 
158  DtFederateHandle myTargetFederate;
160  MAKRti::DtU32 myTestId;
161  MAKRti::DtU32 myPayloadSize;
163 };
166 {
167 public:
168 
171 
173  virtual ~DtLatencyTestInteraction();
174 
176  virtual const DtPhvps& parameters();
177 
180  virtual bool setFromParameters(const DtPhvps& phvps);
181 
182 
183 private:
186 
189 
190 public:
191  static const MAKRti::DtString theInteractionName;
192 
193 protected:
194 
196 
197 };
198 
201 
202 
203 #endif
204 
static const MAKRti::DtString theNameTestId
Parameter name.
Definition: testInteraction.h:134
DtPhvps * myParameters
Definition: testInteraction.h:143
static const MAKRti::DtString theInteractionName
Definition: testInteraction.h:191
MAKRti::DtU32 myTestId
Parameter value.
Definition: testInteraction.h:160
DtInteractionClassHandle myClassHandle
Definition: testInteraction.h:142
DtLatencyTestInteraction holds the data needed to send a test latency interaction.
Definition: testInteraction.h:165
DtHandle DtInteractionClassHandle
Definition: internalTypes.h:35
MAKRti::DtString myClassName
Definition: testInteraction.h:141
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:153
DtHandle DtFederateHandle
Definition: internalTypes.h:29
Definition: fomMgr.h:53
virtual const DtPhvps & parameters()=0
Return the parameter handle value pair set Calling this accessor results in the encoding of member da...
MAKRti::DtU32 myPayloadSize
Parameter value.
Definition: testInteraction.h:161
void DT_DLL_LRC addTestToFom(DtFomClassMgr &fom)
Incorporate interactions into the FOM.
DtFomClassMgr * myFomMgr
Definition: testInteraction.h:140
#define DT_DLL_LRC
Definition: rtiMsConfig.h:126
The declaration of internal types.
DtHandle DtParameterHandle
Definition: internalTypes.h:38
DtParameterHandle myDataHandle
Definition: testInteraction.h:195
DtParameterHandle myHandlePayload
Parameter handle.
Definition: testInteraction.h:154
static const MAKRti::DtString theNamePayload
Parameter name.
Definition: testInteraction.h:135
DtTestInteraction holds the data needed to send a test interaction An instance of this interaction be...
Definition: testInteraction.h:33

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)