libpdv.h File Reference


Detailed Description

Header file containing PDV Library function declarations.

Definition in file libpdv.h.

#include "edtinc.h"
#include "edt_types.h"
#include "pdv_interlace.h"

Go to the source code of this file.

Data Structures

struct  _tagDVCState

Defines

#define bits2bytes(bits)   (((int)bits + 7) / 8)
#define PDV_TIMESTAMP_SIZE   8
#define SCFLAG_NORESP   1

Typedefs

typedef EdtDev PdvDev
 For convenience, we use PdvDev in PDV applications, and EdtDev in applications for all other EDT applications.

Functions

void get_bayer_luts (u_char **red, u_char **green, u_char **blue)
int pdv_access (char *fname, int perm)
 Determines file access independent of operating system.
uchar_t * pdv_alloc (int size)
 Convenience routine to allocate memory in a system-independent way.
int pdv_auto_set_roi (PdvDev *pdv_p)
 set ROI to camera width/height; adjust ROI width to be a multiple of 4, and enable ROI
int pdv_auto_set_timeout (PdvDev *pdv_p)
 Sets a reasonable image timeout value based on image size and exposure time (if set) and pixel clock speed (also if set).
u_char ** pdv_buffer_addresses (EdtDev *edt_p)
 Returns the addresses of the buffers allocated by the last call to pdv_multibuf or pdv_set_buffers.
int pdv_bytes_per_line (int width, int depth)
 Returns bytes per line based on width and bit depth, including depth < 8.
char * pdv_camera_type (PdvDev *pdv_p)
 Alias of pdv_get_cameratype.
void pdv_check (EdtDev *edt_p)
void pdv_check_fpga_rev (PdvDev *pdv_p)
int pdv_check_framesync (PdvDev *pdv_p, u_char *image_p, u_int *framecnt)
 Checks for frame sync and frame count.
void pdv_checkfrm (EdtDev *edt_p, u_short *image, u_int imagesize, int verbose)
int pdv_cl_camera_connected (PdvDev *pdv_p)
 Checks whether a camera is connected and turned on.
int pdv_cl_get_fv_counter (PdvDev *pdv_p)
 Gets the number of frame valid transitions that have been seen by the board since the last time the board/channel was initialized or the last time pdv_cl_reset_fv_counter was called.
void pdv_cl_reset_fv_counter (PdvDev *pdv_p)
 Resets the frame valid counter to zero.
void pdv_cl_set_base_channels (PdvDev *pdv_p, int htaps, int vtaps)
 Set the number of channels (taps) and horizontal and vertical alignment of the taps.
int pdv_close (PdvDev *pdv_p)
 Closes the specified device and frees the device struct and image memory.
int pdv_dalsa_ls_set_expose (PdvDev *pdv_p, int hskip, int hactv)
int pdv_debug_level (void)
 Gets the debug level, as set by pdv_debug or outside environment variables.
int pdv_deinterlace (PdvDev *pdv_p, PdvDependent *dd_p, u_char *dmabuf, u_char *output_buf)
void pdv_enable_external_trigger (PdvDev *pdv_p, int flag)
 Enables external triggering.
int pdv_enable_framesync (PdvDev *pdv_p, int mode)
 Enables frame sync footer and frame out-of-synch detection.
int pdv_enable_roi (PdvDev *pdv_p, int flag)
 Enables on-board region of interest.
int pdv_enable_strobe (PdvDev *pdv_p, int ena)
 enable/disable lh strobe.
void pdv_flush_channel_fifo (PdvDev *pdv_p)
 OBSOLETE: just use pdv_flush_fifo(pdv_p) now.
void pdv_flush_fifo (PdvDev *pdv_p)
 FIX !!! Write brief comment for pdv_flush_fifo here.
int pdv_force_single (PdvDev *pdv_p)
 Returns the value of the force_single flag.
int pdv_framesync_mode (PdvDev *pdv_p)
 Returns the framesync mode.
void pdv_free (uchar_t *ptr)
 Convenience routine to free the memory allocated with pdv_alloc.
int pdv_get_allocated_size (PdvDev *pdv_p)
 Returns the allocated size of the image, including any header and pad for page alignment.
int pdv_get_aperture (PdvDev *edt_p)
 This method is obsolete and should not be used.
int pdv_get_baud (EdtDev *edt_p)
 Get the baud rate, typically initialized by the serial_baud directive in the config file (default 9600).
