EDT PDV SDK Documentation 6.1.0
Startup / Shutdown
Collaboration diagram for Startup / Shutdown:

Functions

int pdv_close (PdvDev pdv_p)
 Closes the specified device and frees the image memory and other resources associated with the device handle. More...
 
EDT_CHECK_RETURN PdvDev pdv_open (const char *dev_name, int unit)
 Opens channel 0 of an EDT Framegrabber for application access. More...
 
EDT_CHECK_RETURN 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. More...
 
EDT_CHECK_RETURN PdvDev pdv_open_channel (const char *dev_name, int unit, int channel)
 Opens an EDT Framegrabber channel for application access. More...
 

Detailed Description

To open and close the EDT digital imaging device. pdv_open() and pdv_open_channel() differ only in the channel argument. Since many applications are written for single channel boards (for example, the VisionLink F1) pdv_open will often suffice for opening a handle to the device. However it is just as easy to use pdv_open_channel() with zero-assigned variable in the channel argument, providing for future possible expansion to multiple channel boards.

Function Documentation

◆ pdv_close()

int pdv_close ( PdvDev  pdv_p)

Closes the specified device and frees the image memory and other resources associated with the device handle.

Parameters
pdv_pThe open PDV device handle.
Returns
0 if successful, -1 if unsuccessful.
Here is the call graph for this function:

◆ pdv_open()

EDT_CHECK_RETURN PdvDev pdv_open ( const char *  dev_name,
int  unit 
)

Opens channel 0 of an EDT Framegrabber for application access.

To open a specific channel on multi-channel device, see pdv_open_channel().

Parameters
dev_nameThe name of the device. For EDT imaging boards use EDT_INTERFACE.
unitThe unit number of the device (board). The first device is 0.
Returns
The opened PDV device handle if successful, or NULL if unsuccessful.
See also
pdv_open_channel()
Here is the call graph for this function:

◆ pdv_open_device()

EDT_CHECK_RETURN 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.

Parameters
dev_nameThe name of the device. For EDT imaging boards use EDT_INTERFACE.
unitThe unit number of the device (board). The first device is 0.
channelThe channel of the specified unit to open. The first channel is 0.
verboseEnable verbose output (1) or not (0).
Returns
The opened PDV device handle if successful, or NULL if unsuccessful.

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pdv_open_channel()

EDT_CHECK_RETURN PdvDev pdv_open_channel ( const char *  dev_name,
int  unit,
int  channel 
)

Opens an EDT Framegrabber channel for application access.

Parameters
dev_nameThe name of the device. For EDT imaging boards use EDT_INTERFACE.
unitThe unit number of the device (board). The first device is 0.
channelThe channel of the specified unit to open. The first channel is 0.
Returns
The opened PDV device handle if successful, or NULL if unsuccessful.
See also
pdv_open()

Opens the device, which is the first step in accessing the hardware. Allocates the memory for the device struct, as defined in libpdv.h (included through edtinc.h), and host memory required to store a captured image.

If you only want to use channel 0 on a multi-channel board, you can use pdv_open(), but using pdv_open_channel with 0 in the channel argument is preferred.

pdv_open_channel provides for multiple cameras on separate channels, on boards that have multiple channels. Calling pdv_open_channel with using a specified board and channel returns a pointer to a software structure representing the connection to a specific camera – channel 0 for the camera on the connector closest to the PCI bus, channel 1 for the next connector up, and so on. Each call to pdv_open_channel with a unique channel number returns a discrete pointer, which is handled separately from any others, just as if each camera were connected to separate boards.

Example:

// Example of opening and acquiring images from two cameras connected
// to separate channels 0 and 1 of a single VisionLink F4, PCIe8 DVa C-Link,
// or other multi-channel EDT Digital Imaging board
unsigned char *image_p0 = pdv_image(pdv_p0);
unsigned char *image_p1 = pdv_image(pdv_p1);
Note
Acquiring data from multiple channels at the same time (or from multiple boards on the same bus) increases amount of data going across the bus. Unless the aggregate data is within the available bus bandiwdth, bus saturation (in the form of dropped data, broken images, overruns, or timeouts) is likely to occur. For more on bandwidth requirements, see EDT's System Requirements web page.
Here is the call graph for this function:
Here is the caller graph for this function: