areaDetector  3-5-0
EPICS areaDetector framework
Classes | Macros | Enumerations | Functions
ADSpinnaker.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <set>
#include <epicsEvent.h>
#include <epicsTime.h>
#include <epicsThread.h>
#include <epicsMessageQueue.h>
#include <iocsh.h>
#include <cantProceed.h>
#include <epicsString.h>
#include <epicsExit.h>
#include "Spinnaker.h"
#include "SpinGenApi/SpinnakerGenApi.h"
#include "ADDriver.h"
#include <epicsExport.h>

Classes

class  ImageEventHandler
 
class  ADSpinnaker
 Main driver class inherited from areaDetectors ADDriver class. More...
 

Macros

#define DRIVER_VERSION   1
 
#define DRIVER_REVISION   0
 
#define DRIVER_MODIFICATION   0
 
#define DEFAULT_PACKET_DELAY   400
 
#define CALLBACK_MESSAGE_QUEUE_SIZE   10
 
#define FIRST_SP_PARAM   SPVideoMode
 

Enumerations

enum  SPPropertyType_t {
  SPPropertyTypeInt, SPPropertyTypeBoolean, SPPropertyTypeEnum, SPPropertyTypeDouble,
  SPPropertyTypeDoubleMin, SPPropertyTypeDoubleMax, SPPropertyTypeString, SPPropertyTypeCmd,
  SPPropertyTypeUnknown
}
 
enum  SPPixelConvert_t {
  SPPixelConvertNone, SPPixelConvertMono8, SPPixelConvertMono16, SPPixelConvertRaw16,
  SPPixelConvertRGB8, SPPixelConvertRGB16
}
 
enum  SPTimeStamp_t { TimeStampCamera, TimeStampEPICS }
 
enum  SPUniqueId_t { UniqueIdCamera, UniqueIdDriver }
 
enum  SPConvertDirection_t { SPConvertToEPICS, SPConvertFromEPICS }
 

Functions

int ADSpinnakerConfig (const char *portName, int cameraId, int traceMask, int memoryChannel, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Configuration function to configure one camera. More...
 
void indent (FILE *fp, unsigned int level)
 
 epicsExportRegistrar (ADSpinnakerRegister)
 

Macro Definition Documentation

◆ CALLBACK_MESSAGE_QUEUE_SIZE

#define CALLBACK_MESSAGE_QUEUE_SIZE   10

◆ DEFAULT_PACKET_DELAY

#define DEFAULT_PACKET_DELAY   400

◆ DRIVER_MODIFICATION

#define DRIVER_MODIFICATION   0

◆ DRIVER_REVISION

#define DRIVER_REVISION   0

◆ DRIVER_VERSION

#define DRIVER_VERSION   1

◆ FIRST_SP_PARAM

#define FIRST_SP_PARAM   SPVideoMode

Enumeration Type Documentation

◆ SPConvertDirection_t

Enumerator
SPConvertToEPICS 
SPConvertFromEPICS 

◆ SPPixelConvert_t

Enumerator
SPPixelConvertNone 
SPPixelConvertMono8 
SPPixelConvertMono16 
SPPixelConvertRaw16 
SPPixelConvertRGB8 
SPPixelConvertRGB16 

◆ SPPropertyType_t

Enumerator
SPPropertyTypeInt 
SPPropertyTypeBoolean 
SPPropertyTypeEnum 
SPPropertyTypeDouble 
SPPropertyTypeDoubleMin 
SPPropertyTypeDoubleMax 
SPPropertyTypeString 
SPPropertyTypeCmd 
SPPropertyTypeUnknown 

◆ SPTimeStamp_t

Enumerator
TimeStampCamera 
TimeStampEPICS 

◆ SPUniqueId_t

Enumerator
UniqueIdCamera 
UniqueIdDriver 

Function Documentation

◆ ADSpinnakerConfig()

int ADSpinnakerConfig ( const char *  portName,
int  cameraId,
int  traceMask,
int  memoryChannel,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize 
)

Configuration function to configure one camera.

This function need to be called once for each camera to be used by the IOC. A call to this function instanciates one object from the ADSpinnaker 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]traceMaskThe initial value of the asynTraceMask.

If set to 0 or 1 then asynTraceMask will be set to ASYN_TRACE_ERROR. If set to 0x21 (ASYN_TRACE_WARNING | ASYN_TRACE_ERROR) then each call to the FlyCap2 library will be traced including during initialization.

Parameters
[in]memoryChannelThe camera memory channel (non-volatile memory containing camera parameters) to load during initialization. If 0 no memory channel is loaded. If >=1 thenRestoreFromMemoryChannel(memoryChannel-1) is called.

Set memoryChannel to 1 to work around a bug in the Linux GigE driver in R2.0.

Parameters
[in]maxBuffersMaxiumum number of NDArray objects (image buffers) this driver is allowed to allocate. This driver requires 2 buffers, and each queue element in a plugin can require one buffer which will all need to be added up in this parameter. 0=unlimited.
[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.

◆ epicsExportRegistrar()

epicsExportRegistrar ( ADSpinnakerRegister  )

◆ indent()

void indent ( FILE *  fp,
unsigned int  level 
)