Skip to content

write_serialWriteSerialWriteSerialwrite_serialT_write_serial🔗

Short description🔗

write_serialWriteSerialWriteSerialwrite_serialT_write_serial — Write to a serial connection.

Signature🔗

write_serial( serial SerialHandle, integer Data )void WriteSerial( const HTuple& SerialHandle, const HTuple& Data )static void HOperatorSet.WriteSerial( HTuple serialHandle, HTuple data )def write_serial( serial_handle: HHandle, data: MaybeSequence[int] ) -> None

Herror T_write_serial( const Htuple SerialHandle, const Htuple Data )

void HSerial::WriteSerial( const HTuple& Data ) const

void HSerial::WriteSerial( Hlong Data ) const

void HSerial.WriteSerial( HTuple data )

void HSerial.WriteSerial( int data )

Description🔗

write_serialWriteSerial writes the characters given in Datadatadata to the serial device given by SerialHandleserialHandleserial_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_serialWriteSerial always waits until all data has been transmitted, i.e., a timeout for writing cannot be set.

Execution information🔗

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🔗

SerialHandleserialHandleserial_handle (input_control) serial → (handle)HTuple (HHandle)HSerial, HTuple (IntPtr)HHandleHtuple (handle)

Serial interface handle.

Datadatadata (input_control) integer(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (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_serialWriteSerial returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

open_serialOpenSerial

See also

read_serialReadSerial

Module🔗

Foundation