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
2dae5580
Commit
2dae5580
authored
May 15, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC developments
parent
5c09ed2b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
11 deletions
+76
-11
src/gnb/rrc/broadcast.cpp
src/gnb/rrc/broadcast.cpp
+1
-1
src/lib/asn/rrc.cpp
src/lib/asn/rrc.cpp
+26
-0
src/lib/asn/rrc.hpp
src/lib/asn/rrc.hpp
+4
-1
src/ue/rrc/sysinfo.cpp
src/ue/rrc/sysinfo.cpp
+28
-6
src/ue/types.hpp
src/ue/types.hpp
+17
-3
No files found.
src/gnb/rrc/broadcast.cpp
View file @
2dae5580
...
...
@@ -69,7 +69,7 @@ static ASN_RRC_BCCH_DL_SCH_Message *ConstructSib1Message(bool cellReserved, int
plmnInfo
->
cellReservedForOperatorUse
=
cellReserved
?
ASN_RRC_PLMN_IdentityInfo__cellReservedForOperatorUse_reserved
:
ASN_RRC_PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved
;
plmnInfo
->
trackingAreaCode
=
asn
::
NewFor
(
plmnInfo
->
trackingAreaCode
);
asn
::
MakeNew
(
plmnInfo
->
trackingAreaCode
);
asn
::
SetBitStringInt
<
24
>
(
tac
,
*
plmnInfo
->
trackingAreaCode
);
asn
::
SetBitStringLong
<
36
>
(
nci
,
plmnInfo
->
cellIdentity
);
asn
::
SequenceAdd
(
plmnInfo
->
plmn_IdentityList
,
asn
::
rrc
::
NewPlmnId
(
plmn
));
...
...
src/lib/asn/rrc.cpp
View file @
2dae5580
...
...
@@ -8,9 +8,13 @@
#include "rrc.hpp"
#include <stdexcept>
#include <lib/asn/utils.hpp>
#include <asn/rrc/ASN_RRC_MCC-MNC-Digit.h>
#include <asn/rrc/ASN_RRC_MCC.h>
#include <asn/rrc/ASN_RRC_MNC.h>
namespace
asn
::
rrc
{
...
...
@@ -48,4 +52,26 @@ ASN_RRC_MCC_MNC_Digit_t *NewMccMncDigit(int digit)
return
value
;
}
Plmn
GetPlmnId
(
const
ASN_RRC_PLMN_Identity
&
value
)
{
if
(
value
.
mcc
==
nullptr
)
throw
std
::
runtime_error
(
""
);
Plmn
plmn
;
asn
::
ForeachItem
(
*
value
.
mcc
,
[
&
plmn
](
auto
&
i
)
{
plmn
.
mcc
*=
10
;
plmn
.
mcc
+=
static_cast
<
int
>
(
i
);
});
asn
::
ForeachItem
(
value
.
mnc
,
[
&
plmn
](
auto
&
i
)
{
plmn
.
mnc
*=
10
;
plmn
.
mnc
+=
static_cast
<
int
>
(
i
);
});
plmn
.
isLongMnc
=
value
.
mnc
.
list
.
count
==
3
;
return
plmn
;
}
}
// namespace asn::rrc
src/lib/asn/rrc.hpp
View file @
2dae5580
...
...
@@ -6,9 +6,10 @@
// and subject to the terms and conditions defined in LICENSE file.
//
#include <asn/rrc/ASN_RRC_PLMN-Identity.h>
#include <utils/common.hpp>
#include <asn/rrc/ASN_RRC_PLMN-Identity.h>
namespace
asn
::
rrc
{
...
...
@@ -18,4 +19,6 @@ ASN_RRC_PLMN_Identity *NewPlmnId(const Plmn &plmn);
ASN_RRC_MCC_MNC_Digit_t
*
NewMccMncDigit
(
int
digit
);
Plmn
GetPlmnId
(
const
ASN_RRC_PLMN_Identity
&
value
);
}
// namespace asn::rrc
src/ue/rrc/sysinfo.cpp
View file @
2dae5580
...
...
@@ -8,14 +8,16 @@
#include "task.hpp"
#include <lib/asn/rrc.hpp>
#include <lib/asn/utils.hpp>
#include <lib/rrc/encode.hpp>
#include <ue/nas/task.hpp>
#include <ue/nts.hpp>
#include <utils/common.hpp>
#include <asn/rrc/ASN_RRC_MIB.h>
#include <asn/rrc/ASN_RRC_PLMN-IdentityInfo.h>
#include <asn/rrc/ASN_RRC_PLMN-IdentityInfoList.h>
#include <asn/rrc/ASN_RRC_SIB1.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSet.h>
namespace
nr
::
ue
{
...
...
@@ -24,17 +26,37 @@ void UeRrcTask::receiveMib(int cellId, const ASN_RRC_MIB &msg)
{
auto
&
desc
=
m_cellDesc
[
cellId
];
desc
.
isBarredByMib
=
msg
.
cellBarred
==
ASN_RRC_MIB__cellBarred_barred
;
desc
.
isIntraFreqReselectAllowed
=
msg
.
intraFreqReselection
==
ASN_RRC_MIB__intraFreqReselection_allowed
;
desc
.
mib
.
isBarred
=
msg
.
cellBarred
==
ASN_RRC_MIB__cellBarred_barred
;
desc
.
mib
.
isIntraFreqReselectAllowed
=
msg
.
intraFreqReselection
==
ASN_RRC_MIB__intraFreqReselection_allowed
;
}
void
UeRrcTask
::
receiveSib1
(
int
cellId
,
const
ASN_RRC_SIB1
&
msg
)
{
auto
&
desc
=
m_cellDesc
[
cellId
];
desc
.
isReserved
=
msg
.
cellAccessRelatedInfo
.
cellReservedForOtherUse
!=
nullptr
;
desc
.
sib1
.
isReserved
=
msg
.
cellAccessRelatedInfo
.
cellReservedForOtherUse
!=
nullptr
;
// TODO
auto
*
plmnIdentityInfo
=
msg
.
cellAccessRelatedInfo
.
plmn_IdentityList
.
list
.
array
[
0
];
desc
.
sib1
.
nci
=
asn
::
GetBitStringLong
<
36
>
(
plmnIdentityInfo
->
cellIdentity
);
desc
.
sib1
.
isReserved
&=
plmnIdentityInfo
->
cellReservedForOperatorUse
==
ASN_RRC_PLMN_IdentityInfo__cellReservedForOperatorUse_reserved
;
desc
.
sib1
.
tac
=
asn
::
GetBitStringInt
<
24
>
(
*
plmnIdentityInfo
->
trackingAreaCode
);
auto
plmnIdentity
=
plmnIdentityInfo
->
plmn_IdentityList
.
list
.
array
[
0
];
desc
.
sib1
.
plmn
=
asn
::
rrc
::
GetPlmnId
(
*
plmnIdentity
);
auto
*
barringInfo
=
msg
.
uac_BarringInfo
->
uac_BarringInfoSetList
.
list
.
array
[
0
];
int
barringBits
=
asn
::
GetBitStringInt
<
7
>
(
barringInfo
->
uac_BarringForAccessIdentity
);
desc
.
sib1
.
aiBarringSet
.
ai15
=
bits
::
BitAt
<
0
>
(
barringBits
);
desc
.
sib1
.
aiBarringSet
.
ai14
=
bits
::
BitAt
<
1
>
(
barringBits
);
desc
.
sib1
.
aiBarringSet
.
ai13
=
bits
::
BitAt
<
2
>
(
barringBits
);
desc
.
sib1
.
aiBarringSet
.
ai12
=
bits
::
BitAt
<
3
>
(
barringBits
);
desc
.
sib1
.
aiBarringSet
.
ai11
=
bits
::
BitAt
<
4
>
(
barringBits
);
desc
.
sib1
.
aiBarringSet
.
ai2
=
bits
::
BitAt
<
5
>
(
barringBits
);
desc
.
sib1
.
aiBarringSet
.
ai1
=
bits
::
BitAt
<
6
>
(
barringBits
);
}
}
// namespace nr::ue
\ No newline at end of file
src/ue/types.hpp
View file @
2dae5580
...
...
@@ -32,9 +32,23 @@ class UserEquipment;
struct
UeCellDesc
{
int
dbm
{};
bool
isBarredByMib
=
true
;
struct
{
bool
hasMib
=
false
;
bool
isBarred
=
true
;
bool
isIntraFreqReselectAllowed
=
true
;
}
mib
{};
struct
{
bool
hasSib1
=
false
;
bool
isReserved
=
false
;
int64_t
nci
=
0
;
int
tac
=
0
;
Plmn
plmn
;
UacAiBarringSet
aiBarringSet
;
}
sib1
{};
}
;
struct
SupportedAlgs
...
...
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