clear_serial ( : : SerialHandle, Channel : )

Clear the buffer of a serial connection.

clear_serial discards data written to the serial device referred to by SerialHandle, but not transmitted (Channel = 'output'), or data received, but not read (Channel = 'input'), or performs both these operations at once (Channel = 'in_out').


Parameters

SerialHandle (input_control)
serial_id -> integer
Serial interface handle.

Channel (input_control)
string -> string
Buffer to be cleared.
Default value: 'input'
List of values: 'input', 'output', 'in_out'


Result

If the parameters are correct and the buffers of the serial device could be cleared, the operator clear_serial returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.


Parallelization Information

clear_serial is reentrant and processed without parallelization.


Possible Predecessors

open_serial


Possible Successors

read_serial, write_serial


See also

read_serial


Module

System



Copyright © 1996-2005 MVTec Software GmbH