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

TCamacCrateController.hh

解説を見る。
00001 // =====================================================================
00002 //  $Id: TCamacCrateController.hh,v 1.2 2003/07/30 16:19:09 goiwai Exp $
00003 //  $Name: CLDAQ-1-08-01 $
00004 //
00005 //  $Log: TCamacCrateController.hh,v $
00006 //  Revision 1.2  2003/07/30 16:19:09  goiwai
00007 //  ファイルにコミットログをつけることにしました.
00008 //
00009 // =====================================================================
00010 #ifndef __TCAMACCRATECONTROLLER_HH
00011 #define __TCAMACCRATECONTROLLER_HH
00012 
00013 #include "Tglobals.h"
00014 #include "TModule.hh"
00015 
00016 #define CC7x00_IOC_MAGIC 0xcc
00017 #define IOC_TEST_ONLINE _IO( CC7x00_IOC_MAGIC, 0x02 )
00018 #define IOC_RESET_CRATE _IO( CC7x00_IOC_MAGIC, 0x03 )
00019 #define IOC_SET_Z _IO( CC7x00_IOC_MAGIC, 0x04 )
00020 #define IOC_SET_C _IO( CC7x00_IOC_MAGIC, 0x05 )
00021 #define IOC_SET_I _IO( CC7x00_IOC_MAGIC, 0x06 )
00022 #define IOC_RESET_I _IO( CC7x00_IOC_MAGIC, 0x07 )
00023 #define IOC_SET_EI _IO( CC7x00_IOC_MAGIC, 0x08 )
00024 #define IOC_RESET_EI _IO( CC7x00_IOC_MAGIC, 0x09 )
00025 #define IOC_SET_LI _IO( CC7x00_IOC_MAGIC, 0x0a )
00026 #define IOC_RESET_LI _IO( CC7x00_IOC_MAGIC, 0x0b )
00027 #define IOC_SET_CN _IOW( CC7x00_IOC_MAGIC, 0x0c, TUint )
00028 #define IOC_WAIT_LAM _IOW( CC7x00_IOC_MAGIC, 0x0d, TUint** )
00029 #define IOC_GET_LAM _IOR( CC7x00_IOC_MAGIC, 0x0e, TUint* )
00030 #define IOC_CAM16 _IOR( CC7x00_IOC_MAGIC, 0x0f, struct CamacDriverInterface )
00031 #define IOC_CAM24 _IOR( CC7x00_IOC_MAGIC, 0x10, struct CamacDriverInterface )
00032 
00033 class TCamacCrateController
00034   : public TModule
00035 {
00036 
00037   private:
00038     TcamacCrateController_t theCrateControllerType;
00039     Tint theCrateID;
00040     Tint theFileDescriptor;
00041     Tbool theISA7000;
00042 
00043   public:
00044     TCamacCrateController();
00045     TCamacCrateController( TcamacCrateController_t cctype );
00046     TCamacCrateController( const TCamacCrateController& right );
00047     ~TCamacCrateController();
00048 
00049   public:
00050     Tbool IsOnline();
00051     Tbool IsOpen();
00052     Tvoid Open();
00053     Tvoid Close();
00054     Tint Reset();
00055     Tint SetInhibition();
00056     Tint ReleaseInhibition();
00057     Tint EnableInterrupt();
00058     Tint DisableInterrupt();
00059 
00060   public:
00061     Tint Clear();
00062     Tint Update();
00063     Tint Initialize();
00064     Tvoid FillData( TDataElement& element, Tint channel );
00065 
00066   public:
00067     const TCamacCrateController& operator=( const TCamacCrateController& right );
00068     Tbool operator==( const TCamacCrateController& right ) const;
00069     Tbool operator!=( const TCamacCrateController& right ) const;
00070 
00071   public:
00072     TcamacCrateController_t GetCrateControllerType() const;
00073     Tint GetCrateID() const;
00074     Tint GetFileDescriptor() const;
00075     Tvoid SetCrateControllerType( TcamacCrateController_t type );
00076     Tvoid SetCrateID( Tint crateid );
00077     Tvoid SetFileDescriptor( Tint fd );
00078     Tbool IsISA7000() const;
00079 
00080 };
00081 
00082 inline TcamacCrateController_t TCamacCrateController::GetCrateControllerType() const
00083 {
00084   return( theCrateControllerType );
00085 }
00086 
00087 inline Tint TCamacCrateController::GetCrateID() const
00088 {
00089   return( theCrateID );
00090 }
00091 
00092 inline Tint TCamacCrateController::GetFileDescriptor() const
00093 {
00094   return( theFileDescriptor );
00095 }
00096 
00097 inline Tvoid TCamacCrateController::SetFileDescriptor( Tint fd )
00098 {
00099   theFileDescriptor = fd;
00100   return;
00101 }
00102 
00103 inline Tbool TCamacCrateController::IsISA7000() const
00104 {
00105   return( theISA7000 );
00106 }
00107 
00108 #endif

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