DLL Document
Data Structures | Macros | Typedefs | Enumerations | Functions
clcamiface.h File Reference
#include "clcamdefines.h"

Data Structures

struct  TCLCameraHardware
struct  TCLNetworkConfig
struct  tsEnetData
struct  tsHeartBeatData
struct  tsImageData
struct  tsRecordParams
struct  tsUSBData

Macros

#define __cdecl
#define CCDSP_PRODUCT_ID   0x1005
 the nominal CCDSP USB Product ID
#define CCDSP_VENDOR_ID   0x1EF8
 the nominal CCDSP USB Vendor ID
#define CIS_CALSTATE_CLEARED   2
#define CIS_CALSTATE_LOADED   1
#define CIS_CALSTATE_UNKNOWN   0
#define CL_DEFAULT_TIMEOUT   20000
 default camera timeout period
#define CLEAR_EACH_FRAME_MASK   128
#define DECLSPEC
#define PATTERNTYPE_CROSSHAIR   SIMTYPE_CROSSHAIR
 two values, cross hairs DC value in PatternParams[0], value 2 in PatternParams[1], every [2] in X, [3] in Y
#define PATTERNTYPE_DC   SIMTYPE_DC
 each read pixel from camera is replaced with DC value in mnSimParams[0]
#define PATTERNTYPE_GRADIENT_X   SIMTYPE_GRADIENT_X
 pixels are scaled from PatternParams[0] to PatternParams[1] by PatternParams[2] in X dimension
#define PATTERNTYPE_GRADIENT_Y   SIMTYPE_GRADIENT_Y
 pixels are scaled from PatternParams[0] to PatternParams[1] by PatternParams[2] in Y dimension
#define PATTERNTYPE_NONE   SIMTYPE_NONE
 use real CCD data
#define PATTERNTYPE_RAMP   SIMTYPE_RAMP
 pixels are incremented by one starting at zero
#define PATTERNTYPE_RANDOM   SIMTYPE_RANDOM
 pixesl mean is PatternParams[0] with std of 0.1 * PatternParams[1]

Typedefs

typedef struct TCLCameraHardware CAMERA_HARDWARE
typedef struct TCLNetworkConfig CAMERA_NET_CONFIG
typedef void(* ERRORMESSAGECALLBACK )(int CameraHandle, unsigned char severity, unsigned char code, char *ErrorString)
typedef struct tsHeartBeatData HEARTBEAT_DATA
typedef void(* HEARTBEATCALLBACK )(int CameraHandle, HEARTBEAT_DATA *data)
typedef void(* IMAGEDATACALLBACK )(int CameraHandle, tsImageData *data)
typedef void(* USERDEFINEDCALLBACK )(int CameraHandle, void *msg, int length)

Enumerations

enum  teCISChannelConfig { eeCombined = 0, eeLowGain = 1, eeHighGain = 2 }
enum  teCISShutterMode { eeRollingShutter = 0, eeGlobalShutter = 1 }
enum  teExtTrigMode { eeOnePerImage = 0, eeOnePerGroup = 1 }
enum  tePinState {
  eeINPUT = 0, eeOUTLOW = 1, eeOUTHIGH = 2, eeSHUTTER = 3,
  eeOUTTIMGEN0 = 4, eeOUTTIMGEN1 = 5, eeOUTTIMGEN2 = 6
}

Functions

int CLAbortRead (int CameraHandle)
int CLCameraReset (int CameraHandle)
int CLCISCalibrate (int CameraHandle)
int CLCISCalibrationState (int CameraHandle, int *State)
int CLCISClearCalibration (int CameraHandle)
int CLCISLoadCalibration (int CameraHandle)
int CLCISSelectChannel (int CameraHandle, teCISChannelConfig Config)
int CLCISSetShutterMode (int CameraHandle, teCISShutterMode Mode)
int CLClearCCD (int CameraHandle, int NTimes, int Binning)
int CLCloseCamera (int CameraHandle)
int CLEnableFan (int CameraHandle, int anEnable)
int CLEngineeringCommand (int CameraHandle, int command, void *pData)
int CLFindUSBSerialCamera (int anSerialNumber)
int CLGetAreaEx (int CameraHandle, int *maxROI, int *numROI, int *RowStart, int *ColStart, int *NRows, int *NCols)
int CLGetAutoTriggerReArm (int CameraHandle, int *ReArm)
int CLGetBinMaskParam (int CameraHandle, unsigned char *BinMask, int *BinMaskSize, int *HorizBinning)
int CLGetBinningSequence (int CameraHandle, unsigned char *apVerticalSeq, unsigned char *apHorizSeq, unsigned char *apN)
int CLGetBinParam (int CameraHandle, int Index, unsigned char *BinCode, int *BinCodeSize)
int CLGetBoardTemp (int CameraHandle, short *temp)
int CLGetCameraHardwareInfo (int CameraHandle, TCLCameraHardware *Hardware, int *BufferLen)
int CLGetCameraNetworkConfig (int CameraHandle, TCLNetworkConfig *Config)
int CLGetCCDArea (int CameraHandle, int *RowStart, int *ColStart, int *NRows, int *NCols)
int CLGetCCDImageMirroring (int CameraHandle, unsigned int *apMirrorHorizontal, unsigned int *apMirrorVertical)
int CLGetCCDTargetTemp (int CameraHandle, float *apSetPointDegC)
int CLGetCCDTemp (int CameraHandle, short *temp)
int CLGetCooling (int CameraHandle, int *CoolingEnabled)
int CLGetDllVersion (void)
int CLGetExposureTime (int CameraHandle, long int *Milliseconds)
int CLGetGainConfig (int CameraHandle, int *NumSettings, float *Gains, int *CurrentSetting)
int CLGetGPIO (int CameraHandle)
int CLGetHorBinParam (int CameraHandle, int Index, unsigned char *BinCode, int *BinCodeSize)
int CLGetImageIntervals (int CameraHandle, unsigned long int *AreaReadMs, unsigned long int *BinnedReadMs, unsigned long int *AreaMaskedReadMs, unsigned long int *CustomReadMs)
int CLGetParameter (int CameraHandle, unsigned int ParamID, void *ParamBuf, int ParamBufSize)
int CLGetReadoutNoise (int CameraHandle, float *Mean, float *std)
int CLGetReadProgress (int CameraHandle, unsigned int *ImageNum)
int CLGetShutterParams (int CameraHandle, long int *apOpenMs, long int *apCloseMs, int *apActiveHigh)
int CLGetSimpleBinning (int CameraHandle, int *VertBinFactor, int *HorBinFactor, float *VertScale, float *HorScale)
int CLGetTimingData (int CameraHandle, void *TimingData, int *TimingDataSize)
int CLGetTimingDataSize (void)
int CLGetTrigger (int CameraHandle, int *PinNumber)
int CLGetTriggerMode (int CameraHandle, teExtTrigMode *TriggerMode, int *DelayMs, int *FallingEdge)
int CLisCameraReady (int CameraHandle)
int CLLocateEnetCameras (tsEnetData *apData, int anNumBuffers)
int CLLocateHSUSBCameras (tsUSBData *apData, int anNumBuffers)
int CLOpenCameraBySerialNumber (int anSerialNumber)
int CLOpenENetCamera (char *IPAddress, unsigned short IPPort)
int CLOpenHSUSBCamera (int DeviceIndex)
int CLOpenSerialCamera (int ComNumber)
int CLOpenUSBSerialCamera (int ComNumber)
int CLOverrideImageTimout (int CameraHandle, int Timeout_Ms)
int CLReadCCDArea (int CameraHandle, unsigned short *Data, unsigned int NumImages, unsigned int NumClears)
int CLReadCCDBinned (int CameraHandle, long int *Data, unsigned short *MaxPixel, int NumImages, int NumClears)
int CLReadCCDMaskBinned (int CameraHandle, long int *data, unsigned short *MaxPixel, int NumImages, int NumClears)
int CLSendUserDefined (int CameraHandle, void *msg)
int CLSetAreaEx (int CameraHandle, int numROI, int *RowStart, int *ColStart, int *NRows, int *NCols)
int CLSetAutoTriggerReArm (int CameraHandle, int ReArm)
int CLSetBinMaskParam (int CameraHandle, unsigned char *BinMaskCode, int HorizVertical)
int CLSetBinningSequence (int CameraHandle, unsigned char *apVerticalSeq, unsigned char *apHorizSeq, unsigned char anN)
int CLSetBinParam (int CameraHandle, unsigned char *BinCodes, int BinNumber)
int CLSetCameraHardwareInfo (int CameraHandle, TCLCameraHardware *Hardware, int *BuffLen)
int CLSetCameraNetworkConfig (int CameraHandle, TCLNetworkConfig *Config)
int CLSetCCDArea (int CameraHandle, int RowStart, int ColStart, int NRows, int NCols)
int CLSetCCDImageMirroring (int CameraHandle, unsigned int anMirrorHorizontal, unsigned int anMirrorVertical)
int CLSetCCDOffset (int CameraHandle, unsigned short Target, bool ApplyZeroMean)
int CLSetCCDTargetTemp (int CameraHandle, float anSetPointDegC)
int CLSetCooling (int CameraHandle, int CoolingEnabled)
int CLSetErrorCallback (int CameraHandle, ERRORMESSAGECALLBACK ProcessErrorMsg)
int CLSetExposure (int CameraHandle, long int Milliseconds)
int CLSetGain (int CameraHandle, int Setting)
int CLSetGPIO (int CameraHandle, int PinNumber, tePinState PinState)
int CLSetHeartBeatCallback (int CameraHandle, HEARTBEATCALLBACK ProcessHeartBeatData)
int CLSetHorBinParam (int CameraHandle, unsigned char *BinCodes, int BinNumber)
int CLSetImageDataCallback (int CameraHandle, IMAGEDATACALLBACK ProcessImageData)
int CLSetImageInterval (int CameraHandle, unsigned long int DesiredIntervalMs)
int CLSetParameter (int CameraHandle, unsigned int ParamID, void *ParamBuf, int ParamBufSize)
int CLSetRecording (int CameraHandle, tsRecordParams *params, int paramsize)
int CLSetShearingParams (int CameraHandle, int Enable, unsigned int WinRows, unsigned int WinCols, unsigned int Threshold)
int CLSetShutterOverride (int CameraHandle, int Override, int ForceOpen)
int CLSetShutterParams (int CameraHandle, long int OpenMs, long int CloseMs, int ActiveHigh)
int CLSetSimpleBinning (int CameraHandle, int VertBinFactor, int HorBinFactor, float VertScale, float HorScale)
int CLSetTestPattern (int CameraHandle, int pattern, unsigned short *PatternParams, int ParamSize)
int CLSetTimingData (int CameraHandle, void *TimingData, int TimingDataSize)
int CLSetTrigger (int CameraHandle, int PinNumber)
int CLSetTriggerMode (int CameraHandle, teExtTrigMode TriggerMode, int DelayMs, int FallingEdge)
int CLSetUserDefinedCallback (int CameraHandle, USERDEFINEDCALLBACK ProcessUserDefined)
int CLWaitCompletion (int CameraHandle, int TimeoutTime_Ms)

