VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
environmentProcessPublisherDIS.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
9 
10 #ifndef DtEnvironmentProcessPublisher_H_
11 #define DtEnvironmentProcessPublisher_H_
12 
13 #if DtDIS
14 
15 
16 #include "objectPublisherDIS.h"
17 #include "pdu.h"
21 
31 {
32 
33 public:
36  typedef DtEnvironmentProcessRepository* (*DtStateRepCreator)();
37 
38 public:
39 
42  DtEnvironmentProcessRepository* stateRepToUse,
43  DtExerciseConn* conn,
44  const DtObjectId& id = DtObjectId::defaultId());
45 
48  DtExerciseConn* conn,
49  const DtObjectId& id = DtObjectId::defaultId());
50 
53 
58  virtual void tick();
59 
62  virtual DtEnvironmentProcessRepository* environmentProcessStateRep();
63 
65  virtual DtEnvironmentProcessRepository* epsr();
66 
70  virtual DtEnvironmentProcessDecoder* decoder();
71 
74  virtual DtEnvironmentProcessEncoder* encoder();
75 
77  virtual const DtObjectId& id() const;
78 
80  virtual const DtObjectId& localId() const;
81 
83  virtual const DtGlobalObjectDesignator& globalId() const;
84 
88  virtual void sendFinalPduOnDestruction(bool onOff);
89 
92  virtual void forceUpdate();
93 
94 public:
95 
97  static void setStateRepCreator(DtStateRepCreator creator);
98  static DtStateRepCreator stateRepCreator(void);
99 
100  static void setClassDfltTimeThreshold(DtTime threshold);
101 
102 protected:
103 
105  void sendFinalPdu();
106 
108  void init(const DtEntityIdentifier& vehId);
109 
110  //copy constructor -- not implemented
112 
115  (const DtEnvironmentProcessPublisher& orig);
116 
117 protected:
118 
123 
124 protected:
125  static DtStateRepCreator theStateRepCreator;
128 };
129 
132 {
133  return epsr();
134 }
135 
137 {
138  return static_cast<DtEnvironmentProcessRepository*>(myStateRep);
139 }
140 
142 {
143  return myEncoder;
144 }
145 
147 {
148  return myDecoder;
149 }
150 
151 
153 {
154  mySendFinalInDtor = onOff;
155 }
156 
158 {
159  return myId;
160 }
161 
163 {
164  return id();
165 }
166 
167 #endif
168 #endif
169 
DtStateRepository * myStateRep
Definition: objectPublisherDIS.h:176
virtual void sendFinalPduOnDestruction(bool onOff)
Set flag indicating whether to send a final PDU with the &quot;FinalPdu&quot; appearance bit set...
Definition: environmentProcessPublisherDIS.h:152
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:61
Contains the DtEnvironmentProcessRepository class declaration.
virtual DtEnvironmentProcessEncoder * encoder()
Returns a pointer to the Encoder being used to encode current state into an entity state PDU...
Definition: environmentProcessPublisherDIS.h:141
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
virtual DtEnvironmentProcessDecoder * decoder()
Returns a pointer to the Decoder being used to decode PDUs that we send back into the asSeenByRemote ...
Definition: environmentProcessPublisherDIS.h:146
Instances of DtEnvironmentProcessPublisher are used for local or source simulations of environment pr...
Definition: environmentProcessPublisherDIS.h:30
static const DtEntityIdentifier & defaultId()
Returns a reference to an instance of -1:-1:-1.
virtual DtEnvironmentProcessRepository * environmentProcessStateRep()
Returns a pointer to the EnvironmentProcessRepository - through which you can set or inspect current ...
Definition: environmentProcessPublisherDIS.h:131
Instances of DtObjectPublisher are used for local or source simulations of objects, (i.e.
Definition: objectPublisherDIS.h:36
virtual void forceUpdate()=0
For publisher to send PDU on next tick.
static DtStateRepCreator theStateRepCreator
Definition: environmentProcessPublisherDIS.h:125
static bool theClassDfltIsSetFlag
Definition: environmentProcessPublisherDIS.h:127
virtual const DtObjectId & id() const =0
The id is the same as the globalId, a DtEntityIdentifier unique to this object.
virtual const DtObjectId & localId() const
Get the environment process&#39;s localId - same as id for DIS.
Definition: environmentProcessPublisherDIS.h:162
This file declares the DIS version of DtEnvironmentProcessEncoder.
virtual DtEnvironmentProcessRepository * epsr()
Synonym for environmentProcessStateRep().
Definition: environmentProcessPublisherDIS.h:136
virtual const DtObjectId & id() const
Get the environment process&#39;s identifier.
Definition: environmentProcessPublisherDIS.h:157
virtual const DtGlobalObjectDesignator & globalId() const =0
The entityIdentifier unique to this object.
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
Instances of DtEnvironmentProcessRepository are used to store state information for environmental pro...
Definition: environmentProcessRepository.h:27
DtObjectId myId
Definition: environmentProcessPublisherDIS.h:119
This class declares the DIS version of DtObjectPublisher.
DtEnvironmentProcessDecoder * myDecoder
Definition: environmentProcessPublisherDIS.h:120
virtual void tick()=0
Tick (update) this object.
bool mySendFinalInDtor
Definition: environmentProcessPublisherDIS.h:122
virtual const DtObjectId & localId() const =0
The localId is the same as the globalId, a DtEntityIdentifier unique to this object.
Instances of DtEnvironmentProcessEncoder are used to take state information from a DtEnvironmentProce...
Definition: environmentProcessEncoderDIS.h:23
DtEnvironmentProcessEncoder * myEncoder
Definition: environmentProcessPublisherDIS.h:121
static DtTime theClassDfltTimeThreshold
Definition: environmentProcessPublisherDIS.h:126
Instances of DtEnvironmentProcessDecoder process Environment Process PDU&#39;s into DtEnvironmentProcessR...
Definition: environmentProcessDecoderDIS.h:24

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)