quadEM  7-0
Go to the documentation of this file.
1 /*
2  * drvAHxxx.h
3  *
4  * Asyn driver that inherits from the asynPortDriver class to control the Ellectra AHxxx 4-channel picoammeter
5  *
6  * Author: Mark Rivers
7  *
8  * Created June 3, 2012
9  */
11 #include "drvQuadEM.h"
13 #define MAX_COMMAND_LEN 256
16 class drvAHxxx : public drvQuadEM {
17 public:
18  drvAHxxx(const char *portName, const char *QEPortName, int ringBufferSize, const char *modelName);
20  /* These are the methods we implement from asynPortDriver */
21  void report(FILE *fp, int details);
23  /* These are the methods that are new to this class */
24  void readThread(void);
25  virtual void exitHandler();
27 protected:
28  /* These are the methods we implement from quadEM */
29  virtual asynStatus setAcquire(epicsInt32 value);
30  virtual asynStatus setRange(epicsInt32 value);
31  virtual asynStatus setPingPong(epicsInt32 value);
32  virtual asynStatus setIntegrationTime(epicsFloat64 value);
33  virtual asynStatus setNumChannels(epicsInt32 value);
34  virtual asynStatus setBiasState(epicsInt32 value);
35  virtual asynStatus setBiasVoltage(epicsFloat64 value);
36  virtual asynStatus setResolution(epicsInt32 value);
37  virtual asynStatus setReadFormat(epicsInt32 value);
38  virtual asynStatus readStatus();
39  virtual asynStatus reset();
41 private:
42  /* Our data */
43  asynUser *pasynUserMeter_;
44  epicsEventId acquireStartEvent_;
45  int readingActive_;
46  char *QEPortName_;
47  bool AH501Series_;
48  bool AH401Series_;
49  char firmwareVersion_[MAX_COMMAND_LEN];
50  QEModel_t model_;
51  char outString_[MAX_COMMAND_LEN];
52  char inString_[MAX_COMMAND_LEN];
53  asynStatus sendCommand();
54  asynStatus writeReadMeter();
55 };
Definition: drvAHxxx.h:13
virtual asynStatus setBiasVoltage(epicsFloat64 value)
Sets the bias voltage.
Definition: drvAHxxx.cpp:640
Base class to control the quad electrometer.
Definition: drvQuadEM.h:128
virtual asynStatus setRange(epicsInt32 value)
Sets the range.
Definition: drvAHxxx.cpp:602
void report(FILE *fp, int details)
Report parameters.
Definition: drvAHxxx.cpp:816
virtual asynStatus reset()
Downloads all of the current EPICS settings to the electrometer.
Definition: drvAHxxx.cpp:402
virtual asynStatus setBiasState(epicsInt32 value)
Sets the bias state.
Definition: drvAHxxx.cpp:627
virtual asynStatus setReadFormat(epicsInt32 value)
Sets the read format.
Definition: drvAHxxx.cpp:666
char * portName
The name of this asyn port.
Definition: asynPortDriver.h:201
drvAHxxx(const char *portName, const char *QEPortName, int ringBufferSize, const char *modelName)
Constructor for the drvAHxxx class.
Definition: drvAHxxx.cpp:52
Class to control the Elettra/CaenEls AHxxx 4-Channel Picoammeters.
Definition: drvAHxxx.h:16
virtual void exitHandler()
Exit handler.
Definition: drvAHxxx.cpp:805
virtual asynStatus setPingPong(epicsInt32 value)
Sets the ping-pong setting.
Definition: drvAHxxx.cpp:571
virtual asynStatus setIntegrationTime(epicsFloat64 value)
Sets the integration time.
Definition: drvAHxxx.cpp:584
virtual asynStatus readStatus()
Reads all the settings back from the electrometer.
Definition: drvAHxxx.cpp:682
virtual asynStatus setAcquire(epicsInt32 value)
Starts and stops the electrometer.
Definition: drvAHxxx.cpp:446
void readThread(void)
Read thread to read the data from the electrometer when it is in continuous acquire mode...
Definition: drvAHxxx.cpp:158
virtual asynStatus setResolution(epicsInt32 value)
Sets the resolution.
Definition: drvAHxxx.cpp:653
virtual asynStatus setNumChannels(epicsInt32 value)
Sets the number of channels.
Definition: drvAHxxx.cpp:614
Definition: drvQuadEM.h:57