CLCamera Return Codes

This area defines return codes used by the interface API.

#define CL_CAMERA_READY   0
 Indicates camera is ready and idle.
#define CL_CAMERA_OK   0
 Indicates camera successfully processed a command.
#define CL_OPS_PENDING   -1
 Indicates camera is pending on operations (not idle, busy)
#define CL_TIMEOUT   -2
 Indicates camera operations were timed out (a problem has occurred)
#define CL_INVALID_HANDLE   -3
 Indicates invalid camera handle was passed to the API.
#define CL_BUFF_TOO_SMALL   -4
 Indicates buffer passed to function is too small for data requested.
#define CL_BAD_PARAM   -5
 Indicates bad parameter passed to function.

Constants used in configuring direction to bin in.

#define BIN_VERTICALLY   1
#define BIN_HORIZONTALLY   2

Detailed Description

Author:
Critical Link LLC
Date:
4/16/2009
Remarks:
      o  0
      | /       Copyright (c) 2009
     (CL)---o   Critical Link, LLC
       \
        O

Macro Definition Documentation

#define __cdecl
#define BIN_HORIZONTALLY   2
#define BIN_VERTICALLY   1
#define CCDSP_PRODUCT_ID   0x1005

the nominal CCDSP USB Product ID

#define CCDSP_VENDOR_ID   0x1EF8

the nominal CCDSP USB Vendor ID

#define CIS_CALSTATE_CLEARED   2
#define CIS_CALSTATE_LOADED   1
#define CIS_CALSTATE_UNKNOWN   0
#define CL_BAD_PARAM   -5

Indicates bad parameter passed to function.

#define CL_BUFF_TOO_SMALL   -4

Indicates buffer passed to function is too small for data requested.

#define CL_CAMERA_OK   0

Indicates camera successfully processed a command.

#define CL_CAMERA_READY   0

Indicates camera is ready and idle.

#define CL_DEFAULT_TIMEOUT   20000

default camera timeout period

#define CL_INVALID_HANDLE   -3

Indicates invalid camera handle was passed to the API.

#define CL_OPS_PENDING   -1

Indicates camera is pending on operations (not idle, busy)

#define CL_TIMEOUT   -2

Indicates camera operations were timed out (a problem has occurred)

#define CLEAR_EACH_FRAME_MASK   128

If this field is "or'd" into the NumClears field of a ReadCCDArea or ReadCCDBinned call, the CCD will be cleared at the beginning of each frame for an acquisition set (e.g., the case where NumImages is non-zero)

#define DECLSPEC

Typedef Documentation

Camera Hardware Revision Info This structure contains the CCDsp Camera hardware revision information.

Ethernet Configuration Information

typedef void(* ERRORMESSAGECALLBACK)(int CameraHandle, unsigned char severity, unsigned char code, char *ErrorString)

This is the required function prototype that an application must use to register a callback for the CCDsp Camera Error Message Data.

Parameters:
[out]severity,:
  • 0: debug
  • 1: status
  • 2: warning
  • 3: error
  • 4: unknown
Note:
debug level severity is not reported in production camera builds.
Parameters:
[out]CameraHandlethe camera handle generating the error
[out]codeerror code - currently not used (0)
[out]stringnull terminated string containing error description

Camera Heart Beat Data The CCDsp camera periodically reports heartbeat data to the API. This structure defines the contents of the heartbeat message.

typedef void(* HEARTBEATCALLBACK)(int CameraHandle, HEARTBEAT_DATA *data)

This is the required function prototype that an application must use to register a callback for the CCDsp Camera HeartBeat Data.

Parameters:
[out]CameraHandlethe handle of the camera initiating the callback
[out]dataA pointer to the DLL allocated data structure.
Attention:
This structure is not valid after the callback function returns. The Application should copy any data from this structure prior to returning from the callback function.
Warning:
This callback should not attempt to invoke the same thread as that which may be performing a CLCamera blocking call (e.g., CLWaitCompletion).
typedef void(* IMAGEDATACALLBACK)(int CameraHandle, tsImageData *data)

This is the required function prototype that an application can use to register a callback for any image request results.

Parameters:
[out]CameraHandlethe handle to the camera initiating the callback
[out]tsImageDatastructure containing the image capture parameters and pointer to data
typedef void(* USERDEFINEDCALLBACK)(int CameraHandle, void *msg, int length)

This is the required function prototype that an application must use to register a new message callback.

Parameters:
[in]CameraHandlethe handle to the camera initiating the callback
[in]msgthe pointer to the user data area passed by the application to the CLReadCCDArea Call
[in]lengththe number of points contained in the message

