areaDetector  3-5-0
EPICS areaDetector framework
Dexela.h
Go to the documentation of this file.
1 /* Dexela.h
2  *
3  * This is a driver for the Perkin Elmer Dexela detectors
4  *
5  *
6  * Author: Mark Rivers
7  *
8  * Created: 02/07/2015
9  *
10  * Current author: Mark Rivers
11  *
12  */
13 
14 #ifndef Dexela_H
15 #define Dexela_H
16 
17 #define DRIVER_VERSION "2.2"
18 
19 #include "ADDriver.h"
20 #include "DexelaDetector.h"
21 
22 #define DEX_SerialNumberString "DEX_SERIAL_NUMBER"
23 #define DEX_BinningModeString "DEX_BINNING_MODE"
24 #define DEX_FullWellModeString "DEX_FULL_WELL_MODE"
25 #define DEX_CorrectionsDirectoryString "DEX_CORRECTIONS_DIRECTORY"
26 #define DEX_AcquireOffsetString "DEX_ACQUIRE_OFFSET"
27 #define DEX_NumOffsetFramesString "DEX_NUM_OFFSET_FRAMES"
28 #define DEX_CurrentOffsetFrameString "DEX_CURRENT_OFFSET_FRAME"
29 #define DEX_UseOffsetString "DEX_USE_OFFSET"
30 #define DEX_OffsetAvailableString "DEX_OFFSET_AVAILABLE"
31 #define DEX_OffsetFileString "DEX_OFFSET_FILE"
32 #define DEX_LoadOffsetFileString "DEX_LOAD_OFFSET_FILE"
33 #define DEX_SaveOffsetFileString "DEX_SAVE_OFFSET_FILE"
34 #define DEX_OffsetConstantString "DEX_OFFSET_CONSTANT"
35 #define DEX_AcquireGainString "DEX_ACQUIRE_GAIN"
36 #define DEX_NumGainFramesString "DEX_NUM_GAIN_FRAMES"
37 #define DEX_CurrentGainFrameString "DEX_CURRENT_GAIN_FRAME"
38 #define DEX_UseGainString "DEX_USE_GAIN"
39 #define DEX_GainAvailableString "DEX_GAIN_AVAILABLE"
40 #define DEX_GainFileString "DEX_GAIN_FILE"
41 #define DEX_LoadGainFileString "DEX_LOAD_GAIN_FILE"
42 #define DEX_SaveGainFileString "DEX_SAVE_GAIN_FILE"
43 #define DEX_UseDefectMapString "DEX_USE_DEFECT_MAP"
44 #define DEX_DefectMapAvailableString "DEX_DEFECT_MAP_AVAILABLE"
45 #define DEX_DefectMapFileString "DEX_DEFECT_MAP_FILE"
46 #define DEX_LoadDefectMapFileString "DEX_LOAD_DEFECT_MAP_FILE"
47 #define DEX_SoftwareTriggerString "DEX_SOFTWARE_TRIGGER"
48 #define DEX_ReadoutModeString "DEX_READOUT_MODE"
49 
50 
53 class Dexela : public ADDriver
54 {
55 public:
56  Dexela(const char *portName, int detIndex,
57  int maxBuffers, size_t maxMemory,
58  int priority, int stackSize);
59 
60  /* These are the methods that we override from ADDriver */
61  virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
62  virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
63  virtual asynStatus readEnum(asynUser *pasynUser, char *strings[], int values[], int severities[],
64  size_t nElements, size_t *nIn);
65  void report(FILE *fp, int details);
66 
67  // These should really be private, but they are called from C so must be public
68  void acquireStopTask(void);
69  void newFrameCallback(int frameCounter, int bufferNumber);
70 
71  ~Dexela();
72 
73 protected:
75  #define DEX_FIRST_PARAM DEX_SerialNumber
102 
103 
104 private:
105  DexelaDetector *pDetector_;
106  DevInfo devInfo_;
107  BusScanner *pBusScanner_;
108  DexImage offsetImage_;
109  DexImage gainImage_;
110  DexImage defectMapImage_;
111  int sensorX_;
112  int sensorY_;
113  char modelName_[80];
114  int modelNumber_;
115  int serialNumber_;
116  bins binningMode_;
117  int snapBuffer_;
118  int numBuffers_;
119 
120  void reportSensors(FILE *fp, int details);
121  void reportError(const char *functionName, DexelaException &e);
122  void acquireStart(void);
123  void acquireStop(void);
124  void acquireOffsetImage(void);
125  void acquireGainImage(void);
126  asynStatus loadOffsetFile(void);
127  asynStatus saveOffsetFile(void);
128  asynStatus loadGainFile(void);
129  asynStatus saveGainFile(void);
130  asynStatus loadDefectMapFile();
131 };
132 
133 #endif
134 
Class from which areaDetector drivers are directly derived.
Definition: ADDriver.h:141
void report(FILE *fp, int details)
Report status of the driver.
Definition: Dexela.cpp:275
int DEX_UseOffset
Definition: Dexela.h:82
int DEX_UseDefectMap
Definition: Dexela.h:96
int DEX_SaveGainFile
Definition: Dexela.h:95
int DEX_LoadOffsetFile
Definition: Dexela.h:85
int DEX_LoadGainFile
Definition: Dexela.h:94
int DEX_CurrentGainFrame
Definition: Dexela.h:90
Driver for the Perkin Elmer Dexela CMOS flat panel detectors.
Definition: Dexela.h:53
list value
Definition: makeDbAndEdl.py:234
int DEX_FullWellMode
Definition: Dexela.h:77
int DEX_BinningMode
Definition: Dexela.h:76
int DEX_AcquireOffset
Definition: Dexela.h:79
int DEX_SerialNumber
Definition: Dexela.h:74
char * portName
The name of this asyn port.
Definition: asynPortDriver.h:179
int DEX_NumGainFrames
Definition: Dexela.h:89
int DEX_DefectMapFile
Definition: Dexela.h:98
int DEX_UseGain
Definition: Dexela.h:91
void newFrameCallback(int frameCounter, int bufferNumber)
Definition: Dexela.cpp:326
int DEX_GainAvailable
Definition: Dexela.h:92
int DEX_OffsetConstant
Definition: Dexela.h:87
int DEX_ReadoutMode
Definition: Dexela.h:101
int DEX_SaveOffsetFile
Definition: Dexela.h:86
~Dexela()
Destructor for Dexela driver; most parameters are simply passed to ADDriver::ADDriver.
Definition: Dexela.cpp:257
int DEX_DefectMapAvailable
Definition: Dexela.h:97
int DEX_OffsetFile
Definition: Dexela.h:84
void acquireStopTask(void)
virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value)
Called when asyn clients call pasynFloat64->write().
Definition: Dexela.cpp:651
int DEX_GainFile
Definition: Dexela.h:93
int DEX_OffsetAvailable
Definition: Dexela.h:83
int DEX_CorrectionsDirectory
Definition: Dexela.h:78
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value)
Called when asyn clients call pasynInt32->write().
Definition: Dexela.cpp:543
int DEX_AcquireGain
Definition: Dexela.h:88
Dexela(const char *portName, int detIndex, int maxBuffers, size_t maxMemory, int priority, int stackSize)
Constructor for Dexela driver; most parameters are simply passed to ADDriver::ADDriver.
Definition: Dexela.cpp:130
int DEX_LoadDefectMapFile
Definition: Dexela.h:99
int DEX_CurrentOffsetFrame
Definition: Dexela.h:81
virtual asynStatus readEnum(asynUser *pasynUser, char *strings[], int values[], int severities[], size_t nElements, size_t *nIn)
Called when asyn clients call pasynEnum->read().
Definition: Dexela.cpp:701
int DEX_SoftwareTrigger
Definition: Dexela.h:100
int DEX_NumOffsetFrames
Definition: Dexela.h:80