[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SerialPort.Open [Polling]?


Le 04/06/2024 à 03:49, T Lee Davidson a écrit :
https://gambaswiki.org/wiki/comp/gb.net/serialport/open describes the SerialPort.Open method. But, it does not explain what the optional Polling parameter is/does.

Looking at the source code, it appears to be the interval, in milliseconds with a default of 50ms, between polls of the serial port, I assume, to see if there is data available to be read. Is this correct?


According to the source code, polling is only used if you handle one of the 'XXXChange' event. Detecting data availability is always done, and not by polling.

Beware it does not work if you change the event observer of the SerialPort object after having created it.

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: SerialPort.Open [Polling]?T Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: SerialPort.Open [Polling]?Claus Dietrich <claus.dietrich@xxxxxxxxxx>
References:
SerialPort.Open [Polling]?T Lee Davidson <t.lee.davidson@xxxxxxxxx>