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