areaDetector  3-12-1
EPICS areaDetector framework
Go to the documentation of this file.
1 #ifndef ADDriver_H
2 #define ADDriver_H
4 #include <epicsTypes.h>
5 #include <epicsMessageQueue.h>
6 #include <epicsTime.h>
8 #include "asynNDArrayDriver.h"
12 #define AREA_DETECTOR_OK 0
17 typedef enum
18 {
24 typedef enum
25 {
32 typedef enum
33 {
45 } ADStatus_t;
48 typedef enum
49 {
55 /* Enumeration of frame types */
56 typedef enum
57 {
64 /* Enumeration of trigger modes */
65 typedef enum
66 {
75  /* String asyn interface access Description */
77 #define ADGainString "GAIN"
79  /* Parameters that control the detector binning */
80 #define ADBinXString "BIN_X"
81 #define ADBinYString "BIN_Y"
83  /* Parameters the control the region of the detector to be read out.
84  * ADMinX, ADMinY, ADSizeX, and ADSizeY are in unbinned pixel units */
85 #define ADMinXString "MIN_X"
86 #define ADMinYString "MIN_Y"
87 #define ADSizeXString "SIZE_X"
88 #define ADSizeYString "SIZE_Y"
89 #define ADMaxSizeXString "MAX_SIZE_X"
90 #define ADMaxSizeYString "MAX_SIZE_Y"
92  /* Parameters that control the orientation of the image */
93 #define ADReverseXString "REVERSE_X"
94 #define ADReverseYString "REVERSE_Y"
96  /* Parameters defining the acquisition parameters. */
97 #define ADFrameTypeString "FRAME_TYPE"
98 #define ADImageModeString "IMAGE_MODE"
99 #define ADTriggerModeString "TRIGGER_MODE"
100 #define ADNumExposuresString "NEXPOSURES"
101 #define ADNumImagesString "NIMAGES"
102 #define ADAcquireTimeString "ACQ_TIME"
103 #define ADAcquirePeriodString "ACQ_PERIOD"
104 #define ADStatusString "STATUS"
106  /* Shutter parameters */
107 #define ADShutterControlString "SHUTTER_CONTROL"
108 #define ADShutterControlEPICSString "SHUTTER_CONTROL_EPICS"
109 #define ADShutterStatusString "SHUTTER_STATUS"
110 #define ADShutterModeString "SHUTTER_MODE"
111 #define ADShutterOpenDelayString "SHUTTER_OPEN_DELAY"
112 #define ADShutterCloseDelayString "SHUTTER_CLOSE_DELAY"
114  /* Temperature parameters */
115 #define ADTemperatureString "TEMPERATURE"
116 #define ADTemperatureActualString "TEMPERATURE_ACTUAL"
118  /* Statistics on number of images collected and the image rate */
119 #define ADNumImagesCounterString "NIMAGES_COUNTER"
120 #define ADNumExposuresCounterString "NEXPOSURES_COUNTER"
121 #define ADTimeRemainingString "TIME_REMAINING"
123  /* Status reading */
124 #define ADReadStatusString "READ_STATUS"
126  /* Status message strings */
127 #define ADStatusMessageString "STATUS_MESSAGE"
128 #define ADStringToServerString "STRING_TO_SERVER"
129 #define ADStringFromServerString "STRING_FROM_SERVER"
132 class ADCORE_API ADDriver : public asynNDArrayDriver {
133 public:
134  /* This is the constructor for the class. */
135  ADDriver(const char *portName, int maxAddr, int numParams, int maxBuffers, size_t maxMemory,
136  int interfaceMask, int interruptMask,
137  int asynFlags, int autoConnect, int priority, int stackSize);
139  /* These are the methods that we override from asynPortDriver */
140  virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
141  virtual asynStatus connect(asynUser *pasynUser);
143  /* These are the methods that are new to this class */
144  virtual void setShutter(int open);
146 protected:
147  int ADGain;
148  #define FIRST_AD_PARAM ADGain
149  int ADBinX;
150  int ADBinY;
151  int ADMinX;
152  int ADMinY;
153  int ADSizeX;
154  int ADSizeY;
168  int ADStatus;
184 };
186 #endif
Enumeration of shutter modes.
Definition: ADDriver.h:24
Class from which areaDetector drivers are directly derived.
Definition: ADDriver.h:132
Normal frame type.
Definition: ADDriver.h:58
int ADMaxSizeX
Definition: ADDriver.h:155
Shutter open.
Definition: ADDriver.h:20
int ADTriggerMode
Definition: ADDriver.h:169
int ADImageMode
Definition: ADDriver.h:160
int ADSizeY
Definition: ADDriver.h:154
int ADMaxSizeY
Definition: ADDriver.h:156
Shutter controlled directly by detector.
Definition: ADDriver.h:28
int ADBinY
Definition: ADDriver.h:150
Detector is not connected.
Definition: ADDriver.h:43
int ADStringFromServer
Definition: ADDriver.h:181
int ADShutterStatus
Definition: ADDriver.h:172
int ADNumExposures
Definition: ADDriver.h:161
list value
int ADStatus
Definition: ADDriver.h:168
Detector aquisition has been aborted.
Definition: ADDriver.h:44
External trigger input.
Definition: ADDriver.h:68
int ADShutterMode
Definition: ADDriver.h:173
int ADFrameType
Definition: ADDriver.h:159
Detector is waiting for something, typically for the acquire period to elapse.
Definition: ADDriver.h:41
int ADNumImagesCounter
Definition: ADDriver.h:164
Background frame type.
Definition: ADDriver.h:59
int ADTimeRemaining
Definition: ADDriver.h:167
int ADShutterControl
Definition: ADDriver.h:170
int ADShutterControlEPICS
Definition: ADDriver.h:171
int ADTemperatureActual
Definition: ADDriver.h:177
int ADAcquirePeriod
Definition: ADDriver.h:166
int ADTemperature
Definition: ADDriver.h:176
Detector is saving data.
Definition: ADDriver.h:38
Enumeration of image collection modes.
Definition: ADDriver.h:48
Don't use shutter.
Definition: ADDriver.h:26
int ADStatusMessage
Definition: ADDriver.h:179
Definition: ADDriver.h:65
Flat field (no sample) frame type.
Definition: ADDriver.h:60
int ADShutterCloseDelay
Definition: ADDriver.h:175
Detector has encountered an error.
Definition: ADDriver.h:40
Detector is aborting an operation.
Definition: ADDriver.h:39
Definition: ADDriver.h:56
Double correlation frame type, used to remove zingers.
Definition: ADDriver.h:61
Enumeration of shutter status.
Definition: ADDriver.h:17
int ADMinY
Definition: ADDriver.h:152
Shutter closed.
Definition: ADDriver.h:19
bool deviceIsReachable
Definition: ADDriver.h:183
int ADShutterOpenDelay
Definition: ADDriver.h:174
Shutter controlled by EPICS PVs.
Definition: ADDriver.h:27
int ADReadStatus
Definition: ADDriver.h:178
int ADGain
Definition: ADDriver.h:147
int ADStringToServer
Definition: ADDriver.h:180
int ADNumExposuresCounter
Definition: ADDriver.h:162
Collect ADNumImages images per Acquire command.
Definition: ADDriver.h:51
int ADReverseY
Definition: ADDriver.h:158
Collect images continuously until Acquire is set to 0.
Definition: ADDriver.h:52
Detector is initializing, typically at startup.
Definition: ADDriver.h:42
int ADMinX
Definition: ADDriver.h:151
Detector is acquiring.
Definition: ADDriver.h:35
int ADNumImages
Definition: ADDriver.h:163
Detector is idle.
Definition: ADDriver.h:34
Detector is reading out.
Definition: ADDriver.h:36
int ADReverseX
Definition: ADDriver.h:157
int ADSizeX
Definition: ADDriver.h:153
Enumeration of detector status.
Definition: ADDriver.h:32
Internal trigger from detector.
Definition: ADDriver.h:67
int ADBinX
Definition: ADDriver.h:149
Detector is correcting data.
Definition: ADDriver.h:37
int ADAcquireTime
Definition: ADDriver.h:165
Collect a single image per Acquire command.
Definition: ADDriver.h:50