00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <Inventor/sys/port.h>
00024 #include <memory>
00025
00026 namespace RemoteViz
00027 {
00028 namespace Rendering
00029 {
00030
00031 class MonitoringImpl;
00032 class MetricsListener;
00033
00047 class RENDERSERVICE_API Monitoring
00048 {
00050 friend class ServiceSettingsImpl;
00051 friend class ConnectionImpl;
00052 friend class ServiceImpl;
00053 friend class RenderAreaImpl;
00056 public:
00060 enum MetricType
00061 {
00063 NONE = 0x00,
00065 NETWORK_LATENCY = 0x1,
00067 DECODING_TIME = 0x2,
00069 RENDERING_TIME = 0x4,
00071 ENCODING_TIME = 0x8,
00073 NUM_CLIENTS = 0x10,
00075 NUM_CONNECTIONS = 0x20,
00077 NUM_RENDERAREAS = 0x40,
00079 ALL = 0xFFFF
00080 };
00081
00087 void addListener(std::shared_ptr<MetricsListener> listener);
00088
00094 void removeListener(std::shared_ptr<MetricsListener> listener);
00095
00099 unsigned int getNumListeners() const;
00100
00108 void enableMetrics( unsigned int mask );
00109
00117 bool isMetricEnabled( MetricType metric ) const;
00118
00119 private:
00122 std::shared_ptr<MonitoringImpl> getImpl() const;
00125 private:
00127 Monitoring();
00128
00130 std::shared_ptr<MonitoringImpl> pImpl;
00131 };
00132 }
00133 }
00134