int pdv_get_blacklevel (PdvDev *pdv_p)
 Gets the black level (offset) on the imaging device.
int pdv_get_cam_height (PdvDev *pdv_p)
 Returns the camera image height, in pixels, as set by the configuration file directive height, unaffected by changes made by setting a region of interest.
int pdv_get_cam_width (PdvDev *pdv_p)
 Returns the camera image width, in pixels, as set by the configuration file directive width.
char * pdv_get_camera_class (PdvDev *pdv_p)
 Gets the class of the camera (usually the manufacturer name), as set by initcam from the camera_config file camera_class directive.
char * pdv_get_camera_info (PdvDev *pdv_p)
 Gets the string set by the camera_info configuration file directive.
char * pdv_get_camera_model (PdvDev *pdv_p)
 Gets the model of the camera, as set by initcam from the camera_config file camera_model directive.
char * pdv_get_cameratype (PdvDev *pdv_p)
 Gets the type of the camera, as set by initcam from the camera configuration file's camera description directives.
int pdv_get_depth (PdvDev *pdv_p)
 Gets the depth of the image (number of bits per pixel), as set in the configuration file for the camera in use.
int pdv_get_dmasize (PdvDev *pdv_p)
 Returns the actual amount of image data for DMA.
int pdv_get_dvc_state (PdvDev *pdv_p, DVCState *pState)
int pdv_get_exposure (PdvDev *pdv_p)
 Gets the exposure time on the digital imaging device.
int pdv_get_extdepth (PdvDev *pdv_p)
 Gets the extended depth of the camera.
int pdv_get_firstpixel_counter (PdvDev *pdv_p)
 Query state of the hardware first pixel counter register enable bit.
int pdv_get_frame_height (PdvDev *pdv_p)
 Gets the camera image height.
int pdv_get_frame_period (PdvDev *pdv_p)
 Get the frame period.
int pdv_get_fulldma_size (PdvDev *pdv_p, int *extrasizep)
int pdv_get_fval_done (PdvDev *pdv_p)
int pdv_get_gain (PdvDev *pdv_p)
 Gets the gain on the device.
int pdv_get_header_dma (EdtDev *edt_p)
 Returns the current setting for flag which determines whether the header (or footer) size is to be added to the DMA size.
int pdv_get_header_offset (EdtDev *edt_p)
 Returns the byte offset of the header in the buffer.
HdrPosition pdv_get_header_position (EdtDev *edt_p)
 Returns the header or fotter position value.
int pdv_get_header_size (EdtDev *edt_p)
 Returns the currently defined header or footer size.
int pdv_get_height (PdvDev *pdv_p)
 Gets the height of the image (number of lines), based on the camera in use.
int pdv_get_imagesize (PdvDev *pdv_p)
 Returns the size of the image, absent any padding or header data.
u_char * pdv_get_interleave_data (PdvDev *pdv_p, u_char *buf, int bufnum)
int pdv_get_invert (PdvDev *pdv_p)
 Get the state of the hardware invert register enable bit.
unsigned char * pdv_get_last_image (PdvDev *pdv_p)
 Returns a pointer to the last image that was acquired (non-blocking).
int pdv_get_lines_xferred (PdvDev *pdv_p)
 Gets the number of lines transferred during the last acquire.
int pdv_get_max_gain (EdtDev *edt_p)
 Gets the maximum allowable gain value for this camera, as set by initcam from the camera configuration file gain_max directive.
int pdv_get_max_offset (EdtDev *edt_p)
 Gets the maximum allowable offset (black level) value for this camera, as set by initcam from the camera configuration file offset_max directive.
int pdv_get_max_shutter (EdtDev *edt_p)
 Gets the maximum allowable exposure value for this camera, as set by initcam from the camera_config file shutter_speed_max directive.
int pdv_get_min_gain (EdtDev *edt_p)
 Gets the minimum allowable gain value for this camera, as set by initcam from the camera configuration file gain_min directive.
int pdv_get_min_offset (EdtDev *edt_p)
 Gets the minimum allowable offset (black level) value for this camera, as set by initcam from the camera configuration file offset_min directive.
int pdv_get_min_shutter (EdtDev *edt_p)
 Gets the minimum allowable exposure value for this camera, as set by initcam from the camera_config file shutter_speed_min directive.
int pdv_get_pitch (PdvDev *pdv_p)
 Gets the number of bytes per line (pitch).
