Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!gatech!howland.reston.ans.net!ix.netcom.com!netcom.com!scot
From: scot@netcom.com (Scot Campbell)
Subject: Re: RS232 comms and smalltalk
Message-ID: <scotD8BtuB.Inz@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <D867q3.HAJ@cix.compulink.co.uk>
Date: Tue, 9 May 1995 19:51:47 GMT
Lines: 20
Sender: scot@netcom3.netcom.com

tayerst@cix.compulink.co.uk ("Tom Ayerst") writes:

>I am a beginner smalltalk developer, I have an app that I would like to 
>use as a learning project.

>Part of the app will need to talk to a serial port device.

>Should I just give up now and go back to C++ or is this possible ( even 
>easy? ).

  It is rather simple given that most of the OS's provide the underlying
API calls to do the actual interface with the UART.

  You simple need to create a single class, something like ComPort, which
is opened on a port (like CompPort openOn: 'COM2:').  It needs to hold 
the handle to the resource (the comport) which is needed to perform any
of the API calls to the port.  And it may need to save the last error
code.  There are many implementations of this.  See the Digitalk forum
on CompuServe or the Serial communications support included with PP
smalltalk.
