VR-Forces 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 
17 #include <vlutil/vlString.h>
18 #include <vlutil/vlList.h>
19 #include <vl/globalObjectDesignator.h>
22 #include <vlpi/metocEnums.h>
23 
25 class DtTroposphereLayerPublisher;
26 class DtSurface;
27 class DtObjectType;
28 class DtTroposphereLayerPublisher;
29 class DtSubsurfaceLayerPublisher;
30 class DtLandSurfacePublisher;
31 class DtWaterSurfacePublisher;
32 class DtServicePublisher;
33 class DtWeatherStateRepository;
34 class DtEnvironmentConditionStateRepository;
35 
43 
44 
45 namespace makVrf
46 {
47  class DtTroposphereStateComponent;
48  class DtLandSurfaceStateComponent;
49  class DtWaterSurfaceStateComponent;
50  class DtSubsurfaceStateComponent;
51 
53  {
58 
59  bool allComponentsValid() const;
60  bool isModified() const;
61  };
62 
67  public DtLocalExtendedPropertiesNetInterface<DtSimLocalControlObjectNetInterface, DtWeatherObjectRepository>
68  {
69  private:
73  const DtWeatherLocalNetInterface & operator=(const
75 
76  public:
77 
79  DtWeatherLocalNetInterface(DtStateData* vrfObject, DtVrlinkNetworkInterface*, bool publishObject = true);
80 
82  virtual ~DtWeatherLocalNetInterface() override;
83 
84  virtual bool init(const DtEntityIdentifier& id = DtEntityIdentifier::nullId()) override;
85 
87  virtual void updatePublisher() override;
88 
90  virtual DtString type() const override;
91 
92  static DtSimObjectNetInterface* creator(
93  DtStateData* vrfObject, DtVrlinkNetworkInterface*, bool publishObject);
94 
95  virtual void destroyPublisher() override;
96 
97  protected:
98  virtual int minRecords() const override;
99 
101  virtual DtEnvironmentProcessRepository* epsr() const;
102 
104  virtual void setupRecords();
105 
106  virtual void updateGeometryRecord();
107  virtual void updateWindLayers();
108 
109  virtual DtVrfExtControlObjectPublisher* _createVrfExtPublisher() override;
110 
112  virtual void setupMetocPublisher();
113 
114  virtual void metocTick();
115 
117  virtual void updateMetocPublishers();
118 
120  virtual void updateMetocLandSurfacePublishers(const DtWeatherStateComponents&);
121 
123  virtual void updateMetocSubsurfacePublishers(const DtWeatherStateComponents&);
124 
126  virtual void updateMetocWaterSurfacePublishers(const DtWeatherStateComponents&);
127 
129  virtual void updateMetocTropospherePublishers(const DtWeatherStateComponents&);
130 
132  virtual void updateCommonMetocWeatherRepository(const DtWeatherStateComponents&, DtWeatherStateRepository* repo);
133 
135  virtual void updateMetocGeoreference(const DtWeatherStateComponents&, DtEnvironmentConditionStateRepository* repo);
136  public:
139 
140  virtual DtCloudTypeEnum32 mapVrvCloudTypeToMetocCloudType(int) const;
141 
142  virtual DtPrecipitationTypeEnum32 mapVrfPrecipitationtypeToMetocPrecipitationType(int vrfPrecipitationType) const;
143 
144  virtual DtHazeTypeEnum32 mapFogColorToHazeType(const DtVector& fogColor);
145  virtual DtHazeTypeEnum32 mapObscurantToHazeType(int obscurant);
146 
147  static float mapSwellStateToSwellHeight(int state);
148  static float mapSwellStateToSwellLength(int state);
149  static int mapSwellStateToSwellPeriod(int state);
150 
151  static float mapSeaStateToWaveHeight(int state);
152  static float mapSeaStateToWaveLength(int state);
153  static int mapSeaStateToWavePeriod(int state);
154  virtual DtGeoLocationTypeEnum32 mapEntityTypeToGeoLocationType(const DtEntityType& type);
156  protected:
157  virtual DtSubsurfaceLayerPublisher* createAndInitMetocSubsurfacePublisher() const;
158  virtual DtLandSurfacePublisher* createAndInitMetocLandSurfacePublisher() const;
159  virtual DtWaterSurfacePublisher* createAndInitMetocWaterSurfacePublisher() const;
160  virtual DtTroposphereLayerPublisher* createAndInitMetocTropospherePublisher() const;
161  virtual void initializeMetocStateRep(DtEnvironmentConditionStateRepository* sr) const;
162 
163 
164  virtual void onTick() override;
165 
166  protected:
167  DtLandSurfacePublisher* myMetocSurfacePublisher;
168  DtWaterSurfacePublisher* myMetocWaterPublisher;
169  std::vector<DtTroposphereLayerPublisher*> myMetocTropospherePublishers;
170  std::vector<DtSubsurfaceLayerPublisher*> myMetocSubsurfacePublishers;
171 
173  DtGeoLocationTypeEnum32 myMetocGeoLocationType;
174  static DtEntityType theAreaType;
175  static DtEntityType theBoxType;
176  static DtEntityType theCircleType;
177  };
178 }
bool mySetMetocGeoreference
Definition: weatherLocalNetInterface.h:172
Contains the DtSimEnvironmentalModelType class declaration.
DtWaterSurfacePublisher * myMetocWaterPublisher
Definition: weatherLocalNetInterface.h:168
Local network interface for weather state objects. These objects must have a DtWeatherStateRepository...
Definition: weatherLocalNetInterface.h:66
std::vector< DtSubsurfaceLayerPublisher * > myMetocSubsurfacePublishers
Definition: weatherLocalNetInterface.h:170
Contains the DtWeatherObjectRepository class declaration.
Definition: surface.h:181
static DtEntityType theAreaType
Definition: weatherLocalNetInterface.h:174
const DtSubsurfaceStateComponent * subsurfaceStateComp
Definition: weatherLocalNetInterface.h:57
1) Define the interface class that will be used to represent the next and current frames...
Definition: waterSurfaceStateComponent.h:82
const DtLandSurfaceStateComponent * landSurfaceStateComp
Definition: weatherLocalNetInterface.h:55
The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buff...
Definition: stateData.h:398
Extends an existing local net interface class to give it the ability to publish extended properties...
Definition: localExtendedPropertiesNetInterface.h:39
Class Description: DtSimObjectNetInterface.
Definition: simObjectNetInterface.h:50
1) Define the interface class that will be used to represent the next and current frames...
Definition: subsurfaceStateComponent.h:111
static DtEntityType theBoxType
Definition: weatherLocalNetInterface.h:175
This class extends DtVrfControlObjectPublisher to support the publishing of VR-Forces state propertie...
Definition: vrfExtControlObjectPublisher.h:16
DtLandSurfacePublisher * myMetocSurfacePublisher
Definition: weatherLocalNetInterface.h:167
DtGeoLocationTypeEnum32 myMetocGeoLocationType
Definition: weatherLocalNetInterface.h:173
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
1) Define the interface class that will be used to represent the next and current frames...
Definition: landSurfaceStateComponent.h:88
std::vector< DtTroposphereLayerPublisher * > myMetocTropospherePublishers
Definition: weatherLocalNetInterface.h:169
Definition: weatherLocalNetInterface.h:52
const DtWaterSurfaceStateComponent * waterSurfaceStateComp
Definition: weatherLocalNetInterface.h:56
1) Define the interface class that will be used to represent the next and current frames...
Definition: troposphereStateComponent.h:46
static DtEntityType theCircleType
Definition: weatherLocalNetInterface.h:176
const DtTroposphereStateComponent * troposphereStateComp
Definition: weatherLocalNetInterface.h:54

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)