15#include <yarp/companion/impl/Companion.h>
28 if (NetworkProfiler::progCallback) {
72 if(NetworkProfiler::progCallback) {
92 yWarning() <<
"Found a nonexistent port (" <<
cnn.port_name <<
")"
93 <<
"in the output list of" << (*vi1)->property.find(
"name").asString();
97 if(NetworkProfiler::progCallback) {
101 if (NetworkProfiler::progCallback) {
102 NetworkProfiler::progCallback->
onProgress(100);
112 for(itr = vertices.begin(); itr!=vertices.end(); itr++) {
121 mv1->property.find(
"hostname").asString());
122 mv2->property =
mv1->property;
128 for(itr = vertices.begin(); itr!=vertices.end(); itr++) {
136 pv1->property.find(
"hostname").asString());
137 pv2->property =
pv1->property;
142 for(itr = vertices.begin(); itr!=vertices.end(); itr++) {
150 const Edge&
e = (*eitr);
156 const Vertex&
p2 = (*peitr).second();
158 std::string label =
p1.property.find(
"name").asString();
159 label.append(
" - ").append(
p2.property.find(
"name").asString());
160 prop.
put(
"label", label);
161 subgraph.insertEdge(*v1,
p2.outEdges()[0].second(), prop);
199 if (level ==
"NORMAL") {
202 if (level ==
"LOW") {
205 if (level ==
"HIGH") {
208 if (level ==
"CRITIC") {
211 if (level ==
"INVALID") {
222 for(itr = vertices.begin(); itr!=vertices.end(); itr++) {
223 const Vertex &v1 = (**itr);
224 for(
const auto& i : v1.
outEdges()) {
255 yError() <<
"Cannot attach the portmonitor plug-in to" << portName;
265 yError() <<
"Cannot detach the portmonitor plug-in from" << portName;
276 yError() <<
"Cannot write to" << portName;
280 yError() <<
"Cannot set the portmonitor parameters of" << portName <<
":" << result.
message;
291 yError() <<
"Cannot write to" << portName;
295 yError() <<
"Cannot get the portmonitor parameters of" << portName <<
":" << result.
message;
edge_set::const_iterator edge_const_iterator
pvertex_set::const_iterator pvertex_const_iterator
std::vector< yarp::profiler::graph::Vertex * > pvertex_set
pvertex_set::iterator pvertex_iterator
std::vector< yarp::profiler::graph::Edge > edge_set
A simple collection of objects that can be described and transmitted in a portable way.
void fromString(const std::string &text)
Initializes bottle from a string.
Bottle & addList()
Places an empty nested list in the bottle, at the end of the list.
void clear()
Empties the bottle of any objects it contains.
A mini-server for performing network communication in the background.
static bool getConnectionQos(const std::string &src, const std::string &dest, QosStyle &srcStyle, QosStyle &destStyle, bool quiet=true)
Gets the Qos preferences of a connection.
virtual bool attachPortmonitorIn(const std::string &prop)
Attach a portmonitor plug-in to the input of this port (it replaces the one previously attached,...
virtual return_setPortmonitorParams setPortmonitorParamsIn(const std::string ¶ms)
Set the parameters of the portmonitor plug-in attached to the input of this port.
virtual return_getPortmonitorParams getPortmonitorParamsIn()
Get the parameters of the portmonitor plug-in attached to the input of this port.
virtual bool detachPortmonitorIn()
Detach the portmonitor plug-in from the input of this port.
A class for storing options and configuration information.
Value & find(const std::string &key) const override
Gets a value corresponding to a given keyword.
std::string toString() const override
Return a standard text representation of the content of the object.
void put(const std::string &key, const std::string &value)
Associate the given key with the given string.
bool check(const std::string &key) const override
Check if there exists a property of the given name.
Preferences for the port's Quality of Service.
PacketPriorityLevel
The PacketPriorityLevel defines the packets quality of service (priority) levels.
virtual std::string asString() const
Get string value.
Client side of the administrative commands defined in PortCoreMsgs.thrift and handled by PortCore::ad...
Reply of PortCoreMsgs::getPortmonitorParamsIn() and PortCoreMsgs::getPortmonitorParamsOut().
Reply of PortCoreMsgs::setPortmonitorParamsIn() and PortCoreMsgs::setPortmonitorParamsOut().
ports_detail_set::iterator ports_detail_iterator
std::vector< PortDetails > ports_detail_set
virtual void onProgress(unsigned int percentage)
static bool getPortmonitorParams(std::string portName, yarp::os::Bottle ¶m)
static std::string packetPrioToString(yarp::os::QosStyle::PacketPriorityLevel level)
static bool attachPortmonitorPlugin(std::string portName, yarp::os::Property pluginProp)
static bool updateConnectionQosStatus(yarp::profiler::graph::Graph &graph)
static bool setPortmonitorParams(std::string portName, yarp::os::Property ¶m)
static yarp::os::QosStyle::PacketPriorityLevel packetStringToPrio(std::string level)
static bool creatNetworkGraph(ports_detail_set details, yarp::profiler::graph::Graph &graph)
creatNetworkGraph
static bool creatSimpleModuleGraph(yarp::profiler::graph::Graph &graph, yarp::profiler::graph::Graph &subgraph)
static bool detachPortmonitorPlugin(std::string portName)
The yarp::profiler::graph::Edge class.
const yarp::profiler::graph::Vertex & second() const
yarp::os::Property property
The yarp::profiler::graph::Graph class.
void insertEdge(const Vertex &v1, const Vertex &v2, const yarp::os::Property &property="")
const pvertex_set & vertices()
const pvertex_iterator find(const Vertex &v1)
pvertex_iterator insert(const Vertex &vertex)
bool setOwner(yarp::profiler::graph::Vertex *_owner)
The yarp::profiler::graph::Vertex class.
yarp::os::Property property
const edge_set & outEdges() const
An interface to the operating system, including Port based communication.