VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
physicalEntityEncoder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef physicalEntityEncoder_H_
8 #define physicalEntityEncoder_H_
9 
10 #if DtHLA
11 
12 #include "baseEntityEncoder.h"
13 #include "entityStateRepository.h"
14 
18 
24 
26 {
27 public:
28 
31  DtExerciseConn* exConn,
32  DtObjClassDesc* classDesc);
33 
35  virtual ~DtPhysicalEntityEncoder();
36 
39 
42 
43 public:
44 
47  static DtHlaStateEncoder* create(
48  DtExerciseConn* exConn,
49  DtObjClassDesc* classDesc);
50 
51 protected:
52 
54  DtDECLARE_ENTITY_ATTR_CHECKER(ArticulatedParametersArray);
55  DtDECLARE_ENTITY_ATTR_CHECKER(DamageState);
56  DtDECLARE_ENTITY_ATTR_CHECKER(EngineSmokeOn);
57  DtDECLARE_ENTITY_ATTR_CHECKER(FlamesPresent);
58  DtDECLARE_ENTITY_ATTR_CHECKER(HasFuelSupplyCap);
59  DtDECLARE_ENTITY_ATTR_CHECKER(HasRecoveryCap);
60  DtDECLARE_ENTITY_ATTR_CHECKER(HasRepairCap);
61  DtDECLARE_ENTITY_ATTR_CHECKER(Immobilized);
63  DtDECLARE_ENTITY_ATTR_CHECKER(PowerPlantOn);
64  DtDECLARE_ENTITY_ATTR_CHECKER(SmokePlumePresent);
65  DtDECLARE_ENTITY_ATTR_CHECKER(TentDeployed);
66 
69  DtDECLARE_ENTITY_ATTR_CHECKER(LifeformState);
70  DtDECLARE_ENTITY_ATTR_CHECKER(LightsState);
71  DtDECLARE_ENTITY_ATTR_CHECKER(RampDeployed);
73 
75  DtDECLARE_ENTITY_ATTR_CHECKER(AlternateEntityType);
76  DtDECLARE_ENTITY_ATTR_CHECKER(CamouflageType);
77  DtDECLARE_ENTITY_ATTR_CHECKER(FirePowerDisabled);
78  DtDECLARE_ENTITY_ATTR_CHECKER(ForceIdentifier);
79  DtDECLARE_ENTITY_ATTR_CHECKER(HasAmmunitionSupplyCap);
80  DtDECLARE_ENTITY_ATTR_CHECKER(IsConcealed);
81  DtDECLARE_ENTITY_ATTR_CHECKER(TrailingEffectsCode);
82 
84  DtDECLARE_ENTITY_ATTR_CHECKER(AcousticSignatureIndex);
85  DtDECLARE_ENTITY_ATTR_CHECKER(InfraredSignatureIndex);
86  DtDECLARE_ENTITY_ATTR_CHECKER(PropulsionSystemsData);
87  DtDECLARE_ENTITY_ATTR_CHECKER(RadarCrossSectionSignatureIndex);
88  DtDECLARE_ENTITY_ATTR_CHECKER(VectoringNozzleSystemData);
89 
91  DtDECLARE_ENTITY_ATTR_CHECKER(LiveEntityMeasuredSpeed);
92 
94  DtDECLARE_ENTITY_ATTR_ENCODER(DamageState);
95  DtDECLARE_ENTITY_ATTR_ENCODER(EngineSmokeOn);
96  DtDECLARE_ENTITY_ATTR_ENCODER(FlamesPresent);
97  DtDECLARE_ENTITY_ATTR_ENCODER(HasFuelSupplyCap);
98  DtDECLARE_ENTITY_ATTR_ENCODER(HasRecoveryCap);
99  DtDECLARE_ENTITY_ATTR_ENCODER(HasRepairCap);
100  DtDECLARE_ENTITY_ATTR_ENCODER(Immobilized);
102  DtDECLARE_ENTITY_ATTR_ENCODER(PowerPlantOn);
103  DtDECLARE_ENTITY_ATTR_ENCODER(SmokePlumePresent);
104  DtDECLARE_ENTITY_ATTR_ENCODER(TentDeployed);
105 
107  static void encodeArticulatedParametersArrayPre09(
108  const DtEntityStateRepository& stateRep,
109  RTI::AttributeHandleValuePairSet* avList,
110  RTI::AttributeHandle attrHandle);
111 
112  DtDECLARE_ENTITY_ATTR_ENCODER(HatchState);
113  DtDECLARE_ENTITY_ATTR_ENCODER(LifeformState);
114  DtDECLARE_ENTITY_ATTR_ENCODER(LightsState);
115  DtDECLARE_ENTITY_ATTR_ENCODER(RampDeployed);
116  DtDECLARE_ENTITY_ATTR_ENCODER(TrailState);
117 
119  DtDECLARE_ENTITY_ATTR_ENCODER(ArticulatedParametersArray);
120  DtDECLARE_ENTITY_ATTR_ENCODER(AlternateEntityType);
121  DtDECLARE_ENTITY_ATTR_ENCODER(CamouflageType);
122  DtDECLARE_ENTITY_ATTR_ENCODER(FirePowerDisabled);
123  DtDECLARE_ENTITY_ATTR_ENCODER(ForceIdentifier);
124  DtDECLARE_ENTITY_ATTR_ENCODER(HasAmmunitionSupplyCap);
125  DtDECLARE_ENTITY_ATTR_ENCODER(IsConcealed);
126  DtDECLARE_ENTITY_ATTR_ENCODER(TrailingEffectsCode);
127 
129  DtDECLARE_ENTITY_ATTR_ENCODER(AcousticSignatureIndex);
130  DtDECLARE_ENTITY_ATTR_ENCODER(InfraredSignatureIndex);
131  DtDECLARE_ENTITY_ATTR_ENCODER(PropulsionSystemsData);
132  DtDECLARE_ENTITY_ATTR_ENCODER(RadarCrossSectionSignatureIndex);
133  DtDECLARE_ENTITY_ATTR_ENCODER(VectoringNozzleSystemData);
134  DtDECLARE_ENTITY_ATTR_ENCODER(LiveEntityMeasuredSpeed);
135 
137  DtDECLARE_ENTITY_ATTR_CHECKER(DIGuyAction);
138  DtDECLARE_ENTITY_ATTR_ENCODER(DIGuyAction);
139  DtDECLARE_ENTITY_ATTR_CHECKER(DIGuyAppearance);
140  DtDECLARE_ENTITY_ATTR_ENCODER(DIGuyAppearance);
145  DtDECLARE_ENTITY_ATTR_CHECKER(DIGuyParent);
146  DtDECLARE_ENTITY_ATTR_ENCODER(DIGuyParent);
147 
151  DtDECLARE_ENTITY_ATTR_CHECKER(SourceUnit);
154  DtDECLARE_ENTITY_ATTR_CHECKER(EmbeddedUnitList);
156  DtDECLARE_ENTITY_ATTR_CHECKER(Destination);
158 
159 
163  DtDECLARE_ENTITY_ATTR_ENCODER(SourceUnit);
166  DtDECLARE_ENTITY_ATTR_ENCODER(EmbeddedUnitList);
168  DtDECLARE_ENTITY_ATTR_ENCODER(Destination);
170 
171 
172 
173 protected:
174 
176  static void convertToRPR1_0(
177  DtNetArtParamRecord* netParams,
178  DtNetArtParamRecordRPR1* netParamsRPR1,
179  int numRecords);
180 
181  static void encodeAttachedParts(
182  const DtAttachedPartCollection& parts, DtNetAttachedPart* netParams );
183 
186  static void setArticulatedPartDeadReckoningEnabled(bool enable);
187  static bool articulatedPartDeadReckoningEnabled();
188 
189 protected:
191 };
192 
198 #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_ENCODER( \
199  attrName, netType, inspector) \
200  DtDEFINE_SIMPLE_ATTR_ENCODER(DtPhysicalEntityEncoder, \
201  DtEntityStateRepository, \
202  attrName, netType, inspector)
203 
209 #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_CHECKER( \
210  attrName, inspector) \
211  DtDEFINE_SIMPLE_ATTR_CHECKER(DtPhysicalEntityEncoder, \
212  DtEntityStateRepository, \
213  attrName, inspector)
214 
218 #define DtDEFINE_LIGHT_ATTR_CHECKER( \
219  encClass, attrName, arg1) \
220 bool encClass::need##attrName( \
221  const DtEntityStateRepository& stateRep, \
222  const DtEntityStateRepository& asSeenByRemote) \
223 { \
224  return (bool) (stateRep.lightState(arg1) != asSeenByRemote.lightState(arg1)); \
225 }
226 
227 #define DtDEFINE_LIGHT_ATTR_ENCODER( \
228  encClass, attrName, arg1) \
229 void encClass::encode##attrName( \
230  const DtEntityStateRepository& rep, \
231  RTI::AttributeHandleValuePairSet* attrs, \
232  RTI::AttributeHandle attrHandle) \
233 { \
234  DtNetBoolean netVal; \
235  netVal = rep.lightState(arg1); \
236  attrs->add(attrHandle, (char*) &netVal, sizeof(DtNetBoolean)); \
237 }
238 #endif
239 #endif
240 
A DtAttachedPartCollection is a collection of attached parts of an entity.
Definition: attachedPartCollection.h:24
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
Definition: netStructs.h:534
#define DtDECLARE_ENTITY_ATTR_ENCODER(attrName)
This is used to declare attribute encoding functions which are members of the class.
Definition: baseEntityEncoder.h:29
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
class DtBaseEntityEncoder:
Definition: baseEntityEncoder.h:58
DtHlaStateEncoder is used to provide encoding of a state repository into a state message in an HLA (a...
Definition: hlaStateEncoder.h:30
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
Definition: objClassDesc13.h:41
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
DtBaseEntityEncoder & operator=(const DtBaseEntityEncoder &orig)
assignment operator
This file provides a declaration of the class DtBaseEntityEncoder.
Definition: netStructs.h:467
static bool theAreArticulatedPartsDeadReckoned
Definition: physicalEntityEncoder.h:190
Contains the DtEntityStateRepository class declaration.
Definition: netStructs.h:478
static DtHlaStateEncoder * create(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
Create a DtBaseEntityEncoder. Caller is responsible for deletion.
#define DtDECLARE_ENTITY_ATTR_CHECKER(attrName)
This is used to declare static member functions for determining whether or not an attribute needs to ...
Definition: baseEntityEncoder.h:24
class DtPhysicalEntityEncoder:
Definition: physicalEntityEncoder.h:25

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)