Version: 1.8.0_devel (using KDE 3.5.9) OS: Linux Installed from: Fedora RPMs When opening an dirfile object with for instance 3 samples, kst only detect the first sample. When there is only one or 2 samples, kst doesn't detect anything (and we can not open the group where the object is, we can not click on next using the data wizzard). For instance -rw-rw-r-- 1 qla4rt qla4rt 229 Nov 4 15:49 format -rw-rw-r-- 1 qla4rt qla4rt 24 Nov 4 17:00 TIMESEC -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_V-tune -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_V-calc -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_V -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_T-tune -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_T -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_Step -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_Status -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_NS -rw-rw-r-- 1 qla4rt qla4rt 12 Nov 4 17:00 HFI_00_OPT_I HFI_00_OPT_V is a float. There are 3 samples. (in format ; HFI_00_OPT_V RAW f 1) With kst, we can see in the data manager HFI_00_OPT_V Data Vector 1 /data1/qla4rt/rttest.hdmc/DATA/KST_html/Hs_HFI_00_OPT:Hs_HFI_00_OPT[0..-1] Only 1 sample instead of 3 And we've got this for all dirfiles objects, whatever the number of samples, we always miss the last 2 samples.
This was a "feature" added in the days of the Ur-getdata to make streaming dirfiles work with kst. It currently lives in DirFileSource::update, where kst simply subtracts two from the number of frames that GetData reports. Ideally it should be removed. AFACT, kst should be able to work with a streamed dirfile (as long as appended to according to the Dirfile Standards) without it. However Barth have a better idea of how much (if any) breaking of streaming dirfiles would result by removing the magic minus two.
This makes real time data over an nfs mounted drive more reliable. I agree that it may now be fine without it, as long as you mount with -o noac, but we would need to test that. Perhaps if we detect if we are streaming (nf == old_nf). If we are, subtract the 2, if not, read to the end.
We really need to get the last 2 samples, as we've got sometimes some data with only one sample. We can't see the data at all with kst in that case.
As the -2 seems at best to be a hack to work around a problem with streaming and is causing problems elsewhere I will remove it - unless there are any vocal complaints with good reasons not to do so.
SVN commit 883489 by arwalker: BUG:174416 remove hard-coded magic number of -2 to make all data within a dirfile dataset available M +7 -4 dirfile.cpp M +3 -0 getdata.c WebSVN link: http://websvn.kde.org/?view=rev&revision=883489