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