Stream Process API

class joulescope.driver.StreamProcessApi[source]

This API is used to chain multiple processing callbacks that are called when new data is received from the Joulescope.

The Joulescope driver will call notify() when new data is available. It will call close() when streaming is stopped.

close()[source]

Close the processing instance. [optional]

This method may be called from the USB thread.

start(stream_buffer)[source]

Start a new streaming session. [optional]

Parameters

stream_buffer – The StreamBuffer instance which contains the new data from the Joulescope. This same instance will be passed to future stream_notify() calls, too.

This method will be called from the USB thread. The processing duration must be very short to prevent dropping samples. You should post any significant processing to a separate thread.

stop()[source]

Stop the existing streaming session. [optional]

This method will be called from the USB thread.

stream_notify(stream_buffer)[source]

Notify that new data is available from the Joulescope.

Parameters

stream_buffer – The StreamBuffer instance which contains the new data from the Joulescope.

Returns

False to continue streaming. True to stop streaming.

This method will be called from the USB thread. The processing duration must be very short to prevent dropping samples. You should post any significant processing to a separate thread.