CigiBaseEnvCondReq Class Reference

#include <CigiBaseEnvCondReq.h>

Inheritance diagram for CigiBaseEnvCondReq:

CigiBasePacket CigiEnvCondReqV3 List of all members.

Public Types

 Maritime = 1
 Terrestrial = 2
 Weather = 4
 Aerosol = 8
enum  ReqTypeGrp { Maritime = 1, Terrestrial = 2, Weather = 4, Aerosol = 8 }

Public Member Functions

 CigiBaseEnvCondReq ()
virtual ~CigiBaseEnvCondReq ()
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 SetReqType (const Cigi_uint8 ReqTypeIn, bool bndchk=true)
Cigi_uint8 GetReqType (void) const
int SetReqID (const Cigi_uint8 ReqIdIn, bool bndchk=true)
Cigi_uint8 GetReqID (void) const
int SetLat (const double LatIn, bool bndchk=true)
double GetLat (void) const
int SetLon (const double LonIn, bool bndchk=true)
double GetLon (void) const
int SetAlt (const double AltIn, bool bndchk=true)
double GetAlt (void) const

Protected Attributes

Cigi_uint8 ReqType
Cigi_uint8 ReqID
double Lat
double Lon
double Alt

Friends

class CigiEnvCondReqV3

Detailed Description

Definition at line 71 of file CigiBaseEnvCondReq.h.


Member Enumeration Documentation

enum CigiBaseEnvCondReq::ReqTypeGrp

The enumeration for the CigiBaseEnvCondReq Group

Enumerator:
Maritime 
Terrestrial 
Weather 
Aerosol 

Definition at line 81 of file CigiBaseEnvCondReq.h.

00082    {
00083       Maritime=1,
00084       Terrestrial=2,
00085       Weather=4,
00086       Aerosol=8
00087    };


Constructor & Destructor Documentation

CigiBaseEnvCondReq::CigiBaseEnvCondReq (  ) 

General Constructor

Definition at line 64 of file CigiBaseEnvCondReq.cpp.

00065 {
00066 
00067 }

CigiBaseEnvCondReq::~CigiBaseEnvCondReq (  )  [virtual]

General Destructor

Definition at line 74 of file CigiBaseEnvCondReq.cpp.

00075 {
00076 
00077 }


Member Function Documentation

double CigiBaseEnvCondReq::GetAlt ( void   )  const [inline]

Gets the Alt value.

Returns:
the current Alt.

Definition at line 240 of file CigiBaseEnvCondReq.h.

References Alt.

00240 { return(Alt); }

int CigiBaseEnvCondReq::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 CigiBaseEnvCondReq.cpp.

References CIGI_ENV_COND_REQ_PACKET_ID_V3, CIGI_SUCCESS, 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_ENV_COND_REQ_PACKET_ID_V3;
00100    }
00101 
00102    return(CIGI_SUCCESS);
00103 }

double CigiBaseEnvCondReq::GetLat ( void   )  const [inline]

Gets the Lat value.

Returns:
the current Lat.

Definition at line 202 of file CigiBaseEnvCondReq.h.

References Lat.

00202 { return(Lat); }

double CigiBaseEnvCondReq::GetLon ( void   )  const [inline]

Gets the Lon value.

Returns:
the current Lon.

Definition at line 219 of file CigiBaseEnvCondReq.h.

References Lon.

00219 { return(Lon); }

Cigi_uint8 CigiBaseEnvCondReq::GetReqID ( void   )  const [inline]

Gets the Lat value.

Returns:
the current Lat.

Definition at line 185 of file CigiBaseEnvCondReq.h.

References ReqID.

00185 { return(ReqID); }

Cigi_uint8 CigiBaseEnvCondReq::GetReqType ( void   )  const [inline]

Gets the Lat value.

Returns:
the current Lat.

Definition at line 165 of file CigiBaseEnvCondReq.h.

References ReqType.

00165 { return(ReqType); }

virtual int CigiBaseEnvCondReq::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 CigiEnvCondReqV3.

int CigiBaseEnvCondReq::SetAlt ( const double  AltIn,
bool  bndchk = true 
) [inline]

Sets the Alt with bound checking control

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

Definition at line 231 of file CigiBaseEnvCondReq.h.

References Alt, and CIGI_SUCCESS.

00232    {
00233       Alt = AltIn;
00234       return(CIGI_SUCCESS);
00235    }

int CigiBaseEnvCondReq::SetLat ( const double  LatIn,
bool  bndchk = true 
)

