areaDetector  3-5-0
EPICS areaDetector framework
Classes | Macros | Enumerations | Functions
prosilica.cpp File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <ellLib.h>
#include <epicsTime.h>
#include <epicsThread.h>
#include <epicsString.h>
#include <epicsStdio.h>
#include <epicsMutex.h>
#include <cantProceed.h>
#include <osiSock.h>
#include <iocsh.h>
#include <epicsExit.h>
#include "PvApi.h"
#include "ADDriver.h"
#include <epicsExport.h>

Classes

class  prosilica
 Driver for Prosilica GigE and CameraLink cameras using their PvApi library. More...
 
struct  cameraNode
 

Macros

#define DRIVER_VERSION   2
 
#define DRIVER_REVISION   5
 
#define DRIVER_MODIFICATION   0
 
#define MAX_PVAPI_FRAMES   2
 Number of frame buffers for PvApi. More...
 
#define MAX_PACKET_SIZE   8228
 
#define CONNECT_RETRY_COUNT   30 /* Number of times to retry connecting */
 
#define CONNECT_RETRY_INTERVAL   1 /* Time to sleep between trying to connect */
 
#define FIRST_PS_PARAM   PSReadStatistics
 
#define LAST_PS_PARAM   PSTemperatureMainboard
 
#define NUM_PS_PARAMS   ((int)(&LAST_PS_PARAM - &FIRST_PS_PARAM + 1))
 
#define NUM_TRIGGER_START_MODES   (int)(sizeof(PSTriggerStartModes) / sizeof(PSTriggerStartModes[0]))
 
#define NUM_TRIGGER_EVENT_MODES   (int)(sizeof(PSTriggerEventModes) / sizeof(PSTriggerEventModes[0]))
 
#define NUM_TRIGGER_OVERLAP_MODES   (int)(sizeof(PSTriggerOverlapModes) / sizeof(PSTriggerOverlapModes[0]))
 
#define NUM_SYNC_OUT_MODES   (int)(sizeof(PSSyncOutModes) / sizeof(PSSyncOutModes[0]))
 
#define NUM_STROBE_MODES   (int)(sizeof(PSStrobeModes) / sizeof(PSStrobeModes[0]))
 
#define NUM_EXPOSURE_MODES   (int)(sizeof(PSExposureModes) / sizeof(PSExposureModes[0]))
 
#define NUM_GAIN_MODES   (int)(sizeof(PSGainModes) / sizeof(PSGainModes[0]))
 
#define PSReadStatisticsString   "PS_READ_STATISTICS" /* (asynInt32, r/w) Write to read statistics */
 Driver-specific parameters for the Prosilica driver. More...
 
#define PSBayerConvertString   "PS_BAYER_CONVERT" /* (asynInt32, r/w) Convert Bayer to another format */
 
#define PSGainModeString   "PS_GAIN_MODE" /* (asynInt32, r/w) Camera gain mode, manual or auto */
 
#define PSExposureModeString   "PS_EXPOSURE_MODE" /* (asynInt32, r/w) Camera exposure mode, manual or auto */
 
#define PSDriverTypeString   "PS_DRIVER_TYPE" /* (asynOctet, r/o) Ethernet driver type */
 
#define PSFilterVersionString   "PS_FILTER_VERSION" /* (asynOctet, r/o) Ethernet packet filter version */
 
#define PSTimestampTypeString   "PS_TIMESTAMP_TYPE" /* (asynInt32, r/w) Choose how the timestamping is performed */
 
#define PSResetTimerString   "PS_RESET_TIMER" /* (asynInt32, n/a) Software timer reset/sync */
 
#define PSFrameRateString   "PS_FRAME_RATE" /* (asynFloat64, r/o) Frame rate */
 
#define PSByteRateString   "PS_BYTE_RATE" /* (asynInt32, r/w) Stream bytes per second */
 
