CVBpy 14.1
SingleStreamHandler Class Reference

Handler object for a single stream. More...

Inherits MultiStreamHandler.

Public Member Functions

None handle_async_stream (self, cvb.Stream stream)
 Asynchronously called for the registered stream. More...
 
None handle_async_wait_result (self, cvb.StreamImage image, int status)
 Asynchronously called for all acquired images. More...
 
None setup (self, cvb.Stream stream)
 Setup the stream for acquisition. More...
 
None tear_down (self, cvb.Stream stream)
 Tear down the stream after acquisition. More...
 
- Public Member Functions inherited from MultiStreamHandler
None finish (self)
 Stop the handler. More...
 
None handle_async_stream (self, List[cvb.Stream] stream_list)
 Asynchronously called for all registered streams. More...
 
None handle_async_wait_result (self, List[Tuple[cvb.StreamImage, int]] wait_result_list)
 Asynchronously called for all acquired images. More...
 
bool handle_error (self, Type[Exception] type, Exception value, Any traceback)
 Asynchronously called for all acquired images. More...
 
None run (self)
 Start the handler. More...
 
bool try_finish (self)
 Stop the handler. More...
 

Additional Inherited Members

- Properties inherited from MultiStreamHandler
 is_active = property
 bool: Check if the acquisition thread is running.
 

Detailed Description

Handler object for a single stream.

This handler provides a convenient way to acquire images from a single stream within a dedicated thread.

For a multiple synchronous stream see cvb.MultiStreamHandler.

Create a stream handler object.

Parameters

stream : cvb.Stream Stream to handle.

Member Function Documentation

◆ handle_async_stream()

None handle_async_stream (   self,
cvb.Stream  stream 
)

Asynchronously called for the registered stream.

The default implementation just waits for the next image.

This method is called from a dedicated thread!

Parameters

stream : cvb.Stream Stream to handle (provided at creation).

Reimplemented from MultiStreamHandler.

◆ handle_async_wait_result()

None handle_async_wait_result (   self,
cvb.StreamImage  image,
int  status 
)

Asynchronously called for all acquired images.

The default implementation does nothing.

This method is called from a dedicated thread!

Parameters

image : cvb.StreamImage The acquired image (might be None).

status : int Wait status for the acquired image (see cvb.WaitStatus).

Reimplemented from MultiStreamHandler.

◆ setup()

None setup (   self,
cvb.Stream  stream 
)

Setup the stream for acquisition.

The default implementation just calls Stream.start().

Parameters

stream : cvb.Stream Stream to handle(provided at creation).

◆ tear_down()

None tear_down (   self,
cvb.Stream  stream 
)

Tear down the stream after acquisition.

The default implementation just calls Stream.try_abort().

Parameters

stream : cvb.Stream Stream to handle (provided at creation).