mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
CLI: added empty dbit list option 'none' (#1069)
* cli: added 'none' to the rx_dbitlist command to be able to set the dbit list to an empty list
This commit is contained in:
parent
ed6686d4a7
commit
0771461c01
@ -1749,7 +1749,8 @@ class Detector {
|
||||
Result<std::vector<int>> getRxDbitList(Positions pos = {}) const;
|
||||
|
||||
/** [CTB] list contains the set of digital signal bits (0-63) to save, must
|
||||
* be non repetitive */
|
||||
* be non repetitive. Note: data will be rearranged according to signal bits
|
||||
*/
|
||||
void setRxDbitList(const std::vector<int> &list, Positions pos = {});
|
||||
|
||||
/** [CTB] */
|
||||
|
@ -1020,10 +1020,16 @@ std::string Caller::slowadc(int action) {
|
||||
std::string Caller::rx_dbitlist(int action) {
|
||||
std::ostringstream os;
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[all] or [i0] [i1] [i2]... \n\t[Ctb] List of digital signal "
|
||||
"bits read out. If all is used instead of a list, all digital "
|
||||
"bits (64) enabled. Each element in list can be 0 - 63 and must "
|
||||
"be non repetitive."
|
||||
os << "[all] or [none] or [i0] [i1] [i2]... \n\t[Ctb] List of digital "
|
||||
"signal bits enabled and rearranged according to the signals "
|
||||
"(all samples of each signal is put together). If 'all' is used "
|
||||
"instead of a list, all digital bits (64) enabled. Each element "
|
||||
"in list can be 0 - 63 and must be non repetitive. The option "
|
||||
"'none' will still spit out all data as is from the detector, "
|
||||
"but without rearranging it. Please note that when using the "
|
||||
"receiver list, the data size will be bigger if the number of "
|
||||
"samples is not divisible by 8 as every signal bit is padded to "
|
||||
"the next byte when combining all the samples in the receiver."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
@ -1041,7 +1047,9 @@ std::string Caller::rx_dbitlist(int action) {
|
||||
for (unsigned int i = 0; i < 64; ++i) {
|
||||
t[i] = i;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
// 'none' option already covered as t is empty by default
|
||||
else if (args[0] != "none") {
|
||||
unsigned int ntrim = args.size();
|
||||
t.resize(ntrim);
|
||||
for (unsigned int i = 0; i < ntrim; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user