VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
linearObjectPublisherDIS.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2014 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 DtLinearObjectRepository* (*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 ~DtLinearObjectPublisher();
44 
49  virtual bool tick();
50 
53  virtual inline DtLinearObjectRepository* linearObjectStateRep();
54 
56  virtual inline DtLinearObjectRepository* losr();
57 
60  virtual inline DtLinearObjectDecoder* decoder() { return myDecoder; }
61 
64  virtual inline DtLinearObjectEncoder* 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;
118  static DtTime theClassDfltTimeThreshold;
119  static bool theClassDfltIsSetFlag;
120 
121  DtLinearObjectDecoder* myDecoder;
122  DtLinearObjectEncoder* myEncoder;
123  bool myStateRepPassedFlag;
124  bool mySendFinalInDtor;
125 
126 };
127 
129 {
130  return losr();
131 }
132 
134 {
135  return static_cast<DtLinearObjectRepository*>( myStateRep );
136 }
137 
139 {
140  myEncoder->setSendNeeded();
141 }
142 
143 inline void DtLinearObjectPublisher::sendFinalPduOnDestruction( bool onOff )
144 {
145  mySendFinalInDtor = onOff;
146 }
147 
148 inline void DtLinearObjectPublisher::setDfltLocThreshold( double val )
149 {
150  theDfltLocThreshold = val;
151 }
152 
153 inline double DtLinearObjectPublisher::dfltLocThreshold()
154 {
155  return theDfltLocThreshold;
156 }
157 
158 #endif // DtDIS
DtStateRepository * myStateRep
Definition: objectPublisherHLA.h:221
class DtLinearObjectPublisher:
Definition: linearObjectPublisherHLA.h:40
Contains the DtLinearObjectRepository class declaration.
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()
virtual DtLinearObjectRepository * linearObjectStateRep()
Returns a pointer to the DtLinearObjectRepository - through which you can set or inspect current stat...
Definition: linearObjectPublisherHLA.h:113
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.
DtSyntheticEnvironmentObjectType is a class which contains information identifying the type of a synt...
Definition: vlpi/syntheticEnvironmentObjectType.h:19
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
Contains the DIS DtLinearObjectDecoder class declaration.
DtObjectPublisher & operator=(const DtObjectPublisher &orig)
assignment operator – not implemented
Contains the DIS DtLinearObjectEncoder class declaration.
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 const DtObjectId & id() const
Get the object&#39;s local identifier.
Instances of DtLinearObjectRepository are used to maintain state information needed by linear object ...
Definition: linearObjectRepository.h:49
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 DtLinearObjectRepository * losr()
Synonym for linearObjectStateRep().
Definition: linearObjectPublisherHLA.h:118
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 Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)