VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
physicalEntityDecoder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef physicalEntityDecoder_H_
8 #define physicalEntityDecoder_H_
9 
10 #if DtHLA
11 
12 #include "baseEntityDecoder.h"
13 #include <vlutil/vlTime.h>
14 
18 
22 struct DtNetArtParamRecord;
24 struct DtNetAttachedPart;
25 
31 
33 {
34 public:
35 
38  DtExerciseConn* exConn,
39  DtObjClassDesc* classDesc);
40 
42  virtual ~DtPhysicalEntityDecoder();
43 
46 
49 
50 public:
51 
54  static DtHlaStateDecoder* create(
55  DtExerciseConn* exConn,
56  DtObjClassDesc* classDesc);
57 
58 protected:
59 
63  void addMyDecoders();
64 
67  virtual void decode(const DtStateMsg& msg, DtStateRepository* rep) const;
68 
69 protected:
70 
72  DtDECLARE_ENTITY_ATTR_DECODER(DamageState);
73  DtDECLARE_ENTITY_ATTR_DECODER(EngineSmokeOn);
74  DtDECLARE_ENTITY_ATTR_DECODER(FlamesPresent);
75  DtDECLARE_ENTITY_ATTR_DECODER(HasFuelSupplyCap);
76  DtDECLARE_ENTITY_ATTR_DECODER(HasRecoveryCap);
77  DtDECLARE_ENTITY_ATTR_DECODER(HasRepairCap);
78  DtDECLARE_ENTITY_ATTR_DECODER(Immobilized);
80  DtDECLARE_ENTITY_ATTR_DECODER(PowerPlantOn);
81  DtDECLARE_ENTITY_ATTR_DECODER(SmokePlumePresent);
82  DtDECLARE_ENTITY_ATTR_DECODER(TentDeployed);
83 
85  DtDECLARE_ENTITY_ATTR_DECODER(ArticulatedParametersArrayPre09);
88  DtDECLARE_ENTITY_ATTR_DECODER(LifeformState);
89  DtDECLARE_ENTITY_ATTR_DECODER(LightsState);
90  DtDECLARE_ENTITY_ATTR_DECODER(RampDeployed);
91 
93  DtDECLARE_ENTITY_ATTR_DECODER(ArticulatedParametersArray);
94  DtDECLARE_ENTITY_ATTR_DECODER(TrailingEffectsCode);
95  DtDECLARE_ENTITY_ATTR_DECODER(AlternateEntityType);
96  DtDECLARE_ENTITY_ATTR_DECODER(CamouflageType);
97  DtDECLARE_ENTITY_ATTR_DECODER(FirePowerDisabled);
98  DtDECLARE_ENTITY_ATTR_DECODER(ForceIdentifier);
99  DtDECLARE_ENTITY_ATTR_DECODER(IsConcealed);
100  DtDECLARE_ENTITY_ATTR_DECODER(HasAmmunitionSupplyCap);
101 
103  DtDECLARE_ENTITY_ATTR_DECODER(AcousticSignatureIndex);
104  DtDECLARE_ENTITY_ATTR_DECODER(InfraredSignatureIndex);
105  DtDECLARE_ENTITY_ATTR_DECODER(PropulsionSystemsData);
106  DtDECLARE_ENTITY_ATTR_DECODER(RadarCrossSectionSignatureIndex);
107  DtDECLARE_ENTITY_ATTR_DECODER(VectoringNozzleSystemData);
108  DtDECLARE_ENTITY_ATTR_DECODER(LiveEntityMeasuredSpeed);
109 
111  DtDECLARE_ENTITY_ATTR_DECODER(DIGuyAction);
112  DtDECLARE_ENTITY_ATTR_DECODER(DIGuyAppearance);
115  DtDECLARE_ENTITY_ATTR_DECODER(DIGuyParent);
116 
117 
119  static void decodeAttParts(int numParams,
120  DtNetAttachedPart* netParams, DtAttachedPartCollection* attList);
121 
123  static void convertFromRPR1_0(
124  DtNetArtParamRecord* netParams,
125  DtNetArtParamRecordRPR1* netParamsRPR1,
126  int numRecords);
127 };
128 
134 #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER_WITH_CAST( \
135  attrName, netType, mutator, castExpr) \
136  DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \
137  DtPhysicalEntityDecoder, DtEntityStateRepository, \
138  attrName, netType, mutator, castExpr)
139 
140 #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER( \
141  attrName, netType, mutator) \
142  DtDEFINE_SIMPLE_ATTR_DECODER_MUTATOR( \
143  DtPhysicalEntityDecoder, DtEntityStateRepository, \
144  attrName, netType, mutator)
145 
146 #define DtDEFINE_LIGHT_ATTR_DECODER( \
147  decClass, attrName, arg1) \
148  DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST_AND_PARAM( \
149  decClass, DtEntityStateRepository, attrName, DtNetBoolean, setLightState, arg1, (bool) (DtU32))
150 
151 #endif
152 #endif
153 
A DtAttachedPartCollection is a collection of attached parts of an entity.
Definition: attachedPartCollection.h:24
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:58
Definition: netStructs.h:280
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
virtual void decode(const DtStateMsg &msg, DtStateRepository *stateRep) const
Virtual function override that sets some timestamping info, then calls down to the base class to perf...
Instances of DtBaseEntityDecoder are used to decode a base entity state message into a state reposito...
Definition: baseEntityDecoder.h:41
void addMyDecoders()
Add decoding functions for the attributes.
This file contains the declaration of DtClock and DtTime.
class DtPhysicalEntityDecoder:
Definition: physicalEntityDecoder.h:32
An instance of DtObjClassDesc is a &quot;class descriptor&quot; for an HLA Object class.
Definition: objClassDesc13.h:41
A DtArticulatedPartCollection is a collection of articulated parts typically of an entity...
Definition: articulatedPartCollection.h:29
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:36
DtHlaStateDecoder is used to provide decoding of a state message into a state repository in an HLA (a...
Definition: hlaStateDecoder.h:32
This file provides a declaration of the class DtBaseEntityDecoder.
Definition: netStructs.h:213
DtStateRepository is an abstract base class for maintaining state for an object.
Definition: stateRepository.h:50
Definition: netStructs.h:224
static DtHlaStateDecoder * create(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
Create a DtBaseEntityDecoder. Caller is responsible for deletion.
DtBaseEntityDecoder & operator=(const DtBaseEntityDecoder &orig)
assignment operator
class DtStateMsg:
Definition: stateMsgHLA.h:32
#define DtDECLARE_ENTITY_ATTR_DECODER(attrName)
This is used to declare attribute decoding functions which are members of the class.
Definition: baseEntityDecoder.h:23

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)