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: julien.michel@e...
Subject: opening/reading a rtai fifo
Hello,
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. For instance, to begin, a reading
of the FIFO's first line:

let c = open_in "/dev/rtf/0" in
let s = input_line c in
print_string s;
close_in c;

While executing this code, the application seems to run continuously, without
printing anything out whereas it works while using a single text file instead of
the fifo.
It behaves like if the input_line function failed to get the end of line
character or whatever...
The same thing occurs using the "input_char" or "open_in_bin" functions...

Would anybody know the convenient functions to perform that ?

Thanks a lot


-- 
MICHEL Julien