VR-Link API Documentation for HLA 1.3
dGridDataPub.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 dGridDataPub_H_
14 #define dGridDataPub_H_
15 
16 
17 #include "pdu.h"
18 #include "dObjPub.h"
19 #include "gridDataSR.h"
20 #include "dGridDataEnc.h"
21 #include "dGridDataDec.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 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)