mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 08:41:16 +00:00
SDK: Make GetDeviceList implementation more readable
This commit is contained in:
parent
d70a203449
commit
388b1be056
|
@ -65,13 +65,15 @@ std::vector<uint64_t> DDSTopology::GetDeviceList()
|
|||
taskIDs.reserve(GetNumRequiredAgents());
|
||||
|
||||
// TODO make sure returned tasks are actually devices
|
||||
dds::topology_api::STopoRuntimeTask::FilterIteratorPair_t taskIt = fImpl->fTopo->getRuntimeTaskIterator([](const dds::topology_api::STopoRuntimeTask::FilterIterator_t::value_type& value) -> bool {
|
||||
return true;
|
||||
});
|
||||
auto itPair = fImpl->fTopo.getRuntimeTaskIterator(
|
||||
[](const dds::topology_api::STopoRuntimeTask::FilterIterator_t::value_type& /*value*/) -> bool { return true; });
|
||||
auto tasks = boost::make_iterator_range(itPair.first, itPair.second);
|
||||
|
||||
for (auto& it = taskIt.first; it != taskIt.second; ++it) {
|
||||
LOG(debug) << "Found task " << it->first << " : " << "Path: " << it->second.m_task->getPath() << "Name: " << it->second.m_task->getName();
|
||||
taskIDs.push_back(it->first);
|
||||
for (auto task : tasks) {
|
||||
LOG(debug) << "Found task " << task.first << ": "
|
||||
<< "Path: " << task.second.m_taskPath << ", "
|
||||
<< "Name: " << task.second.m_task->getName() << "_" << task.second.m_taskIndex;
|
||||
taskIDs.push_back(task.first);
|
||||
}
|
||||
|
||||
return taskIDs;
|
||||
|
|
|
@ -95,7 +95,6 @@ class Topology
|
|||
/// @return The result of the state transition
|
||||
auto ChangeState(TopologyTransition t, Duration timeout = std::chrono::milliseconds(0)) -> ChangeStateResult;
|
||||
|
||||
|
||||
private:
|
||||
DDSSession fDDSSession;
|
||||
DDSTopology fDDSTopo;
|
||||
|
|
Loading…
Reference in New Issue
Block a user