int pdv_get_rawio_size (PdvDev *pdv_p)
int pdv_get_roi_enabled (PdvDev *pdv_p)
int pdv_get_serial_block_size (void)
 Returns the block size for serial writes.
int pdv_get_shutter_method (PdvDev *pdv_p, u_int *mcl)
 Return shutter (expose) timing method and mode control (CC) state.
int pdv_get_timeout (PdvDev *pdv_p)
 Gets the length of time to wait for data on acquisition before timing out.
int pdv_get_waitchar (PdvDev *pdv_p, u_char *wchar)
 Get serial wait character, or byte.
int pdv_get_width (PdvDev *pdv_p)
 Gets the width of the image (number of pixels per line), based on the camera in use.
int pdv_get_width_xferred (PdvDev *pdv_p)
 Gets the number of pixels transferred during the last line transferred.
unsigned char * pdv_image (PdvDev *pdv_p)
 Start image acquisition if not already started, then wait for and return the address of the next available image.
int pdv_image_size (PdvDev *pdv_p)
 Returns the size of the image buffer in bytes, based on its width, height, and depth.
int pdv_in_continuous (PdvDev *pdv_p)
 Gets the status of the continuous flag.
int pdv_interlace_method (EdtDev *pd)
 Returns the interlace method, as set from the method_interlace directive in the configuration file [from pdv_initcam].
void pdv_invert (PdvDev *pd, int val)
 Tell the EDT framergrabber hardware to invert each pixel before transferring it to the host computer's memory.
int pdv_is_atmel (PdvDev *pdv_p)
 Infers that this device is connected to is an Atmel camera, based on the camera_class directive.
int pdv_is_cameralink (PdvDev *pdv_p)
 Infers that this device is connected to is a Camera Link camera (as opposed to RS-422 or LVDS parallel), based on settings from the loaded camera config file.
int pdv_is_dvc (PdvDev *pdv_p)
 Infers that this device is connected to is a DVC camera, from settings from the loaded camera config file.
int pdv_is_kodak_i (PdvDev *pdv_p)
 Infer if it's a Redlake (formerly Roper, formerly Kodak) 'i' camera from the serial settings.
int pdv_is_simulator (PdvDev *pdv_p)
 Infers that this device is a simulator -- either a PCI DV CLS board, or a PCIe DV C-Link with simulator FPGA loaded.
unsigned char * pdv_last_image_timed (PdvDev *pdv_p, u_int *timep)
 Identical to pdv_wait_last_image_timed; included for backwards compatability only.
unsigned char * pdv_last_image_timed_raw (PdvDev *pdv_p, u_int *timep, int doRaw)
 Identical to pdv_wait_last_image_timed_raw; included for backwards compatability only.
void pdv_mark_bin (u_char *buf, int n, int width, int height, int x, int y)
void pdv_mark_bin_16 (u_short *buf, int n, int width, int height, int x, int y)
void pdv_mark_ras (u_char *buf, int n, int width, int height, int x, int y)
void pdv_mark_ras_depth (void *buf, int n, int width, int height, int x, int y, int depth, int fg)
int pdv_multibuf (EdtDev *edt_p, int numbufs)
 Sets the number of multiple buffers to use in ring buffer continuous mode, and allocates them.
void pdv_new_debug (int debug)
EdtDevpdv_open (char *edt_devname, int unit)
 Opens channel 0 of an EDT Framegrabber for application access.
PdvDevpdv_open_channel (const char *edt_devname, int unit, int channel)
 Opens an EDT Framegrabber channel for application access.
PdvDevpdv_open_device (const char *edt_devname, int unit, int channel, int verbose)
 Open the pdv device, with option to suppress non-existent device console output.
int pdv_overrun (PdvDev *pdv_p)
 Determines whether data overran on the last aquire.
int pdv_pause_for_serial (PdvDev *pdv_p)
void pdv_perror (char *str)
 Formats and prints a system error.
int pdv_process_inplace (PdvDev *pdv_p)
int pdv_read (PdvDev *pdv_p, unsigned char *buf, unsigned long size)
 Reads image data from the EDT framegrabber board.
int pdv_read_basler_frame (EdtDev *pd, u_char *cmd, int len)
 Read a Basler binary frame command.
int pdv_read_duncan_frame (EdtDev *pdv_p, u_char *frame)
 Read response (binary serial) from a Duncantech MS and DT series camera -- checks for STX and size, then waits for size+1 more bytes.
int pdv_read_response (EdtDev *pd, char *buf)
 Read serial response, wait for timeout (or serial_term if specified), max is 2048 (arbitrary).
int pdv_reset_dma_framecount (PdvDev *pdv_p)
void pdv_reset_serial (PdvDev *pdv_p)
 Resets the serial interface.
int pdv_send_basler_frame (EdtDev *pd, u_char *cmd, int len)
 Send a Basler formatted serial frame.
void pdv_send_break (EdtDev *edt_p)
 send serial break (only aiag and related xilinx files)
int pdv_send_duncan_frame (PdvDev *pdv_p, u_char *cmdbuf, int size)
 Send a Duncantech MS / DT series camera frame -- adds the framing and checksum, then sends the command.
int pdv_serial_binary_command (EdtDev *pd, const char *cmd, int len)
 Sends binary serial command(s) to the camera.
int pdv_serial_binary_command_flagged (EdtDev *pd, const char *cmd, int len, u_int flag)
 Sends a binary serial command.
int pdv_serial_check_enabled (PdvDev *pdv_p)
int pdv_serial_command (EdtDev *pd, const char *cmd)
 Sends an ASCII serial command to the camera, with ASCII camera command formatting.
int pdv_serial_command_flagged (EdtDev *pd, const char *cmd, u_int flag)
 Bottom level serial_command that takes a flag for different options.
int pdv_serial_command_hex (EdtDev *pd, const char *cmd, int len)
 Send hex byte command (formatted ascii "0xNN") as binary.
int pdv_serial_get_numbytes (EdtDev *pd)
 Returns the number of bytes of unread data in the serial response buffer.
char * pdv_serial_prefix (PdvDev *ed)
 Get the serial prefix.
int pdv_serial_read (PdvDev *fd, char *buf, int size)
 Performs a serial read over the serial control lines.
int pdv_serial_read_blocking (PdvDev *fd, char *buf, int size)
 Performs a serial read over the serial control lines, blocks until all requested serial is read.
int pdv_serial_read_disable (PdvDev *pdv_p)
int pdv_serial_read_enable (PdvDev *pdv_p)
int pdv_serial_read_nullterm (PdvDev *fd, char *buf, int size, int nullterm)
 Preforms a serial read over the RS-422 or RS-232 lines if EDT has provided a special cable to accommodate RS-422 or RS-232 serial control.
char * pdv_serial_term (PdvDev *ed)
 Get the serial terminator.
void pdv_serial_txrx (PdvDev *pdv_p, char *txbuf, int txcount, char *rxbuf, int rxcount, int timeout, u_char *wchar)
 Serial send AND recieve -- send a command and wait for the response.
int pdv_serial_wait (EdtDev *pd, int msecs, int count)
 Waits for response from the camera as a result of a pdv_serial_write or pdv_serial_command.
int pdv_serial_wait_next (EdtDev *edt_p, int msecs, int count)
 Wait for next serial to come in -- ignore any previous if 0, just wait for the next thing, however many it is.
int pdv_serial_write (PdvDev *ed, const char *buf, int size)
 Performs a serial write over the serial lines.
int pdv_serial_write_available (PdvDev *pdv_p)
 pdv_serial_write_avail Get the number of bytes available in the driver's serial write buffer.
int pdv_set_aperture (PdvDev *edt_p, int value)
 This method is obsolete and should not be used.
int pdv_set_baud (EdtDev *edt_p, int baud)
 Sets the baud rate on the serial lines; applies only to cameras with serial control.
int pdv_set_binning (PdvDev *pdv_p, int xval, int yval)
 Set binning on the camera to the specified values, and recalculate the values that will be returned by pdv_get_width, pdv_get_height, and pdv_get_imagesize.
int pdv_set_binning_dvc (PdvDev *pdv_p, int xval, int yval)
 DVC 1312 binning.
int pdv_set_blacklevel (PdvDev *pdv_p, int value)
 Sets the black level (offset) on the input device.
int pdv_set_buffers (PdvDev *pdv_p, int nbufs, unsigned char **pBufs)
 Used to set up user-allocated buffers to be used in ring buffer mode, cannot be used on systems that have more than 3.5GB/memory (ie the subroutine has been depricated for all practical purposes, instead use pdv_multibuf).
int pdv_set_buffers_x (PdvDev *pdv_p, int nbufs, int size, unsigned char **pBufs)
int pdv_set_cam_height (PdvDev *pdv_p, int value)
 Sets placeholder for original full camera frame height, unaffected by ROI changes and usually only called by pdv_initcam.
int pdv_set_cam_width (PdvDev *pdv_p, int value)
 Sets placeholder for original full camera frame width, unaffected by ROI changes and usually only called by pdv_initcam.
void pdv_set_defaults (PdvDev *pdv_p)
int pdv_set_depth (PdvDev *pdv_p, int value)
 Deprecated -- instead use the combined pdv_set_depth_extdepth_dpath.
int pdv_set_depth_extdepth (PdvDev *pdv_p, int depth, int extdepth)
 Deprecated -- instead use the combined pdv_set_depth_extdepth_dpath.
int pdv_set_depth_extdepth_dpath (PdvDev *pdv_p, int depth, int extdepth, u_int dpath)
 Sets the bit depth, extended depth, and camera link data path.
int pdv_set_exposure (PdvDev *pdv_p, int value)
 Sets the exposure time, using the method defined by the directives in the camera configuration file, if set.
int pdv_set_exposure_basler202k (PdvDev *pdv_p, int value)
 set exposure (,gain, blacklevel) on basler A202K -- ref BASLER A202K Camera Manual Document ID number DA044003.
int pdv_set_exposure_duncan_ch (PdvDev *pdv_p, int value, int ch)
 Set exposure for Redlake (formerly Duncantech) DT and MS series cameras.
int pdv_set_exposure_mcl (PdvDev *pdv_p, int value)
 Set the exposure when in pulse-width mode (also known as level trigger mode).
int pdv_set_extdepth (PdvDev *pdv_p, int value)
 Deprecated -- instead use the combined pdv_set_depth_extdepth_dpath.
void pdv_set_firstpixel_counter (PdvDev *pdv_p, int ena)
 Enable hardware overwrite of first two bytes of the frame with a counter.
int pdv_set_frame_period (PdvDev *pdv_p, int rate, int method)
 Set the frame period counter and enable/disable frame timing.
void pdv_set_fval_done (PdvDev *pdv_p, int enable)
 Enables frame valid done functionality on the board.
int pdv_set_gain (PdvDev *pdv_p, int value)
 Sets the gain on the input device.
int pdv_set_gain_basler202k (PdvDev *pdv_p, int valuea, int valueb)
int pdv_set_gain_duncan_ch (PdvDev *pdv_p, int value, int ch)
 Set gain for Redlake (formerly Duncantech) DT and MS series cameras.
void pdv_set_header_dma (EdtDev *edt_p, int ndma)
 Sets the boolean value for whether the image header is included in the DMA from the camera.
void pdv_set_header_offset (EdtDev *edt_p, int noffset)
 Sets the byte offset of the header data in the allocated buffer.
void pdv_set_header_position (EdtDev *edt_p, HdrPosition pos)
 Sets the header (or footer) position.
void pdv_set_header_size (EdtDev *edt_p, int nSize)
 Sets the header (or footer) size, in bytes, for the device.
int pdv_set_header_type (PdvDev *pdv_p, int header_type, int irig_slave, int irig_offset, int irig_raw)
 Sets the header (or footer) type.
int pdv_set_height (PdvDev *pdv_p, int value)
 Sets height and reallocates buffers accordingly.
void pdv_set_interlace (PdvDev *pdv_p, int interlace)
 Set the interlace flag.
int pdv_set_mode (PdvDev *pdv_p, char *mode, int mcl)
 This method is obsolete and should not be used.
int pdv_set_mode_dvc (PdvDev *pdv_p, char *mode)
int pdv_set_offset_basler202k (PdvDev *pdv_p, int valuea, int valueb)
int pdv_set_roi (PdvDev *pdv_p, int hskip, int hactv, int vskip, int vactv)
 Sets a rectangular region of interest, supporting cropping.
void pdv_set_serial_block_size (int newsize)
 Sets the block size for serial writes if the default of 512 is not adequate.
void pdv_set_serial_delimiters (PdvDev *ed, char *newprefix, char *newterm)
 Get the serial prefix.
int pdv_set_serial_parity (EdtDev *edt_p, char polarity)
 Sets parity to even, odd, or none.
int pdv_set_shutter_method (PdvDev *pdv_p, int method, unsigned int mcl)
 Set the device's exposure method and CC line state.
int pdv_set_strobe_counters (PdvDev *pdv_p, int count, int delay, int period)
 pdv_set_strobe_counters.
int pdv_set_strobe_dac (PdvDev *pdv_p, u_int value)
 Sets the strobe DAC level.
int pdv_set_timeout (PdvDev *pdv_p, int value)
 Sets the length of time to wait for data on acquisition before timing out.
int pdv_set_waitchar (PdvDev *pdv_p, int enable, u_char wchar)
 Set serial wait character.
int pdv_set_width (PdvDev *pdv_p, int value)
 Sets width and reallocates buffers accordingly.
void pdv_setdebug (PdvDev *pdv_p, int debug)
int pdv_setsize (PdvDev *pdv_p, int width, int height)
 Sets the width and height of the image.
void pdv_setup_continuous (PdvDev *pdv_p)
 Performs setup for continuous transfers.
void pdv_setup_continuous_channel (PdvDev *pdv_p)
 Obsolete.
int pdv_shutter_method (PdvDev *pdv_p)
 Return shutter (expose) timing method.
void pdv_start_expose (PdvDev *pdv_p)
 Start expose independent of grab - only works in continuous mode.
void pdv_start_hardware_continuous (PdvDev *pdv_p)
 Starts hardware continuous mode.
void pdv_start_image (PdvDev *pdv_p)
 Starts acquisition of a single image.
void pdv_start_images (PdvDev *pdv_p, int count)
 Starts multiple image acquisition.
void pdv_stop_continuous (PdvDev *pdv_p)
 Performs un-setup for continuous transfers.
void pdv_stop_hardware_continuous (PdvDev *pdv_p)
 Stops hardware continous mode.
int pdv_strobe (PdvDev *pdv_p, int count, int interval)
 Fires the strobe.
int pdv_strobe_method (PdvDev *pdv_p)
 check if the strobe is even valid for this FPGA, and which method is used.
int pdv_timeout_cleanup (PdvDev *pdv_p)
 Cleans up after a timeout, particularly when you've prestarted multiple buffers or if you've forced a timeout with edt_do_timeout.
int pdv_timeout_restart (PdvDev *pdv_p, int restart)
 Cleans up after a timeout, particularly when you've prestarted multiple buffers or if you've forced a timeout with edt_do_timeout.
