Commit 0fd425a7 authored by aligungr's avatar aligungr

UAC fields added to the UE configuration

parent 7f1704ea
......@@ -10,7 +10,9 @@
namespace nr::ue
{
class UserEquipment;
}
namespace app
......
......@@ -217,6 +217,22 @@ static nr::ue::UeConfig *ReadConfigYaml()
result->integrityMaxRate.downlinkFull = downlink == "full";
}
yaml::AssertHasField(config, "uacAic");
{
result->uacAic.mps = yaml::GetBool(config["uacAic"], "mps");
result->uacAic.mcs = yaml::GetBool(config["uacAic"], "mcs");
}
yaml::AssertHasField(config, "uacAcc");
{
result->uacAcc.normalCls = yaml::GetInt32(config["uacAcc"], "normalClass", 0, 9);
result->uacAcc.cls11 = yaml::GetBool(config["uacAcc"], "class11");
result->uacAcc.cls12 = yaml::GetBool(config["uacAcc"], "class12");
result->uacAcc.cls13 = yaml::GetBool(config["uacAcc"], "class13");
result->uacAcc.cls14 = yaml::GetBool(config["uacAcc"], "class14");
result->uacAcc.cls15 = yaml::GetBool(config["uacAcc"], "class15");
}
return result;
}
......@@ -274,22 +290,22 @@ static std::string LargeSum(std::string a, std::string b)
std::swap(a, b);
std::string str;
int n1 = a.length(), n2 = b.length();
size_t n1 = a.length(), n2 = b.length();
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
int carry = 0;
for (int i = 0; i < n1; i++)
for (size_t i = 0; i < n1; i++)
{
int sum = ((a[i] - '0') + (b[i] - '0') + carry);
str.push_back(sum % 10 + '0');
str.push_back(static_cast<char>((sum % 10) + '0'));
carry = sum / 10;
}
for (int i = n1; i < n2; i++)
for (size_t i = n1; i < n2; i++)
{
int sum = ((b[i] - '0') + carry);
str.push_back(sum % 10 + '0');
str.push_back(static_cast<char>((sum % 10) + '0'));
carry = sum / 10;
}
if (carry)
......@@ -322,6 +338,8 @@ static nr::ue::UeConfig *GetConfigByUe(int ueIndex)
c->configureRouting = g_refConfig->configureRouting;
c->prefixLogger = g_refConfig->prefixLogger;
c->integrityMaxRate = g_refConfig->integrityMaxRate;
c->uacAic = g_refConfig->uacAic;
c->uacAcc = g_refConfig->uacAcc;
if (c->supi.has_value())
IncrementNumber(c->supi->value, ueIndex);
......
......@@ -105,6 +105,22 @@ struct UeConfig
NetworkSlice defaultConfiguredNssai{};
NetworkSlice configuredNssai{};
struct
{
bool mps{};
bool mcs{};
} uacAic;
struct
{
int normalCls{}; // [0..9]
bool cls11{};
bool cls12{};
bool cls13{};
bool cls14{};
bool cls15{};
} uacAcc;
/* Assigned by program */
bool configureRouting{};
bool prefixLogger{};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment