VR-Link API Documentation for HLA Evolved
 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 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;
127  static DtTime theClassDfltTimeThreshold;
128  static bool theClassDfltIsSetFlag;
129 
132  bool myStateRepPassedFlag;
133  bool mySendFinalInDtor;
134 
135 };
136 
138 {
139  return posr();
140 }
141 
143 {
144  return static_cast<DtPointObjectRepository*>(myStateRep);
145 }
146 
148 {
149  myEncoder->setSendNeeded();
150 }
151 
152 inline void DtPointObjectPublisher::sendFinalPduOnDestruction( bool onOff )
153 {
154  mySendFinalInDtor = onOff;
155 }
156 
157 inline void DtPointObjectPublisher::setDfltLocThreshold( double val )
158 {
159  theDfltLocThreshold = val;
160 }
161 
162 inline double DtPointObjectPublisher::dfltLocThreshold()
163 {
164  return theDfltLocThreshold;
165 }
166 
167 inline void DtPointObjectPublisher::setDfltOriThreshold( double val )
168 {
169  theDfltOriThreshold = val;
170 }
171 
172 inline double DtPointObjectPublisher::dfltOriThreshold()
173 {
174  return theDfltOriThreshold;
175 }
176 
177 #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
Contains the DtPointObjectRepository class declaration.
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()
DtHlaStateEncoder * myEncoder
Definition: objectPublisherHLA.h:223
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.
virtual DtPointObjectRepository * pointObjectStateRep()
Returns a pointer to the DtPointObjectRepository - through which you can set or inspect current state...
Definition: pointObjectPublisherHLA.h:114
DtSyntheticEnvironmentObjectType is a class which contains information identifying the type of a synt...
Definition: vlpi/syntheticEnvironmentObjectType.h:19
Contains the DIS DtPointObjectEncoder class declaration.
virtual bool tick()
Tick (update) this object.
Contains the DIS DtPointObjectDecoder class declaration.
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...
class DtPointObjectPublisher:
Definition: pointObjectPublisherHLA.h:41
virtual void forceUpdate()
Specify a set of attributes that should be included in the ahvps the next time tick is called...
Instances of DtPointObjectRepository are used to maintain state information needed by point environme...
Definition: pointObjectRepository.h:31
Instances of DtPointObjectEncoder are used to encode point object state messages from a state reposit...
Definition: pointObjectEncoderHLA.h:33
DtHlaStateDecoder * myDecoder
Definition: objectPublisherHLA.h:224
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
Instances of DtPointObjectDecoder are used to decode point object state messages for a state reposito...
Definition: pointObjectDecoderHLA.h:26
This class declares the DIS version of DtObjectPublisher.
DtObjectId instances are used to represent RTI::ObjectInstances in VR-Link.
Definition: objectId.h:38
DtReal DtTime
A definition of DtTime.
Definition: vlTime.h:19
Instances of DtString are used to represent strings.
Definition: vlString.h:29
virtual DtPointObjectRepository * posr()
Synonym for pointObjectStateRep().
Definition: pointObjectPublisherHLA.h:119
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)
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 Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)