areaDetector 1-9
Public Member Functions | Protected Attributes
simDetector Class Reference

Simulation detector driver; demonstrates most of the features that areaDetector drivers can support. More...

Inheritance diagram for simDetector:
ADDriver asynNDArrayDriver asynPortDriver

List of all members.

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

Detailed Description

Simulation detector driver; demonstrates most of the features that areaDetector drivers can support.


Constructor & Destructor Documentation

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.

Parameters:
[in]portNameThe name of the asyn port driver to be created.
[in]maxSizeXThe maximum X dimension of the images that this driver can create.
[in]maxSizeYThe maximum Y dimension of the images that this driver can create.
[in]dataTypeThe initial data type (NDDataType_t) of the images that this driver will create.
[in]maxBuffersThe 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]maxMemoryThe 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]priorityThe thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
[in]stackSizeThe stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.

Member Function Documentation

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.

Parameters:
[in]fpFile pointed passed by caller where the output is written to.
[in]detailsIf >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..

Parameters:
[in]pasynUserpasynUser structure that encodes the reason and address.
[in]valueValue 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..

Parameters:
[in]pasynUserpasynUser structure that encodes the reason and address.
[in]valueValue to write.

Reimplemented from ADDriver.


Member Data Documentation

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::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]

The documentation for this class was generated from the following file: