Operator Reference

get_serial_paramT_get_serial_paramGetSerialParamGetSerialParamget_serial_param (Operator)

get_serial_paramT_get_serial_paramGetSerialParamGetSerialParamget_serial_param — Get the parameters of a serial device.

Signature

Herror T_get_serial_param(const Htuple SerialHandle, Htuple* BaudRate, Htuple* DataBits, Htuple* FlowControl, Htuple* Parity, Htuple* StopBits, Htuple* TotalTimeOut, Htuple* InterCharTimeOut)

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]

Description

get_serial_paramget_serial_paramGetSerialParamGetSerialParamget_serial_param returns the current parameter settings of the serial device passed in SerialHandleSerialHandleSerialHandleserialHandleserial_handle. For a description of the parameters of a serial device, see set_serial_paramset_serial_paramSetSerialParamSetSerialParamset_serial_param.

Execution Information

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

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.

Parameters

SerialHandleSerialHandleSerialHandleserialHandleserial_handle (input_control, state is modified)  serial HSerial, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Serial interface handle.

BaudRateBaudRateBaudRatebaudRatebaud_rate (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Speed of the serial interface.

DataBitsDataBitsDataBitsdataBitsdata_bits (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of data bits of the serial interface.

FlowControlFlowControlFlowControlflowControlflow_control (output_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Type of flow control of the serial interface.

ParityParityParityparityparity (output_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Parity of the serial interface.

StopBitsStopBitsStopBitsstopBitsstop_bits (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of stop bits of the serial interface.

TotalTimeOutTotalTimeOutTotalTimeOuttotalTimeOuttotal_time_out (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Total timeout of the serial interface in ms.

InterCharTimeOutInterCharTimeOutInterCharTimeOutinterCharTimeOutinter_char_time_out (output_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Inter-character timeout of the serial interface in ms.

Result

If the parameters are correct and the parameters of the device could be read, the operator get_serial_paramget_serial_paramGetSerialParamGetSerialParamget_serial_param returns the value 2 ( H_MSG_TRUE) . Otherwise an exception is raised.

Possible Predecessors

open_serialopen_serialOpenSerialOpenSerialopen_serial

Possible Successors

read_serialread_serialReadSerialReadSerialread_serial, write_serialwrite_serialWriteSerialWriteSerialwrite_serial

See also

set_serial_paramset_serial_paramSetSerialParamSetSerialParamset_serial_param

Module

Foundation