On_ser_data_arrival Event

Top  Previous  Next

 

Function:

Generated when at least one data byte is present in the RX buffer of the serial port (i.e. for this port the ser.rxlen>0).

Declaration:

on_ser_data_arrival

See Also:

Buffer Memory Status

 


Details

When the event handler for this event is entered the ser.num property is automatically switched to the port for which this event was generated. Another on_ser_data_arrival event on a particular port is never generated until the previous one is processed. Use ser.getdata method to extract the data from the RX buffer.

You don't have to process all data in the RX buffer at once. If you exit the on_ser_data_arrival event handler while there is still some unprocessed data in the RX buffer another on_ser_data_arrival event will be generated immediately.

This event is not generated for a particular port when buffer redirection is set for this port through the ser.redir method.