HALCON Reference Manual 10.0.2
Table of Contents / System / Serial ClassesClassesClasses | | | Operators

clear_serialclear_serialclear_serialClearSerialClearSerial (Operator)

Name

clear_serialclear_serialclear_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 HOperatorSetX.ClearSerial(
[in] VARIANT SerialHandle, [in] VARIANT Channel)

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

Description

clear_serialclear_serialclear_serialClearSerialClearSerial discards data written to the serial device referred to by SerialHandleSerialHandleSerialHandleSerialHandleserialHandle, 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").

Parallelization

Parameters

SerialHandleSerialHandleSerialHandleSerialHandleserialHandle (input_control)  serial_id HSerial, HTupleHSerial, HTupleHSerialX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong)

Serial interface handle.

ChannelChannelChannelChannelchannel (input_control)  string HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Buffer to be cleared.

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

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

Result

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

Possible Predecessors

open_serialopen_serialopen_serialOpenSerialOpenSerial

Possible Successors

read_serialread_serialread_serialReadSerialReadSerial, write_serialwrite_serialwrite_serialWriteSerialWriteSerial

See also

read_serialread_serialread_serialReadSerialReadSerial

Module

Foundation


Table of Contents / System / Serial ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH