VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
griddedDataPublisherDIS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #if DtDIS
8 
9 
12 
13 #ifndef griddedDataPublisherDIS_H_
14 #define griddedDataPublisherDIS_H_
15 
16 
17 #include "pdu.h"
18 #include "objectPublisherDIS.h"
19 #include "griddedDataRepository.h"
20 #include "griddedDataEncoderDIS.h"
21 #include "griddedDataDecoderDIS.h"
22 #include <vlutil/vlPrint.h>
23 
24 
26 {
27 public:
28 
30  typedef DtGriddedDataRepository* (*DtStateRepCreator)();
31 
32 public:
33 
34 
37  DtGriddedDataRepository *stateRepToUse,
38  DtExerciseConn* conn,
39  const DtObjectId& id = DtObjectId::defaultId());
40 
43  DtExerciseConn* conn,
44  const DtObjectId& id = DtObjectId::defaultId());
45 
47  virtual ~DtGriddedDataPublisher();
48 
52  virtual void tick();
53 
56  virtual DtGriddedDataRepository* gridDataStateRep();
57 
59  virtual DtGriddedDataRepository* gdsr();
60 
64  virtual DtGriddedDataDecoder* decoder();
65 
68  virtual DtGriddedDataEncoder* encoder();
69 
71  virtual const DtObjectId& id() const;
72 
74  virtual const DtObjectId& localId() const;
75 
77  virtual const DtGlobalObjectDesignator& globalId() const;
78 
82  virtual void sendFinalPduOnDestruction(bool onOff);
83 
86  virtual void forceUpdate();
87 
88 public:
89 
91  static void setStateRepCreator(DtStateRepCreator creator);
92  static DtStateRepCreator stateRepCreator(void);
93 
94  static void setClassDfltTimeThreshold(DtTime threshold);
95 
96 protected:
97 
99  void sendFinalPdu();
100 
102  void init( const DtEntityIdentifier& vehId);
103 
106 
109 
110 protected:
111 
112  DtObjectId myId;
115  bool mySendFinalInDtor;
116 
117 protected:
118  static DtStateRepCreator theStateRepCreator;
119  static DtTime theClassDfltTimeThreshold;
120  static bool theClassDfltIsSetFlag;
121 };
122 
124 {
125  return gdsr();
126 }
127 
129 {
130  return static_cast<DtGriddedDataRepository*>(myStateRep);
131 }
132 
134 {
135  return myEncoder;
136 }
137 
139 {
140  return myDecoder;
141 }
142 
143 inline void DtGriddedDataPublisher::sendFinalPduOnDestruction(bool onOff)
144 {
145  mySendFinalInDtor = onOff;
146 }
147 
148 inline const DtObjectId& DtGriddedDataPublisher::id() const
149 {
150  return myId;
151 }
152 
153 inline const DtObjectId& DtGriddedDataPublisher::localId() const
154 {
155  return id();
156 }
157 
158 #endif
159 #endif
160 
DtStateRepository * myStateRep
Definition: objectPublisherHLA.h:202
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:58
virtual DtHlaStateEncoder * encoder()
Returns a pointer to the Encoder being used to encode current state into an outgoing message...
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
static const DtObjectId & defaultId()
virtual DtGriddedDataRepository * gridDataStateRep()
Returns a pointer to the DtGriddedDataRepository - through which you can set or inspect current state...
Definition: griddedDataPublisherHLA.h:97
DtHlaStateEncoder * myEncoder
Definition: objectPublisherHLA.h:204
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
Definition: objectPublisherHLA.h:34
Functions in vlPrint.h provide an error and print facility for vrlink.
virtual void tick()
Tick (update) this object.
class DtGriddedDataPublisher:
Definition: griddedDataPublisherHLA.h:29
virtual const DtGlobalObjectDesignator & globalId() const
Get the HLA object&#39;s global object designator - the object name in RTI1.3.3, but the objectId in RTI1...
virtual void forceUpdate()
Specify a set of attributes that should be included in the ahvps the next time tick is called...
DtHlaStateDecoder * myDecoder
Definition: objectPublisherHLA.h:205
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
This class declares the DIS version of DtObjectPublisher.
DtObjectId instances are used to represent RTI::ObjectInstances in VR-Link.
Definition: objectId.h:38
class DtGriddedDataDecoder:
Definition: griddedDataDecoderHLA.h:35
virtual DtGriddedDataRepository * gdsr()
Synonym for gridDataStateRep().
Definition: griddedDataPublisherHLA.h:102
class DtGriddedDataEncoder
Definition: griddedDataEncoderHLA.h:41
Instances of DtString are used to represent strings.
Definition: vlString.h:29
virtual const DtObjectId & id() const
Get the object&#39;s local identifier.
void init(RTI::ObjectClassHandle hand, DtStateRepository *stateRep, DtStateRepository *asSeenByRemote, DtHlaStateEncoder *encoder=0, DtHlaStateDecoder *decoder=0)
virtual const DtObjectId & localId() const
Get the object&#39;s local identifier.
Definition: objectPublisherHLA.h:247
Instances of DtGriddedDataRepository are used to communicate environmental data defined on a grid...
Definition: griddedDataRepository.h:23
virtual DtHlaStateDecoder * decoder()
Returns a pointer to the Decoder being used to decode state messages that we send back into the asSee...

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)