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 MAK Technologies, Inc
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 
53  virtual bool tick();
54 
57  virtual DtGriddedDataRepository* gridDataStateRep();
58 
60  virtual DtGriddedDataRepository* gdsr();
61 
65  virtual DtGriddedDataDecoder* decoder();
66 
69  virtual DtGriddedDataEncoder* encoder();
70 
72  virtual const DtObjectId& id() const;
73 
75  virtual const DtObjectId& localId() const;
76 
78  virtual const DtGlobalObjectDesignator& globalId() const;
79 
83  virtual void sendFinalPduOnDestruction(bool onOff);
84 
87  virtual void forceUpdate();
88 
89 public:
90 
92  static void setStateRepCreator(DtStateRepCreator creator);
93  static DtStateRepCreator stateRepCreator(void);
94 
95  static void setClassDfltTimeThreshold(DtTime threshold);
96 
97 protected:
98 
100  void sendFinalPdu();
101 
103  void init( const DtEntityIdentifier& vehId);
104 
107 
110 
111 protected:
112 
113  DtObjectId myId;
116  bool mySendFinalInDtor;
117 
118 protected:
119  static DtStateRepCreator theStateRepCreator;
120  static DtTime theClassDfltTimeThreshold;
121  static bool theClassDfltIsSetFlag;
122 };
123 
125 {
126  return gdsr();
127 }
128 
130 {
131  return static_cast<DtGriddedDataRepository*>(myStateRep);
132 }
133 
135 {
136  return myEncoder;
137 }
138 
140 {
141  return myDecoder;
142 }
143 
144 inline void DtGriddedDataPublisher::sendFinalPduOnDestruction(bool onOff)
145 {
146  mySendFinalInDtor = onOff;
147 }
148 
149 inline const DtObjectId& DtGriddedDataPublisher::id() const
150 {
151  return myId;
152 }
153 
154 inline const DtObjectId& DtGriddedDataPublisher::localId() const
155 {
156  return id();
157 }
158 
159 #endif
160 #endif
161 
DtStateRepository * myStateRep
Definition: objectPublisherHLA.h:221
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
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:223
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.
class DtGriddedDataPublisher:
Definition: griddedDataPublisherHLA.h:29
virtual bool tick()
Tick (update) this object.
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:224
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:277
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 Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)