From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c64c5909c07a2300 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-08 22:28:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Michael Bode Newsgroups: comp.lang.ada Subject: Re: Ada way to read/write to character file Date: 09 Jan 2002 07:25:44 +0100 Organization: Organized? Me? Sender: mb@jupiter.solar.system Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.t-online.com 1010557569 04 581 NdRcTVJSjYsKA 020109 06:26:09 X-Complaints-To: abuse@t-online.com X-Sender: 320025674319-0001@t-dialin.net User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Xref: archiver1.google.com comp.lang.ada:18676 Date: 2002-01-09T07:25:44+01:00 List-Id: 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.