CigiBaseWeatherCondResp Class Reference

#include <CigiBaseWeatherCondResp.h>

Inheritance diagram for CigiBaseWeatherCondResp:

CigiBasePacket CigiWeatherCondRespV3 List of all members.

Public Member Functions

 CigiBaseWeatherCondResp ()
virtual ~CigiBaseWeatherCondResp ()
virtual int Pack (CigiBasePacket *Base, Cigi_uint8 *Buff, void *Spec) const =0
virtual int Unpack (Cigi_uint8 *Buff, bool Swap, void *Spec)=0
virtual int GetCnvt (CigiVersionID &CnvtVersion, CigiCnvtInfoType::Type &CnvtInfo)
int SetRequestID (const Cigi_uint8 RequestIDIn, bool bndchk=true)
Cigi_uint8 GetRequestID (void) const
int SetHumidity (const Cigi_uint8 HumidityIn, bool bndchk=true)
Cigi_uint8 GetHumidity (void) const
int SetAirTemp (const float AirTempIn, bool bndchk=true)
float GetAirTemp (void) const
int SetVisibility (const float VisibilityIn, bool bndchk=true)
float GetVisibility (void) const
int SetHorizWindSp (const float HorizWindSpIn, bool bndchk=true)
float GetHorizWindSp (void) const
int SetVertWindSp (const float VertWindSpIn, bool bndchk=true)
float GetVertWindSp (void) const
int SetWindDir (const float WindDirIn, bool bndchk=true)
float GetWindDir (void) const
int SetBaroPress (const float BaroPressIn, bool bndchk=true)
float GetBaroPress (void) const

Protected Attributes

Cigi_uint8 RequestID
Cigi_uint8 Humidity
float AirTemp
float Visibility
float HorizWindSp
float VertWindSp
float WindDir
float BaroPress

Friends

class CigiWeatherCondRespV3

Detailed Description

Definition at line 68 of file CigiBaseWeatherCondResp.h.


Constructor & Destructor Documentation

CigiBaseWeatherCondResp::CigiBaseWeatherCondResp (  ) 

General Constructor

Definition at line 64 of file CigiBaseWeatherCondResp.cpp.

00065 {
00066 
00067 }

CigiBaseWeatherCondResp::~CigiBaseWeatherCondResp (  )  [virtual]

General Destructor

Definition at line 74 of file CigiBaseWeatherCondResp.cpp.

00075 {
00076 
00077 }


Member Function Documentation

float CigiBaseWeatherCondResp::GetAirTemp ( void   )  const [inline]

Gets the AirTemp value.

Returns:
the current AirTemp.

Definition at line 190 of file CigiBaseWeatherCondResp.h.

References AirTemp.

00190 { return(AirTemp); }

float CigiBaseWeatherCondResp::GetBaroPress ( void   )  const [inline]

Gets the BaroPress value.

Returns:
the current BaroPress.

Definition at line 279 of file CigiBaseWeatherCondResp.h.

References BaroPress.

00279 { return(BaroPress); }

int CigiBaseWeatherCondResp::GetCnvt ( CigiVersionID CnvtVersion,
CigiCnvtInfoType::Type CnvtInfo 
) [virtual]

A virtual Conversion Information function. This function provides conversion information for this packet.

Parameters:
CnvtVersion - The CIGI version to which this packet is being converted.
CnvtInfo - The information needed for conversion
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Reimplemented from CigiBasePacket.

Definition at line 88 of file CigiBaseWeatherCondResp.cpp.

References CIGI_SUCCESS, CIGI_WEATHER_COND_RESP_PACKET_ID_V3, CigiVersionID::CigiMajorVersion, CigiCnvtInfoType::CigiCnvtInfoStruct::CnvtPacketID, CigiCnvtInfoType::CigiCnvtInfoStruct::ProcID, CigiProcessType::ProcNone, and CigiProcessType::ProcStd.

00090 {
00091    if(CnvtVersion.CigiMajorVersion < 3)
00092    {
00093       CnvtInfo.ProcID = CigiProcessType::ProcNone;
00094       CnvtInfo.CnvtPacketID = 0;
00095    }
00096    else
00097    {
00098       CnvtInfo.ProcID = CigiProcessType::ProcStd;
00099       CnvtInfo.CnvtPacketID = CIGI_WEATHER_COND_RESP_PACKET_ID_V3;
00100    }
00101 
00102    return(CIGI_SUCCESS);
00103 }

float CigiBaseWeatherCondResp::GetHorizWindSp ( void   )  const [inline]

Gets the HorizWindSp value.

Returns:
the current HorizWindSp.

Definition at line 224 of file CigiBaseWeatherCondResp.h.

References HorizWindSp.

00224 { return(HorizWindSp); }

Cigi_uint8 CigiBaseWeatherCondResp::GetHumidity ( void   )  const [inline]

Gets the Humidity value.

Returns:
the current Humidity.

Definition at line 169 of file CigiBaseWeatherCondResp.h.

References Humidity.

00169 { return(Humidity); }

Cigi_uint8 CigiBaseWeatherCondResp::GetRequestID ( void   )  const [inline]

