VR-Link API Documentation for DIS
 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) 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 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 
49  virtual bool tick();
50 
53  virtual inline DtPointObjectRepository* pointObjectStateRep();
54 
56  virtual inline DtPointObjectRepository* posr();
57 
60  virtual inline DtPointObjectDecoder* decoder() { return myDecoder; }
61 
64  virtual inline DtPointObjectEncoder* encoder() { return myEncoder; }
65 
67  virtual const DtObjectId& id() const;
68 
70  virtual inline const DtObjectId& localId() const { return id(); }
71 
73  virtual inline const DtGlobalObjectDesignator& globalId() const { return id(); }
74 
77  virtual inline void sendFinalPduOnDestruction( bool onOff );
78 
81  virtual inline void forceUpdate();
82 
84  virtual void setLocThreshold( double val );
85  virtual double locThreshold() const;
86 
88  virtual void setOriThreshold( double val );
89  virtual double oriThreshold() const;
90 
92  static inline void setDfltLocThreshold( double val );
93  static inline double dfltLocThreshold();
94 
96  static inline void setDfltOriThreshold( double val );
97  static inline double dfltOriThreshold();
98 
100  static void setStateRepCreator( DtStateRepCreator creator );
101  static DtStateRepCreator stateRepCreator();
102 
103  static void setClassDfltTimeThreshold( DtTime threshold );
104 
105 protected:
106 
108  void init( const DtObjectId& );
109 
111  void sendFinalPdu();
112 
113 private:
114 
117 
120 
121 protected:
122 
123  static DtStateRepCreator theStateRepCreator;
124 
125  static double theDfltLocThreshold;
126  static double theDfltOriThreshold;
129 
134 
135 };
136 
138 {
139  return posr();
140 }
141 
143 {
144  return static_cast<DtPointObjectRepository*>(myStateRep);
145 }
146 
148 {
150 }
151 
153 {
154  mySendFinalInDtor = onOff;
155 }
156 
158 {
159  theDfltLocThreshold = val;
160 }
161 
163 {
164  return theDfltLocThreshold;
165 }
166 
168 {
169  theDfltOriThreshold = val;
170 }
171 
173 {
174  return theDfltOriThreshold;
175 }
176 
177 #endif // DtDIS
DtStateRepository * myStateRep
Definition: objectPublisherDIS.h:193
static double dfltLocThreshold()
Definition: pointObjectPublisherDIS.h:162
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
Contains the DtPointObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
static const DtEntityIdentifier & defaultId()
Returns a reference to an instance of -1:-1:-1.
static double theDfltLocThreshold
Definition: pointObjectPublisherDIS.h:125
virtual const DtObjectId & localId() const
Get the point object&#39;s localId - same as id for DIS.
Definition: pointObjectPublisherDIS.h:70
virtual DtPointObjectEncoder * encoder()
Returns a pointer to the Encoder being used to encode current state into an entity state PDU...
Definition: pointObjectPublisherDIS.h:64
static void setDfltLocThreshold(double val)
Get/Set default Location threshold.
Definition: pointObjectPublisherDIS.h:157
virtual const DtGlobalObjectDesignator & globalId() const
Get the global object designator - same as id for DIS.
Definition: pointObjectPublisherDIS.h:73
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
Definition: objectPublisherDIS.h:36
Functions in vlPrint.h provide an error and print facility for vrlink.
virtual void forceUpdate()=0
For publisher to send PDU on next tick.
static bool theClassDfltIsSetFlag
Definition: pointObjectPublisherDIS.h:128
DtPointObjectDecoder * myDecoder
Definition: pointObjectPublisherDIS.h:130
virtual DtPointObjectRepository * pointObjectStateRep()
Returns a pointer to the DtPointObjectRepository - through which you can set or inspect current state...
Definition: pointObjectPublisherDIS.h:137
virtual const DtObjectId & id() const =0
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
virtual DtPointObjectDecoder * decoder()
Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ...
Definition: pointObjectPublisherDIS.h:60
virtual void forceUpdate()
Force a state update to be sent during the next call to tick, even if nothing would normally cause a ...
Definition: pointObjectPublisherDIS.h:147
DtSyntheticEnvironmentObjectType is a class which contains information identifying the type of a synt...
Definition: vlpi/syntheticEnvironmentObjectType.h:19
Contains the DIS DtPointObjectEncoder class declaration.
static double theDfltOriThreshold
Definition: pointObjectPublisherDIS.h:126
Contains the DIS DtPointObjectDecoder class declaration.
Definition: pointObjectPublisherDIS.h:21
Instances of DtPointObjectRepository are used to maintain state information needed by point environme...
Definition: pointObjectRepository.h:31
Provides encoding logic for the DtPointObjectStatePdu class.
Definition: pointObjectEncoderDIS.h:20
DtPointObjectEncoder * myEncoder
Definition: pointObjectPublisherDIS.h:131
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
Provides decoding logic for the DtPointObjectStatePdu class.
Definition: pointObjectDecoderDIS.h:20
virtual void sendFinalPduOnDestruction(bool onOff)
Set flag indicating whether to send a final PDU with the &quot;FinalPdu&quot; appearance bit set...
Definition: pointObjectPublisherDIS.h:152
This class declares the DIS version of DtObjectPublisher.
static DtStateRepCreator theStateRepCreator
Definition: pointObjectPublisherDIS.h:123
static DtTime theClassDfltTimeThreshold
Definition: pointObjectPublisherDIS.h:127
virtual bool tick()=0
Tick (update) this object.
bool myStateRepPassedFlag
Definition: pointObjectPublisherDIS.h:132
virtual DtPointObjectRepository * posr()
Synonym for pointObjectStateRep().
Definition: pointObjectPublisherDIS.h:142
static double dfltOriThreshold()
Definition: pointObjectPublisherDIS.h:172
bool mySendFinalInDtor
Definition: pointObjectPublisherDIS.h:133
virtual void setSendNeeded()
Sets myForceSendNeeded to true.
static void setDfltOriThreshold(double val)
Get/Set default Orientation threshold.
Definition: pointObjectPublisherDIS.h:167

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)