areaDetector  3-12-1
EPICS areaDetector framework
Public Member Functions | Protected Attributes | List of all members
ADCSimDetector Class Reference

ADC simulation driver; does 1-D waveforms on 8 channels. More...

#include <ADCSimDetector.h>

Inheritance diagram for ADCSimDetector:
asynNDArrayDriver

Public Member Functions

 ADCSimDetector (const char *portName, int numTimePoints, NDDataType_t dataType, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Constructor for ADCSimDetector; most parameters are simply passed to ADDriver::ADDriver. More...
 
virtual asynStatus writeInt32 (asynUser *pasynUser, epicsInt32 value)
 Called when asyn clients call pasynInt32->write(). More...
 
virtual void report (FILE *fp, int details)
 Report status of the driver. More...
 
void simTask ()
 Should be private, but gets called from C, so must be public. More...
 
- Public Member Functions inherited from asynNDArrayDriver
 asynNDArrayDriver (const char *portName, int maxAddr, int maxBuffers, size_t maxMemory, int interfaceMask, int interruptMask, int asynFlags, int autoConnect, int priority, int stackSize)
 This is the constructor for the asynNDArrayDriver class. More...
 
virtual ~asynNDArrayDriver ()
 
virtual asynStatus writeOctet (asynUser *pasynUser, const char *value, size_t maxChars, size_t *nActual)
 Called when asyn clients call pasynOctet->write(). More...
 
virtual asynStatus readGenericPointer (asynUser *pasynUser, void *genericPointer)
 This method copies an NDArray object from the asynNDArrayDriver to an NDArray pointer passed in by the caller. More...
 
virtual asynStatus writeGenericPointer (asynUser *pasynUser, void *genericPointer)
 This method currently does nothing, but it should be implemented in this base class. More...
 
virtual asynStatus setIntegerParam (int index, int value)
 Sets the value for an integer in the parameter library. More...
 
virtual asynStatus setIntegerParam (int list, int index, int value)
 Sets the value for an integer in the parameter library. More...
 
virtual asynStatus readInt32 (asynUser *pasynUser, epicsInt32 *value)
 
virtual asynStatus readFloat64 (asynUser *pasynUser, epicsFloat64 *value)
 
virtual asynStatus createFilePath (const char *path, int pathDepth)
 Function to create a directory path for a file. More...
 
virtual asynStatus checkPath ()
 Checks whether the directory specified NDFilePath parameter exists. More...
 
virtual bool checkPath (std::string &filePath)
 Checks whether the directory specified exists. More...
 
virtual asynStatus createFileName (int maxChars, char *fullFileName)
 Build a file name from component parts. More...
 
virtual asynStatus createFileName (int maxChars, char *filePath, char *fileName)
 Build a file name from component parts. More...
 
virtual asynStatus readNDAttributesFile ()
 Create this driver's NDAttributeList (pAttributeList) by reading an XML file This clears any existing attributes from this drivers' NDAttributeList and then creates a new list based on the XML file. More...
 
virtual asynStatus getAttributes (NDAttributeList *pAttributeList)
 Get the current values of attributes from this driver and appends them to an output attribute list. More...
 
asynStatus incrementQueuedArrayCount ()
 
asynStatus decrementQueuedArrayCount ()
 
int getQueuedArrayCount ()
 
void updateQueuedArrayCount ()
 

Protected Attributes

int P_Acquire
 
int P_AcquireTime
 
int P_ElapsedTime
 
int P_TimeStep
 
int P_NumTimePoints
 
int P_Period
 
int P_Amplitude
 
int P_Offset
 
int P_Frequency
 
int P_Phase
 
int P_Noise
 
- Protected Attributes inherited from asynNDArrayDriver
int NDPortNameSelf
 
int NDADCoreVersion
 
int NDDriverVersion
 
int ADManufacturer
 
int ADModel
 
int ADSerialNumber
 
int ADSDKVersion
 
int ADFirmwareVersion
 
int ADAcquire
 
int ADAcquireBusy
 
int ADWaitForPlugins
 
int NDArraySizeX
 
int NDArraySizeY
 
int NDArraySizeZ
 
int NDArraySize
 
int NDNDimensions
 
int NDDimensions
 
int NDDataType
 
int NDColorMode
 
int NDUniqueId
 
int NDTimeStamp
 
int NDEpicsTSSec
 
int NDEpicsTSNsec
 
int NDBayerPattern
 
int NDCodec
 
int NDCompressedSize
 
int NDArrayCounter
 
int NDFilePath
 
int NDFilePathExists
 
int NDFileName
 
int NDFileNumber
 
int NDFileTemplate
 
int NDAutoIncrement
 
int NDFullFileName
 
int NDFileFormat
 
int NDAutoSave
 
int NDWriteFile
 
int NDReadFile
 
int NDFileWriteMode
 
int NDFileWriteStatus
 
int NDFileWriteMessage
 
int NDFileNumCapture
 
int NDFileNumCaptured
 
int NDFileCapture
 
int NDFileDeleteDriverFile
 
int NDFileLazyOpen
 
int NDFileCreateDir
 
int NDFileTempSuffix
 
int NDAttributesFile
 
int NDAttributesStatus
 
int NDAttributesMacros
 
int NDArrayData
 
int NDArrayCallbacks
 
int NDPoolMaxBuffers
 
int NDPoolAllocBuffers
 
int NDPoolFreeBuffers
 
int NDPoolMaxMemory
 
int NDPoolUsedMemory
 
int NDPoolEmptyFreeList
 
int NDNumQueuedArrays
 
class NDArray ** pArrays
 An array of NDArray pointers used to store data in the driver. More...
 
class NDAttributeListpAttributeList
 An NDAttributeList object used to obtain the current values of a set of attributes. More...
 
int threadStackSize_
 
int threadPriority_
 

Additional Inherited Members

- Public Attributes inherited from asynNDArrayDriver
class NDArrayPoolpNDArrayPool
 An NDArrayPool pointer that is initialized to pNDArrayPoolPvt_ in the constructor. More...
 

Detailed Description

ADC simulation driver; does 1-D waveforms on 8 channels.

Inherits from asynNDArrayDriver

Constructor & Destructor Documentation

◆ ADCSimDetector()

ADCSimDetector::ADCSimDetector ( const char *  portName,
int  numTimePoints,
NDDataType_t  dataType,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Constructor for ADCSimDetector; 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]numTimePointsThe initial number of time points.
[in]dataTypeThe initial data type (NDDataType_t) of the arrays 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

◆ report()

void ADCSimDetector::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.

◆ simTask()

void ADCSimDetector::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.

◆ writeInt32()

asynStatus ADCSimDetector::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 asynNDArrayDriver.

Member Data Documentation

◆ P_Acquire

int ADCSimDetector::P_Acquire
protected

◆ P_AcquireTime

int ADCSimDetector::P_AcquireTime
protected

◆ P_Amplitude

int ADCSimDetector::P_Amplitude
protected

◆ P_ElapsedTime

int ADCSimDetector::P_ElapsedTime
protected

◆ P_Frequency

int ADCSimDetector::P_Frequency
protected

◆ P_Noise

int ADCSimDetector::P_Noise
protected

◆ P_NumTimePoints

int ADCSimDetector::P_NumTimePoints
protected

◆ P_Offset

int ADCSimDetector::P_Offset
protected

◆ P_Period

int ADCSimDetector::P_Period
protected

◆ P_Phase

int ADCSimDetector::P_Phase
protected

◆ P_TimeStep

int ADCSimDetector::P_TimeStep
protected

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