.rxlen R/O Property

Function:

For the selected serial port (selection is made through ser.num), returns the total number of committed bytes currently waiting in the RX buffer to be extracted and processed by your application.

Type:

Word | dword

Value Range:

0-65535

See Also:

Serial Settings, Buffer Memory Status


Details

The on_ser_data_arrival event is generated once the RX buffer is not empty (i.e., there is data to process). There may be only one on_ser_data_arrival event for each port waiting to be processed in the event queue. Another on_serial_data_arrival event for the same port may be generated only after the previous one is handled.

If, during the on_ser_data_arrival event handler execution, not all data is extracted from the RX buffer, another on_ser_data_arrival event is generated immediately after the on_ser_data_arrival event handler is exited.

Note that the RX buffer of the serial port employes "data committing" based on the amount of data in the buffer and the intercharacter delay (ser.interchardelay). Data in the RX buffer may not be committed yet. Uncommitted data is not visible to your application and is not included in the count returned by ser.rxlen.


Older devices had smaller RAM sizes, so the value returned by this property was of the word type. On newer devices with larger RAM capacities, this property has the dword type. Inspect the property's declaration on the platform you are using to make sure you know its type.


.rxlen R/O Property

Details