VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rrbIffDecoder.h
Go to the documentation of this file.
1 #if DtHLA
2 
3 #ifndef DtRRBIffDecoder_H_
4 #define DtRRBIffDecoder_H_
5 
6 #include "iffDecoder.h"
8 
12 
15 
19 #define DtDECLARE_RRB_IFF_ATTR_DECODER(attrName) \
20  DtDECLARE_ATTR_DECODER(DtIffStateRepository, attrName)
21 
29 #define DtDEFINE_SIMPLE_RRB_IFF_ATTR_DECODER( \
30  attrName, netType, inspector) \
31  DtDEFINE_SIMPLE_RRB_IFF_ATTR_DECODER_WITH_CAST( \
32  attrName, netType, inspector, (netType))
33 
41 #define DtDEFINE_SIMPLE_RRB_ATTR_DECODER_WITH_CAST( \
42  decClass, stateRepClass, attrName, netType, mutator, castExpr) \
43 void decClass::decode##attrName( \
44  stateRepClass* stateRep, \
45  const RTI::AttributeHandleValuePairSet& attrs, \
46  int index) \
47 { \
48  RTI::ULong length = 0; \
49  netType* netValPtr = (netType*)attributeData(attrs, index, length, sizeof(netType), #attrName); \
50  if (netValPtr) \
51  { \
52  stateRep->rrb()->mutator(castExpr *netValPtr); \
53  } \
54 }
55 
61 #define DtDEFINE_SIMPLE_RRB_IFF_ATTR_DECODER_WITH_CAST( \
62  attrName, netType, mutator, castExpr) \
63  DtDEFINE_SIMPLE_RRB_ATTR_DECODER_WITH_CAST( \
64  DtRRBIffDecoder, DtIffStateRepository, \
65  attrName, netType, mutator, castExpr)
66 
67 
69 {
70 public:
73  DtExerciseConn* exConn,
74  DtObjClassDesc* classDesc);
75 
77  virtual ~DtRRBIffDecoder();
78 
80  DtRRBIffDecoder(const DtRRBIffDecoder& orig);
81 
84 
85 public:
86 
87  static DtHlaStateDecoder* create(
88  DtExerciseConn* exConn,
89  DtObjClassDesc* classDesc);
90 
91 protected:
92 
95  DtDECLARE_RRB_IFF_ATTR_DECODER(IsMalfunctioning);
97  DtDECLARE_RRB_IFF_ATTR_DECODER(PowerReduction);
98  DtDECLARE_RRB_IFF_ATTR_DECODER(RadarEnhancement);
99  DtDECLARE_RRB_IFF_ATTR_DECODER(PowerReductionIsOn);
100  DtDECLARE_RRB_IFF_ATTR_DECODER(RadarEnhancementIsOn);
101 };
102 
103 #endif
104 #endif
105 
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
This file provides a declaration of the class DtIffDecoder.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
static DtHlaStateDecoder * create(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
Definition: rrbIffDecoder.h:68
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
Definition: objClassDesc13.h:41
DtIffDecoder & operator=(const DtIffDecoder &orig)
assignment operator
Instances of DtRRBStateRepository are used to store state data for IFFData.RRB objects.
Definition: iffRRBStateRepository.h:29
DtHlaStateDecoder is used to provide decoding of a state message into a state repository in an HLA (a...
Definition: hlaStateDecoder.h:34
#define DtDECLARE_RRB_IFF_ATTR_DECODER(attrName)
We define several macros that can be helpful in defining the class, and the individual decoding funct...
Definition: rrbIffDecoder.h:19
The DtIffDecoder class:
Definition: iffDecoder.h:63

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)