clear_serialT_clear_serialClearSerialClearSerialclear_serial (Operator)

Name

clear_serialT_clear_serialClearSerialClearSerialclear_serial — Clear the buffer of a serial connection.

Signature

clear_serial( : : SerialHandle, Channel : )

Herror T_clear_serial(const Htuple SerialHandle, const Htuple Channel)

void ClearSerial(const HTuple& SerialHandle, const HTuple& Channel)

void HSerial::ClearSerial(const HString& Channel) const

void HSerial::ClearSerial(const char* Channel) const

void HSerial::ClearSerial(const wchar_t* Channel) const   ( Windows only)

static void HOperatorSet.ClearSerial(HTuple serialHandle, HTuple channel)

void HSerial.ClearSerial(string channel)

def clear_serial(serial_handle: HHandle, channel: str) -> None

Description

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

Execution Information

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters

SerialHandleSerialHandleSerialHandleserialHandleserial_handle (input_control, state is modified)  serial HSerial, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Serial interface handle.

ChannelChannelChannelchannelchannel (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Buffer to be cleared.

Default: 'input' "input" "input" "input" "input"

List of values: 'in_out'"in_out""in_out""in_out""in_out", 'input'"input""input""input""input", 'output'"output""output""output""output"

Result

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

Possible Predecessors

open_serialopen_serialOpenSerialOpenSerialopen_serial

Possible Successors

read_serialread_serialReadSerialReadSerialread_serial, write_serialwrite_serialWriteSerialWriteSerialwrite_serial

See also

read_serialread_serialReadSerialReadSerialread_serial

Module

Foundation