Loading...
Searching...
No Matches
AccelByte::FAccelByteNetworkConditioner Class Reference

Public Member Functions

bool IsEnabled () const
 Get enabled status of network conditioner.
void SetEnabled (const bool InEnabled)
 Set enabled status of network conditioner.
bool SetOverallFailRate (const int32 FailRate)
 Set overall fail rate percentage. this will be used if a particular MessageType is not set.
int32 GetOverallFailRate () const
 Get overall fail rate percentage. this will be used if a particular MessageType is not set.
bool SetMessageFailRate (const FString &MessageType, const int32 FailRate)
 Set fail rate percentage of a particular message type override the overall fail rate value for this message type.
int32 GetMessageFailRate (const FString &MessageType)
 Get fail rate percentage of a particular message type override the overall fail rate value for this message type.
void GetAllMessageFailRate (TMap< FString, int32 > &OutFailRateMap) const
 Get map of fail rate percentage of all message type that is set.
void ClearMessageFailRate ()
 Clear all message fail rate that was set.
bool RemoveMessageFailRate (const FString &MessageType)
 Remove fail rate of a message type.
void SetRandomSeed (const int32 Seed)
 Set random seed to be used in calculation, this will set new initial random seed.
int32 GetCurrentRandomSeed () const
 Get current random seed used.
int32 GetInitialRandomSeed () const
 Get initial random seed used.
bool CalculateFail (const FString &MessageType)
 Calculate with random if a MessageType should be fail or pass.

Public Attributes

PACKAGE_SCOPE : FAccelByteNetworkConditioner()

Member Function Documentation

◆ CalculateFail()

bool AccelByte::FAccelByteNetworkConditioner::CalculateFail ( const FString & MessageType)

Calculate with random if a MessageType should be fail or pass.

Parameters
MessageTypeName of message type.
Returns
true should fail, false is pass.

◆ GetAllMessageFailRate()

void AccelByte::FAccelByteNetworkConditioner::GetAllMessageFailRate ( TMap< FString, int32 > & OutFailRateMap) const

Get map of fail rate percentage of all message type that is set.

Parameters
OutFailRateMapmap of fail rate percentage.

◆ GetCurrentRandomSeed()

int32 AccelByte::FAccelByteNetworkConditioner::GetCurrentRandomSeed ( ) const

Get current random seed used.

Returns
random seed used.

◆ GetInitialRandomSeed()

int32 AccelByte::FAccelByteNetworkConditioner::GetInitialRandomSeed ( ) const

Get initial random seed used.

Returns
initial random seed used.

◆ GetMessageFailRate()

int32 AccelByte::FAccelByteNetworkConditioner::GetMessageFailRate ( const FString & MessageType)

Get fail rate percentage of a particular message type override the overall fail rate value for this message type.

Parameters
MessageTypeThe message type name.
Returns
Fail rate percentage value for that message type, return 0 if the message type is not set.

◆ GetOverallFailRate()

int32 AccelByte::FAccelByteNetworkConditioner::GetOverallFailRate ( ) const

Get overall fail rate percentage. this will be used if a particular MessageType is not set.

Returns
overall fail rate value.

◆ IsEnabled()

bool AccelByte::FAccelByteNetworkConditioner::IsEnabled ( ) const

Get enabled status of network conditioner.

Returns
true if network conditioner is enabled.

◆ RemoveMessageFailRate()

bool AccelByte::FAccelByteNetworkConditioner::RemoveMessageFailRate ( const FString & MessageType)

Remove fail rate of a message type.

Parameters
MessageTypeName of message type to remove.
Returns
true if successfully removed a message type.

◆ SetEnabled()

void AccelByte::FAccelByteNetworkConditioner::SetEnabled ( const bool InEnabled)

Set enabled status of network conditioner.

Parameters
InEnabledNetwork conditioner enabled state.

◆ SetMessageFailRate()

bool AccelByte::FAccelByteNetworkConditioner::SetMessageFailRate ( const FString & MessageType,
const int32 FailRate )

Set fail rate percentage of a particular message type override the overall fail rate value for this message type.

Parameters
MessageTypeThe message type name to override.
FailRatePercentage fail rate to use, valid value is between 0 (always pass) to 100 (always fail)
Returns
true if fail rate set successfully.

◆ SetOverallFailRate()

bool AccelByte::FAccelByteNetworkConditioner::SetOverallFailRate ( const int32 FailRate)

Set overall fail rate percentage. this will be used if a particular MessageType is not set.

Parameters
FailRatePercentage fail rate to use, valid value is between 0 (always pass) to 100 (always fail)
Returns
true if overall fail rate set successfully.

◆ SetRandomSeed()

void AccelByte::FAccelByteNetworkConditioner::SetRandomSeed ( const int32 Seed)

Set random seed to be used in calculation, this will set new initial random seed.

Parameters
Seedrandom seed to use.