CigiBaseSOF.h

Go to the documentation of this file.
00001 
00068 #if !defined(_CIGI_BASE_SOF_INCLUDED_)
00069 #define _CIGI_BASE_SOF_INCLUDED_
00070 
00071 
00072 #include "CigiBasePacket.h"
00073 
00074 // ====================================================================
00075 // preprocessor definitions
00076 // ====================================================================
00077 
00078 #define CIGI_SOF_PACKET_ID_V1 101
00079 #define CIGI_SOF_PACKET_SIZE_V1 12
00080 
00081 #define CIGI_SOF_PACKET_ID_V2 101
00082 #define CIGI_SOF_PACKET_SIZE_V2 16
00083 
00084 #define CIGI_SOF_PACKET_ID_V3 101
00085 #define CIGI_SOF_PACKET_SIZE_V3 16
00086 
00087 #define CIGI_SOF_PACKET_ID_V3_2 101
00088 #define CIGI_SOF_PACKET_SIZE_V3_2 24
00089 
00090 
00091 class CigiSOFV1;
00092 class CigiSOFV2;
00093 class CigiSOFV3;
00094 class CigiSOFV3_2;
00095 
00096 
00097 //=========================================================
00100 
00101 class CIGI_SPEC CigiBaseSOF : public CigiBasePacket
00102 {
00103 
00104 friend class CigiSOFV1;
00105 friend class CigiSOFV2;
00106 friend class CigiSOFV3;
00107 friend class CigiSOFV3_2;
00108 
00109 public:
00110 
00111    //=========================================================
00114    enum IGModeGrp
00115    {
00116       Reset=0,
00117       Standby=0,
00118       Operate=1,
00119       debug=2,
00120       OfflineMaint=3
00121    };
00122 
00123    //=========================================================
00126    enum EarthRefModelGrp
00127    {
00128       WGS84=0,
00129       HostDefined=1
00130    };
00131 
00132 
00133 
00134    //==> Management
00135 
00136    //=========================================================
00139         CigiBaseSOF();
00140 
00141    //=========================================================
00144         virtual ~CigiBaseSOF();
00145 
00146 
00147    //==> Buffer Packing/Unpacking
00148 
00149    //=========================================================
00160         virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00161 
00162    //=========================================================
00172         virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00173 
00174    //=========================================================
00186         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00187                        CigiCnvtInfoType::Type &CnvtInfo);
00188 
00189 
00190 
00191 
00192    //==> Accessing Member Variable Values functions
00193 
00194 
00195    //+> Swap
00196 
00197    //=========================================================
00205    bool GetSwap(void) const { return(BSwapEn); }
00206 
00207 
00208    //+> Database ID
00209 
00210    //=========================================================
00214    Cigi_int8 GetDatabaseID(void) const { return(DatabaseID); }
00215 
00216    //=========================================================
00226         int SetDatabaseID(const Cigi_int8 DataBaseIDIn, bool bndchk=true)
00227    {
00228       DatabaseID = DataBaseIDIn;
00229 
00230       return(CIGI_SUCCESS);
00231    }
00232 
00233 
00234    //+> Frame Counter
00235 
00236    //=========================================================
00240    Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); }
00241 
00242    //=========================================================
00250    int SetFrameCntr(const Cigi_uint32 FrameCntrIn, bool bndchk=true)
00251    {
00252       FrameCntr = FrameCntrIn;
00253 
00254       return(CIGI_SUCCESS);
00255    }
00256 
00257 
00258    //+> IG Mode
00259 
00260    //=========================================================
00268    IGModeGrp GetIGMode(void) const { return(IGMode); }
00269 
00270    //=========================================================
00282         int SetIGMode(IGModeGrp IGModeIn, bool bndchk=true);
00283 
00284 
00285    //+> IG Status
00286 
00287    //=========================================================
00293    Cigi_uint8 GetIGStatus(void) const { return(IGStatus); }
00294 
00295    //=========================================================
00305    int SetIGStatus(Cigi_uint8 IGStatusIn, bool bndchk=true)
00306    {
00307       IGStatus = IGStatusIn;
00308 
00309       return(CIGI_SUCCESS);
00310    }
00311 
00312 
00313 
00314 protected:
00315 
00316    //==> Member variables
00317 
00318    //=========================================================
00322         bool BSwapEn;
00323 
00324    //=========================================================
00333    Cigi_int8 DatabaseID;
00334 
00335    //=========================================================
00341    Cigi_uint8 IGStatus;
00342 
00343    //=========================================================
00347    Cigi_uint32 FrameCntr;
00348 
00349    //=========================================================
00353    Cigi_uint32 LastRcvdHostFrame;
00354 
00355    //=========================================================
00359    float TimeStampV2;
00360 
00361    //=========================================================
00365    Cigi_uint32 TimeStampV3;
00366 
00367    //=========================================================
00372    Cigi_uint16 ByteSwap;
00373 
00374    //=========================================================
00381    IGModeGrp IGMode;
00382 
00383    //=========================================================
00388    EarthRefModelGrp EarthRefModel;
00389 
00390    //=========================================================
00395    bool TimestampValid;
00396 
00397 
00398 
00399 };
00400 
00401 #endif // !defined(_CIGI_BASE_SOF_INCLUDED_)

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