#define PSPacketSizeString   "PS_PACKET_SIZE" /* (asynInt32, r/o) Packet size */
 
#define PSFramesCompletedString   "PS_FRAMES_COMPLETED" /* (asynInt32, r/o) Frames completed */
 
#define PSFramesDroppedString   "PS_FRAMES_DROPPED" /* (asynInt32, r/o) Frames dropped */
 
#define PSPacketsErroneousString   "PS_PACKETS_ERRONEOUS" /* (asynInt32, r/o) Erroneous packets */
 
#define PSPacketsMissedString   "PS_PACKETS_MISSED" /* (asynInt32, r/o) Missed packets */
 
#define PSPacketsReceivedString   "PS_PACKETS_RECEIVED" /* (asynInt32, r/o) Packets received */
 
#define PSPacketsRequestedString   "PS_PACKETS_REQUESTED" /* (asynInt32, r/o) Packets requested */
 
#define PSPacketsResentString   "PS_PACKETS_RESENT" /* (asynInt32, r/o) Packets resent */
 
#define PSBadFrameCounterString   "PS_BAD_FRAME_COUNTER" /* (asynInt32, r/o) Bad frame counter */
 
#define PSTriggerDelayString   "PS_TRIGGER_DELAY" /* (asynFloat64, r/w) Frame start trigger delay */
 
#define PSTriggerEventString   "PS_TRIGGER_EVENT" /* (asynInt32, r/w) Frame start trigger event */
 
#define PSTriggerOverlapString   "PS_TRIGGER_OVERLAP" /* (asynInt32, r/w) Frame start trigger overlap */
 
#define PSTriggerSoftwareString   "PS_TRIGGER_SOFTWARE" /* (asynInt32 , r/w) Frame start trigger software*/
 
#define PSSyncIn1LevelString   "PS_SYNC_IN_1_LEVEL" /* (asynInt32, r/o) Sync input 1 level */
 
#define PSSyncIn2LevelString   "PS_SYNC_IN_2_LEVEL" /* (asynInt32, r/o) Sync input 2 level */
 
#define PSSyncOut1ModeString   "PS_SYNC_OUT_1_MODE" /* (asynInt32, r/w) Sync output 1 mode */
 
#define PSSyncOut1LevelString   "PS_SYNC_OUT_1_LEVEL" /* (asynInt32, r/w) Sync output 1 level */
 
#define PSSyncOut1InvertString   "PS_SYNC_OUT_1_INVERT" /* (asynInt32, r/w) Sync output 1 invert */
 
#define PSSyncOut2ModeString   "PS_SYNC_OUT_2_MODE" /* (asynInt32, r/w) Sync output 2 mode */
 
#define PSSyncOut2LevelString   "PS_SYNC_OUT_2_LEVEL" /* (asynInt32, r/w) Sync output 2 level */
 
#define PSSyncOut2InvertString   "PS_SYNC_OUT_2_INVERT" /* (asynInt32, r/w) Sync output 2 invert */
 
#define PSSyncOut3ModeString   "PS_SYNC_OUT_3_MODE" /* (asynInt32, r/w) Sync output 3 mode */
 
#define PSSyncOut3LevelString   "PS_SYNC_OUT_3_LEVEL" /* (asynInt32, r/w) Sync output 3 level */
 
#define PSSyncOut3InvertString   "PS_SYNC_OUT_3_INVERT" /* (asynInt32, r/w) Sync output 3 invert */
 
#define PSStrobe1ModeString   "PS_STROBE_1_MODE" /* (asynInt32, r/w) Strobe 1 mode */
 
#define PSStrobe1DelayString   "PS_STROBE_1_DELAY" /* (asynFloat64, r/w) Strobe 1 delay */
 
#define PSStrobe1CtlDurationString   "PS_STROBE_1_CTL_DURATION"/* (asynInt32, r/w) Strobe 1 controlled duration */
 
