areaDetector
3-5-0
EPICS areaDetector framework
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <epicsEvent.h>
#include <epicsTime.h>
#include <epicsThread.h>
#include <iocsh.h>
#include <epicsString.h>
#include <epicsExit.h>
#include <FlyCapture2.h>
#include "ADDriver.h"
#include <epicsExport.h>
Classes | |
struct | enumStruct_t |
class | pointGrey |
Main driver class inherited from areaDetectors ADDriver class. More... | |
Macros | |
#define | DRIVER_VERSION 2 |
#define | DRIVER_REVISION 9 |
#define | DRIVER_MODIFICATION 0 |
#define | MAX(x, y) ((x)>(y)?(x):(y)) |
#define | PGPropertyAvailString "PG_PROP_AVAIL" |
#define | PGPropertyOnOffAvailString "PG_PROP_ON_OFF_AVAIL" |
#define | PGPropertyOnOffString "PG_PROP_ON_OFF" |
#define | PGPropertyOnePushAvailString "PG_PROP_ONE_PUSH_AVAIL" |
#define | PGPropertyOnePushString "PG_PROP_ONE_PUSH" |
#define | PGPropertyAutoAvailString "PG_PROP_AUTO_AVAIL" |
#define | PGPropertyManAvailString "PG_PROP_MAN_AVAIL" |
#define | PGPropertyAutoModeString "PG_PROP_AUTO_MODE" |
#define | PGPropertyAbsAvailString "PG_PROP_ABS_AVAIL" |
#define | PGPropertyAbsModeString "PG_PROP_ABS_MODE" |
#define | PGPropertyValueString "PG_PROP_VAL" |
#define | PGPropertyValueBString "PG_PROP_VAL_B" |
#define | PGPropertyValueMaxString "PG_PROP_VAL_MAX" |
#define | PGPropertyValueMinString "PG_PROP_VAL_MIN" |
#define | PGPropertyValueAbsString "PG_PROP_VAL_ABS" |
#define | PGPropertyValueAbsMaxString "PG_PROP_VAL_ABS_MAX" |
#define | PGPropertyValueAbsMinString "PG_PROP_VAL_ABS_MIN" |
#define | PGGigEPropertyValueString "PG_GIGE_PROP_VAL" |
#define | PGGigEPropertyValueMaxString "PG_GIGE_PROP_VAL_MAX" |
#define | PGGigEPropertyValueMinString "PG_GIGE_PROP_VAL_MIN" |
#define | PGVideoModeString "PG_VIDEO_MODE" |
#define | PGFormat7ModeString "PG_FORMAT7_MODE" |
#define | PGBinningModeString "PG_BINNING_MODE" |
#define | PGFrameRateString "PG_FRAME_RATE" |
#define | PGPixelFormatString "PG_PIXEL_FORMAT" |
#define | PGConvertPixelFormatString "PG_CONVERT_PIXEL_FORMAT" |
#define | PGTriggerSourceString "PG_TRIGGER_SOURCE" |
#define | PGTriggerPolarityString "PG_TRIGGER_POLARITY" |
#define | PGSoftwareTriggerString "PG_SOFTWARE_TRIGGER" |
#define | PGSkipFramesString "PG_SKIP_FRAMES" |
#define | PGStrobeSourceString "PG_STROBE_SOURCE" |
#define | PGStrobePolarityString "PG_STROBE_POLARITY" |
#define | PGStrobeEnableString "PG_STROBE_ENABLE" |
#define | PGStrobeDelayString "PG_STROBE_DELAY" |
#define | PGStrobeDurationString "PG_STROBE_DURATION" |
#define | PGPacketSizeString "PG_PACKET_SIZE" |
#define | PGPacketSizeActualString "PG_PACKET_SIZE_ACTUAL" |
#define | PGMaxPacketSizeString "PG_MAX_PACKET_SIZE" |
#define | PGPacketDelayString "PG_PACKET_DELAY" |
#define | PGPacketDelayActualString "PG_PACKET_DELAY_ACTUAL" |
#define | PGPacketResendEnableString "PG_PACKET_RESEND_ENABLE" |
#define | PGBandwidthString "PG_BANDWIDTH" |
#define | PGTimeStampModeString "PG_TIME_STAMP_MODE" |
#define | PGCorruptFramesString "PG_CORRUPT_FRAMES" |
#define | PGDriverDroppedString "PG_DRIVER_DROPPED" |
#define | PGTransmitFailedString "PG_TRANSMIT_FAILED" |
#define | PGDroppedFramesString "PG_DROPPED_FRAMES" |
#define | NUM_PROPERTIES UNSPECIFIED_PROPERTY_TYPE |
#define | NUM_GIGE_PROPERTIES 4 |
#define | NUM_TRIGGER_MODES 17 |
#define | MAX_ADDR NUM_MODES |
#define | NUM_GPIO_PINS 4 |
#define | NUM_BINNING_MODES 3 |
#define | NUM_CONVERT_PIXEL_FORMATS 6 |
#define | DEFAULT_PACKET_DELAY 400 |
#define | MAX_ENUM_STRING_SIZE 26 |
#define | FIRST_PG_PARAM PGPropertyAvail |
Property is available (int32 read) More... | |
#define | LAST_PG_PARAM PGDroppedFrames |
Number of dropped frames (int32 read) More... | |
#define | NUM_PG_PARAMS ((int)(&LAST_PG_PARAM - &FIRST_PG_PARAM + 1)) |
Number of asynPortDriver parameters this driver supports. More... | |
Enumerations | |
enum | propValue_t { propValueA, propValueB } |
enum | binningMode_t { BINNING_1X1, BINNING_2X2, BINNING_4X4 } |
enum | PGTimeStamp_t { TimeStampCamera, TimeStampEPICS, TimeStampHybrid } |
Functions | |
int | pointGreyConfig (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... | |
epicsExportRegistrar (pointGreyRegister) | |
#define DEFAULT_PACKET_DELAY 400 |
#define DRIVER_MODIFICATION 0 |
#define DRIVER_REVISION 9 |
#define DRIVER_VERSION 2 |
#define FIRST_PG_PARAM PGPropertyAvail |
Property is available (int32 read)
#define LAST_PG_PARAM PGDroppedFrames |
Number of dropped frames (int32 read)
#define MAX | ( | x, | |
y | |||
) | ((x)>(y)?(x):(y)) |
#define MAX_ADDR NUM_MODES |
#define MAX_ENUM_STRING_SIZE 26 |
#define NUM_BINNING_MODES 3 |
#define NUM_CONVERT_PIXEL_FORMATS 6 |
#define NUM_GIGE_PROPERTIES 4 |
#define NUM_GPIO_PINS 4 |
#define NUM_PG_PARAMS ((int)(&LAST_PG_PARAM - &FIRST_PG_PARAM + 1)) |
Number of asynPortDriver parameters this driver supports.
#define NUM_PROPERTIES UNSPECIFIED_PROPERTY_TYPE |
#define NUM_TRIGGER_MODES 17 |
#define PGBandwidthString "PG_BANDWIDTH" |
#define PGBinningModeString "PG_BINNING_MODE" |
#define PGConvertPixelFormatString "PG_CONVERT_PIXEL_FORMAT" |
#define PGCorruptFramesString "PG_CORRUPT_FRAMES" |
#define PGDriverDroppedString "PG_DRIVER_DROPPED" |
#define PGDroppedFramesString "PG_DROPPED_FRAMES" |
#define PGFormat7ModeString "PG_FORMAT7_MODE" |
#define PGFrameRateString "PG_FRAME_RATE" |
#define PGGigEPropertyValueMaxString "PG_GIGE_PROP_VAL_MAX" |
#define PGGigEPropertyValueMinString "PG_GIGE_PROP_VAL_MIN" |
#define PGGigEPropertyValueString "PG_GIGE_PROP_VAL" |
#define PGMaxPacketSizeString "PG_MAX_PACKET_SIZE" |
#define PGPacketDelayActualString "PG_PACKET_DELAY_ACTUAL" |
#define PGPacketDelayString "PG_PACKET_DELAY" |
#define PGPacketResendEnableString "PG_PACKET_RESEND_ENABLE" |
#define PGPacketSizeActualString "PG_PACKET_SIZE_ACTUAL" |
#define PGPacketSizeString "PG_PACKET_SIZE" |
#define PGPixelFormatString "PG_PIXEL_FORMAT" |
#define PGPropertyAbsAvailString "PG_PROP_ABS_AVAIL" |
#define PGPropertyAbsModeString "PG_PROP_ABS_MODE" |
#define PGPropertyAutoAvailString "PG_PROP_AUTO_AVAIL" |
#define PGPropertyAutoModeString "PG_PROP_AUTO_MODE" |
#define PGPropertyAvailString "PG_PROP_AVAIL" |
#define PGPropertyManAvailString "PG_PROP_MAN_AVAIL" |
#define PGPropertyOnePushAvailString "PG_PROP_ONE_PUSH_AVAIL" |
#define PGPropertyOnePushString "PG_PROP_ONE_PUSH" |
#define PGPropertyOnOffAvailString "PG_PROP_ON_OFF_AVAIL" |
#define PGPropertyOnOffString "PG_PROP_ON_OFF" |
#define PGPropertyValueAbsMaxString "PG_PROP_VAL_ABS_MAX" |
#define PGPropertyValueAbsMinString "PG_PROP_VAL_ABS_MIN" |
#define PGPropertyValueAbsString "PG_PROP_VAL_ABS" |
#define PGPropertyValueBString "PG_PROP_VAL_B" |
#define PGPropertyValueMaxString "PG_PROP_VAL_MAX" |
#define PGPropertyValueMinString "PG_PROP_VAL_MIN" |
#define PGPropertyValueString "PG_PROP_VAL" |
#define PGSkipFramesString "PG_SKIP_FRAMES" |
#define PGSoftwareTriggerString "PG_SOFTWARE_TRIGGER" |
#define PGStrobeDelayString "PG_STROBE_DELAY" |
#define PGStrobeDurationString "PG_STROBE_DURATION" |
#define PGStrobeEnableString "PG_STROBE_ENABLE" |
#define PGStrobePolarityString "PG_STROBE_POLARITY" |
#define PGStrobeSourceString "PG_STROBE_SOURCE" |
#define PGTimeStampModeString "PG_TIME_STAMP_MODE" |
#define PGTransmitFailedString "PG_TRANSMIT_FAILED" |
#define PGTriggerPolarityString "PG_TRIGGER_POLARITY" |
#define PGTriggerSourceString "PG_TRIGGER_SOURCE" |
#define PGVideoModeString "PG_VIDEO_MODE" |
enum binningMode_t |
enum PGTimeStamp_t |
enum propValue_t |
epicsExportRegistrar | ( | pointGreyRegister | ) |
int pointGreyConfig | ( | 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 pointGrey class.
[in] | portName | asyn port name to assign to the camera. |
[in] | cameraId | The camera index or serial number. |
[in] | traceMask | The 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.
[in] | memoryChannel | The 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.
[in] | maxBuffers | Maxiumum 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] | maxMemory | Maximum 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] | priority | The EPICS thread priority for this driver. 0=use asyn default. |
[in] | stackSize | The size of the stack for the EPICS port thread. 0=use asyn default. |