clear_serialClearSerialClearSerialclear_serialT_clear_serial
説明
clear_serialClearSerialClearSerialclear_serialT_clear_serial — シリアル接続のバッファをクリアする。
書式
clear_serial( serial SerialHandle, string Channel )void ClearSerial( const HTuple& SerialHandle, const HTuple& Channel )static void HOperatorSet.ClearSerial( HTuple serialHandle, HTuple channel )def clear_serial( serial_handle: HHandle, channel: str ) -> None
Herror T_clear_serial( 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)
void HSerial.ClearSerial( string channel )
説明
clear_serialClearSerial は、SerialHandleserialHandleserial_handle が示すシリアルデバ
イスに書き込まれたデータを捨てます。この場合、書き込まれたが転送さ
れていないデータを捨てるか (Channelchannelchannel = 'output'"output"
)、あるいは、受信したが読んでいないデータを捨てる (
Channelchannelchannel = 'input'"input")、もしくはそれら両方のデータを
一度に捨てます (Channelchannelchannel = 'in_out'"in_out")。
実行情報
実行情報
このオペレータは以下の入力パラメータの状態を変更します :
このパラメータの値は外部同期なしには複数スレッド間で共有されません。
パラメーター
SerialHandleserialHandleserial_handle (input_control, 状態が変更されました) serial → (handle)HTuple (HHandle)HSerial, HTuple (IntPtr)HHandleHtuple (handle)
シリアルインターフェースハンドル
Channelchannelchannel (input_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)
クリアするバッファ
初期値: 'input'"input"
値のリスト: 'in_out', 'input', 'output'"in_out", "input", "output"
結果
パラメーターが正しく、シリアルデバイスのバッファをクリアできた場合
は、オペレーター clear_serialClearSerial は、値 2 (H_MSG_TRUE) を返します。それ
以外の場合には例外処理が発生します。
他のオペレーターとの組み合わせ
組み合わせ
前処理の候補
open_serialOpenSerial
後処理の候補
read_serialReadSerial, write_serialWriteSerial
関連項目
read_serialReadSerial
モジュール
Foundation