areaDetector 3-14
EPICS areaDetector framework
hamamatsu.h
Go to the documentation of this file.
1/* For end use and not for commercial purposes */
2
3#include <epicsEvent.h>
4#include "ADDriver.h"
5
6#include "console4.h"
7#include "common.h"
8#include "dcamapi4.h"
9#include "dcamprop.h"
10
11
12
13#define DRIVER_VERSION 2
14#define DRIVER_REVISION 10
15#define DRIVER_MODIFICATION 0
16
18class epicsShareClass hamamatsu : public ADDriver {
19public:
20 hamamatsu(const char *portName, int camIndex, int maxBuffers, size_t maxMemory,
21 int priority, int stackSize);
22
23 /* These are the methods that we override from ADDriver */
24 virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
25 virtual asynStatus writeFloat64(asynUser *pasynUser, epicsFloat64 value);
26 virtual void setShutter(int open);
27 virtual void report(FILE *fp, int details);
28 void simTask();
29 ~hamamatsu();
30 static void hamaExit();
31 void hamaAcquire();
32 void hamaAbortAcquisition();
33
34protected:
36 #define FIRST_HAMA_DETECTOR_PARAM HamaRegionReset
47
48private:
49 /* These are the methods that are new to this class */
50 BOOL copy_targetarea( HDCAM hdcam, int32 iFrame, void* buf, int32 rowbytes, int32 ox, int32 oy, int32 cx, int32 cy );
51 void isSysAlive();
52 void get_image_information( HDCAM hdcam, int32& pixeltype, int32& width, int32& rowbytes, int32& height );
53 void sample_access_image( HDCAM hdcam );
54 void updateCoolerInfo(void);
55 static void getErrString(HDCAM handle, DCAMERR err, char* buf, unsigned int bufsize);
56 inline const bool checkErrAndPrint(const char* functionName, DCAMERR err, const char* paramName, ...);
57 inline const bool checkSetGet(int32 iProp, double* pValue, const char* functionName, const char* paramName);
58 inline const bool checkSet(int32 iProp, double pValue, const char* functionName, const char* paramName);
59 inline const bool checkGet(int32 iProp, double *pValue, const char* functionName, const char* paramName);
60
61 /* Our data */
62 epicsEventId startEventId_;
63 epicsEventId stopEventId_;
64 HDCAM hdcam;
65 DCAMAPI_INIT apiinit;
66 HDCAMWAIT hwait;
67};
68
69#define HamaRegionResetString "HamaRegionReset"
70#define HamaTriggerSourceString "HamaTriggerSource"
71#define HamaTriggerModeString "HamaTriggerMode"
72#define HamaTriggerActiveString "HamaTriggerActive"
73#define HamaTriggerPolarityString "HamaTriggerPolarity"
74#define HamaFireTriggerString "HamaFireTrigger"
75#define HamaTriggerTimesString "HamaTriggerTimes"
76#define HamaTriggerDelayString "HamaTriggerDelay"
77#define HamaSensorCoolerStatusString "HamaSensorCoolerStatus"
78#define HamaReadoutSpeedString "HamaReadoutSpeed"
79#define HamaSystemAliveString "DCAM_IDPROP_SYSTEM_ALIVE"
Class from which areaDetector drivers are directly derived.
Definition ADDriver.h:132
virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value)
Sets an int32 parameter.
Definition ADDriver.cpp:84
virtual void setShutter(int open)
Set the shutter position.
Definition ADDriver.cpp:29
virtual void report(FILE *fp, int details)
Report status of the driver.
Definition asynNDArrayDriver.cpp:753
Hamamatsu detector driver.
Definition hamamatsu.h:18
int HamaTriggerSource
Definition hamamatsu.h:37
int HamaSensorCoolerStatus
Definition hamamatsu.h:44
int HamaRegionReset
Definition hamamatsu.h:35
int HamaTriggerDelay
Definition hamamatsu.h:43
void simTask()
Should be private, but gets called from C, so must be public.
int HamaSystemAlive
Definition hamamatsu.h:46
int HamaTriggerActive
Definition hamamatsu.h:39
int HamaTriggerTimes
Definition hamamatsu.h:42
int HamaFireTrigger
Definition hamamatsu.h:41
int HamaReadoutSpeed
Definition hamamatsu.h:45
int HamaTriggerPolarity
Definition hamamatsu.h:40
int HamaTriggerMode
Definition hamamatsu.h:38