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

Driver for marCCD (Rayonix) CCD detector; communicates with the marCCD program over a TCP/IP socket with the marccd_server_socket program that they distribute. More...

Inheritance diagram for marCCD:
ADDriver asynNDArrayDriver

Public Member Functions

 marCCD (const char *portName, const char *marCCDPort, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Constructor for marCCD driver; 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 asynStatus writeFloat64 (asynUser *pasynUser, epicsFloat64 value)
 Called when asyn clients call pasynFloat64->write(). More...
 
virtual asynStatus readEnum (asynUser *pasynUser, char *strings[], int values[], int severities[], size_t nElements, size_t *nIn)
 
virtual void setShutter (int open)
 Set the shutter position. More...
 
virtual void report (FILE *fp, int details)
 Report status of the driver. More...
 
void marCCDTask ()
 This should be private but is called from C, must be public. More...
 
void getImageDataTask ()
 This should be private but is called from C, must be public. 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 asynStatus connect (asynUser *pasynUser)
 Connects driver to device; This method is called when the driver's pasynCommon->connect() function is called. 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 ()
 

Public Attributes

epicsEventId stopEventId
 This should be private but is accessed from C, must be public. More...
 
- Public Attributes inherited from asynNDArrayDriver
class NDArrayPoolpNDArrayPool
 An NDArrayPool pointer that is initialized to pNDArrayPoolPvt_ in the constructor. More...
 

Protected Attributes

int marCCDGateMode
 
int marCCDReadoutMode
 
int marCCDServerMode
 
int marCCDTiffTimeout
 
int marCCDSeriesFileTemplate
 
int marCCDSeriesFileDigits
 
int marCCDSeriesFileFirst
 
int marCCDOverlap
 
int marCCDState
 
int marCCDStatus
 
int marCCDTaskAcquireStatus
 
int marCCDTaskReadoutStatus
 
int marCCDTaskCorrectStatus
 
int marCCDTaskWritingStatus
 
int marCCDTaskDezingerStatus
 
int marCCDTaskSeriesStatus
 
int marCCDStability
 
int marCCDFrameShift
 
int marCCDDetectorDistance
 
int marCCDBeamX
 
int marCCDBeamY
 
int marCCDStartPhi
 
int marCCDRotationAxis
 
int marCCDRotationRange
 
int marCCDTwoTheta
 
int marCCDWavelength
 
int marCCDFileComments
 
int marCCDDatasetComments
 
- 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_
 

Detailed Description

Driver for marCCD (Rayonix) CCD detector; communicates with the marCCD program over a TCP/IP socket with the marccd_server_socket program that they distribute.

The marCCD program must be set into Acquire/Remote Control/Start to use this driver.

Constructor & Destructor Documentation

◆ marCCD()

marCCD::marCCD ( const char *  portName,
const char *  serverPort,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Constructor for marCCD driver; most parameters are simply passed to ADDriver::ADDriver.

After calling the base class constructor this method creates a thread to collect the detector data, and sets reasonable default values the parameters defined in this class, asynNDArrayDriver, and ADDriver.

Parameters
[in]portNameThe name of the asyn port driver to be created.
[in]serverPortThe name of the asyn port driver previously created with drvAsynIPPortConfigure connected to the marccd_server program.
[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

◆ getImageDataTask()

void marCCD::getImageDataTask ( )

This should be private but is called from C, must be public.

This task does the correction and file saving in the background, so that acquisition can be overlapped with these operations.

◆ marCCDTask()

void marCCD::marCCDTask ( )

This should be private but is called from C, must be public.

This thread controls acquisition, reads TIFF files to get the image data, and does the callbacks to send it to higher layers.

◆ readEnum()

asynStatus marCCD::readEnum ( asynUser *  pasynUser,
char *  strings[],
int  values[],
int  severities[],
size_t  nElements,
size_t *  nIn 
)
virtual

◆ report()

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

◆ setShutter()

void marCCD::setShutter ( int  open)
virtual

Set the shutter position.

This method will open (1) or close (0) the shutter if ADShutterMode==ADShutterModeEPICS. Drivers will implement setShutter if they support ADShutterModeDetector. If ADShutterMode=ADShutterModeDetector they will control the shutter directly, else they will call this method.

Parameters
[in]open1 (open) or 0 (closed)

Reimplemented from ADDriver.

◆ writeFloat64()

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

Called when asyn clients call pasynFloat64->write().

This function performs actions for some parameters. 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.

◆ writeInt32()

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

Called when asyn clients call pasynInt32->write().

This function performs actions for some parameters, including ADAcquire, ADBinX, 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

◆ marCCDBeamX

int marCCD::marCCDBeamX
protected

◆ marCCDBeamY

int marCCD::marCCDBeamY
protected

◆ marCCDDatasetComments

int marCCD::marCCDDatasetComments
protected

◆ marCCDDetectorDistance

int marCCD::marCCDDetectorDistance
protected

◆ marCCDFileComments

int marCCD::marCCDFileComments
protected

◆ marCCDFrameShift

int marCCD::marCCDFrameShift
protected

◆ marCCDGateMode

int marCCD::marCCDGateMode
protected

◆ marCCDOverlap

int marCCD::marCCDOverlap
protected

◆ marCCDReadoutMode

int marCCD::marCCDReadoutMode
protected

◆ marCCDRotationAxis

int marCCD::marCCDRotationAxis
protected

◆ marCCDRotationRange

int marCCD::marCCDRotationRange
protected

◆ marCCDSeriesFileDigits

int marCCD::marCCDSeriesFileDigits
protected

◆ marCCDSeriesFileFirst

int marCCD::marCCDSeriesFileFirst
protected

◆ marCCDSeriesFileTemplate

int marCCD::marCCDSeriesFileTemplate
protected

◆ marCCDServerMode

int marCCD::marCCDServerMode
protected

◆ marCCDStability

int marCCD::marCCDStability
protected

◆ marCCDStartPhi

int marCCD::marCCDStartPhi
protected

◆ marCCDState

int marCCD::marCCDState
protected

◆ marCCDStatus

int marCCD::marCCDStatus
protected

◆ marCCDTaskAcquireStatus

int marCCD::marCCDTaskAcquireStatus
protected

◆ marCCDTaskCorrectStatus

int marCCD::marCCDTaskCorrectStatus
protected

◆ marCCDTaskDezingerStatus

int marCCD::marCCDTaskDezingerStatus
protected

◆ marCCDTaskReadoutStatus

int marCCD::marCCDTaskReadoutStatus
protected

◆ marCCDTaskSeriesStatus

int marCCD::marCCDTaskSeriesStatus
protected

◆ marCCDTaskWritingStatus

int marCCD::marCCDTaskWritingStatus
protected

◆ marCCDTiffTimeout

int marCCD::marCCDTiffTimeout
protected

◆ marCCDTwoTheta

int marCCD::marCCDTwoTheta
protected

◆ marCCDWavelength

int marCCD::marCCDWavelength
protected

◆ stopEventId

epicsEventId marCCD::stopEventId

This should be private but is accessed from C, must be public.


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