read_io_channelT_read_io_channelReadIoChannelReadIoChannelread_io_channel (算子)
名称
read_io_channelT_read_io_channelReadIoChannelReadIoChannelread_io_channel — 从指定的输入/输出通道读取值。
签名
def read_io_channel(iochannel_handle: MaybeSequence[HHandle]) -> Tuple[Sequence[HTupleElementType], Sequence[int]]
描述
read_io_channelread_io_channelReadIoChannelReadIoChannelReadIoChannelread_io_channel reads input values from the specified
transmission channels. The channels are passed in
IOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleiochannel_handle and can be opened and configured by
open_io_channelopen_io_channelOpenIoChannelOpenIoChannelOpenIoChannelopen_io_channel, the values are returned in
ValueValueValueValuevaluevalue. The parameter StatusStatusStatusStatusstatusstatus returns for each read
value in ValueValueValueValuevaluevalue a quality message. The value 0
indicates that the corresponding value of ValueValueValueValuevaluevalue could be
read. Any other status value depends on the interface. Please refer
to the interface-specific documentation in the directory
doc/html/reference/io for further explanation.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
IOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleIOChannelHandleiochannel_handle (输入控制) io_channel(-array) → HIOChannel, HTupleMaybeSequence[HHandle]HTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handles of the opened I/O channels.
ValueValueValueValuevaluevalue (输出控制) tuple-array → HTupleSequence[HTupleElementType]HTupleHtuple (integer / real / string / handle) (int / long / double / string / HHandle) (Hlong / double / HString / HHandle) (Hlong / double / char* / handle)
Read value.
StatusStatusStatusStatusstatusstatus (输出控制) integer-array → HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Status of read value.
结果
如果参数有效,算子
read_io_channelread_io_channelReadIoChannelReadIoChannelReadIoChannelread_io_channel 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。在这种情况下,可以设置扩展错误信息,并可进行查询通过算子 get_extended_error_infoget_extended_error_infoGetExtendedErrorInfoGetExtendedErrorInfoGetExtendedErrorInfoget_extended_error_info。
可能的前趋
open_io_channelopen_io_channelOpenIoChannelOpenIoChannelOpenIoChannelopen_io_channel,
set_io_channel_paramset_io_channel_paramSetIoChannelParamSetIoChannelParamSetIoChannelParamset_io_channel_param
可能的后继
close_io_channelclose_io_channelCloseIoChannelCloseIoChannelCloseIoChannelclose_io_channel
另见
write_io_channelwrite_io_channelWriteIoChannelWriteIoChannelWriteIoChannelwrite_io_channel,
query_io_devicequery_io_deviceQueryIoDeviceQueryIoDeviceQueryIoDevicequery_io_device,
set_io_channel_paramset_io_channel_paramSetIoChannelParamSetIoChannelParamSetIoChannelParamset_io_channel_param
模块
基础