This commit is contained in:
2021-07-15 14:48:41 +02:00
parent 8354395f64
commit 4d7fb4e4e0
6 changed files with 64 additions and 45 deletions

View File

@ -1825,20 +1825,21 @@ std::string CmdProxy::VetoStreaming(int action) {
if (args.empty()) {
WrongNumberOfParameters(1);
}
defs::EthernetInterface interface = defs::EthernetInterface::none;
defs::EthernetInterface interface = defs::EthernetInterface::NONE;
for (const auto &arg : args) {
if (arg == "none") {
if (args.size() > 1) {
throw sls::RuntimeError(
"cannot have other arguments with 'none'. args: " +
arg);
ToString(args));
}
break;
}
StringTo<defs::EthernetInterface>(arg);
interface = interface | (StringTo<defs::EthernetInterface>(arg));
}
det->setVetoStream(interface, std::vector<int>{det_id});
os << ToString(args) << '\n';
os << ToString(interface) << '\n';
} else {
throw sls::RuntimeError("Unknown action");
}

View File

@ -1549,7 +1549,9 @@ void Detector::setVeto(bool enable, Positions pos) {
Result<defs::EthernetInterface> Detector::getVetoStream(Positions pos) const {
// return pimpl->Parallel(&Module::getVetoStream, pos);
return Result<defs::EthernetInterface> res{in_};
Result<defs::EthernetInterface> res(1);
res[0] = in_;
return res;
}
void Detector::setVetoStream(defs::EthernetInterface interface, Positions pos) {