#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 <epicsExport.h>
#include <ADDriver.h>
#include <stdafx.h>
#include <1394Camera.h>
Classes | |
class | FirewireWinDCAM |
Main driver class inherited from areaDetectors ADDriver class. More... | |
Defines | |
#define | ERR(errCode) if (errCode != 0) fprintf(stderr, "ERROR [%s:%d]: dc1394 code: %d\n", __FILE__, __LINE__, errCode) |
firewireWinDCAM.cpp This is areaDetector driver support for firewire cameras that comply with the IIDC DCAM protocol. | |
#define | PERR(pasynUser, errCode) this->err(pasynUser, errCode, __LINE__) |
Convenience macro to be used inside the firewireDCAM class. | |
#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_N_PARAMS (sizeof( FDCParamString)/ sizeof(FDCParamString[0])) |
Number of asyn parameters (asyn commands) this driver supports. | |
Enumerations | |
enum | FDCParam_t { FDC_feat_val = ADLastStdParam, FDC_feat_val_max, FDC_feat_val_min, FDC_feat_val_abs, FDC_feat_val_abs_max, FDC_feat_val_abs_min, FDC_feat_mode, FDC_feat_available, FDC_feat_absolute, FDC_format, FDC_mode, FDC_framerate, FDC_colorcode, FDC_valid_format, FDC_valid_mode, FDC_valid_framerate, FDC_valid_colorcode, FDC_has_format, FDC_has_mode, FDC_has_framerate, FDC_has_colorcode, FDC_current_format, FDC_current_mode, FDC_current_framerate, FDC_current_colorcode, ADLastDriverParam } |
Specific asyn commands for this support module. 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. | |
epicsExportRegistrar (firewireWinDCAMRegister) |
#define ERR | ( | errCode | ) | if (errCode != 0) fprintf(stderr, "ERROR [%s:%d]: dc1394 code: %d\n", __FILE__, __LINE__, errCode) |
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 Print an errorcode to stderr. Convenience macro to be used when an asynUser is not yet available.
#define FDC_N_PARAMS (sizeof( FDCParamString)/ sizeof(FDCParamString[0])) |
Number of asyn parameters (asyn commands) this driver supports.
#define MAX | ( | x, | |||
y | ) | ((x)>(y)?(x):(y)) |
#define MAX_1394_BUFFERS 6 |
#define MAX_1394_FRAME_RATES 8 |
#define MAX_1394_VIDEO_FORMATS 8 |
#define MAX_1394_VIDEO_MODES 8 |
#define PERR | ( | pasynUser, | |||
errCode | ) | this->err(pasynUser, errCode, __LINE__) |
Convenience macro to be used inside the firewireDCAM class.
enum FDCParam_t |
Specific asyn commands for this support module.
These will be used and managed by the parameter library (part of areaDetector).
epicsExportRegistrar | ( | firewireWinDCAMRegister | ) |
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.
[in] | portName | Asyn port name to assign to the camera. |
[in] | camid | The 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] | 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. Use -1 for 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). Use -1 for 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. |