Enumeration Type Documentation

Enumerator:
eeCombined 
eeLowGain 
eeHighGain 
Enumerator:
eeRollingShutter 
eeGlobalShutter 

This enumeration is used to describe how the external trigger event (rising edge on the trigger pin) is used for a capture request (CLReadCCDArea or CLReadCCDBinned). This mode is only significant for capture calls using a NumImages parameter greater than 1.

Enumerator:
eeOnePerImage 

requires a rising edge event for each image in a capture request

eeOnePerGroup 

requires a trigger event for the first image in a capture request

enum tePinState

This enumeration is used when configuring the GPIO pins on the CCDsp camera. The GPIOs can be configured as inputs (including using them for external triggers) and may also be configured as outputs. For outputs, you may control the IO lines via software (LOW or HIGH) or tie them to a logic timing signal, including the shutter strobe.

Enumerator:
eeINPUT 

set the GPIO as in INPUT

eeOUTLOW 

drive GPIO low

eeOUTHIGH 

drive GPIO high

eeSHUTTER 

drive GPIO with shutter signal

eeOUTTIMGEN0 

drive GPIO with custom timing strobe 0

eeOUTTIMGEN1 

drive GPIO with custom timing strobe 1

eeOUTTIMGEN2 

drive GPIO with custom timing strobe 2


Function Documentation

int CLAbortRead ( int  CameraHandle)

Aborts a multi-image read. Camera stops after completion of next remaining image set.

Returns:
non-zero on error.
int CLCameraReset ( int  CameraHandle)

This function resets the communications link between the camera and PC and stops any camera operation that is pending.

Parameters:
[in]CameraHandleA valid CLCamera Handle
Returns:
non-zero on error.
int CLCISCalibrate ( int  CameraHandle)

Request CIS camera Gain and Offset Calibration.

This routine should be called while the camera is under a dark environment. Results of the calibration are stored in non-volatile memory and will be used on subsequent operations. Users should not typically need to call this routine as the units are calibrated at factory.

Returns:
non-zero on error.
int CLCISCalibrationState ( int  CameraHandle,
int *  State 
)

Request current calibration state of a CIS camera.

Call this to determine current calibration state of the camera.

Parameters:
Statecalibration state of the camera, one of CIS_CALSTATE_UNKNOWN, CIS_CALSTATED_CLEARED, CIS_CALSTATE_LOADED
Returns:
non-zero on error.
int CLCISClearCalibration ( int  CameraHandle)

Remove active calibration data from CIS processing.

Call this do un-apply gain and bias calibration settings from the CIS camera in order to receive RAW sensor data. Call CLCISLoadCalibration to

Returns:
non-zero on error.
int CLCISLoadCalibration ( int  CameraHandle)

Request CIS Camera (re)load calibration data from FLASH.

Normally, it only makes sense to call this function on a CIS camera that has had it's calibration cleared with CLCISClearCalibration().

Returns:
non-zero on error.
int CLCISSelectChannel ( int  CameraHandle,
teCISChannelConfig  Config 
)

Configure CIS camera channel selection for subsequent imaging.

Parameters:
[in]CameraHandlea valid camera handle.
[in]Configmust be eeCombined, eeLowGain, or eeHighGain
Returns:
non-zero on error.
int CLCISSetShutterMode ( int  CameraHandle,
teCISShutterMode  Mode 
)

Set CIS camera shutter mode.

Parameters:
[in]CameraHandlea valid camera handle.
[in]ModeValid shutter mode, either eeRollingShutter or eeGlobalShutter
Returns:
non-zero on error.
int CLClearCCD ( int  CameraHandle,
int  NTimes,
int  Binning 
)

Command the CCD to clear. This is a non-blocking call. To force the application to wait until this operation completes, the user should use the CLWaitCompletion function.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]NTimesnumber of times to clear camera
[in]Binningnumber of rows to bin while clearing (not used, set to 0)
Returns:
non-zero on error.
int CLCloseCamera ( int  CameraHandle)

Close/Clean up resouces associated with a CLCamera Handle

Parameters:
[in]CameraHandleA valid CLCamera Handle
Returns:
non-zero on error
int CLEnableFan ( int  CameraHandle,
int  anEnable 
)

This function will enable or disable an attached FAN on the camera. By default the FAN will be enabled on power up.

Note:
this feature will only work with cameras with controllable FAN module.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]anEnablewhen non-zero, FAN will be enabled.
Returns:
-1 on error
int CLEngineeringCommand ( int  CameraHandle,
int  command,
void *  pData 
)

Utility command used to pass engineering commands to the DLL software.

Attention:
This function is not supported and is intended for internal development use only.
Parameters:
[in]CameraHandlea valid CLCamera Handle
[in]commandinteger command
[in]pDatadata block for optional command parameters
Returns:
non-zero on error. This method is a blocking call.
int CLFindUSBSerialCamera ( int  anSerialNumber)

Try to find the camera who's serial number is given. This routine will check only Critical Link USB CDC cameras

Note:
Each camera found will be opened to check the serial number. If the serial number is not the desired one, it will be closed again.
Parameters:
[in]anSerialNumberThe serial number of the desired camera
Returns:
A valid CLCamera Handle or -1 on failure. The failure could be either the camera was not found or the camera was found, but there was an error opening it.
int CLGetAreaEx ( int  CameraHandle,
int *  maxROI,
int *  numROI,
int *  RowStart,
int *  ColStart,
int *  NRows,
int *  NCols 
)

Obtain the currently configured multiple-ROI state. This can also be used to determine the maximum number of windows the camera supports. When numROI returns 1, the camera's ROI should be fetched with CLGetCCDArea.

This is a blocking call.

Parameters:
[in]CameraHandlea valid camera handle.
[out]maxROIpointer to store the maximum number of ROIs the camera supports
[out]numROIpointer to store the number of ROIs the camera is configured for
[out]RowStartpointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI start row
[out]ColStartpointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI start column
[out]NRowspointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI height
[out]NColspointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI width
Returns:
non-zero on error.
int CLGetAutoTriggerReArm ( int  CameraHandle,
int *  ReArm 
)

This routine returns the current AutoTriggerReArm configuration (see CLSetAutoTriggerReArm for details).

Parameters:
[in]CameraHandlea valid camera handle
[in]ReArmpointer to location to store current re-arm mode
Returns:
non-zero when an error condition is detected
int CLGetBinMaskParam ( int  CameraHandle,
unsigned char *  BinMask,
int *  BinMaskSize,
int *  HorizBinning 
)

Reads the Binning Mask Parameters currently configured in the CLCamera

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]BinMasklocation to write the binning masks (array of characters)
[in]BinMaskSizesize (in bytes of the BinMask Array
[out]HorizBinninglocation to write the horizontal binning parameter
Returns:
non-zero on error. This is a blocking function call.
int CLGetBinningSequence ( int  CameraHandle,
unsigned char *  apVerticalSeq,
unsigned char *  apHorizSeq,
unsigned char *  apN 
)

This function gets the binning mode sequence for CLReadCCDBinned calls. The CLSetBinParam and CLSetHorBinParam methods provide a way to configure up to 8 vertical binning and up to 8 horizontal binning schemes for use during binned reads.

This routine allows configuring the CCDsp to cycle through various combinations of the vertical and horizontal binning patterns for a multi-image acquisition (e.g., calls to CLReadCCDBinned with NumImages > 1).

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]apVerticalSeqpointer to 1x16 array of vertical binning set indices (0 to 7)
[in]apHorizSeqpointer to 1x16 array of horizontal binning set indices (0 to 7)
[out]apNpointer to char the length of repeating sequence (maximum 16 sequences).
Returns:
non-zero on error.
int CLGetBinParam ( int  CameraHandle,
int  Index,
unsigned char *  BinCode,
int *  BinCodeSize 
)

