Skip to content

Commit

Permalink
[app] ecalmon layer detection logic (#1568)
Browse files Browse the repository at this point in the history
ecalmon_gui / tui layer detection improved
  • Loading branch information
rex-schilasky authored Apr 26, 2024
1 parent 1acd2ee commit 20b2f55
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
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

0 comments on commit 20b2f55

Please sign in to comment.