Photon Fusion 2.0.3

Public Member Functions | Public Attributes | List of all members
NetworkSimulationConfiguration Class Reference

Configuration for network conditions simulation (induced latency and loss). More...

Inherits IConfigurationSanityCheck.

Public Member Functions

NetworkSimulationConfiguration Clone ()
 Creates a copy of this NetworkSimulationConfiguration. More...
 
NetConfigSimulation Create ()
 Creates a new NetConfigSimulation based on the current configuration. More...
 
void SanityCheck ()
 

Public Attributes

double AdditionalJitter = 0.05
 After the delay value from the DelayShape oscillator is determined, random 0 to this value of additional seconds be added to the packet latency. More...
 
double AdditionalLoss = 0
 After the LossChanceShape oscillation loss chance is calculated, an additional random value of 0 to this (normalized) percentage of loss chance is added. More...
 
double DelayMax = 0.15
 The highest packet delay value returned from the DelayShape oscillator. More...
 
double DelayMin = 0.15
 The lowest packet delay value returned from the DelayShape oscillator. More...
 
double DelayPeriod = 0
 The period of the DelayShape oscillator (the rate at which delay oscillates in seconds). More...
 
NetConfigSimulationOscillator.WaveShape DelayShape = NetConfigSimulationOscillator.WaveShape.Noise
 The pattern used to oscillate between DelayMin and DelayMax values. More...
 
double DelayThreshold = 0
 The DelayShape oscillates between 0 and 1. Values below this threshold are reduced to zero, resulting in a value equal to DelayMin. More...
 
bool Enabled
 If adverse network conditions are being simulated. More...
 
double LossChanceMax = 0.05
 The highest loss chance value the LossChanceShape oscillator will produce. 0 = 0% chance of being lost. 1 = 100% chance of being lost. More...
 
double LossChanceMin = 0.05
 The lowest loss chance value the LossChanceShape oscillator will produce. 0 = 0% chance of being lost. 1 = 100% chance of being lost. More...
 
double LossChancePeriod = 0
 The period of the LossChanceShape oscillator (the rate at which delay oscillates between LossChanceMin and LossChanceMax). More...
 
NetConfigSimulationOscillator.WaveShape LossChanceShape = NetConfigSimulationOscillator.WaveShape.Noise
 The pattern used to oscillate between LossChanceMin and LossChanceMax values. More...
 
double LossChanceThreshold = 0
 The LossChanceShape wave oscillates between 0 and 1. Values below this threshold are reduced to zero, resulting in a value equal to LossChanceMin. More...
 

Detailed Description

Configuration for network conditions simulation (induced latency and loss).

Member Function Documentation

◆ Clone()

Creates a copy of this NetworkSimulationConfiguration.

◆ Create()

NetConfigSimulation Create ( )

Creates a new NetConfigSimulation based on the current configuration.

Returns
A new NetConfigSimulation based on the current configuration.

Member Data Documentation

◆ AdditionalJitter

double AdditionalJitter = 0.05

After the delay value from the DelayShape oscillator is determined, random 0 to this value of additional seconds be added to the packet latency.

◆ AdditionalLoss

double AdditionalLoss = 0

After the LossChanceShape oscillation loss chance is calculated, an additional random value of 0 to this (normalized) percentage of loss chance is added.

◆ DelayMax

double DelayMax = 0.15

The highest packet delay value returned from the DelayShape oscillator.

◆ DelayMin

double DelayMin = 0.15

The lowest packet delay value returned from the DelayShape oscillator.

◆ DelayPeriod

double DelayPeriod = 0

The period of the DelayShape oscillator (the rate at which delay oscillates in seconds).

◆ DelayShape

NetConfigSimulationOscillator.WaveShape DelayShape = NetConfigSimulationOscillator.WaveShape.Noise

The pattern used to oscillate between DelayMin and DelayMax values.

◆ DelayThreshold

double DelayThreshold = 0

The DelayShape oscillates between 0 and 1. Values below this threshold are reduced to zero, resulting in a value equal to DelayMin.

◆ Enabled

bool Enabled

If adverse network conditions are being simulated.

◆ LossChanceMax

double LossChanceMax = 0.05

The highest loss chance value the LossChanceShape oscillator will produce. 0 = 0% chance of being lost. 1 = 100% chance of being lost.

◆ LossChanceMin

double LossChanceMin = 0.05

The lowest loss chance value the LossChanceShape oscillator will produce. 0 = 0% chance of being lost. 1 = 100% chance of being lost.

◆ LossChancePeriod

double LossChancePeriod = 0

The period of the LossChanceShape oscillator (the rate at which delay oscillates between LossChanceMin and LossChanceMax).

◆ LossChanceShape

NetConfigSimulationOscillator.WaveShape LossChanceShape = NetConfigSimulationOscillator.WaveShape.Noise

The pattern used to oscillate between LossChanceMin and LossChanceMax values.

◆ LossChanceThreshold

double LossChanceThreshold = 0

The LossChanceShape wave oscillates between 0 and 1. Values below this threshold are reduced to zero, resulting in a value equal to LossChanceMin.