Bug 399039 - No live plotting from the file
Summary: No live plotting from the file
Status: RESOLVED NOT A BUG
Alias: None
Product: kst
Classification: Applications
Component: datasources (show other bugs)
Version: 2.0.8
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-25 01:14 UTC by andrei4.2008
Modified: 2018-09-29 15:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrei4.2008 2018-09-25 01:14:56 UTC
SUMMARY
I have a "live" (100 ms refresh rate) ASCII file with 2 columns of float numbers. File has always the same size - new point is adding to the end and the first (oldest) value is removing from the file.
Problem is that Kst does not update plots (no matter 1 or 2 columns are used). Plots are updating if I manually press Refresh button though. I tried different settings and don't get the desired behavior.

PLATFORM
Ubuntu 18 default
Qt 5.9.5 from apt
Kst 2.0.8-2 from apt
Comment 1 Netterfield 2018-09-28 22:32:24 UTC
Unfortunately, this is not how kst realtime works - it only works with growing files.  If instead of deleting the oldest line, you just leave it and let the file grow, it will work fine, at the expense of a small amount of disk usage.

One could, in principle, put in a timer based reload, but without also implementing some sort of file locking strategy, this would lead to race conditions or partial reads, so I am hesitant to implement it.

Is there a reason why you can't keep the old data and let the file grow?
Comment 2 andrei4.2008 2018-09-29 15:43:44 UTC
OK, I see it's working now, thank you. The reason I limit the file size is just thoughts to save a disk space. Also, gnuplot have been able to reread such file without any issues, but works generally worse, kst is better for this application.