Skip to content

Commit

Permalink
CLI: added empty dbit list option 'none' (#1069)
Browse files Browse the repository at this point in the history
* cli: added 'none' to the rx_dbitlist command to be able to set the dbit list to an empty list
  • Loading branch information
thattil authored Jan 13, 2025
1 parent ed6686d commit 0771461
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion slsDetectorSoftware/include/sls/Detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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] */
Expand Down
18 changes: 13 additions & 5 deletions slsDetectorSoftware/src/CallerSpecial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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) {
Expand Down

0 comments on commit 0771461

Please sign in to comment.