+ //RESOURCE SET
+ elementCnt = 1;
+ DU_ALLOC(pucchCfg->resourceSetToAddModList, sizeof(struct PUCCH_Config__resourceSetToAddModList));
+ if(pucchCfg->resourceSetToAddModList == NULL)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+
+ pucchCfg->resourceSetToAddModList->list.count = elementCnt;
+ pucchCfg->resourceSetToAddModList->list.size = elementCnt * sizeof(PUCCH_ResourceSet_t *);
+ DU_ALLOC(pucchCfg->resourceSetToAddModList->list.array, pucchCfg->resourceSetToAddModList->list.size);
+ if(pucchCfg->resourceSetToAddModList->list.array == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ for(rsrcSetIdx=0; rsrcSetIdx < pucchCfg->resourceSetToAddModList->list.count; rsrcSetIdx++)
+ {
+ DU_ALLOC(pucchCfg->resourceSetToAddModList->list.array[rsrcSetIdx], sizeof(PUCCH_ResourceSet_t));
+ if(pucchCfg->resourceSetToAddModList->list.array[rsrcSetIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ }
+ rsrcSetIdx = 0;
+ rsrcSet = pucchCfg->resourceSetToAddModList->list.array[rsrcSetIdx];
+ rsrcSet->pucch_ResourceSetId = 1;
+ elementCnt = 1;
+ rsrcSet->resourceList.list.count = elementCnt;
+ rsrcSet->resourceList.list.size = elementCnt * sizeof(PUCCH_ResourceId_t *);
+ DU_ALLOC(rsrcSet->resourceList.list.array, rsrcSet->resourceList.list.size);
+ if(rsrcSet->resourceList.list.array == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ for(rsrcIdx=0; rsrcIdx < rsrcSet->resourceList.list.count; rsrcIdx++)
+ {
+ DU_ALLOC(rsrcSet->resourceList.list.array[rsrcIdx], sizeof(PUCCH_ResourceId_t));
+ if(rsrcSet->resourceList.list.array[rsrcIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ }
+ rsrcIdx = 0;
+ *(rsrcSet->resourceList.list.array[rsrcIdx]) = 1;
+
+ //RESOURCE
+ elementCnt = 1;
+ DU_ALLOC(pucchCfg->resourceToAddModList, sizeof(struct PUCCH_Config__resourceToAddModList));
+ if(pucchCfg->resourceToAddModList == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ pucchCfg->resourceToAddModList->list.count = elementCnt;
+ pucchCfg->resourceToAddModList->list.size = elementCnt * sizeof(PUCCH_Resource_t *);
+ DU_ALLOC(pucchCfg->resourceToAddModList->list.array, pucchCfg->resourceToAddModList->list.size);
+ if(pucchCfg->resourceToAddModList->list.array == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ for(rsrcIdx=0; rsrcIdx < pucchCfg->resourceToAddModList->list.count; rsrcIdx++)
+ {
+ DU_ALLOC(pucchCfg->resourceToAddModList->list.array[rsrcIdx], sizeof(PUCCH_Resource_t));
+ if(pucchCfg->resourceToAddModList->list.array[rsrcIdx] == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ }
+ rsrcIdx = 0;
+ rsrc = pucchCfg->resourceToAddModList->list.array[rsrcIdx];
+ rsrc->pucch_ResourceId = 1;
+ rsrc->startingPRB = 0;
+ rsrc->format.present = PUCCH_Resource__format_PR_format1;
+ DU_ALLOC(rsrc->format.choice.format1, sizeof(PUCCH_format1_t));
+ if(rsrc->format.choice.format1 == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ rsrc->format.choice.format1->initialCyclicShift = 0;
+ rsrc->format.choice.format1->nrofSymbols = 4;
+ rsrc->format.choice.format1->startingSymbolIndex = 0;
+ rsrc->format.choice.format1->timeDomainOCC = 0;
+
+ //PUCCH Format 1
+ DU_ALLOC(pucchCfg->format1, sizeof(struct PUCCH_Config__format1));
+ if(pucchCfg->format1 == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ pucchCfg->format1->present = PUCCH_Config__format1_PR_setup;
+ DU_ALLOC(pucchCfg->format1->choice.setup, sizeof(PUCCH_FormatConfig_t));
+ if(pucchCfg->format1->choice.setup == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ DU_ALLOC(pucchCfg->format1->choice.setup->nrofSlots, sizeof(long));
+ if(pucchCfg->format1->choice.setup->nrofSlots == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildBWPUlDedPucchCfg");
+ return RFAILED;
+ }
+ *(pucchCfg->format1->choice.setup->nrofSlots) = PUCCH_FormatConfig__nrofSlots_n4;
+
+ //DL DATA TO UL ACK