CigiBasePositionResp.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_POSITION_RESP_INCLUDED_)
00056 #define _CIGI_BASE_POSITION_RESP_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_POSITION_RESP_PACKET_ID_V3 108
00065 #define CIGI_POSITION_RESP_PACKET_SIZE_V3 48
00066 
00067 
00068 class CigiPositionRespV1;
00069 class CigiPositionRespV2;
00070 class CigiPositionRespV3;
00071 
00072 
00073 class CIGI_SPEC CigiBasePositionResp : public CigiBasePacket
00074 {
00075 
00076 friend class CigiPositionRespV1;
00077 friend class CigiPositionRespV2;
00078 friend class CigiPositionRespV3;
00079 
00080 public:
00081 
00082    //=========================================================
00085    enum ObjectClassGrp
00086    {
00087       Entity=0,
00088       ArtPart=1,
00089       View=2,
00090       ViewGrp=3,
00091       MotionTracker=4
00092    };
00093 
00094    //=========================================================
00097    enum CoordSysGrp
00098    {
00099       Geodetic=0,
00100       ParentEntity=1,
00101       Submodel=2
00102    };
00103 
00104 
00105 
00106 
00107    //==> Management
00108 
00109    //=========================================================
00112    CigiBasePositionResp();
00113 
00114    //=========================================================
00117    virtual ~CigiBasePositionResp();
00118 
00119 
00120    //==> Buffer Packing/Unpacking
00121 
00122    //=========================================================
00133    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00134 
00135    //=========================================================
00145    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00146 
00147    //=========================================================
00159         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00160                        CigiCnvtInfoType::Type &CnvtInfo);
00161 
00162 
00163 
00164    //==> Accessing Member Variable Values functions
00165 
00166    //+> ObjectID
00167 
00168    //=========================================================
00175    int SetObjectID(const Cigi_uint16 ObjectIDIn, bool bndchk=true)
00176    {
00177       ObjectID = ObjectIDIn;
00178       return(CIGI_SUCCESS);
00179    }
00180 
00181    //=========================================================
00184    Cigi_uint16 GetObjectID(void) const { return(ObjectID); }
00185 
00186 
00187    //+> ArtPartID
00188 
00189    //=========================================================
00196    int SetArtPartID(const Cigi_uint8 ArtPartIDIn, bool bndchk=true)
00197    {
00198       ArtPartID = ArtPartIDIn;
00199       return(CIGI_SUCCESS);
00200    }
00201 
00202    //=========================================================
00205    Cigi_uint8 GetArtPartID(void) const { return(ArtPartID); }
00206 
00207 
00208    //+> ObjectClass
00209 
00210    //=========================================================
00222    int SetObjectClass(const ObjectClassGrp ObjectClassIn, bool bndchk=true);
00223 
00224    //=========================================================
00227    ObjectClassGrp GetObjectClass(void) const { return(ObjectClass); }
00228 
00229 
00230    //+> CoordSys
00231 
00232    //=========================================================
00243    int SetCoordSys(const CoordSysGrp CoordSysIn, bool bndchk=true);
00244 
00245    //=========================================================
00248    CoordSysGrp GetCoordSys(void) const { return(CoordSys); }
00249 
00250 
00251    //+> LatOrXoff
00252 
00253    //=========================================================
00260    int SetLatOrXoff(const double LatOrXoffIn, bool bndchk=true)
00261    {
00262       LatOrXoff = LatOrXoffIn;
00263       return(CIGI_SUCCESS);
00264    }
00265 
00266    //=========================================================
00269    double GetLatOrXoff(void) const { return(LatOrXoff); }
00270 
00271 
00272    //+> LonOrYoff
00273 
00274    //=========================================================
00281    int SetLonOrYoff(const double LonOrYoffIn, bool bndchk=true)
00282    {
00283       LonOrYoff = LonOrYoffIn;
00284       return(CIGI_SUCCESS);
00285    }
00286 
00287    //=========================================================
00290    double GetLonOrYoff(void) const { return(LonOrYoff); }
00291 
00292 
00293    //+> AltOrZoff
00294 
00295    //=========================================================
00302    int SetAltOrZoff(const double AltOrZoffIn, bool bndchk=true)
00303    {
00304       AltOrZoff = AltOrZoffIn;
00305       return(CIGI_SUCCESS);
00306    }
00307 
00308    //=========================================================
00311    double GetAltOrZoff(void) const { return(AltOrZoff); }
00312 
00313 
00314    //+> Roll
00315 
00316    //=========================================================
00323    int SetRoll(const float RollIn, bool bndchk=true);
00324 
00325    //=========================================================
00328    float GetRoll(void) const { return(Roll); }
00329 
00330 
00331    //+> Pitch
00332 
00333    //=========================================================
00340    int SetPitch(const float PitchIn, bool bndchk=true);
00341 
00342    //=========================================================
00345    float GetPitch(void) const { return(Pitch); }
00346 
00347 
00348    //+> Yaw
00349 
00350    //=========================================================
00357    int SetYaw(const float YawIn, bool bndchk=true);
00358 
00359    //=========================================================
00362    float GetYaw(void) const { return(Yaw); }
00363 
00364 
00365 
00366 protected:
00367 
00368    //==> Member variables
00369 
00370    //=========================================================
00374    Cigi_uint16 ObjectID;
00375 
00376    //=========================================================
00380    Cigi_uint8 ArtPartID;
00381 
00382    //=========================================================
00392    ObjectClassGrp ObjectClass;
00393 
00394    //=========================================================
00402    CoordSysGrp CoordSys;
00403 
00404    //=========================================================
00408    double LatOrXoff;
00409 
00410    //=========================================================
00414    double LonOrYoff;
00415 
00416    //=========================================================
00420    double AltOrZoff;
00421 
00422    //=========================================================
00425    float Roll;
00426 
00427    //=========================================================
00430    float Pitch;
00431 
00432    //=========================================================
00435    float Yaw;
00436 
00437 
00438 };
00439 
00440 #endif // #if !defined(_CIGI_BASE_POSITION_RESP_INCLUDED_)

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