Commit b9b82998 authored by Stone WU's avatar Stone WU Committed by Jerome PERALDI

bug #114120: [NR SIMU]5G NRGC implementation of TTCN radioBearerList API

parent ee04e470
...@@ -58,6 +58,15 @@ typedef struct RBConfig_s { ...@@ -58,6 +58,15 @@ typedef struct RBConfig_s {
bool DiscardULData; bool DiscardULData;
}RBConfig; }RBConfig;
typedef struct NRRBConfig_s {
bool isRBConfigValid;
NR_SDAP_Config_t * Sdap;
NR_PDCP_Config_t * Pdcp;
long *pdcpTransparentSN_Size;
NR_RLC_BearerConfig_t * RlcBearer;
bool *DiscardULData;
}NRRBConfig;
typedef struct { typedef struct {
/// RAN context config file name /// RAN context config file name
char *config_file_name; char *config_file_name;
...@@ -126,6 +135,7 @@ typedef struct { ...@@ -126,6 +135,7 @@ typedef struct {
// Variable to store Transaction ID for SS in case of RRCReconfiguration // Variable to store Transaction ID for SS in case of RRCReconfiguration
long rrc_Transaction_Identifier; long rrc_Transaction_Identifier;
RBConfig RB_Config[MAX_NUM_CCs][MAX_RBS]; RBConfig RB_Config[MAX_NUM_CCs][MAX_RBS];
NRRBConfig NR_RB_Config[MAX_NUM_CCs][MAX_NR_RBS];
} RAN_CONTEXT_t; } RAN_CONTEXT_t;
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
......
...@@ -58,7 +58,10 @@ MESSAGE_DEF(RRC_RBLIST_CFG_REQ, MESSAGE_PRIORITY_MED, RrcRblistCfg ...@@ -58,7 +58,10 @@ MESSAGE_DEF(RRC_RBLIST_CFG_REQ, MESSAGE_PRIORITY_MED, RrcRblistCfg
MESSAGE_DEF(RRC_UE_CAT_INFO, MESSAGE_PRIORITY_MED, rrcUECatInfo, rrc_ue_cat_info) MESSAGE_DEF(RRC_UE_CAT_INFO, MESSAGE_PRIORITY_MED, rrcUECatInfo, rrc_ue_cat_info)
MESSAGE_DEF(RRC_AS_SECURITY_CONFIG_REQ, MESSAGE_PRIORITY_MED, RrcAsSecurityConfigReq, rrc_as_security_config_req) MESSAGE_DEF(RRC_AS_SECURITY_CONFIG_REQ, MESSAGE_PRIORITY_MED, RrcAsSecurityConfigReq, rrc_as_security_config_req)
MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req) MESSAGE_DEF(NBIOTRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, NbIoTRrcConfigurationReq, nbiotrrc_configuration_req)
// gNB: gNB_APP -> RRC messages
MESSAGE_DEF(NRRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, gNB_RrcConfigurationReq, nrrrc_configuration_req) MESSAGE_DEF(NRRRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, gNB_RrcConfigurationReq, nrrrc_configuration_req)
MESSAGE_DEF(NRRRC_RBLIST_CFG_REQ, MESSAGE_PRIORITY_MED, NRRrcRblistCfgReq, nrrrc_rblist_cfg_req)
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req) MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req)
......
...@@ -53,8 +53,12 @@ ...@@ -53,8 +53,12 @@
#include "LTE_InterFreqNeighCellInfo.h" #include "LTE_InterFreqNeighCellInfo.h"
#include "LTE_PhysCellIdRange.h" #include "LTE_PhysCellIdRange.h"
#include "LTE_NeighCellConfig.h" #include "LTE_NeighCellConfig.h"
#include "NR_SDAP-Config.h"
#include "NR_PDCP-Config.h"
#include "NR_RLC-BearerConfig.h"
#define MAX_RBS (LTE_maxDRB + 3) #define MAX_RBS (LTE_maxDRB + 3)
#define MAX_NR_RBS (NR_maxDRB+3)
//-------------------------------------------------------------------------------------------// //-------------------------------------------------------------------------------------------//
// Messages for RRC logging // Messages for RRC logging
...@@ -90,6 +94,8 @@ ...@@ -90,6 +94,8 @@
#define NRRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrrrc_configuration_req #define NRRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrrrc_configuration_req
#define NRRRC_RBLIST_CFG_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrrrc_rblist_cfg_req
#define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req #define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req
#define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req #define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req #define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
...@@ -647,6 +653,26 @@ typedef struct NRDuDlReq_s { ...@@ -647,6 +653,26 @@ typedef struct NRDuDlReq_s {
uint64_t srb_id; uint64_t srb_id;
} NRDuDlReq_t; } NRDuDlReq_t;
typedef struct NRRadioBearerConfig_s {
NR_SDAP_Config_t *Sdap;
NR_PDCP_Config_t *Pdcp;
long *pdcpTransparentSN_Size;
NR_RLC_BearerConfig_t * RlcBearer;
bool *DiscardULData;
}NRRadioBearerConfig;
typedef struct nr_rb_info_s {
uint8_t RbId;
NRRadioBearerConfig RbConfig;
} nr_rb_info;
typedef struct NRRrcRblistCfgReq_s {
int rb_count;
int cell_index;
nr_rb_info rb_list[MAX_NR_RBS];
}NRRrcRblistCfgReq;
// UE: NAS -> RRC messages // UE: NAS -> RRC messages
typedef kenb_refresh_req_t NasKenbRefreshReq; typedef kenb_refresh_req_t NasKenbRefreshReq;
typedef cell_info_req_t NasCellSelectionReq; typedef cell_info_req_t NasCellSelectionReq;
......
...@@ -321,7 +321,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP, ...@@ -321,7 +321,7 @@ int8_t nr_mac_rrc_data_ind(const module_id_t module_idP,
ue_context_p->ue_context.Srb0.Active = 1; ue_context_p->ue_context.Srb0.Active = 1;
RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[module_idP]->rrc_ue_head, ue_context_p); RB_INSERT(rrc_nr_ue_tree_s, &RC.nrrrc[module_idP]->rrc_ue_head, ue_context_p);
fill_initial_cellGroupConfig(ue_context_p->local_uid,&cellGroupConfig,scc,&RC.nrrrc[module_idP]->carrier); fill_initial_cellGroupConfig(ue_context_p->local_uid,&cellGroupConfig,scc,&RC.nrrrc[module_idP]->carrier,CC_id);
MessageDef* tmp=itti_alloc_new_message_sized(TASK_RRC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE, sizeof(f1ap_initial_ul_rrc_message_t) + sdu_lenP); MessageDef* tmp=itti_alloc_new_message_sized(TASK_RRC_GNB, 0, F1AP_INITIAL_UL_RRC_MESSAGE, sizeof(f1ap_initial_ul_rrc_message_t) + sdu_lenP);
f1ap_initial_ul_rrc_message_t *msg = &F1AP_INITIAL_UL_RRC_MESSAGE(tmp); f1ap_initial_ul_rrc_message_t *msg = &F1AP_INITIAL_UL_RRC_MESSAGE(tmp);
......
This diff is collapsed.
...@@ -108,20 +108,26 @@ void fill_initial_SpCellConfig(int uid, ...@@ -108,20 +108,26 @@ void fill_initial_SpCellConfig(int uid,
void fill_initial_cellGroupConfig(int uid, void fill_initial_cellGroupConfig(int uid,
NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *cellGroupConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier); rrc_gNB_carrier_data_t *carrier,
const int CC_id);
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
rrc_gNB_carrier_data_t *carrier, rrc_gNB_carrier_data_t *carrier,
NR_UE_NR_Capability_t *uecap); NR_UE_NR_Capability_t *uecap);
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup); void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup,const int CC_id);
bool update_rrcReconfig_cellGroupConfig(const protocol_ctxt_t *const ctxt_pP,
rrc_gNB_ue_context_t *ue_context_pP,
NR_CellGroupConfig_t *cellGroupConfig);
uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
uint8_t *const buffer, uint8_t *const buffer,
const uint8_t transaction_id, const uint8_t transaction_id,
OCTET_STRING_t *masterCellGroup_from_DU, OCTET_STRING_t *masterCellGroup_from_DU,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier); rrc_gNB_carrier_data_t *carrier,
const int CC_id);
uint8_t do_NR_SecurityModeCommand( uint8_t do_NR_SecurityModeCommand(
const protocol_ctxt_t *const ctxt_pP, const protocol_ctxt_t *const ctxt_pP,
......
This diff is collapsed.
...@@ -209,6 +209,8 @@ void rrc_gNB_remove_ue_context( ...@@ -209,6 +209,8 @@ void rrc_gNB_remove_ue_context(
RB_REMOVE(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP); RB_REMOVE(rrc_nr_ue_tree_s, &rrc_instance_pP->rrc_ue_head, ue_context_pP);
rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_pP); rrc_gNB_free_mem_UE_context(ctxt_pP, ue_context_pP);
nr_uid_linear_allocator_free(rrc_instance_pP, ue_context_pP->local_uid); nr_uid_linear_allocator_free(rrc_instance_pP, ue_context_pP->local_uid);
/*TODO: should use ASN_STRUCT_FREE to release each pointer field of ue_context */
/* free fields of ue_context_pP->ue_context */
free(ue_context_pP); free(ue_context_pP);
rrc_instance_pP->Nb_ue --; rrc_instance_pP->Nb_ue --;
LOG_I(RRC, LOG_I(RRC,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment