Qos
Qos
#Overview
name: Qos
This variable is created as a Console Variable (cvar).
- type:
Exec
- help:
Sorry: Exec commands have no help
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:
- ForceRegionId: Used to specify a forced region for QoS evaluations
- LogQos: A log category specifically for Qos-related messages
Developers should be aware of the following when using Qos:
- It can be configured via the engine’s initialization file (GEngineIni) under the [Qos] section.
- The region can be forced via command line using the “McpRegion=” parameter.
- Qos evaluations can be triggered programmatically using the QosInterface.
Best practices when using Qos include:
- Use the provided QosInterface for initiating QoS evaluations rather than implementing custom solutions.
- Utilize the LogQos category for any Qos-related logging to maintain consistency and ease debugging.
- Be cautious when forcing regions, as it may affect the user experience if not used appropriately.
- Consider the implications of Qos evaluations on different platforms and network conditions when implementing Qos-dependent features.
- 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();