areaDetector  3-13
EPICS areaDetector framework
Classes | Macros | Functions
firewireWinDCAM.cpp File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <epicsString.h>
#include <epicsTime.h>
#include <epicsThread.h>
#include <epicsEvent.h>
#include <epicsEndian.h>
#include <iocsh.h>
#include <ADDriver.h>
#include <stdafx.h>
#include <1394Camera.h>
#include <epicsExport.h>

Classes

class  FirewireWinDCAM
 Main driver class inherited from areaDetectors ADDriver class. More...
 

Macros

#define PERR(errCode)   this->err(errCode, __LINE__)
 firewireWinDCAM.cpp This is areaDetector driver support for firewire cameras that comply with the IIDC DCAM protocol. More...
 
#define MAX_1394_BUFFERS   6
 
#define MAX_1394_VIDEO_FORMATS   8
 
#define MAX_1394_VIDEO_MODES   8
 
#define MAX_1394_FRAME_RATES   8
 
#define MAX(x, y)   ((x)>(y)?(x):(y))
 
#define FDC_feat_valString   "FDC_FEAT_VAL"
 Specific asyn commands for this support module. More...
 
#define FDC_feat_val_maxString   "FDC_FEAT_VAL_MAX"
 
#define FDC_feat_val_minString   "FDC_FEAT_VAL_MIN"
 
#define FDC_feat_val_absString   "FDC_FEAT_VAL_ABS"
 
#define FDC_feat_val_abs_maxString   "FDC_FEAT_VAL_ABS_MAX"
 
#define FDC_feat_val_abs_minString   "FDC_FEAT_VAL_ABS_MIN"
 
#define FDC_feat_modeString   "FDC_FEAT_MODE"
 
#define FDC_feat_availableString   "FDC_FEAT_AVAILABLE"
 
#define FDC_feat_absoluteString   "FDC_FEAT_ABSOLUTE"
 
#define FDC_formatString   "FDC_FORMAT"
 
#define FDC_modeString   "FDC_MODE"
 
#define FDC_framerateString   "FDC_FRAMERATE"
 
#define FDC_colorcodeString   "FDC_COLORCODE"
 
#define FDC_valid_formatString   "FDC_VALID_FORMAT"
 
#define FDC_valid_modeString   "FDC_VALID_MODE"
 
#define FDC_valid_framerateString   "FDC_VALID_FRAMERATE"
 
#define FDC_valid_colorcodeString   "FDC_VALID_COLORCODE"
 
#define FDC_has_formatString   "FDC_HAS_FORMAT"
 
#define FDC_has_modeString   "FDC_HAS_MODE"
 
#define FDC_has_framerateString   "FDC_HAS_FRAMERATE"
 
#define FDC_has_colorcodeString   "FDC_HAS_COLORCODE"
 
#define FDC_current_formatString   "FDC_CURRENT_FORMAT"
 
#define FDC_current_modeString   "FDC_CURRENT_MODE"
 
#define FDC_current_framerateString   "FDC_CURRENT_FRAMERATE"
 
#define FDC_current_colorcodeString   "FDC_CURRENT_COLORCODE"
 
#define FDC_readout_timeString   "FDC_READOUT_TIME"
 
#define FDC_dropped_framesString   "FDC_DROPPED_FRAMES"
 
#define FIRST_FDC_PARAM   FDC_feat_val
 Feature value (int32 read/write) addr: 0-17. More...
 
#define LAST_FDC_PARAM   FDC_dropped_frames
 Number of dropped frames (int32, read) More...
 
#define NUM_FDC_PARAMS   ((int)(&LAST_FDC_PARAM - &FIRST_FDC_PARAM + 1))
 Number of asyn parameters (asyn commands) this driver supports. More...
 

Functions

int WinFDC_Config (const char *portName, const char *camid, int maxBuffers, size_t maxMemory, int priority, int stackSize)
 Configuration function to configure one camera. More...
 
 epicsExportRegistrar (firewireWinDCAMRegister)
 

Macro Definition Documentation

◆ FDC_colorcodeString

#define FDC_colorcodeString   "FDC_COLORCODE"

◆ FDC_current_colorcodeString

#define FDC_current_colorcodeString   "FDC_CURRENT_COLORCODE"

◆ FDC_current_formatString

#define FDC_current_formatString   "FDC_CURRENT_FORMAT"

◆ FDC_current_framerateString

#define FDC_current_framerateString   "FDC_CURRENT_FRAMERATE"

◆ FDC_current_modeString

#define FDC_current_modeString   "FDC_CURRENT_MODE"

◆ FDC_dropped_framesString

