8.2.5.4. Create, Obtain, Remove

8.2.5.4.1. Create and Obtain

Create a stream on the port, and obtain the stream object. The stream index is automatically assigned by the port.

Corresponding low-level API class: PS_CREATE

stream = await port.streams.create()

8.2.5.4.2. Obtain One

Obtain an existing stream on the port with an explicit stream index.

stream = = port.streams.obtain(0)

8.2.5.4.3. Obtain Multiple

Obtain multiple existing streams on the port with explicit stream indices.

stream_list = port.streams.obtain_multiple(*[0,1,2])

8.2.5.4.4. Remove

Deletes the stream definition with the specified sub-index value.

Corresponding low-level API class: PS_DELETE

# Remove
# Remove a stream on the port with an explicit stream index.
await port.streams.remove(position_idx=0)