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
ZhouShuya
OpenXG-RAN
Commits
50509dfc
Commit
50509dfc
authored
Nov 19, 2019
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENDC: Enable transfer and handling of SgNB Addition request elements from X2AP to RRC of gNB.
parent
26692630
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
8 deletions
+66
-8
openair2/COMMON/x2ap_messages_types.h
openair2/COMMON/x2ap_messages_types.h
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+60
-2
openair2/X2AP/x2ap_eNB_decoder.c
openair2/X2AP/x2ap_eNB_decoder.c
+2
-2
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+3
-3
No files found.
openair2/COMMON/x2ap_messages_types.h
View file @
50509dfc
...
...
@@ -331,7 +331,7 @@ typedef struct x2ap_ENDC_sgnb_addition_req_s {
x2ap_lastvisitedcell_info_t
lastvisitedcell_info
;
uint8_t
rrc_buffer
[
8192
/* arbitrary, big enough */
];
uint8_t
rrc_buffer
[
4096
/* arbitrary, big enough */
];
int
rrc_buffer_size
;
int
target_assoc_id
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
50509dfc
...
...
@@ -203,7 +203,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc) {
);
if
(
phy_test
>
0
)
{
/*
if (phy_test > 0) {
// This is for phytest only, emulate first X2 message if uecap.raw file is present
FILE *fd;
...
...
@@ -252,7 +252,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc) {
LOG_I(NR_RRC,"Adding new user (%p)\n",ue_context_p);
rrc_add_nsa_user(rrc,ue_context_p);
}
}
}
*/
}
...
...
@@ -298,6 +298,59 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
}
//END openair_rrc_gNB_configuration
void
rrc_gNB_process_AdditionRequestInformation
(
const
module_id_t
gnb_mod_idP
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
FILE
*
fd
;
fd
=
fopen
(
"uecap.raw"
,
"r"
);
if
(
fd
!=
NULL
)
{
char
buffer
[
4096
];
int
msg_len
=
fread
(
buffer
,
1
,
4096
,
fd
);
fclose
(
fd
);
}
/*LOG_I(RRC,"Read in %d bytes for uecap\n",msg_len);*/
LTE_UL_DCCH_Message_t
*
LTE_UL_DCCH_Message
;
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_LTE_UL_DCCH_Message
,
(
void
**
)
&
LTE_UL_DCCH_Message
,
(
uint8_t
*
)
m
->
rrc_buffer
,
(
int
)
m
->
rrc_buffer_size
);
//m->rrc_buffer_size);
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
gnb_mod_idP
];
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
AssertFatal
(
1
==
0
,
"NR_UL_DCCH_MESSAGE decode error
\n
"
);
// free the memory
SEQUENCE_free
(
&
asn_DEF_LTE_UL_DCCH_Message
,
LTE_UL_DCCH_Message
,
1
);
return
;
}
xer_fprint
(
stdout
,
&
asn_DEF_LTE_UL_DCCH_Message
,
LTE_UL_DCCH_Message
);
// recreate enough of X2 EN-DC Container
AssertFatal
(
LTE_UL_DCCH_Message
->
message
.
choice
.
c1
.
present
==
LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation
,
"ueCapabilityInformation not present
\n
"
);
NR_CG_ConfigInfo_t
*
CG_ConfigInfo
=
calloc
(
1
,
sizeof
(
*
CG_ConfigInfo
));
CG_ConfigInfo
->
criticalExtensions
.
present
=
NR_CG_ConfigInfo__criticalExtensions_PR_c1
;
CG_ConfigInfo
->
criticalExtensions
.
choice
.
c1
=
calloc
(
1
,
sizeof
(
*
CG_ConfigInfo
->
criticalExtensions
.
choice
.
c1
));
CG_ConfigInfo
->
criticalExtensions
.
choice
.
c1
->
present
=
NR_CG_ConfigInfo__criticalExtensions__c1_PR_cg_ConfigInfo
;
CG_ConfigInfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
=
calloc
(
1
,
sizeof
(
*
CG_ConfigInfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
));
NR_CG_ConfigInfo_IEs_t
*
cg_ConfigInfo
=
CG_ConfigInfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
;
cg_ConfigInfo
->
ue_CapabilityInfo
=
calloc
(
1
,
sizeof
(
*
cg_ConfigInfo
->
ue_CapabilityInfo
));
asn_enc_rval_t
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_UE_CapabilityRAT_ContainerList
,
NULL
,(
void
*
)
&
LTE_UL_DCCH_Message
->
message
.
choice
.
c1
.
choice
.
ueCapabilityInformation
.
criticalExtensions
.
choice
.
c1
.
choice
.
ueCapabilityInformation_r8
.
ue_CapabilityRAT_ContainerList
,
m
->
rrc_buffer
,
m
->
rrc_buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
OCTET_STRING_fromBuf
(
cg_ConfigInfo
->
ue_CapabilityInfo
,
(
const
char
*
)
m
->
rrc_buffer
,
(
enc_rval
.
encoded
+
7
)
>>
3
);
parse_CG_ConfigInfo
(
rrc
,
CG_ConfigInfo
);
}
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
...
...
@@ -393,6 +446,11 @@ void *rrc_gnb_task(void *args_p) {
LOG_I
(
NR_RRC
,
"[gNB %d] Received %s : %p
\n
"
,
instance
,
msg_name_p
,
&
NRRRC_CONFIGURATION_REQ
(
msg_p
));
openair_rrc_gNB_configuration
(
GNB_INSTANCE_TO_MODULE_ID
(
instance
),
&
NRRRC_CONFIGURATION_REQ
(
msg_p
));
break
;
case
X2AP_ENDC_SGNB_ADDITION_REQ
:
LOG_I
(
NR_RRC
,
"Received ENDC sgNB addition request from X2AP
\n
"
);
rrc_gNB_process_AdditionRequestInformation
(
GNB_INSTANCE_TO_MODULE_ID
(
instance
),
&
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg_p
));
break
;
default:
LOG_E
(
NR_RRC
,
"[gNB %d] Received unexpected message %s
\n
"
,
instance
,
msg_name_p
);
...
...
openair2/X2AP/x2ap_eNB_decoder.c
View file @
50509dfc
...
...
@@ -137,9 +137,9 @@ int x2ap_eNB_decode_pdu(X2AP_X2AP_PDU_t *pdu, const uint8_t *const buffer, uint3
length
,
0
,
0
);
if
(
asn1_xer_print
)
{
//
if (asn1_xer_print) {
xer_fprint
(
stdout
,
&
asn_DEF_X2AP_X2AP_PDU
,
pdu
);
}
//
}
if
(
dec_ret
.
code
!=
RC_OK
)
{
X2AP_ERROR
(
"Failed to decode pdu
\n
"
);
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
50509dfc
...
...
@@ -1647,11 +1647,11 @@ int x2ap_gNB_handle_ENDC_sGNB_addition_request (instance_t instance,
DevAssert
(
pdu
!=
NULL
);
x2SgNBAdditionRequest
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
SgNBAdditionRequest
;
if
(
stream
==
0
)
{
/*
if (stream == 0) {
X2AP_ERROR ("Received new x2 SgNB Addition request on stream == 0\n");
// TODO: send a x2 failure response
return 0;
}
}
*/
X2AP_DEBUG
(
"Received a new X2 SgNB Addition request
\n
"
);
...
...
@@ -1768,7 +1768,7 @@ int x2ap_gNB_handle_ENDC_sGNB_addition_request (instance_t instance,
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg
).
rrc_buffer_size
=
ie
->
value
.
choice
.
MeNBtoSgNBContainer
.
size
;
//itti_send_msg_to_task(TASK_RRC_E
NB, instance_p->instance, msg);
itti_send_msg_to_task
(
TASK_RRC_G
NB
,
instance_p
->
instance
,
msg
);
return
0
;
}
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