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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
8e71ca86
Commit
8e71ca86
authored
1 year ago
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_UE_RRC_cleanup' into integration_2023_w19
parents
211fcb21
88bcbefe
Branches unavailable
2025.w14
2025.w13
2025.w12
2025.w11
2025.w10
2025.w09
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
v2.2.0
v2.1.0
v2.0.0
ARC_1.3
No related merge requests found
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
303 additions
and
593 deletions
+303
-593
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+2
-2
openair2/RRC/NR/nr_rrc_common.c
openair2/RRC/NR/nr_rrc_common.c
+2
-3
openair2/RRC/NR/nr_rrc_common.h
openair2/RRC/NR/nr_rrc_common.h
+91
-0
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+3
-87
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+0
-1
openair2/RRC/NR/nr_rrc_types.h
openair2/RRC/NR/nr_rrc_types.h
+0
-64
openair2/RRC/NR_UE/L2_interface_ue.c
openair2/RRC/NR_UE/L2_interface_ue.c
+5
-8
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+108
-239
openair2/RRC/NR_UE/rrc_defs.h
openair2/RRC/NR_UE/rrc_defs.h
+91
-70
openair2/RRC/NR_UE/rrc_list.h
openair2/RRC/NR_UE/rrc_list.h
+0
-114
openair2/RRC/NR_UE/rrc_proto.h
openair2/RRC/NR_UE/rrc_proto.h
+1
-5
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
8e71ca86
...
...
@@ -53,6 +53,7 @@
#include <executables/softmodem-common.h>
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
#include "LAYER2/RLC/rlc.h"
//#define SRS_DEBUG
...
...
@@ -1153,7 +1154,6 @@ void nr_ue_ul_scheduler(nr_uplink_indication_t *ul_info)
bool
nr_update_bsr
(
module_id_t
module_idP
,
frame_t
frameP
,
slot_t
slotP
,
uint8_t
gNB_index
)
{
mac_rlc_status_resp_t
rlc_status
;
bool
bsr_regular_triggered
=
false
;
uint8_t
lcid
;
uint8_t
lcgid
;
...
...
@@ -1196,7 +1196,7 @@ bool nr_update_bsr(module_id_t module_idP, frame_t frameP, slot_t slotP, uint8_t
lcgid_buffer_remain
[
lcgid
]
+=
mac
->
scheduling_info
.
LCID_buffer_remain
[
lcid
];
}
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
mac
->
crnti
,
gNB_index
,
frameP
,
slotP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
mac_rlc_status_resp_t
rlc_status
=
mac_rlc_status_ind
(
module_idP
,
mac
->
crnti
,
gNB_index
,
frameP
,
slotP
,
ENB_FLAG_NO
,
MBMS_FLAG_NO
,
lcid
,
0
,
0
);
lcid_bytes_in_buffer
[
lcid
]
=
rlc_status
.
bytes_in_buffer
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_common.c
View file @
8e71ca86
...
...
@@ -58,9 +58,8 @@ void rrc_init_nr_srb_param(NR_LCHAN_DESC *chan)
//-----------------------------------------------------------------------------
void
rrc_config_nr_buffer
(
NR_SRB_INFO
*
Srb_info
,
uint8_t
Lchan_type
,
uint8_t
Role
){
uint8_t
Role
)
{
Srb_info
->
Rx_buffer
.
payload_size
=
0
;
Srb_info
->
Tx_buffer
.
payload_size
=
0
;
}
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_common.h
0 → 100644
View file @
8e71ca86
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef __NR_RRC_COMMON_H__
#define __NR_RRC_COMMON_H__
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define NR_RRC_HEADER_SIZE_MAX 64
#define NR_RRC_BUFFER_SIZE_MAX 1024
typedef
struct
{
char
Payload
[
NR_RRC_BUFFER_SIZE_MAX
];
char
Header
[
NR_RRC_HEADER_SIZE_MAX
];
uint16_t
payload_size
;
}
NR_RRC_BUFFER
;
typedef
enum
UE_STATE_NR_e
{
NR_RRC_INACTIVE
=
0
,
NR_RRC_IDLE
,
NR_RRC_SI_RECEIVED
,
NR_RRC_CONNECTED
,
NR_RRC_RECONFIGURED
,
NR_RRC_HO_EXECUTION
}
NR_UE_STATE_t
;
typedef
struct
{
unsigned
short
transport_block_size
;
/*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
short
max_transport_blocks
;
/*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
long
Guaranteed_bit_rate
;
/*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
unsigned
long
Max_bit_rate
;
/*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
uint8_t
Delay_class
;
/*!< \brief Delay class offered by MAC layer scheduling*/
uint8_t
Target_bler
;
/*!< \brief Target Average Transport Block Error rate*/
uint8_t
Lchan_t
;
/*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
}
__attribute__
((
__packed__
))
NR_LCHAN_DESC
;
typedef
struct
RB_INFO_NR_s
{
uint16_t
Rb_id
;
//=Lchan_id
NR_LCHAN_DESC
Lchan_desc
[
2
];
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
}
NR_RB_INFO
;
typedef
struct
NR_SRB_INFO_s
{
uint16_t
Srb_id
;
//=Lchan_id
NR_RRC_BUFFER
Rx_buffer
;
NR_RRC_BUFFER
Tx_buffer
;
NR_LCHAN_DESC
Lchan_desc
[
2
];
unsigned
int
Trans_id
;
uint8_t
Active
;
}
NR_SRB_INFO
;
typedef
struct
RB_INFO_TABLE_ENTRY_NR_s
{
NR_RB_INFO
Rb_info
;
uint8_t
Active
;
uint32_t
Next_check_frame
;
uint8_t
status
;
}
NR_RB_INFO_TABLE_ENTRY
;
typedef
struct
SRB_INFO_TABLE_ENTRY_NR_s
{
NR_SRB_INFO
Srb_info
;
uint8_t
Active
;
uint8_t
status
;
uint32_t
Next_check_frame
;
}
NR_SRB_INFO_TABLE_ENTRY
;
void
rrc_init_nr_srb_param
(
NR_LCHAN_DESC
*
chan
);
void
rrc_config_nr_buffer
(
NR_SRB_INFO
*
Srb_info
,
uint8_t
Lchan_type
,
uint8_t
Role
);
#endif
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_defs.h
View file @
8e71ca86
...
...
@@ -37,7 +37,7 @@
#include "collection/tree.h"
#include "collection/linear_alloc.h"
#include "nr_rrc_
types
.h"
#include "nr_rrc_
common
.h"
#include "common/ngran_types.h"
#include "common/platform_constants.h"
...
...
@@ -62,7 +62,7 @@
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_EstablishmentCause.h"
#include "NR_SIB1.h"
//-------------------
#include "intertask_interface.h"
...
...
@@ -103,16 +103,6 @@ typedef enum {
NR_RRC_HO_STARTED
}
NR_RRC_status_t
;
typedef
enum
UE_STATE_NR_e
{
NR_RRC_INACTIVE
=
0
,
NR_RRC_IDLE
,
NR_RRC_SI_RECEIVED
,
NR_RRC_CONNECTED
,
NR_RRC_RECONFIGURED
,
NR_RRC_HO_EXECUTION
}
NR_UE_STATE_t
;
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
#define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n )
#define RRM_CALLOC(t,n) (t *) malloc16( sizeof(t) * n)
...
...
@@ -130,39 +120,6 @@ typedef enum UE_STATE_NR_e {
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define NR_RRC_TRANSACTION_IDENTIFIER_NUMBER 4
typedef
struct
{
unsigned
short
transport_block_size
;
/*!< \brief Minimum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
short
max_transport_blocks
;
/*!< \brief Maximum PDU size in bytes provided by RLC to MAC layer interface */
unsigned
long
Guaranteed_bit_rate
;
/*!< \brief Guaranteed Bit Rate (average) to be offered by MAC layer scheduling*/
unsigned
long
Max_bit_rate
;
/*!< \brief Maximum Bit Rate that can be offered by MAC layer scheduling*/
uint8_t
Delay_class
;
/*!< \brief Delay class offered by MAC layer scheduling*/
uint8_t
Target_bler
;
/*!< \brief Target Average Transport Block Error rate*/
uint8_t
Lchan_t
;
/*!< \brief Logical Channel Type (BCCH,CCCH,DCCH,DTCH_B,DTCH,MRBCH)*/
}
__attribute__
((
__packed__
))
NR_LCHAN_DESC
;
typedef
struct
UE_RRC_INFO_NR_s
{
NR_UE_STATE_t
State
;
uint8_t
SIB1systemInfoValueTag
;
uint32_t
SIStatus
;
uint32_t
SIcnt
;
uint8_t
MCCHStatus
[
8
];
// MAX_MBSFN_AREA
uint16_t
SIwindowsize
;
//!< Corresponds to the SIB1 si-WindowLength parameter. The unit is ms. Possible values are (final): 1,2,5,10,15,20,40
uint8_t
handoverTarget
;
//HO_STATE_t ho_state;
uint16_t
SIperiod
;
//!< Corresponds to the SIB1 si-Periodicity parameter (multiplied by 10). Possible values are (final): 80,160,320,640,1280,2560,5120
unsigned
short
UE_index
;
uint32_t
T300_active
;
uint32_t
T300_cnt
;
uint32_t
T304_active
;
uint32_t
T304_cnt
;
uint32_t
T310_active
;
uint32_t
T310_cnt
;
uint32_t
N310_cnt
;
uint32_t
N311_cnt
;
rnti_t
rnti
;
}
__attribute__
((
__packed__
))
NR_UE_RRC_INFO
;
typedef
struct
UE_S_TMSI_NR_s
{
bool
presence
;
uint16_t
amf_set_id
;
...
...
@@ -201,49 +158,8 @@ typedef struct HANDOVER_INFO_NR_s {
int
size
;
/* size of above message in bytes */
}
NR_HANDOVER_INFO
;
#define NR_RRC_HEADER_SIZE_MAX 64
#define NR_RRC_BUFFER_SIZE_MAX 1024
typedef
struct
{
char
Payload
[
NR_RRC_BUFFER_SIZE_MAX
];
char
Header
[
NR_RRC_HEADER_SIZE_MAX
];
uint16_t
payload_size
;
}
NR_RRC_BUFFER
;
#define NR_RRC_BUFFER_SIZE sizeof(RRC_BUFFER_NR)
typedef
struct
RB_INFO_NR_s
{
uint16_t
Rb_id
;
//=Lchan_id
NR_LCHAN_DESC
Lchan_desc
[
2
];
//MAC_MEAS_REQ_ENTRY *Meas_entry; //may not needed for NB-IoT
}
NR_RB_INFO
;
typedef
struct
NR_SRB_INFO_s
{
uint16_t
Srb_id
;
//=Lchan_id
NR_RRC_BUFFER
Rx_buffer
;
NR_RRC_BUFFER
Tx_buffer
;
NR_LCHAN_DESC
Lchan_desc
[
2
];
unsigned
int
Trans_id
;
uint8_t
Active
;
}
NR_SRB_INFO
;
typedef
struct
RB_INFO_TABLE_ENTRY_NR_s
{
NR_RB_INFO
Rb_info
;
uint8_t
Active
;
uint32_t
Next_check_frame
;
uint8_t
status
;
}
NR_RB_INFO_TABLE_ENTRY
;
typedef
struct
SRB_INFO_TABLE_ENTRY_NR_s
{
NR_SRB_INFO
Srb_info
;
uint8_t
Active
;
uint8_t
status
;
uint32_t
Next_check_frame
;
}
NR_SRB_INFO_TABLE_ENTRY
;
typedef
struct
nr_rrc_guami_s
{
uint16_t
mcc
;
uint16_t
mnc
;
...
...
@@ -360,7 +276,7 @@ typedef struct gNB_RRC_UE_s {
NR_CipheringAlgorithm_t
ciphering_algorithm
;
e_NR_IntegrityProtAlgorithm
integrity_algorithm
;
uint8_t
StatusRrc
;
NR_UE_STATE_t
StatusRrc
;
rnti_t
rnti
;
uint64_t
random_ue_identity
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_proto.h
View file @
8e71ca86
...
...
@@ -45,7 +45,6 @@
#include "NR_CellGroupConfig.h"
#define NR_MAX_SUPPORTED_DL_LAYERS 2
void
rrc_init_nr_srb_param
(
NR_LCHAN_DESC
*
chan
);
uint16_t
mac_rrc_nr_data_req
(
const
module_id_t
Mod_idP
,
const
int
CC_id
,
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_types.h
deleted
100644 → 0
View file @
211fcb21
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file nr_rrc_types.h
* \brief rrc types and subtypes
* \author Navid Nikaein and Raymond Knopp, WIE_TAI CHEN
* \date 2011 - 2014, 2018
* \version 1.0
* \company Eurecom, NTUST
* \email: navid.nikaein@eurecom.fr, raymond.knopp@eurecom.fr, kroempa@gmail.com
*/
#ifndef RRC_TYPES_NR_H_
#define RRC_TYPES_NR_H_
typedef
enum
Rrc_State_NR_e
{
RRC_STATE_IDLE_NR
=
0
,
RRC_STATE_INACTIVE_NR
,
RRC_STATE_CONNECTED_NR
,
RRC_STATE_FIRST_NR
=
RRC_STATE_IDLE_NR
,
RRC_STATE_LAST_NR
=
RRC_STATE_CONNECTED_NR
,
}
Rrc_State_NR_t
;
typedef
enum
Rrc_Sub_State_NR_e
{
RRC_SUB_STATE_INACTIVE_NR
=
0
,
RRC_SUB_STATE_IDLE_SEARCHING_NR
,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NR
,
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR
,
RRC_SUB_STATE_IDLE_CONNECTING_NR
,
RRC_SUB_STATE_IDLE_NR
,
RRC_SUB_STATE_CONNECTED_NR
,
RRC_SUB_STATE_INACTIVE_FIRST_NR
=
RRC_SUB_STATE_INACTIVE_NR
,
RRC_SUB_STATE_INACTIVE_LAST_NR
=
RRC_SUB_STATE_INACTIVE_NR
,
RRC_SUB_STATE_IDLE_FIRST_NR
=
RRC_SUB_STATE_IDLE_SEARCHING_NR
,
RRC_SUB_STATE_IDLE_LAST_NR
=
RRC_SUB_STATE_IDLE_NR
,
RRC_SUB_STATE_CONNECTED_FIRST_NR
=
RRC_SUB_STATE_CONNECTED_NR
,
RRC_SUB_STATE_CONNECTED_LAST_NR
=
RRC_SUB_STATE_CONNECTED_NR
,
}
Rrc_Sub_State_NR_t
;
#endif
/* RRC_TYPES_H_ */
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/L2_interface_ue.c
View file @
8e71ca86
...
...
@@ -35,6 +35,7 @@
#include "assertions.h"
#include "rrc_vars.h"
#include "MAC/mac.h"
#include "LAYER2/NR_MAC_COMMON/nr_mac.h"
typedef
uint32_t
channel_t
;
...
...
@@ -126,10 +127,6 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
case
CCCH
:
// TODO: Enable timer T300
//NR_UE_rrc_inst[Mod_idP].Info[gNB_id].T300_active = 1;
//NR_UE_rrc_inst[Mod_idP].Info[gNB_id].T300_cnt = 0;
LOG_D
(
NR_RRC
,
"nr_mac_rrc_data_req_ue: Payload size = %i
\n
"
,
NR_UE_rrc_inst
[
Mod_idP
].
Srb0
[
gNB_id
].
Tx_buffer
.
payload_size
);
memcpy
(
buffer_pP
,
(
uint8_t
*
)
NR_UE_rrc_inst
[
Mod_idP
].
Srb0
[
gNB_id
].
Tx_buffer
.
Payload
,
NR_UE_rrc_inst
[
Mod_idP
].
Srb0
[
gNB_id
].
Tx_buffer
.
payload_size
);
for
(
int
i
=
0
;
i
<
NR_UE_rrc_inst
[
Mod_idP
].
Srb0
[
gNB_id
].
Tx_buffer
.
payload_size
;
i
++
)
{
...
...
@@ -151,10 +148,10 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
int8_t
nr_rrc_RA_succeeded
(
const
module_id_t
mod_id
,
const
uint8_t
gNB_index
)
{
if
(
NR_UE_rrc_inst
[
mod_id
].
Info
[
gNB_index
]
.
T304_active
==
1
)
{
LOG_W
(
NR_RRC
,
"T304 was stoped with value %i
\n
"
,
NR_UE_rrc_inst
[
mod_id
].
Info
[
gNB_index
]
.
T304_cnt
);
NR_UE_rrc_inst
[
mod_id
].
Info
[
gNB_index
]
.
T304_active
=
0
;
NR_UE_rrc_inst
[
mod_id
].
Info
[
gNB_index
]
.
T304_cnt
=
0
;
if
(
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_active
==
1
)
{
LOG_W
(
NR_RRC
,
"T304 was stoped with value %i
\n
"
,
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_cnt
);
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_active
=
0
;
NR_UE_rrc_inst
[
mod_id
].
timers_and_constants
.
T304_cnt
=
0
;
}
return
0
;
}
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_UE.c
View file @
8e71ca86
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_defs.h
View file @
8e71ca86
...
...
@@ -38,9 +38,8 @@
#include <string.h>
#include "platform_types.h"
#include "commonDef.h"
#include "NR_MAC_COMMON/nr_mac.h"
#include "rrc_list.h"
#include "NR_asn_constant.h"
#include "NR_MeasConfig.h"
#include "NR_CellGroupConfig.h"
...
...
@@ -48,12 +47,15 @@
#include "NR_RLC-BearerConfig.h"
#include "NR_TAG.h"
#include "NR_asn_constant.h"
#include "NR_SchedulingRequestToAddMod.h"
#include "NR_MIB.h"
#include "NR_SIB1.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_DL-DCCH-Message.h"
#include "../NR/nr_rrc_defs.h"
#include "NR_SystemInformation.h"
#include "NR_UE-NR-Capability.h"
#include "RRC/NR/nr_rrc_common.h"
#include "as_message.h"
#define NB_NR_UE_INST 1
#define NB_CNX_UE 2//MAX_MANAGED_RG_PER_MOBILE
...
...
@@ -77,6 +79,36 @@ typedef struct OAI_NR_UECapability_s {
NR_UE_NR_Capability_t
*
UE_NR_Capability
;
}
OAI_NR_UECapability_t
;
typedef
enum
Rrc_State_NR_e
{
RRC_STATE_IDLE_NR
=
0
,
RRC_STATE_INACTIVE_NR
,
RRC_STATE_CONNECTED_NR
,
RRC_STATE_FIRST_NR
=
RRC_STATE_IDLE_NR
,
RRC_STATE_LAST_NR
=
RRC_STATE_CONNECTED_NR
,
}
Rrc_State_NR_t
;
typedef
enum
Rrc_Sub_State_NR_e
{
RRC_SUB_STATE_INACTIVE_NR
=
0
,
RRC_SUB_STATE_IDLE_SEARCHING_NR
,
RRC_SUB_STATE_IDLE_RECEIVING_SIB_NR
,
RRC_SUB_STATE_IDLE_SIB_COMPLETE_NR
,
RRC_SUB_STATE_IDLE_CONNECTING_NR
,
RRC_SUB_STATE_IDLE_NR
,
RRC_SUB_STATE_CONNECTED_NR
,
RRC_SUB_STATE_INACTIVE_FIRST_NR
=
RRC_SUB_STATE_INACTIVE_NR
,
RRC_SUB_STATE_INACTIVE_LAST_NR
=
RRC_SUB_STATE_INACTIVE_NR
,
RRC_SUB_STATE_IDLE_FIRST_NR
=
RRC_SUB_STATE_IDLE_SEARCHING_NR
,
RRC_SUB_STATE_IDLE_LAST_NR
=
RRC_SUB_STATE_IDLE_NR
,
RRC_SUB_STATE_CONNECTED_FIRST_NR
=
RRC_SUB_STATE_CONNECTED_NR
,
RRC_SUB_STATE_CONNECTED_LAST_NR
=
RRC_SUB_STATE_CONNECTED_NR
,
}
Rrc_Sub_State_NR_t
;
typedef
enum
requested_SI_List_e
{
SIB2
=
1
,
SIB3
=
2
,
...
...
@@ -101,6 +133,55 @@ typedef enum RA_trigger_e {
BEAM_FAILURE_RECOVERY
,
}
RA_trigger_t
;
typedef
struct
UE_RRC_SI_INFO_NR_s
{
uint32_t
SIStatus
;
uint32_t
SIcnt
;
NR_SystemInformation_t
*
si
;
NR_SIB1_t
*
sib1
;
NR_SIB2_t
*
sib2
;
NR_SIB3_t
*
sib3
;
NR_SIB4_t
*
sib4
;
NR_SIB5_t
*
sib5
;
NR_SIB6_t
*
sib6
;
NR_SIB7_t
*
sib7
;
NR_SIB8_t
*
sib8
;
NR_SIB9_t
*
sib9
;
NR_SIB10_r16_t
*
sib10
;
NR_SIB11_r16_t
*
sib11
;
NR_SIB12_r16_t
*
sib12
;
NR_SIB13_r16_t
*
sib13
;
NR_SIB14_r16_t
*
sib14
;
}
__attribute__
((
__packed__
))
NR_UE_RRC_SI_INFO
;
typedef
struct
NR_UE_Timers_Constants_s
{
// timers status
bool
T300_active
;
bool
T301_active
;
bool
T304_active
;
bool
T310_active
;
bool
T311_active
;
bool
T319_active
;
// timers
uint32_t
T300_cnt
;
uint32_t
T301_cnt
;
uint32_t
T304_cnt
;
uint32_t
T310_cnt
;
uint32_t
T311_cnt
;
uint32_t
T319_cnt
;
// counters
uint32_t
N310_cnt
;
uint32_t
N311_cnt
;
// constants (limits configured by the network)
uint32_t
N310_k
;
uint32_t
N311_k
;
uint32_t
T300_k
;
uint32_t
T301_k
;
uint32_t
T304_k
;
uint32_t
T310_k
;
uint32_t
T311_k
;
uint32_t
T319_k
;
}
NR_UE_Timers_Constants_t
;
typedef
struct
NR_UE_RRC_INST_s
{
NR_MeasConfig_t
*
meas_config
;
...
...
@@ -121,6 +202,7 @@ typedef struct NR_UE_RRC_INST_s {
rb_id_t
*
defaultDRB
;
// remember the ID of the default DRB
char
*
uecap_file
;
rnti_t
rnti
;
NR_SRB_INFO
Srb0
[
NB_SIG_CNX_UE
];
NR_SRB_INFO_TABLE_ENTRY
Srb1
[
NB_CNX_UE
];
...
...
@@ -131,27 +213,14 @@ typedef struct NR_UE_RRC_INST_s {
uint8_t
*
UECapability
;
uint16_t
UECapability_size
;
NR_UE_Timers_Constants_t
timers_and_constants
;
RA_trigger_t
ra_trigger
;
BIT_STRING_t
requested_SI_List
;
NR_SystemInformation_t
*
si
[
NB_CNX_UE
];
NR_SIB1_t
*
sib1
[
NB_CNX_UE
];
NR_SIB2_t
*
sib2
[
NB_CNX_UE
];
NR_SIB3_t
*
sib3
[
NB_CNX_UE
];
NR_SIB4_t
*
sib4
[
NB_CNX_UE
];
NR_SIB5_t
*
sib5
[
NB_CNX_UE
];
NR_SIB6_t
*
sib6
[
NB_CNX_UE
];
NR_SIB7_t
*
sib7
[
NB_CNX_UE
];
NR_SIB8_t
*
sib8
[
NB_CNX_UE
];
NR_SIB9_t
*
sib9
[
NB_CNX_UE
];
NR_SIB10_r16_t
*
sib10
[
NB_CNX_UE
];
NR_SIB11_r16_t
*
sib11
[
NB_CNX_UE
];
NR_SIB12_r16_t
*
sib12
[
NB_CNX_UE
];
NR_SIB13_r16_t
*
sib13
[
NB_CNX_UE
];
NR_SIB14_r16_t
*
sib14
[
NB_CNX_UE
];
plmn_t
plmnID
;
NR_UE_RRC_INFO
Info
[
NB_SIG_CNX_UE
];
BIT_STRING_t
requested_SI_List
;
NR_UE_RRC_SI_INFO
SInfo
[
NB_SIG_CNX_UE
];
NR_MIB_t
*
mib
;
...
...
@@ -161,54 +230,6 @@ typedef struct NR_UE_RRC_INST_s {
//RRC_LIST_TYPE(NR_SecurityAlgorithmConfig_t, NR_SecurityAlgorithmConfig) SecurityAlgorithmConfig_list;
NR_CipheringAlgorithm_t
cipheringAlgorithm
;
e_NR_IntegrityProtAlgorithm
integrityProtAlgorithm
;
// lists
// CellGroupConfig.rlc-BearerToAddModList
RRC_LIST_TYPE
(
NR_RLC_BearerConfig_t
,
NR_maxLC_ID
)
RLC_Bearer_Config_list
;
// CellGroupConfig.mac-CellGroupConfig.schedulingrequest
RRC_LIST_TYPE
(
NR_SchedulingRequestToAddMod_t
,
NR_maxNrofSR_ConfigPerCellGroup
)
SchedulingRequest_list
;
// CellGroupConfig.mac-CellGroupConfig.TAG
RRC_LIST_TYPE
(
NR_TAG_t
,
NR_maxNrofTAGs
)
TAG_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated.tdduldlslotconfig
RRC_LIST_TYPE
(
NR_TDD_UL_DL_SlotConfig_t
,
NR_maxNrofSlots
)
TDD_UL_DL_SlotConfig_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated.bwps
RRC_LIST_TYPE
(
NR_BWP_Downlink_t
,
NR_maxNrofBWPs
)
BWP_Downlink_list
;
//BWP-DownlinkDedicated 0=INIT-DL-BWP, 1..4 for DL-BWPs
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdcchconfig.controlresourceset
RRC_LIST_TYPE
(
NR_ControlResourceSet_t
,
3
)
ControlResourceSet_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdcchconfig.searchspace
RRC_LIST_TYPE
(
NR_SearchSpace_t
,
10
)
SearchSpace_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdcchconfig.slotformatindicator
RRC_LIST_TYPE
(
NR_SlotFormatCombinationsPerCell_t
,
NR_maxNrofAggregatedCellsPerCellGroup
)
SlotFormatCombinationsPerCell_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdschconfig
RRC_LIST_TYPE
(
NR_TCI_State_t
,
NR_maxNrofTCI_States
)
TCI_State_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdschconfig
RRC_LIST_TYPE
(
NR_RateMatchPattern_t
,
NR_maxNrofRateMatchPatterns
)
RateMatchPattern_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdschconfig
RRC_LIST_TYPE
(
NR_ZP_CSI_RS_Resource_t
,
NR_maxNrofZP_CSI_RS_Resources
)
ZP_CSI_RS_Resource_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdschconfig
RRC_LIST_TYPE
(
NR_ZP_CSI_RS_ResourceSet_t
,
NR_maxNrofZP_CSI_RS_ResourceSets
)
Aperidic_ZP_CSI_RS_ResourceSet_list
[
5
];
// CellGroupConfig.spCellConfig.spCellConfigDedicated.initialdlbwp.pdschconfig
RRC_LIST_TYPE
(
NR_ZP_CSI_RS_ResourceSet_t
,
NR_maxNrofZP_CSI_RS_ResourceSets
)
SP_ZP_CSI_RS_ResourceSet_list
[
5
];
// TODO check the way to implement mutiple list inside bwps
// uplink bwp also
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_NZP_CSI_RS_Resource_t
,
NR_maxNrofNZP_CSI_RS_Resources
)
NZP_CSI_RS_Resource_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_NZP_CSI_RS_ResourceSet_t
,
NR_maxNrofNZP_CSI_RS_ResourceSets
)
NZP_CSI_RS_ResourceSet_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_IM_Resource_t
,
NR_maxNrofCSI_IM_Resources
)
CSI_IM_Resource_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_IM_ResourceSet_t
,
NR_maxNrofCSI_IM_ResourceSets
)
CSI_IM_ResourceSet_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_SSB_ResourceSet_t
,
NR_maxNrofCSI_SSB_ResourceSets
)
CSI_SSB_ResourceSet_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_ResourceConfig_t
,
NR_maxNrofCSI_ResourceConfigurations
)
CSI_ResourceConfig_list
;
// CellGroupConfig.spCellConfig.spCellConfigDedicated
RRC_LIST_TYPE
(
NR_CSI_ReportConfig_t
,
NR_maxNrofCSI_ReportConfigurations
)
CSI_ReportConfig_list
;
long
selected_plmn_identity
;
Rrc_State_NR_t
nrRrcState
;
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_list.h
deleted
100644 → 0
View file @
211fcb21
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/* \file rrc_list.h
* \brief linked list implementation for ToAddModList mechanism in RRC layer
* \author R. Knopp, K.H. HSU
* \date 2018
* \version 0.1
* \company Eurecom / NTUST
* \email: knopp@eurecom.fr, kai-hsiang.hsu@eurecom.fr
* \note
* \warning
*/
#ifndef _RRC_LIST_H_
#define _RRC_LIST_H_
#define RRC_LIST_TYPE(T, N) \
struct { \
T *entries[N]; \
int next[N]; \
int prev[N]; \
int start; \
int count; \
}
// initial function for the certain list, storage number of entry, initial pointer and corresponding links
#define RRC_LIST_INIT(list, c) \
do { \
int iterator; \
(list).count = (c); \
for(iterator=0; iterator<c; ++iterator){ \
(list).entries[iterator] = NULL; \
(list).next[iterator] = -1; \
(list).prev[iterator] = -1; \
(list).start = -1; \
} \
}while(0)
// check the entry by id first then update or create new entry.
#define RRC_LIST_MOD_ADD(list, new, id_name) \
do { \
int iterator; \
for(iterator=(list).start; iterator!=-1; iterator=(list).next[iterator]){ \
if((new)->id_name == (list).entries[iterator]->id_name){ \
(list).entries[iterator] = (new); \
break; \
} \
} \
if(iterator==-1){ \
for(iterator=0; iterator<(list).count; ++iterator){ \
if((list).entries[iterator] == NULL){ \
(list).next[iterator] = (list).start; \
(list).prev[iterator] = -1; \
if((list).start != -1){ \
(list).prev[list.start] = iterator; \
} \
(list).start = iterator; \
(list).entries[iterator] = (new); \
break; \
} \
} \
} \
}while(0)
// search entries by id, unlink from the list and output free pointer for upper function to release memory
#define RRC_LIST_MOD_REL(list, id_name, id, free) \
do{ \
int iterator; \
for(iterator=(list).start; iterator!=-1; iterator=(list).next[iterator]){ \
if(id == (list).entries[iterator]->id_name){ \
if((list).prev[iterator] == -1){ \
(list).start = (list).next[iterator]; \
}else{ \
(list).next[(list).prev[iterator]] = (list).next[iterator]; \
} \
if((list).next[iterator] != -1){ \
(list).prev[(list).next[iterator]] = (list).prev[iterator]; \
} \
(free) = (list).entries[iterator]; \
(list).entries[iterator] = NULL; \
break; \
} \
} \
}while(0)
#define RRC_LIST_FOREACH(list, i) \
for((i)=(list).start; (i) != -1; (i)=(list).next[i])
#define RRC_LIST_ENTRY(list, i) \
list.entries[i]
#endif
This diff is collapsed.
Click to expand it.
openair2/RRC/NR_UE/rrc_proto.h
View file @
8e71ca86
...
...
@@ -40,6 +40,7 @@
#include "NR_CellGroupConfig.h"
#include "NR_RadioBearerConfig.h"
#include "openair2/PHY_INTERFACE/queue_t.h"
#include "common/utils/ocp_itti/intertask_interface.h"
extern
queue_t
nr_rach_ind_queue
;
extern
queue_t
nr_rx_ind_queue
;
...
...
@@ -82,11 +83,6 @@ int8_t nr_rrc_ue_process_rrcReconfiguration(const module_id_t module_id, NR_RRCR
\param meas_config measurement configuration*/
int8_t
nr_rrc_ue_process_meas_config
(
NR_MeasConfig_t
*
meas_config
);
/**\prief Process secondary cell group config from NR RRC connection reconfiguration message or EN-DC primitives
\param cell_group_config secondary cell group configuration*/
//TODO check EN-DC function call flow.
int8_t
nr_rrc_ue_process_scg_config
(
const
module_id_t
module_id
,
NR_CellGroupConfig_t
*
cell_group_config
);
/**\prief Process radio bearer config from NR RRC connection reconfiguration message
\param radio_bearer_config radio bearer configuration*/
int8_t
nr_rrc_ue_process_radio_bearer_config
(
NR_RadioBearerConfig_t
*
radio_bearer_config
);
...
...
This diff is collapsed.
Click to expand it.
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