adding cfra flag
This commit is contained in:
@@ -368,11 +368,17 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
ra->state = RA_IDLE;
|
||||
ra->secondaryCellGroup = secondaryCellGroup;
|
||||
ra->crnti = rnti;
|
||||
uint8_t num_preamble = secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list.count;
|
||||
ra->preambles.num_preambles = num_preamble;
|
||||
ra->preambles.preamble_list = (uint8_t *) malloc(num_preamble*sizeof(uint8_t));
|
||||
for (int i = 0; i < num_preamble; i++)
|
||||
ra->preambles.preamble_list[i] = secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra->resources.choice.ssb->ssb_ResourceList.list.array[i]->ra_PreambleIndex;
|
||||
if (secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated!=NULL) {
|
||||
if (secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra != NULL) {
|
||||
ra->cfra = true;
|
||||
struct NR_CFRA cfra = *secondaryCellGroup->spCellConfig->reconfigurationWithSync->rach_ConfigDedicated->choice.uplink->cfra;
|
||||
uint8_t num_preamble = cfra.resources.choice.ssb->ssb_ResourceList.list.count;
|
||||
ra->preambles.num_preambles = num_preamble;
|
||||
ra->preambles.preamble_list = (uint8_t *) malloc(num_preamble*sizeof(uint8_t));
|
||||
for (int i = 0; i < num_preamble; i++)
|
||||
ra->preambles.preamble_list[i] = cfra.resources.choice.ssb->ssb_ResourceList.list.array[i]->ra_PreambleIndex;
|
||||
}
|
||||
}
|
||||
LOG_I(PHY,"Added new RA process for UE RNTI %04x with initial secondaryCellGroup\n", rnti);
|
||||
} else { // secondaryCellGroup has been updated
|
||||
const int UE_id = find_nr_UE_id(Mod_idP,rnti);
|
||||
|
||||
@@ -152,6 +152,8 @@ typedef struct {
|
||||
NR_preamble_ue_t preambles;
|
||||
/// NSA: the UEs C-RNTI to use
|
||||
rnti_t crnti;
|
||||
/// CFRA flag
|
||||
bool cfra;
|
||||
} NR_RA_t;
|
||||
|
||||
/*! \brief gNB common channels */
|
||||
|
||||
Reference in New Issue
Block a user