[Lazarus] Usage of Serial in a testing program?

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Sun Sep 9 22:44:34 CEST 2018


On 09/09/18 12:00, Bo Berglund via Lazarus wrote:
> I am writing a testing application for checking out a TCP to Serialbridge component. I am using Lazarus 1.8.0 and fpc 3.0.4 on Windows 7
> For the serial port handling I found the "built-in" Serial unitdescribed here:http://wiki.freepascal.org/Hardware_Access#FPC_built_in_Serial_unit
> Now I have a few questions about its usage:
> 1) Serial port name-------------------When opening the port the example does this:
> str(ComPortNr,tmpstr);ComPortName:= 'COM'+tmpstr+':';serialhandle := SerOpen(ComPortName);
> So for say port 29 this results in ComPortName 'COM29:'Is this always the case? I have a hunch that for port numbers 1..9 theWindows port naming is different than for higher port numbers...
> And if I want to port this to Linux, I guess thta the name iscompletely different, but no hint is given.

I did quite lot of work on the serial.pp unit more recently than that 
wiki page, in fact I didn't even know it existed. Please refer to the 
comments in that file in the first instance.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]


More information about the Lazarus mailing list