Discovering USB3 Vision (U3V) devices can be done using the Cvb::DeviceFactory::Discover
.
In the case that multiple devices using different Transport Layers are connected (e.g. USBTL and GEVTL), no filtering flags can be applied during the discovery process to select a specific transport layer. Instead, after discovery, the Cvb::DiscoveryProperties
in the Cvb::DiscoveryInformation
should be accessed to determine the transport layer used and filter appropriately.
#include <cvb/device_factory.hpp>
auto chosenDiscoveryInformation = std::find_if(discoveredDevices.begin(), discoveredDevices.end(),
[](auto discoveryInformation) {
return discoveryInformation[Cvb::DiscoveryProperties::DeviceTransportLayerType] == "USB3";
});
static std::vector< DiscoveryInformation > Discover()
static std::shared_ptr< T > Open(const String &provider, AcquisitionStack acquisitionStack=AcquisitionStack::PreferVin)
{
var chosenDiscoveryInformation = discoveredDevices.First(discoveryInformation => {
});
{
}
}
static Device Open(DiscoveryInformation info, AcquisitionStack acquisitionStack=AcquisitionStack.PreferVin)
static DiscoveryInformationList Discover()
import cvb
chosenDiscoveryInformation = next(filter(lambda discoveryInformation: discoveryInformation.read_property(cvb.DiscoveryProperties.DeviceTransportLayerType) == "USB3", discoveredDevices))
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] open(str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)
List[cvb.DiscoveryInformation] discover_from_root(int flags=cvb.DiscoverFlags.FindAll, int time_span=300)
Note: Error handling has been omitted from the above example.
- Discover all GenTL devices. By default all devices are discovered so by using the
Cvb::DiscoverFlags::IgnoreVins
flag, the legacy VIN drivers are excluded.
Filter the found discovery information to use the first that uses the USBTL driver.
Common options are:
Mixed
- Several supported technologies
Custom
- Custom technologies
GEV
- GigE Vision technology
CL
- Camera Link technology
IIDC
- IIDC 1394 technology
UVC
- USB video class devices
CXP
- CoaXPress
CLHS
- Camera Link HS
USB3
- USB3 Vision Standard
Ethernet
- Ethernet devices
PCI
- PCI/PCIe devices
- Open the device as a
Cvb::GenICamDevice
using Cvb::AcquisitionStack::PreferGenTL
. When using USBTL, these flags are mandatory to ensure that all GenICam features are enabled.