int pdv_timeouts (PdvDev *pdv_p)
 Returns the number of times the device timed out (frame didn't transfer completely or at all) since the device was opened.
int pdv_update_from_dvc (PdvDev *pdv_p)
int pdv_update_values_from_camera (PdvDev *pdv_p)
 Deprecated -- Queries certain specific cameras via serial, and sets library variables for gain, black level, exposure time and binning to values based on the results of the query.
int pdv_variable_size (PdvDev *pdv_p)
 Obsolete.
unsigned char * pdv_wait_image (PdvDev *pdv_p)
 Wait for the image started by pdv_start_image, or for the next image started by pdv_start_images.
unsigned char * pdv_wait_image_raw (PdvDev *pdv_p)
 Identical to pdv_wait_image, except image data is returned directly from DMA, bypassing any post-processing that may be in effect.
unsigned char * pdv_wait_image_timed (PdvDev *pdv_p, u_int *timep)
 Identical to pdv_wait_image but also returns the time at which the DMA was complete on this image.
unsigned char * pdv_wait_image_timed_raw (PdvDev *pdv_p, u_int *timep, int doRaw)
 Identical to pdv_wait_image_timed, except the new argument doRaw specifies whether or not to perform the deinterleave.
unsigned char * pdv_wait_images (PdvDev *pdv_p, int count)
 Waits for the images started by pdv_start_images.
unsigned char * pdv_wait_images_raw (PdvDev *pdv_p, int count)
 Identical to the pdv_wait_images, except that it skips any image deinterleave method defined by the method_interlace config file directive.
unsigned char * pdv_wait_images_timed (PdvDev *pdv_p, int count, u_int *timep)
 Identical to pdv_wait_images but also returns the time at which the DMA was complete on the last image.
unsigned char * pdv_wait_images_timed_raw (PdvDev *pdv_p, int count, u_int *timep, int doRaw)
 Identical to pdv_wait_images_timed, except the new argument doRaw specifies whether or not to perform the deinterleave.
unsigned char * pdv_wait_last_image (PdvDev *pdv_p, int *nSkipped)
 Waits for the last image that has been acquired.
unsigned char * pdv_wait_last_image_raw (PdvDev *pdv_p, int *nSkipped, int doRaw)
 Identical to the pdv_wait_last_image, except that it provides a way to determine whether to include or bypass any image deinterleave that is enabled.
unsigned char * pdv_wait_last_image_timed (PdvDev *pdv_p, u_int *timep)
 Identical to pdv_wait_last_image, but also returns the time at which the DMA was complete on the last image.
unsigned char * pdv_wait_last_image_timed_raw (PdvDev *pdv_p, u_int *timep, int doRaw)
 Identical to pdv_wait_last_image_raw but also returns the time at which the DMA was complete on the last image.
unsigned char * pdv_wait_next_image (PdvDev *pdv_p, int *nSkipped)
 Waits for the next image, skipping any previously started images.
unsigned char * pdv_wait_next_image_raw (PdvDev *pdv_p, int *nSkipped, int doRaw)
 Identical to the pdv_wait_next_image, except that it provides a way to include or bypass any image deinterleave method defined by the method_interlace config file directive.
void set_bayer_even_odd_row_scale (double evenscale, double oddscale)
void set_bayer_parameters (int input_bits, double rgb_scale[3], double gamma, int blackoffset, int red_first, int green_first)

Variables

double bayer_even_row_scale
double bayer_odd_row_scale
double bayer_rgb_scale [3]


Function Documentation

int pdv_auto_set_timeout ( PdvDev pdv_p  ) 

Sets a reasonable image timeout value based on image size and exposure time (if set) and pixel clock speed (also if set).

Note:
This subroutine is called by pdv_initcam so it generally isn't necessary to call it from a user application. Nevertheless it can be useful to know how initcam sets the default timeout value (and how to override it); hence this description.

pdv_initcam calls this subroutine after reading in the various camera parameters from the config file. Since most configs don't (presently) have a pclock_speed directive specified, it assumes a conservative 5 Mhz pixel clock speed, which can make for a long timeout value. As a result, for faster cameras in general, and large format ones specifically, if data loss occurs for whatever reason, the pdv_wait acquisition routines may block for an excessively long time if data loss occurs. To get around this, either add a pclock_speed directive to the config file (preferred), or set your own fixed timeout override with the user_timeout directive or pdv_set_timeout.

See also:
pdv_initcam, pdv_set_timeout, pdv_set_exposure, pclock_speed & user_timeout directive in the Camera Configuration Guide
Returns:
0 on success, -1 on failure.

Definition at line 2871 of file libpdv.c.

int pdv_enable_strobe ( PdvDev pdv_p,
int  ena 
)

enable/disable lh strobe.

if method 2, enable or disable as specified if method 1, return ok if enable specified, -1 if disable, since we can't do that with method 1

counters and DAC value will persist whether strobe is enabled or not

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
ena 1 to enable, 0 to disable

Definition at line 8224 of file libpdv.c.

int pdv_get_aperture ( PdvDev pdv_p  ) 

This method is obsolete and should not be used.

The current implementation creates a warning message and returns -1 signifying failure.

Returns:
-1 for failure, always.

Definition at line 3530 of file libpdv.c.

PdvDev* pdv_open_device ( const char *  dev_name,
int  unit,
int  channel,
int  verbose 
)

Open the pdv device, with option to suppress non-existent device console output.

pdv_open_channel calls this subroutine with the verbose argument set to 1, so this subroutine can be directly instead with verbose set to 0 if you want to suppress the console warning message that gets output if attempting to open a non-existent device. Since that's not a bad thing to know (and usually doesn't show up in Windows non-console apps anyway), we recommend using pdv_open_channel unless you specifically want to suppress those messages.

Other than the verbose argument, this is the same as pdv_open_channel see that subroutine for a full description.

Parameters:
verbose verbose output (default 1 for pdv_open_channel) or not (0)
param see pdv_open_channel for other parameters
Returns:
see pdv_open_channel

Definition at line 495 of file libpdv.c.

int pdv_set_aperture ( PdvDev pdv_p,
int  value 
)

This method is obsolete and should not be used.

The current implementation creates a warning message and returns -1 signifying failure.

Returns:
-1 for failure, always.

Definition at line 3297 of file libpdv.c.


Generated on 19 Jun 2015 by  doxygen 1.4.7