Operator Reference

query_io_deviceT_query_io_deviceQueryIoDeviceQueryIoDevicequery_io_device (Operator)

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

Signature

query_io_device( : : IODeviceHandle, IOChannelName, Query : Result)

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

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

def query_io_device(iodevice_handle: HHandle, iochannel_name: MaybeSequence[str], query: Sequence[str]) -> Sequence[Union[int, float, str]]

Description

The operator query_io_devicequery_io_deviceQueryIoDeviceQueryIoDevicequery_io_device returns information about transmission channels of a specified I/O device. The handle to the I/O device is passed to in IODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleiodevice_handle, whereas the channels are addressed by IOChannelNameIOChannelNameIOChannelNameIOChannelNameiochannel_name. The desired information about the I/O channels is specified via QueryQueryQueryqueryquery. A list of all supported channel names is usually returned when passing 'io_channel_name'"io_channel_name""io_channel_name""io_channel_name""io_channel_name" to QueryQueryQueryqueryquery while the input parameter IOChannelNameIOChannelNameIOChannelNameIOChannelNameiochannel_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

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

IODeviceHandleIODeviceHandleIODeviceHandleIODeviceHandleiodevice_handle (input_control)  io_device HIODevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the opened I/O device.

IOChannelNameIOChannelNameIOChannelNameIOChannelNameiochannel_name (input_control)  string(-array) HTupleMaybeSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Channel names to query.

QueryQueryQueryqueryquery (input_control)  string-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Name of the query.

Default: 'param_name' "param_name" "param_name" "param_name" "param_name"

List of values: 'io_channel_names'"io_channel_names""io_channel_names""io_channel_names""io_channel_names", 'param_name'"param_name""param_name""param_name""param_name"

ResultResultResultresultresult (output_control)  string-array HTupleSequence[Union[int, float, str]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)

List of values (according to QueryQueryQueryqueryquery).

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_devicequery_io_deviceQueryIoDeviceQueryIoDevicequery_io_device 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_infoget_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfoget_extended_error_info.

Possible Successors

open_io_deviceopen_io_deviceOpenIoDeviceOpenIoDeviceopen_io_device

Module

Foundation