Refactor fill_default_secondaryCellGroup(): less parameters
This commit is contained in:
@@ -789,7 +789,14 @@ int main(int argc, char **argv)
|
|||||||
N_RB_DL,g_mcsTableIdx);
|
N_RB_DL,g_mcsTableIdx);
|
||||||
|
|
||||||
// TODO do a UECAP for phy-sim
|
// TODO do a UECAP for phy-sim
|
||||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, n_tx, 6, 0, 0, false, 0);
|
const gNB_RrcConfigurationReq conf = {
|
||||||
|
.pdsch_AntennaPorts = n_tx,
|
||||||
|
.minRXTXTIME = 6,
|
||||||
|
.do_CSIRS = 0,
|
||||||
|
.do_SRS = 0,
|
||||||
|
.force_256qam_off = false
|
||||||
|
};
|
||||||
|
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, UE_Capability_nr, 0, 1, &conf, 0);
|
||||||
|
|
||||||
/* RRC parameter validation for secondaryCellGroup */
|
/* RRC parameter validation for secondaryCellGroup */
|
||||||
fix_scd(scd);
|
fix_scd(scd);
|
||||||
|
|||||||
@@ -731,7 +731,14 @@ int main(int argc, char **argv)
|
|||||||
prepare_scd(scd);
|
prepare_scd(scd);
|
||||||
|
|
||||||
// TODO do a UECAP for phy-sim
|
// TODO do a UECAP for phy-sim
|
||||||
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, n_tx, 0, 0, 0, false, 0);
|
const gNB_RrcConfigurationReq conf = {
|
||||||
|
.pdsch_AntennaPorts = n_tx,
|
||||||
|
.minRXTXTIME = 0,
|
||||||
|
.do_CSIRS = 0,
|
||||||
|
.do_SRS = 0,
|
||||||
|
.force_256qam_off = false
|
||||||
|
};
|
||||||
|
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, &conf, 0);
|
||||||
|
|
||||||
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
||||||
|
|
||||||
|
|||||||
@@ -79,11 +79,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
NR_UE_NR_Capability_t *uecap,
|
NR_UE_NR_Capability_t *uecap,
|
||||||
int scg_id,
|
int scg_id,
|
||||||
int servCellIndex,
|
int servCellIndex,
|
||||||
int dl_antenna_ports,
|
const gNB_RrcConfigurationReq *configuration,
|
||||||
int minRXTXTIMEpdsch,
|
|
||||||
int do_csirs,
|
|
||||||
int do_srs,
|
|
||||||
bool force_256qam_off,
|
|
||||||
int uid);
|
int uid);
|
||||||
|
|
||||||
void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
void config_csirs(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||||
@@ -97,11 +93,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
|||||||
NR_RRCReconfiguration_IEs_t *reconfig,
|
NR_RRCReconfiguration_IEs_t *reconfig,
|
||||||
NR_CellGroupConfig_t *secondaryCellGroup,
|
NR_CellGroupConfig_t *secondaryCellGroup,
|
||||||
NR_UE_NR_Capability_t *uecap,
|
NR_UE_NR_Capability_t *uecap,
|
||||||
int dl_antenna_ports,
|
const gNB_RrcConfigurationReq *configuration,
|
||||||
int minRXTXTIMEpdsch,
|
|
||||||
int do_csirs,
|
|
||||||
int do_srs,
|
|
||||||
bool force_256qam_off,
|
|
||||||
int uid);
|
int uid);
|
||||||
|
|
||||||
void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig,
|
void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig,
|
||||||
|
|||||||
@@ -249,11 +249,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
|
|||||||
reconfig_ies,
|
reconfig_ies,
|
||||||
ue_context_p->ue_context.secondaryCellGroup,
|
ue_context_p->ue_context.secondaryCellGroup,
|
||||||
ue_context_p->ue_context.UE_Capability_nr,
|
ue_context_p->ue_context.UE_Capability_nr,
|
||||||
configuration->pdsch_AntennaPorts,
|
configuration,
|
||||||
configuration->minRXTXTIME,
|
|
||||||
configuration->do_CSIRS,
|
|
||||||
configuration->do_SRS,
|
|
||||||
configuration->force_256qam_off,
|
|
||||||
ue_context_p->local_uid);
|
ue_context_p->local_uid);
|
||||||
ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity;
|
ue_context_p->ue_id_rnti = ue_context_p->ue_context.secondaryCellGroup->spCellConfig->reconfigurationWithSync->newUE_Identity;
|
||||||
NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config));
|
NR_CG_Config_t *CG_Config = calloc(1,sizeof(*CG_Config));
|
||||||
|
|||||||
@@ -56,12 +56,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
NR_UE_NR_Capability_t *uecap,
|
NR_UE_NR_Capability_t *uecap,
|
||||||
int scg_id,
|
int scg_id,
|
||||||
int servCellIndex,
|
int servCellIndex,
|
||||||
int dl_antenna_ports,
|
const gNB_RrcConfigurationReq *configuration,
|
||||||
int minRXTXTIME,
|
int uid)
|
||||||
int do_csirs,
|
{
|
||||||
int do_srs,
|
const int dl_antenna_ports = configuration->pdsch_AntennaPorts;
|
||||||
bool force_256qam_off,
|
const int do_csirs = configuration->do_CSIRS;
|
||||||
int uid) {
|
|
||||||
|
|
||||||
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
|
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
|
||||||
AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
|
AssertFatal(secondaryCellGroup!=NULL,"secondaryCellGroup is null\n");
|
||||||
@@ -606,7 +605,10 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup1=NULL;
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rateMatchPatternGroup2=NULL;
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->rbg_Size=NR_PDSCH_Config__rbg_Size_config1;
|
||||||
set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing, force_256qam_off ? NULL : uecap, bwp->bwp_Dedicated, servingcellconfigcommon);
|
set_dl_mcs_table(bwp->bwp_Common->genericParameters.subcarrierSpacing,
|
||||||
|
configuration->force_256qam_off ? NULL : uecap,
|
||||||
|
bwp->bwp_Dedicated,
|
||||||
|
servingcellconfigcommon);
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI));
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI));
|
||||||
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1;
|
*bwp->bwp_Dedicated->pdsch_Config->choice.setup->maxNrofCodeWordsScheduledByDCI = NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1;
|
||||||
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling;
|
bwp->bwp_Dedicated->pdsch_Config->choice.setup->prb_BundlingType.present = NR_PDSCH_Config__prb_BundlingType_PR_staticBundling;
|
||||||
@@ -771,7 +773,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id);
|
ASN_SEQUENCE_ADD(&srs_resset0->srs_ResourceIdList->list,srs_resset0_id);
|
||||||
srs_Config->srs_ResourceToReleaseList=NULL;
|
srs_Config->srs_ResourceToReleaseList=NULL;
|
||||||
|
|
||||||
if(do_srs) {
|
if (configuration->do_SRS) {
|
||||||
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic;
|
srs_resset0->resourceType.present = NR_SRS_ResourceSet__resourceType_PR_periodic;
|
||||||
srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic));
|
srs_resset0->resourceType.choice.periodic = calloc(1,sizeof(*srs_resset0->resourceType.choice.periodic));
|
||||||
srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL;
|
srs_resset0->resourceType.choice.periodic->associatedCSI_RS = NULL;
|
||||||
@@ -815,7 +817,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
srs_res0->freqHopping.b_SRS);
|
srs_res0->freqHopping.b_SRS);
|
||||||
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
|
srs_res0->groupOrSequenceHopping=NR_SRS_Resource__groupOrSequenceHopping_neither;
|
||||||
|
|
||||||
if(do_srs) {
|
if (configuration->do_SRS) {
|
||||||
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic;
|
srs_res0->resourceType.present= NR_SRS_Resource__resourceType_PR_periodic;
|
||||||
srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic));
|
srs_res0->resourceType.choice.periodic=calloc(1,sizeof(*srs_res0->resourceType.choice.periodic));
|
||||||
srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160;
|
srs_res0->resourceType.choice.periodic->periodicityAndOffset_p.present = NR_SRS_PeriodicityAndOffset_PR_sl160;
|
||||||
@@ -936,7 +938,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
|
|||||||
long *delay[8];
|
long *delay[8];
|
||||||
for (int i=0;i<8;i++) {
|
for (int i=0;i<8;i++) {
|
||||||
delay[i] = calloc(1,sizeof(*delay[i]));
|
delay[i] = calloc(1,sizeof(*delay[i]));
|
||||||
*delay[i] = i+minRXTXTIME;
|
*delay[i] = i + configuration->minRXTXTIME;
|
||||||
ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]);
|
ASN_SEQUENCE_ADD(&pucch_Config->dl_DataToUL_ACK->list,delay[i]);
|
||||||
}
|
}
|
||||||
pucch_Config->spatialRelationInfoToAddModList = calloc(1,sizeof(*pucch_Config->spatialRelationInfoToAddModList));
|
pucch_Config->spatialRelationInfoToAddModList = calloc(1,sizeof(*pucch_Config->spatialRelationInfoToAddModList));
|
||||||
@@ -1344,11 +1346,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
|||||||
NR_RRCReconfiguration_IEs_t *reconfig,
|
NR_RRCReconfiguration_IEs_t *reconfig,
|
||||||
NR_CellGroupConfig_t *secondaryCellGroup,
|
NR_CellGroupConfig_t *secondaryCellGroup,
|
||||||
NR_UE_NR_Capability_t *uecap,
|
NR_UE_NR_Capability_t *uecap,
|
||||||
int dl_antenna_ports,
|
const gNB_RrcConfigurationReq *configuration,
|
||||||
int minRXTXTIME,
|
|
||||||
int do_csirs,
|
|
||||||
int do_srs,
|
|
||||||
bool force_256qam_off,
|
|
||||||
int uid) {
|
int uid) {
|
||||||
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
|
AssertFatal(servingcellconfigcommon!=NULL,"servingcellconfigcommon is null\n");
|
||||||
AssertFatal(reconfig!=NULL,"reconfig is null\n");
|
AssertFatal(reconfig!=NULL,"reconfig is null\n");
|
||||||
@@ -1362,11 +1360,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
|
|||||||
uecap,
|
uecap,
|
||||||
1,
|
1,
|
||||||
1,
|
1,
|
||||||
dl_antenna_ports,
|
configuration,
|
||||||
minRXTXTIME,
|
|
||||||
do_csirs,
|
|
||||||
do_srs,
|
|
||||||
force_256qam_off,
|
|
||||||
uid);
|
uid);
|
||||||
|
|
||||||
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
|
||||||
|
|||||||
Reference in New Issue
Block a user