sdk: Add DDSTopology::GetCollections() and extend DDSTask

This commit is contained in:
Alexey Rybalchenko
2019-09-05 14:35:09 +02:00
committed by Dennis Klein
parent 456b65871a
commit e1b6b804bd
4 changed files with 34 additions and 6 deletions

View File

@@ -80,10 +80,31 @@ auto DDSTopology::GetTasks() const -> std::vector<DDSTask>
auto tasks = boost::make_iterator_range(itPair.first, itPair.second);
for (const auto& task : tasks) {
LOG(debug) << "Found task " << task.first << ": "
LOG(debug) << "Found task with id: " << task.first << ", "
<< "Path: " << task.second.m_taskPath << ", "
<< "Collection id: " << task.second.m_taskCollectionId << ", "
<< "Name: " << task.second.m_task->getName() << "_" << task.second.m_taskIndex;
list.emplace_back(task.first);
list.emplace_back(task.first, task.second.m_taskCollectionId);
}
return list;
}
auto DDSTopology::GetCollections() const -> std::vector<DDSCollection>
{
std::vector<DDSCollection> list;
auto itPair = fImpl->fTopo.getRuntimeCollectionIterator(
[](const dds::topology_api::STopoRuntimeCollection::FilterIterator_t::value_type&) -> bool {
return true;
});
auto collections = boost::make_iterator_range(itPair.first, itPair.second);
for (const auto& c : collections) {
LOG(debug) << "Found collection with id: " << c.first << ", "
<< "Index: " << c.second.m_collectionIndex << ", "
<< "Path: " << c.second.m_collectionPath;
list.emplace_back(c.first);
}
return list;