CigiBaseEnvCondReq.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_ENV_COND_REQ_INCLUDED_)
00056 #define _CIGI_BASE_ENV_COND_REQ_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_ENV_COND_REQ_PACKET_ID_V3 28
00065 #define CIGI_ENV_COND_REQ_PACKET_SIZE_V3 32
00066 
00067 
00068 class CigiEnvCondReqV3;
00069 
00070 
00071 class CIGI_SPEC CigiBaseEnvCondReq : public CigiBasePacket
00072 {
00073 
00074 friend class CigiEnvCondReqV3;
00075 
00076 public:
00077 
00078    //=========================================================
00081    enum ReqTypeGrp
00082    {
00083       Maritime=1,
00084       Terrestrial=2,
00085       Weather=4,
00086       Aerosol=8
00087    };
00088 
00089 
00090 
00091 
00092    //==> Management
00093 
00094    //=========================================================
00097    CigiBaseEnvCondReq();
00098 
00099    //=========================================================
00102    virtual ~CigiBaseEnvCondReq();
00103 
00104 
00105    //==> Buffer Packing/Unpacking
00106 
00107    //=========================================================
00118    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00119 
00120    //=========================================================
00130    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00131 
00132    //=========================================================
00144         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00145                        CigiCnvtInfoType::Type &CnvtInfo);
00146 
00147 
00148 
00149    //==> Accessing Member Variable Values functions
00150 
00151    //+> Request Type
00152 
00153    //=========================================================
00160    int SetReqType(const Cigi_uint8 ReqTypeIn, bool bndchk=true);
00161 
00162    //=========================================================
00165    Cigi_uint8 GetReqType(void) const { return(ReqType); }
00166 
00167    //+> Request ID
00168 
00169    //=========================================================
00176    int SetReqID(const Cigi_uint8 ReqIdIn, bool bndchk=true)
00177    {
00178       ReqID = ReqIdIn;
00179       return(CIGI_SUCCESS);
00180    }
00181 
00182    //=========================================================
00185    Cigi_uint8 GetReqID(void) const { return(ReqID); }
00186 
00187 
00188    //+> Lat
00189 
00190    //=========================================================
00197    int SetLat(const double LatIn, bool bndchk=true);
00198 
00199    //=========================================================
00202    double GetLat(void) const { return(Lat); }
00203 
00204 
00205    //+> Lon
00206 
00207    //=========================================================
00214    int SetLon(const double LonIn, bool bndchk=true);
00215 
00216    //=========================================================
00219    double GetLon(void) const { return(Lon); }
00220 
00221 
00222    //+> Alt
00223 
00224    //=========================================================
00231    int SetAlt(const double AltIn, bool bndchk=true)
00232    {
00233       Alt = AltIn;
00234       return(CIGI_SUCCESS);
00235    }
00236 
00237    //=========================================================
00240    double GetAlt(void) const { return(Alt); }
00241 
00242 
00243 
00244 protected:
00245 
00246    //==> Member variables
00247 
00248    //=========================================================
00259    Cigi_uint8 ReqType;
00260 
00261    //=========================================================
00265    Cigi_uint8 ReqID;
00266 
00267    //=========================================================
00271    double Lat;
00272 
00273    //=========================================================
00277    double Lon;
00278 
00279    //=========================================================
00283    double Alt;
00284 
00285 
00286 };
00287 
00288 #endif // #if !defined(_CIGI_BASE_ENV_COND_REQ_INCLUDED_)

Generated on Wed Apr 29 08:59:55 2009 for CCL by  doxygen 1.4.7