メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TCamacCrateController.hh

解説を見る。
00001 // =====================================================================
00031 // =====================================================================
00032 #ifndef CLDAQ__TCAMACCRATECONTROLLER_HH
00033 #define CLDAQ__TCAMACCRATECONTROLLER_HH
00034 
00035 #include "Tglobals.h"
00036 #include "TModule.hh"
00037 
00038 #define CC7x00_IOC_MAGIC 0xcc
00039 #define IOC_TEST_ONLINE _IO( CC7x00_IOC_MAGIC, 0x02 )
00040 #define IOC_RESET_CRATE _IO( CC7x00_IOC_MAGIC, 0x03 )
00041 #define IOC_SET_Z _IO( CC7x00_IOC_MAGIC, 0x04 )
00042 #define IOC_SET_C _IO( CC7x00_IOC_MAGIC, 0x05 )
00043 #define IOC_SET_I _IO( CC7x00_IOC_MAGIC, 0x06 )
00044 #define IOC_RESET_I _IO( CC7x00_IOC_MAGIC, 0x07 )
00045 #define IOC_SET_EI _IO( CC7x00_IOC_MAGIC, 0x08 )
00046 #define IOC_RESET_EI _IO( CC7x00_IOC_MAGIC, 0x09 )
00047 #define IOC_SET_LI _IO( CC7x00_IOC_MAGIC, 0x0a )
00048 #define IOC_RESET_LI _IO( CC7x00_IOC_MAGIC, 0x0b )
00049 #define IOC_SET_CN _IOW( CC7x00_IOC_MAGIC, 0x0c, TUint )
00050 #define IOC_WAIT_LAM _IOW( CC7x00_IOC_MAGIC, 0x0d, TUint** )
00051 #define IOC_GET_LAM _IOR( CC7x00_IOC_MAGIC, 0x0e, TUint* )
00052 #define IOC_CAM16 _IOR( CC7x00_IOC_MAGIC, 0x0f, struct TCamacDriverInterface )
00053 #define IOC_CAM24 _IOR( CC7x00_IOC_MAGIC, 0x10, struct TCamacDriverInterface )
00054 
00055 
00075 class TCamacCrateController
00076   : public TModule
00077 {
00078 
00079   private:
00080     TcamacCrateController_t theCrateControllerType;
00081     Tint theCrateID;
00082     Tint theFileDescriptor;
00083     Tbool theISA7000;
00084 
00085   public:
00086     TCamacCrateController();
00087     TCamacCrateController( TcamacCrateController_t cctype );
00088     TCamacCrateController( const TCamacCrateController& right );
00089     ~TCamacCrateController();
00090 
00091   public:
00092     Tbool IsOnline();
00093     Tbool IsOpen();
00094     Tvoid Open();
00095     Tvoid Close();
00096     Tint Reset();
00097     Tint SetInhibition();
00098     Tint ReleaseInhibition();
00099     Tint EnableInterrupt();
00100     Tint DisableInterrupt();
00101 
00102   public:
00103     Tint Clear();
00104     Tint Update();
00105     Tint Initialize();
00106     Tvoid FillData( TDataElement& element, Tint channel );
00107 
00108   public:
00109     const TCamacCrateController& operator=( const TCamacCrateController& right );
00110     Tbool operator==( const TCamacCrateController& right ) const;
00111     Tbool operator!=( const TCamacCrateController& right ) const;
00112 
00113   public:
00114     TcamacCrateController_t GetCrateControllerType() const;
00115     Tint GetCrateID() const;
00116     Tint GetFileDescriptor() const;
00117     Tvoid SetCrateControllerType( TcamacCrateController_t type );
00118     Tvoid SetCrateID( Tint crateid );
00119     Tvoid SetFileDescriptor( Tint fd );
00120     Tbool IsISA7000() const;
00121 
00122 };
00123 
00124 inline TcamacCrateController_t TCamacCrateController::GetCrateControllerType() const
00125 {
00126   return theCrateControllerType;
00127 }
00128 
00129 inline Tint TCamacCrateController::GetCrateID() const
00130 {
00131   return theCrateID;
00132 }
00133 
00134 inline Tint TCamacCrateController::GetFileDescriptor() const
00135 {
00136   return theFileDescriptor;
00137 }
00138 
00139 inline Tvoid TCamacCrateController::SetFileDescriptor( Tint fd )
00140 {
00141   theFileDescriptor = fd;
00142   return;
00143 }
00144 
00145 inline Tbool TCamacCrateController::IsISA7000() const
00146 {
00147   return theISA7000;
00148 }
00149 
00150 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.12.0)
Go IWAI <goiwai@users.sourceforge.jp>