areaDetector
3-14
EPICS areaDetector framework
|
Driver class for FastCCD CCD. More...
#include <FastCCD.h>
Public Member Functions | |
FastCCD (const char *portName, int maxBuffers, size_t maxMemory, int priority, int stackSize, int packetBuffer, int imageBuffer, const char *baseIP, const char *fabricIP, const char *fabricMAC) | |
Constructor for FastCCD driver; most parameters are simply passed to ADDriver::ADDriver. More... | |
~FastCCD () | |
Destructor. More... | |
asynStatus | connect (asynUser *pasynUser) |
Connects driver to device; This method is called when the driver's pasynCommon->connect() function is called. More... | |
asynStatus | disconnect (asynUser *pasynUser) |
asynStatus | writeInt32 (asynUser *pasynUser, epicsInt32 value) |
Called when asyn clients call pasynInt32->writr(). More... | |
asynStatus | writeFloat64 (asynUser *pasynUser, epicsFloat64 value) |
asynStatus | writeOctet (asynUser *pasynUser, const char *value, size_t nc, size_t *na) |
Called when asyn clients call pasynOctet->write(). More... | |
void | report (FILE *fp, int details) |
Report status of the driver. More... | |
void | statusTask (void) |
Update status of detector. More... | |
void | dataStatsTask (void) |
void | detectorWaitTask (void) |
void | messageCallback (const char *message, int severity) |
void | allocateImage (cin_data_frame_t *frame) |
void | processImage (cin_data_frame_t *frame) |
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 | 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... | |
virtual void | updateTimeStamps (NDArray *pArray) |
asynStatus | incrementQueuedArrayCount () |
asynStatus | decrementQueuedArrayCount () |
int | getQueuedArrayCount () |
void | updateQueuedArrayCount () |
Additional Inherited Members | |
Public Attributes inherited from asynNDArrayDriver | |
class NDArrayPool * | pNDArrayPool |
An NDArrayPool pointer that is initialized to pNDArrayPoolPvt_ in the constructor. More... | |
FastCCD::FastCCD | ( | const char * | portName, |
int | maxBuffers, | ||
size_t | maxMemory, | ||
int | priority, | ||
int | stackSize, | ||
int | packetBuffer, | ||
int | imageBuffer, | ||
const char * | baseIP, | ||
const char * | fabricIP, | ||
const char * | fabricMAC | ||
) |
Constructor for FastCCD 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.
[in] | portName | The name of the asyn port driver to be created. |
[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. |
[in] | packetBuffer | The CINDATA packet buffer size |
[in] | imageBuffer | The CINDATA image buffer size |
[in] | baseIP | The base IP address |
[in] | fabricIP | The fabric IP address |
[in] | fabricMAC | The fabric MAC address |
FastCCD::~FastCCD | ( | ) |
Destructor.
Free resources and closes the FastCCD library
void FastCCD::allocateImage | ( | cin_data_frame_t * | frame | ) |
|
virtual |
Connects driver to device; This method is called when the driver's pasynCommon->connect() function is called.
It uses the class variable deviceIsReachable to determine whether to call asynPortDriver::connect(), which in turn calls pasynManager::exceptionConnect() to signal that the driver is connected to the underlying hardware. Derived classes can override this method if they need to handle connect() calls in a more complex way. For example, with a network camera that can be temporarily unreachable the driver could attempt to connect to the camera each time that connect() is called.
[in] | pasynUser | The pasynUser structure which contains information about the port and address |
Reimplemented from ADDriver.
void FastCCD::dataStatsTask | ( | void | ) |
void FastCCD::detectorWaitTask | ( | void | ) |
asynStatus FastCCD::disconnect | ( | asynUser * | pasynUser | ) |
void FastCCD::messageCallback | ( | const char * | message, |
int | severity | ||
) |
void FastCCD::processImage | ( | cin_data_frame_t * | frame | ) |
|
virtual |
Report status of the driver.
Prints details about the detector in us 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 | Controls the level of detail in the report. |
Reimplemented from asynNDArrayDriver.
void FastCCD::statusTask | ( | void | ) |
Update status of detector.
Meant to be run in own thread.
asynStatus FastCCD::writeFloat64 | ( | asynUser * | pasynUser, |
epicsFloat64 | value | ||
) |
|
virtual |
Called when asyn clients call pasynInt32->writr().
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..
[in] | pasynUser | pasynUser structure that encodes the reason and address. |
[in] | value | Value to write. |
Reimplemented from ADDriver.
|
virtual |
Called when asyn clients call pasynOctet->write().
This function performs actions for some parameters, including NDAttributesFile. 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 | Address of the string to write. |
[in] | nChars | Number of characters to write. |
[out] | nActual | Number of characters actually written. |
Reimplemented from asynNDArrayDriver.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |