Startup / Shutdown
[EDT Digital Imaging Library]


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.


Functions

int pdv_close (PdvDev *pdv_p)
 Closes the specified device and frees the device struct and image memory.
PdvDevpdv_open (char *dev_name, int unit)
 Opens channel 0 of an EDT Framegrabber for application access.
PdvDevpdv_open_channel (const char *dev_name, int unit, int channel)
 Opens an EDT Framegrabber channel for application access.


Function Documentation

int pdv_close ( PdvDev pdv_p  ) 

Closes the specified device and frees the device struct and image memory.

Parameters:
pdv_p pointer to pdv device structure returned by pdv_open
Returns:
0 if successful, -1 if unsuccessful

Definition at line 631 of file libpdv.c.

PdvDev* pdv_open ( char *  dev_name,
int  unit 
)

Opens channel 0 of an EDT Framegrabber for application access.

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.

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

Parameters:
dev_name The name of the device, which for all EDT Digital Imaging boards is "pdv". If dev_name is NULL, "pdv" will be assumed. EDT_INTERFACE can also be used (recommended); it's defined as "pdv" in edtdef.h.
unit Unit number of the device (board). The first device is 0.
Returns:
A pointer to the PdvDev data structure, if successful. This data structure holds information about the device which is needed by library functions. User applications should avoid accessing structure elements directly. NULL is returned if unsuccessful.
See also:
pdv_open_channel

Definition at line 596 of file libpdv.c.

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

Opens an EDT Framegrabber channel for application access.

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

 PdvDev *pdv_p0 = pdv_open_channel(EDT_INTERFACE, 0, 0);
 PdvDev *pdv_p1 = pdv_open_channel(EDT_INTERFACE, 0, 1);

 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.
Parameters:
dev_name The name of the device, which for all EDT Digital Imaging boards is "pdv". If dev_name is NULL, "pdv" will be assumed. EDT_INTERFACE can also be used (recommended); it's defined as "pdv" in edtdef.h.
unit Unit number of the device (board). The first device is 0.
channel The channel of the specified unit to open. The first channel is 0.
Returns:
A pointer to the PdvDev data structure, if successful. This data structure holds information about the device which is needed by library functions. User applications should avoid accessing structure elements directly. NULL is returned if unsuccessful.
See also:
pdv_open

Definition at line 473 of file libpdv.c.


Generated on 19 Jun 2015 by  doxygen 1.4.7