areaDetector  3-13
EPICS areaDetector framework
Public Member Functions | Protected Member Functions | List of all members
ADPylon Class Reference

Main driver class inherited from areaDetectors ADGenICam class. More...

#include <ADPylon.h>

Inheritance diagram for ADPylon:
ADGenICam ADDriver asynNDArrayDriver

Public Member Functions

 ADPylon (const char *portName, const char *cameraId, size_t maxMemory, int priority, int stackSize)
 Constructor for the ADPylon class. More...
 
virtual asynStatus readEnum (asynUser *pasynUser, char *strings[], int values[], int severities[], size_t nElements, size_t *nIn)
 
virtual void report (FILE *fp, int details)
 Print out a report; calls ADDriver::report to get base class report as well. More...
 
virtual GenICamFeaturecreateFeature (GenICamFeatureSet *set, std::string const &asynName, asynParamType asynType, int asynIndex, std::string const &featureName, GCFeatureType_t featureType)
 
virtual asynStatus startCapture ()
 
virtual asynStatus stopCapture ()
 
virtual asynStatus connect (asynUser *pasynUser)
 Connects driver to device; This method is called when the driver's pasynCommon->connect() function is called. More...
 
void imageGrabTask ()
 Task to grab images off the camera and send them up to areaDetector. More...
 
void shutdown ()
 Called by epicsAtExit. More...
 
asynStatus processFrame (const Pylon::CGrabResultPtr &pGrabResult)
 Convert Pylon grab result data to areaDetector NDArray. More...
 
void cameraDisconnected ()
 Called by Pylon when the camera is disconnected. More...
 
void readEventData (int index)
 
- Public Member Functions inherited from ADGenICam
 ADGenICam (const char *portName, size_t maxMemory, int priority, int stackSize)
 Constructor for the ADGenICam class. More...
 
virtual asynStatus writeInt32 (asynUser *pasynUser, epicsInt32 value)
 Sets an int32 parameter. More...
 
virtual asynStatus writeInt64 (asynUser *pasynUser, epicsInt64 value)
 Sets an int64 parameter. More...
 
virtual asynStatus writeFloat64 (asynUser *pasynUser, epicsFloat64 value)
 Sets an float64 parameter. More...
 
virtual asynStatus drvUserCreate (asynUser *pasynUser, const char *drvInfo, const char **pptypeName, size_t *psize)
 
virtual asynStatus readStatus ()
 
virtual asynStatus setImageParams ()
 
virtual asynStatus pauseAcquisition ()
 
virtual asynStatus resumeAcquisition ()
 
virtual void showFeature (std::string const &featureName)
 
virtual void decompressMono12p (int numPixels, bool leftShift, epicsUInt8 *input, epicsUInt16 *output)
 Decompresses Mono12p to epicsUInt16. More...
 
virtual void decompressMono12Packed (int numPixels, bool leftShift, epicsUInt8 *input, epicsUInt16 *output)
 Decompresses Mono12Packed to epicsUInt16. More...
 
virtual asynStatus addADDriverFeatures ()
 
- 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 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 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 ()
 

Protected Member Functions

asynStatus extractChunkData (const GenApi::INodeMap &nodeMap, NDAttributeList *pAttributeList)
 

Additional Inherited Members

- Public Attributes inherited from asynNDArrayDriver
class NDArrayPoolpNDArrayPool
 An NDArrayPool pointer that is initialized to pNDArrayPoolPvt_ in the constructor. More...
 
- Protected Attributes inherited from ADGenICam
int GCFrameRate
 
int GCFrameRateEnable
 
int GCTriggerSource
 
int GCTriggerOverlap
 
int GCTriggerSoftware
 
int GCExposureMode
 
int GCExposureAuto
 
int GCGainAuto
 
int GCPixelFormat
 
GenICamFeatureSet mGCFeatureSet
 
- 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 NDFileFreeCapture
 
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 NDPoolPreAllocBuffers
 
int NDPoolNumPreAllocBuffers
 
int NDPoolFreeBuffers
 
int NDPoolMaxMemory
 
int NDPoolUsedMemory
 
int NDPoolEmptyFreeList
 
int NDPoolPollStats
 
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

Main driver class inherited from areaDetectors ADGenICam class.

One instance of this class will control one camera.

Constructor & Destructor Documentation

◆ ADPylon()

ADPylon::ADPylon ( const char *  portName,
const char *  cameraId,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Constructor for the ADPylon class.

Parameters
[in]portNameasyn port name to assign to the camera.
[in]cameraIdThe camera index or serial number; <1000 is assumed to be index, >=1000 is assumed to be serial number.
[in]maxMemoryMaximum memory (in bytes) that this driver is allowed to allocate. So if max. size = 1024x768 (8bpp) and maxBuffers is, say 14. maxMemory = 1024x768x14 = 11010048 bytes (~11MB). 0=unlimited.
[in]priorityThe EPICS thread priority for this driver. 0=use asyn default.
[in]stackSizeThe size of the stack for the EPICS port thread. 0=use asyn default.

Member Function Documentation

◆ cameraDisconnected()

void ADPylon::cameraDisconnected ( )

Called by Pylon when the camera is disconnected.

Here we mark the device unreachable and any further read/write requests will be rejected.

◆ connect()

asynStatus ADPylon::connect ( asynUser *  pasynUser)
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.

Parameters
[in]pasynUserThe pasynUser structure which contains information about the port and address

Reimplemented from ADDriver.

◆ createFeature()

GenICamFeature * ADPylon::createFeature ( GenICamFeatureSet set,
std::string const &  asynName,
asynParamType  asynType,
int  asynIndex,
std::string const &  featureName,
GCFeatureType_t  featureType 
)
virtual

Implements ADGenICam.

◆ extractChunkData()

asynStatus ADPylon::extractChunkData ( const GenApi::INodeMap &  nodeMap,
NDAttributeList pAttributeList 
)
protected

◆ imageGrabTask()

void ADPylon::imageGrabTask ( )

Task to grab images off the camera and send them up to areaDetector.

◆ processFrame()

asynStatus ADPylon::processFrame ( const Pylon::CGrabResultPtr &  pGrabResult)

Convert Pylon grab result data to areaDetector NDArray.

◆ readEnum()

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

Reimplemented from ADGenICam.

◆ readEventData()

void ADPylon::readEventData ( int  index)

◆ report()

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

Print out a report; calls ADDriver::report to get base class report as well.

Parameters
[in]fpFile pointer to write output to
[in]detailsLevel of detail desired. If >1 prints information about supported video formats and modes, etc.

Reimplemented from ADGenICam.

◆ shutdown()

void ADPylon::shutdown ( void  )

Called by epicsAtExit.

Here we close the camera connection and terminate the Pylon system.

◆ startCapture()

asynStatus ADPylon::startCapture ( )
virtual

Implements ADGenICam.

◆ stopCapture()

asynStatus ADPylon::stopCapture ( )
virtual

Implements ADGenICam.


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