15 #define ADPVCAM_VERSION 2
16 #define ADPVCAM_REVISION 2
17 #define ADPVCAM_MODIFICATION 0
28 #include <epicsTime.h>
29 #include <epicsThread.h>
30 #include <epicsEvent.h>
31 #include <epicsMutex.h>
32 #include <epicsString.h>
33 #include <epicsStdio.h>
34 #include <epicsMutex.h>
35 #include <cantProceed.h>
36 #include <epicsExit.h>
38 #include <epicsExport.h>
54 #define POLL_TIME 0.01
56 #define NUM_PV_CAM_PARAMS (sizeof(PVCamParamString)/sizeof(PVCamParamString[0]))
58 #define MAX_DETECTORS_SUPPORTED 3
59 #define MAX_SPEEDS_SUPPORTED 5
63 #define PVCamInitDetectorString "PVCAM_INITIALIZE_DETECTOR"
64 #define PVCamSlot1CamString "PVCAM_SLOT1"
65 #define PVCamSlot2CamString "PVCAM_SLOT2"
66 #define PVCamSlot3CamString "PVCAM_SLOT3"
67 #define PVCamDetectorSelectedString "PVCAM_DETECTORSELECTED"
68 #define PVCamChipNameRBVString "PVCAM_CHIPNAME"
69 #define PVCamNumParallelPixelsRBVString "PVCAM_NUMPARALLELPIXELS"
70 #define PVCamNumSerialPixelsRBVString "PVCAM_NUMSERIALPIXELS"
71 #define PVCamPixelParallelSizeRBVString "PVCAM_PIXELPARALLELSIZE"
72 #define PVCamPixelSerialSizeRBVString "PVCAM_PIXELSERIALSIZE"
73 #define PVCamChipHeightMMRBVString "PVCAM_CHIPHEIGHT"
74 #define PVCamChipWidthMMRBVString "PVCAM_CHIPWIDTH"
75 #define PVCamPixelParallelDistRBVString "PVCAM_PIXELPARALLELDIST"
76 #define PVCamPixelSerialDistRBVString "PVCAM_PIXELSERIALDIST"
77 #define PVCamPostMaskRBVString "PVCAM_POSTMASK"
78 #define PVCamPreMaskRBVString "PVCAM_PREMASK"
79 #define PVCamPostScanRBVString "PVCAM_POSTSCAN"
80 #define PVCamPreScanRBVString "PVCAM_PRESCAN"
81 #define PVCamNumPortsRBVString "PVCAM_NUMPORTS"
82 #define PVCamFullWellCapacityRBVString "PVCAM_FULLWELLCAPACITY"
83 #define PVCamFrameTransferCapableRBVString "PVCAM_FRAMETRANSFERCAPABLE"
84 #define PVCamNumSpeedTableEntriesRBVString "PVCAM_NUMSPEEDTABLEENTRIES"
85 #define PVCamSpeedTableIndexString "PVCAM_SPEEDTABLEINDEX"
86 #define PVCamSpeedTableIndexRBVString "PVCAM_SPEEDTABLEINDEX_RBV"
87 #define PVCamBitDepthRBVString "PVCAM_BITDEPTH"
88 #define PVCamPixelTimeRBVString "PVCAM_PIXELTIME"
89 #define PVCamGainIndexString "PVCAM_GAININDEX"
90 #define PVCamGainIndexRBVString "PVCAM_GAININDEX_RBV"
91 #define PVCamMaxGainIndexRBVString "PVCAM_MAXGAININDEX"
92 #define PVCamMinShutterOpenDelayRBVString "PVCAM_MINSHUTTEROPENDELAY"
93 #define PVCamMaxShutterOpenDelayRBVString "PVCAM_MAXSHUTTEROPENDELAY"
94 #define PVCamMinShutterCloseDelayRBVString "PVCAM_MINSHUTTERCLOSEDELAY"
95 #define PVCamMaxShutterCloseDelayRBVString "PVCAM_MAXSHUTTERCLOSEDELAY"
96 #define PVCamShutterOpenDelayString "PVCAM_SHUTTEROPENDELAY"
97 #define PVCamShutterOpenDelayRBVString "PVCAM_SHUTTEROPENDELAY_RBV"
98 #define PVCamShutterCloseDelayString "PVCAM_SHUTTERCLOSEDELAY"
99 #define PVCamShutterCloseDelayRBVString "PVCAM_SHUTTERCLOSEDELAY_RBV"
100 #define PVCamMeasuredTemperatureRBVString "PVCAM_MEASUREDTEMPERATURE"
101 #define PVCamMinTemperatureRBVString "PVCAM_MINTEMPERATURE"
102 #define PVCamMaxTemperatureRBVString "PVCAM_MAXTEMPERATURE"
103 #define PVCamSetTemperatureString "PVCAM_SETTEMPERATURE"
104 #define PVCamSetTemperatureRBVString "PVCAM_SETTEMPERATURE_RBV"
105 #define PVCamDetectorModeString "PVCAM_DETECTORMODE"
106 #define PVCamDetectorModeRBVString "PVCAM_DETECTORMODE_RBV"
107 #define PVCamTriggerModeString "PVCAM_TRIGGERMODE"
108 #define PVCamTriggerModeRBVString "PVCAM_TRIGGERMODE_RBV"
109 #define PVCamTriggerEdgeString "PVCAM_TRIGGEREDGE"
110 #define PVCamTriggerEdgeRBVString "PVCAM_TRIGGEREDGE_RBV"
111 #define PVCamCamFirmwareVersRBVString "PVCAM_CAMFIRMWAREVERS_RBV"
112 #define PVCamPCIFWVersRBVString "PVCAM_PCIFWVERS_RBV"
113 #define PVCamHeadSerialNumRBVString "PVCAM_HEADSERNUM_RBV"
114 #define PVCamSerialNumRBVString "PVCAM_SERIALNUM_RBV"
115 #define PVCamPVCamVersRBVString "PVCAM_PVCAMVERS_RBV"
116 #define PVCamDevDrvVersRBVString "PVCAM_DEVDRVVERS_RBV"
131 int maxBuffers,
size_t maxMemory,
int priority,
int stackSize);
136 void report(FILE *fp,
int details);
139 template <
typename epicsType>
int computeArray(
int maxSizeX,
int maxSizeY);
155 #define FIRST_PVCAM_PARAM PVCamInitDetector
209 #define LAST_PVCAM_PARAM PVCamDevDrvVersRBV
212 int16 numDetectorsInstalled,
216 char *detectorList[5];
218 unsigned short *rawData;
220 void reportPvCamError (
const char *functionName,
const char *appMessage);
222 void initializeDetectorInterface (
void);
223 void selectDetector (
int selectedDetector);
225 void queryCurrentSettings (
void);
227 void initializeDetector (
void);
229 int getAcquireStatus (
void);
234 #define NUM_PVCAM_PARAMS ((int)(&LAST_PVCAM_PARAM - &FIRST_PVCAM_PARAM + 1))
NDDataType_t dataType
Definition: ADPylon.cpp:60
const char * driverName
Definition: ADTimePix.cpp:73
NDDataType_t
Enumeration of NDArray data types.
Definition: NDAttribute.h:30
Class from which areaDetector drivers are directly derived.
Definition: ADDriver.h:132
Driver for Roper (Photometrics and Princeton Instruments) cameras using the PvCam library.
Definition: ADPvCam.h:123
int PVCamPixelTimeRBV
Definition: ADPvCam.h:180
int PVCamNumPortsRBV
Definition: ADPvCam.h:173
int PVCamTriggerMode
Definition: ADPvCam.h:199
int PVCamPixelSerialDistRBV
Definition: ADPvCam.h:168
int PVCamTriggerEdgeRBV
Definition: ADPvCam.h:202
int PVCamPixelParallelDistRBV
Definition: ADPvCam.h:167
int PVCamMaxShutterOpenDelayRBV
Definition: ADPvCam.h:185
void report(FILE *fp, int details)
Report status of the driver.
Definition: ADPvCam.cpp:731
int PVCamSetTemperatureRBV
Definition: ADPvCam.h:196
int computeArray(int maxSizeX, int maxSizeY)
Definition: ADPvCam.cpp:229
int PVCamNumSpeedTableEntriesRBV
Definition: ADPvCam.h:176
int imagesRemaining
Definition: ADPvCam.h:125
int PVCamNumParallelPixelsRBV
Definition: ADPvCam.h:161
int PVCamShutterCloseDelay
Definition: ADPvCam.h:190
~ADPvCam()
Definition: ADPvCam.cpp:753
int PVCamMaxTemperatureRBV
Definition: ADPvCam.h:194
int PVCamSlot3Cam
Definition: ADPvCam.h:158
int PVCamPCIFWVersRBV
Definition: ADPvCam.h:204
int PVCamSlot2Cam
Definition: ADPvCam.h:157
int PVCamMaxGainIndexRBV
Definition: ADPvCam.h:183
int PVCamDetectorModeRBV
Definition: ADPvCam.h:198
int PVCamSetTemperature
Definition: ADPvCam.h:195
int PVCamTriggerEdge
Definition: ADPvCam.h:201
int PVCamSpeedTableIndex
Definition: ADPvCam.h:177
int PVCamShutterCloseDelayRBV
Definition: ADPvCam.h:191
int PVCamDetectorSelected
Definition: ADPvCam.h:159
int PVCamPVCamVersRBV
Definition: ADPvCam.h:207
int PVCamTriggerModeRBV
Definition: ADPvCam.h:200
int PVCamSlot1Cam
Definition: ADPvCam.h:156
int PVCamMaxShutterCloseDelayRBV
Definition: ADPvCam.h:187
int PVCamPreMaskRBV
Definition: ADPvCam.h:170
virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value)
Definition: ADPvCam.cpp:697
ADPvCam(const char *portName, int maxSizeX, int maxSizeY, NDDataType_t dataType, int maxBuffers, size_t maxMemory, int priority, int stackSize)
Definition: ADPvCam.cpp:64
int PVCamInitDetector
Definition: ADPvCam.h:154
void pvCamMonitorTask()
Definition: ADPvCam.cpp:574
int PVCamSerialNumRBV
Definition: ADPvCam.h:206
int PVCamHeadSerialNumRBV
Definition: ADPvCam.h:205
int PVCamBitDepthRBV
Definition: ADPvCam.h:179
epicsEventId startEventId
Definition: ADPvCam.h:126
int PVCamPostMaskRBV
Definition: ADPvCam.h:169
int PVCamSpeedTableIndexRBV
Definition: ADPvCam.h:178
int PVCamDevDrvVersRBV
Definition: ADPvCam.h:208
int PVCamPixelParallelSizeRBV
Definition: ADPvCam.h:163
int PVCamMinTemperatureRBV
Definition: ADPvCam.h:193
void pvCamAcquisitionTask()
Definition: ADPvCam.cpp:429
int PVCamPixelSerialSizeRBV
Definition: ADPvCam.h:164
int PVCamPostScanRBV
Definition: ADPvCam.h:171
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value)
Sets an int32 parameter.
Definition: ADPvCam.cpp:610
int computeImage()
Definition: ADPvCam.cpp:274
int PVCamMinShutterOpenDelayRBV
Definition: ADPvCam.h:184
int PVCamDetectorMode
Definition: ADPvCam.h:197
NDArray * pRaw
Definition: ADPvCam.h:128
int PVCamChipNameRBV
Definition: ADPvCam.h:160
epicsEventId stopEventId
Definition: ADPvCam.h:127
int PVCamPreScanRBV
Definition: ADPvCam.h:172
int PVCamMeasuredTemperatureRBV
Definition: ADPvCam.h:192
int PVCamChipHeightMMRBV
Definition: ADPvCam.h:165
int PVCamFrameTransferCapableRBV
Definition: ADPvCam.h:175
int PVCamCamFirmwareVersRBV
Definition: ADPvCam.h:203
int PVCamFullWellCapacityRBV
Definition: ADPvCam.h:174
int PVCamGainIndex
Definition: ADPvCam.h:181
int PVCamNumSerialPixelsRBV
Definition: ADPvCam.h:162
int allocateBuffer()
Definition: ADPvCam.cpp:252
int PVCamMinShutterCloseDelayRBV
Definition: ADPvCam.h:186
int PVCamGainIndexRBV
Definition: ADPvCam.h:182
int PVCamChipWidthMMRBV
Definition: ADPvCam.h:166
int PVCamShutterOpenDelay
Definition: ADPvCam.h:188
int PVCamShutterOpenDelayRBV
Definition: ADPvCam.h:189
N-dimensional array class; each array has a set of dimensions, a data type, pointer to data,...
Definition: NDArray.h:99
@ int16
Definition: NDFileHDF5Layout.h:36
list value
Definition: makeDbAndEdl.py:234