mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
SDK: Track channel to task id association
This commit is contained in:
committed by
Dennis Klein
parent
008be36125
commit
fd282fa950
@@ -75,7 +75,7 @@ Topology::Topology(DDSTopology topo, DDSSession session)
|
||||
// LOG(debug) << "Adding device " << d;
|
||||
fState.emplace(d, DeviceStatus{ false, DeviceState::Ok });
|
||||
}
|
||||
fDDSSession.SubscribeToCommands([this](const std::string& msg, const std::string& /* condition */, uint64_t senderId) {
|
||||
fDDSSession.SubscribeToCommands([this](const std::string& msg, const std::string& /* condition */, DDSChannel::Id senderId) {
|
||||
// LOG(debug) << "Received from " << senderId << ": " << msg;
|
||||
std::vector<std::string> parts;
|
||||
boost::algorithm::split(parts, msg, boost::algorithm::is_any_of(":,"));
|
||||
@@ -85,7 +85,9 @@ Topology::Topology(DDSTopology topo, DDSSession session)
|
||||
}
|
||||
|
||||
if (parts[0] == "state-change") {
|
||||
AddNewStateEntry(std::stoull(parts[2]), parts[3]);
|
||||
DDSTask::Id taskId(std::stoull(parts[2]));
|
||||
fDDSSession.UpdateChannelToTaskAssociation(senderId, taskId);
|
||||
AddNewStateEntry(taskId, parts[3]);
|
||||
} else if (parts[0] == "state-changes-subscription") {
|
||||
LOG(debug) << "Received from " << senderId << ": " << msg;
|
||||
if (parts[2] != "OK") {
|
||||
|
Reference in New Issue
Block a user