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
canghaiwuhen
OpenXG-RAN
Commits
f2d5bce8
Commit
f2d5bce8
authored
Oct 12, 2020
by
rmagueta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIB NR: pdcch_ConfigSIB1 selection and fill
parent
413ab9bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
39 deletions
+38
-39
openair2/RRC/NR/L2_nr_interface.c
openair2/RRC/NR/L2_nr_interface.c
+38
-39
No files found.
openair2/RRC/NR/L2_nr_interface.c
View file @
f2d5bce8
...
...
@@ -43,30 +43,30 @@
extern
RAN_CONTEXT_t
RC
;
int8_t
mac_rrc_nr_data_req
(
const
module_id_t
Mod_idP
,
const
int
CC_id
,
const
frame_t
frameP
,
const
rb_id_t
Srb_id
,
const
uint8_t
Nb_tb
,
uint8_t
*
const
buffer_pP
)
{
const
int
CC_id
,
const
frame_t
frameP
,
const
rb_id_t
Srb_id
,
const
uint8_t
Nb_tb
,
uint8_t
*
const
buffer_pP
)
{
asn_enc_rval_t
enc_rval
;
uint8_t
Sdu_size
=
0
;
uint8_t
sfn_msb
=
(
uint8_t
)
((
frameP
>>
4
)
&
0x3f
);
asn_enc_rval_t
enc_rval
;
uint8_t
Sdu_size
=
0
;
uint8_t
sfn_msb
=
(
uint8_t
)((
frameP
>>
4
)
&
0x3f
);
#ifdef DEBUG_RRC
LOG_D
(
RRC
,
"[eNB %d] mac_rrc_data_req to SRB ID=%ld
\n
"
,
Mod_idP
,
Srb_id
);
LOG_D
(
RRC
,
"[eNB %d] mac_rrc_data_req to SRB ID=%ld
\n
"
,
Mod_idP
,
Srb_id
);
#endif
gNB_RRC_INST
*
rrc
;
rrc_gNB_carrier_data_t
*
carrier
;
NR_BCCH_BCH_Message_t
*
mib
;
NR_SRB_INFO
*
srb_info
;
char
payload_size
,
*
payload_pP
;
gNB_RRC_INST
*
rrc
;
rrc_gNB_carrier_data_t
*
carrier
;
NR_BCCH_BCH_Message_t
*
mib
;
NR_SRB_INFO
*
srb_info
;
char
payload_size
,
*
payload_pP
;
rrc
=
RC
.
nrrrc
[
Mod_idP
];
carrier
=
&
rrc
->
carrier
;
mib
=
&
carrier
->
mib
;
srb_info
=
&
carrier
->
Srb0
;
rrc
=
RC
.
nrrrc
[
Mod_idP
];
carrier
=
&
rrc
->
carrier
;
mib
=
&
carrier
->
mib
;
srb_info
=
&
carrier
->
Srb0
;
/* MIBCH */
if
((
Srb_id
&
RAB_OFFSET
)
==
MIBCH
)
{
...
...
@@ -176,32 +176,31 @@ int8_t mac_rrc_nr_data_req(const module_id_t Mod_idP,
return
(
3
);
}
/* TODO BCCH SIB1 SIBs */
/* TODO BCCH SIB1 SIBs */
/* CCCH */
if
((
Srb_id
&
RAB_OFFSET
)
==
CCCH
)
{
//struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
//if (ue_context_p == NULL) return(0);
//eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
LOG_D
(
RRC
,
"[gNB %d] Frame %d CCCH request (Srb_id %ld)
\n
"
,
Mod_idP
,
frameP
,
Srb_id
);
/* CCCH */
if
(
(
Srb_id
&
RAB_OFFSET
)
==
CCCH
)
{
//struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[Mod_idP],rnti);
//if (ue_context_p == NULL) return(0);
//eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
LOG_D
(
RRC
,
"[gNB %d] Frame %d CCCH request (Srb_id %ld)
\n
"
,
Mod_idP
,
frameP
,
Srb_id
);
// srb_info=&ue_p->Srb0;
// srb_info=&ue_p->Srb0;
payload_size
=
srb_info
->
Tx_buffer
.
payload_size
;
payload_size
=
srb_info
->
Tx_buffer
.
payload_size
;
// check if data is there for MAC
if
(
payload_size
>
0
)
{
payload_pP
=
srb_info
->
Tx_buffer
.
Payload
;
LOG_D
(
RRC
,
"[gNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)
\n
"
,
Mod_idP
,
srb_info
,
payload_size
,
buffer_pP
,
payload_pP
);
// Fill buffer
memcpy
((
void
*
)
buffer_pP
,
(
void
*
)
payload_pP
,
payload_size
);
Sdu_size
=
payload_size
;
srb_info
->
Tx_buffer
.
payload_size
=
0
;
}
return
Sdu_size
;
// check if data is there for MAC
if
(
payload_size
>
0
)
{
payload_pP
=
srb_info
->
Tx_buffer
.
Payload
;
LOG_D
(
RRC
,
"[gNB %d] CCCH (%p) has %d bytes (dest: %p, src %p)
\n
"
,
Mod_idP
,
srb_info
,
payload_size
,
buffer_pP
,
payload_pP
);
// Fill buffer
memcpy
((
void
*
)
buffer_pP
,
(
void
*
)
payload_pP
,
payload_size
);
Sdu_size
=
payload_size
;
srb_info
->
Tx_buffer
.
payload_size
=
0
;
}
return
Sdu_size
;
}
return
(
0
);
return
(
0
);
}
\ No newline at end of file
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