Minor fixes to dacnames

This commit is contained in:
Erik Frojdh 2022-03-28 14:39:31 +02:00
commit 66900da476
3 changed files with 5 additions and 4 deletions

View File

@ -1146,6 +1146,9 @@ std::string CmdProxy::DacList(const int action) {
throw sls::RuntimeError("This detector already has fixed dac "
"names. Cannot change them.");
}
if (det_id != -1) {
throw sls::RuntimeError("Cannot configure dacnames at module level");
}
if (args.size() != 18) {
WrongNumberOfParameters(18);
}

View File

@ -388,7 +388,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
const int detectorIndex{0};
sls::SharedMemory<sharedDetector> shm{0, -1};
sls::SharedMemory<CtbConfig> ctb_shm{0, -1, "a"};
sls::SharedMemory<CtbConfig> ctb_shm{0, -1, CtbConfig::shm_tag()};
std::vector<std::unique_ptr<sls::Module>> modules;
/** data streaming (down stream) enabled in client (zmq sckets created) */

View File

@ -126,10 +126,8 @@ template <typename T> class SharedMemory {
RemoveSharedMemory();
throw SharedMemoryError(msg);
}
// int *pInt = new (buf) int(3);
shared_struct = MapSharedMemory();
new (shared_struct) T{}; // is this ok?
new (shared_struct) T{};
LOG(logINFO) << "Shared memory created " << name;
}