Reads the Binning Parameters currently configured in the CLCamera

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]Indexbinning index number (from 0 to (CL_MAX_BINSETS-1))
[out]BinCodelocation to write the binning parameters (array of characters)
[in]BinCodeSizesize (in bytes) of BinCode array
Returns:
non-zero on error. This is a blocking function call.
int CLGetBoardTemp ( int  CameraHandle,
short *  temp 
)

Reads the current I/O Board temperature on the CLCamera.

Note:
The temperature reported is the same as that in the HEARTBEAT_DATA structure.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]templocation to write the temperature (signed short, LSB = 0.1 degrees C)
Returns:
non-zero on error. This is a blocking function call.
int CLGetCameraHardwareInfo ( int  CameraHandle,
TCLCameraHardware Hardware,
int *  BufferLen 
)

Retrieve Camera Hardware information from the attached CLCamera.

Note:
this routine will overwrite the BufferLen parameter with the amount of memory required to fill in the Hardware structure.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]Hardwarestructure which will be filled with camera information
[in,out]BufferLenlength of the buffer passed in, amount of data filled returned
Returns:
non-zero on error
int CLGetCameraNetworkConfig ( int  CameraHandle,
TCLNetworkConfig Config 
)

Get Camera Network Configuration for the attached CLCamera.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]Configstructure which will contain the information retrieved.
Returns:
non-zero on error.
int CLGetCCDArea ( int  CameraHandle,
int *  RowStart,
int *  ColStart,
int *  NRows,
int *  NCols 
)

Reads the CCD Read Area parameters currently configured in the CLCamera

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]RowStartlocation to write the starting row location
[out]ColStartlocation to write the starting column location
[out]NRowslocation to write the number of rows to read
[out]NColslocation to write the number of columns to read
Returns:
non-zero on error. This function is a blocking function.
int CLGetCCDImageMirroring ( int  CameraHandle,
unsigned int *  apMirrorHorizontal,
unsigned int *  apMirrorVertical 
)

Gets the current mirroring state of the camera. See CLSetCCDImageMirroring for more detail.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]apMirrorHorizontalpointer to location to store horizontal configuration
[out]apMirrorVerticalpointer to location to store vertical configuration
Returns:
non-zdero when an error condition is detected
int CLGetCCDTargetTemp ( int  CameraHandle,
float *  apSetPointDegC 
)

This function reads back the CCD temperature setpoint set by CLSetCCDTemp.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]apSetPointDegCLocation to store CCD temperature setpoint.
Returns:
-1 on error.
int CLGetCCDTemp ( int  CameraHandle,
short *  temp 
)

Reads the temperature of the CCD reference thermistor on the CLCamera.

Note:
The temperature reported is the same as that in the HEARTBEAT_DATA structure.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]templocation to write the temperature (signed short, LSB = 0.1 degrees C)
Returns:
non-zero on error. This is a blocking function call.
int CLGetCooling ( int  CameraHandle,
int *  CoolingEnabled 
)

Reads back the currently configured CLCamera Cooling parameters.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]CoolingEnabledlocation to write the cooling value (0, or 1)
Returns:
non-zero on error.
int CLGetDllVersion ( void  )

Get the current version level of the CLCamera Interface Dynamic Link Library.

Returns:
integer representation of the DLL version for the specified opened device. the version number is 0xXXXXYYYY where XXXX is the major and YYYY is the minor version numbers.
int CLGetExposureTime ( int  CameraHandle,
long int *  Milliseconds 
)

Reads the Exposure Time currently configured in the CLCamera

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]Millisecondslocation to place exposure time in milliseconds
Returns:
non-zero on error. This call will block until the value is acuired
int CLGetGainConfig ( int  CameraHandle,
int *  NumSettings,
float *  Gains,
int *  CurrentSetting 
)

Get the gain configuration of the camera.

Parameters:
[in]CameraHandlea valid camera handle
[out]NumSettingspointer to integer to hold number of possible settings
[out]GainsArray of length MAX_GAIN_SETTINGS of gain values (electrons per count)
[out]CurrentSettingpoint to integer to hold current selected gain index setting
Returns:
non-zero on error.
int CLGetGPIO ( int  CameraHandle)

This routine gets the current state of the 4 GPIO pins

Parameters:
[in]CameraHandlea valid camera handle
Returns:
value reflecting the 4 GPIO pins in low 4 bits
int CLGetHorBinParam ( int  CameraHandle,
int  Index,
unsigned char *  BinCode,
int *  BinCodeSize 
)

Reads the Binning Parameters currently configured in the CLCamera

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]Indexbinning index number (from 0 to (CL_MAX_BINSETS-1))
[out]BinCodelocation to write the binning parameters (array of characters)
[in]BinCodeSizesize (in bytes) of BinCode array
Returns:
non-zero on error. This is a blocking function call.
int CLGetImageIntervals ( int  CameraHandle,
unsigned long int *  AreaReadMs,
unsigned long int *  BinnedReadMs,
unsigned long int *  AreaMaskedReadMs,
unsigned long int *  CustomReadMs 
)

Returns the actual image capture intervals that the CCDsp camera based on the current image transfer settings (binning parameters, area size, etc.) as well as the connection interface and the last set CLSetImageInterval().

If the values for interval times are 0, then the camera will start (if configured) a new exposure immediately after all data is sent, and the interval times are "as fast as possible". In this mode, the image updates are not necessarily consistent from capture to capture.

Different values are provided given the various binning, area, or area masked binned configurations. Input pointer arguements may be NULL (and not used) if they are not needed by the application.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]AreaReadMspointer to location to store expected Area Read image interval
[out]BinnedReadMspointer to location to store expected Binned Read image interval
[out]AreaMaskedReadMspointer to location to store expected Area Masked Read image interval
[out]CustomReadMsnot currently used.
Returns:
non-zero on error.
int CLGetParameter ( int  CameraHandle,
unsigned int  ParamID,
void *  ParamBuf,
int  ParamBufSize 
)

Retreive a camera specific parameter.

Parameters:
[in]CameraHandlea valid camera handle.
[in]Avalid parameter ID. See camera specifications.
[in]ParamBufbuffer to store the parameter.
[in]ParamBufSizeof the buffer.
Returns:
non-zero on error.
int CLGetReadoutNoise ( int  CameraHandle,
float *  Mean,
float *  std 
)

Blocking call to camera which extracts readout noise from the pre-amp conversion circuit without extracting the charge from the CCD camera. This method is provided solely for characterization of the CCDsp camera circuitry between the CCD output and the ADC output.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]Meanthe mean value of the readout noise (should be the same as from setCCD offset
[out]stdthe standard of deviation of the readout noise
Returns:
non-zero on error.
int CLGetReadProgress ( int  CameraHandle,
unsigned int *  ImageNum 
)

Non blocking call which provides percent complete status of ongoing read area or read binned operation. Applications may use this command to provide image read status to the operator on CLCameras with slow physical interfaces.

Parameters:
[in]CameraHandle
[out]ImageNumLocation to store. Current ImageNumber status corresponds to. Starts at 1. If NULL not used.
Returns:
Percent Complete of current Image/Frame. Value will be 100 if no read area or read binned operation is active.
int CLGetShutterParams ( int  CameraHandle,
long int *  apOpenMs,
long int *  apCloseMs,
int *  apActiveHigh 
)

Read Back shutter delay time parameters. See CLSetShutterParams for details.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]apOpenMspointer to store shutter open time (in ms)
[in]apCloseMspointer to store shutter close time (in ms)
[in]apActiveHighpointer to store shutter active high or low
Returns:
non-zero on error.
int CLGetSimpleBinning ( int  CameraHandle,
int *  VertBinFactor,
int *  HorBinFactor,
float *  VertScale,
float *  HorScale 
)

