Hauptseite | Klassenhierarchie | Auflistung der Klassen | Auflistung der Dateien | Klassen-Elemente | Datei-Elemente | Zusätzliche Informationen

detectorcontroller.h

gehe zur Dokumentation dieser Datei
00001 /*////////////////////////////////////////////////////////////////////////////// 00002 // // 00003 // DETECTORCONTROLLER.H // 00004 // // 00005 // Subsystem : Detektornutzung / Hardwarezugriff // 00006 //----------------------------------------------------------------------------// 00007 // Autoren: René Harder, Alexander Paschold (2003) // 00008 // // 00009 // Stand : 23.05.2003 // 00010 // letzter vollständiger Test: // 00011 // // 00013 00014 #ifndef _DETECTORCONTROLLER_H 00015 #define _DETECTORCONTROLLER_H 00016 00017 #include "hardware\hwio.h" 00018 00019 #ifndef _COUNTERCLASS 00020 #if defined (Build_Counters) 00021 #define _COUNTERCLASS __declspec(dllexport) 00022 #elif defined(Use_Counters) 00023 #define _COUNTERCLASS __declspec(dllimport) 00024 #else 00025 #define _COUNTERCLASS 00026 #endif 00027 #endif 00028 00029 00031 // Controller für BraunPsd 00032 class _COUNTERCLASS TBraunPsdController : public Controller 00033 { 00034 private: 00035 BraunPsdIo* SpecialHardware; 00036 00037 public: 00038 TBraunPsdController(EDeviceType DeviceID, LPTSTR HardwareID, DeviceList* Devices); 00039 virtual ~TBraunPsdController(); 00040 00041 virtual BOOL Check(); 00042 00043 BOOL SetTimeout(unsigned long Cycles); 00044 BOOL GetData(IrpParamsGetData *Params); 00045 }; 00046 00048 //Controller für Radicon 00049 class _COUNTERCLASS TRadiconController : public Controller 00050 { 00051 public: 00053 enum EReadoutMode 00054 { 00055 final, // receive result time and pulses 00056 intermediate // receive current time and pulses 00057 }; 00058 00060 enum EOperationMode 00061 { 00062 fixedExposureCounts, // count pulses during exposure time 00063 fixedImpulseCounts, // count time when number of pulses is set 00064 intensimeter, // intensimeter 00065 stop // stop controller 00066 }; 00067 00068 00069 TRadiconController(EDeviceType DeviceID, LPTSTR HardwareID, DeviceList* Devices); 00070 virtual ~TRadiconController(); 00071 00072 virtual BOOL Check(); 00073 00074 int UploadFirmware(void); 00075 int SetParameters(unsigned short upperThreshold, unsigned short lowerThreshold, 00076 int highvoltage, double exposureTime, unsigned long impulseCount, 00077 BOOL bSound); 00078 int Execute(EOperationMode mode); 00079 int GetValues(EReadoutMode, double *exposureTime, unsigned long *impulseCount); 00080 void reset(); 00081 00082 private: 00083 int TransmitMessage(int nFunctionCode, unsigned char* lpszMessage= 0, int nMessageLength= 0); 00084 int ReceiveMessage(int nFunctionCode, unsigned char* lpszMessage, int nMaxMessageLength, 00085 int& nRealMessageLength); 00086 int TransmitFunctionCode(int nFunctionCode); 00087 BOOL out_byte(unsigned char d); 00088 BOOL in_byte(unsigned char &d); 00089 BOOL IsReadyToRead(); 00090 BOOL IsReadyToWrite(); 00091 DWORD CurrentTime(void); 00092 00093 DWORD controlPort; 00094 DWORD dataPort; 00095 }; 00096 00097 00099 // Controller für Detektor an TAm9513 Steuerkarte 00100 00101 enum EIOCCmd 00102 { 00103 iocSetCounts= 1, 00104 iocSetTimeTicks, 00105 iocStartCounting, 00106 iocStopCounting, 00107 iocIsCountingReady, 00108 iocReadTicks, 00109 iocReadCounts, 00110 iocConfigureAcustic, 00111 iocStopCCDTiming, 00112 iocStartCCDTiming, 00113 iocStartCCDShot 00114 }; 00115 00116 class _COUNTERCLASS TGenericController : public Controller 00117 { 00118 public: 00119 TGenericController(EDeviceType DeviceID, LPTSTR HardwareID, DeviceList* Devices); 00120 virtual ~TGenericController(); 00121 00122 virtual BOOL Check(); 00123 00124 int Init(float fTimeCorrection); 00125 int IOCTL( EIOCCmd, DWORD& ); 00126 int IOCTL( EIOCCmd ); 00127 void DigitalOut( BYTE ); 00128 void DigitalIn( BYTE* ); 00129 void SetSound(BOOL param); //ap - neu !!! 00130 DWORD GetTicksPerSecond( void ); 00131 void ClearToggleOut( BYTE ); 00132 void SetToggleOut( BYTE ); 00133 00134 protected: 00135 BOOL SelectChip(); 00136 void WriteCmd( BYTE cmd ); 00137 void ChooseDataPtr( BYTE group, BYTE reg ); 00138 void WriteData( WORD ); 00139 WORD ReadData( void ); 00140 WORD ReadStatus( void ); 00141 void LoadAndArmC( BYTE ); 00142 void LoadC( BYTE ); 00143 void DisarmAndSaveC( BYTE ); 00144 void DisarmC( BYTE ); 00145 void LatchToHoldC( BYTE ); 00146 void ArmC( BYTE ); 00147 void Reset( void ); 00148 00149 BYTE nbChipId; 00150 00151 private: 00152 float fTimeCorrection; 00153 BOOL SplitNumber( DWORD, WORD&, WORD& ); 00154 00155 BOOL bIsLatched; 00156 BOOL bIsStopped; 00157 WORD wLowTicks; 00158 WORD wHighTicks; 00159 WORD wLowCounts; 00160 WORD wHighCounts; 00161 }; 00162 00163 #endif

Erzeugt am Sat Nov 13 12:48:05 2004 für XCTL32 von doxygen 1.3.7