SerialPortError()

Syntax

Result = SerialPortError(#SerialPort)
Description
Returns the error on the serial port when ReadSerialPortData(), WriteSerialPortData() or WriteSerialPortString() failed.

Parameters

#SerialPort The serial port to use.

Return value

Can be a combination of the following values:
  #PB_SerialPort_RxOver: An input buffer overflow has occurred.
                         There is either no room in the input buffer
                         or a character was received after the end-of-file (EOF)
  #PB_SerialPort_OverRun: A character-buffer overrun has occurred.
                          The next character is lost.
  #PB_SerialPort_RxParity : The hardware detected a parity error.
  #PB_SerialPort_Frame    : The hardware detected a framing error.
  #PB_SerialPort_Break    : The hardware detected a break condition.
  #PB_SerialPort_TxFull   : The application tried to transmit a character but the output buffer was full.
  #PB_SerialPort_IOE      :  An I/O error occurred during communications with the device.
  #PB_SerialPort_WaitingCTS  : Specifies whether transmission is waiting for the CTS (clear-to-send) signal to be sent.
  #PB_SerialPort_WaitingDSR  : Specifies whether transmission is waiting for the DSR (data-set-ready) signal to be sent.
  #PB_SerialPort_WaitingRLSD : Specifies whether transmission is waiting for the RLSD (receive-line-signal-detect) signal to be sent.
  #PB_SerialPort_XoffReceived: Specifies whether transmission is waiting because the XOFF character was received.
  #PB_SerialPort_XoffSent    : Specifies whether transmission is waiting because the XOFF character was transmitted.
                               Transmission halts when the XOFF character is transmitted to a system that takes the next
                               character as XON, regardless of the actual character.
  #PB_SerialPort_EOFSent: Specifies whether the end-of-file (EOF) character has been received.

See Also

ReadSerialPortData(), WriteSerialPortData(), WriteSerialPortString()

Supported OS

All

<- ReadSerialPortData() - SerialPort Index - SerialPortID() ->