clear_serialT_clear_serialClearSerialClearSerialclear_serial (算子名称)
名称
clear_serialT_clear_serialClearSerialClearSerialclear_serial — Clear the buffer of a serial connection.
参数签名
描述
clear_serialclear_serialClearSerialClearSerialClearSerialclear_serial discards data written to the serial device
referred to by SerialHandleSerialHandleSerialHandleSerialHandleserialHandleserial_handle, 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").
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
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.
参数表
SerialHandleSerialHandleSerialHandleSerialHandleserialHandleserial_handle (input_control, state is modified) serial → HSerial, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Serial interface handle.
ChannelChannelChannelChannelchannelchannel (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Buffer to be cleared.
Default:
'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"
结果
If the parameters are correct and the buffers of the serial device
could be cleared, 该算子 clear_serialclear_serialClearSerialClearSerialClearSerialclear_serial returns the
value 2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
可能的前置算子
open_serialopen_serialOpenSerialOpenSerialOpenSerialopen_serial
可能的后置算子
read_serialread_serialReadSerialReadSerialReadSerialread_serial,
write_serialwrite_serialWriteSerialWriteSerialWriteSerialwrite_serial
参考其它
read_serialread_serialReadSerialReadSerialReadSerialread_serial
模块
Foundation