areaDetector  3-14
EPICS areaDetector framework
ADDriver.h
Go to the documentation of this file.
1 #ifndef ADDriver_H
2 #define ADDriver_H
3 
4 #include <epicsTypes.h>
5 #include <epicsMessageQueue.h>
6 #include <epicsTime.h>
7 
8 #include "asynNDArrayDriver.h"
9 
10 
12 #define AREA_DETECTOR_OK 0
14 #define AREA_DETECTOR_ERROR -1
15 
17 typedef enum
18 {
22 
24 typedef enum
25 {
30 
32 typedef enum
33 {
46 
48 typedef enum
49 {
54 
55 /* Enumeration of frame types */
56 typedef enum
57 {
63 
64 /* Enumeration of trigger modes */
65 typedef enum
66 {
70 
75  /* String asyn interface access Description */
76 
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"
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);
138 
139  /* These are the methods that we override from asynPortDriver */
140  virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
141  virtual asynStatus connect(asynUser *pasynUser);
142 
143  /* These are the methods that are new to this class */
144  virtual void setShutter(int open);
145 
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;
182 
184 };
185 
186 #endif
#define ADCORE_API
Definition: ADCoreAPI.h:41
ADShutterStatus_t
Enumeration of shutter status.
Definition: ADDriver.h:18
@ ADShutterClosed
Shutter closed.
Definition: ADDriver.h:19
@ ADShutterOpen
Shutter open.
Definition: ADDriver.h:20
ADImageMode_t
Enumeration of image collection modes.
Definition: ADDriver.h:49
@ ADImageSingle
Collect a single image per Acquire command.
Definition: ADDriver.h:50
@ ADImageContinuous
Collect images continuously until Acquire is set to 0.
Definition: ADDriver.h:52
@ ADImageMultiple
Collect ADNumImages images per Acquire command.
Definition: ADDriver.h:51
ADStatus_t
Enumeration of detector status.
Definition: ADDriver.h:33
@ ADStatusAcquire
Detector is acquiring.
Definition: ADDriver.h:35
@ ADStatusCorrect
Detector is correcting data.
Definition: ADDriver.h:37
@ ADStatusError
Detector has encountered an error.
Definition: ADDriver.h:40
@ ADStatusReadout
Detector is reading out.
Definition: ADDriver.h:36
@ ADStatusAborting
Detector is aborting an operation.
Definition: ADDriver.h:39
@ ADStatusDisconnected
Detector is not connected.
Definition: ADDriver.h:43
@ ADStatusInitializing
Detector is initializing, typically at startup.
Definition: ADDriver.h:42
@ ADStatusAborted
Detector aquisition has been aborted.
Definition: ADDriver.h:44
@ ADStatusIdle
Detector is idle.
Definition: ADDriver.h:34
@ ADStatusWaiting
Detector is waiting for something, typically for the acquire period to elapse.
Definition: ADDriver.h:41
@ ADStatusSaving
Detector is saving data.
Definition: ADDriver.h:38
ADShutterMode_t
Enumeration of shutter modes.
Definition: ADDriver.h:25
@ ADShutterModeNone
Don't use shutter.
Definition: ADDriver.h:26
@ ADShutterModeEPICS
Shutter controlled by EPICS PVs.
Definition: ADDriver.h:27
@ ADShutterModeDetector
Shutter controlled directly by detector.
Definition: ADDriver.h:28
ADFrameType_t
Definition: ADDriver.h:57
@ ADFrameDoubleCorrelation
Double correlation frame type, used to remove zingers.
Definition: ADDriver.h:61
@ ADFrameNormal
Normal frame type.
Definition: ADDriver.h:58
@ ADFrameFlatField
Flat field (no sample) frame type.
Definition: ADDriver.h:60
@ ADFrameBackground
Background frame type.
Definition: ADDriver.h:59
ADTriggerMode_t
Definition: ADDriver.h:66
@ ADTriggerInternal
Internal trigger from detector.
Definition: ADDriver.h:67
@ ADTriggerExternal
External trigger input.
Definition: ADDriver.h:68
Class from which areaDetector drivers are directly derived.
Definition: ADDriver.h:132
int ADBinY
Definition: ADDriver.h:150
int ADBinX
Definition: ADDriver.h:149
int ADShutterStatus
Definition: ADDriver.h:172
int ADTimeRemaining
Definition: ADDriver.h:167
int ADNumExposuresCounter
Definition: ADDriver.h:162
int ADMinX
Definition: ADDriver.h:151
int ADNumExposures
Definition: ADDriver.h:161
int ADShutterMode
Definition: ADDriver.h:173
int ADNumImages
Definition: ADDriver.h:163
int ADShutterCloseDelay
Definition: ADDriver.h:175
int ADReverseX
Definition: ADDriver.h:157
int ADMaxSizeX
Definition: ADDriver.h:155
int ADSizeY
Definition: ADDriver.h:154
int ADTemperatureActual
Definition: ADDriver.h:177
int ADStatus
Definition: ADDriver.h:168
int ADImageMode
Definition: ADDriver.h:160
int ADNumImagesCounter
Definition: ADDriver.h:164
int ADAcquirePeriod
Definition: ADDriver.h:166
int ADSizeX
Definition: ADDriver.h:153
int ADAcquireTime
Definition: ADDriver.h:165
int ADMaxSizeY
Definition: ADDriver.h:156
int ADStringToServer
Definition: ADDriver.h:180
int ADShutterControl
Definition: ADDriver.h:170
int ADShutterOpenDelay
Definition: ADDriver.h:174
bool deviceIsReachable
Definition: ADDriver.h:183
int ADReverseY
Definition: ADDriver.h:158
int ADStringFromServer
Definition: ADDriver.h:181
int ADReadStatus
Definition: ADDriver.h:178
int ADTriggerMode
Definition: ADDriver.h:169
int ADMinY
Definition: ADDriver.h:152
int ADFrameType
Definition: ADDriver.h:159
int ADShutterControlEPICS
Definition: ADDriver.h:171
int ADTemperature
Definition: ADDriver.h:176
int ADGain
Definition: ADDriver.h:147
int ADStatusMessage
Definition: ADDriver.h:179
This is the class from which NDArray drivers are derived; implements the asynGenericPointer functions...
Definition: asynNDArrayDriver.h:136
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value)
Definition: asynNDArrayDriver.cpp:671
list value
Definition: makeDbAndEdl.py:234