Ser.Rxlen R/O Property
|Top Previous Next|
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.
Notice that the RX buffer of the serial port employes "data committing" based on the amount of data in the buffer and 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 the 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.