Skip to content

get_serial_paramGetSerialParamGetSerialParamget_serial_paramT_get_serial_param🔗

説明🔗

get_serial_paramGetSerialParamGetSerialParamget_serial_paramT_get_serial_param — シリアルデバイスのパラメーターを取得する。

書式🔗

get_serial_param( serial SerialHandle, out integer BaudRate, out integer DataBits, out string FlowControl, out string Parity, out integer StopBits, out integer TotalTimeOut, out integer InterCharTimeOut )void GetSerialParam( const HTuple& SerialHandle, HTuple* BaudRate, HTuple* DataBits, HTuple* FlowControl, HTuple* Parity, HTuple* StopBits, HTuple* TotalTimeOut, HTuple* InterCharTimeOut )static void HOperatorSet.GetSerialParam( HTuple serialHandle, out HTuple baudRate, out HTuple dataBits, out HTuple flowControl, out HTuple parity, out HTuple stopBits, out HTuple totalTimeOut, out HTuple interCharTimeOut )def get_serial_param( serial_handle: HHandle ) -> Tuple[int, int, str, str, int, int, int]

Herror T_get_serial_param( const Htuple SerialHandle, Htuple* BaudRate, Htuple* DataBits, Htuple* FlowControl, Htuple* Parity, Htuple* StopBits, Htuple* TotalTimeOut, Htuple* InterCharTimeOut )

Hlong HSerial::GetSerialParam( Hlong* DataBits, HString* FlowControl, HString* Parity, Hlong* StopBits, Hlong* TotalTimeOut, Hlong* InterCharTimeOut ) const

int HSerial.GetSerialParam( out int dataBits, out string flowControl, out string parity, out int stopBits, out int totalTimeOut, out int interCharTimeOut )

説明🔗

get_serial_paramGetSerialParam は SerialHandleserialHandleserial_handle で指定したシリア ルデバイスの、現在のパラメーター設定を返します。シリアルデバイスの パラメーターに関する詳細は、set_serial_paramSetSerialParam を参照くださ い。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

このオペレータは以下の入力パラメータの状態を変更します :

このパラメータの値は外部同期なしには複数スレッド間で共有されません。

パラメーター🔗

SerialHandleserialHandleserial_handle (input_control, 状態が変更されました) serial → (handle)HTuple (HHandle)HSerial, HTuple (IntPtr)HHandleHtuple (handle)

シリアルインターフェースハンドル

BaudRatebaudRatebaud_rate (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

シリアルインターフェースの速度

DataBitsdataBitsdata_bits (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

シリアルインターフェースのデータビット数

FlowControlflowControlflow_control (output_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

シリアルインターフェースのフロー制御のタイプ

Parityparityparity (output_control) string → (string)HTuple (HString)HTuple (string)strHtuple (char*)

シリアルインターフェースのパリティ

StopBitsstopBitsstop_bits (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

シリアルインターフェースのストップビット数

TotalTimeOuttotalTimeOuttotal_time_out (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

トータルタイムアウト時間 (単位:ms)

InterCharTimeOutinterCharTimeOutinter_char_time_out (output_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Inter-character (各文字読み込み間の) タイムアウト時間 (単位:ms)

結果🔗

パラメーターが正しく、デバイスのパラメーターを読み取ることができた 場合、オペレーター get_serial_paramGetSerialParam は値 2 (H_MSG_TRUE) を返します。 それ以外の場合には例外処理が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

open_serialOpenSerial

後処理の候補

read_serialReadSerial, write_serialWriteSerial

関連項目

set_serial_paramSetSerialParam

モジュール🔗

Foundation