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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b321573c2e5269d2 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII From: Kim Rostgaard Christensen Newsgroups: comp.lang.ada Subject: Re: Asynchronous I/O on a serial device Date: Sun, 12 Jun 2011 09:49:04 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: 2506ds1-so.0.fullrate.dk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: munin.nbi.dk 1307864950 5131 90.184.227.68 (12 Jun 2011 07:49:10 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sun, 12 Jun 2011 07:49:10 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110402 Icedove/3.1.9 In-Reply-To: Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail Xref: g2news2.google.com comp.lang.ada:20741 Date: 2011-06-12T09:49:04+02:00 List-Id: On 2011-06-12 07:42, Yannick Duch�ne (Hibou57) wrote: > Le Sat, 11 Jun 2011 23:46:47 +0200, Kim Rostgaard Christensen > a �crit: > >> Hi there > Hi you :) Ca va ? ;-) ... > I do not know about your device node, so I could not say if its writable > or not, but note you also have Inout_File in Ada (do not know what it > named Inout_File instead of In_Out_File, but that's another story) > beside of In_File, so could perfectly have input and output on the file. The node is writeable, everything works via minicom. A googling reveals, at lest to me, that Inout_File is placed solely in the Direct_IO package. I will try it out later today. I will look forward to the Inout_File/In_Out_File tale, someday. >> Do I need to implement this more system-near/specific, or is there >> some way I can do bi-directional communication like, for instance two >> file handles. (I tried Form => "shared=yes", and it also failed). > I would not say more system specific, but rather more close to some > implicit specifications here: I am not sure you have good reasons [*] to > use Text_IO, and you may better have a file of some basic type, like > bytes or characters (well, a file of the more atomic type your protocol > defines). My reasons for using Text_IO is that is a QnD way of getting the input protocol logic implemented, while I was fiddling around with the bi-directional part. The protocol is line based ascii encoded base16 values, but the parser is not pretty as of this writing (the QnD part) I agree that it should be changed to something more application specific. I was suggested to use POSIX.IO, but this is, from my point of view too system specific for my primitive application. /Kim