Gets the RequestID value.

Returns:
the current RequestID.

Definition at line 152 of file CigiBaseWeatherCondResp.h.

References RequestID.

00152 { return(RequestID); }

float CigiBaseWeatherCondResp::GetVertWindSp ( void   )  const [inline]

Gets the VertWindSp value.

Returns:
the current VertWindSp.

Definition at line 245 of file CigiBaseWeatherCondResp.h.

References VertWindSp.

00245 { return(VertWindSp); }

float CigiBaseWeatherCondResp::GetVisibility ( void   )  const [inline]

Gets the Visibility value.

Returns:
the current Visibility.

Definition at line 207 of file CigiBaseWeatherCondResp.h.

References Visibility.

00207 { return(Visibility); }

float CigiBaseWeatherCondResp::GetWindDir ( void   )  const [inline]

Gets the WindDir value.

Returns:
the current WindDir.

Definition at line 262 of file CigiBaseWeatherCondResp.h.

References WindDir.

00262 { return(WindDir); }

virtual int CigiBaseWeatherCondResp::Pack ( CigiBasePacket Base,
Cigi_uint8 Buff,
void *  Spec 
) const [pure virtual]

A pure virtual Pack function. This function is not implemented in this class.

Parameters:
Base - A pointer to the instance of the packet to be packed. (Downcast to CigiBasePacket)
Buff - A pointer to the current pack point.
Spec - A pointer to special data.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Implements CigiBasePacket.

Implemented in CigiWeatherCondRespV3.

int CigiBaseWeatherCondResp::SetAirTemp ( const float  AirTempIn,
bool  bndchk = true 
) [inline]

Sets the AirTemp with bound checking control

Parameters:
AirTempIn - air temperature
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 181 of file CigiBaseWeatherCondResp.h.

References AirTemp, and CIGI_SUCCESS.

00182    {
00183       AirTemp = AirTempIn;
00184       return(CIGI_SUCCESS);
00185    }

int CigiBaseWeatherCondResp::SetBaroPress ( const float  BaroPressIn,
bool  bndchk = true 
)

Sets the BaroPress with bound checking control

Parameters:
BaroPressIn - Barometric pressure
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 201 of file CigiBaseWeatherCondResp.cpp.

References BaroPress, CIGI_ERROR_VALUE_OUT_OF_RANGE, and CIGI_SUCCESS.

00202 {
00203 
00204 #ifndef CIGI_NO_BND_CHK
00205    if(bndchk && (BaroPressIn < 0.0))
00206    {
00207 #ifndef CIGI_NO_EXCEPT
00208       throw CigiValueOutOfRangeException("BaroPress",(float)BaroPressIn,">",0.0);
00209 #endif
00210       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00211    }
00212 #endif
00213 
00214    BaroPress = BaroPressIn;
00215    return(CIGI_SUCCESS);
00216 
00217 }

int CigiBaseWeatherCondResp::SetHorizWindSp ( const float  HorizWindSpIn,
bool  bndchk = true 
)

Sets the HorizWindSp with bound checking control

Parameters:
HorizWindSpIn - Horizontal wind speed
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 157 of file CigiBaseWeatherCondResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and HorizWindSp.

00158 {
00159 
00160 #ifndef CIGI_NO_BND_CHK
00161    if(bndchk && (HorizWindSpIn < 0.0))
00162    {
00163 #ifndef CIGI_NO_EXCEPT
00164       throw CigiValueOutOfRangeException("HorizWindSp",(float)HorizWindSpIn,">",0.0);
00165 #endif
00166       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00167    }
00168 #endif
00169 
00170    HorizWindSp = HorizWindSpIn;
00171    return(CIGI_SUCCESS);
00172 
00173 }

int CigiBaseWeatherCondResp::SetHumidity ( const Cigi_uint8  HumidityIn,
bool  bndchk = true 
)

Sets the Humidity with bound checking control

Parameters:
HumidityIn - Humidity
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 113 of file CigiBaseWeatherCondResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Humidity.

00114 {
00115 
00116 #ifndef CIGI_NO_BND_CHK
00117    if(bndchk && ((HumidityIn < 0)||(HumidityIn > 100)))
00118    {
00119 #ifndef CIGI_NO_EXCEPT
00120       throw CigiValueOutOfRangeException("Humidity",(Cigi_uint8)HumidityIn,0,100);
00121 #endif
00122       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00123    }
00124 #endif
00125 
00126    Humidity = HumidityIn;
00127    return(CIGI_SUCCESS);
00128 
00129 }

int CigiBaseWeatherCondResp::SetRequestID ( const Cigi_uint8  RequestIDIn,
bool  bndchk = true 
) [inline]

Sets the RequestID with bound checking control

Parameters:
RequestIDIn - Request ID
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 143 of file CigiBaseWeatherCondResp.h.

References CIGI_SUCCESS, and RequestID.

00144    {
00145       RequestID = RequestIDIn;
00146       return(CIGI_SUCCESS);
00147    }

int CigiBaseWeatherCondResp::SetVertWindSp ( const float  VertWindSpIn,
bool  bndchk = true 
) [inline]

Sets the VertWindSp with bound checking control

Parameters:
VertWindSpIn - Vertical wind speed
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 236 of file CigiBaseWeatherCondResp.h.

References CIGI_SUCCESS, and VertWindSp.

00237    {
00238       VertWindSp = VertWindSpIn;
00239       return(CIGI_SUCCESS);
00240    }

int CigiBaseWeatherCondResp::SetVisibility ( const float  VisibilityIn,
bool  bndchk = true 
)

Sets the Visibility with bound checking control

Parameters:
VisibilityIn - Visibility range
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 135 of file CigiBaseWeatherCondResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Visibility.

00136 {
00137 
00138 #ifndef CIGI_NO_BND_CHK
00139    if(bndchk && (VisibilityIn < 0.0))
00140    {
00141 #ifndef CIGI_NO_EXCEPT
00142       throw CigiValueOutOfRangeException("Visibility",(float)VisibilityIn,">",0.0);
00143 #endif
00144       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00145    }
00146 #endif
00147 
00148    Visibility = VisibilityIn;
00149    return(CIGI_SUCCESS);
00150 
00151 }

int CigiBaseWeatherCondResp::SetWindDir ( const float  WindDirIn,
bool  bndchk = true 
)

Sets the WindDir with bound checking control

Parameters:
WindDirIn - Wind direction
bndchk - Enables (true) or disables (false) bounds checking.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Definition at line 179 of file CigiBaseWeatherCondResp.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and WindDir.

00180 {
00181 
00182 #ifndef CIGI_NO_BND_CHK
00183    if(bndchk && ((WindDirIn < 0.0)||(WindDirIn > 360.0)))
00184    {
00185 #ifndef CIGI_NO_EXCEPT
00186       throw CigiValueOutOfRangeException("WindDir",(float)WindDirIn,0.0,360.0);
00187 #endif
00188       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00189    }
00190 #endif
00191 
00192    WindDir = WindDirIn;
00193    return(CIGI_SUCCESS);
00194 
00195 }

virtual int CigiBaseWeatherCondResp::Unpack ( Cigi_uint8 Buff,
bool  Swap,
void *  Spec 
) [pure virtual]

A pure virtual Unpack function. This function is not implemented in this class.

Parameters:
Buff - A pointer to the current pack point.
Swap - N/A for V1 & V2
Spec - A pointer to special data.
Returns:
This returns CIGI_SUCCESS or an error code defined in CigiErrorCodes.h

Implements CigiBasePacket.

Implemented in CigiWeatherCondRespV3.


Friends And Related Function Documentation

friend class CigiWeatherCondRespV3 [friend]

Definition at line 71 of file CigiBaseWeatherCondResp.h.


Member Data Documentation

float CigiBaseWeatherCondResp::AirTemp [protected]

AirTemp
Air temperature

Definition at line 302 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetAirTemp(), CigiWeatherCondRespV3::Pack(), SetAirTemp(), and CigiWeatherCondRespV3::Unpack().

float CigiBaseWeatherCondResp::BaroPress [protected]

BaroPress
Barometric pressure

Definition at line 332 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetBaroPress(), CigiWeatherCondRespV3::Pack(), SetBaroPress(), and CigiWeatherCondRespV3::Unpack().

float CigiBaseWeatherCondResp::HorizWindSp [protected]

HorizWindSp
Horizontal wind speed

Definition at line 314 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetHorizWindSp(), CigiWeatherCondRespV3::Pack(), SetHorizWindSp(), and CigiWeatherCondRespV3::Unpack().

Cigi_uint8 CigiBaseWeatherCondResp::Humidity [protected]

Humidity

Definition at line 296 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetHumidity(), CigiWeatherCondRespV3::Pack(), SetHumidity(), and CigiWeatherCondRespV3::Unpack().

Cigi_uint8 CigiBaseWeatherCondResp::RequestID [protected]

RequestID
Request ID

Definition at line 291 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetRequestID(), CigiWeatherCondRespV3::Pack(), SetRequestID(), and CigiWeatherCondRespV3::Unpack().

float CigiBaseWeatherCondResp::VertWindSp [protected]

VertWindSp
Vertical wind speed

Definition at line 320 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetVertWindSp(), CigiWeatherCondRespV3::Pack(), SetVertWindSp(), and CigiWeatherCondRespV3::Unpack().

float CigiBaseWeatherCondResp::Visibility [protected]

Visibility
Visibility range

Definition at line 308 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetVisibility(), CigiWeatherCondRespV3::Pack(), SetVisibility(), and CigiWeatherCondRespV3::Unpack().

float CigiBaseWeatherCondResp::WindDir [protected]

WindDir
Wind direction

Definition at line 326 of file CigiBaseWeatherCondResp.h.

Referenced by CigiWeatherCondRespV3::CigiWeatherCondRespV3(), GetWindDir(), CigiWeatherCondRespV3::Pack(), SetWindDir(), and CigiWeatherCondRespV3::Unpack().


The documentation for this class was generated from the following files:
Generated on Wed Apr 29 09:00:06 2009 for CCL by  doxygen 1.4.7