ClassesClassesClassesClasses | | | | Operators

clear_serialclear_serialClearSerialclear_serialClearSerialClearSerial (Operator)

Name

clear_serialclear_serialClearSerialclear_serialClearSerialClearSerial — Clear the buffer of a serial connection.

Signature

clear_serial( : : SerialHandle, Channel : )

Herror clear_serial(const Hlong SerialHandle, const char* Channel)

Herror T_clear_serial(const Htuple SerialHandle, const Htuple Channel)

Herror clear_serial(const HTuple& SerialHandle, const HTuple& Channel)

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

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

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

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

void HOperatorSetX.ClearSerial(
[in] VARIANT SerialHandle, [in] VARIANT Channel)

void HSerialX.ClearSerial([in] BSTR Channel)

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

void HSerial.ClearSerial(string channel)

Description

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

Parallelization

This operator modifies the state of the following input parameter:

The value of this parameter may not be shared across multiple threads without external synchronization.

Parameters

SerialHandleSerialHandleSerialHandleSerialHandleSerialHandleserialHandle (input_control, state is modified)  serial_id HSerial, HTupleHTupleHSerial, HTupleHSerialX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Serial interface handle.

ChannelChannelChannelChannelChannelchannel (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Buffer to be cleared.

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

List of values: 'in_out'"in_out""in_out""in_out""in_out""in_out", 'input'"input""input""input""input""input", 'output'"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_serialClearSerialclear_serialClearSerialClearSerial returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Possible Predecessors

open_serialopen_serialOpenSerialopen_serialOpenSerialOpenSerial

Possible Successors

read_serialread_serialReadSerialread_serialReadSerialReadSerial, write_serialwrite_serialWriteSerialwrite_serialWriteSerialWriteSerial

See also

read_serialread_serialReadSerialread_serialReadSerialReadSerial

Module

Foundation


ClassesClassesClassesClasses | | | | Operators