[Kst] Real Time streaming with kst

Brisset, Nicolas Nicolas.Brisset at eurocopter.com
Mon Oct 12 08:43:29 CEST 2009


> What are the possible options to stream an ASCII file to kst? I know
of:
> 
> $ kst -y 2 -n 100 data.txt
> 
> Would read the "last" 100 lines of the file and watches it as it
grows,
> but
> if the stream is always appended to the file, wouldn't you run out of
the
> disk space eventually? I'm reading data from a serial port with a
> frequency
> of 5 Hz. Is there a way to watch if the content of a file has change
and
> re-read the content from the beginning?
Good question. If nothing is done, yes you will run out of disk space.
That's independent from kst, however. But we could arrange to handle
things cleanly if you can "restart" the file from time to time. It would
not be difficult to reset the datasource when the size shrinks. In
update() we could check for that condition and call the reset() method
as a shrinking datasource (esp. for ASCII) is almost certainly the sign
of a file being flushed and rewritten from the beginning, or in any case
in need of being re-read.
 
> Also, can you script kst from DBus? 
Kst 1.x can be scripted from dcop (use kdcop to browse the list of
available interfaces, quite a few!). I don't know exactly what the plans
are for kst 2.x, I'll let someone else answer. From a recent discussion,
apparently the 2.0.x series won't have scripting but that could be
re-added later, as there seem to be high expectations in this area. 

Nicolas


More information about the Kst mailing list