areaDetector
3-13
EPICS areaDetector framework
|
#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) | |
#define FDC_colorcodeString "FDC_COLORCODE" |
#define FDC_current_colorcodeString "FDC_CURRENT_COLORCODE" |
#define FDC_current_formatString "FDC_CURRENT_FORMAT" |
#define FDC_current_framerateString "FDC_CURRENT_FRAMERATE" |
#define FDC_current_modeString "FDC_CURRENT_MODE" |
#define FDC_dropped_framesString "FDC_DROPPED_FRAMES" |
#define FDC_feat_absoluteString "FDC_FEAT_ABSOLUTE" |
#define FDC_feat_availableString "FDC_FEAT_AVAILABLE" |
#define FDC_feat_modeString "FDC_FEAT_MODE" |
#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_val_absString "FDC_FEAT_VAL_ABS" |
#define FDC_feat_val_maxString "FDC_FEAT_VAL_MAX" |
#define FDC_feat_val_minString "FDC_FEAT_VAL_MIN" |
#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).
#define FDC_formatString "FDC_FORMAT" |
#define FDC_framerateString "FDC_FRAMERATE" |
#define FDC_has_colorcodeString "FDC_HAS_COLORCODE" |
#define FDC_has_formatString "FDC_HAS_FORMAT" |
#define FDC_has_framerateString "FDC_HAS_FRAMERATE" |
#define FDC_has_modeString "FDC_HAS_MODE" |
#define FDC_modeString "FDC_MODE" |
#define FDC_readout_timeString "FDC_READOUT_TIME" |
#define FDC_valid_colorcodeString "FDC_VALID_COLORCODE" |
#define FDC_valid_formatString "FDC_VALID_FORMAT" |
#define FDC_valid_framerateString "FDC_VALID_FRAMERATE" |
#define FDC_valid_modeString "FDC_VALID_MODE" |
#define FIRST_FDC_PARAM FDC_feat_val |
Feature value (int32 read/write) addr: 0-17.
#define LAST_FDC_PARAM FDC_dropped_frames |
Number of dropped frames (int32, read)
#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 NUM_FDC_PARAMS ((int)(&LAST_FDC_PARAM - &FIRST_FDC_PARAM + 1)) |
Number of asyn parameters (asyn commands) this driver supports.
#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.
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. |