#define PSStrobe1DurationString   "PS_STROBE_1_DURATION" /* (asynFloat64, r/w) Strobe 1 duration */
 
#define PSTemperatureMainboardString   "PS_TEMPERATURE_MAINBOARD"/* (asynFloat64, r/o) Device temperature mainboard*/
 

Enumerations

enum  PSTriggerStartMode_t {
  PSTriggerStartFreeRun, PSTriggerStartSyncIn1, PSTriggerStartSyncIn2, PSTriggerStartSyncIn3,
  PSTriggerStartSyncIn4, PSTriggerStartFixedRate, PSTriggerStartSoftware
}
 
enum  PSTimestampType_t {
  PSTimestampTypeNativeTicks, PSTimestampTypeNativeSeconds, PSTimestampTypePOSIX, PSTimestampTypeEPICS,
  PSTimestampTypeIOC
}
 
enum  PSBayerConvert_t { PSBayerConvertNone, PSBayerConvertRGB1, PSBayerConvertRGB2, PSBayerConvertRGB3 }
 

Functions

int prosilicaConfig (char *portName, const char *cameraId, int maxBuffers, size_t maxMemory, int priority, int stackSize, int maxPvAPIFrames)
 
 epicsExportRegistrar (prosilicaRegister)
 

Macro Definition Documentation

◆ CONNECT_RETRY_COUNT

#define CONNECT_RETRY_COUNT   30 /* Number of times to retry connecting */

◆ CONNECT_RETRY_INTERVAL

#define CONNECT_RETRY_INTERVAL   1 /* Time to sleep between trying to connect */

◆ DRIVER_MODIFICATION

#define DRIVER_MODIFICATION   0

◆ DRIVER_REVISION

#define DRIVER_REVISION   5

◆ DRIVER_VERSION

#define DRIVER_VERSION   2

◆ FIRST_PS_PARAM

#define FIRST_PS_PARAM   PSReadStatistics

◆ LAST_PS_PARAM

#define LAST_PS_PARAM   PSTemperatureMainboard

◆ MAX_PACKET_SIZE

#define MAX_PACKET_SIZE   8228

◆ MAX_PVAPI_FRAMES

#define MAX_PVAPI_FRAMES   2

Number of frame buffers for PvApi.

◆ NUM_EXPOSURE_MODES

#define NUM_EXPOSURE_MODES   (int)(sizeof(PSExposureModes) / sizeof(PSExposureModes[0]))

◆ NUM_GAIN_MODES

#define NUM_GAIN_MODES   (int)(sizeof(PSGainModes) / sizeof(PSGainModes[0]))

◆ NUM_PS_PARAMS

#define NUM_PS_PARAMS   ((int)(&LAST_PS_PARAM - &FIRST_PS_PARAM + 1))

◆ NUM_STROBE_MODES

#define NUM_STROBE_MODES   (int)(sizeof(PSStrobeModes) / sizeof(PSStrobeModes[0]))

◆ NUM_SYNC_OUT_MODES

#define NUM_SYNC_OUT_MODES   (int)(sizeof(PSSyncOutModes) / sizeof(PSSyncOutModes[0]))

◆ NUM_TRIGGER_EVENT_MODES

#define NUM_TRIGGER_EVENT_MODES   (int)(sizeof(PSTriggerEventModes) / sizeof(PSTriggerEventModes[0]))

◆ NUM_TRIGGER_OVERLAP_MODES

#define NUM_TRIGGER_OVERLAP_MODES   (int)(sizeof(PSTriggerOverlapModes) / sizeof(PSTriggerOverlapModes[0]))

◆ NUM_TRIGGER_START_MODES

#define NUM_TRIGGER_START_MODES   (int)(sizeof(PSTriggerStartModes) / sizeof(PSTriggerStartModes[0]))

◆ PSBadFrameCounterString

#define PSBadFrameCounterString   "PS_BAD_FRAME_COUNTER" /* (asynInt32, r/o) Bad frame counter */

