comp.lang.ada
 help / color / mirror / Atom feed
From: Michael Bode <m.g.bode@web.de>
Subject: Re: Ada way to read/write to character file
Date: 09 Jan 2002 07:25:44 +0100
Date: 2002-01-09T07:25:44+01:00	[thread overview]
Message-ID: <m3ofk46nx3.fsf@jupiter.solar.system> (raw)
In-Reply-To: IGN_7.9654$762.80315@rwcrnsc54

tmoran@acm.org writes:

>   Given timing, error conditions, dropped lines, and the likelihood of
> non-text data, I wonder how often you would actually want to do
> "sequential text I/O" on an RS232 port. 

There are all kinds of devices that are controlled by text commands
over RS232. I currently have on my table (in the lab) a pyrometer, a
temperature controller (home made), drives for optical tables, a drive
for a linear axis, 2 CCTV cameras and a scope. So I guess I will have to
do that quite often :-).

> There's also the question of
> where do you specify parity & baud rate.

Since this has to be done only once at program start one could simply
execute something like "stty -F /dev/ttyS0 ..." or "mode com1
...". Using the proper API functions is a bit more work but
better. Esp. with Windows 2k I could not get the communication to work
when I set the COM1 parameters with mode and then started my
program. Windows 98 was fine, Linux too. Timeout values have to be set
from API functions anyway. That way I discoverd the Win32 bindings
that come with gnat 3.13p are a bit old, Microsoft has changed the
definiton of the COMM_DCB struct, but the old one still works too.




  reply	other threads:[~2002-01-09  6:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-05 12:01 Ada way to read/write to character file Michael Bode
2002-01-07 15:13 ` Alfred Hilscher
2002-01-09  0:04   ` Nick Roberts
2002-01-09  2:12     ` tmoran
2002-01-09  6:25       ` Michael Bode [this message]
2002-01-09 16:12         ` Georg Bauhaus
2002-01-09 20:38           ` Michael Bode
2002-01-09 23:57             ` James Rogers
2002-01-10  6:17               ` Michael Bode
2002-01-10 23:13             ` Georg Bauhaus
2002-01-09 12:11       ` Nick Roberts
2002-01-09 14:17         ` Ted Dennison
2002-01-11  0:19           ` Nick Roberts
2002-01-12 16:01             ` Michael Bode
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox