rt_printf and file writing
Hi all,
maybe another silly question but where is written string passed to rt_printf ? My program compiled fine but nothing appears on the screen, the issue is that i'm doing data acquisition and i need to check during progression values i get (anyway i've been asked to print these values on the screen).
Another thing, in order to keep these data even if the computer may come to crash, we would appreciate to save them in a file, is there a way to do so in realtime ?
Thanks again for your work,
Antoine
Quoted 10 lines · [email protected] wrote:
Hi all,
maybe another silly question but where is written string passed to
rt_printf? My program compiled fine but nothing appears on the screen, the issue is that i'm doing data acquisition and i need to check during progression values i get (anyway i've been asked to print these values on the screen).Another thing, in order to keep these data even if the computer may come to crash, we would appreciate to save them in a file, is there a way to do so in realtime ?
Printing on the screen or to a file uses Linux drivers, so is not a real-time operation, at least up to now with Xenomai. What you can do is get real-time tasks to use a buffering IPC of some sort to let a non real-time task do the actual writing to file or to the screen.
This is what rt_printf does. So, maybe you do not see anything because your real-time task is running all the time and does not let linux run?
Signature · 1 line
Gilles.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Antoine Nourry
Quoted 4 lines · Gilles Chanteperdrix
This is what
rt_printfdoes. So, maybe you do not see anything because your real-time task is running all the time and does not let linux run?Yes, i did not try but this is the case (concerning my RT task) and may be the answer, thanks again.
Well, don't do that, you have to let linux run from time to time, otherwise you risk crashes or other problems.
P.S: do not forget to CC the mailing list when answering.
Signature · 1 line
Gilles.