VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simLocalEntityNetInterface.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2024 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
14 
15 #include <vl/globalObjectDesignator.h>
16 
17 #include <tbb/spin_rw_mutex.h>
18 
19 
20 class DtObjectPublisher;
21 
22 
23 namespace makVrf
24 {
25 
26  class DtArticulatedPartStateComponent;
27  class DtStatePropertiesStateComponent;
28  class DtEntityStateComponent;
29  class DtEntityLocationStateComponent;
30  class DtVrfGeometryStateComponent;
31  class DtVrfStateComponent;
32  class DtHumanStateComponent;
33  class DtRangeItemsStateComponent;
34  class DtAisDataStateComponent;
35  class DtAircraftLightingStateComponent;
36  class DtGroundVehicleLightingStateComponent;
37 
46  {
47  private:
48 
51 
54 
56  const DtSimLocalEntityNetInterface& operator = ( const DtSimLocalEntityNetInterface& orig );
57 
58  public:
59 
62  bool publishObject = true);
63 
65  virtual ~DtSimLocalEntityNetInterface() override;
66 
69  virtual void onTick() override;
70 
71  virtual bool publishObject() const override {
72  return myPublishObject;
73  }
74 
75  virtual bool init(const DtEntityIdentifier& id = DtEntityIdentifier::nullId()) override;
76 
77  virtual bool init(
78 #if DtHLA
79  DtHlaObjectWithStateRep* obj,
80  DtHlaObjectWithStateRep* extendedAttributes = nullptr
81 #else
83 #endif
84  ) override;
85 
88  virtual bool publisherUserSupplied() const;
89 
92  virtual void updatePublisher() = 0;
93 
96  virtual bool createPublisher(const DtEntityIdentifier& id = DtEntityIdentifier::nullId()) = 0;
97  virtual bool createPublisher(
98 #if DtHLA
99  DtHlaObjectWithStateRep* obj,
100  DtHlaObjectWithStateRep* extendedAttributes = nullptr
101 #else
103 #endif
104  ) { return false; };
105 
108  virtual void destroyPublisher() = 0;
109 
111  virtual DtObjectPublisher* publisher() = 0;
112 
115  virtual void updateNet();
116 
121  virtual void setupNetworkRepository() = 0;
122 
124  virtual void updateUuid() = 0;
125 
129  static bool isVrfGlobalId(const DtGlobalObjectDesignator& identifier);
130 
132  virtual bool isLocal() const override { return true; }
133 
134  virtual bool isAggregate() const = 0;
135 
139  static DtSimLocalEntityNetInterface* isLocalEntityNetInterface(
140  const DtSimObjectNetInterface* objNetInterface );
141 
146  static void setVrfDataTimeThreshold(DtTime time);
147 
148  #ifdef DtDIS
149  static void setHeartbeatVariance(double variance);
153  static double heartbeatVariance();
154  #endif
155 
156  protected:
157  virtual const makVrf::DtEntityStateComponent* entityStateComponent();
158  virtual const makVrf::DtEntityLocationStateComponent* entityLocationStateComponent();
159  virtual const makVrf::DtVrfStateComponent* vrfStateComponent();
160  virtual const makVrf::DtVrfGeometryStateComponent* vrfGeometryStateComponent();
161  virtual const makVrf::DtArticulatedPartStateComponent* articulatedPartStateComponent();
162  virtual const makVrf::DtStatePropertiesStateComponent* statePropertiesStateComponent();
163  virtual const makVrf::DtHumanStateComponent* humanStateComponent();
164  virtual const makVrf::DtRangeItemsStateComponent* rangeItemsStateComponent();
165  virtual const makVrf::DtAisDataStateComponent* aisDataStateComponent();
166  virtual const makVrf::DtAircraftLightingStateComponent* aircraftLightingStateComponent();
167  virtual const makVrf::DtGroundVehicleLightingStateComponent* groundVehicleLightingStateComponent();
168 
169  protected:
171 
173 
174  static double theHeartbeatVariance;
175 
187 
188  };
189 
190 }
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: groundVehicleLightingStateComponent.h:52
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: statePropertiesStateComponent.h:93
const makVrf::DtArticulatedPartStateComponent * myArticulatedPartStateComponent
Definition: simLocalEntityNetInterface.h:176
bool myPublishObject
Definition: simLocalEntityNetInterface.h:172
virtual bool createPublisher(DtHlaObjectWithStateRep *obj, DtHlaObjectWithStateRep *extendedAttributes=nullptr)
Definition: simLocalEntityNetInterface.h:97
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
1) Define the interface class that will be used to represent the next and current frames...
Definition: entityStateComponent.h:91
2) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: entityLocationStateComponent.h:116
const makVrf::DtAisDataStateComponent * myAisDataStateComponent
Definition: simLocalEntityNetInterface.h:184
In order to be a well defined state component, you must:
Definition: articulatedPartStateComponent.h:69
const makVrf::DtEntityStateComponent * myEntityStateComponent
Definition: simLocalEntityNetInterface.h:178
const makVrf::DtGroundVehicleLightingStateComponent * myGroundVehicleLightingStateComponent
Definition: simLocalEntityNetInterface.h:186
const makVrf::DtVrfGeometryStateComponent * myVrfGeometryStateComponent
Definition: simLocalEntityNetInterface.h:180
const makVrf::DtVrfStateComponent * myVrfStateComponent
Definition: simLocalEntityNetInterface.h:181
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: rangeItemsStateComponent.h:64
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: vrfGeometryStateComponent.h:54
virtual bool publishObject() const override
Definition: simLocalEntityNetInterface.h:71
virtual bool isLocal() const override
This network interface is for local entities.
Definition: simLocalEntityNetInterface.h:132
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: vrfStateComponent.h:62
const makVrf::DtHumanStateComponent * myHumanStateComponent
Definition: simLocalEntityNetInterface.h:182
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
const makVrf::DtEntityLocationStateComponent * myEntityLocationStateComponent
Definition: simLocalEntityNetInterface.h:179
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:50
Definition: simEntityNetInterface.h:32
In order to be a well defined state component, you must:
Definition: humanStateComponent.h:25
const makVrf::DtAircraftLightingStateComponent * myAircraftLightingStateComponent
Definition: simLocalEntityNetInterface.h:185
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
static double theHeartbeatVariance
Definition: simLocalEntityNetInterface.h:174
const makVrf::DtStatePropertiesStateComponent * myStatePropertiesStateComponent
Definition: simLocalEntityNetInterface.h:177
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: aisDataStateComponent.h:62
bool myPublisherUserSupplied
Definition: simLocalEntityNetInterface.h:170
1) Define the interface class that will be used to represent the next and curent frames. The UNDEFINED_ macros are convenience macros that will define methods that throw exceptions (until they are implemented)
Definition: aircraftLightingStateComponent.h:132
const makVrf::DtRangeItemsStateComponent * myRangeItemsStateComponent
Definition: simLocalEntityNetInterface.h:183

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)