Real Time streaming with kst

View: New views
3 Messages — Rating Filter:   Alert me  

Real Time streaming with kst

by Bugzilla from mutlaqja@ikarustech.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

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?

Also, can you script kst from DBus? Finally, would really appreciate it if
the documentation, especially on streaming, is updated.

Best Regards,
Jasem Mutlaq
http://edu.kde.org/kstars




_______________________________________________
Kst mailing list
Kst@...
https://mail.kde.org/mailman/listinfo/kst

Re: Real Time streaming with kst

by Bugzilla from nicolas.brisset@eurocopter.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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
_______________________________________________
Kst mailing list
Kst@...
https://mail.kde.org/mailman/listinfo/kst

Re: Real Time streaming with kst

by Bugzilla from netterfield@astro.utoronto.ca :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

kst assumes that you are looking at data that is being archived.

That being the case, during integration and testing, we do tend to delete old
data off our disks once they are getting full (after backing it up, if we
think we might want it later.)  This works fine for us: a serial port will
take an awful long time to fill up a modern drive.

That being the case, I have sometimes thought about some sort of semi-
persistent data source, which only keeps data around over a window.  Shouldn't
be too hard to write.  

cbn

On Sunday 11 October 2009 17:48:26 Jasem Mutlaq wrote:

> Hello,
>
> 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?
>
> Also, can you script kst from DBus? Finally, would really appreciate it if
> the documentation, especially on streaming, is updated.
>
> Best Regards,
> Jasem Mutlaq
> http://edu.kde.org/kstars
>
>
>
>
> _______________________________________________
> Kst mailing list
> Kst@...
> https://mail.kde.org/mailman/listinfo/kst
>
_______________________________________________
Kst mailing list
Kst@...
https://mail.kde.org/mailman/listinfo/kst