LibSerialPort.jl
LibSerialPort.jl copied to clipboard
purpose of seteof() and reseteof()
What's the purpose (“use case”) of method seteof() in the high-level API? It seems currently the sole way to influence the return value of eof().
A serial port does not really have any notion of “file” and therefore no inherent way of communicating an “end of file” condition. So I would have expected either
eof(sp::SerialPort) = falseas a minimalist implementation of thatBase.IOfunction, or- methods to define some EOF symbol that, if received, will cause
eof() == trueafter the preceding byte has been read.
Are there any particular EOF signals that people would like to be interpreted that way? For example:
- Ctrl-Z =
0x1a(as on MS-DOS)? - break signal?
- some particular modem status-line change?
Otherwise, why not simply set eof(sp::SerialPort) = false?
eof was used in the readuntil method that is removed in #61. Now it is just an artifact. I have no objection to setting it to false or removing it entirely, unless one of these new uses is found for it.