Configure a vision camera for uniform binning. This method supports configuring standard uniform binning patterns (e.g., 1x1, 2x2, 4x4, 1x4, etc.) on MityCAM vision cameras. Check the User's Guide / Data Sheet for your specific camera to see of this command is supported. Most CCD cameras require the use of CLSetBinParam() instead of this call.

Parameters:
[in]CameraHandlea valid camera handle.
[in]VertBinFactorPointer to location to store number of rows to bin in vertical direction.
[in]HorBinFactorPointer to location to store number of columns to bin in horizontal direction.
[in]VertScalePointer to location to store vertical scale parameter
[in]HorScalePointer to location to store horizontal scale parameter
Returns:
non-zero on error.
int CLGetTimingData ( int  CameraHandle,
void *  TimingData,
int *  TimingDataSize 
)

This routine extracts information regarding the timing of the CCD stored on the attached CCDsp camera.

Parameters:
[in]CameraHandlea valid camera handle
[in]TimingDataPointer to a structure to store the information
[in,out]TimingDataSize
Returns:
non-zero when an error condition is detected
int CLGetTimingDataSize ( void  )

Get the number of bytes required to hold a CCDsp Camera Timing file.

Returns:
number of bytes needed to hold a CCDsp Camera Timing File Data structure.
int CLGetTrigger ( int  CameraHandle,
int *  PinNumber 
)

This routine sets GPIO pin to use as exposure trigger

Parameters:
[in]CameraHandlea valid camera handle
[out]PinNumberpointer to number of the GPIO that is set; -1 = no trigger
Returns:
non-zero when an error condition is detected
int CLGetTriggerMode ( int  CameraHandle,
teExtTrigMode TriggerMode,
int *  DelayMs,
int *  FallingEdge 
)

This routine returns the current triggermode configuration (see CLSetTriggerMode for details.

Parameters:
[in]CameraHandlera valid camera handle
[in]TriggerModepointer to location to store current trigger mode
[in]DelayMspointer to location to store DelayMs
[in]FallingEdge,when1 trigger on falling edge, when 0 on rising edge
Returns:
non-zero when an error condition is detected
int CLisCameraReady ( int  CameraHandle)

This functions checks to see if camera is ready, returning immediately.

Parameters:
[in]CameraHandleHandle to a tcCLCamera that was opened.
Returns:
CL_CAMERA_READY all operations have completed successfully CL_OPS_PENDING some operation is still pending
int CLLocateEnetCameras ( tsEnetData apData,
int  anNumBuffers 
)

This function will poll the current network (using a UDP broadcast protocol) for any connected CCDsp Cameras and populate the user provided apData structure with the results.

Parameters:
[out]apDatapointer to user allocated structure to hold the results
[in]anNumBuffersnumber of buffers allocated structure may hold
Returns:
-1 on error or number of cameras located (zero being a valid output)
int CLLocateHSUSBCameras ( tsUSBData apData,
int  anNumBuffers 
)

This function will located any potential CCDsp cameras connected via a USB 2.0 compliant interface and return the number of devices found. Users should check the Vendor and Product IDs to match the CDDSP_VENDOR_ID and CCDSP_PRODUCT_ID codes to ensure that they are connected to a CCDSP device.

Parameters:
[out]apDatapointer to user allocated structure to hold the results
[in]anNumBuffersnumber of buffers allocated structure may hold
Returns:
-1 on error or number of cameras located (zero being a valid output)
int CLOpenCameraBySerialNumber ( int  anSerialNumber)

Try to find the camera who's serial number is given. This routine will check ethernet, HSUSB, and USB CDC serial cameras.

Note:
Each camera found will be opened to check the serial number. If the serial number is not the desired one, it will be closed again.
Parameters:
[in]anSerialNumberThe serial number of the desired camera
Returns:
A valid CLCamera Handle or -1 on failure. The failure could be either the camera was not found or the camera was found, but there was an error opening it.
int CLOpenENetCamera ( char *  IPAddress,
unsigned short  IPPort 
)

Open a CLCamera using an ethernet interface.

Parameters:
[in]IPAddressstring containing IP address (Ex: "192.168.0.1")
[in]IPPortInternet Port Port to connect to
Returns:
a valid CLCamera Handle or -1 on failure
int CLOpenHSUSBCamera ( int  DeviceIndex)

Open a CLCamera using a High Speed USB Serial Port Interface. This DLL supports opening of multiple CLCamera devices if necessary.

Parameters:
[in]DeviceIndexthe USB device index (set to 0 for first camera, -1 to read from INI file)
Returns:
a valid CLCamera Handle or -1 on failure
int CLOpenSerialCamera ( int  ComNumber)

Open a CLCamera using an RS-232 Serial Port Interface. This DLL supports opening of multiple CLCamera devices if necessary.

Note:
the serial interface is deprecated. Users should use the CLOpenHSUSBCamera or the ethernet interface to the camera. The Baud rate for the serial interface is 115200.
Parameters:
[in]ComNumberthe windows COM Port number
Returns:
a valid CLCamera Handle or -1 on failure
int CLOpenUSBSerialCamera ( int  ComNumber)

Open a CLCamera using an USB Serial Port Interface employing a CCDsp camera model utilizing a serial bridge chip interface. This DLL supports opening of multiple CLCamera devices if necessary.

The baud rate for this method is 921600.

Note:
this function is not generally used, as newer CCDsp cameras use a USB 2.0 compliant interface. See CLOpenHSUSBCamera and CLLocateHSUSBCameras.
Parameters:
[in]ComNumberthe windows COM Port number (1 through N)
Returns:
a valid CLCamera Handle or -1 on failure
int CLOverrideImageTimout ( int  CameraHandle,
int  Timeout_Ms 
)

Override the image timeout value when issuing CCDSP image requests. This function is only required if you are working with a custom CCDSP build that integrates images in the camera and does not generate the same number of images as you request (e.g., if you're camera has a co-adding capability built in the MityDSP). Normally, the interface will time out if it hasn't received an image within 20 seconds following the configured exposure time. If you are co-adding many images in the camera, then this time may not be sufficient. This method allows you to override it based on your application's needs.

Parameters:
[in]CameraHandleA valid Camera Handle
[in]Timeout_MsTime to wait in milliseconds, when 0 used default value. When < 0, wait indefinately.
Returns:
non-zero when an error condition is detected
int CLReadCCDArea ( int  CameraHandle,
unsigned short *  Data,
unsigned int  NumImages,
unsigned int  NumClears 
)

Reads the CCD Area Data. This function is non-blocking. If no callback is installed, the user must check that the operation has completed (using CLWaitCompletion) prior to accessing the Data. Otherwise the callback will be invoked following a completed read.

Warning:
If a subarea read is performed using CLSetCCDArea command, the data will be populated according to the area read ASSUMING a data block consistent with a NRxNC image size, where NR is the number of rows in the camera, and NC is the number of columns in the camera. E.G., if the user requests the first 20 columns from all 256 rows of a 256 row x 1024 column camera, pixels will be written to short offset positions 0-19, 1024-1043, ... 261120-261139. It is strongly recommended that users always allocate a full NRxNC short array buffer when working with the camera.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]Data16-bit image data, which should be sized appropriately. If NULL, an internal buffer will be used and provided in the callback. Internal buffers are only valid until the callback function returns. Copies should be made if needed outside of the callback context.
[in]NumImagesnumber of images to read. A value of 0 will read continuously until aborted.
[in]NumClearsNumber of times to clear prior to each image capture.
Returns:
non-zero on error.
int CLReadCCDBinned ( int  CameraHandle,
long int *  Data,
unsigned short *  MaxPixel,
int  NumImages,
int  NumClears 
)

Reads the CCD using the Binning parameters. This function is non-blocking. If no callback is installed, the user must check that the operation has completed prior to accessing the Data. Otherwise the callback will be invoked following a completed read.

Warning:
For binned reads performed using CLReadCCDBinned command, the data will be populated according to the binned rows read ASSUMING a data block consistent with NBRxNC image size, where NBR is the number of output binned rows (rows corresponding to the BIN_SEND opcode) and NC is the number of active columns in the camera. E.G., if the user creates a binning pattern that generates 2 binned output rows that have been horizontally binned two-to-1 of a 256 row x 1024 column camera, pixels will be written to integer (4 byte, signed) offset positions 0-512 and 1024-1536, of the buffer. Users must allocate enough memory assuming no horizontal binning is applied and stride the resulting data stream appropriately.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]Dataarray of pixel values to be filled. If null, an internal buffer will be used and returned to the callback function.
[out]MaxPixellocation to write the maximum value of the read. If NULL, not used.
[in]NumImagesNumber of images. A value of 0 will read continuously until aborted.
[in]NumClearsNumber of clears.
Returns:
int CLReadCCDMaskBinned ( int  CameraHandle,
long int *  data,
unsigned short *  MaxPixel,
int  NumImages,
int  NumClears 
)

Reads the CCD using the Masked Binning parameters. This function is non-blocking. If no callback is installed, the user must check that the operation has completed prior to accessing the Data. Otherwise the callback will be invoked following a completed read.

Warning:
The Data pointer in this method assumes a 2 dimension array to populate that is NRows x NCols pixels in size. Horizontally binned data (collapsed along rows) wlll yeild data points separated by NCols integers from one row to the next.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]dataarray of pixel values to be filled, this is sized as NRowsx1024 pixels in nature.
[out]MaxPixellocation to store maximum pixel seen in CCD (may be NULL)
[in]NumImagesNumber of images. A value of 0 will read continuously until aborted.
[in]NumClearsNumber of clears.
Returns:
non-zero on error
int CLSendUserDefined ( int  CameraHandle,
void *  msg 
)

Sends a user defined message to the CCDSP. This message should only be used if the CCDSP camera has been customized for a specific operation. Please contact the Critical Link LLC engineering team for more details.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]msgthe user defined message to send
Returns:
0 on success, -1 on timeout
int CLSetAreaEx ( int  CameraHandle,
int  numROI,
int *  RowStart,
int *  ColStart,
int *  NRows,
int *  NCols 
)

Set a multiple-ROI configuration. To move into Single ROI mode, numROI should be set to 1. When in single ROI mode, use CLSetCCDArea to change the ROI. When setting numROI to greater than 1, the camera enters multiple ROI mode. Some cameras may have specific requirements dictating limits on the window sizes.

This is a non-blocking call.

Parameters:
[in]CameraHandlea valid camera handle.
[in]maxROIpointer to store the maximum number of ROIs the camera supports
[in]numROIpointer to store the number of ROIs the camera is configured for
[in]RowStartpointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI start row
[in]ColStartpointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI start column
[in]NRowspointer to array of size MAX_NUM_MULTIPLE_ROI for each ROI height
Returns:
non-zero on error.
int CLSetAutoTriggerReArm ( int  CameraHandle,
int  ReArm 
)

This routine will enable auto re-arming of the camera trigger. This feature is intended for use with continuous captures of eeOnePerGroup external triggered data. When this feature is set, the camera will capture the requested number of images from CLReadCCDBinned or CLReadCCDArea upon detection of the trigger condition specified by the CLSetTrigger and CLSetTriggerMode API calls. Immediately after the capture, the camera will re-execute the the last requested CLReadCCDBinned or CLReadCCDArea command, effectively re-arming the trigger.

When this feature is enabled, the camera imaging cycle runs continouosly until a CLAbortRead is called.

Parameters:
[in]CameraHandlea valid camera handle
[in]ReArmwhen non-zero, automatic re-arming will be performed.
Returns:
non-zero when an error condition is detected.
int CLSetBinMaskParam ( int  CameraHandle,
unsigned char *  BinMaskCode,
int  HorizVertical 
)
  Configure the binning pattern of subsequent CLReadCCDMaskBinned calls.

Example:

rc = CLSetBinMaskParam(hCam, BinCode, BIN_VERTICALLY);
BinMaskCode[256*1024] = {
1, 1, 1, 1, 1, 1, 1, 1, …, 1, 1,
1, 1, 1, 1, 1, 0, 0, 0,…., 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,…., 2, 2,
0, 0, 0, 2, 2, 2, 2, 2,…., 2, 2,
2, 2, 2, 2, 2, 2, 2, 2,…., 2, 2,
8, 8, 8, 8, 8, 8, 8, 8,…., 8, 8,
};

This example will result in 8 rows of 1024 bins. Any pixel marked with a 0 will be discarded. Pixels marked with a 1 will be binned into spectrum 1. Pixels marked with 2 will be binned into spectrum 2. etc.

This function sets up the parameter for this readout, but doesn’t initiate a readout. That is done by CLReadMaskBinned().

Note that BinMaskCode is a pointer to a 1D array of consecutive rows of the bin mask code.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]BinMaskCodecode indicating the spectral array to bin this pixel into
[in]HorizVerticaldirection to bin in
int CLSetBinningSequence ( int  CameraHandle,
unsigned char *  apVerticalSeq,
unsigned char *  apHorizSeq,
unsigned char  anN 
)

This function sets a binning mode sequence for CLReadCCDBinned calls. The CLSetBinParam and CLSetHorBinParam methods provide a way to configure up to 8 vertical binning and up to 8 horizontal binning schemes for use during binned reads.

This routine allows configuring the CCDsp to cycle through various combinations of the vertical and horizontal binning patterns for a multi-image acquisition (e.g., calls to CLReadCCDBinned with NumImages > 1).

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]apVerticalSeqpointer to 1xN array of vertical binning set indices (0 to 7)
[in]apHorizSeqpointer to 1xN array of horizontal binning set indices (0 to 7)
[in]anNlength of repeating sequence (maximum 16 sequences).
Returns:
non-zero on error.
int CLSetBinParam ( int  CameraHandle,
unsigned char *  BinCodes,
int  BinNumber 
)

Configure the vertical binning pattern of subsequent CLReadCCDBinned calls.

Example:

This will first discard 8 lines by binning 4 lines at a time and discarding the data (2 times total). Then two lines will be binned in the CCD and read out. Another two lines will be binned and read out. The second read out line will be added to the first. This will continue until eight read out lines have been summed. This summed line data will then be sent out by the camera as 1024 long ints. Next another two lines will be read out and binned, and this is done summing a total of eight times to generate the second 1024 points of data sent to the camera. This readout process will repeat two more times, resulting in a total of four sets of 1024 long ints. The remaining rows of the CCD will then be read out (four at a time) and discarded.

This function sets up the parameter for this readout, but doesn't initiate a readout. That is done by CLReadCCDBinned.

This routine is idendical to CLSetBinParam, but allows the user to specify a binning index number (from 0 to (CL_MAX_BINSETS-1)), which will allow storing different binning sets on the camera.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]BinCodesBinCodes command (one per CCD row) sequence. Valid commands are:
  • BINCODE_BIN = keep row in readout register
  • BINCODE_DISCARD = read out and discard row
  • BINCODE_SUM = read out row and sum in FPGA
  • BINCODE_SEND = read out row, sum in FPGA and send results to PC
[in]BinNumberBinning set to store, range 0 to (CL_MAX_BINSETS-1)
Returns:
non-zero on error.
int CLSetCameraHardwareInfo ( int  CameraHandle,
TCLCameraHardware Hardware,
int *  BuffLen 
)

Set the Camera Hardware information in the attached CLCamera.

Note:
this routine will overwrite the BufferLen parameter with the amount of memory required to fill in the Hardware structure.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[out]Hardwarestructure which will be filled with camera information
[in,out]BuffLenlength of the buffer passed in, amount of data filled returned
Returns:
non-zero on error
int CLSetCameraNetworkConfig ( int  CameraHandle,
TCLNetworkConfig Config 
)

Set Camera Network Configuration for the attached CLCamera. This command will program into non-volatile memory (FLASH) the desired network configuration. In order for these settings to become valid, the camera must be power cycled.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]Configstructure which contains the information to set.
Returns:
non-zero on error.
int CLSetCCDArea ( int  CameraHandle,
int  RowStart,
int  ColStart,
int  NRows,
int  NCols 
)

Sets the parameters for subsequent ReadCCDArea() Commands.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]RowStartstarting row pixel for readout (zero based)
[in]ColStartstarting column pixel for readout (zero based)
[in]NRowsnumber of rows to read out starting from RowStart
[in]NColsnumber of cols to read out starting from ColStart
Returns:
non-zero on error.
int CLSetCCDImageMirroring ( int  CameraHandle,
unsigned int  anMirrorHorizontal,
unsigned int  anMirrorVertical 
)

This function is used to configure image mirroring on the attached CCD camera. It is useful for presenting images to an operator in reverse readout order so that an image may be "flipped" along the horizontal or vertical axis. This allows readouts to be more intuitive to a user (e.g., spectrum data aligned from low frequency to high rather than high to low based on optics setup, etc.).

Image data is always mirrored along the specified axis following any specified binning operations (CCD or DSP). Binning must be configured relative to true CCD orientation. Mirroring is intended for convenience of readout display orientation, not configuration of binning.

For area reads the start row and column specified in CLSetCCDArea commands are with respect to the full area mirrored image. The intent is to provide sub-area readouts that are consistent with full area readouts in pixel image buffers when mirrored. In area readout, image data is always mirrored along the centerline of the CCD axis.

For binned readouts the resulting binned image is mirrored along the center of the resulting image. For example, if a binning configuration results in 5 rows of 512 columns and both axis are configured for mirroring, then the result returned will be 5 rows (mirrored along row 3) and 512 columns (mirrored along columns 128/129). The binned image will still be packed into the bottom 5 rows and "left most" 512 columns in the received image buffer.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]anMirrorHorizontalwhen non-zero mirroring should be applied along horizontal dimension (CCD columns)
[in]anMirrorVerticalwhen non-zero mirroring should be applied along vertical dimension (CCD rows)
Returns:
non-zero when an error condition is detected
int CLSetCCDOffset ( int  CameraHandle,
unsigned short  Target,
bool  ApplyZeroMean 
)

Commands the CLCamera uDSP to configure the DAC such that the average bias of the CCD pre-amp circuit, aligns with the Target value specified. This is a blocking call.

Note:
The CCD substrate voltage should be set prior to making this call.
Typical values for targets are 400 counts.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]TargetTarget value (in CCD counts) to attempt to achieve
[in]ApplyZeroMeanif true, the uDSP will subtract the mean on all Binned Reads
Returns:
non-zero on error.
int CLSetCCDTargetTemp ( int  CameraHandle,
float  anSetPointDegC 
)

This function configures the desired CCD temperature set point that should be tracked by the camera while cooled. This function is inteded for factory calibration, the setpoint is stored in non-volatile memory on the CCD and does not require adjustment by user applications.

Warning:
User Applications should not call this function.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]anSetPointDegCDesired CCD temperature setpoint.
Returns:
-1 on error.
int CLSetCooling ( int  CameraHandle,
int  CoolingEnabled 
)

Enables or disables the cooling in the camera.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]CoolingEnabled
  • 0: No Cooling
  • 1: Cooling
Returns:
non-zero on error.
int CLSetErrorCallback ( int  CameraHandle,
ERRORMESSAGECALLBACK  ProcessErrorMsg 
)

Sets a user defined callback function in order to receive camera error messages. The pointer in the callback function may not be valid following a return from the callback function. Users should make local copies of the data if it is necessary to preserve the information following the callback processing.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in,out]ProcessErrorMsgUser Supplied Callback Function
Returns:
non-zero on error
int CLSetExposure ( int  CameraHandle,
long int  Milliseconds 
)

Sets exposure time for timed exposures. When set to 0, exposure timing is disabled.

If exposure is set, the following sequence occurs when a CLReadXXX() is called:

The exposure time is set to the set value. Once the exposure is complete, the camera is read out according to desired CLReadXXX() function The ReadXXX() call should normally be preceded by a CLClearCCD() call to clear out the imager.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]Millisecondsexposure time in milliseconds
Returns:
non-zero on error.
int CLSetGain ( int  CameraHandle,
int  Setting 
)

Set the gain configuration of the camera.

Parameters:
[in]CameraHandlea valid camera handle
[out]Settingto use, range of 0 to (NumSettings-1), where NumSettings is obtained by CLGetGainConfig
Returns:
non-zero on error.
int CLSetGPIO ( int  CameraHandle,
int  PinNumber,
tePinState  PinState 
)

This routine sets the state of the 4 GPIO pins

Parameters:
[in]CameraHandlea valid camera handle
[in]PinNumbernumber of the GPIO pin to be set. Valid PinNumbers are 0 through 3.
[in]PinStateenum describing state of pin

Valid states include: eeINPUT, eeOUTLOW, eeOUTHIGH, eeOUTTIMGEN0, eeOUTTIMGEN1, eeOUTTIMGEN2

Returns:
non-zero when an error condition is detected
int CLSetHeartBeatCallback ( int  CameraHandle,
HEARTBEATCALLBACK  ProcessHeartBeatData 
)

Sets a user defined callback function in order to receive camera heartbeat information. The pointer in the callback function may not be valid following a return from the callback function. Users should make local copies of the data if it is necessary to preserve the information following the callback processing.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in,out]ProcessHeartBeatDataUser Supplied Callback Function
Returns:
non-zero on error
int CLSetHorBinParam ( int  CameraHandle,
unsigned char *  BinCodes,
int  BinNumber 
)

Configure the horizontal binning pattern of subsequent CLReadCCDBinned calls.

Example:

This will first discard 8 Columns of data. Then the next 8 columns will be added and combined into a single pixel for a given row and sent to the host. This process repeats for 3 more times. The remaining pixels are all discarded in the row. The final output sent to the host will be 4 pixels per row.

This function sets up the horizontal binning parameters for a readout, but doesn't initiate a readout. That is done by CLReadCCDBinned or CLReadCCDBinnedEXT.

Note:
The horizontal and vertical binning set by CLSetBinParam and CLSetHorBinParam are both applied when a binned image is captured by CLReadCCDBinned. By default, horizontal binning is set to BINCODE_SEND for all columns.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]BinCodesBincode command (one per CCD column) sequence. Valid commands are:
  • BINCODE_DISCARD = discard column
  • BINCODE_SUM = SUM column with next column in row.
  • BINCODE_SEND = output pixel with current accumulated column value in a given row.
[in]BinNumberHorizontal Binning Set, range 0 through 7.
Returns:
non-zero on error.
int CLSetImageDataCallback ( int  CameraHandle,
IMAGEDATACALLBACK  ProcessImageData 
)

Sets the CLCamera Image Data Callback function that will be called following a reception of any form of CCD Image Data. The ImageData Callback function takes the place of the CLSetReadMaskBinningCallback, the CLSetReadBinningCallback, and the CLSetReadAreaCallback functions, which were left in the API for backwards compatibility.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in,out]ProcessImageDatacallback function for processing the data when it arrives
Returns:
non-zero on error
int CLSetImageInterval ( int  CameraHandle,
unsigned long int  DesiredIntervalMs 
)

Sets the desired interval between the start of exposure from one image capture cycle to the next. This interval typically includes the transfer time between the camera and the host end point (typically a PC). The desired interval time may not be what is actually achievable, and users should verify the cycle time using the GetImageInterval call.

