YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
NetworkProfiler.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_PROFILER_NETWORK_PROFILER_H
7#define YARP_PROFILER_NETWORK_PROFILER_H
8
9#include <string>
10#include <sstream>
11#include <iostream>
12#include <vector>
13
15#include <yarp/profiler/Graph.h>
16#include <yarp/os/Network.h>
17#include <yarp/os/LogStream.h>
18#include <yarp/os/Bottle.h>
19
20
21namespace yarp::profiler {
22
24{
25public:
26
28 {
29 public:
30 virtual ~ProgressCallback() { }
31 virtual void onProgress(unsigned int percentage) { }
32 };
33
41
43
44 static void setProgressCallback(ProgressCallback* callback) {
45 progCallback = callback;
46 }
47
49
52
53 static bool attachPortmonitorPlugin(std::string portName, yarp::os::Property pluginProp);
54 static bool detachPortmonitorPlugin(std::string portName);
55 static bool setPortmonitorParams(std::string portName, yarp::os::Property& param);
56 static bool getPortmonitorParams(std::string portName, yarp::os::Bottle &param);
57
58private:
59 static ProgressCallback* progCallback;
60
61};
62
63} // namespace yarp::profiler
64
65
66#endif //YARP_PROFILER_NETWORK_PROFILER_H
A simple collection of objects that can be described and transmitted in a portable way.
Definition Bottle.h:64
A class for storing options and configuration information.
Definition Property.h:33
PacketPriorityLevel
The PacketPriorityLevel defines the packets quality of service (priority) levels.
Definition QosStyle.h:30
std::vector< PortDetails > ports_detail_set
virtual void onProgress(unsigned int percentage)
static bool getPortmonitorParams(std::string portName, yarp::os::Bottle &param)
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 &param)
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)
static void setProgressCallback(ProgressCallback *callback)
The yarp::profiler::graph::Graph class.
Definition Graph.h:104