wip, master attributes
Build on RHEL9 docker image / build (push) Successful in 4m35s
Build on RHEL8 docker image / build (push) Successful in 5m18s
Run Simulator Tests on local RHEL9 / build (push) Failing after 5m59s
Run Simulator Tests on local RHEL8 / build (push) Failing after 7m45s

This commit is contained in:
2026-05-11 17:24:50 +02:00
parent 1608559b4b
commit c9793129db
7 changed files with 98 additions and 1 deletions
@@ -222,6 +222,8 @@ int ClientInterface::functionTable(){
flist[F_RECEIVER_GET_ROI_METADATA] = &ClientInterface::get_roi_metadata;
flist[F_SET_RECEIVER_READOUT_SPEED] = &ClientInterface::set_readout_speed;
flist[F_RECEIVER_GET_UDP_DATASTREAM] = &ClientInterface::get_port_udp_datastream;
flist[F_RECEIVER_UDP_DATASTREAM_METADATA]= &ClientInterface::update_udp_datastream_metadata;
for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) {
LOG(logDEBUG1) << "function fnum: " << i << " (" <<
@@ -1916,4 +1918,36 @@ int ClientInterface::set_readout_speed(Interface &socket) {
return socket.Send(OK);
}
int ClientInterface::update_udp_datastream_metadata(Interface &socket) {
auto nports = socket.Receive<int>();
if (nports != 2) {
throw RuntimeError("Could not update udp datastream meatdata. "
"Expecting max number of ports to be 2. Received " +
std::to_string(nports));
}
auto nmods = socket.Receive<int>();
if (nmods < 1) {
throw RuntimeError("Could not update udp datastream metadata. "
"Expecting at least 1 module. Received " +
std::to_string(nmods));
}
std::array<std::vector<int>, 2> portEnables;
for (auto &v : portEnables) {
v.resize(nmods);
}
socket.Receive(portEnables[0]);
socket.Receive(portEnables[1]);
LOG(logDEBUG1) << "Update UDP Datastream Metadata";
LOG(logDEBUG1) << "Port 1:" << ToString(portEnables[0]);
LOG(logDEBUG1) << "Port 2:" << ToString(portEnables[1]);
verifyIdle(socket);
try {
impl()->updateUDPDatastreamMetadata(portEnables);
} catch (const std::exception &e) {
throw RuntimeError("Could not update UDP datastream metadata [" +
std::string(e.what()) + ']');
}
return socket.Send(OK);
}
} // namespace sls