#define FDC_dropped_framesString   "FDC_DROPPED_FRAMES"

◆ FDC_feat_absoluteString

#define FDC_feat_absoluteString   "FDC_FEAT_ABSOLUTE"

◆ FDC_feat_availableString

#define FDC_feat_availableString   "FDC_FEAT_AVAILABLE"

◆ FDC_feat_modeString

#define FDC_feat_modeString   "FDC_FEAT_MODE"

◆ FDC_feat_val_abs_maxString

#define FDC_feat_val_abs_maxString   "FDC_FEAT_VAL_ABS_MAX"

◆ FDC_feat_val_abs_minString

#define FDC_feat_val_abs_minString   "FDC_FEAT_VAL_ABS_MIN"

◆ FDC_feat_val_absString

#define FDC_feat_val_absString   "FDC_FEAT_VAL_ABS"

◆ FDC_feat_val_maxString

#define FDC_feat_val_maxString   "FDC_FEAT_VAL_MAX"

◆ FDC_feat_val_minString

#define FDC_feat_val_minString   "FDC_FEAT_VAL_MIN"

◆ FDC_feat_valString

#define FDC_feat_valString   "FDC_FEAT_VAL"

Specific asyn commands for this support module.

These will be used and managed by the parameter library (part of areaDetector).

◆ FDC_formatString

#define FDC_formatString   "FDC_FORMAT"

◆ FDC_framerateString

#define FDC_framerateString   "FDC_FRAMERATE"

◆ FDC_has_colorcodeString

#define FDC_has_colorcodeString   "FDC_HAS_COLORCODE"

◆ FDC_has_formatString

#define FDC_has_formatString   "FDC_HAS_FORMAT"

◆ FDC_has_framerateString

#define FDC_has_framerateString   "FDC_HAS_FRAMERATE"

◆ FDC_has_modeString

#define FDC_has_modeString   "FDC_HAS_MODE"

◆ FDC_modeString

#define FDC_modeString   "FDC_MODE"

◆ FDC_readout_timeString

#define FDC_readout_timeString   "FDC_READOUT_TIME"

◆ FDC_valid_colorcodeString

#define FDC_valid_colorcodeString   "FDC_VALID_COLORCODE"

◆ FDC_valid_formatString

#define FDC_valid_formatString   "FDC_VALID_FORMAT"

◆ FDC_valid_framerateString

#define FDC_valid_framerateString   "FDC_VALID_FRAMERATE"

◆ FDC_valid_modeString

#define FDC_valid_modeString   "FDC_VALID_MODE"

◆ FIRST_FDC_PARAM

#define FIRST_FDC_PARAM   FDC_feat_val

Feature value (int32 read/write) addr: 0-17.

◆ LAST_FDC_PARAM

#define LAST_FDC_PARAM   FDC_dropped_frames

Number of dropped frames (int32, read)

◆ MAX

#define MAX (   x,
 
)    ((x)>(y)?(x):(y))

◆ MAX_1394_BUFFERS

#define MAX_1394_BUFFERS   6

◆ MAX_1394_FRAME_RATES

#define MAX_1394_FRAME_RATES   8

◆ MAX_1394_VIDEO_FORMATS

#define MAX_1394_VIDEO_FORMATS   8

◆ MAX_1394_VIDEO_MODES

#define MAX_1394_VIDEO_MODES   8

◆ NUM_FDC_PARAMS

#define NUM_FDC_PARAMS   ((int)(&LAST_FDC_PARAM - &FIRST_FDC_PARAM + 1))

Number of asyn parameters (asyn commands) this driver supports.

◆ PERR

#define PERR (   errCode)    this->err(errCode, __LINE__)

firewireWinDCAM.cpp This is areaDetector driver support for firewire cameras that comply with the IIDC DCAM protocol.

This implements the FirewireWinDCAM class which inherits from the areaDetector ADDriver class.

The driver uses the 1394Camera library from Carnegie-Mellon University

Created: March 2009 Convenience macro to be used inside the firewireDCAM class.

Function Documentation

◆ epicsExportRegistrar()

epicsExportRegistrar ( firewireWinDCAMRegister  )

◆ WinFDC_Config()

int WinFDC_Config ( const char *  portName,
const char *  camid,
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 FirewireWinDCAM class.

Parameters
[in]portNameAsyn port name to assign to the camera.
[in]camidThe camera ID or serial number in a hexadecimal string. Lower case and upper case letters can be used. This is used to identify a specific camera on the bus. For instance: "0x00b09d01007139d0". If this parameter is empty ("") then the first camera found on the Firewire bus will be used.
[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. Use -1 for 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). Use -1 for 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.