7 #ifndef DtBaseEntityDecoder_H_
8 #define DtBaseEntityDecoder_H_
23 #define DtDECLARE_ENTITY_ATTR_DECODER(attrName) \
24 DtDECLARE_ATTR_DECODER(DtEntityStateRepository, attrName)
28 #define DtDECLARE_AGGREGATE_ATTR_DECODER(attrName) \
29 DtDECLARE_ATTR_DECODER(DtAggregateStateRepository, attrName)
33 #define DtDECLARE_BASE_ENTITY_ATTR_DECODER(attrName) \
34 DtDECLARE_ATTR_DECODER(DtBaseEntityStateRepository, attrName)
41 class DT_DLL_VL DtBaseEntityDecoder :
public DtHlaStateDecoder
48 DtObjClassDesc* classDesc);
51 virtual ~DtBaseEntityDecoder();
54 DtBaseEntityDecoder(
const DtBaseEntityDecoder& orig);
57 DtBaseEntityDecoder& operator=(
const DtBaseEntityDecoder& orig);
60 virtual DtHlaStateDecoder* clone()
const;
66 virtual DtHlaStateDecoder* clone(DtObjClassDesc* classDesc)
const;
69 static DtHlaStateDecoder* create(
86 DtDECLARE_BASE_ENTITY_ATTR_DECODER(Spatial);
87 DtDECLARE_BASE_ENTITY_ATTR_DECODER(RelativeSpatial);
88 DtDECLARE_BASE_ENTITY_ATTR_DECODER(IsPartOf);
91 DtDECLARE_BASE_ENTITY_ATTR_DECODER(IsPartOf_RPR_20014);
94 DtDECLARE_BASE_ENTITY_ATTR_DECODER(AccelerationVector);
95 DtDECLARE_BASE_ENTITY_ATTR_DECODER(AngularVelocityVector);
96 DtDECLARE_BASE_ENTITY_ATTR_DECODER(EntityType);
97 DtDECLARE_BASE_ENTITY_ATTR_DECODER(IsFrozen);
98 DtDECLARE_BASE_ENTITY_ATTR_DECODER(Orientation);
99 DtDECLARE_BASE_ENTITY_ATTR_DECODER(VelocityVector);
102 DtDECLARE_BASE_ENTITY_ATTR_DECODER(DRAlgorithm);
103 DtDECLARE_BASE_ENTITY_ATTR_DECODER(Position);
104 DtDECLARE_BASE_ENTITY_ATTR_DECODER(EntityID);
107 DtDECLARE_BASE_ENTITY_ATTR_DECODER(DeadReckoningAlgorithm);
108 DtDECLARE_BASE_ENTITY_ATTR_DECODER(WorldLocation);
109 DtDECLARE_BASE_ENTITY_ATTR_DECODER(EntityIdentifier);
117 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER_WITH_CAST( \
118 attrName, netType, mutator, castExpr) \
119 DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \
120 DtBaseEntityDecoder, DtBaseEntityStateRepository, \
121 attrName, netType, mutator, castExpr)
123 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER( \
124 attrName, netType, inspector) \
125 DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER_WITH_CAST( \
126 attrName, netType, inspector, (netType))
134 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER_MUTATOR_WITH_TIME( \
135 attrName, netType, mutator) \
136 void DtBaseEntityDecoder::decode##attrName( \
137 DtBaseEntityStateRepository* stateRep, \
138 const RTI::AttributeHandleValuePairSet& attrs, \
141 RTI::ULong length = attrs.getValueLength(index); \
142 if (length < sizeof(netType)) \
144 DtWarn("Cannot decode attribute %s.\n" \
145 "Size of data (%d) is smaller than size of %s (%d).\n", \
146 #attrName, length, #netType, sizeof(netType)); \
149 else if (length > sizeof(netType) && DtNotifyLevel >= DtNlVerbose) \
151 DtVerbose("When decoding attribute %s,\n" \
152 "found size of data (%d) is larger than size of %s (%d).\n", \
153 #attrName, length, #netType, sizeof(netType)); \
157 attrs.getValue(index, (char*) &netVal, length); \
158 stateRep->mutator(netVal, stateRep->timeForSets()); \
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
Instances of DtBaseEntityStateRepository are used to maintain basic state information needed by all k...
Definition: baseEntityStateRepository.h:36
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
DtStateRepository is an abstract base class for maintaining state for an object.
Definition: stateRepository.h:50
Instances of DtStateMsg are used to represent state data communicated via the network in a DIS (as op...
Definition: stateMsgDIS.h:21
This file contains the declaration of DtHlaStateDecoder.