◆ PSBayerConvertString

#define PSBayerConvertString   "PS_BAYER_CONVERT" /* (asynInt32, r/w) Convert Bayer to another format */

◆ PSByteRateString

#define PSByteRateString   "PS_BYTE_RATE" /* (asynInt32, r/w) Stream bytes per second */

◆ PSDriverTypeString

#define PSDriverTypeString   "PS_DRIVER_TYPE" /* (asynOctet, r/o) Ethernet driver type */

◆ PSExposureModeString

#define PSExposureModeString   "PS_EXPOSURE_MODE" /* (asynInt32, r/w) Camera exposure mode, manual or auto */

◆ PSFilterVersionString

#define PSFilterVersionString   "PS_FILTER_VERSION" /* (asynOctet, r/o) Ethernet packet filter version */

◆ PSFrameRateString

#define PSFrameRateString   "PS_FRAME_RATE" /* (asynFloat64, r/o) Frame rate */

◆ PSFramesCompletedString

#define PSFramesCompletedString   "PS_FRAMES_COMPLETED" /* (asynInt32, r/o) Frames completed */

◆ PSFramesDroppedString

#define PSFramesDroppedString   "PS_FRAMES_DROPPED" /* (asynInt32, r/o) Frames dropped */

◆ PSGainModeString

#define PSGainModeString   "PS_GAIN_MODE" /* (asynInt32, r/w) Camera gain mode, manual or auto */

◆ PSPacketsErroneousString

#define PSPacketsErroneousString   "PS_PACKETS_ERRONEOUS" /* (asynInt32, r/o) Erroneous packets */

◆ PSPacketSizeString

#define PSPacketSizeString   "PS_PACKET_SIZE" /* (asynInt32, r/o) Packet size */

◆ PSPacketsMissedString

#define PSPacketsMissedString   "PS_PACKETS_MISSED" /* (asynInt32, r/o) Missed packets */

◆ PSPacketsReceivedString

#define PSPacketsReceivedString   "PS_PACKETS_RECEIVED" /* (asynInt32, r/o) Packets received */

◆ PSPacketsRequestedString

#define PSPacketsRequestedString   "PS_PACKETS_REQUESTED" /* (asynInt32, r/o) Packets requested */

◆ PSPacketsResentString

#define PSPacketsResentString   "PS_PACKETS_RESENT" /* (asynInt32, r/o) Packets resent */

◆ PSReadStatisticsString

#define PSReadStatisticsString   "PS_READ_STATISTICS" /* (asynInt32, r/w) Write to read statistics */

Driver-specific parameters for the Prosilica driver.

◆ PSResetTimerString

#define PSResetTimerString   "PS_RESET_TIMER" /* (asynInt32, n/a) Software timer reset/sync */

◆ PSStrobe1CtlDurationString

#define PSStrobe1CtlDurationString   "PS_STROBE_1_CTL_DURATION"/* (asynInt32, r/w) Strobe 1 controlled duration */

◆ PSStrobe1DelayString

#define PSStrobe1DelayString   "PS_STROBE_1_DELAY" /* (asynFloat64, r/w) Strobe 1 delay */

◆ PSStrobe1DurationString

#define PSStrobe1DurationString   "PS_STROBE_1_DURATION" /* (asynFloat64, r/w) Strobe 1 duration */

◆ PSStrobe1ModeString

#define PSStrobe1ModeString   "PS_STROBE_1_MODE" /* (asynInt32, r/w) Strobe 1 mode */

◆ PSSyncIn1LevelString

#define PSSyncIn1LevelString   "PS_SYNC_IN_1_LEVEL" /* (asynInt32, r/o) Sync input 1 level */

◆ PSSyncIn2LevelString

#define PSSyncIn2LevelString   "PS_SYNC_IN_2_LEVEL" /* (asynInt32, r/o) Sync input 2 level */

