write_serialT_write_serialWriteSerialWriteSerialwrite_serial (Operator)
Name
write_serialT_write_serialWriteSerialWriteSerialwrite_serial
— Write to a serial connection.
Signature
Description
write_serialwrite_serialWriteSerialWriteSerialWriteSerialwrite_serial
writes the characters given in DataDataDataDatadatadata
to
the serial device given by SerialHandleSerialHandleSerialHandleSerialHandleserialHandleserial_handle
. The data to be
written is passed as a tuple of integers. This allows to write NUL
characters, which would otherwise be interpreted as the end of a
string. write_serialwrite_serialWriteSerialWriteSerialWriteSerialwrite_serial
always waits until all data has been
transmitted, i.e., a timeout for writing cannot be set.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
SerialHandleSerialHandleSerialHandleSerialHandleserialHandleserial_handle
(input_control) serial →
HSerial, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Serial interface handle.
DataDataDataDatadatadata
(input_control) integer(-array) →
HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Characters to write (as tuple of integers).
Result
If the parameters are correct and the write to the device was
successful, the operator write_serialwrite_serialWriteSerialWriteSerialWriteSerialwrite_serial
returns the value 2 (
H_MSG_TRUE)
.
Otherwise an exception is raised.
Possible Predecessors
open_serialopen_serialOpenSerialOpenSerialOpenSerialopen_serial
See also
read_serialread_serialReadSerialReadSerialReadSerialread_serial
Module
Foundation