API Reference v9.2.0

Streamsclass

Module: ZaberMotionAscii

Class providing access to device streams. Requires at least Firmware 7.05.

The following example illustrates how you can obtain an instance of this type:

import ZaberMotionAscii

let connection = try await Connection.openSerialPort(portName: "COM3")
let device = try connection.getDevice(deviceAddress: 1)
let streams = device.streams

Properties

p

device

readonly
streams.device
Device Device that these streams belong to.

Methods

m

getBuffer()

throws
try streams.getBuffer(streamBufferNumber)
Gets a StreamBuffer class instance which is a handle for a stream buffer on the device.
Arguments
NameTypeDescription
streamBufferNumberIntThe ID number of the stream buffer to control. Stream buffer IDs start at one.
Return Value
StreamBuffer StreamBuffer instance.
m

getStream()

throws
try streams.getStream(streamId)
Gets a Stream class instance which allows you to control a particular stream on the device.
Arguments
NameTypeDescription
streamIdIntThe ID of the stream to control. Stream IDs start at one.
Return Value
Stream Stream instance.
m

listBufferNumbers()

asyncthrows
try await streams.listBufferNumbers()
Get a list of buffer ID numbers that are currently in use.
Return Value
[Int] List of buffer IDs.