DiffractionExperiment: Store detector module hostname
This commit is contained in:
@@ -16,10 +16,24 @@ void DetectorWrapper::Configure(const JFJochProtoBuf::DetectorConfig &request) {
|
||||
}
|
||||
try {
|
||||
InternalStop();
|
||||
if (request.module_hostname_size() > 0) {
|
||||
if (det.size() != request.module_hostname_size()) {
|
||||
logger.Error("Discrepancy in module number between DAQ and detector");
|
||||
throw JFJochException(JFJochExceptionCategory::Detector,
|
||||
"Discrepancy in module number between DAQ and detector");
|
||||
}
|
||||
std::vector<std::string> module_hostname;
|
||||
for (const auto &iter: request.module_hostname())
|
||||
module_hostname.push_back(iter);
|
||||
logger.Info("Resetting detector module host names");
|
||||
det.setHostname(module_hostname);
|
||||
}
|
||||
|
||||
det.setNumberofUDPInterfaces(2);
|
||||
|
||||
for (int i = 0; i < request.modules_size(); i++) {
|
||||
logger.Info("Configure network for module {}", i);
|
||||
|
||||
auto &cfg = request.modules(i);
|
||||
|
||||
det.setSourceUDPIP(sls::IpAddr(cfg.ipv4_src_addr_1()), {i});
|
||||
|
||||
Reference in New Issue
Block a user