VR-Exchange 2.9 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pVrfChangeGlobalWeatherCommand.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2016 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <portal/dllExport.h>
13 #include <portal/pInteraction.h>
14 
16 #define DtDEC_ATTRIBUTE_CLEAR( T, N, n ) \
17  public: \
18  void set##N( const T& val ) { my##N = val; myb##N = true; } \
19  const T& n() const { return my##N; } \
20  const bool isset##N() const { return myb##N; } \
21  void clear##N() { myb##N = false; } \
22  T& n() { return my##N; } \
23  protected: \
24  T my##N; \
25  bool myb##N;
26 
27 namespace MAKVrExchange
28 {
29 
31  {
33  double myWindSpeed;
36  unsigned int myVisibilityObscurant;
39  double mySkyCoverage;
40  };
41 
42  class DtPortalConnection;
43 
47  : public DtPortalInteraction
48  {
49  public:
50 
52  typedef void (*functionCallback_type) (
53  const DtPortalVrfChangeGlobalWeatherCommandInteraction& interaction, void* userData );
54 
57 
60 
62  static void addCallback( DtPortalConnection* connection,
63  functionCallback_type callbackFunction, void* userData );
64 
66  static void removeCallback( DtPortalConnection* connection,
67  functionCallback_type callbackFunction, void* userData );
68 
71 
72  DtDEC_ATTRIBUTE_CLEAR( double, AirTurbidity, airTubidity );
73  DtDEC_ATTRIBUTE_CLEAR( double, AmbientAirTemperature, ambientAirTemperature );
74 
75 #if (VRF_RELEASE_NUM < 24)
76  DtDEC_ATTRIBUTE_CLEAR( int, CloudState, cloudState );
77 #endif
78  DtDEC_ATTRIBUTE_CLEAR( double, PrecipitationIntensity, precipitationIntensity );
79  DtDEC_ATTRIBUTE_CLEAR( int, PrecipitationType, precipitationType );
80  DtDEC_ATTRIBUTE_CLEAR( double, Visibility, visibility );
81  DtDEC_ATTRIBUTE_CLEAR( double, WindDirection, windDirection );
82  DtDEC_ATTRIBUTE_CLEAR( double, WindSpeed, windSpeed );
83  DtDEC_ATTRIBUTE_CLEAR( double, UnderwaterVisibility, underwaterVisibility );
84  DtDEC_ATTRIBUTE_CLEAR( double, SurfaceTransparency, surfaceTransparency );
85  DtDEC_ATTRIBUTE_CLEAR( double, WaterCurrentSpeed, waterCurrentSpeed );
86  DtDEC_ATTRIBUTE_CLEAR( double, WaterCurrentDirection, waterCurrentDirection );
87  DtDEC_ATTRIBUTE_CLEAR( double, AmbientWaterTemperature, ambientWaterTemperature );
88  DtDEC_ATTRIBUTE_CLEAR( double, TidalOffset, tidalOffset );
89  DtDEC_ATTRIBUTE_CLEAR( double, TidalDirection, tidalDirection );
90  DtDEC_ATTRIBUTE_CLEAR( int, SwellState, swellState );
91  DtDEC_ATTRIBUTE_CLEAR( double, SwellStateDirection, swellStateDirection );
92  DtDEC_ATTRIBUTE_CLEAR( int, SeaState, seaState );
93  DtDEC_ATTRIBUTE_CLEAR( double, SeaStateDirection, seaStateDirection );
94  DtDEC_ATTRIBUTE_CLEAR( bool, WindDrivenSeaStateEnabled, windDrivenSeaStateEnabled );
95  DtDEC_ATTRIBUTE_CLEAR( double, Choppiness, choppiness );
96  DtDEC_ATTRIBUTE_CLEAR( double, SurgeDepth, surgeDepth );
97  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer1Depth, thermoclineLayer1Depth );
98  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer1Permeability, thermoclineLayer1Permeability );
99  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer2Depth, thermoclineLayer2Depth );
100  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer2Permeability, thermoclineLayer2Permeability );
101  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer3Depth, thermoclineLayer3Depth );
102  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer3Permeability, thermoclineLayer3Permeability );
103  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer4Depth, thermoclineLayer4Depth );
104  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer4Permeability, thermoclineLayer4Permeability );
105  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer5Depth, thermoclineLayer5Depth );
106  DtDEC_ATTRIBUTE_CLEAR( double, ThermoclineLayer5Permeability, thermoclineLayer5Permeability );
107 
109 
111  public:
112 
114 
115  //myPortalWindLevels Helper Functions
116  std::vector<myPortalWindLevels> DtPortalWindLevels;
117  virtual void setWindLevelsVector(std::vector<myPortalWindLevels> newVector);
118  virtual bool isWindLevelsVectorSet() const;
119  virtual void addWindLevel(myPortalWindLevels addMe);
120  virtual void removeWindLevel(double baseAltitude);
121  virtual void removeWindLevel(myPortalWindLevels removeMe);
122  virtual void clearWindLevels();
123  virtual void encodeWindLevelsVector(DtAttributeValuePairList* avpl) const;
124  virtual void decodeWindLevelsVector(DtAttributeValuePairList::iterator i, int* count);
125  virtual void printWindLevelsVector(std::ostream& stream) const;
126 
127  static DtPortalMessage* create();
128 
129  virtual unsigned int netSize() const;
130  virtual void writeSelfToBuffer( void* buffer, int bufferSize ) const;
131  virtual void readSelfFromBuffer( const void* buffer, int bufferSize );
132 
133  virtual std::ostream& printDataToStream( std::ostream& stream ) const;
134 
135  private:
136 
140 
142  bool operator == ( const DtPortalVrfChangeGlobalWeatherCommandInteraction& ) const;
143 
145  bool operator != ( const DtPortalVrfChangeGlobalWeatherCommandInteraction& ) const;
146 
147  };
148 
149 
151  {
153  }
154 
155 }
static DtPortalMessage * create()
Definition: pVrfChangeGlobalWeatherCommand.h:150
double myWindDirection
Definition: pVrfChangeGlobalWeatherCommand.h:34
double myBaseAltitude
Definition: pVrfChangeGlobalWeatherCommand.h:32
double myVisibilityDistance
Definition: pVrfChangeGlobalWeatherCommand.h:35
#define DT_DLL_LIBPORTAL
Definition: include/portal/dllExport.h:20
static const DtPortalMessageKind theKind
NOTE: DtDEC_ATTRIBUTE resets the access specifier to protected.
Definition: pVrfChangeGlobalWeatherCommand.h:113
unsigned int myVisibilityObscurant
Definition: pVrfChangeGlobalWeatherCommand.h:36
The base class for all messages passed through the portal.
Definition: pMessage.h:66
Contains the DtPortalInteraction class declaration.
double myWindSpeed
Definition: pVrfChangeGlobalWeatherCommand.h:33
DtPortalInteractions are a special type of DtPortalMessages which are used to transmit simulation dat...
Definition: pInteraction.h:21
double myCloudDensity
Definition: pVrfChangeGlobalWeatherCommand.h:38
std::vector< myPortalWindLevels > DtPortalWindLevels
Definition: pVrfChangeGlobalWeatherCommand.h:116
Definition: pVrfChangeGlobalWeatherCommand.h:30
int myCloudType
Definition: pVrfChangeGlobalWeatherCommand.h:37
Connects a broker to the Portal Data Exchange.
Definition: pConnection.h:49
Vrf Change Global Weather Command Interaction class.
Definition: pVrfChangeGlobalWeatherCommand.h:46
std::list< DtAttributeValuePair > DtAttributeValuePairList
A list of DtAttributeValuePairs.
Definition: variableLengthData.h:79
DtPortalMessageKind
A List of message kinds distributed with the Portal.
Definition: pMessageKinds.h:23
#define DtDEC_ATTRIBUTE_CLEAR(T, N, n)
Redefine attribute macro. All attributes in this message are optional.
Definition: pVrfChangeGlobalWeatherCommand.h:16
double mySkyCoverage
Definition: pVrfChangeGlobalWeatherCommand.h:39

Document ID: Generated on Tue Jun 25 16:45:35 EDT 2024 from SVN revision 267383
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)