get_serial_paramT_get_serial_paramGetSerialParamGetSerialParamget_serial_param (算子名称)
名称
get_serial_paramT_get_serial_paramGetSerialParamGetSerialParamget_serial_param — Get the parameters of a serial device.
参数签名
void GetSerialParam(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
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)
int HSerial.GetSerialParam(out int dataBits, out string flowControl, out string parity, out int stopBits, out int totalTimeOut, out int interCharTimeOut)
def get_serial_param(serial_handle: HHandle) -> Tuple[int, int, str, str, int, int, int]
描述
get_serial_paramget_serial_paramGetSerialParamGetSerialParamGetSerialParamget_serial_param returns the current parameter settings of
the serial device passed in SerialHandleSerialHandleSerialHandleSerialHandleserialHandleserial_handle. For a
description of the parameters of a serial device, see
set_serial_paramset_serial_paramSetSerialParamSetSerialParamSetSerialParamset_serial_param.
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
This operator modifies the state of the following input parameter:
During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.
参数表
SerialHandleSerialHandleSerialHandleSerialHandleserialHandleserial_handle (input_control, state is modified) serial → HSerial, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Serial interface handle.
BaudRateBaudRateBaudRateBaudRatebaudRatebaud_rate (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Speed of the serial interface.
DataBitsDataBitsDataBitsDataBitsdataBitsdata_bits (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of data bits of the serial interface.
FlowControlFlowControlFlowControlFlowControlflowControlflow_control (output_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Type of flow control of the serial interface.
ParityParityParityParityparityparity (output_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Parity of the serial interface.
StopBitsStopBitsStopBitsStopBitsstopBitsstop_bits (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of stop bits of the serial interface.
TotalTimeOutTotalTimeOutTotalTimeOutTotalTimeOuttotalTimeOuttotal_time_out (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Total timeout of the serial interface in ms.
InterCharTimeOutInterCharTimeOutInterCharTimeOutInterCharTimeOutinterCharTimeOutinter_char_time_out (output_control) integer → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Inter-character timeout of the serial interface
in ms.
结果
If the parameters are correct and the parameters of the device could
be read, 该算子 get_serial_paramget_serial_paramGetSerialParamGetSerialParamGetSerialParamget_serial_param 返回值
2 (
H_MSG_TRUE)
. Otherwise an exception is raised.
可能的前置算子
open_serialopen_serialOpenSerialOpenSerialOpenSerialopen_serial
可能的后置算子
read_serialread_serialReadSerialReadSerialReadSerialread_serial,
write_serialwrite_serialWriteSerialWriteSerialWriteSerialwrite_serial
参考其它
set_serial_paramset_serial_paramSetSerialParamSetSerialParamSetSerialParamset_serial_param
模块
Foundation