write_serial — 写入串行连接。
write_serial( : : SerialHandle, Data : )
write_serial writes the characters given in Data to
the serial device given by SerialHandle. 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_serial always waits until all data has been
transmitted, i.e., a timeout for writing cannot be set.
SerialHandle (输入控制) serial → (handle)
Serial interface handle.
Data (输入控制) integer(-array) → (integer)
Characters to write (as tuple of integers).
If the parameters are correct and the write to the device was
successful, the operator write_serial 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
基础