Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[app] ecalmon layer detection logic #1568

Merged
merged 2 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,22 +209,25 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
for (const auto& layer : layer_pb)
{
QString this_layer_string;
switch (layer.type())
if (layer.confirmed())
{
case eCAL::pb::eTLayerType::tl_ecal_tcp:
this_layer_string = "tcp";
break;
case eCAL::pb::eTLayerType::tl_ecal_udp_mc:
this_layer_string = "udp_mc";
break;
case eCAL::pb::eTLayerType::tl_ecal_shm:
this_layer_string = "shm";
break;
case eCAL::pb::eTLayerType::tl_all:
this_layer_string = "all";
break;
default:
this_layer_string = ("Unknown (" + QString::number((int)layer.type()) + ")");
switch (layer.type())
{
case eCAL::pb::eTLayerType::tl_ecal_tcp:
this_layer_string = "tcp";
break;
case eCAL::pb::eTLayerType::tl_ecal_udp_mc:
this_layer_string = "udp_mc";
break;
case eCAL::pb::eTLayerType::tl_ecal_shm:
this_layer_string = "shm";
break;
case eCAL::pb::eTLayerType::tl_all:
this_layer_string = "all";
break;
default:
this_layer_string = ("Unknown (" + QString::number((int)layer.type()) + ")");
}
}

if (!layer_string.isEmpty() && !this_layer_string.isEmpty())
Expand Down
5 changes: 4 additions & 1 deletion app/mon/mon_tui/src/model/monitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,10 @@ class MonitorModel
topic.type_descriptor = std::move(*t.mutable_tdatatype()->mutable_desc());
for(auto &tl: t.tlayer())
{
topic.transport_layers.emplace_back(TopicTransportLayer(tl.type()));
if (tl.confirmed())
{
topic.transport_layers.emplace_back(TopicTransportLayer(tl.type()));
}
}
topic.size = t.tsize();
topic.local_connections_count = t.connections_loc();
Expand Down
Loading