CVBpy 14.0
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).
 
 device_control = property
 Optional[cvb.DeviceControl]: Gets the DeviceControl interface if present.
 
 device_image = property
 Optional[cvb.DeviceImage]: Gets, if available, the device image pointing to the last synchronized image.
 
 digital_io = property
 Optional[cvb.DigitalIO]: Gets the DigitalIO interface if present.
 
 image_rect = property
 Optional[cvb.ImageRect]: Gets the ImageRect interface if present.
 
 node_maps = property
 Dict[str, Optional[cvb.NodeMap]]: Gets the dictionary holding all available NodeMaps.
 
 resource_locator = property
 str: Gets the access token or path of the file name including its extension.
 
 software_trigger = property
 Optional[cvb.SoftwareTrigger]: Gets the SoftwareTrigger interface if present.
 
 stream_count = property
 int: Get the number of streams.
 

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.