Dev/reg bit change no validate (#970)

- do not validate write reg, setbit and clearbit by default anymore
- --validate will force validation on the bitmask or entire reg
- remove return value for write reg (across server to client, but thankfully not in the Detector class)
- extend validation into writereg, setbit and clearbit for Eiger (always special)
-  need to check python (TODO)
- missed the rx_zmqip implementations in detector.h and python bindings
This commit is contained in:
2024-09-30 16:54:12 +02:00
committed by GitHub
parent a44ba4dc35
commit 2dc0963c56
33 changed files with 499 additions and 171 deletions

View File

@@ -2812,18 +2812,20 @@ uint32_t Module::readRegister(uint32_t addr) const {
return sendToDetectorStop<uint32_t>(F_READ_REGISTER, addr);
}
uint32_t Module::writeRegister(uint32_t addr, uint32_t val) {
uint32_t args[]{addr, val};
return sendToDetectorStop<uint32_t>(F_WRITE_REGISTER, args);
void Module::writeRegister(uint32_t addr, uint32_t val, bool validate) {
uint32_t args[]{addr, val, static_cast<uint32_t>(validate)};
return sendToDetectorStop(F_WRITE_REGISTER, args, nullptr);
}
void Module::setBit(uint32_t addr, int n) {
uint32_t args[2] = {addr, static_cast<uint32_t>(n)};
void Module::setBit(uint32_t addr, int n, bool validate) {
uint32_t args[] = {addr, static_cast<uint32_t>(n),
static_cast<uint32_t>(validate)};
sendToDetectorStop(F_SET_BIT, args, nullptr);
}
void Module::clearBit(uint32_t addr, int n) {
uint32_t args[2] = {addr, static_cast<uint32_t>(n)};
void Module::clearBit(uint32_t addr, int n, bool validate) {
uint32_t args[] = {addr, static_cast<uint32_t>(n),
static_cast<uint32_t>(validate)};
sendToDetectorStop(F_CLEAR_BIT, args, nullptr);
}