Skip to content

query_io_deviceQueryIoDeviceQueryIoDevicequery_io_deviceT_query_io_device🔗

Short description🔗

query_io_deviceQueryIoDeviceQueryIoDevicequery_io_deviceT_query_io_device — Query information about channels of the specified I/O device.

Signature🔗

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 )

Description🔗

The operator query_io_deviceQueryIoDevice returns information about transmission channels of a specified I/O device. The handle to the I/O device is passed to in IODeviceHandleIODeviceHandleiodevice_handle, whereas the channels are addressed by IOChannelNameIOChannelNameiochannel_name. The desired information about the I/O channels is specified via Queryqueryquery. A list of all supported channel names is usually returned when passing 'io_channel_name'"io_channel_name" to Queryqueryquery while the input parameter IOChannelNameIOChannelNameiochannel_name is ignored.

Please check the directory doc/html/reference/io for documentation about your specific I/O device interface, where all supported channel-specific parameters are listed.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

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

Handle of the opened I/O device.

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

Channel names to query.

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

Name of the query.

Default: 'param_name'"param_name"
List of values: '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)

List of values (according to Queryqueryquery).

Example🔗

(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)

Result🔗

If the parameters are valid, the operator query_io_deviceQueryIoDevice returns the value 2 (H_MSG_TRUE). If necessary an exception is raised. In this case, an extended error information may be set and can be queried with the operator get_extended_error_infoGetExtendedErrorInfo.

Combinations with other operators🔗

Combinations

Possible successors

open_io_deviceOpenIoDevice

Module🔗

Foundation