v_abcd commands should be removed to prevent unintentional usage and throw with a suggestion command for dac and power
Build on RHEL9 / build (push) Successful in 3m29s
Run Simulator Tests on local RHEL9 / build (push) Failing after 3m42s
Build on RHEL8 / build (push) Successful in 5m10s
Run Simulator Tests on local RHEL8 / build (push) Failing after 5m19s

This commit is contained in:
2026-02-26 14:59:26 +01:00
parent 42da2e04b7
commit 89fc3eac45
17 changed files with 193 additions and 1122 deletions
+5 -3
View File
@@ -80,12 +80,14 @@ CtbConfig::getNames(size_t expected_size,
void CtbConfig::setDacName(size_t index, const std::string &name) {
check_index(index, num_dacs, "DAC");
std::vector<std::string> powers = {"v_a", "v_b", "v_c", "v_d", "v_io", "va", "vb", "vc", "vd", "vio"};
std::vector<std::string> powers = {"v_a", "v_b", "v_c", "v_d", "v_io",
"va", "vb", "vc", "vd", "vio"};
std::string lower = name;
std::transform(lower.begin(), lower.end(), lower.begin(),
[](unsigned char c){ return std::tolower(c); });
[](unsigned char c) { return std::tolower(c); });
if (std::find(powers.begin(), powers.end(), lower) != powers.end()) {
throw RuntimeError("DAC name cannot be a power name (VA, VB, VC, VD, VIO, V_A, V_B, V_C, V_D, V_IO)");
throw RuntimeError("DAC name cannot be a power name (VA, VB, VC, VD, "
"VIO, V_A, V_B, V_C, V_D, V_IO)");
}
set_name(name, dacnames, index);
}