CigiBaseIGCtrl.h

Go to the documentation of this file.
00001 
00067 #if !defined(_CIGI_BASE_IG_CTRL_INCLUDED_)
00068 #define _CIGI_BASE_IG_CTRL_INCLUDED_
00069 
00070 #include "CigiBasePacket.h"
00071 
00072 // ====================================================================
00073 // preprocessor definitions
00074 // ====================================================================
00075 
00076 #define CIGI_IG_CTRL_PACKET_ID_V1 1
00077 #define CIGI_IG_CTRL_PACKET_SIZE_V1 16
00078 
00079 #define CIGI_IG_CTRL_PACKET_ID_V2 1
00080 #define CIGI_IG_CTRL_PACKET_SIZE_V2 16
00081 
00082 #define CIGI_IG_CTRL_PACKET_ID_V3 1
00083 #define CIGI_IG_CTRL_PACKET_SIZE_V3 16
00084 
00085 #define CIGI_IG_CTRL_PACKET_ID_V3_2 1
00086 #define CIGI_IG_CTRL_PACKET_SIZE_V3_2 24
00087 
00088 #define CIGI_IG_CTRL_PACKET_ID_V3_3 1
00089 #define CIGI_IG_CTRL_PACKET_SIZE_V3_3 24
00090 
00091 
00092 class CigiIGCtrlV1;
00093 class CigiIGCtrlV2;
00094 class CigiIGCtrlV3;
00095 class CigiIGCtrlV3_2;
00096 class CigiIGCtrlV3_3;
00097 
00098 
00099 //=========================================================
00102 class CIGI_SPEC CigiBaseIGCtrl : public CigiBasePacket  
00103 {
00104 
00105 friend class CigiIGCtrlV1;
00106 friend class CigiIGCtrlV2;
00107 friend class CigiIGCtrlV3;
00108 friend class CigiIGCtrlV3_2;
00109 friend class CigiIGCtrlV3_3;
00110 
00111 public:
00112 
00113    //=========================================================
00116    enum IGModeGrp
00117    {
00118       Reset=0,
00119       Standby=0,
00120       Operate=1,
00121       debug=2
00122    };
00123 
00124    //=========================================================
00127    enum TrackDeviceEnGrp
00128    {
00129       Disable=0,
00130       Enable=1
00131    };
00132 
00133 
00134 
00135 
00136    //==> Management
00137 
00138    //=========================================================
00141         CigiBaseIGCtrl();
00142 
00143    //=========================================================
00146         virtual ~CigiBaseIGCtrl();
00147 
00148 
00149    //==> Buffer Packing/Unpacking
00150 
00151    //=========================================================
00162         virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00163 
00164    //=========================================================
00174         virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00175 
00176    //=========================================================
00188         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00189                        CigiCnvtInfoType::Type &CnvtInfo);
00190 
00191 
00192 
00193    //==> Accessing Member Variable Values functions
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 
00229    //+> IG Mode
00230 
00231    //=========================================================
00238    IGModeGrp GetIGMode(void) const { return(IGMode); }
00239 
00240    //=========================================================
00251         int SetIGMode(IGModeGrp IGModeIn, bool bndchk=true);
00252 
00253 
00254    //+> Frame Counter
00255 
00256    //=========================================================
00260    Cigi_uint32 GetFrameCntr(void) const { return(FrameCntr); }
00261 
00262 
00263 
00264 
00265 protected:
00266 
00267    //==> Member variables
00268 
00269    //=========================================================
00273         bool BSwapEn;
00274 
00275    //=========================================================
00281    Cigi_int8 DatabaseID;
00282 
00283    //=========================================================
00287    Cigi_uint32 FrameCntr;
00288 
00289    //=========================================================
00293    Cigi_uint32 LastRcvdIGFrame;
00294 
00295    //=========================================================
00299    Cigi_uint32 TimeStampV1;
00300 
00301    //=========================================================
00305    float TimeStampV2;
00306 
00307    //=========================================================
00311    Cigi_uint32 TimeStampV3;
00312 
00313    //=========================================================
00318    Cigi_uint16 ByteSwap;
00319 
00320 
00321    //=========================================================
00327    IGModeGrp IGMode;
00328 
00329    //=========================================================
00334    TrackDeviceEnGrp TrackDeviceEn;
00335 
00336    //=========================================================
00341    bool BoresightTrackDevice;
00342 
00343    //=========================================================
00348    bool TimestampValid;
00349 
00350    //=========================================================
00357    bool SmoothingEn;
00358 
00359 
00360 
00361 };
00362 
00363 #endif // !defined(_CIGI_BASE_IG_CTRL_INCLUDED_)

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