Qos

Qos

#Overview

name: Qos

This variable is created as a Console Variable (cvar).

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of Qos (Quality of Service) is to manage and evaluate network quality and performance for online features in Unreal Engine games. It is primarily used for assessing and optimizing network connections, particularly in multiplayer scenarios.

The Qos system is part of the OnlineFramework plugin in Unreal Engine, specifically within the Qos module. This module is responsible for handling Quality of Service-related functionality.

The value of this variable is not directly set in the provided code snippets. However, it appears to be used as a configuration section in the engine’s initialization file (GEngineIni) and as a command-line parameter.

Other variables that interact with Qos include:

Developers should be aware of the following when using Qos:

  1. It can be configured via the engine’s initialization file (GEngineIni) under the [Qos] section.
  2. The region can be forced via command line using the “McpRegion=” parameter.
  3. Qos evaluations can be triggered programmatically using the QosInterface.

Best practices when using Qos include:

  1. Use the provided QosInterface for initiating QoS evaluations rather than implementing custom solutions.
  2. Utilize the LogQos category for any Qos-related logging to maintain consistency and ease debugging.
  3. Be cautious when forcing regions, as it may affect the user experience if not used appropriately.
  4. Consider the implications of Qos evaluations on different platforms and network conditions when implementing Qos-dependent features.
  5. Regularly test Qos functionality to ensure it performs as expected across various network scenarios.

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Online/OnlineFramework/Source/Qos/Private/QosModule.cpp:4

Scope: file

Source code excerpt:



IMPLEMENT_MODULE(FQosModule, Qos);

DEFINE_LOG_CATEGORY(LogQos);

void FQosModule::StartupModule()
{
}

#Loc: <Workspace>/Engine/Plugins/Online/OnlineFramework/Source/Qos/Private/QosModule.cpp:33

Scope (from outer to inner):

file
function     bool FQosModule::Exec_Runtime

Source code excerpt:


	// Ignore any execs that don't start with Qos
	if (FParse::Command(&Cmd, TEXT("Qos")))
	{
		if (FParse::Command(&Cmd, TEXT("Ping")))
		{
			GetQosInterface()->BeginQosEvaluation(InWorld, nullptr, FSimpleDelegate::CreateLambda([this]()
			{
				UE_LOG(LogQos, Log, TEXT("ExecQosPingComplete!"));

#Loc: <Workspace>/Engine/Plugins/Online/OnlineFramework/Source/Qos/Private/QosRegionManager.cpp:181

Scope (from outer to inner):

file
function     UQosRegionManager::UQosRegionManager

Source code excerpt:

{
	check(GConfig);
	GConfig->GetString(TEXT("Qos"), TEXT("ForceRegionId"), ForceRegionId, GEngineIni);

	// get a forced region id from the command line as an override
	bRegionForcedViaCommandline = FParse::Value(FCommandLine::Get(), TEXT("McpRegion="), ForceRegionId);
	if (!ForceRegionId.IsEmpty())
	{
		ForceRegionId.ToUpperInline();