areaDetector 1-9
|
Simulation detector driver; demonstrates most of the features that areaDetector drivers can support. More...
Public Member Functions | |
simDetector (const char *portName, int maxSizeX, int maxSizeY, NDDataType_t dataType, int maxBuffers, size_t maxMemory, int priority, int stackSize) | |
Constructor for simDetector; most parameters are simply passed to ADDriver::ADDriver. | |
virtual asynStatus | writeInt32 (asynUser *pasynUser, epicsInt32 value) |
Called when asyn clients call pasynInt32->write(). | |
virtual asynStatus | writeFloat64 (asynUser *pasynUser, epicsFloat64 value) |
Called when asyn clients call pasynFloat64->write(). | |
virtual void | setShutter (int open) |
Controls the shutter. | |
virtual void | report (FILE *fp, int details) |
Report status of the driver. | |
void | simTask () |
Should be private, but gets called from C, so must be public. | |
Protected Attributes | |
int | SimGainX |
int | SimGainY |
int | SimGainRed |
int | SimGainGreen |
int | SimGainBlue |
int | SimNoise |
int | SimResetImage |
int | SimMode |
int | SimPeakStartX |
int | SimPeakStartY |
int | SimPeakWidthX |
int | SimPeakWidthY |
int | SimPeakNumX |
int | SimPeakNumY |
int | SimPeakStepX |
int | SimPeakStepY |
int | SimPeakHeightVariation |
Simulation detector driver; demonstrates most of the features that areaDetector drivers can support.
simDetector::simDetector | ( | const char * | portName, |
int | maxSizeX, | ||
int | maxSizeY, | ||
NDDataType_t | dataType, | ||
int | maxBuffers, | ||
size_t | maxMemory, | ||
int | priority, | ||
int | stackSize | ||
) |
Constructor for simDetector; most parameters are simply passed to ADDriver::ADDriver.
After calling the base class constructor this method creates a thread to compute the simulated detector data, and sets reasonable default values for parameters defined in this class, asynNDArrayDriver and ADDriver.
[in] | portName | The name of the asyn port driver to be created. |
[in] | maxSizeX | The maximum X dimension of the images that this driver can create. |
[in] | maxSizeY | The maximum Y dimension of the images that this driver can create. |
[in] | dataType | The initial data type (NDDataType_t) of the images that this driver will create. |
[in] | maxBuffers | The maximum number of NDArray buffers that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited number of buffers. |
[in] | maxMemory | The maximum amount of memory that the NDArrayPool for this driver is allowed to allocate. Set this to -1 to allow an unlimited amount of memory. |
[in] | priority | The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags. |
[in] | stackSize | The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags. |
void simDetector::report | ( | FILE * | fp, |
int | details | ||
) | [virtual] |
Report status of the driver.
Prints details about the driver if details>0. It then calls the ADDriver::report() method.
[in] | fp | File pointed passed by caller where the output is written to. |
[in] | details | If >0 then driver details are printed. |
Reimplemented from asynNDArrayDriver.
void simDetector::setShutter | ( | int | open | ) | [virtual] |
Controls the shutter.
Reimplemented from ADDriver.
void simDetector::simTask | ( | ) |
Should be private, but gets called from C, so must be public.
This thread calls computeImage to compute new image data and does the callbacks to send it to higher layers.
It implements the logic for single, multiple or continuous acquisition.
asynStatus simDetector::writeFloat64 | ( | asynUser * | pasynUser, |
epicsFloat64 | value | ||
) | [virtual] |
Called when asyn clients call pasynFloat64->write().
This function performs actions for some parameters, including ADAcquireTime, ADGain, etc. For all parameters it sets the value in the parameter library and calls any registered callbacks..
[in] | pasynUser | pasynUser structure that encodes the reason and address. |
[in] | value | Value to write. |
Reimplemented from asynPortDriver.
asynStatus simDetector::writeInt32 | ( | asynUser * | pasynUser, |
epicsInt32 | value | ||
) | [virtual] |
Called when asyn clients call pasynInt32->write().
This function performs actions for some parameters, including ADAcquire, ADColorMode, etc. For all parameters it sets the value in the parameter library and calls any registered callbacks..
[in] | pasynUser | pasynUser structure that encodes the reason and address. |
[in] | value | Value to write. |
Reimplemented from ADDriver.
int simDetector::SimGainBlue [protected] |
int simDetector::SimGainGreen [protected] |
int simDetector::SimGainRed [protected] |
int simDetector::SimGainX [protected] |
int simDetector::SimGainY [protected] |
int simDetector::SimMode [protected] |
int simDetector::SimNoise [protected] |
int simDetector::SimPeakHeightVariation [protected] |
int simDetector::SimPeakNumX [protected] |
int simDetector::SimPeakNumY [protected] |
int simDetector::SimPeakStartX [protected] |
int simDetector::SimPeakStartY [protected] |
int simDetector::SimPeakStepX [protected] |
int simDetector::SimPeakStepY [protected] |
int simDetector::SimPeakWidthX [protected] |
int simDetector::SimPeakWidthY [protected] |
int simDetector::SimResetImage [protected] |