Difference between revisions of "Serial unit"

From Lazarus wiki
Jump to navigationJump to search
Line 3: Line 3:
 
==When timeout starts==
 
==When timeout starts==
  
Q: I'm trying to figure out is when the timeout timer in SerRead/SerReadTimeout starts.
+
Q: I'm trying to figure out when the timeout timer in SerRead/SerReadTimeout starts.
  
 
A (by FPC developer Christo Crause): FPC uses the OS provided functionality to interact with the serial port. On Windows the timeout seems to start when the read request is made - [https://learn.microsoft.com/en-us/previous-versions/ff547486(v=vs.85) Link]. On POSIX (at least Linux) it depends on the specific set of flags specified , scroll down to the discussion on canonical/noncanonical mode for the details - [https://linux.die.net/man/3/termios Link].
 
A (by FPC developer Christo Crause): FPC uses the OS provided functionality to interact with the serial port. On Windows the timeout seems to start when the read request is made - [https://learn.microsoft.com/en-us/previous-versions/ff547486(v=vs.85) Link]. On POSIX (at least Linux) it depends on the specific set of flags specified , scroll down to the discussion on canonical/noncanonical mode for the details - [https://linux.die.net/man/3/termios Link].

Revision as of 16:24, 19 September 2022

Unit Serial in FPC supports work with serial port. It provides many Ser* functions.

When timeout starts

Q: I'm trying to figure out when the timeout timer in SerRead/SerReadTimeout starts.

A (by FPC developer Christo Crause): FPC uses the OS provided functionality to interact with the serial port. On Windows the timeout seems to start when the read request is made - Link. On POSIX (at least Linux) it depends on the specific set of flags specified , scroll down to the discussion on canonical/noncanonical mode for the details - Link.