The PCI DV uses the lower-level EDT DMA Library. Library functions from both libraries operate on the same device handle, and both types of routines can be used in the same application. However PCI DV library subroutines are designed to handle the extra bookeeping, error-recovery, triggering and timing functionality that is present on EDT Digital Video boards. We therefore recommend using only Digital Video library and EDT Message Handler Library subroutines, and call DMA Library routines only when there is functionality needed that is not provided by the Digital Video library.
All routines access a specific device whose handle is created and returned by the pdv_open or pdv_open_channel routine. PCI DV applications typically include the following elements:
#include "edtinc.h"
"pdv" in edtdef.h.)int height = pdv_get_height(pdv_p);
pdv_multibuf(pdv_p, 4) ;
unsigned char *image = pdv_image(pdv_p) ;
pdv_close(pdv_p) ;
See the Makefile (Unix) or generic.mk (Windows), and example programs provided in the install directory for examples of compiling code using the digital video library routines. On Windows you can also create a Visual Studio project to compile and link EDT libraries. Suggested starting points for acquisition are simplest_take.c and simple_take.c. For serial communication, see the serial_cmd.c, a command line serial utility. Other simple_*.c example programs are provided to show specialized functionality.
The PdvDev device status structure is defined in the file libpdv.h. It includes the PdvDependent substructure, and other structure elements that describe the state of the board and camera, as initialized by the current camera configuration file (see the Camera Configuration Guide, at ftp.edt.com/pub/manuals/PDV/camconfig.pdf ) or modified by any subsequent API setup calls. These structure elements include values for things such as the current pixel re-order or color interpolation method, size and depth of the image, number and size of currently allocated buffers. For portability, we strongly recommend using library calls to get/set these values rather than accessing the structure elements directly. In addition, anything that can be queried via the subroutine calls such as currently set image width, height and depth should be done via subroutine calls rather than hard-coding specific values into your program.
The PCI DV library source files are included in the installation. Most but not all routines are documented here. Undocumented routines include internals, custom, special purpose and obsoletes. Feel free, however, to look through the library source code and use (with caution) any routines that are appropriate. Email tech@edt.com if you have questions about specific routines.
Modules | |
| Startup / Shutdown | |
| To open and close the EDT Digital Video device. | |
| Settings | |
| Get and set EDT interface board (register) values as well as device driver and camera settings. | |
| Initialization | |
| Read configuration files and initialize the board and camera. | |
| Acquisition | |
| Image acquisition subroutines. | |
| Communications/Control | |
| Serial communications and camera control subroutines. | |
| Utility | |
| Various utility subroutines. | |
| Debug | |
| Get and set flags that determine debug output from the library. | |
1.5.1