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
e0c66b8a
Commit
e0c66b8a
authored
May 15, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC developments
parent
563012bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
10 deletions
+54
-10
src/gnb/rrc/broadcast.cpp
src/gnb/rrc/broadcast.cpp
+29
-3
src/gnb/rrc/task.hpp
src/gnb/rrc/task.hpp
+1
-0
src/lib/asn/utils.hpp
src/lib/asn/utils.hpp
+6
-0
src/utils/common_types.hpp
src/utils/common_types.hpp
+18
-7
No files found.
src/gnb/rrc/broadcast.cpp
View file @
e0c66b8a
...
...
@@ -20,7 +20,8 @@
#include <asn/rrc/ASN_RRC_SIB1.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSet.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSetIndex.h>
#include <asn/rrc/ASN_RRC_UAC-BarringInfoSetList.h>
#include <asn/rrc/ASN_RRC_UAC-BarringPerCat.h>
#include <asn/rrc/ASN_RRC_UAC-BarringPerCatList.h>
namespace
nr
::
gnb
{
...
...
@@ -46,7 +47,8 @@ static ASN_RRC_BCCH_BCH_Message *ConstructMibMessage(bool barred, bool intraFreq
return
pdu
;
}
static
ASN_RRC_BCCH_DL_SCH_Message
*
ConstructSib1Message
(
bool
cellReserved
,
int
tac
,
int64_t
nci
,
const
Plmn
&
plmn
)
static
ASN_RRC_BCCH_DL_SCH_Message
*
ConstructSib1Message
(
bool
cellReserved
,
int
tac
,
int64_t
nci
,
const
Plmn
&
plmn
,
const
UacAiBarringSet
&
aiBarringSet
)
{
auto
*
pdu
=
asn
::
New
<
ASN_RRC_BCCH_DL_SCH_Message
>
();
pdu
->
message
.
present
=
ASN_RRC_BCCH_DL_SCH_MessageType_PR_c1
;
...
...
@@ -74,6 +76,30 @@ static ASN_RRC_BCCH_DL_SCH_Message *ConstructSib1Message(bool cellReserved, int
asn
::
SequenceAdd
(
plmnInfo
->
plmn_IdentityList
,
asn
::
rrc
::
NewPlmnId
(
plmn
));
asn
::
SequenceAdd
(
sib1
.
cellAccessRelatedInfo
.
plmn_IdentityList
,
plmnInfo
);
asn
::
MakeNew
(
sib1
.
uac_BarringInfo
);
auto
*
info
=
asn
::
New
<
ASN_RRC_UAC_BarringInfoSet
>
();
info
->
uac_BarringFactor
=
ASN_RRC_UAC_BarringInfoSet__uac_BarringFactor_p50
;
info
->
uac_BarringTime
=
ASN_RRC_UAC_BarringInfoSet__uac_BarringTime_s4
;
asn
::
SetBitStringInt
<
7
>
(
bits
::
Consequential8
(
false
,
aiBarringSet
.
ai1
,
aiBarringSet
.
ai2
,
aiBarringSet
.
ai11
,
aiBarringSet
.
ai12
,
aiBarringSet
.
ai13
,
aiBarringSet
.
ai14
,
aiBarringSet
.
ai15
),
info
->
uac_BarringForAccessIdentity
);
asn
::
SequenceAdd
(
sib1
.
uac_BarringInfo
->
uac_BarringInfoSetList
,
info
);
asn
::
MakeNew
(
sib1
.
uac_BarringInfo
->
uac_BarringForCommon
);
for
(
size_t
i
=
0
;
i
<
63
;
i
++
)
{
auto
*
item
=
asn
::
New
<
ASN_RRC_UAC_BarringPerCat
>
();
item
->
accessCategory
=
static_cast
<
long
>
(
i
+
1
);
item
->
uac_barringInfoSetIndex
=
1
;
asn
::
SequenceAdd
(
*
sib1
.
uac_BarringInfo
->
uac_BarringForCommon
,
item
);
}
return
pdu
;
}
...
...
@@ -85,7 +111,7 @@ void GnbRrcTask::onBroadcastTimerExpired()
void
GnbRrcTask
::
triggerSysInfoBroadcast
()
{
auto
*
mib
=
ConstructMibMessage
(
m_isBarred
,
m_intraFreqReselectAllowed
);
auto
*
sib1
=
ConstructSib1Message
(
m_cellReserved
,
m_config
->
tac
,
m_config
->
nci
,
m_config
->
plmn
);
auto
*
sib1
=
ConstructSib1Message
(
m_cellReserved
,
m_config
->
tac
,
m_config
->
nci
,
m_config
->
plmn
,
m_aiBarringSet
);
sendRrcMessage
(
mib
);
sendRrcMessage
(
sib1
);
...
...
src/gnb/rrc/task.hpp
View file @
e0c66b8a
...
...
@@ -51,6 +51,7 @@ class GnbRrcTask : public NtsTask
bool
m_isBarred
=
true
;
bool
m_intraFreqReselectAllowed
=
true
;
bool
m_cellReserved
=
false
;
UacAiBarringSet
m_aiBarringSet
=
{};
friend
class
GnbCmdHandler
;
...
...
src/lib/asn/utils.hpp
View file @
e0c66b8a
...
...
@@ -43,6 +43,12 @@ inline T *NewFor(T *p)
return
New
<
typename
std
::
remove_pointer
<
T
>::
type
>
();
}
template
<
typename
T
>
inline
void
MakeNew
(
T
*&
p
)
{
p
=
NewFor
(
p
);
}
template
<
typename
T
>
inline
void
Free
(
asn_TYPE_descriptor_t
&
desc
,
T
*
ptr
)
{
...
...
src/utils/common_types.hpp
View file @
e0c66b8a
...
...
@@ -154,21 +154,21 @@ enum class ECellCategory
struct
UeCellMeasurement
{
uint64_t
sti
{};
GlobalNci
cellId
{}
;
GlobalNci
cellId
;
int
tac
{};
int
dbm
{};
std
::
string
gnbName
{}
;
std
::
string
linkIp
{}
;
std
::
string
gnbName
;
std
::
string
linkIp
;
};
struct
UeCellInfo
{
uint64_t
sti
{};
GlobalNci
cellId
{}
;
GlobalNci
cellId
;
int
tac
{};
ECellCategory
cellCategory
{};
std
::
string
gnbName
{}
;
std
::
string
linkIp
{}
;
std
::
string
gnbName
;
std
::
string
linkIp
;
};
struct
Vector3
...
...
@@ -184,6 +184,17 @@ struct Vector3
}
};
struct
UacAiBarringSet
{
bool
ai1
=
false
;
bool
ai2
=
false
;
bool
ai11
=
false
;
bool
ai12
=
false
;
bool
ai13
=
false
;
bool
ai14
=
false
;
bool
ai15
=
false
;
};
bool
operator
==
(
const
SingleSlice
&
lhs
,
const
SingleSlice
&
rhs
);
bool
operator
==
(
const
Plmn
&
lhs
,
const
Plmn
&
rhs
);
bool
operator
==
(
const
GlobalNci
&
lhs
,
const
GlobalNci
&
rhs
);
...
...
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