comp.lang.ada
 help / color / mirror / Atom feed
From: Kim Rostgaard Christensen <krc@retrospekt.dk>
Subject: Re: Asynchronous I/O on a serial device
Date: Sun, 12 Jun 2011 09:49:04 +0200
Date: 2011-06-12T09:49:04+02:00	[thread overview]
Message-ID: <it1r1l$50b$1@munin.nbi.dk> (raw)
In-Reply-To: <op.vwx7hiikule2fv@douda-yannick>

On 2011-06-12 07:42, Yannick Duch�ne (Hibou57) wrote:
> Le Sat, 11 Jun 2011 23:46:47 +0200, Kim Rostgaard Christensen
> <krc@retrospekt.dk> 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




  reply	other threads:[~2011-06-12  7:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 21:46 Asynchronous I/O on a serial device Kim Rostgaard Christensen
2011-06-12  5:23 ` Randy Brukardt
2011-06-12  7:33   ` Kim Rostgaard Christensen
2011-06-12  5:42 ` Yannick Duchêne (Hibou57)
2011-06-12  7:49   ` Kim Rostgaard Christensen [this message]
2011-06-12 10:35     ` Kim Rostgaard Christensen
2011-06-12 11:04     ` Yannick Duchêne (Hibou57)
2011-06-12 18:06       ` Kim Rostgaard Christensen
2011-06-12 21:01 ` anon
2011-06-14  6:37   ` Kim Rostgaard Christensen
2011-06-15 17:02     ` Simon Clubley
replies disabled

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