CigiBaseTerrestrialSurfaceResp.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_TERRESTRIAL_SURFACE_RESP_INCLUDED_)
00056 #define _CIGI_BASE_TERRESTRIAL_SURFACE_RESP_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3 112
00065 #define CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_SIZE_V3 8
00066 
00067 
00068 class CigiTerrestrialSurfaceRespV3;
00069 
00070 
00071 class CIGI_SPEC CigiBaseTerrestrialSurfaceResp : public CigiBasePacket
00072 {
00073 
00074 friend class CigiTerrestrialSurfaceRespV3;
00075 
00076 public:
00077 
00078    //==> Management
00079 
00080    //=========================================================
00083    CigiBaseTerrestrialSurfaceResp() { };
00084 
00085    //=========================================================
00088    virtual ~CigiBaseTerrestrialSurfaceResp() { };
00089 
00090 
00091    //==> Buffer Packing/Unpacking
00092 
00093    //=========================================================
00104    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00105 
00106    //=========================================================
00117    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00118 
00119    //=========================================================
00131         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00132                        CigiCnvtInfoType::Type &CnvtInfo)
00133    {
00134       // V1 & V2 use the same packet id number
00135       if(CnvtVersion.CigiMajorVersion < 3)
00136       {
00137          CnvtInfo.ProcID = CigiProcessType::ProcNone;
00138          CnvtInfo.CnvtPacketID = 0;
00139       }
00140       else
00141       {
00142          CnvtInfo.ProcID = CigiProcessType::ProcStd;
00143          CnvtInfo.CnvtPacketID = CIGI_TERRESTRIAL_SURFACE_RESP_PACKET_ID_V3;
00144       }
00145 
00146       return(CIGI_SUCCESS);
00147    }
00148 
00149 
00150 
00151    //==> Accessing Member Variable Values functions
00152 
00153    //+> RequestID
00154 
00155    //=========================================================
00162    int SetRequestID(const Cigi_uint8 RequestIDIn, bool bndchk=true)
00163    {
00164       RequestID = RequestIDIn;
00165       return(CIGI_SUCCESS);
00166    }
00167 
00168    //=========================================================
00171    Cigi_uint8 GetRequestID(void) const { return(RequestID); }
00172 
00173 
00174    //+> SurfaceConditionID
00175 
00176    //=========================================================
00183    int SetSurfaceConditionID(const Cigi_uint32 SurfaceConditionIDIn, bool bndchk=true)
00184    {
00185       SurfaceConditionID = SurfaceConditionIDIn;
00186       return(CIGI_SUCCESS);
00187    }
00188 
00189    //=========================================================
00192    Cigi_uint32 GetSurfaceConditionID(void) const { return(SurfaceConditionID); }
00193 
00194 
00195 
00196 protected:
00197 
00198    //==> Member variables
00199 
00200    //=========================================================
00204    Cigi_uint8 RequestID;
00205 
00206    //=========================================================
00210    Cigi_uint32 SurfaceConditionID;
00211 
00212 
00213 };
00214 
00215 #endif // #if !defined(_CIGI_BASE_TERRESTRIAL_SURFACE_RESP_INCLUDED_)

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