On 17/08/17 14:00, Graeme Geldenhuys wrote:
Hi,
If somebody with more experience (than me) with the Synaser and FPC
serial.pp units could comment, that would be much appreciated.
For a new cross-platform project where I need to talk to a device hooked
up to a serial port, which unit would be the best to use? Normally I
would go with units included with FPC simply because I know they are
strict about keeping everything maintained.
When I say cross-platform, I'm currently talking about Windows and
Linux, and possibly FreeBSD and Mac too.
Now for the Synaser unit - the one I have is from 2013, and I already
noticed that there is no support for FreeBSD's /dev/* names to access
serial ports. Granted I added FreeBSD support to the
GetSerialPortNames() function in 5 minutes, but this doesn't bode to
well then for the Synaser unit - what else could be missing that I don't
know of?
I did the last maintenance on the serial.pp unit. I was focussing on
very low-level stuff, i.e. capture in threads with accurate timestamps
being appended, and notwithstanding my experience in this area would
suggest looking first at Synaser etc. which is far more likely to have
e.g. compatible terminal emulation.
I did specifically test serial.pp with both Linux (various processors)
and Solaris (SPARC) and to a lesser extent Windows (W2K, x86). There's a
specific gotcha related to differences in the way Linux and Solaris
handle select(), and since AIUI Solaris and the Berkeley OSes are
related this might turn out to be more of an issue that things like
naming conventions.
I'm not aware of a reliable, cross-platform way of getting a complete
list of all serial-like devices. I suppose that in principle it would be
possible to try out the appropriate ioctls on all character devices, but
things might break.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal