wip, udp port enable metadata in client, to:receiver, zmq streaming
Build on RHEL9 docker image / build (push) Successful in 3m37s
Run Simulator Tests on local RHEL9 / build (push) Failing after 3m57s
Build on RHEL8 docker image / build (push) Successful in 4m53s
Run Simulator Tests on local RHEL8 / build (push) Failing after 5m36s

This commit is contained in:
2026-05-08 14:29:28 +02:00
parent 895439b01b
commit 4bfc0476b0
8 changed files with 91 additions and 0 deletions
+35
View File
@@ -1434,6 +1434,41 @@ void Module::setDataStream(const portPosition port, const bool enable) {
}
}
void Module::updateRxUDPDatastreamMetadata(
const std::array<std::vector<bool>, 2> &res) {
if (!shm()->useReceiverFlag) {
return;
}
LOG(logDEBUG) << "Updating UDP data stream enable in receiver (metadata)";
auto client = ReceiverSocket(shm()->rxHostname, shm()->rxTCPPort);
client.Send(F_RECEIVER_UDP_DATASTREAM_METADATA);
client.setFnum(F_RECEIVER_UDP_DATASTREAM_METADATA);
// ensure both port list size match
if (res[0].size() != res[1].size()) {
throw RuntimeError(
"Size Mismatch of udp datastream enable list for ports");
}
// send udp data stream enable of all ports in all modules
auto nports = static_cast<int>(res.size());
auto nmods = static_cast<int>(res[0].size());
client.Send(nports);
client.Send(nmods);
for (const auto &r : res) {
// convert vector of bool to vector of int to send
std::vector<int> tmp;
tmp.reserve(r.size());
for (bool b : r) {
tmp.push_back(static_cast<int>(b));
}
client.Send(tmp);
}
if (client.Receive<int>() == FAIL) {
throw ReceiverError("Receiver " + std::to_string(moduleIndex) +
" returned error: " + client.readErrorMessage());
}
}
// Receiver Config
bool Module::getUseReceiverFlag() const { return shm()->useReceiverFlag; }