VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pointObjectPublisherDIS.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 DtPointObjectRepository* (*DtStateRepCreator)();
27 
28 public:
29 
32  const DtObjectId& id = DtObjectId::defaultId() );
33 
36  DtExerciseConn* conn, const DtObjectId& id = DtObjectId::defaultId() );
37 
40  DtExerciseConn* conn, const DtObjectId& id = DtObjectId::defaultId() );
41 
43  virtual ~DtPointObjectPublisher();
44 
48  virtual void tick();
49 
52  virtual inline DtPointObjectRepository* pointObjectStateRep();
53 
55  virtual inline DtPointObjectRepository* posr();
56 
59  virtual inline DtPointObjectDecoder* decoder() { return myDecoder; }
60 
63  virtual inline DtPointObjectEncoder* encoder() { return myEncoder; }
64 
66  virtual const DtObjectId& id() const;
67 
69  virtual inline const DtObjectId& localId() const { return id(); }
70 
72  virtual inline const DtGlobalObjectDesignator& globalId() const { return id(); }
73 
76  virtual inline void sendFinalPduOnDestruction( bool onOff );
77 
80  virtual inline void forceUpdate();
81 
83  virtual void setLocThreshold( double val );
84  virtual double locThreshold() const;
85 
87  virtual void setOriThreshold( double val );
88  virtual double oriThreshold() const;
89 
91  static inline void setDfltLocThreshold( double val );
92  static inline double dfltLocThreshold();
93 
95  static inline void setDfltOriThreshold( double val );
96  static inline double dfltOriThreshold();
97 
99  static void setStateRepCreator( DtStateRepCreator creator );
100  static DtStateRepCreator stateRepCreator();
101 
102  static void setClassDfltTimeThreshold( DtTime threshold );
103 
104 protected:
105 
107  void init( const DtObjectId& );
108 
110  void sendFinalPdu();
111 
112 private:
113 
116 
119 
120 protected:
121 
122  static DtStateRepCreator theStateRepCreator;
123 
124  static double theDfltLocThreshold;
125  static double theDfltOriThreshold;
126  static DtTime theClassDfltTimeThreshold;
127  static bool theClassDfltIsSetFlag;
128 
131  bool myStateRepPassedFlag;
132  bool mySendFinalInDtor;
133 
134 };
135 
137 {
138  return posr();
139 }
140 
142 {
143  return static_cast<DtPointObjectRepository*>(myStateRep);
144 }
145 
147 {
148  myEncoder->setSendNeeded();
149 }
150 
151 inline void DtPointObjectPublisher::sendFinalPduOnDestruction( bool onOff )
152 {
153  mySendFinalInDtor = onOff;
154 }
155 
156 inline void DtPointObjectPublisher::setDfltLocThreshold( double val )
157 {
158  theDfltLocThreshold = val;
159 }
160 
161 inline double DtPointObjectPublisher::dfltLocThreshold()
162 {
163  return theDfltLocThreshold;
164 }
165 
166 inline void DtPointObjectPublisher::setDfltOriThreshold( double val )
167 {
168  theDfltOriThreshold = val;
169 }
170 
171 inline double DtPointObjectPublisher::dfltOriThreshold()
172 {
173  return theDfltOriThreshold;
174 }
175 
176 #endif // DtDIS

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)