YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
informationdialog.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: GPL-3.0-or-later
4 */
5
6#include "informationdialog.h"
7#include "ui_informationdialog.h"
9
11 QDialog(parent),
12 ui(new Ui::InformationDialog)
13{
14 ui->setupUi(this);
15 ui->treeWidgetProperty->setStyleSheet("QTreeWidget::item { border-right: 1px dotted grey;}");
16 ui->treeWidgetProperty->setSelectionMode(QAbstractItemView::NoSelection);
17}
18
23
24Ui::InformationDialog* InformationDialog::getUi() {
25 return ui;
26}
27
29 QTreeWidgetItem* item;
30 QStringList prop;
31 prop.clear();
32 prop.append("Name");
33 prop.append(vertex->property.find("name").asString().c_str());
34 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
35
36 prop.clear();
37 prop.append("Arguments");
38 prop.append(vertex->property.find("arguments").asString().c_str());
39 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
40
41 prop.clear();
42 prop.append("Hostname");
43 prop.append(vertex->property.find("hostname").asString().c_str());
44 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
45
46 prop.clear();
47 prop.append("Operating system");
48 prop.append(vertex->property.find("os").asString().c_str());
49 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
50
51 prop.clear();
52 prop.append("PID");
53 prop.append(QString::number(vertex->property.find("pid").asInt32()));
54 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
55
56 prop.clear();
57 prop.append("Priority");
58 prop.append(QString::number(vertex->property.find("priority").asInt32()));
59 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
60
61 prop.clear();
62 prop.append("Policy");
63 prop.append(QString::number(vertex->property.find("policy").asInt32()));
64 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
65
66 YARP_UNUSED(item);
67}
68
69
71 QTreeWidgetItem* item;
72 QStringList prop;
73 prop.clear();
74 prop.append("Name");
75 prop.append(vertex->property.find("name").asString().c_str());
76 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
77
78 prop.clear();
79 prop.append("Type");
80 prop.append(vertex->property.find("dir").asString().c_str());
81 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
82
83 YARP_UNUSED(item);
84
85}
86
88 QTreeWidgetItem* item;
89 std::string from = edge->first().property.find("name").asString();
90 std::string to = edge->second().property.find("name").asString();
91
92 QStringList prop;
93 prop.clear();
94 prop.append("Source");
95 prop.append(from.c_str());
96 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
97
98 prop.clear();
99 prop.append("Destination");
100 prop.append(to.c_str());
101 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
102
103 prop.clear();
104 prop.append("Carrier");
105 prop.append(edge->property.find("carrier").asString().c_str());
106 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
107
108 if(edge->property.check("FromPacketPriority")) {
109 // source
111 (yarp::os::QosStyle::PacketPriorityLevel)edge->property.find("FromPacketPriority").asInt32();
112 prop.clear();
113 prop.append("Source packet priority");
114 prop.append(yarp::profiler::NetworkProfiler::packetPrioToString(level).c_str());
115 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
116 prop.clear();
117 prop.append("Source thread priority");
118 prop.append(QString::number(edge->property.find("FromThreadPriority").asInt32()));
119 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
120
121 prop.clear();
122 prop.append("Source thread policy");
123 prop.append(QString::number(edge->property.find("FromThreadPolicy").asInt32()));
124 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
125
126 // destination
127 level = (yarp::os::QosStyle::PacketPriorityLevel)edge->property.find("ToPacketPriority").asInt32();
128 prop.clear();
129 prop.append("Destination packet priority");
130 prop.append(yarp::profiler::NetworkProfiler::packetPrioToString(level).c_str());
131 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
132 prop.clear();
133 prop.append("Destination thread priority");
134 prop.append(QString::number(edge->property.find("ToThreadPriority").asInt32()));
135 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
136
137 prop.clear();
138 prop.append("Destination thread policy");
139 prop.append(QString::number(edge->property.find("FromThreadPolicy").asInt32()));
140 item = new QTreeWidgetItem( ui->treeWidgetProperty, prop);
141 }
142
143 YARP_UNUSED(item);
144}
void setEdgeInfo(yarp::profiler::graph::Edge *edge)
void setPortVertexInfo(yarp::profiler::graph::PortVertex *vertex)
Ui::InformationDialog * getUi()
InformationDialog(QWidget *parent=0)
void setProcessVertexInfo(yarp::profiler::graph::ProcessVertex *vertex)
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
PacketPriorityLevel
The PacketPriorityLevel defines the packets quality of service (priority) levels.
Definition QosStyle.h:30
virtual std::int32_t asInt32() const
Get 32-bit integer value.
Definition Value.cpp:204
virtual std::string asString() const
Get string value.
Definition Value.cpp:234
static std::string packetPrioToString(yarp::os::QosStyle::PacketPriorityLevel level)
The yarp::profiler::graph::Edge class.
Definition Graph.h:45
const yarp::profiler::graph::Vertex & second() const
Definition Graph.cpp:44
yarp::os::Property property
Definition Graph.h:61
const yarp::profiler::graph::Vertex & first() const
Definition Graph.cpp:40
yarp::os::Property property
Definition Graph.h:89
Definition aboutdlg.h:11
#define YARP_UNUSED(var)
Definition api.h:162