RemoteViz::Rendering::NetworkPerformance Class Reference
[RemoteViz]

RemoteViz More...

#include <RemoteViz/Rendering/NetworkPerformance.h>

List of all members.



void enableCalibration (bool val)
bool isCalibrationEnabled () const
void setMaxCalibrationDuration (unsigned int val)
unsigned int getMaxCalibrationDuration () const
unsigned int getBandwidth () const
unsigned int getLatency () const

Detailed Description

RemoteViz

This class manages measures of service quality of the network.

RemoteViz will pass an instance of this class to the methods ServiceListener::onConnectedClient() and ServiceListener::onInitializedClient().

If calibration is enabled (true by default), RemoteViz will measure available network bandwidth and latency when a client first connects to the service (between the onConnectedClient and onInitializedClient calls) and store the values in this object. These measures are used to adjust image quality or frames per second (see ConnectionSettings::setFrameEncodingPolicy). The default implementation of ServiceListener::onInitializedClient() will query the measured bandwidth value (getBandwidth) and call ClientSettings::setBandwidth().

To measure available network bandwidth, RemoteViz has to cause network congestion, which implies that the user is blocked for a period of time. Therefore RemoteViz only measures network bandwidth once for each client, when the client first connects (and only if calibration is enabled). To disable calibration or change the duration of the calibration, implement the ServiceListener::onConnectedClient() method.


Member Function Documentation

void RemoteViz::Rendering::NetworkPerformance::enableCalibration ( bool  val  ) 

Enable or disable network performance calibration.

Default value is true.

If calibration is enabled, a measurement of the latency and bandwidth is performed after the first connection establishment and before sending frames. If calibration is disabled, the estimated bandwidth and latency will be 0. It is better to reduce the calibration time rather than disable completely.

Parameters:
val : true to enable, false to disable
See also:
ServiceListener::onConnectedClient
unsigned int RemoteViz::Rendering::NetworkPerformance::getBandwidth (  )  const

Gets the estimated network bandwidth between the service and the client.

Default is 0 when the object is first created, but RemoteViz will set this value if network calibration is enabled.

This value influences the quality and the number of interactive frames sent to the client (see ConnectionSettings::setFrameEncodingPolicy). The higher the value, the better the quality and the number of interactive frames. This value is estimated during the network calibration step (if enabled).

Returns:
the network bandwidth in bit per seconds
unsigned int RemoteViz::Rendering::NetworkPerformance::getLatency (  )  const

Gets the estimated network latency (round-trip time) between the service and the client.

Default is 0 when the object is first created, but RemoteViz will set this value if network calibration is enabled.

This value influences the quality of interactions. The lower the value, the better the user interactions. This value is estimated during the network calibration step (if enabled).

Returns:
the network latency in milliseconds
unsigned int RemoteViz::Rendering::NetworkPerformance::getMaxCalibrationDuration (  )  const

Gets the network performance calibration maximum duration in milliseconds.

Default value is 5 seconds. Frames will be send to the client after this duration.

Returns:
the calibration maximum duration in milliseconds
bool RemoteViz::Rendering::NetworkPerformance::isCalibrationEnabled (  )  const

Return if the network performance calibration is enabled.

Default is true.

Returns:
true if enabled, false if disabled
void RemoteViz::Rendering::NetworkPerformance::setMaxCalibrationDuration ( unsigned int  val  ) 

Sets the network performance calibration maximum duration in milliseconds.

Default value is 5 seconds. Frames will be send to the client after this duration. Reducing calibration time reduces the accuracy of the measurements.

Parameters:
val : max calibration duration in milliseconds

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/