areaDetector  3-14
EPICS areaDetector framework
ADCSimDetector.h
Go to the documentation of this file.
1 /* ADCS simulation driver
2  * Mark Rivers
3  * Feb. 28, 2016
4  */
5 
6 #include <epicsEvent.h>
7 #include <epicsTime.h>
8 #include "asynNDArrayDriver.h"
9 
10 #define DRIVER_VERSION 2
11 #define DRIVER_REVISION 5
12 #define DRIVER_MODIFICATION 0
13 
14 #define SimAcquireString "SIM_ACQUIRE"
15 #define SimAcquireTimeString "SIM_ACQUIRE_TIME"
16 #define SimElapsedTimeString "SIM_ELAPSED_TIME"
17 #define SimTimeStepString "SIM_TIME_STEP"
18 #define SimNumTimePointsString "SIM_NUM_TIME_POINTS"
19 #define SimAmplitudeString "SIM_AMPLITUDE"
20 #define SimOffsetString "SIM_OFFSET"
21 #define SimPeriodString "SIM_PERIOD"
22 #define SimFrequencyString "SIM_FREQUENCY"
23 #define SimPhaseString "SIM_PHASE"
24 #define SimNoiseString "SIM_NOISE"
25 
26 #define MAX_SIGNALS 8
27 
30 class epicsShareClass ADCSimDetector : public asynNDArrayDriver {
31 public:
32  ADCSimDetector(const char *portName, int numTimePoints, NDDataType_t dataType,
33  int maxBuffers, size_t maxMemory,
34  int priority, int stackSize);
35 
36  /* These are the methods that we override from asynNDArrayDriver */
37  virtual asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
38  virtual void report(FILE *fp, int details);
39  void simTask();
41 protected:
42  int P_Acquire;
43  #define FIRST_SIM_DETECTOR_PARAM P_Acquire
48  int P_Period;
50  int P_Offset;
52  int P_Phase;
53  int P_Noise;
54 
55 private:
56  /* These are the methods that are new to this class */
57  template <typename epicsType> void computeArraysT();
58  void computeArrays();
59  void setAcquire(int value);
60 
61  /* Our data */
62  epicsEventId startEventId_;
63  epicsEventId stopEventId_;
64  int uniqueId_;
65  int acquiring_;
66  double elapsedTime_;
67 };
68 
NDDataType_t dataType
Definition: ADPylon.cpp:60
NDDataType_t
Enumeration of NDArray data types.
Definition: NDAttribute.h:30
ADC simulation driver; does 1-D waveforms on 8 channels.
Definition: ADCSimDetector.h:30
int P_Phase
Definition: ADCSimDetector.h:52
int P_Offset
Definition: ADCSimDetector.h:50
int P_Noise
Definition: ADCSimDetector.h:53
int P_Amplitude
Definition: ADCSimDetector.h:49
int P_NumTimePoints
Definition: ADCSimDetector.h:47
int P_Period
Definition: ADCSimDetector.h:48
int P_ElapsedTime
Definition: ADCSimDetector.h:45
int P_Frequency
Definition: ADCSimDetector.h:51
int P_Acquire
Definition: ADCSimDetector.h:42
int P_AcquireTime
Definition: ADCSimDetector.h:44
int P_TimeStep
Definition: ADCSimDetector.h:46
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
virtual void report(FILE *fp, int details)
Report status of the driver.
Definition: asynNDArrayDriver.cpp:753
list value
Definition: makeDbAndEdl.py:234