VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
designatorPublisherDIS.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtDIS
13 
14 #include <vl/pdu.h>
15 #include <vl/objectPublisherDIS.h>
19 #include <vlutil/vlPrint.h>
20 
22 {
23 public:
24 
26  typedef DtDesignatorRepository* (*DtStateRepCreator)();
27 
28 public:
29 
32  const DtObjectId& entityId = DtObjectId::defaultId() );
33 
36  DtExerciseConn* conn, const DtObjectId& entityId = DtObjectId::defaultId() );
37 
39  virtual ~DtDesignatorPublisher();
40 
44  virtual void tick();
45 
48  virtual inline DtDesignatorRepository* designatorStateRep();
49 
51  virtual inline DtDesignatorRepository* dsr();
52 
55  virtual inline DtDesignatorDecoder* decoder() { return myDecoder; }
56 
59  virtual inline DtDesignatorEncoder* encoder() { return myEncoder; }
60 
62  virtual const DtObjectId& id() const;
63 
65  virtual inline const DtObjectId& localId() const { return id(); }
66 
68  virtual inline const DtGlobalObjectDesignator& globalId() const { return id(); }
69 
72  virtual inline void sendFinalPduOnDestruction( bool onOff );
73 
76  virtual inline void forceUpdate();
77 
79  virtual void setRelPosThreshold( double val );
80  virtual double relPosThreshold() const;
81 
83  virtual void setAbsPosThreshold( double val );
84  virtual double absPosThreshold() const;
85 
87  virtual void setAccelThreshold( double val );
88  virtual double accelThreshold() const;
89 
91  static inline void setDfltRelPosThreshold( double val );
92  static inline double dfltRelPosThreshold();
93 
95  static inline void setDfltAbsPosThreshold( double val );
96  static inline double dfltAbsPosThreshold();
97 
99  static inline void setDfltAccelThreshold( double val );
100  static inline double dfltAccelThreshold();
101 
103  static void setStateRepCreator(DtStateRepCreator creator);
104  static DtStateRepCreator stateRepCreator(void);
105 
106  static void setClassDfltTimeThreshold(DtTime threshold);
107 
108 protected:
109 
111  void init( const DtObjectId& );
112 
114  void sendFinalPdu();
115 
116 private:
117 
120 
123 
124 protected:
125 
126  static DtStateRepCreator theStateRepCreator;
127 
128  static double theDfltRelPosThreshold;
129  static double theDfltAbsPosThreshold;
130  static double theDfltAccelThreshold;
131  static DtTime theClassDfltTimeThreshold;
132  static bool theClassDfltIsSetFlag;
133 
136  bool mySendFinalInDtor;
137 
138 };
139 
140 
142 {
143  return dsr();
144 }
145 
147 {
148  return static_cast<DtDesignatorRepository*>(myStateRep);
149 }
150 
152 {
153  myEncoder->setSendNeeded();
154 }
155 
156 inline void DtDesignatorPublisher::sendFinalPduOnDestruction( bool onOff )
157 {
158  mySendFinalInDtor = onOff;
159 }
160 
161 inline void DtDesignatorPublisher::setDfltRelPosThreshold( double val )
162 {
163  theDfltRelPosThreshold = val;
164 }
165 
166 inline double DtDesignatorPublisher::dfltRelPosThreshold()
167 {
168  return theDfltRelPosThreshold;
169 }
170 
171 inline void DtDesignatorPublisher::setDfltAbsPosThreshold( double val )
172 {
173  theDfltAbsPosThreshold = val;
174 }
175 
176 inline double DtDesignatorPublisher::dfltAbsPosThreshold()
177 {
178  return theDfltAbsPosThreshold;
179 }
180 
181 inline void DtDesignatorPublisher::setDfltAccelThreshold( double val )
182 {
183  theDfltAccelThreshold = val;
184 }
185 
186 inline double DtDesignatorPublisher::dfltAccelThreshold()
187 {
188  return theDfltAccelThreshold;
189 }
190 
191 #endif // DtDIS

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)