Skip to content

query_io_deviceQueryIoDeviceQueryIoDevicequery_io_deviceT_query_io_device🔗

説明🔗

query_io_deviceQueryIoDeviceQueryIoDevicequery_io_deviceT_query_io_device — 指定した I/O デバイスのチャンネルに関する情報を照会する。

書式🔗

query_io_device( io_device IODeviceHandle, string IOChannelName, string Query, out string Result )void QueryIoDevice( const HTuple& IODeviceHandle, const HTuple& IOChannelName, const HTuple& Query, HTuple* Result )static void HOperatorSet.QueryIoDevice( HTuple IODeviceHandle, HTuple IOChannelName, HTuple query, out HTuple result )def query_io_device( iodevice_handle: HHandle, iochannel_name: MaybeSequence[str], query: Sequence[str] ) -> Sequence[Union[int, float, str]]

Herror T_query_io_device( const Htuple IODeviceHandle, const Htuple IOChannelName, const Htuple Query, Htuple* Result )

HTuple HIODevice::QueryIoDevice( const HTuple& IOChannelName, const HTuple& Query ) const

HTuple HIODevice::QueryIoDevice( const HString& IOChannelName, const HTuple& Query ) const

HTuple HIODevice::QueryIoDevice( const char* IOChannelName, const HTuple& Query ) const

HTuple HIODevice::QueryIoDevice( const wchar_t* IOChannelName, const HTuple& Query ) const (Windows only)

HTuple HIODevice.QueryIoDevice( HTuple IOChannelName, HTuple query )

HTuple HIODevice.QueryIoDevice( string IOChannelName, HTuple query )

説明🔗

オペレーター query_io_deviceQueryIoDevice は、指定された I/O デバイスの 送信チャンネルに関する情報を返します。I/O デバイスのハンドルは IODeviceHandleIODeviceHandleiodevice_handle に渡され、チャンネルは IOChannelNameIOChannelNameiochannel_name によって識別されます。I/O チャンネルに関す る目的の情報は、Queryqueryquery を介して指定されます。 'io_channel_name'"io_channel_name" を Queryqueryquery に渡すと、通常は、サ ポートされるすべてのチャンネル名のリストが返され、入力パラメー ター IOChannelNameIOChannelNameiochannel_name は無視されます。

特定の I/O デバイスインターフェースに関するドキュメントがあるかど うかディレクトリ doc/html/reference/io をチェックしてくだ さい。ここには、サポートされるすべてのチャンネル固有パラメーターが リストされます。

実行情報🔗

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

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

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

パラメーター🔗

IODeviceHandleIODeviceHandleiodevice_handle (input_control) io_device → (handle)HTuple (HHandle)HIODevice, HTuple (IntPtr)HHandleHtuple (handle)

開いた I/O デバイスのハンドル

IOChannelNameIOChannelNameiochannel_name (input_control) string(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

照会するチャンネル名

Queryqueryquery (input_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

照会する名前

初期値: 'param_name'"param_name"
値のリスト: 'io_channel_names', 'param_name'"io_channel_names", "param_name"

Resultresultresult (output_control) string-array → (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)Sequence[Union[int, float, str]]Htuple (char* / Hlong / double)

(Queryqueryquery による)値のリスト

例🔗

(HDevelop)


* Select a suitable i/o device interface of name IOInterfaceName
query_io_interface (IOInterfaceName, 'io_device_names', DeviceNames)
open_io_device (IOInterfaceName, DeviceNames[0], [], [], IODeviceHandle)
query_io_device (IODeviceHandle, [], 'io_channel_names.digital_input', \
                 ChannelInputNames)
open_io_channel (IODeviceHandle, ChannelInputNames[0], [], [], \
                 IOChannelHandle)
read_io_channel (IOChannelHandle, Value, Status)

結果🔗

パラメーターが有効ならば、オペレーター query_io_deviceQueryIoDevice は 値 2 (H_MSG_TRUE) を返します。必要に応じて、例外が発生します。この場合は、拡 張エラー情報が設定され、オペレーター get_extended_error_infoGetExtendedErrorInfo を使用して照会できます。

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

組み合わせ

後処理の候補

open_io_deviceOpenIoDevice

モジュール🔗

Foundation