Discovering devices using VIN drivers can be done using the Cvb::DeviceFactory::Discover
.
The exact details of what each device reports depends on the exact implementation of the VIN driver in question. For more details, refer to the driver documentation.
#include <cvb/device_factory.hpp>
auto chosenDiscoveryInformation = discoveredDevices[0];
static std::vector< DiscoveryInformation > Discover()
static std::shared_ptr< T > Open(const String &provider, AcquisitionStack acquisitionStack=AcquisitionStack::PreferVin)
{
var chosenDiscoveryInformation = discoveredDevices[0];
{
}
}
static Device Open(DiscoveryInformation info, AcquisitionStack acquisitionStack=AcquisitionStack.PreferVin)
static DiscoveryInformationList Discover()
import cvb
chosenDiscoveryInformation = discoveredDevices[0]
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 VIN devices. By default all devices are discovered so by using the
Cvb::DiscoverFlags::IgnoreTLs
flag, the GenTL devices are excluded.
- Filter the found discovery information to select the correct one. As the reported data depends on the VIN driver in question, the first is selected for simplicity.
- Open the device as a
Cvb::VinDevice
using Cvb::AcquisitionStack::PreferVin
.