Public Member Functions | Properties | List of all members
Device Class Reference

Generic CVB physical device. More...

Inherits object.

Inherited by EmuDevice, GenICamDevice, NonStreamingDevice, VideoDevice, and VinDevice.

Public Member Functions

None close (self)
 Closes the device and releases all hardware resources held. More...
 
cvb.EventCookie register_connection_state_changed_event (self, Callable[[], None] handler)
 Register a listener to node updated event. More...
 
Union[cvb.ImageStream, cvb.PointCloudStream, cvb.CompositeStreamstream (self, Type[cvb.ImageStream|cvb.PointCloudStream|cvb.CompositeStream] stream_type, int index=0)
 Gets the stream for this device by index. More...
 
None unregister_connection_state_changed_event (self, cvb.EventCookie event_cookie)
 Manually unregister a listener to the node updated event. More...
 

Properties

 connection_state = property
 int: Gets the current connection state (see cvb.ConnectionState). More...
 
 device_control = property
 Optional[cvb.DeviceControl]: Gets the DeviceControl interface if present. More...
 
 device_image = property
 Optional[cvb.Device]: Gets, if available, the device image pointing to the last synchronized image. More...
 
 digital_io = property
 Optional[cvb.DigitalIO]: Gets the DigitalIO interface if present. More...
 
 image_rect = property
 Optional[cvb.ImageRect]: Gets the ImageRect interface if present. More...
 
 node_maps = property
 Dict[str, Optional[cvb.NodeMap]]: Gets the dictionary holding all available NodeMaps. More...
 
 resource_locator = property
 str: Gets the access token or path of the file name including its extension. More...
 
 software_trigger = property
 Optional[cvb.SoftwareTrigger]: Gets the SoftwareTrigger interface if present. More...
 
 stream_count = property
 int: Get the number of streams. More...
 

Detailed Description

Generic CVB physical device.

A device may provide an image stream or just expose a configuration interface.

See cvb.DeviceFactory for creating instances of this object.

Member Function Documentation

◆ close()

None close (   self)

Closes the device and releases all hardware resources held.

This will leave the python object as empty shell. Any further access, that requires resources, will throw.

◆ register_connection_state_changed_event()

cvb.EventCookie register_connection_state_changed_event (   self,
Callable[[], None]  handler 
)

Register a listener to node updated event.

Parameters

handler : Callable[[], None] Listener, to node updated event.

Returns

cvb.EventCookie Event cookie, to manually unregister the listener.

◆ stream()

Union[cvb.ImageStream, cvb.PointCloudStream, cvb.CompositeStream] stream (   self,
Type[cvb.ImageStream| cvb.PointCloudStream| cvb.CompositeStream stream_type,
int   index = 0 
)

Gets the stream for this device by index.

Parameters

stream_type : Type[cvb.ImageStream| cvb.PointCloudStream| cvb.CompositeStream] Casts the result to this datatype.

index : int The index of the stream.

Returns

Union[cvb.ImageStream, cvb.PointCloudStream, cvb.CompositeStream] The stream object.

Gets the legacy stream for this device

Returns

Optional[Union[cvb.Stream, cvb.IndexedStream]] The stream object.

◆ unregister_connection_state_changed_event()

None unregister_connection_state_changed_event (   self,
cvb.EventCookie  event_cookie 
)

Manually unregister a listener to the node updated event.

Parameters

event_cookie : cvb.EventCookie Event cookie, obtained from registering the listener.

Property Documentation

◆ connection_state

connection_state = property
static

int: Gets the current connection state (see cvb.ConnectionState).

◆ device_control

device_control = property
static

Optional[cvb.DeviceControl]: Gets the DeviceControl interface if present.

◆ device_image

device_image = property
static

Optional[cvb.Device]: Gets, if available, the device image pointing to the last synchronized image.

◆ digital_io

digital_io = property
static

Optional[cvb.DigitalIO]: Gets the DigitalIO interface if present.

◆ image_rect

image_rect = property
static

Optional[cvb.ImageRect]: Gets the ImageRect interface if present.

◆ node_maps

node_maps = property
static

Dict[str, Optional[cvb.NodeMap]]: Gets the dictionary holding all available NodeMaps.

◆ resource_locator

resource_locator = property
static

str: Gets the access token or path of the file name including its extension.

◆ software_trigger

software_trigger = property
static

Optional[cvb.SoftwareTrigger]: Gets the SoftwareTrigger interface if present.

◆ stream_count

stream_count = property
static

int: Get the number of streams.