Compare commits

...

5 Commits
dapp ... CG

Author SHA1 Message Date
Arash Sahbafard
73bd6dce15 modified: openair2/RRC/NR/nr_rrc_config.c 2024-02-14 12:04:46 +01:00
Arash Sahbafard
d03654c24e modified: openair2/RRC/NR/nr_rrc_config.c 2024-02-14 09:47:00 +01:00
Arash Sahbafard
2a0f0ab484 modified: openair2/RRC/NR/nr_rrc_config.c 2024-02-13 17:44:43 +01:00
Arash Sahbafard
c20b54d3bf modified: openair2/RRC/NR/nr_rrc_config.c 2024-02-13 17:03:34 +01:00
Arash Sahbafard
12c3ceb096 modified: openair2/RRC/NR/nr_rrc_config.c 2024-02-13 15:40:58 +01:00

View File

@@ -2225,6 +2225,127 @@ static NR_SpCellConfig_t *get_initial_SpCellConfig(int uid,
&& uplinkConfig->pusch_ServingCellConfig->choice.setup->ext1->maxMIMO_Layers
? *uplinkConfig->pusch_ServingCellConfig->choice.setup->ext1->maxMIMO_Layers
: 1;
// Allocate memory for configuredGrantConfig
initialUplinkBWP->configuredGrantConfig = calloc(1,sizeof(*initialUplinkBWP->configuredGrantConfig));
initialUplinkBWP->configuredGrantConfig->present = NR_SetupRelease_ConfiguredGrantConfig_PR_setup;
NR_ConfiguredGrantConfig_t *configuredGrantConfig = calloc(1, sizeof(*configuredGrantConfig));
initialUplinkBWP->configuredGrantConfig->choice.setup = configuredGrantConfig;
if (configuredGrantConfig != NULL){
configuredGrantConfig->frequencyHopping = calloc(1,sizeof(*configuredGrantConfig->frequencyHopping));
*configuredGrantConfig->frequencyHopping = NR_ConfiguredGrantConfig__frequencyHopping_interSlot;
//need to be checked
NR_DMRS_UplinkConfig_t *cg_DMRS_Configuration = calloc(1,sizeof(*cg_DMRS_Configuration));
cg_DMRS_Configuration->dmrs_Type = 0;
//TODO: Add the other required parameters
configuredGrantConfig->mcs_Table = calloc(1,sizeof(*configuredGrantConfig->mcs_Table));
*configuredGrantConfig->mcs_Table = NR_ConfiguredGrantConfig__mcs_Table_qam256;
configuredGrantConfig->mcs_TableTransformPrecoder = calloc(1,sizeof(*configuredGrantConfig->mcs_TableTransformPrecoder));
*configuredGrantConfig->mcs_TableTransformPrecoder = NR_ConfiguredGrantConfig__mcs_TableTransformPrecoder_qam256;
configuredGrantConfig->uci_OnPUSCH = calloc(1, sizeof(*configuredGrantConfig->uci_OnPUSCH));
configuredGrantConfig->uci_OnPUSCH->present = NR_SetupRelease_CG_UCI_OnPUSCH_PR_setup;
NR_SetupRelease_CG_UCI_OnPUSCH_t *uci_OnPUSCH = calloc(1, sizeof(*uci_OnPUSCH));
configuredGrantConfig->uci_OnPUSCH->choice.setup = uci_OnPUSCH;
configuredGrantConfig->rbg_Size = calloc(1,sizeof(*configuredGrantConfig->rbg_Size));
*configuredGrantConfig->rbg_Size = NR_ConfiguredGrantConfig__rbg_Size_config2;
configuredGrantConfig->transformPrecoder = calloc(1,sizeof(*configuredGrantConfig->transformPrecoder));
*configuredGrantConfig->transformPrecoder = NR_ConfiguredGrantConfig__transformPrecoder_enabled;
configuredGrantConfig->repK_RV = calloc(1,sizeof(*configuredGrantConfig->repK_RV));
*configuredGrantConfig->repK_RV = NR_ConfiguredGrantConfig__repK_RV_s1_0231;
configuredGrantConfig->configuredGrantTimer = calloc(1,sizeof(*configuredGrantConfig->configuredGrantTimer));
*configuredGrantConfig->configuredGrantTimer;
configuredGrantConfig->resourceAllocation;
configuredGrantConfig->powerControlLoopToUse;
//need to be checked
NR_P0_PUSCH_AlphaSetId_t p0_PUSCH_Alpha = 0;
configuredGrantConfig->nrofHARQ_Processes;
configuredGrantConfig->repK;
configuredGrantConfig->periodicity;
configuredGrantConfig->rrc_ConfiguredUplinkGrant = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant));
configuredGrantConfig->rrc_ConfiguredUplinkGrant->timeDomainOffset;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->timeDomainAllocation;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->antennaPort;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->dmrs_SeqInitialization = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->dmrs_SeqInitialization));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->dmrs_SeqInitialization;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->precodingAndNumberOfLayers;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->srs_ResourceIndicator = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->srs_ResourceIndicator));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->srs_ResourceIndicator;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->mcsAndTBS;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->frequencyHoppingOffset = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->frequencyHoppingOffset));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->frequencyHoppingOffset;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->pathlossReferenceIndex;
//extensions
/*
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1->pusch_RepTypeIndicator_r16;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1->frequencyHoppingPUSCH_RepTypeB_r16;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext1->timeReferenceSFN_r16;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2->pathlossReferenceIndex2_r17;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2->srs_ResourceIndicator2_r17;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2->precodingAndNumberOfLayers2_r17;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2->timeDomainAllocation_v1710;
configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2 = calloc(1, sizeof(*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2));
*configuredGrantConfig->rrc_ConfiguredUplinkGrant->ext2->timeDomainOffset_r17;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->cg_RetransmissionTimer_r16;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->cg_minDFI_Delay_r16;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->cg_nrofPUSCH_InSlot_r16;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->cg_nrofSlots_r16;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->cg_UCI_Multiplexing_r16;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->cg_COT_SharingOffset_r16;
configuredGrantConfig->ext1->cg_COT_SharingList_r16 = calloc(1, sizeof(*configuredGrantConfig->ext1->cg_COT_SharingList_r16));
*configuredGrantConfig->ext1->betaOffsetCG_UCI_r16;
configuredGrantConfig->ext1 = calloc(1, sizeof(*configuredGrantConfig->ext1));
*configuredGrantConfig->ext1->harq_ProcID_Offset_r16;
configuredGrantConfig->ext1 = calloc(1, sizeof(*configuredGrantConfig->ext1));
*configuredGrantConfig->ext1->harq_ProcID_Offset2_r16;
configuredGrantConfig->ext1 = calloc(1, sizeof(*configuredGrantConfig->ext1));
*configuredGrantConfig->ext1->periodicityExt_r16;
configuredGrantConfig->ext1 = calloc(1, sizeof(*configuredGrantConfig->ext1));
*configuredGrantConfig->ext1->startingFromRV0_r16;
configuredGrantConfig->ext1 = calloc(1, sizeof(*configuredGrantConfig->ext1));
*configuredGrantConfig->ext1->phy_PriorityIndex_r16;
configuredGrantConfig->ext1 = calloc(1, sizeof(*configuredGrantConfig->ext1));
*configuredGrantConfig->ext1->autonomousTx_r16;
configuredGrantConfig->ext2->mappingPattern_r17 = calloc(1,sizeof(*configuredGrantConfig->ext2->mappingPattern_r17));
*configuredGrantConfig->ext2->mappingPattern_r17 = NR_ConfiguredGrantConfig__ext2__mappingPattern_r17_cyclicMapping;
configuredGrantConfig->ext2->sequenceOffsetForRV_r17 = calloc(1,sizeof(*configuredGrantConfig->ext2->sequenceOffsetForRV_r17));
*configuredGrantConfig->ext2->sequenceOffsetForRV_r17 = NULL ;
configuredGrantConfig->ext2->powerControlLoopToUse2_r17 = calloc(1,sizeof(*configuredGrantConfig->ext2->powerControlLoopToUse2_r17));
*configuredGrantConfig->ext2->powerControlLoopToUse2_r17 = NR_ConfiguredGrantConfig__ext2__powerControlLoopToUse2_r17_n0;
configuredGrantConfig->ext2->periodicityExt_r17 = calloc(1,sizeof(*configuredGrantConfig->ext2->periodicityExt_r17));
*configuredGrantConfig->ext2->periodicityExt_r17 = NULL;
configuredGrantConfig->ext2->repK_v1710 = calloc(1,sizeof(*configuredGrantConfig->ext2->repK_v1710));
*configuredGrantConfig->ext2->repK_v1710 = NR_ConfiguredGrantConfig__ext2__repK_v1710_n12;
configuredGrantConfig->ext2->nrofHARQ_Processes_v1700 = calloc(1,sizeof(*configuredGrantConfig->ext2->nrofHARQ_Processes_v1700));
*configuredGrantConfig->ext2->nrofHARQ_Processes_v1700 = NULL;
configuredGrantConfig->ext2->harq_ProcID_Offset2_v1700 = calloc(1,sizeof(*configuredGrantConfig->ext2->harq_ProcID_Offset2_v1700));
*configuredGrantConfig->ext2->harq_ProcID_Offset2_v1700 = NULL;
configuredGrantConfig->ext2->configuredGrantTimer_v1700 = calloc(1,sizeof(*configuredGrantConfig->ext2->configuredGrantTimer_v1700));
*configuredGrantConfig->ext2->configuredGrantTimer_v1700 = NULL;
configuredGrantConfig->ext2->cg_minDFI_Delay_v1710 = calloc(1,sizeof(*configuredGrantConfig->ext2->cg_minDFI_Delay_v1710));
*configuredGrantConfig->ext2->cg_minDFI_Delay_v1710 = NULL;
configuredGrantConfig->ext3->harq_ProcID_Offset_v1730 = calloc(1,sizeof(*configuredGrantConfig->ext3->harq_ProcID_Offset_v1730));
*configuredGrantConfig->ext3->harq_ProcID_Offset_v1730 = NULL;
configuredGrantConfig->ext3->cg_nrofSlots_r17 = calloc(1,sizeof(*configuredGrantConfig->ext3->cg_nrofSlots_r17));
*configuredGrantConfig->ext3->cg_nrofSlots_r17 = NULL;
//TO do: start implimenting from line 270 and check back all the strucks you have not implimented yet
*/
}
if (configuredGrantConfig != NULL){
asn_fprint(stdout, &asn_DEF_NR_ConfiguredGrantConfig, configuredGrantConfig);
}
// We are using do_srs = 0 here because the periodic SRS will only be enabled in update_cellGroupConfig() if do_srs == 1
initialUplinkBWP->srs_Config = calloc(1, sizeof(*initialUplinkBWP->srs_Config));