New datasink class CSVSink
This is a follow-up on MR 102 and MR 104.
A new sink class is added CSVSink
. Instead of printing the measurement to the console, the measurement is printed to a CSV file.
The example is run as ./build/bin/ps_monitor src/config/input-hw.json File low-voltage
The format in the output file similar to that of ConsoleSink
except the tags are columns and the first column is empty. The file is saved as powersupply.csv
, where powersupply
is the name of the measurement.
time,Channel,Voltage,Current
1595909424445, low-voltage,0.000434768,0.000304329
1595909424633, low-voltage,0.000582471,0.000284497
1595909424809, low-voltage,0.000631706,0.000324161
The sink and the name for the output directory are specified in the configuration json:
"datasinks":{
"File":{
"sinktype": "CSVSink",
"directory": "./"
}
Merge request reports
Activity
- Resolved by Elodie Deborah Resseguie
For the format, I think it would be better to make it a CSV file. That way it is easy parsable using existing tools. Maybe call it
CSVSink
?The main difference with what you have now is that the tags should also be columns.
- Resolved by Elodie Deborah Resseguie
We should have different files for different measurements. This is again to make it easier to parse the files using existing libraries.
Maybe instead of
filename
setting, have adirectory
setting where all the files (named after measurements) are saved?
added 49 commits
-
3372e7d9...01c99038 - 34 commits from branch
idatasink_registry
- c2c357e7 - Add libDataSink.
- edd9a1b6 - Add ps_monitor.
- 395d84d5 - Fix comment typo in ps_monitor.cpp
- dd3f58ea - split factory and registry classes into 2 separate libraries
- 86ecdc2c - file sink and created registry/factory for IDataSink
- 4ea0afd2 - revert some changes
- b20e0a06 - remove file sink from this MR
- bad7d10d - update comments
- 4348332f - update config
- 5c744388 - fix circular dependency and rebasing issues
- 0b089757 - Merge branch 'idatasink_registry' of...
- 52749e5f - filesink
- 59aef9f2 - fix error
- 1a0ab5d5 - create CSV
- ffd22944 - update example config
Toggle commit list-
3372e7d9...01c99038 - 34 commits from branch
- Resolved by Elodie Deborah Resseguie
Can you enable "squash commits" in the MR? It makes the log inside
devel
easier to read.
- Resolved by Elodie Deborah Resseguie
Hi @eressegu, can you change the target branch to be IDataSink? I want to merge 104 into IDataSink, and then we can merge this into IDataSink as well.
Cheers, Elisabetta
- Resolved by Elodie Deborah Resseguie
Hi @eressegu,
you also need to rebase to idatasink. In principle this MR should only add files for the CSVDataSink implementation and change in CMake files. Instead it include changes that I think are already included in your target branch.
Cheers, Elisabetta
Edited by Elisabetta Pianori
added 19 commits
- f9d2eaeb - Merge branch 'idatasink' of https://gitlab.cern.ch:8443/berkeleylab/labRemote into idatasink
- a8a1c130 - Add ps_monitor.
- 8894b23c - Fix comment typo in ps_monitor.cpp
- abd7c458 - split factory and registry classes into 2 separate libraries
- 2109e55d - file sink and created registry/factory for IDataSink
- 12e4639b - revert some changes
- 6f988278 - remove file sink from this MR
- 1c0084b5 - update comments
- 1abbd34b - update config
- a618131b - fix circular dependency and rebasing issues
- 6d848fa0 - split factory and registry classes into 2 separate libraries
- b32b3a51 - file sink and created registry/factory for IDataSink
- 438c6c78 - revert some changes
- 8cf18bac - remove file sink from this MR
- 58cd6ecc - fix circular dependency and rebasing issues
- d79b42fe - filesink
- 18a6efc6 - fix error
- 3f297abd - create CSV
- 7238af0a - update example config
Toggle commit list