◆ PSSyncOut1InvertString

#define PSSyncOut1InvertString   "PS_SYNC_OUT_1_INVERT" /* (asynInt32, r/w) Sync output 1 invert */

◆ PSSyncOut1LevelString

#define PSSyncOut1LevelString   "PS_SYNC_OUT_1_LEVEL" /* (asynInt32, r/w) Sync output 1 level */

◆ PSSyncOut1ModeString

#define PSSyncOut1ModeString   "PS_SYNC_OUT_1_MODE" /* (asynInt32, r/w) Sync output 1 mode */

◆ PSSyncOut2InvertString

#define PSSyncOut2InvertString   "PS_SYNC_OUT_2_INVERT" /* (asynInt32, r/w) Sync output 2 invert */

◆ PSSyncOut2LevelString

#define PSSyncOut2LevelString   "PS_SYNC_OUT_2_LEVEL" /* (asynInt32, r/w) Sync output 2 level */

◆ PSSyncOut2ModeString

#define PSSyncOut2ModeString   "PS_SYNC_OUT_2_MODE" /* (asynInt32, r/w) Sync output 2 mode */

◆ PSSyncOut3InvertString

#define PSSyncOut3InvertString   "PS_SYNC_OUT_3_INVERT" /* (asynInt32, r/w) Sync output 3 invert */

◆ PSSyncOut3LevelString

#define PSSyncOut3LevelString   "PS_SYNC_OUT_3_LEVEL" /* (asynInt32, r/w) Sync output 3 level */

◆ PSSyncOut3ModeString

#define PSSyncOut3ModeString   "PS_SYNC_OUT_3_MODE" /* (asynInt32, r/w) Sync output 3 mode */

◆ PSTemperatureMainboardString

#define PSTemperatureMainboardString   "PS_TEMPERATURE_MAINBOARD"/* (asynFloat64, r/o) Device temperature mainboard*/

◆ PSTimestampTypeString

#define PSTimestampTypeString   "PS_TIMESTAMP_TYPE" /* (asynInt32, r/w) Choose how the timestamping is performed */

◆ PSTriggerDelayString

#define PSTriggerDelayString   "PS_TRIGGER_DELAY" /* (asynFloat64, r/w) Frame start trigger delay */

◆ PSTriggerEventString

#define PSTriggerEventString   "PS_TRIGGER_EVENT" /* (asynInt32, r/w) Frame start trigger event */

◆ PSTriggerOverlapString

#define PSTriggerOverlapString   "PS_TRIGGER_OVERLAP" /* (asynInt32, r/w) Frame start trigger overlap */

◆ PSTriggerSoftwareString

#define PSTriggerSoftwareString   "PS_TRIGGER_SOFTWARE" /* (asynInt32 , r/w) Frame start trigger software*/

Enumeration Type Documentation

◆ PSBayerConvert_t

Enumerator
PSBayerConvertNone 
PSBayerConvertRGB1 
PSBayerConvertRGB2 
PSBayerConvertRGB3 

◆ PSTimestampType_t

Enumerator
PSTimestampTypeNativeTicks 
PSTimestampTypeNativeSeconds 
PSTimestampTypePOSIX 
PSTimestampTypeEPICS 
PSTimestampTypeIOC 

◆ PSTriggerStartMode_t

Enumerator
PSTriggerStartFreeRun 
PSTriggerStartSyncIn1 
PSTriggerStartSyncIn2 
PSTriggerStartSyncIn3 
PSTriggerStartSyncIn4 
PSTriggerStartFixedRate 
PSTriggerStartSoftware 

Function Documentation

◆ epicsExportRegistrar()

epicsExportRegistrar ( prosilicaRegister  )

◆ prosilicaConfig()

int prosilicaConfig ( char *  portName,
const char *  cameraId,
int  maxBuffers,
size_t  maxMemory,
int  priority,
int  stackSize,
int  maxPvAPIFrames 
)