VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rrbIffEncoder.h
Go to the documentation of this file.
1 #if DtHLA
2 
3 #ifndef DtRRBIffEncoder_H_
4 #define DtRRBIffEncoder_H_
5 
6 #include "iffEncoder.h"
7 
11 
13 
17 #define DtDECLARE_RRB_IFF_ATTR_ENCODER(attrName) \
18  DtDECLARE_ATTR_ENCODER(DtIffStateRepository, attrName)
19 
20 #define DtDECLARE_RRB_IFF_ATTR_CHECKER(attrName) \
21  DtDECLARE_ATTR_CHECKER(DtIffStateRepository, attrName)
22 
28 #define DtDEFINE_SIMPLE_RRB_ATTR_CHECKER( \
29  encClass, stateRepClass, attrName, inspector) \
30 bool encClass::need##attrName(const stateRepClass& stateRep, \
31  const stateRepClass& asSeenByRemote) \
32 { \
33  return (bool) !(stateRep.rrb()->inspector() == asSeenByRemote.rrb()->inspector()); \
34 }
35 
41 #define DtDEFINE_SIMPLE_RRB_IFF_ATTR_CHECKER( \
42  attrName, inspector) \
43  DtDEFINE_SIMPLE_RRB_ATTR_CHECKER(DtRRBIffEncoder, \
44  DtIffStateRepository, attrName, inspector)
45 
51 #define DtDEFINE_SIMPLE_RRB_ATTR_ENCODER( \
52  encClass, stateRepClass, attrName, netType, inspector) \
53 void encClass::encode##attrName(const stateRepClass& rep, \
54  RTI::AttributeHandleValuePairSet* attrs, \
55  RTI::AttributeHandle attrHandle) \
56 { \
57  netType netVal; \
58  netVal = rep.rrb()->inspector(); \
59  attrs->add(attrHandle, (char*) &netVal, sizeof(netType)); \
60 }
61 
67 #define DtDEFINE_SIMPLE_RRB_IFF_ATTR_ENCODER( \
68  attrName, netType, mutator) \
69  DtDEFINE_SIMPLE_RRB_ATTR_ENCODER( \
70  DtRRBIffEncoder, DtIffStateRepository, \
71  attrName, netType, mutator)
72 
73 
75 {
76 public:
79  DtExerciseConn* exConn,
80  DtObjClassDesc* classDesc);
81 
83  virtual ~DtRRBIffEncoder();
84 
86  DtRRBIffEncoder(const DtRRBIffEncoder& orig);
87 
90 
91 public:
92 
93  static DtHlaStateEncoder* create(
94  DtExerciseConn* exConn,
95  DtObjClassDesc* classDesc);
96 
97 protected:
98 
101  DtDECLARE_RRB_IFF_ATTR_CHECKER(IsMalfunctioning);
103  DtDECLARE_RRB_IFF_ATTR_CHECKER(PowerReduction);
104  DtDECLARE_RRB_IFF_ATTR_CHECKER(RadarEnhancement);
105  /*
106  DtDECLARE_RRB_IFF_ATTR_CHECKER(PowerReductionIsOn);
107  DtDECLARE_RRB_IFF_ATTR_CHECKER(RadarEnhancementIsOn);
108  */
111  DtDECLARE_RRB_IFF_ATTR_ENCODER(IsMalfunctioning);
113  DtDECLARE_RRB_IFF_ATTR_ENCODER(PowerReduction);
114  DtDECLARE_RRB_IFF_ATTR_ENCODER(RadarEnhancement);
115  /*
116  DtDECLARE_RRB_IFF_ATTR_ENCODER(PowerReductionIsOn);
117  DtDECLARE_RRB_IFF_ATTR_ENCODER(RadarEnhancementIsOn);
118  */
119 };
120 
121 #endif
122 #endif
123 
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
This file provides a declaration of the class DtIffEncoder.
#define DtDECLARE_RRB_IFF_ATTR_ENCODER(attrName)
This one can be used to declare the attribute decoding functions, which are static members of DtNatoI...
Definition: rrbIffEncoder.h:17
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 DtRRBStateRepository are used to store state data for IFFData.RRB objects.
Definition: iffRRBStateRepository.h:29
The DtIffEncoder class:
Definition: iffEncoder.h:69
#define DtDECLARE_RRB_IFF_ATTR_CHECKER(attrName)
Definition: rrbIffEncoder.h:20
static DtHlaStateEncoder * create(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
DtIffEncoder & operator=(const DtIffEncoder &orig)
assignment operator
Definition: rrbIffEncoder.h:74

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)