You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/configurationParameters.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,6 +199,7 @@ The parameters related to 3rd-party libraries are described here for convenience
199
199
| readout | aggregatorSliceTimeout | double | 0 | When set, slices (groups) of pages are flushed if not updated after given timeout (otherwise closed only on beginning of next TF, or on stop). |
200
200
| readout | aggregatorStfTimeout | double | 0 | When set, subtimeframes are buffered until timeout (otherwise, sent immediately and independently for each data source). |
201
201
| readout | customCommands | string || List of key=value pairs defining some custom shell commands to be executed at before/after state change commands. |
202
+
| readout | defaults | string || If set, the corresponding configuration URI is loaded and merged with current readout configuration. Existing parameters in current config are NOT overwritten. |
202
203
| readout | disableAggregatorSlicing | int | 0 | When set, the aggregator slicing is disabled, data pages are passed through without grouping/slicing. |
203
204
| readout | disableTimeframes | int | 0 | When set, all timeframe related features are disabled (this may supersede other config parameters). |
204
205
| readout | exitTimeout | double | -1 | Time in seconds after which the program exits automatically. -1 for unlimited. |
Copy file name to clipboardExpand all lines: doc/releaseNotes.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -593,3 +593,7 @@ This file describes the main feature changes for each readout.exe released versi
593
593
- Updated configuration parameters:
594
594
- consumer-fileRecorder-*.filesMax: if negative value, the files are written round-robin indefinitely. For example, if value is -4, there will be files 001 to 004 used as circular buffer. This implies limits are defined with the other parameters (e.g. maximum size, number of tf, or pages).
595
595
- Log messages cosmetics: details in orbits warning, special chars in RDH errors.
596
+
597
+
## v2.21.5 - 13/10/2023
598
+
- Updated configuration parameters:
599
+
- added readout.defaults: if set, the corresponding configuration URI is loaded and merged with current readout configuration. Existing parameters in current config are NOT overwritten. Useful to put in a single place settings which are shared by many configs.
boost::property_tree::ptree t = conf->getRecursive(cfgFileEntryPoint);
792
+
cfg.load(t);
793
+
// cfg.print();
794
+
} catch (std::exception& e) {
795
+
throwstd::string(e.what());
796
+
}
797
+
#else
798
+
throwstd::string("This type of URI is not supported");
799
+
#endif
753
800
}
754
-
#else
755
-
throwstd::string("This type of URI is not supported");
756
-
#endif
801
+
} catch (std::string err) {
802
+
theLog.log(LogErrorSupport_(3100), "Failed to read config: %s", err.c_str());
803
+
return -1;
757
804
}
758
-
} catch (std::string err) {
759
-
theLog.log(LogErrorSupport_(3100), "Failed to read config: %s", err.c_str());
805
+
return0;
806
+
};
807
+
808
+
if (loadConfig(cfgFileURI, cfgFileEntryPoint, cfg)) {
760
809
return -1;
761
810
}
762
811
812
+
//printTree(cfg.get(),0);
813
+
814
+
// configuration parameter: | readout | defaults | string | | If set, the corresponding configuration URI is loaded and merged with current readout configuration. Existing parameters in current config are NOT overwritten. |
815
+
816
+
// try to load extra defaults, if defined, and merge
817
+
std::string cfgDefaultsPath = "";
818
+
if (cfg.getOptionalValue<std::string>("readout.defaults", cfgDefaultsPath) == 0) {
819
+
ConfigFile cfgDefaults;
820
+
theLog.log(LogInfoDevel, "Reading configuration defaults from %s %s", cfgDefaultsPath.c_str(), cfgFileEntryPoint);
821
+
if (loadConfig(cfgDefaultsPath.c_str(), cfgFileEntryPoint, cfgDefaults) == 0) {
822
+
//printTree(cfgDefaults.get(),0);
823
+
// merge trees: defaults values used if not defined already
Copy file name to clipboardExpand all lines: src/readoutConfigEditor.tcl
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,7 @@ set configurationParametersDescriptor {
145
145
| readout | aggregatorSliceTimeout | double | 0 | When set, slices (groups) of pages are flushed if not updated after given timeout (otherwise closed only on beginning of next TF, or on stop). |
146
146
| readout | aggregatorStfTimeout | double | 0 | When set, subtimeframes are buffered until timeout (otherwise, sent immediately and independently for each data source). |
147
147
| readout | customCommands | string | | List of key=value pairs defining some custom shell commands to be executed at before/after state change commands. |
148
+
| readout | defaults | string | | If set, the corresponding configuration URI is loaded and merged with current readout configuration. Existing parameters in current config are NOT overwritten. |
148
149
| readout | disableAggregatorSlicing | int | 0 | When set, the aggregator slicing is disabled, data pages are passed through without grouping/slicing. |
149
150
| readout | disableTimeframes | int | 0 | When set, all timeframe related features are disabled (this may supersede other config parameters). |
150
151
| readout | exitTimeout | double | -1 | Time in seconds after which the program exits automatically. -1 for unlimited. |
0 commit comments