Commit 67e6995d authored by aligungr's avatar aligungr

UE configuration change for emergency sessions and integrityMaxRate

parent 2314b695
......@@ -197,10 +197,24 @@ static nr::ue::UeConfig *ReadConfigYaml()
else
throw std::runtime_error("Invalid PDU session type: " + type);
s.isEmergency = yaml::GetBool(sess, "emergency");
result->initSessions.push_back(s);
}
}
yaml::AssertHasField(config, "integrityMaxRate");
{
auto uplink = yaml::GetString(config["integrityMaxRate"], "uplink");
auto downlink = yaml::GetString(config["integrityMaxRate"], "downlink");
if (uplink != "full" && uplink != "64kbps")
throw std::runtime_error("Invalid integrity protection maximum uplink data rate: " + uplink);
if (downlink != "full" && downlink != "64kbps")
throw std::runtime_error("Invalid integrity protection maximum downlink data rate: " + downlink);
result->integrityMaxRate.uplinkFull = uplink == "full";
result->integrityMaxRate.downlinkFull = downlink == "full";
}
return result;
}
......@@ -304,6 +318,7 @@ static nr::ue::UeConfig *GetConfigByUe(int ueIndex)
c->initSessions = g_refConfig->initSessions;
c->configureRouting = g_refConfig->configureRouting;
c->prefixLogger = g_refConfig->prefixLogger;
c->integrityMaxRate = g_refConfig->integrityMaxRate;
if (c->supi.has_value())
IncrementNumber(c->supi->value, ueIndex);
......
......@@ -49,6 +49,13 @@ struct SessionConfig
nas::EPduSessionType type{};
std::optional<SingleSlice> sNssai{};
std::optional<std::string> apn{};
bool isEmergency{};
};
struct IntegrityMaxDataRateConfig
{
bool uplinkFull{};
bool downlinkFull{};
};
struct UeConfig
......@@ -65,6 +72,7 @@ struct UeConfig
SupportedAlgs supportedAlgs{};
std::vector<std::string> gnbSearchList{};
std::vector<SessionConfig> initSessions{};
IntegrityMaxDataRateConfig integrityMaxRate{};
/* Read from config file as well, but should be stored in non-volatile
* mobile storage and subject to change in runtime */
......@@ -222,22 +230,37 @@ enum class EMmSubState
MM_SERVICE_REQUEST_INITIATED_NA
};
enum class EPsState
{
INACTIVE,
ACTIVE_PENDING,
ACTIVE,
INACTIVE_PENDING,
MODIFICATION_PENDING
};
struct PduSession
{
static constexpr const int MIN_ID = 1;
static constexpr const int MAX_ID = 15;
int id{};
bool isEstablished{};
const int psi;
EPsState psState{};
nas::EPduSessionType sessionType{};
std::optional<std::string> apn{};
std::optional<SingleSlice> sNssai{};
bool isEmergency{};
std::optional<nas::IEQoSRules> authorizedQoSRules{};
std::optional<nas::IESessionAmbr> sessionAmbr{};
std::optional<nas::IEQoSFlowDescriptions> authorizedQoSFlowDescriptions{};
std::optional<nas::IEPduAddress> pduAddress{};
explicit PduSession(int psi) : psi(psi)
{
}
};
struct ProcedureTransaction
......@@ -245,7 +268,7 @@ struct ProcedureTransaction
static constexpr const int MIN_ID = 1;
static constexpr const int MAX_ID = 254;
int id{};
bool isUsed{};
};
enum class EConnectionIdentifier
......@@ -362,8 +385,10 @@ enum class EAutnValidationRes
struct UePduSessionInfo
{
int psi{};
std::string type{};
std::string address{};
bool isEmergency{};
};
enum class ERegUpdateCause
......@@ -428,5 +453,7 @@ Json ToJson(const E5UState &state);
Json ToJson(const UeConfig &v);
Json ToJson(const UeTimers &v);
Json ToJson(const ERegUpdateCause &v);
Json ToJson(const EPsState &v);
Json ToJson(const UePduSessionInfo &v);
} // namespace nr::ue
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