Ser.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: |
Part |
Description |
maxinplen |
Maximum amount of data to return (word). |
Details
Extracted data is permanently deleted from the buffer. Length of extracted data is limited by one of the three factors (whichever is smaller): amount of committed data in the RX buffer itself, 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 Wiegand and clock/data mode (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 two characters are possible: '0' or '1'.