VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simIndividualLocalEntityNetInterface.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 
15 #pragma once
16 
18 
21 
32 
33 namespace makVrf
34 {
37  {
38  private:
41 
44 
46  const DtSimIndividualLocalEntityNetInterface & operator=(const
48 
49  public:
52  DtStateData* vrfObject, DtVrlinkNetworkInterface* mgr, bool publishObject = true);
54  virtual ~DtSimIndividualLocalEntityNetInterface() override;
55 
57  virtual void updateNet() override;
58 
60  virtual void forceUpdate() override;
61 
64  virtual void updatePublisher() override;
65 
67  virtual bool isUnit() const override { return false; }
68  virtual bool isEntity() const override { return true; }
69  virtual bool isEnvironmental() const override { return false; }
70 
71  virtual bool wantsToCreatePublisher() const override;
72 
78  virtual bool createPublisher(const DtEntityIdentifier& id = DtEntityIdentifier::nullId()) override;
79  virtual bool createPublisher(
80 #if DtHLA
81  DtHlaObjectWithStateRep* obj,
82  DtHlaObjectWithStateRep* extendedAttributes = nullptr
83 #else
85 #endif
86  ) override;
87 
89  virtual void destroyPublisher() override;
90 
92  virtual DtObjectPublisher* publisher() override;
93 
103  virtual bool setEntityPublisher(DtVrfExtEntityPublisher * publisher);
104 
108  virtual void setupNetworkRepository() override;
109 
111  virtual DtVrfExtEntityPublisher * entityPublisher() const;
112 
115  virtual DtExtEntityStateRepository * individualNetworkState() const;
116 
118  virtual void updateUuid() override;
119 
120  virtual bool isAggregate() const override { return false; }
121 
124  virtual DtString type() const override;
125 
126  #if DtHLA
127  virtual RTI::ObjectClassHandle objectClassHandle() const override;
129  #endif
130 
135  isIndividualLocalEntityNetInterface(const DtSimObjectNetInterface *
136  objNetInterface);
137 
138  static DtSimObjectNetInterface * creator(
139  DtStateData* vrfObject, DtVrlinkNetworkInterface* mgr, bool publishObject);
140 
141 #if DtDIS
142  virtual void sendFinalPduOnDestruction(bool) override;
144 #endif
145 
149  static void SetProfilePdus(bool onOf, double pduTimeCheck = 1.0, int numberOfPacketsOverTime = 0
150 #if DtDIS
151  , bool includeSummary = false
152 #endif
153  );
154 
155  virtual std::vector<DtGlobalObjectDesignator> associatedGlobalObjectDesignators() const override;
156 
157  protected:
158 
159  virtual bool updateVrfDataAsSeenByRemote();
160 
164  virtual void updateArtPartsNetState();
165 
166  virtual bool updateDIGuyState();
167 
168  virtual void updateAirVehicleLightingNetState();
169 
170  virtual void updateGroundVehicleLightingNetState();
171 
172  virtual void updateAisDataNetState();
173 
174  virtual void firstTimeInitialize();
175 
176  protected:
177 
179 
185 
186  int myNumberOfPdusSent = 0;
187  double myFirstTimePduSent = 0;
188 
189 #if DtDIS
190  typedef struct
191  {
192  int bits;
193  double simTime;
196  DtTaitBryan stateRepOrientation;
198  DtTaitBryan asSeenByOrientation;
200  double rotTrace;
203  } Changed;
204 
205  std::vector<Changed> myChangedBits;
206 #else
207  int myNumberOfAttributesPdusSent = 0;
208  double myFirstTimeAttributePduSent = 0;
209 #endif
210  };
211 }
int bits
Definition: simIndividualLocalEntityNetInterface.h:192
virtual bool isEnvironmental() const override
Definition: simIndividualLocalEntityNetInterface.h:69
double orientationThreshold
Definition: simIndividualLocalEntityNetInterface.h:202
Class Description: DtSimLocalEntityNetInterface Derived from DtSimEntityNetInterface, DtSimLocalEntityNetInterface provides an interface between a local entity and its network (VR-Link) representation. This is an abstract class whose deriving classes will represent different types of entities, such as individual, aggregate, and eventually, environmental.
Definition: simLocalEntityNetInterface.h:45
Definition: simIndividualLocalEntityNetInterface.h:35
double rotTrace
Definition: simIndividualLocalEntityNetInterface.h:200
DtTaitBryan asSeenByOrientation
Definition: simIndividualLocalEntityNetInterface.h:198
bool myIsFreezeMovementPublished
Definition: simIndividualLocalEntityNetInterface.h:184
Definition: simIndividualLocalEntityNetInterface.h:190
DtVector32 stateRepRotationalVelocity
Definition: simIndividualLocalEntityNetInterface.h:197
DtVector asSeenByLocation
Definition: simIndividualLocalEntityNetInterface.h:195
bool myFirstTimeInitialize
Definition: simIndividualLocalEntityNetInterface.h:183
bool myFirstTick
Definition: simIndividualLocalEntityNetInterface.h:181
DtVrfExtEntityPublisher * myEntityPublisher
Definition: simIndividualLocalEntityNetInterface.h:178
static DtTime theDiGuyCustomPduThreshold
Definition: simIndividualLocalEntityNetInterface.h:180
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
This class extends DtVrfEntityPublisher to support the publishing of VR-Forces state properties as ex...
Definition: vrfExtEntityPublisher.h:15
DtExtEntityStateRepository class extends the DtExtEntityBaseStateRepository to be able to handle exte...
Definition: extEntityStateRepository.h:25
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:50
DtTaitBryan stateRepOrientation
Definition: simIndividualLocalEntityNetInterface.h:196
Contains the DtSimLocalEntityNetInterface class declaration.
virtual bool isUnit() const override
This network interface is for entities, in the DIS - HLA/RPR sense.
Definition: simIndividualLocalEntityNetInterface.h:67
double simTime
Definition: simIndividualLocalEntityNetInterface.h:193
std::vector< Changed > myChangedBits
Definition: simIndividualLocalEntityNetInterface.h:205
bool myPublishDIGuy
Definition: simIndividualLocalEntityNetInterface.h:182
DtVector32 asSeenByRotationalVelocity
Definition: simIndividualLocalEntityNetInterface.h:199
virtual bool isAggregate() const override
Definition: simIndividualLocalEntityNetInterface.h:120
double translationThreshold
Definition: simIndividualLocalEntityNetInterface.h:201
virtual bool isEntity() const override
Definition: simIndividualLocalEntityNetInterface.h:68
DtVector stateRepLocation
Definition: simIndividualLocalEntityNetInterface.h:194

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)