CVBpy 14.0
DeviceFactory Class Reference

Factory object for creating device objects. More...

Inherits object.

Public Member Functions

List[cvb.DiscoveryInformationdiscover_from_level (str access_token, int flags=cvb.DiscoverFlags.FindAll, int time_span=300)
 Discovers available devices / nodes depending on the given flags and starting at the level of the given access token. More...
 
List[cvb.DiscoveryInformationdiscover_from_root (int flags=cvb.DiscoverFlags.FindAll, int time_span=300)
 Discovers available devices / nodes depending on the given flags. More...
 
Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDeviceopen (str provider, int acquisition_stack=cvb.AcquisitionStack.PreferVin)
 Opens a device with the given provider and acquisition stack. More...
 
cvb.VinDevice open_board (str provider, int board)
 Open a device with the given provider and board. More...
 
cvb.VinDevice open_port (str provider, int port)
 Opens a device with the given provider and port. More...
 

Detailed Description

Factory object for creating device objects.

Member Function Documentation

◆ discover_from_level()

List[cvb.DiscoveryInformation] discover_from_level ( str  access_token,
int   flags = cvb.DiscoverFlags.FindAll,
int   time_span = 300 
)

Discovers available devices / nodes depending on the given flags and starting at the level of the given access token.

This method does not throw if the wait time is exceeded: it just waits for the time span. If a device answers after this span, it is not in the returned list.

Parameters

access_token : str Start level for the discover or root, if none provided.

flags : int Discovery control flags (see cvb.DiscoverFlags).

time_span : int Time in ms to wait for discovery answers from devices.

Returns

List[cvb.DiscoveryInformation] The list of found devices / nodes.

◆ discover_from_root()

List[cvb.DiscoveryInformation] discover_from_root ( int   flags = cvb.DiscoverFlags.FindAll,
int   time_span = 300 
)

Discovers available devices / nodes depending on the given flags.

This method does not throw, if the wait time is exceeded: it just waits for the time span. If a device answers after this span, it is not in the returned list.

Parameters

flags : int Discovery control flags (see cvb.DiscoverFlags).

time_span : int Time in ms to wait for discovery answers from devices.

Returns

List[cvb.DiscoveryInformation] The list of found devices / nodes.

◆ open()

Opens a device with the given provider and acquisition stack.

Full acqusition stack support is only possible if the provider is an accesstoken. GenTL user should always select cvb.AcqusitionStack.GenTL.

Parameters

provider : str An access token or a path to a file

acquisition_stack : int Acquisition stack to open the device with.

Returns

Union[cvb.GenICamDevice, cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] A device object

Opens a device with the given provider.

This works with a file path only. After the device is opened, the device is switched to the given port and board internally.

Parameters

provider : str A path to a file (may be a VIN driver)

port : int Port number to open (use keyword).

board : int Board number to open (use keyword).

Returns

Union[cvb.VinDevice, cvb.EmuDevice, cvb.VideoDevice, cvb.NonStreamingDevice] A device object

◆ open_board()

cvb.VinDevice open_board ( str  provider,
int  board 
)

Open a device with the given provider and board.

Parameters

provider : str The provider string, which may be a path to vin-driver.

board : int Board number to open.

Returns

cvb.VinDevice A device object.

◆ open_port()

cvb.VinDevice open_port ( str  provider,
int  port 
)

Opens a device with the given provider and port.

Parameters

provider : str The provider string, which may be a path to vin-driver.

port : int Port number to open.

Returns

cvb.VinDevice A device object.