VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
weatherLocalNetInterface.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 #include <vlutil/vlString.h>
16 #include <vlutil/vlList.h>
17 #include <vl/globalObjectDesignator.h>
20 #include <vrfMetoc/metocEnums.h>
21 
24 class DtTroposphereLayerPublisher;
25 class DtSurface;
26 class DtObjectType;
27 
28 namespace makVrfMetoc
29 {
30  class DtTroposphereLayerPublisher;
31  class DtSubsurfaceLayerPublisher;
32  class DtLandSurfacePublisher;
33  class DtWaterSurfacePublisher;
34  class DtServicePublisher;
36  class DtEnvironmentConditionStateRepository;
37 }
38 
39 #ifdef DtDIS
47 #else
55 #endif
56 
57 namespace makVrf
58 {
59  class DtWeatherStateComponent;
60 
65  {
66  private:
70  const DtWeatherLocalNetInterface & operator=(const
72 
73  public:
74 
76  DtWeatherLocalNetInterface(DtStateData* vrfObject, DtVrlinkNetworkInterface*, bool publishObject = true);
77 
79  virtual ~DtWeatherLocalNetInterface();
80 
81  virtual bool init(const DtEntityIdentifier& id = DtEntityIdentifier::nullId());
82 
84  virtual void updatePublisher();
85 
87  virtual DtString type() const;
88 
89  static DtSimObjectNetInterface* creator(
90  DtStateData* vrfObject, DtVrlinkNetworkInterface*, bool publishObject);
91 
92  virtual int weatherRecordIndex() const;
93  virtual void destroyPublisher();
94 
95  protected:
97  virtual DtEnvironmentProcessRepository* epsr() const;
98 
100  virtual void setupRecords();
101 
102  virtual void updateGeometryRecord();
103  virtual void updateStateRecord();
104  virtual void updateWindLayers();
105 
106  virtual DtEnvironmentProcessPublisher* _createPublisher(const DtEntityIdentifier& id = DtEntityIdentifier::nullId());
107  virtual bool createPublisher(const DtEntityIdentifier& entityId);
108 
110  virtual void setupMetocPublisher();
111 
112  virtual void metocTick();
113 
115  virtual void updateMetocPublishers();
116 
118  virtual void updateMetocSurfacePublishers(const DtWeatherStateComponent*);
119 
121  virtual void updateMetocSubsurfacePublishers(const DtWeatherStateComponent*);
122 
124  virtual void updateMetocWaterPublishers(const DtWeatherStateComponent*);
125 
127  virtual void updateMetocTropospherePublishers(const DtWeatherStateComponent*);
128 
130  virtual void updateCommonMetocWeatherRepository(const DtWeatherStateComponent*, DtVrfWeatherStateRepositoryPtr repo);
131 
133  virtual void updateMetocGeoreference(const DtWeatherStateComponent*, DtVrfEnvironmentConditionStateRepositoryPtr repo);
134 
137 
138  virtual std::vector<unsigned> mapCloudStateToLayerAltitudes(DtVrfWeatherCloudState cloudState) const;
139  virtual DtCloudTypeEnum32 mapVrvCloudTypeToMetocCloudType(int) const;
140  virtual DtCloudTypeEnum32 mapCloudStateToCloudType(DtVrfWeatherCloudState cloudState, unsigned altitude) const;
141  virtual float mapCloudStateToCloudCoverage(DtVrfWeatherCloudState cloudState, unsigned altitude) const;
142  virtual float mapCloudStateToCloudDensity(DtVrfWeatherCloudState cloudState, unsigned altitude) const;
143 
144  virtual DtPrecipitationTypeEnum32 mapVrfPrecipitationtypeToMetocPrecipitationType(int vrfPrecipitationType) const;
145 
146  virtual DtHazeTypeEnum32 mapFogColorToHazeType(const DtVector& fogColor);
147  virtual DtHazeTypeEnum32 mapObscurantToHazeType(int obscurant);
148 
149  virtual float mapSwellStateToSwellHeight(int state);
150  virtual float mapSwellStateToSwellLength(int state);
151  virtual int mapSwellStateToSwellPeriod(int state);
152 
153  virtual float mapSeaStateToWaveHeight(int state);
154  virtual float mapSeaStateToWaveLength(int state);
155  virtual int mapSeaStateToWavePeriod(int state);
156  virtual DtGeoLocationTypeEnum32 mapEntityTypeToGeoLocationType(const DtObjectType& type);
158 
159 #ifndef DtDIS
160  virtual DtVrfSubsurfacePublisherPtr createAndInitMetocSubsurfacePublisher() const;
161  virtual DtVrfLandSurfacePublisherPtr createAndInitMetocLandSurfacePublisher() const;
162  virtual DtVrfWaterSurfacePublisherPtr createAndInitMetocWaterSurfacePublisher() const;
163  virtual DtVrfTropospherePublisherPtr createAndInitMetocTropospherePublisher() const;
164  virtual void initializeMetocStateRep(makVrfMetoc::DtEnvironmentConditionStateRepository* sr) const;
165 #endif
166 
167  virtual void onTick() override;
168 
169  protected:
171 
175  std::vector<DtVrfTropospherePublisherPtr> myMetocTropospherePublishers;
176 
182  };
183 }
bool mySetMetocGeoreference
Definition: weatherLocalNetInterface.h:177
DtHazeTypeEnum32
Definition: metocEnums.h:92
Contains the DtSimEnvironmentalModelType class declaration.
Instances of DtWeatherStateRepository are used to store state data for METOC_Root.EnvironmentCondition.Weather objects.
Definition: weatherStateRepository.h:33
void * DtVrfWeatherStateRepositoryPtr
Definition: weatherLocalNetInterface.h:45
DtVrfLandSurfacePublisherPtr myMetocSurfacePublisher
Definition: weatherLocalNetInterface.h:173
static DtObjectType theBoxType
Definition: weatherLocalNetInterface.h:180
Local network interface for weather state objects. These objects must have a DtWeatherStateRepository...
Definition: weatherLocalNetInterface.h:64
DtVrfWaterSurfacePublisherPtr myMetocWaterPublisher
Definition: weatherLocalNetInterface.h:174
Instances of DtTroposphereLayerPublisher publish METOC_Root.EnvironmentCondition.Weather.TroposphereLayer objects to the network.
Definition: troposphereLayerPublisherHLA.h:25
Definition: surface.h:179
This repository holds all information that is common to all the forms of all objects within VR-Forces...
Definition: weatherStateRepository.h:20
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: weatherStateComponent.h:21
static DtObjectType theCircleType
Definition: weatherLocalNetInterface.h:181
Definition: objectType.h:27
void * DtVrfSubsurfacePublisherPtr
Definition: metocServiceLocalNetInterface.h:38
Instances of DtServicePublisher publish METOC_Root.Service objects to the network.
Definition: servicePublisherHLA.h:25
Definition: simLocalControlObjectNetInterface.h:44
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:336
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:48
Instances of DtWaterSurfacePublisher publish METOC_Root.EnvironmentCondition.Weather.WaterSurface objects to the network.
Definition: waterSurfacePublisherHLA.h:25
Definition: vrfEnvironmentalWeatherStateRecord.h:173
static DtObjectType theAreaType
Definition: weatherLocalNetInterface.h:179
std::vector< DtVrfTropospherePublisherPtr > myMetocTropospherePublishers
Definition: weatherLocalNetInterface.h:175
DtCloudTypeEnum32
Definition: metocEnums.h:34
void * DtVrfServicePublisherPtr
Definition: metocServiceLocalNetInterface.h:41
Instances of DtEnvironmentConditionStateRepository are used to store state data for METOC_Root...
Definition: environmentConditionStateRepository.h:32
DtVrfWeatherCloudState
Definition: vrfWeatherStateEnums.h:24
DtGeoLocationTypeEnum32
Definition: metocEnums.h:9
DtPrecipitationTypeEnum32
Definition: metocEnums.h:23
DtGeoLocationTypeEnum32 myMetocGeoLocationType
Definition: weatherLocalNetInterface.h:178
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtVrfEnvironmentalWeatherStateRecord * myEnvironmentalStateRecord
Definition: weatherLocalNetInterface.h:170
void * DtVrfLandSurfacePublisherPtr
Definition: metocServiceLocalNetInterface.h:39
DtVrfSubsurfacePublisherPtr myMetocSubsurfacePublisher
Definition: weatherLocalNetInterface.h:172
void * DtVrfWaterSurfacePublisherPtr
Definition: metocServiceLocalNetInterface.h:40
Instances of DtLandSurfacePublisher publish METOC_Root.EnvironmentCondition.Weather.LandSurface objects to the network.
Definition: landSurfacePublisherHLA.h:25
Instances of DtSubsurfaceLayerPublisher publish METOC_Root.EnvironmentCondition.SubsurfaceLayer objec...
Definition: subsurfaceLayerPublisherHLA.h:25
void * DtVrfTropospherePublisherPtr
Definition: metocServiceLocalNetInterface.h:37
void * DtVrfEnvironmentConditionStateRepositoryPtr
Definition: weatherLocalNetInterface.h:46

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)