[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SerialPort.Open [Polling]?
[Thread Prev] | [Thread Next]
- Subject: Re: SerialPort.Open [Polling]?
- From: T Lee Davidson <t.lee.davidson@xxxxxxxxx>
- Date: Tue, 4 Jun 2024 20:58:35 -0400
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 6/4/24 06:22, Benoît Minisini wrote:
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,
Thank you, Benoît. I've updated the Wiki. -- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
SerialPort.Open [Polling]? | T Lee Davidson <t.lee.davidson@xxxxxxxxx> |
Re: SerialPort.Open [Polling]? | Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx> |