Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
67e6995d
Commit
67e6995d
authored
Mar 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE configuration change for emergency sessions and integrityMaxRate
parent
2314b695
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
4 deletions
+46
-4
src/ue.cpp
src/ue.cpp
+15
-0
src/ue/types.hpp
src/ue/types.hpp
+31
-4
No files found.
src/ue.cpp
View file @
67e6995d
...
@@ -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
);
...
...
src/ue/types.hpp
View file @
67e6995d
...
@@ -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,6 +72,7 @@ struct UeConfig
...
@@ -65,6 +72,7 @@ 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 */
...
@@ -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
i
d
{};
bool
isUse
d
{};
};
};
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment