CigiBaseCompCtrl.h

Go to the documentation of this file.
00001 
00057 #if !defined(_CIGI_BASE_COMP_CTRL_INCLUDED_)
00058 #define _CIGI_BASE_COMP_CTRL_INCLUDED_
00059 
00060 #include "CigiBasePacket.h"
00061 
00062 // ====================================================================
00063 // preprocessor definitions
00064 // ====================================================================
00065 
00066 #define CIGI_COMP_CTRL_PACKET_ID_V1 3
00067 #define CIGI_COMP_CTRL_PACKET_SIZE_V1 20
00068 
00069 #define CIGI_COMP_CTRL_PACKET_ID_V2 3
00070 #define CIGI_COMP_CTRL_PACKET_SIZE_V2 20
00071 
00072 #define CIGI_COMP_CTRL_PACKET_ID_V3 4
00073 #define CIGI_COMP_CTRL_PACKET_SIZE_V3 32
00074 
00075 #define CIGI_SHORT_COMP_CTRL_PACKET_ID_V3 5
00076 #define CIGI_SHORT_COMP_CTRL_PACKET_SIZE_V3 16
00077 
00078 #define CIGI_COMP_CTRL_PACKET_ID_V3_3 4
00079 #define CIGI_COMP_CTRL_PACKET_SIZE_V3_3 32
00080 
00081 #define CIGI_SHORT_COMP_CTRL_PACKET_ID_V3_3 5
00082 #define CIGI_SHORT_COMP_CTRL_PACKET_SIZE_V3_3 16
00083 
00084 
00085 
00086 class CigiCompCtrlV1;
00087 class CigiCompCtrlV2;
00088 class CigiCompCtrlV3;
00089 class CigiShortCompCtrlV3;
00090 class CigiCompCtrlV3_3;
00091 class CigiShortCompCtrlV3_3;
00092 
00093 
00094 class CIGI_SPEC CigiBaseCompCtrl : public CigiBasePacket
00095 {
00096 
00097 friend class CigiCompCtrlV1;
00098 friend class CigiCompCtrlV2;
00099 friend class CigiCompCtrlV3;
00100 friend class CigiShortCompCtrlV3;
00101 friend class CigiCompCtrlV3_3;
00102 friend class CigiShortCompCtrlV3_3;
00103 
00104 public:
00105 
00106    //=========================================================
00109    enum CompAssocGrp
00110    {
00111       NoCnvtV1=-1,
00112       Entity=0,
00113       Environment=1,
00114       View=2
00115    };
00116 
00117    //=========================================================
00120    enum CompClassV2Grp
00121    {
00122       NoCnvtV2=-1,
00123       EntityV2=0,
00124       EnvironmentV2=1,
00125       ViewV2=2,
00126       ViewGrpV2=3,
00127       SensorV2=4,
00128       SystemV2=5
00129    };
00130 
00131    //=========================================================
00134    enum CompClassV3Grp
00135    {
00136       NoCnvtV3=-1,
00137       EntityV3=0,
00138       ViewV3=1,
00139       ViewGrpV3=2,
00140       SensorV3=3,
00141       RegionalSeaSurfaceV3=4,
00142       RegionalTerrainSurfaceV3=5,
00143       RegionalLayeredWeatherV3=6,
00144       GlobalSeaSurfaceV3=7,
00145       GlobalTerrainSurfaceV3=8,
00146       GlobalLayeredWeatherV3=9,
00147       AtmosphereV3=10,
00148       CelestialSphereV3=11,
00149       EventV3=12,
00150       SystemV3=13,
00151       SymbolSurfaceV3_3=14,
00152       SymbolV3_3=15
00153    };
00154 
00155    //=========================================================
00158    enum BytePos
00159    {
00160       MSB=3,   // Most significant byte
00161       Ord2=2,  // 2nd order byte
00162       Ord3=1,  // 3rd order byte
00163       LSB=0    // Least significant byte
00164    };
00165 
00166    //=========================================================
00169    enum HalfWordPos
00170    {
00171       MSHW=1,  // Most significant half word
00172       LSHW=0   // least significant half word
00173    };
00174 
00175 
00176 
00177 
00178    //==> Management
00179 
00180    //=========================================================
00183    CigiBaseCompCtrl() { };
00184 
00185    //=========================================================
00188    virtual ~CigiBaseCompCtrl() { };
00189 
00190 
00191    //==> Buffer Packing/Unpacking
00192 
00193    //=========================================================
00204    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00205 
00206    //=========================================================
00216    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00217 
00218    //=========================================================
00230         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00231                        CigiCnvtInfoType::Type &CnvtInfo) =0;
00232 
00233 
00234 
00235    //==> Accessing Member Variable Values functions
00236 
00237    //+> CompID
00238 
00239    //=========================================================
00246    int SetCompID(const Cigi_uint16 CompIDIn, bool bndchk=true)
00247    {
00248       CompID = CompIDIn;
00249       return(CIGI_SUCCESS);
00250    }
00251 
00252    //=========================================================
00255    Cigi_uint16 GetCompID(void) const { return(CompID); }
00256 
00257 
00258 
00259 protected:
00260 
00261    //==> Member variables
00262 
00263    //=========================================================
00267    Cigi_uint16 CompID;
00268 
00269    //=========================================================
00273    Cigi_uint16 InstanceID;
00274 
00275    //=========================================================
00279    Cigi_uint16 EntityID;
00280 
00281    //=========================================================
00285    Cigi_uint8 ViewID;
00286 
00287    //=========================================================
00291    Cigi_uint16 CompState;
00292 
00293    //=========================================================
00301    CompAssocGrp CompAssoc;
00302 
00303    //=========================================================
00314    CompClassV2Grp CompClassV2;
00315 
00316    //=========================================================
00336    CompClassV3Grp CompClassV3;
00337 
00338    //=========================================================
00342    Cigi_uint32 CompData[6];
00343 
00344 
00345 };
00346 
00347 #endif // #if !defined(_CIGI_BASE_COMP_CTRL_INCLUDED_)

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