00001 
00055 #if !defined(_CIGI_BASE_WEATHER_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_WEATHER_CTRL_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 
00061 
00062 
00063 
00064 #define CIGI_WEATHER_CTRL_PACKET_ID_V1 7
00065 #define CIGI_WEATHER_CTRL_PACKET_SIZE_V1 44
00066 
00067 #define CIGI_WEATHER_CTRL_PACKET_ID_V2 7
00068 #define CIGI_WEATHER_CTRL_PACKET_SIZE_V2 44
00069 
00070 #define CIGI_WEATHER_CTRL_PACKET_ID_V3 12
00071 #define CIGI_WEATHER_CTRL_PACKET_SIZE_V3 56
00072 
00073 
00074 class CigiWeatherCtrlV1;
00075 class CigiWeatherCtrlV2;
00076 class CigiWeatherCtrlV3;
00077 
00078 
00079 class CIGI_SPEC CigiBaseWeatherCtrl : public CigiBasePacket
00080 {
00081 
00082 friend class CigiWeatherCtrlV1;
00083 friend class CigiWeatherCtrlV2;
00084 friend class CigiWeatherCtrlV3;
00085 
00086 public:
00087 
00088    
00091    enum CloudTypeGrp
00092    {
00093       None=0,
00094       Altocumulus=1,
00095       Altostratus=2,
00096       Cirrocumulus=3,
00097       Cirrostratus=4,
00098       Cirrus=5,
00099       Cumulonimbus=6,
00100       Cumulus=7,
00101       Nimbostratus=8,
00102       Stratocumulus=9,
00103       Stratus=10,
00104       DefA=11,
00105       DefB=12,
00106       DefC=13,
00107       DefD=14,
00108       DefE=15
00109    };
00110 
00111    
00114    enum ScopeGrp
00115    {
00116       Global=0,
00117       Regional=1,
00118       Entity=2
00119    };
00120 
00121 
00122 
00123 
00124    
00125 
00126    
00129    CigiBaseWeatherCtrl();
00130 
00131    
00134    virtual ~CigiBaseWeatherCtrl();
00135 
00136 
00137    
00138 
00139    
00150    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00151 
00152    
00163    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00164 
00165    
00177         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00178                        CigiCnvtInfoType::Type &CnvtInfo);
00179 
00180 
00181 
00182    
00183 
00184    
00185 
00186    
00193    int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00194    {
00195       EntityID = EntityIDIn;
00196       return(CIGI_SUCCESS);
00197    }
00198 
00199    
00202    Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00203 
00204 
00205    
00206 
00207    
00214    int SetWeatherEn(const bool WeatherEnIn, bool bndchk=true)
00215    {
00216       WeatherEn = WeatherEnIn;
00217       return(CIGI_SUCCESS);
00218    }
00219 
00220    
00223    bool GetWeatherEn(void) const { return(WeatherEn); }
00224 
00225 
00226    
00227 
00228    
00235    int SetScudEn(const bool ScudEnIn, bool bndchk=true)
00236    {
00237       ScudEn = ScudEnIn;
00238       return(CIGI_SUCCESS);
00239    }
00240 
00241    
00244    bool GetScudEn(void) const { return(ScudEn); }
00245 
00246 
00247    
00248 
00249    
00256    int SetRandomWindsEn(const bool RandomWindsEnIn, bool bndchk=true)
00257    {
00258       RandomWindsEn = RandomWindsEnIn;
00259       return(CIGI_SUCCESS);
00260    }
00261 
00262    
00265    bool GetRandomWindsEn(void) const { return(RandomWindsEn); }
00266 
00267 
00268    
00269 
00270    
00277    int SetSeverity(const Cigi_uint8 SeverityIn, bool bndchk=true);
00278 
00279    
00282    Cigi_uint8 GetSeverity(void) const { return(Severity); }
00283 
00284 
00285    
00286 
00287    
00294    int SetAirTemp(const float AirTempIn, bool bndchk=true)
00295    {
00296       AirTemp = AirTempIn;
00297       return(CIGI_SUCCESS);
00298    }
00299 
00300    
00303    float GetAirTemp(void) const { return(AirTemp); }
00304 
00305 
00306    
00307 
00308    
00315    int SetVisibilityRng(const float VisibilityRngIn, bool bndchk=true);
00316 
00317    
00320    float GetVisibilityRng(void) const { return(VisibilityRng); }
00321 
00322 
00323    
00324 
00325    
00332    int SetScudFreq(const float ScudFreqIn, bool bndchk=true);
00333 
00334    
00337    float GetScudFreq(void) const { return(ScudFreq); }
00338 
00339 
00340    
00341 
00342    
00349    int SetCoverage(const float CoverageIn, bool bndchk=true);
00350 
00351    
00354    float GetCoverage(void) const { return(Coverage); }
00355 
00356 
00357    
00358 
00359    
00366    int SetBaseElev(const float BaseElevIn, bool bndchk=true)
00367    {
00368       BaseElev = BaseElevIn;
00369       return(CIGI_SUCCESS);
00370    }
00371 
00372    
00375    float GetBaseElev(void) const { return(BaseElev); }
00376 
00377 
00378    
00379 
00380    
00387    int SetThickness(const float ThicknessIn, bool bndchk=true)
00388    {
00389       Thickness = ThicknessIn;
00390       return(CIGI_SUCCESS);
00391    }
00392 
00393    
00396    float GetThickness(void) const { return(Thickness); }
00397 
00398 
00399    
00400 
00401    
00408    int SetTransition(const float TransitionIn, bool bndchk=true)
00409    {
00410       Transition = TransitionIn;
00411       return(CIGI_SUCCESS);
00412    }
00413 
00414    
00417    float GetTransition(void) const { return(Transition); }
00418 
00419 
00420    
00421 
00422    
00429    int SetHorizWindSp(const float HorizWindSpIn, bool bndchk=true)
00430    {
00431       HorizWindSp = HorizWindSpIn;
00432       return(CIGI_SUCCESS);
00433    }
00434 
00435    
00438    float GetHorizWindSp(void) const { return(HorizWindSp); }
00439 
00440 
00441 
00442 protected:
00443 
00444    
00445 
00446    
00450    Cigi_uint16 EntityID;
00451 
00452    
00456    Cigi_uint16 RegionID;
00457 
00458    
00462    Cigi_uint8 LayerID;
00463 
00464    
00468    Cigi_uint8 Humidity;
00469 
00470    
00474    Cigi_uint16 PhenomenonType;
00475 
00476    
00480    bool WeatherEn;
00481 
00482    
00486    bool ScudEn;
00487 
00488    
00492    bool RandomWindsEn;
00493 
00494    
00498    bool RandomLightningEn;
00499 
00500    
00521    CloudTypeGrp CloudType;
00522 
00523    
00532    ScopeGrp Scope;
00533 
00534    
00540    Cigi_uint8 Severity;
00541 
00542    
00546    float AirTemp;
00547 
00548    
00552    float VisibilityRng;
00553 
00554    
00558    float Opacity;
00559 
00560    
00564    float ScudFreq;
00565 
00566    
00570    float Coverage;
00571 
00572    
00576    float BaseElev;
00577 
00578    
00582    float Thickness;
00583 
00584    
00588    float Transition;
00589 
00590    
00594    float HorizWindSp;
00595 
00596    
00600    float VertWindSp;
00601 
00602    
00606    float WindDir;
00607 
00608    
00612    float BaroPress;
00613 
00614    
00618    float Aerosol;
00619 
00620 
00621 };
00622 
00623 #endif // #if !defined(_CIGI_BASE_WEATHER_CTRL_INCLUDED_)