VR-Link API Documentation for DIS
dDesignatrPub.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 
9 
10 #ifndef DtDisDesignatorPublisher_H_
11 #define DtDisDesignatorPublisher_H_
12 
13 #if DtDIS
14 
15 
16 #include "dObjPub.h"
17 #include "pdu.h"
18 #include "designatorSR.h"
19 #include "dDesignatrDec.h"
20 #include "dDesignatrEnc.h"
21 #include <vlutil/vlPrint.h>
22 
23 
25 {
26 public:
27 
29  typedef DtDesignatorRepository* (*DtStateRepCreator)();
30 
31 public:
32 
35  DtDesignatorRepository *stateRepToUse,
36  DtExerciseConn* conn,
37  const DtObjectId& entityId = DtObjectId::defaultId());
38 
41  const DtObjectId &entityId = DtObjectId::defaultId());
42 
44  virtual ~DtDesignatorPublisher();
45 
46 public:
50  virtual void tick();
51 
54  virtual inline DtDesignatorRepository* designatorStateRep();
55 
57  virtual inline DtDesignatorRepository* dsr();
58 
61  virtual inline DtDesignatorDecoder* decoder() { return myDecoder; }
62 
65  virtual inline DtDesignatorEncoder* encoder() { return myEncoder; }
66 
68  virtual const DtObjectId& id() const;
69 
71  virtual inline const DtObjectId& localId() const { return id(); }
72 
74  virtual inline const DtGlobalObjectDesignator& globalId() const { return id(); }
75 
78  virtual inline void sendFinalPduOnDestruction( bool onOff );
79 
82  virtual inline void forceUpdate();
83 
85  virtual void setRelPosThreshold( double val );
86  virtual double relPosThreshold() const;
87 
89  virtual void setAbsPosThreshold( double val );
90  virtual double absPosThreshold() const;
91 
93  virtual void setAccelThreshold( double val );
94  virtual double accelThreshold() const;
95 
96 public:
97 
99  static inline void setDfltRelPosThreshold( double val );
100  static inline double dfltRelPosThreshold();
101 
103  static inline void setDfltAbsPosThreshold( double val );
104  static inline double dfltAbsPosThreshold();
105 
107  static inline void setDfltAccelThreshold( double val );
108  static inline double dfltAccelThreshold();
109 
111  static void setStateRepCreator(DtStateRepCreator creator);
112  static DtStateRepCreator stateRepCreator(void);
113 
114  static void setClassDfltTimeThreshold(DtTime threshold);
115 
116 protected:
117 
119  void init( const DtObjectId&);
120 
122  void sendFinalPdu();
123 
126 
129 
130 protected:
135 
136 protected:
137 
138  static double theDfltRelPosThreshold;
139  static double theDfltAbsPosThreshold;
140  static double theDfltAccelThreshold;
141  static DtStateRepCreator theStateRepCreator;
144 };
145 
147 {
148  return dsr();
149 }
150 
152 {
153  return static_cast<DtDesignatorRepository*>(myStateRep);
154 }
155 
157 {
159 }
160 
162 {
163  mySendFinalInDtor = onOff;
164 }
165 
167 {
168  theDfltRelPosThreshold = val;
169 }
170 
172 {
173  return theDfltRelPosThreshold;
174 }
175 
177 {
178  theDfltAbsPosThreshold = val;
179 }
180 
182 {
183  return theDfltAbsPosThreshold;
184 }
185 
187 {
188  theDfltAccelThreshold = val;
189 }
190 
192 {
193  return theDfltAccelThreshold;
194 }
195 
196 
197 #endif
198 #endif
199 

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)