Sets the Lat with bound checking control

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

Definition at line 136 of file CigiBaseEnvCondReq.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Lat.

00137 {
00138 
00139 #ifndef CIGI_NO_BND_CHK
00140    if(bndchk && ((LatIn < -90.0)||(LatIn > 90.0)))
00141    {
00142 #ifndef CIGI_NO_EXCEPT
00143       throw CigiValueOutOfRangeException("Lat",(double)LatIn,-90.0,90.0);
00144 #endif
00145       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00146    }
00147 #endif
00148 
00149    Lat = LatIn;
00150    return(CIGI_SUCCESS);
00151 
00152 }

int CigiBaseEnvCondReq::SetLon ( const double  LonIn,
bool  bndchk = true 
)

Sets the Lon with bound checking control

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

Definition at line 158 of file CigiBaseEnvCondReq.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and Lon.

00159 {
00160 
00161 #ifndef CIGI_NO_BND_CHK
00162    if(bndchk && ((LonIn < -180.0)||(LonIn > 180.0)))
00163    {
00164 #ifndef CIGI_NO_EXCEPT
00165       throw CigiValueOutOfRangeException("Lon",(double)LonIn,-180.0,180.0);
00166 #endif
00167       return(CIGI_ERROR_VALUE_OUT_OF_RANGE);
00168    }
00169 #endif
00170 
00171    Lon = LonIn;
00172    return(CIGI_SUCCESS);
00173 
00174 }

int CigiBaseEnvCondReq::SetReqID ( const Cigi_uint8  ReqIdIn,
bool  bndchk = true 
) [inline]

Sets the ReqType with bound checking control

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

Definition at line 176 of file CigiBaseEnvCondReq.h.

References CIGI_SUCCESS, and ReqID.

00177    {
00178       ReqID = ReqIdIn;
00179       return(CIGI_SUCCESS);
00180    }

int CigiBaseEnvCondReq::SetReqType ( const Cigi_uint8  ReqTypeIn,
bool  bndchk = true 
)

Sets the ReqType with bound checking control

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

Definition at line 114 of file CigiBaseEnvCondReq.cpp.

References CIGI_ERROR_VALUE_OUT_OF_RANGE, CIGI_SUCCESS, and ReqType.

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

virtual int CigiBaseEnvCondReq::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 CigiEnvCondReqV3.


Friends And Related Function Documentation

friend class CigiEnvCondReqV3 [friend]

Definition at line 74 of file CigiBaseEnvCondReq.h.


Member Data Documentation

double CigiBaseEnvCondReq::Alt [protected]

Alt
Altitude

Definition at line 283 of file CigiBaseEnvCondReq.h.

Referenced by CigiEnvCondReqV3::CigiEnvCondReqV3(), GetAlt(), CigiEnvCondReqV3::Pack(), SetAlt(), and CigiEnvCondReqV3::Unpack().

double CigiBaseEnvCondReq::Lat [protected]

Lat
Latitude

Definition at line 271 of file CigiBaseEnvCondReq.h.

Referenced by CigiEnvCondReqV3::CigiEnvCondReqV3(), GetLat(), CigiEnvCondReqV3::Pack(), SetLat(), and CigiEnvCondReqV3::Unpack().

double CigiBaseEnvCondReq::Lon [protected]

Lon
Longitude

Definition at line 277 of file CigiBaseEnvCondReq.h.

Referenced by CigiEnvCondReqV3::CigiEnvCondReqV3(), GetLon(), CigiEnvCondReqV3::Pack(), SetLon(), and CigiEnvCondReqV3::Unpack().

Cigi_uint8 CigiBaseEnvCondReq::ReqID [protected]

Request ID
The Request ID

Definition at line 265 of file CigiBaseEnvCondReq.h.

Referenced by CigiEnvCondReqV3::CigiEnvCondReqV3(), GetReqID(), CigiEnvCondReqV3::Pack(), SetReqID(), and CigiEnvCondReqV3::Unpack().

Cigi_uint8 CigiBaseEnvCondReq::ReqType [protected]

ReqType
Type of conditions or concentrations for which data is requested.
These can be OR'ed together to request more than 1 type of data. 1-Maritime
2-Terrestrial
4-Weather
8-Aerosol

Definition at line 259 of file CigiBaseEnvCondReq.h.

Referenced by CigiEnvCondReqV3::CigiEnvCondReqV3(), GetReqType(), CigiEnvCondReqV3::Pack(), SetReqType(), and CigiEnvCondReqV3::Unpack().


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