API Reference v9.2.0

Transportclass

Module: zaber_motion.ascii

Connection transport backend allowing to carry Zaber ASCII protocol over arbitrary protocols. Can only be used with a single connection.

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

from zaber_motion.ascii import Transport

transport = Transport.open()
Related Guides:

Properties

p

transport_id

readonly
transport.transport_id
int The transport ID identifies this transport instance with the underlying library.

Methods

m

close()

async available
transport.close()
Closes the transport. Also closes the connection using the transport.
m

close_with_error()

async available
transport.close_with_error(error_message)
Closes the transport with error. Also closes the connection using the transport propagating the error.
Arguments
NameTypeDescription
error_messagestrError to be propagated.
s

open()

Transport.open()
Creates new instance allowing to read/write messages from/to a single connection.
Return Value
Transport New instance of transport.
m

read()

async available
transport.read()
Reads a single message generated by the connection. The message is a request for the device. Read should be called continuously in a loop to ensure all generated messages are processed. Subsequent read call confirms that previous message was delivered to the device.
Return Value
str Message generated by the connection.
m

write()

async available
transport.write(message)
Writes a single message to the connection. The message will be processed as a reply from the device.
Arguments
NameTypeDescription
messagestrSingle message of Zaber ASCII protocol.