VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
arealObjectPublisherDIS.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 DtArealObjectRepository* (*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 ~DtArealObjectPublisher();
44 
49  virtual bool tick();
50 
53  virtual inline DtArealObjectRepository* arealObjectStateRep();
54 
56  virtual inline DtArealObjectRepository* aosr();
57 
60  virtual inline DtArealObjectDecoder* decoder() { return myDecoder; }
61 
64  virtual inline DtArealObjectEncoder* 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  static inline void setDfltLocThreshold( double val );
89  static inline double dfltLocThreshold();
90 
92  static void setStateRepCreator( DtStateRepCreator creator );
93  static DtStateRepCreator stateRepCreator();
94 
95  static void setClassDfltTimeThreshold( DtTime threshold );
96 
97 protected:
98 
100  void init( const DtObjectId& );
101 
103  void sendFinalPdu();
104 
105 private:
106 
109 
112 
113 protected:
114 
115  static DtStateRepCreator theStateRepCreator;
116 
117  static double theDfltLocThreshold;
120 
125 
126 };
127 
129 {
130  return aosr();
131 }
132 
134 {
135  return static_cast<DtArealObjectRepository*>( myStateRep );
136 }
137 
139 {
141 }
142 
144 {
145  mySendFinalInDtor = onOff;
146 }
147 
149 {
150  theDfltLocThreshold = val;
151 }
152 
154 {
155  return theDfltLocThreshold;
156 }
157 
158 #endif // DtDIS
DtStateRepository * myStateRep
Definition: objectPublisherDIS.h:193
static DtTime theClassDfltTimeThreshold
Definition: arealObjectPublisherDIS.h:118
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
static void setDfltLocThreshold(double val)
Get/Set default Location threshold.
Definition: arealObjectPublisherDIS.h:148
virtual DtArealObjectRepository * arealObjectStateRep()
Returns a pointer to the DtArealObjectRepository - through which you can set or inspect current state...
Definition: arealObjectPublisherDIS.h:128
Contains the DtArealObjectRepository class declaration.
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
virtual void forceUpdate()
Force a state update to be sent during the next call to tick, even if nothing would normally cause a ...
Definition: arealObjectPublisherDIS.h:138
static const DtEntityIdentifier & defaultId()
Returns a reference to an instance of -1:-1:-1.
Contains the DIS DtArealObjectDecoder class declaration.
Contains the DIS DtArealObjectEncoder class declaration.
static bool theClassDfltIsSetFlag
Definition: arealObjectPublisherDIS.h:119
Provides decoding logic for the DtArealObjectStatePdu class.
Definition: arealObjectDecoderDIS.h:20
DtArealObjectDecoder * myDecoder
Definition: arealObjectPublisherDIS.h:121
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 DtStateRepCreator theStateRepCreator
Definition: arealObjectPublisherDIS.h:115
Provides encoding logic for the DtArealObjectStatePdu class.
Definition: arealObjectEncoderDIS.h:20
DtArealObjectEncoder * myEncoder
Definition: arealObjectPublisherDIS.h:122
virtual const DtObjectId & id() const =0
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
static double dfltLocThreshold()
Definition: arealObjectPublisherDIS.h:153
Definition: arealObjectPublisherDIS.h:21
virtual DtArealObjectRepository * aosr()
Synonym for pointObjectStateRep().
Definition: arealObjectPublisherDIS.h:133
DtSyntheticEnvironmentObjectType is a class which contains information identifying the type of a synt...
Definition: vlpi/syntheticEnvironmentObjectType.h:19
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
virtual DtArealObjectDecoder * decoder()
Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ...
Definition: arealObjectPublisherDIS.h:60
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
Instances of DtArealObjectRepository are used to maintain state information needed by areal object en...
Definition: arealObjectRepository.h:30
virtual const DtObjectId & localId() const
Get the point object&#39;s localId - same as id for DIS.
Definition: arealObjectPublisherDIS.h:70
This class declares the DIS version of DtObjectPublisher.
virtual DtArealObjectEncoder * encoder()
Returns a pointer to the Encoder being used to encode current state into an entity state PDU...
Definition: arealObjectPublisherDIS.h:64
virtual void sendFinalPduOnDestruction(bool onOff)
Set flag indicating whether to send a final PDU with the &quot;FinalPdu&quot; appearance bit set...
Definition: arealObjectPublisherDIS.h:143
virtual bool tick()=0
Tick (update) this object.
virtual const DtGlobalObjectDesignator & globalId() const
Get the global object designator - same as id for DIS.
Definition: arealObjectPublisherDIS.h:73
static double theDfltLocThreshold
Definition: arealObjectPublisherDIS.h:117
virtual void setSendNeeded()
Sets myForceSendNeeded to true.
bool mySendFinalInDtor
Definition: arealObjectPublisherDIS.h:124
bool myStateRepPassedFlag
Definition: arealObjectPublisherDIS.h:123

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)