VR-Link API Documentation for HLA 4
 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) 1992-2025 MAK Technologies, Inc
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 
45  virtual bool tick();
46 
49  virtual inline DtDesignatorRepository* designatorStateRep();
50 
52  virtual inline DtDesignatorRepository* dsr();
53 
56  virtual inline DtDesignatorDecoder* decoder() { return myDecoder; }
57 
60  virtual inline DtDesignatorEncoder* encoder() { return myEncoder; }
61 
63  virtual const DtObjectId& id() const;
64 
66  virtual inline const DtObjectId& localId() const { return id(); }
67 
69  virtual inline const DtGlobalObjectDesignator& globalId() const { return id(); }
70 
73  virtual inline void sendFinalPduOnDestruction( bool onOff );
74 
77  virtual inline void forceUpdate();
78 
80  virtual void setRelPosThreshold( double val );
81  virtual double relPosThreshold() const;
82 
84  virtual void setAbsPosThreshold( double val );
85  virtual double absPosThreshold() const;
86 
88  virtual void setAccelThreshold( double val );
89  virtual double accelThreshold() const;
90 
92  static inline void setDfltRelPosThreshold( double val );
93  static inline double dfltRelPosThreshold();
94 
96  static inline void setDfltAbsPosThreshold( double val );
97  static inline double dfltAbsPosThreshold();
98 
100  static inline void setDfltAccelThreshold( double val );
101  static inline double dfltAccelThreshold();
102 
104  static void setStateRepCreator(DtStateRepCreator creator);
105  static DtStateRepCreator stateRepCreator(void);
106 
107  static void setClassDfltTimeThreshold(DtTime threshold);
108 
109 protected:
110 
112  void init( const DtObjectId& );
113 
115  void sendFinalPdu();
116 
117 private:
118 
121 
124 
125 protected:
126 
127  static DtStateRepCreator theStateRepCreator;
128 
129  static double theDfltRelPosThreshold;
130  static double theDfltAbsPosThreshold;
131  static double theDfltAccelThreshold;
132  static DtTime theClassDfltTimeThreshold;
133  static bool theClassDfltIsSetFlag;
134 
137  bool mySendFinalInDtor;
138 
139 };
140 
141 
143 {
144  return dsr();
145 }
146 
148 {
149  return static_cast<DtDesignatorRepository*>(myStateRep);
150 }
151 
153 {
154  myEncoder->setSendNeeded();
155 }
156 
157 inline void DtDesignatorPublisher::sendFinalPduOnDestruction( bool onOff )
158 {
159  mySendFinalInDtor = onOff;
160 }
161 
162 inline void DtDesignatorPublisher::setDfltRelPosThreshold( double val )
163 {
164  theDfltRelPosThreshold = val;
165 }
166 
167 inline double DtDesignatorPublisher::dfltRelPosThreshold()
168 {
169  return theDfltRelPosThreshold;
170 }
171 
172 inline void DtDesignatorPublisher::setDfltAbsPosThreshold( double val )
173 {
174  theDfltAbsPosThreshold = val;
175 }
176 
177 inline double DtDesignatorPublisher::dfltAbsPosThreshold()
178 {
179  return theDfltAbsPosThreshold;
180 }
181 
182 inline void DtDesignatorPublisher::setDfltAccelThreshold( double val )
183 {
184  theDfltAccelThreshold = val;
185 }
186 
187 inline double DtDesignatorPublisher::dfltAccelThreshold()
188 {
189  return theDfltAccelThreshold;
190 }
191 
192 #endif // DtDIS
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()
class DtDesignatorPublisher:
Definition: designatorPublisherHLA.h:27
DtHlaStateEncoder * myEncoder
Definition: objectPublisherHLA.h:223
virtual DtDesignatorRepository * designatorStateRep()
Returns a pointer to the DtDesignatorRepository - through which you can set or inspect current state ...
Definition: designatorPublisherHLA.h:105
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 DtDesignatorEncoder:
Definition: designatorEncoderHLA.h:36
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
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
virtual DtDesignatorRepository * dsr()
Synonym for designatorStateRep().
Definition: designatorPublisherHLA.h:110
This class declares the DIS version of DtObjectPublisher.
DtObjectId instances are used to represent RTI::ObjectInstances in VR-Link.
Definition: objectId.h:38
class DtDesignatorRepository:
Definition: designatorRepository.h:20
DtReal DtTime
A definition of DtTime.
Definition: vlTime.h:19
Instances of DtString are used to represent strings.
Definition: vlString.h:36
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)
class DtDesignatorDecoder:
Definition: designatorDecoderHLA.h:31
virtual const DtObjectId & localId() const
Get the object&#39;s local identifier.
Definition: objectPublisherHLA.h:277
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 Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)