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
DtStateRepository * myStateRep
Definition: objectPublisherHLA.h:202
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:58
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:204
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
virtual void tick()
Tick (update) this object.
DtSyntheticEnvironmentObjectType is a class which contains information identifying the type of a synt...
Definition: vlpi/syntheticEnvironmentObjectType.h:19
Contains the DIS DtPointObjectEncoder class declaration.
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:205
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
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:247
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 Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)