Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Monitoring.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2021 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/sys/port.h>
24#include <memory>
25
26namespace RemoteViz
27{
28 namespace Rendering
29 {
30
31 class MonitoringImpl;
32 class MetricsListener;
33
50 class RENDERSERVICE_API Monitoring
51 {
53 friend class ServiceSettingsImpl;
54 friend class ConnectionImpl;
55 friend class ServiceImpl;
56 friend class RenderAreaImpl;
59 public:
64 {
66 NONE = 0x00,
68 NETWORK_LATENCY = 0x1, // 2^0, bit 0
70 DECODING_TIME = 0x2, // 2^1, bit 1
72 RENDERING_TIME = 0x4, // 2^2, bit 2
74 ENCODING_TIME = 0x8, // 2^3, bit 3
76 NUM_CLIENTS = 0x10, // 2^4, bit 4
78 NUM_CONNECTIONS = 0x20, // 2^5, bit 5
80 NUM_RENDERAREAS = 0x40, // 2^6, bit 6
82 ALL = 0xFFFF
83 };
84
90 void addListener(std::shared_ptr<MetricsListener> listener);
91
97 void removeListener(std::shared_ptr<MetricsListener> listener);
98
102 unsigned int getNumListeners() const;
103
111 void enableMetrics( unsigned int mask );
112
120 bool isMetricEnabled( MetricType metric ) const;
121
122 private:
125 std::shared_ptr<MonitoringImpl> getImpl() const;
128 private:
130 Monitoring();
131
133 std::shared_ptr<MonitoringImpl> pImpl;
134 };
135 }
136}
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition Monitoring.h:51
void addListener(std::shared_ptr< MetricsListener > listener)
Adds a listener for metrics.
void enableMetrics(unsigned int mask)
Enable metrics By default, all metrics are disabled.
bool isMetricEnabled(MetricType metric) const
Check if a metric is enabled.
void removeListener(std::shared_ptr< MetricsListener > listener)
Removes a listener for metrics.
unsigned int getNumListeners() const
Return the number of listeners.