Version française
Home     About     Download     Resources     Contact us    
Browse thread
opening/reading a rtai fifo
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eric Cooper <ecc@c...>
Subject: Re: [Caml-list] opening/reading a rtai fifo
On Wed, May 24, 2006 at 06:47:33PM +0200, julien.michel@etu.univ-orleans.fr wrote:
> I currently work on an embedded system, OS Linux 2.4-19 RTAI .
> 
> I'd like to open and read out an RTAI FIFO (called /dev/rtf/0)
> I used to do it with a "C" code such like:
> fd = open("/dev/rtf/0",O_RDONLY);
> read(fd,&f,sizeof(...)); etc...
> 
> For now, I would like to do that with Ocaml.
> [...]

I suggest using the Unix.openfile and Unix.read functions them same
way your current C code does, rather than the buffered I/O in stdlib.

-- 
Eric Cooper             e c c @ c m u . e d u