Stef,

Excellent - attached.  Pharo already opens by port number or name, so the two 
remaining steps are to save the result of the primitive and then to 
conditionally raise an error.  If all was well, save the port ID (which Pharo 
already does).

Bill



________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Stéphane Ducasse 
[[email protected]]
Sent: Saturday, July 16, 2011 4:09 PM
To: [email protected]
Subject: Re: [Pharo-project] SerialPort>>openPort:

On Jul 15, 2011, at 10:49 PM, Schwab,Wilhelm K wrote:

> I am starting to build a 1.3 image, and taking the usual look around for 
> things that would get lost.  SerialPort>>openPort: appears to address named 
> ports, but it looks like it will miss failures.  What I did for 1.1 is 
> capture the result of the primitives and raise an error if it is nil.  Any 
> interest?

yes
send code :)

> As an aside, does anyone know the state of serial ports on Linux?  With Cog?  
> I have been having good luck with native ports using Andreas' Windows VM.  I 
> have not done as well on my Linux laptop, but I can't tell whether that is 
> related to Linux, the Linux VM, or (my lead theory) USB-serial converters.  I 
> need to get Ubuntu on a box with native ports and put it where I can stress 
> test serial I/O; it has been a elusive combination, but I will get there.
>
> Bill
>
>
>
>


Attachment: SerialPort-openPort.st
Description: SerialPort-openPort.st

Reply via email to