Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
wangjie
OpenXG-RAN
Commits
3f02d18f
Commit
3f02d18f
authored
Sep 12, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR RRC ASN1 version upgrade release 16
Add RRCSetupRequest message Add RRCReject message
parent
3c84c4d8
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
406 additions
and
11 deletions
+406
-11
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+3
-3
openair2/COMMON/mac_messages_def.h
openair2/COMMON/mac_messages_def.h
+3
-0
openair2/COMMON/mac_messages_types.h
openair2/COMMON/mac_messages_types.h
+11
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+42
-1
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+3
-0
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+3
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+262
-1
openair2/RRC/NR/rrc_gNB_UE_context.c
openair2/RRC/NR/rrc_gNB_UE_context.c
+57
-0
openair2/RRC/NR/rrc_gNB_UE_context.h
openair2/RRC/NR/rrc_gNB_UE_context.h
+18
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+3
-3
No files found.
cmake_targets/CMakeLists.txt
View file @
3f02d18f
...
...
@@ -356,9 +356,9 @@ include_directories ("${RRC_FULL_DIR}")
#NR RRC
#######
set
(
NR_RRC_ASN1_VERSION
"NR_Rel1
5
"
)
make_version
(
NR_RRC_VERSION 1
5 6
0
)
set
(
NR_RRC_GRAMMAR
${
OPENAIR2_DIR
}
/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-1
5.6
.0.asn1
)
set
(
NR_RRC_ASN1_VERSION
"NR_Rel1
6
"
)
make_version
(
NR_RRC_VERSION 1
6 1
0
)
set
(
NR_RRC_GRAMMAR
${
OPENAIR2_DIR
}
/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-1
6.1
.0.asn1
)
add_definitions
(
-DNR_RRC_VERSION=
${
NR_RRC_VERSION
}
)
set
(
NR_RRC_FULL_DIR
${
asn1_generated_dir
}
/RRC_
${
NR_RRC_ASN1_VERSION
}
)
...
...
openair2/COMMON/mac_messages_def.h
View file @
3f02d18f
...
...
@@ -41,6 +41,9 @@ MESSAGE_DEF(RRC_MAC_CCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacCcchDat
MESSAGE_DEF
(
RRC_MAC_CCCH_DATA_CNF
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacCcchDataCnf
,
rrc_mac_ccch_data_cnf
)
MESSAGE_DEF
(
RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacCcchDataInd
,
rrc_mac_ccch_data_ind
)
// gNB
MESSAGE_DEF
(
NR_RRC_MAC_CCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
NR_RrcMacCcchDataInd
,
nr_rrc_mac_ccch_data_ind
)
MESSAGE_DEF
(
RRC_MAC_MCCH_DATA_REQ
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacMcchDataReq
,
rrc_mac_mcch_data_req
)
MESSAGE_DEF
(
RRC_MAC_MCCH_DATA_IND
,
MESSAGE_PRIORITY_MED_PLUS
,
RrcMacMcchDataInd
,
rrc_mac_mcch_data_ind
)
...
...
openair2/COMMON/mac_messages_types.h
View file @
3f02d18f
...
...
@@ -45,6 +45,7 @@
#define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req
#define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf
#define RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_ind
#define NR_RRC_MAC_CCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_ccch_data_ind
#define RRC_MAC_MCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_mcch_data_req
#define RRC_MAC_MCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_mcch_data_ind
...
...
@@ -126,6 +127,16 @@ typedef struct RrcMacCcchDataInd_s {
int
CC_id
;
}
RrcMacCcchDataInd
;
typedef
struct
NR_RrcMacCcchDataInd_s
{
uint32_t
frame
;
uint8_t
sub_frame
;
uint16_t
rnti
;
uint32_t
sdu_size
;
uint8_t
sdu
[
CCCH_SDU_SIZE
];
uint8_t
gnb_index
;
int
CC_id
;
}
NR_RrcMacCcchDataInd
;
typedef
struct
RrcMacMcchDataReq_s
{
uint32_t
frame
;
uint32_t
sdu_size
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
3f02d18f
...
...
@@ -624,7 +624,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
AssertFatal
(
1
==
0
,
"Couldn't fine pucch resource indicator %d in PUCCH resource set %d for %d UCI bits"
,
pucch_resource
,
i
,
O_uci
);
}
else
{
N3
=
pucchresset
->
maxPayload
Minus1
!=
NULL
?
*
pucchresset
->
maxPayloadMinus1
:
1706
;
N3
=
pucchresset
->
maxPayload
Size
!=
NULL
?
*
pucchresset
->
maxPayloadSize
:
1706
;
if
(
N2
<
O_uci
&&
N3
>
O_uci
)
{
if
(
pucch_resource
<
n_list
)
resource_id
=
pucchresset
->
resourceList
.
list
.
array
[
pucch_resource
];
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
3f02d18f
...
...
@@ -42,7 +42,10 @@
#include "asn1_msg.h"
#include "RRC/NR/nr_rrc_extern.h"
#if defined(NR_Rel15)
#include "NR_DL-CCCH-Message.h"
#include "NR_RRCReject.h"
#include "NR_RejectWaitTime.h"
#if defined(NR_Rel16)
#include "NR_SCS-SpecificCarrier.h"
#include "NR_TDD-UL-DL-ConfigCommon.h"
#include "NR_FrequencyInfoUL.h"
...
...
@@ -578,3 +581,41 @@ void do_SpCellConfig(gNB_RRC_INST *rrc,
spconfig
->
reconfigurationWithSync
=
CALLOC
(
1
,
sizeof
(
struct
NR_ReconfigurationWithSync
));
}
//------------------------------------------------------------------------------
uint8_t
do_RRCReject
(
uint8_t
Mod_id
,
uint8_t
*
const
buffer
)
//------------------------------------------------------------------------------
{
asn_enc_rval_t
enc_rval
;;
NR_DL_CCCH_Message_t
dl_ccch_msg
;
NR_RRCReject_t
*
rrcReject
;
NR_RejectWaitTime_t
waitTime
=
1
;
memset
((
void
*
)
&
dl_ccch_msg
,
0
,
sizeof
(
NR_DL_CCCH_Message_t
));
dl_ccch_msg
.
message
.
present
=
NR_DL_CCCH_MessageType_PR_c1
;
dl_ccch_msg
.
message
.
choice
.
c1
->
present
=
NR_RRCReject__criticalExtensions_PR_rrcReject
;
rrcReject
=
dl_ccch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReject
;
rrcReject
->
criticalExtensions
.
present
=
NR_RRCReject__criticalExtensions_PR_rrcReject
;
rrcReject
->
criticalExtensions
.
choice
.
rrcReject
->
waitTime
=
&
waitTime
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_CCCH_Message
,
(
void
*
)
&
dl_ccch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_DL_CCCH_Message
,
NULL
,
(
void
*
)
&
dl_ccch_msg
,
buffer
,
100
);
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_E
(
RRC
,
"[gNB AssertFatal]ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
-
1
;
}
LOG_D
(
RRC
,
"RRCReject Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
3f02d18f
...
...
@@ -82,3 +82,6 @@ void do_PHYSICALCELLGROUP(uint8_t Mod_id,
void
do_SpCellConfig
(
gNB_RRC_INST
*
rrc
,
struct
NR_SpCellConfig
*
spconfig
);
uint8_t
do_RRCReject
(
uint8_t
Mod_id
,
uint8_t
*
const
buffer
);
openair2/RRC/NR/nr_rrc_defs.h
View file @
3f02d18f
...
...
@@ -54,6 +54,7 @@
#include "NR_BCCH-BCH-Message.h"
#include "NR_PLMN-IdentityInfo.h"
#include "NR_MCC-MNC-Digit.h"
#include "NR_NG-5G-S-TMSI.h"
//#include "MCCH-Message.h"
//#include "MBSFNAreaConfiguration-r9.h"
//#include "SCellToAddMod-r10.h"
...
...
@@ -290,8 +291,8 @@ typedef struct gNB_RRC_UE_s {
rnti_t
rnti
;
uint64_t
random_ue_identity
;
/* Information from UE RRC
Connection
Request */
UE_S_TMSI
Initialue_identity
_s_TMSI
;
/* Information from UE RRC
Setup
Request */
uint64_t
Initialue_identity_5g
_s_TMSI
;
NR_EstablishmentCause_t
establishment_cause
;
/* Information from UE RRC ConnectionReestablishmentRequest */
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
3f02d18f
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_UE_context.c
View file @
3f02d18f
...
...
@@ -220,4 +220,61 @@ void rrc_gNB_remove_ue_context(
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
}
//-----------------------------------------------------------------------------
// return the ue context if there is already an UE with ue_identityP, NULL otherwise
struct
rrc_gNB_ue_context_s
*
rrc_gNB_ue_context_random_exist
(
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
)
//-----------------------------------------------------------------------------
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
RB_FOREACH
(
ue_context_p
,
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
)
{
if
(
ue_context_p
->
ue_context
.
random_ue_identity
==
ue_identityP
)
return
ue_context_p
;
}
return
NULL
;
}
//-----------------------------------------------------------------------------
// return a new ue context structure if ue_identityP, ctxt_pP->rnti not found in collection
struct
rrc_gNB_ue_context_s
*
rrc_gNB_get_next_free_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
)
//-----------------------------------------------------------------------------
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
ue_context_p
=
rrc_gNB_get_ue_context
(
rrc_instance_pP
,
ctxt_pP
->
rnti
);
if
(
ue_context_p
==
NULL
)
{
ue_context_p
=
rrc_gNB_allocate_new_UE_context
(
rrc_instance_pP
);
if
(
ue_context_p
==
NULL
)
{
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Cannot create new UE context, no memory
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
return
NULL
;
}
ue_context_p
->
ue_id_rnti
=
ctxt_pP
->
rnti
;
// here ue_id_rnti is just a key, may be something else
ue_context_p
->
ue_context
.
rnti
=
ctxt_pP
->
rnti
;
// yes duplicate, 1 may be removed
ue_context_p
->
ue_context
.
random_ue_identity
=
ue_identityP
;
RB_INSERT
(
rrc_nr_ue_tree_s
,
&
rrc_instance_pP
->
rrc_ue_head
,
ue_context_p
);
LOG_D
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Created new UE context uid %u
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_context_p
->
local_uid
);
return
ue_context_p
;
}
else
{
LOG_E
(
RRC
,
PROTOCOL_RRC_CTXT_UE_FMT
" Cannot create new UE context, already exist
\n
"
,
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
));
return
NULL
;
}
return
(
ue_context_p
);
}
openair2/RRC/NR/rrc_gNB_UE_context.h
View file @
3f02d18f
...
...
@@ -73,10 +73,28 @@ rrc_gNB_get_ue_context(
rnti_t
rntiP
);
void
rrc_gNB_free_mem_UE_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
struct
rrc_gNB_ue_context_s
*
const
ue_context_pP
);
void
rrc_gNB_remove_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
struct
rrc_gNB_ue_context_s
*
ue_context_pP
);
struct
rrc_gNB_ue_context_s
*
rrc_gNB_ue_context_random_exist
(
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
);
struct
rrc_gNB_ue_context_s
*
rrc_gNB_get_next_free_ue_context
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
gNB_RRC_INST
*
rrc_instance_pP
,
const
uint64_t
ue_identityP
);
#endif
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
3f02d18f
...
...
@@ -168,7 +168,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n310
=
NR_RLF_TimersAndConstants__n310_n10
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
n311
=
NR_RLF_TimersAndConstants__n311_n1
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
));
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
->
t311
_v1530
=
NR_RLF_TimersAndConstants__ext1__t311_v1530
_ms30000
;
secondaryCellGroup
->
spCellConfig
->
rlf_TimersAndConstants
->
choice
.
setup
->
ext1
->
t311
=
NR_RLF_TimersAndConstants__ext1__t311
_ms30000
;
secondaryCellGroup
->
spCellConfig
->
rlmInSyncOutOfSyncThreshold
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
tdd_UL_DL_ConfigurationDedicated
=
NULL
;
...
...
@@ -961,7 +961,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucchresset0
->
resourceList
.
list
,
pucchresset0id0
);
*
pucchresset0id1
=
2
;
ASN_SEQUENCE_ADD
(
&
pucchresset0
->
resourceList
.
list
,
pucchresset0id1
);
pucchresset0
->
maxPayload
Minus1
=
NULL
;
pucchresset0
->
maxPayload
Size
=
NULL
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceSetToAddModList
->
list
,
pucchresset0
);
...
...
@@ -972,7 +972,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
ASN_SEQUENCE_ADD
(
&
pucchresset1
->
resourceList
.
list
,
pucchresset1id0
);
*
pucchresset1id1
=
4
;
ASN_SEQUENCE_ADD
(
&
pucchresset1
->
resourceList
.
list
,
pucchresset1id1
);
pucchresset1
->
maxPayload
Minus1
=
NULL
;
pucchresset1
->
maxPayload
Size
=
NULL
;
ASN_SEQUENCE_ADD
(
&
pucch_Config
->
resourceSetToAddModList
->
list
,
pucchresset1
);
pucch_Config
->
resourceToAddModList
=
calloc
(
1
,
sizeof
(
*
pucch_Config
->
resourceToAddModList
));
...
...
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