19 #include <vlpi/metocEnums.h>
20 #include <tbb/spin_mutex.h>
28 class DtEnvironmentConditionStateRepository;
33 class DtTroposphereStateComponent;
34 class DtSubsurfaceStateComponent;
35 class DtLandSurfaceStateComponent;
36 class DtWaterSurfaceStateComponent;
37 class DtSubsurfaceStateComponent;
73 virtual void onTick()
override;
76 virtual RTI::ObjectClassHandle objectClassHandle()
const override;
80 virtual DtString type()
const override;
85 template<
typename T,
typename V>
91 removeBaseUpdateCallback();
93 setEnvironmentConditionTypeFromObject(ro);
95 myObject->baseAddPostUpdateCallback(reflectedObjectUpdateCallbackFunction,
this);
96 setUpdateReceived(
true);
97 setupFromNetworkRepository<V>();
102 virtual void clearReflectedObject(
bool shouldRemoveStateComponent =
true);
103 static void reflectedObjectUpdateCallbackFunction(
DtReflectedObject* obj,
void* userData);
109 return nextFrameVrfObject()->nextFrameState()->getStateComponent<T>();
115 return nextFrameVrfObject()->hasStateComponent<T>();
121 return nextFrameVrfObject()->addStateComponent<T>(mySimObject->isLocal(), !mySimObject->isLocal());
126 return !nextFrameVrfObject()->hasStateComponent<T>() ? createVrfStateComponent<T>() : getVrfStateComponent<T>();
129 void removeStateComponent();
137 initializeRemoteStateComponents<T>();
138 updateFromReflectedObject();
144 switch (myEnvironmentConditionType)
150 getOrCreateVrfStateComponent<DtEnvironmentalLocationStateComponent>();
151 getOrCreateVrfStateComponent<DtVrfGeometryStateComponent>();
154 myStateComponent = getOrCreateVrfStateComponent<T>();
156 if (!myStateComponentDeletedConnection.connected())
158 myStateComponentDeletedConnection = myStateComponent->signal_stateComponentAboutToBeDeleted.connect(
163 virtual void slot_stateComponentToBeDeleted();
165 virtual void updateFromReflectedObject()
override;
166 virtual int mapMetocCloudTypeToVrvCloudType(DtCloudTypeEnum32)
const;
167 virtual int mapHazeTypeToObscurant(DtHazeTypeEnum32 type)
const;
171 virtual void updateFromMetocGeoreference(
const DtEnvironmentConditionStateRepository* stateRep);
178 virtual void removeBaseUpdateCallback();
DtVrfWeatherPrecipitationType
Definition: vrfWeatherStateEnums.h:13
Definition: environmentConditionRemoteNetInterface.h:42
Definition: environmentConditionRemoteNetInterface.h:45
Definition: environmentConditionRemoteNetInterface.h:48
static const int DtDefaultWeatherPriority
Definition: environmentConditionRemoteNetInterface.h:201
DtEnvironmentConditionType myEnvironmentConditionType
This is important since the interface is generic, but it can be instantiated by any environment condi...
Definition: environmentConditionRemoteNetInterface.h:190
Definition: environmentConditionRemoteNetInterface.h:50
Definition: environmentConditionRemoteNetInterface.h:41
Definition: environmentConditionRemoteNetInterface.h:49
Definition: simRemoteEnvironmentalNetInterface.h:38
DtEnvironmentConditionType
Definition: environmentConditionRemoteNetInterface.h:39
Definition: environmentConditionRemoteNetInterface.h:44
boost::signals2::connection myStateComponentDeletedConnection
Definition: environmentConditionRemoteNetInterface.h:204
Definition: environmentConditionRemoteNetInterface.h:46
class DtVrlinkNetworkInterface:
Definition: vrlinkNetworkInterface.h:76
void setReflectedObject(T *ro)
Definition: environmentConditionRemoteNetInterface.h:86
1) Define the interface class that will be used to represent the next and current frames...
Definition: waterSurfaceStateComponent.h:102
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:513
Definition: environmentConditionRemoteNetInterface.h:52
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:50
tbb::spin_mutex myTroposphereLayerAltitudeByUuidMapMutex
Definition: environmentConditionRemoteNetInterface.h:203
T * createVrfStateComponent()
Definition: environmentConditionRemoteNetInterface.h:119
1) Define the interface class that will be used to represent the next and current frames...
Definition: subsurfaceStateComponent.h:139
#define DT_DLL_vrlinkNetworkInterface
This file is used to determine how to build.
Definition: vrlinkNetworkInterfaceDefines.h:24
static const int DtGlobalWeatherPriority
Definition: environmentConditionRemoteNetInterface.h:200
virtual void slot_stateComponentToBeDeleted()
DtReflectedObject * myObject
Note that this is a reflected object because this class, while weather, also covers subsurface layers...
Definition: environmentConditionRemoteNetInterface.h:188
std::map< DtVrlUuid, double > DtAltitudeByUuidMapType
Definition: environmentConditionRemoteNetInterface.h:194
Abstract interface for the land surface state component, representing both the next and current frame...
Definition: landSurfaceStateComponent.h:90
Definition: environmentConditionRemoteNetInterface.h:43
T * getOrCreateVrfStateComponent()
Definition: environmentConditionRemoteNetInterface.h:124
T * getVrfStateComponent()
Definition: environmentConditionRemoteNetInterface.h:107
static std::unordered_map< std::string, DtEnvironmentConditionType > theHLAClassNameToEnvironmentConditionTypeMap
Definition: environmentConditionRemoteNetInterface.h:192
DtAltitudeByUuidMapType myTroposphereLayerAltitudeByUuidMap
TODO consider replacing this with just "myLastReceivedAltitude" since this class is not shared betwee...
Definition: environmentConditionRemoteNetInterface.h:196
bool hasStateComponent()
Definition: environmentConditionRemoteNetInterface.h:113
void setupFromNetworkRepository()
initializes parts of the local repository from the network state rep. This needs to be done after the...
Definition: environmentConditionRemoteNetInterface.h:132
Base interface for accessing current or next frame state in a double-buffered state component...
Definition: stateComponent.h:354
1) Define the interface class that will be used to represent the next and current frames...
Definition: troposphereStateComponent.h:48
void initializeRemoteStateComponents()
Definition: environmentConditionRemoteNetInterface.h:142
Definition: environmentConditionRemoteNetInterface.h:47