Note:
Setting the DesiredInvervalMs to 0 will request the camera to operate as rapidly as possible. This may result in jitter in cycle times as the interface mechanism (e.g., TCP transmit times using ethernet) may not be reliably consistent at "fast as possible rates". Setting this value to non-zero will cause the camera to use the best settings possible while gauranteeing a consistent update cycle.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]DesiredIntervalMsdesired image capture cycle time in milliseconds.
Returns:
non-zero on error (illegal camerahandle).
int CLSetParameter ( int  CameraHandle,
unsigned int  ParamID,
void *  ParamBuf,
int  ParamBufSize 
)

Set a camera specific parameter.

Parameters:
[in]CameraHandlea valid camera handle.
[in]Avalid parameter ID. See camera specifications.
[in]ParamBufbuffer to store the parameter.
[in]ParamBufSizeof the buffer.
Returns:
non-zero on error. Note: if the parameter ID was illegal or the wrong size, this routine will still return a "success". However, the camera will generate an error message that can be seen on the camera error callback mechanism.
int CLSetRecording ( int  CameraHandle,
tsRecordParams params,
int  paramsize 
)

Configure camera image recording.

This will initiate remote image recording for cameras that support remote storage such as the CIS camera.

Parameters:
[in]CameraHandlea valid camera handle.
[in]paramsa valid tsRecordParams structure
[in]paramsizenumber of bytes in the tsRecordParams structure (e.g., sizeof(tsRecordParams))
Returns:
non-zero on error.
int CLSetShearingParams ( int  CameraHandle,
int  Enable,
unsigned int  WinRows,
unsigned int  WinCols,
unsigned int  Threshold 
)

Set Camera / Image shearing parameters

This function configures the camera to apply peak/noise shearing to a captured image. Given a window of WinRowsxWinCols centered on a pixel of interest, the average (excluding the pixel of interest) is computed. If the pixel of interest exceeds the average by Threshold counts, the pixel of interest is replaced by the computed average.

This routine is useful for removing pixel noise due to cosmic rays or other forms of radiation noise which may present during prolonged camera exposures.

Note:
shearing is performed before binning in the DSP (but after any vertical binning in the CCD readout register).
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]Enableset to non-zero to enable image shearing (disabled by default)
[in]WinRowsthe averaging region height (in rows) must be ODD
[in]WinColsthe averaging region width (in columns) must be ODD
[in]Thresholdthe pixel threshold that must be exceeded for shearing to occur
Returns:
non-zero on error (even WinRows or WinCols, bad camera handle). 0 on success
int CLSetShutterOverride ( int  CameraHandle,
int  Override,
int  ForceOpen 
)

Forces the camera shutter to remain open or closed until disabled.

Note:
you must call this command with Override = 0 to enable normal shutter operation.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]OverrideWhen non-zero override normal shutter operation
[in]ForceOpenForce shutter open when non-zero, force shutter closed when 0
Returns:
non-zero when an error condition is detected
int CLSetShutterParams ( int  CameraHandle,
long int  OpenMs,
long int  CloseMs,
int  ActiveHigh 
)

Sets shutter delay time parameters.

The camera shutter opening delay, closing delay, and output pulse logic true levels can be configured with this call. During an exposure:

The camera will open the shutter (TTL pulse '1' when ActiveHigh is non-zero, '0' otherwise). The camera will delay for OpenMs milliseconds. The camera will then expose for the exposure time from CLSetExposure(). The camera will close the shutter (TTL pulse '0' when ActiveHigh is non-zero, '1' otherwise). The camera will delay CloseMs milliseconds. Then the CCD pixel data will be read/shifted from the CCD array.

Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]OpenMsMilliseconds to delay while waiting for shutter to open
[in]CloseMsMilliseconds to delay while waiting for shutter to close
[in]ActiveHighwhen non-zero, camera asserts '1' to open shutter. When zero, camera asserts TTL '0' to open shutter.
Returns:
non-zero on error.
int CLSetSimpleBinning ( int  CameraHandle,
int  VertBinFactor,
int  HorBinFactor,
float  VertScale,
float  HorScale 
)

Configure a vision camera for uniform binning. This method supports configuring standard uniform binning patterns (e.g., 1x1, 2x2, 4x4, 1x4, etc.) on MityCAM vision cameras. Check the User's Guide / Data Sheet for your specific camera to see of this command is supported. Most CCD cameras require the use of CLSetBinParam() instead of this call.

Parameters:
[in]CameraHandlea valid camera handle.
[in]VertBinFactorNumber of rows to bin in vertical direction.
[in]HorBinFactorNumber of columns to bin in horizontal direction.
[in]VertScaleset to 1.0
[in]HorScaleset to 1.0
Returns:
non-zero on error.
int CLSetTestPattern ( int  CameraHandle,
int  pattern,
unsigned short *  PatternParams,
int  ParamSize 
)

This routine configures the attached CCDsp camera to override data clocked out by the CCD with test pattern data.

Parameters:
[in]CameraHandlea valid camera handle
[in]patternthe test pattern to generate:
  • PATTERNTYPE_NONE
  • PATTERNTYPE_DC
  • PATTERNTYPE_RAMP
  • PATTERNTYPE_GRADIENT_X
  • PATTERNTYPE_GRADIENT_Y
  • PATTERNTYPE_CROSSHAIR
  • PATTERNTYPE_RANDOM
[in]PatternParamsparameters needed for the specified test pattern
[in]ParamSizenumber of valid parameters in the PatternParams Array
Returns:
non-zero on error.
int CLSetTimingData ( int  CameraHandle,
void *  TimingData,
int  TimingDataSize 
)

This routine loads a new CCD timing file generated by the timing generator application to the attached CCDsp camera.

Warning:
this routine is intended for field level support of CCD timing performance. Failure to use the correct timing files for a given camera can permanently damage a CCDsp camera system.
Parameters:
[in]CameraHandlea valid Camera Handle
[in]TimingDataPointer to a structure containing the timing information
[in]TimingDataSizeSize of the data structure
Returns:
non-zero when an error condition is detected
int CLSetTrigger ( int  CameraHandle,
int  PinNumber 
)

This routine sets GPIO pin to use as exposure trigger

Parameters:
[in]CameraHandlea valid camera handle
[in]PinNumbernumber of the GPIO pin to be set; Range [0-3], -1 = no trigger
Returns:
non-zero when an error condition is detected
int CLSetTriggerMode ( int  CameraHandle,
teExtTrigMode  TriggerMode,
int  DelayMs,
int  FallingEdge 
)

This routine configures the external trigger mode.

Parameters:
[in]CameraHandlea valid camera handle
[in]TriggerMode,maybe eeOnePerImage(default) or eeOnePerGroup
[in]DelayMsnumber of milliseconds to delay from rising edge of trigger to start of frame capture cycle (default is zero)
[in]FallingEdge,when1 trigger declared on falling edge (default), when 0 trigger declared on rising edge
Returns:
non-zero when an error condition is detected
int CLSetUserDefinedCallback ( int  CameraHandle,
USERDEFINEDCALLBACK  ProcessUserDefined 
)

Sets the CLCamera User Defined Message Callback function that will be called after receiving a user defined message.

Parameters:
[in]CameraHandlea valid CLCamera Handle
[in,out]ProcessUserDefinedcallback function for processing the message when it arrives
Returns:
non-zero on error
int CLWaitCompletion ( int  CameraHandle,
int  TimeoutTime_Ms 
)

Wait for all currently queued camera applications to complete before continuing with forced timeout. This method is useful for applications that must know when a read or clear operation has been completed in order to syncronize optical equipment alignment (shutters, lenses, etc.). The user can adjust the timeout period if significantly long exposures are being used (> 10 seconds).

Note:
The timeout time should be > 9 seconds plus the exposure time.
Parameters:
[in]CameraHandleA valid CLCamera Handle
[in]TimeoutTime_Ms- Time in milliseconds that camera should wait before declaring a Timeout condition. set this value to CL_DEFAULT_TIMEOUT to use the default timeout settings in the camera.
Returns:
CL_CAMERA_READY all operations completed successfully -1 if no camera exists with this handle