CigiBaseShortArtPartCtrl.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_SHORT_ART_PART_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_SHORT_ART_PART_CTRL_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_SHORT_ART_PART_CTRL_PACKET_ID_V3 7
00065 #define CIGI_SHORT_ART_PART_CTRL_PACKET_SIZE_V3 16
00066 
00067 
00068 class CigiShortArtPartCtrlV3;
00069 class CigiArtPartCtrlV3;
00070 
00071 
00072 class CIGI_SPEC CigiBaseShortArtPartCtrl : public CigiBasePacket
00073 {
00074 
00075 friend class CigiShortArtPartCtrlV3;
00076 
00077 public:
00078 
00079    //=========================================================
00082    enum DofSelectGrp
00083    {
00084       NotUsed=0,
00085       Xoff=1,
00086       Yoff=2,
00087       Zoff=3,
00088       Yaw=4,
00089       Pitch=5,
00090       Roll=6
00091    };
00092 
00093 
00094 
00095 
00096    //==> Management
00097 
00098    //=========================================================
00101    CigiBaseShortArtPartCtrl();
00102 
00103    //=========================================================
00106    virtual ~CigiBaseShortArtPartCtrl();
00107 
00108 
00109    //==> Buffer Packing/Unpacking
00110 
00111    //=========================================================
00122    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00123 
00124    //=========================================================
00134    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00135 
00136    //=========================================================
00148         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00149                        CigiCnvtInfoType::Type &CnvtInfo);
00150 
00151    //=========================================================
00166         int SpecialConversion(CigiVersionID &CnvtVersion,
00167                          Cigi_uint8 ArtPartID,
00168                          CigiArtPartCtrlV3 *ArtPart);
00169 
00170 
00171 
00172    //==> Accessing Member Variable Values functions
00173 
00174    //+> EntityID
00175 
00176    //=========================================================
00183    int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00184    {
00185       EntityID = EntityIDIn;
00186       return(CIGI_SUCCESS);
00187    }
00188 
00189    //=========================================================
00192    Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00193 
00194 
00195    //+> ArtPart1
00196 
00197    //=========================================================
00204    int SetArtPart1(const Cigi_uint8 ArtPart1In, bool bndchk=true)
00205    {
00206       ArtPart1 = ArtPart1In;
00207       return(CIGI_SUCCESS);
00208    }
00209 
00210    //=========================================================
00213    Cigi_uint8 GetArtPart1(void) const { return(ArtPart1); }
00214 
00215 
00216    //+> ArtPart2
00217 
00218    //=========================================================
00225    int SetArtPart2(const Cigi_uint8 ArtPart2In, bool bndchk=true)
00226    {
00227       ArtPart2 = ArtPart2In;
00228       return(CIGI_SUCCESS);
00229    }
00230 
00231    //=========================================================
00234    Cigi_uint8 GetArtPart2(void) const { return(ArtPart2); }
00235 
00236 
00237    //+> DofSelect1
00238 
00239    //=========================================================
00253    int SetDofSelect1(const DofSelectGrp DofSelect1In, bool bndchk=true);
00254 
00255    //=========================================================
00258    DofSelectGrp GetDofSelect1(void) const { return(DofSelect1); }
00259 
00260 
00261    //+> DofSelect2
00262 
00263    //=========================================================
00277    int SetDofSelect2(const DofSelectGrp DofSelect2In, bool bndchk=true);
00278 
00279    //=========================================================
00282    DofSelectGrp GetDofSelect2(void) const { return(DofSelect2); }
00283 
00284 
00285    //+> ArtPart1En
00286 
00287    //=========================================================
00294    int SetArtPart1En(const bool ArtPart1EnIn, bool bndchk=true)
00295    {
00296       ArtPart1En = ArtPart1EnIn;
00297       return(CIGI_SUCCESS);
00298    }
00299 
00300    //=========================================================
00303    bool GetArtPart1En(void) const { return(ArtPart1En); }
00304 
00305 
00306    //+> ArtPart2En
00307 
00308    //=========================================================
00315    int SetArtPart2En(const bool ArtPart2EnIn, bool bndchk=true)
00316    {
00317       ArtPart2En = ArtPart2EnIn;
00318       return(CIGI_SUCCESS);
00319    }
00320 
00321    //=========================================================
00324    bool GetArtPart2En(void) const { return(ArtPart2En); }
00325 
00326 
00327    //+> Dof1
00328 
00329    //=========================================================
00336    int SetDof1(const float Dof1In, bool bndchk=true)
00337    {
00338       Dof1 = Dof1In;
00339       return(CIGI_SUCCESS);
00340    }
00341 
00342    //=========================================================
00345    float GetDof1(void) const { return(Dof1); }
00346 
00347 
00348    //+> Dof2
00349 
00350    //=========================================================
00357    int SetDof2(const float Dof2In, bool bndchk=true)
00358    {
00359       Dof2 = Dof2In;
00360       return(CIGI_SUCCESS);
00361    }
00362 
00363    //=========================================================
00366    float GetDof2(void) const { return(Dof2); }
00367 
00368 
00369 
00370 protected:
00371 
00372    //==> Member variables
00373 
00374    //=========================================================
00378    Cigi_uint16 EntityID;
00379 
00380    //=========================================================
00384    Cigi_uint8 ArtPart1;
00385 
00386    //=========================================================
00390    Cigi_uint8 ArtPart2;
00391 
00392    //=========================================================
00404    DofSelectGrp DofSelect1;
00405 
00406    //=========================================================
00418    DofSelectGrp DofSelect2;
00419 
00420    //=========================================================
00424    bool ArtPart1En;
00425 
00426    //=========================================================
00430    bool ArtPart2En;
00431 
00432    //=========================================================
00436    float Dof1;
00437 
00438    //=========================================================
00442    float Dof2;
00443 
00444 
00445 };
00446 
00447 #endif // #if !defined(_CIGI_BASE_SHORT_ART_PART_CTRL_INCLUDED_)

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