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

Class to wrap Lambda detector library provided by X-Spectrum. More...

#include <ADLambda.h>

Inheritance diagram for ADLambda:
ADDriver asynNDArrayDriver

Public Member Functions

 ADLambda (const char *portName, const char *configPath, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Constructor. More...
 
 ~ADLambda ()
 Destructor. More...
 
virtual asynStatus disconnect (asynUser *paasynUser)
 First attempt at connect/disconnect. More...
 
virtual asynStatus connect (asynUser *pasynUser)
 First attempt to create connect/disconnect. More...
 
asynStatus createImageHandlerThread ()
 Separate out the code that creates the image handling thread. More...
 
void killImageHandlerThread ()
 Kill the image handler thread by setting the keep alive signal to false. More...
 
int getImageDepth ()
 grab the image depth out of the GetImageFormat call More...
 
short * getDecodedImageShort (long &lFrameNo, short &shErrCode)
 Pass through method to the vendor object requesting an image. More...
 
int * getDecodedImageInt (long &lFrameNo, short &shErrCode)
 Pass through method to the vendor object requesting an image. More...
 
void handleNewImageTask (void)
 This method is called by handleNewImageTaskC as the image handling thread is created. More...
 
void report (FILE *fp, int details)
 Override super class's report method to provide detector specific info. More...
 
virtual asynStatus readInt32 (asynUser *pasynUser, epicsInt32 *value)
 
virtual asynStatus writeFloat64 (asynUser *pasynUser, epicsFloat64 value)
 Override from super class to handle detector specific parameters. More...
 
virtual asynStatus writeInt32 (asynUser *pasynUser, epicsInt32 value)
 Override from super class to handle detector specific parameters. More...
 
virtual asynStatus writeOctet (asynUser *pasynUser, const char *value, size_t nChars, size_t *nActual)
 Override from super class to handle detector specific parameters. More...
 
virtual asynStatus readOctet (asynUser *pasynUser, char *value, size_t maxChars, size_t *nActual, int *eomReason)
 Override from superclass to handle cases for detector specific Parameters. More...
 
- Public Member Functions inherited from ADDriver
 ADDriver (const char *portName, int maxAddr, int numParams, int maxBuffers, size_t maxMemory, int interfaceMask, int interruptMask, int asynFlags, int autoConnect, int priority, int stackSize)
 All of the arguments are simply passed to the constructor for the asynNDArrayDriver base class, except numParams. More...
 
virtual void setShutter (int open)
 Set the shutter position. 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 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 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 ()
 

Static Public Attributes

static const char * driverName = "Lambda"
 
static const int TWELVE_BIT = 12
 
static const int TWENTY_FOUR_BIT = 24
 

Protected Attributes

int LAMBDA_VersionNumber
 
int LAMBDA_ConfigFilePath
 
int LAMBDA_EnergyThreshold
 
int LAMBDA_DecodedQueueDepth
 
int LAMBDA_OperatingMode
 
int LAMBDA_DetectorState
 
int LAMBDA_BadFrameCounter
 
int LAMBDA_BadImage
 
- Protected Attributes inherited from ADDriver
int ADGain
 
int ADBinX
 
int ADBinY
 
int ADMinX
 
int ADMinY
 
int ADSizeX
 
int ADSizeY
 
int ADMaxSizeX
 
int ADMaxSizeY
 
int ADReverseX
 
int ADReverseY
 
int ADFrameType
 
int ADImageMode
 
int ADNumExposures
 
int ADNumExposuresCounter
 
int ADNumImages
 
int ADNumImagesCounter
 
int ADAcquireTime
 
int ADAcquirePeriod
 
int ADTimeRemaining
 
int ADStatus
 
int ADTriggerMode
 
int ADShutterControl
 
int ADShutterControlEPICS
 
int ADShutterStatus
 
int ADShutterMode
 
int ADShutterOpenDelay
 
int ADShutterCloseDelay
 
int ADTemperature
 
int ADTemperatureActual
 
int ADReadStatus
 
int ADStatusMessage
 
int ADStringToServer
 
int ADStringFromServer
 
bool deviceIsReachable
 
- 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

Class to wrap Lambda detector library provided by X-Spectrum.

Constructor & Destructor Documentation

◆ ADLambda()

ADLambda::ADLambda ( const char *  portName,
const char *  configPath,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Constructor.

Parameters
[in]portNameThe name of the asyn port driver to be created.
[in]configPathdirectory containing configuration file location
[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.

◆ ~ADLambda()

ADLambda::~ADLambda ( )

Destructor.

Member Function Documentation

◆ connect()

asynStatus ADLambda::connect ( asynUser *  pasynUser)
virtual

First attempt to create connect/disconnect.

This is now used at detector startup but does not seem to work with connect button, even though disconnect seems to disconnect using the button. The idea here is to contain lambdaInstance create here as eell as starting up the image handling thread

Reimplemented from ADDriver.

◆ createImageHandlerThread()

asynStatus ADLambda::createImageHandlerThread ( )

Separate out the code that creates the image handling thread.

◆ disconnect()

asynStatus ADLambda::disconnect ( asynUser *  pasynUser)
virtual

First attempt at connect/disconnect.

This method seems to work. It is called by the destructor and is also called when disconnect button is pressed. The corresponding connect does not work. The idea of this method is to kill the image handling thread and then delete the LambdaSysImpl instance.

◆ getDecodedImageInt()

int * ADLambda::getDecodedImageInt ( long &  lFrameNo,
short &  shErrCode 
)

Pass through method to the vendor object requesting an image.

Returned image will be returned as a pointer to int.

Parameters
[in]lFrameNoThe requested frame number in the queue.
[out]shErrCodeError code for returned image.
Returns
A pointer to integer array representing the requested image.

◆ getDecodedImageShort()

short * ADLambda::getDecodedImageShort ( long &  lFrameNo,
short &  shErrCode 
)

Pass through method to the vendor object requesting an image.

Returned image will be returned as a pointer to short.

Parameters
[in]lFrameNoThe requested frame number in the queue.
[out]shErrCodeError code for returned image.
Returns
A pointer to short array representing the requested image.

◆ getImageDepth()

int ADLambda::getImageDepth ( )

grab the image depth out of the GetImageFormat call

◆ handleNewImageTask()

void ADLambda::handleNewImageTask ( void  )

This method is called by handleNewImageTaskC as the image handling thread is created.

This method runs a continuous loop which constantly checks for images in the buffer queue. When new images are seen they are pulled off the queue and placed into an NDArray for use by areaDetector

Upadate The Images

◆ killImageHandlerThread()

void ADLambda::killImageHandlerThread ( )

Kill the image handler thread by setting the keep alive signal to false.

◆ readInt32()

asynStatus ADLambda::readInt32 ( asynUser *  pasynUser,
epicsInt32 *  value 
)
virtual

Reimplemented from asynNDArrayDriver.

◆ readOctet()

asynStatus ADLambda::readOctet ( asynUser *  pasynUser,
char *  value,
size_t  maxChars,
size_t *  nActual,
int *  eomReason 
)
virtual

Override from superclass to handle cases for detector specific Parameters.

If the parameter is from one of the super classes and is not handled here, then pass along to ADDriver (direct super class)

◆ report()

void ADLambda::report ( FILE *  fp,
int  details 
)
virtual

Override super class's report method to provide detector specific info.

When done, call ADDriver (direct super class) method to provide info from the upper classes.

Reimplemented from asynNDArrayDriver.

◆ writeFloat64()

asynStatus ADLambda::writeFloat64 ( asynUser *  pasynUser,
epicsFloat64  value 
)
virtual

Override from super class to handle detector specific parameters.

If the parameter is from one of the super classes and is not handled here, then pass along to ADDriver (direct super class)

◆ writeInt32()

asynStatus ADLambda::writeInt32 ( asynUser *  pasynUser,
epicsInt32  value 
)
virtual

Override from super class to handle detector specific parameters.

If the parameter is from one of the super classes and is not handled here, then pass along to ADDriver (direct super class)

Make sure that we write the value to the param

Reimplemented from ADDriver.

◆ writeOctet()

asynStatus ADLambda::writeOctet ( asynUser *  pasynUser,
const char *  value,
size_t  nChars,
size_t *  nActual 
)
virtual

Override from super class to handle detector specific parameters.

If the parameter is from one of the super classes and is not handled here, then pass along to ADDriver (direct super class)

Reimplemented from asynNDArrayDriver.

Member Data Documentation

◆ driverName

const char * ADLambda::driverName = "Lambda"
static

◆ LAMBDA_BadFrameCounter

int ADLambda::LAMBDA_BadFrameCounter
protected

◆ LAMBDA_BadImage

int ADLambda::LAMBDA_BadImage
protected

◆ LAMBDA_ConfigFilePath

int ADLambda::LAMBDA_ConfigFilePath
protected

◆ LAMBDA_DecodedQueueDepth

int ADLambda::LAMBDA_DecodedQueueDepth
protected

◆ LAMBDA_DetectorState

int ADLambda::LAMBDA_DetectorState
protected

◆ LAMBDA_EnergyThreshold

int ADLambda::LAMBDA_EnergyThreshold
protected

◆ LAMBDA_OperatingMode

int ADLambda::LAMBDA_OperatingMode
protected

◆ LAMBDA_VersionNumber

int ADLambda::LAMBDA_VersionNumber
protected

◆ TWELVE_BIT

const int ADLambda::TWELVE_BIT = 12
static

◆ TWENTY_FOUR_BIT

const int ADLambda::TWENTY_FOUR_BIT = 24
static

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