Main Page | Class List | Directories | File List | Class Members

RNReplicaNet::NetworkEmulation Class Reference

#include <NetworkEmulation.h>

List of all members.

Public Types

enum  ConnectionTypes {
  kPerfect = 0, kModem28k, kModem56k, kDSL512MB_Down128Up,
  kLAN
}

Static Public Member Functions

static void SetEnabled (const bool enable=false)
static bool GetEnabled (void)
static void SetConnection (const ConnectionTypes type=kPerfect, const bool enable=true)
static void SetPacketLoss (const float percent=0)
static float GetPacketLoss (void)
static void SetMaximumOutputBandwidth (const int bytesPerSecond=0)
static int GetMaximumOutputBandwidth (void)
static void SetMaximumInputBandwidth (const int bytesPerSecond=0)
static int GetMaximumInputBandwidth (void)
static void SetAverageLatency (const float milliSeconds=0.0f)
static float GetAverageLatency (void)
static void SetJitter (const float milliSeconds=0.0f)
static float GetJitter (void)


Detailed Description

NetworkEmulation allows various emulated network settings to be changed to allow the user to test their application with emulated packet loss, latency, jitter and bandwidth controls.
This class is a static access class.


Member Enumeration Documentation

enum RNReplicaNet::NetworkEmulation::ConnectionTypes
 

Enumeration for the SetConnection function for standard types of connection

Enumeration values:
kPerfect  No packet loss, latency or bandwidth impairment.
kModem28k  Simulates a 28k analogue modem
kModem56k  Simulates a 56k analogue modem
kDSL512MB_Down128Up  Simulates a common type of DSL connection
kLAN  Simulates a LAN network


Member Function Documentation

static float RNReplicaNet::NetworkEmulation::GetAverageLatency void   )  [static]
 

Reads the configuration value set by SetAverageLatency()

Returns:
the configured value

static bool RNReplicaNet::NetworkEmulation::GetEnabled void   )  [static]
 

Allows the network emulation activation status to be read

Returns:
true is the network emulation is enabled

static float RNReplicaNet::NetworkEmulation::GetJitter void   )  [static]
 

Reads the configuration value set by SetJitter()

Returns:
the configured value

static int RNReplicaNet::NetworkEmulation::GetMaximumInputBandwidth void   )  [static]
 

Reads the configuration value set by GetMaximumInputBandwidth().

Returns:
the configured value

static int RNReplicaNet::NetworkEmulation::GetMaximumOutputBandwidth void   )  [static]
 

Reads the configuration value set by SetMaximumOutputBandwidth()

Returns:
the configured value

static float RNReplicaNet::NetworkEmulation::GetPacketLoss void   )  [static]
 

This allows the configured emulated packet loss to be read.

Returns:
the emulated packet loss value

static void RNReplicaNet::NetworkEmulation::SetAverageLatency const float  milliSeconds = 0.0f  )  [static]
 

Sets the average packet latency, this is half round trip time.

Parameters:
milliSeconds the latency in seconds. So setting this to be 0.1f will mean a packet latency of 100ms is used. The default value is 0 meaning there is no latency.

static void RNReplicaNet::NetworkEmulation::SetConnection const ConnectionTypes  type = kPerfect,
const bool  enable = true
[static]
 

Allows the network emulation parameters to be set quickly for various standard testing types

Parameters:
type the type of connection to emulate
enable enable or disable the emulation

static void RNReplicaNet::NetworkEmulation::SetEnabled const bool  enable = false  )  [static]
 

Allows the network emulation to be turned on or off

Parameters:
enable set this to be true or false to turn on or off the network emulation. The default is false.

static void RNReplicaNet::NetworkEmulation::SetJitter const float  milliSeconds = 0.0f  )  [static]
 

Allows the amount by which the latency value can fluctuate

Parameters:
milliSeconds the jitter in seconds. So setting this to be 0.05f and latency to 0.1f will mean a packet latency of 50ms to 150ms (100ms +-50ms) can be used. The default value is 0 meaning there is no jitter.

static void RNReplicaNet::NetworkEmulation::SetMaximumInputBandwidth const int  bytesPerSecond = 0  )  [static]
 

Sets the maximum input bandwidth for emulation.

Parameters:
bytesPerSecond the bandwidth in bytes per second. The default value is 0 meaning there is no limit.

static void RNReplicaNet::NetworkEmulation::SetMaximumOutputBandwidth const int  bytesPerSecond = 0  )  [static]
 

Sets the maximum output bandwidth for emulation.

Parameters:
bytesPerSecond the bandwidth in bytes per second. The default value is 0 meaning there is no limit.

static void RNReplicaNet::NetworkEmulation::SetPacketLoss const float  percent = 0  )  [static]
 

This sets the emulated packet loss for the network layer.

Parameters:
percent Sets the emulated packet loss level where percent is any value from 0 to 100 percent packet loss. The default value is 0 meaning no packet loss.


The documentation for this class was generated from the following file:
Generated on Sun Oct 30 01:12:17 2005 for XPURL by  doxygen 1.4.1