mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-16 23:07:13 +02:00
rx_hostname can be added with port and also concatenated
This commit is contained in:
@ -656,6 +656,23 @@ void Detector::setRxHostname(const std::string &receiver, Positions pos) {
|
||||
pimpl->Parallel(&Module::setReceiverHostname, pos, receiver);
|
||||
}
|
||||
|
||||
void Detector::setRxHostname(const std::vector<std::string> &name) {
|
||||
// set all to same rx_hostname
|
||||
if (name.size() == 1) {
|
||||
pimpl->Parallel(&Module::setReceiverHostname, {}, name[0]);
|
||||
} else {
|
||||
if ((int)name.size() != size()) {
|
||||
throw RuntimeError("Receiver hostnames size " +
|
||||
std::to_string(name.size()) + " does not match detector size " +
|
||||
std::to_string(size()));
|
||||
}
|
||||
// set each rx_hostname
|
||||
for (int idet = 0; idet < size(); ++idet) {
|
||||
pimpl->Parallel(&Module::setReceiverHostname, {idet}, name[idet]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Result<int> Detector::getRxPort(Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getReceiverPort, pos);
|
||||
}
|
||||
|
Reference in New Issue
Block a user