.getdata Method

Function:

For the selected serial port (selection is made through ser.num), returns the string that contains the data extracted from the RX buffer.

Syntax:

ser.getdata(maxinplen as word) as string

Returns:

String containing data extracted from the RX buffer

See Also:

Three Modes of the Serial Port, Receiving Data, ser.peekdata


Part

Description

maxinplen

Maximum amount of data to return (word).


Details

Extracted data is permanently deleted from the buffer. The length of extracted data is limited by one of the three factors (whichever is smaller): the amount of committed data in the RX buffer, the capacity of the "receiving" string variable, and the limit set by the maxinplen argument.

In the UART mode (ser.mode = 0 — PL_SER_MODE_UART), the data is extracted "as is." For the Wiegand and clock/data modes (ser.mode = 1 — PL_SER_MODE_WIEGAND and ser.mode = 2 — PL_SER_MODE_CLOCKDATA), each character of extracted data represents one data bit and only the "0" or "1" characters are possible.


.getdata Method

Details