DU_ALLOC(mib->systemFrameNumber.buf, mib->systemFrameNumber.size);
if(!(mib->systemFrameNumber.buf))
{
- DU_LOG("DU APP: MIB msg memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: MIB msg memory allocation failure");
return RFAILED;
}
DU_ALLOC(mib->spare.buf, mib->spare.size);
if(!mib->spare.buf)
{
- DU_LOG("DU APP: MIB msg memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: MIB msg memory allocation failure");
return RFAILED;
}
*(mib->spare.buf) = SPARE;
* ****************************************************************/
uint8_t BuildMibPdu()
{
- uint8_t BuildMibret;
uint8_t ret = RFAILED;
BCCH_BCH_Message_t *bcchMsg;
asn_enc_rval_t encRetVal; /* Encoder return value */
DU_ALLOC(bcchMsg, sizeof(BCCH_BCH_Message_t));
if(!bcchMsg)
{
- DU_LOG("\nMemory allocation failure in BuildMibPdu");
+ DU_LOG("\nERROR --> Memory allocation failure in BuildMibPdu");
break;
}
DU_ALLOC(bcchMsg->message.choice.mib, sizeof(MIB_t));
if(!bcchMsg->message.choice.mib)
{
- DU_LOG("\nMemory allocation failure in BuildMibPdu");
+ DU_LOG("\nERROR --> Memory allocation failure in BuildMibPdu");
break;
}
- BuildMibret = BuildMib(bcchMsg->message.choice.mib);
- if(BuildMibret != ROK)
+ if(BuildMib(bcchMsg->message.choice.mib) != ROK)
{
break;
}
encRetVal = aper_encode(&asn_DEF_BCCH_BCH_Message, 0,
bcchMsg, PrepFinalEncBuf, encBuf);
printf("\nencbufSize:%d\n", encBufSize);
- if(encRetVal.encoded == -1)
+ if(encRetVal.encoded == -1)
{
- DU_LOG("\nDU APP: Could not encode BCCH BCH Message Type structure(at %s)\n",
+ DU_LOG("\nERROR --> DU APP: Could not encode BCCH BCH Message Type structure(at %s)\n",
encRetVal.failed_type?\
encRetVal.failed_type->name
:"unknown");
MIB_t *mibMsg;
asn_enc_rval_t encRetVal; /* Encoder return value */
uint8_t ret = RFAILED;
- uint8_t BuildMibret;
while(true)
{
DU_ALLOC(mibMsg, sizeof(MIB_t));
if(!mibMsg)
{
- DU_LOG("DU APP: MIB msg memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: MIB msg memory allocation failure");
return RFAILED;
}
- BuildMibret = BuildMib(mibMsg);
- if(BuildMibret != ROK)
+ if(BuildMib(mibMsg) != ROK)
{
break;
}
printf("\nencbufSize:%d\n", encBufSize);
if(encRetVal.encoded == -1)
{
- DU_LOG("\nDU APP: Could not encode MIB structure(at %s)\n",
+ DU_LOG("\nERROR --> DU APP: Could not encode MIB structure(at %s)\n",
encRetVal.failed_type?\
encRetVal.failed_type->name
:"unknown");
DU_ALLOC(cellIdentity->buf, cellIdentity->size);
if(!cellIdentity->buf)
{
- DU_LOG("DU APP: CellIdentity memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: CellIdentity memory allocation failure");
return RFAILED;
- }
- *cellIdentity->buf = duCfgParam.sib1Params.cellIdentity;
+ }
+ memset(cellIdentity->buf, 0, cellIdentity->size);
+ cellIdentity->buf[4] = duCfgParam.sib1Params.cellIdentity;
return ROK;
}
DU_ALLOC(ranac, sizeof(RAN_AreaCode_t));
if(!ranac)
{
- DU_LOG("DU APP: RANAC memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: RANAC memory allocation failure");
return RFAILED;
}
*ranac = duCfgParam.sib1Params.ranac;
DU_ALLOC(tac, sizeof(TrackingAreaCode_t));
if(!tac)
{
- DU_LOG("DU APP: TAC memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: TAC memory allocation failure");
return RFAILED;
}
DU_ALLOC(tac->buf, tac->size);
if(!tac->buf)
{
- DU_LOG("DU APP: TAC memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: TAC memory allocation failure");
return RFAILED;
}
*(tac->buf) = duCfgParam.sib1Params.tac;
cellAccessInfo->plmn_IdentityList.list.size);
if(!cellAccessInfo->plmn_IdentityList.list.array)
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
elementCnt = cellAccessInfo->plmn_IdentityList.list.count;
sizeof(PLMN_IdentityInfo_t));
if(!cellAccessInfo->plmn_IdentityList.list.array[idx])
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
}
DU_ALLOC(plmnIdInfo->list.array, plmnIdInfo->list.size);
if(!plmnIdInfo->list.array)
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
sizeof(PLMN_IdentitY_t));
if(!(plmnIdInfo->list.array[idx1]))
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
}
sizeof(MCC_t));
if(!plmnIdInfo->list.array[idx1]->mcc)
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
plmnIdInfo->list.array[idx1]->mcc->list.size)
if(!(plmnIdInfo->list.array[idx1]->mcc->list.array))
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
for(idx2=0; idx2<elementCnt; idx2++)
sizeof(MCC_MNC_Digit_t));
if(!plmnIdInfo->list.array[idx1]->mcc->list.array[idx2])
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
*(plmnIdInfo->list.array[idx1]->mcc->list.array[idx2])=\
plmnIdInfo->list.array[idx1]->mnc.list.size);
if(!plmnIdInfo->list.array[idx1]->mnc.list.array)
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
for(idx2=0; idx2<elementCnt; idx2++)
sizeof(MCC_MNC_Digit_t));
if(!plmnIdInfo->list.array[idx1]->mnc.list.array[idx2])
{
- DU_LOG("DU APP: BuildPlmnList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildPlmnList memory allocation failure");
return RFAILED;
}
*(plmnIdInfo->list.array[idx1]->mnc.list.array[idx2])=\
DU_ALLOC(sibMapInfo->list.array, sibMapInfo->list.size);
if(!sibMapInfo->list.array)
{
- DU_LOG("DU APP: BuildSibMapInfoList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildSibMapInfoList memory allocation failure");
return RFAILED;
}
DU_ALLOC(sibMapInfo->list.array[itr], sizeof(SIB_TypeInfo_t));
if(!sibMapInfo->list.array[itr])
{
- DU_LOG("DU APP: BuildSibMapInfoList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildSibMapInfoList memory allocation failure");
return RFAILED;
}
}
DU_ALLOC(sibTypeInfo->valueTag, sizeof(long));
if(!sibTypeInfo->valueTag)
{
- DU_LOG("DU APP: BuildSibMapInfoList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildSibMapInfoList memory allocation failure");
return RFAILED;
}
DU_ALLOC(si_SchedulingInfoList->list.array, si_SchedulingInfoList->list.size);
if(!si_SchedulingInfoList->list.array)
{
- DU_LOG("DU APP: BuildSiSchedInfoList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildSiSchedInfoList memory allocation failure");
return RFAILED;
}
DU_ALLOC(si_SchedulingInfoList->list.array[itr], sizeof(struct SchedulingInfo));
if(!si_SchedulingInfoList->list.array[itr])
{
- DU_LOG("DU APP: BuildSiSchedInfoList memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: BuildSiSchedInfoList memory allocation failure");
return RFAILED;
}
}
DU_ALLOC(scsCarrierList->list.array, scsCarrierList->list.size);
if(!scsCarrierList->list.array)
{
- DU_LOG("\nDU APP : SCS Specific Carrier list memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SCS Specific Carrier list memory allocation failed");
return RFAILED;
}
DU_ALLOC(scsCarrierList->list.array[idx], sizeof(SCS_SpecificCarrier_t));
if(!scsCarrierList->list.array[idx])
{
- DU_LOG("\nDU APP : SCS Specific Carrier list memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SCS Specific Carrier list memory allocation failed");
return RFAILED;
}
}
DU_ALLOC(searchSpclist->list.array, searchSpclist->list.size)
if(!searchSpclist->list.array)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
DU_ALLOC(searchSpclist->list.array[idx], sizeof(SearchSpace_t));
if(!searchSpclist->list.array[idx])
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
}
DU_ALLOC(searchSpace->controlResourceSetId, sizeof(ControlResourceSetId_t));
if(!searchSpace->controlResourceSetId)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
*searchSpace->controlResourceSetId = duPdcchCfg.ctrlRsrcSetId;
sizeof(struct SearchSpace__monitoringSlotPeriodicityAndOffset));
if(!searchSpace->monitoringSlotPeriodicityAndOffset)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
searchSpace->monitoringSlotPeriodicityAndOffset->present = \
}
default:
{
- DU_LOG("\nDU APP : Invalid value:Montoring slot periodicity and offset");
+ DU_LOG("\nERROR --> DU APP : Invalid value:Montoring slot periodicity and offset");
return RFAILED;
}
}
sizeof(BIT_STRING_t));
if(!searchSpace->monitoringSymbolsWithinSlot)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
searchSpace->monitoringSymbolsWithinSlot->size = 2*sizeof(uint8_t);
searchSpace->monitoringSymbolsWithinSlot->size );
if(!searchSpace->monitoringSymbolsWithinSlot->buf)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
searchSpace->monitoringSymbolsWithinSlot->buf[0] = duPdcchCfg.monitorSymbolsInSlot[0];
sizeof(struct SearchSpace__nrofCandidates));
if(!searchSpace->nrofCandidates)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
searchSpace->nrofCandidates->aggregationLevel1 = duPdcchCfg.numCandAggLvl1;
sizeof( struct SearchSpace__searchSpaceType));
if(!searchSpace->searchSpaceType)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
DU_ALLOC(searchSpace->searchSpaceType->choice.common, sizeof(struct SearchSpace__searchSpaceType__common));
if(!searchSpace->searchSpaceType->choice.common)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
SearchSpace__searchSpaceType__common__dci_Format0_0_AndFormat1_0));
if(!searchSpace->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0)
{
- DU_LOG("\nDU APP : Common search space list memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed");
return RFAILED;
}
break;
}
default:
{
- DU_LOG("\nDU_APP: Invalid Search Space type");
+ DU_LOG("\nERROR --> DU_APP: Invalid Search Space type");
return RFAILED;
}
}
DU_ALLOC(pdcchCfg->choice.setup, sizeof(PDCCH_ConfigCommon_t));
if(!pdcchCfg->choice.setup)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
pdcchSetup = pdcchCfg->choice.setup;
DU_ALLOC(pdcchSetup->controlResourceSetZero, sizeof(ControlResourceSetZero_t));
if(!pdcchSetup->controlResourceSetZero)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
*pdcchSetup->controlResourceSetZero = duPdcchCfg.ctrlRsrcSetZero;
DU_ALLOC(pdcchSetup->searchSpaceZero, sizeof(SearchSpaceZero_t));
if(!pdcchSetup->searchSpaceZero)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
*pdcchSetup->searchSpaceZero = duPdcchCfg.searchSpcZero;
sizeof(struct PDCCH_ConfigCommon__commonSearchSpaceList));
if(!pdcchSetup->commonSearchSpaceList)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
elementCnt = ODU_VALUE_ONE;
DU_ALLOC(pdcchSetup->searchSpaceSIB1, sizeof(SearchSpaceId_t));
if(!pdcchSetup->searchSpaceSIB1)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
*pdcchSetup->searchSpaceSIB1 = duPdcchCfg.searchSpcSib1;
DU_ALLOC(pdcchSetup->pagingSearchSpace, sizeof(SearchSpaceId_t));
if(!pdcchSetup->pagingSearchSpace)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
*pdcchSetup->pagingSearchSpace = duPdcchCfg.pagingSearchSpc;
DU_ALLOC(pdcchSetup->ra_SearchSpace, sizeof(SearchSpaceId_t));
if(!pdcchSetup->ra_SearchSpace)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
*pdcchSetup->ra_SearchSpace = duPdcchCfg.raSearchSpc;
}
default :
{
- DU_LOG("\nDU APP : Invalid PDCCH Config type");
+ DU_LOG("\nERROR --> DU APP : Invalid PDCCH Config type");
return RFAILED;
}
}
DU_ALLOC(pdschCfg->choice.setup, sizeof(PDSCH_ConfigCommon_t));
if(!pdschCfg->choice.setup)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
pdschSetup = pdschCfg->choice.setup;
sizeof(PDSCH_TimeDomainResourceAllocationList_t));
if(!pdschSetup->pdsch_TimeDomainAllocationList)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
- elementCnt = ODU_VALUE_ONE;
+ elementCnt = duPdschCfg.numTimeDomRsrcAlloc;
pdschSetup->pdsch_TimeDomainAllocationList->list.count = elementCnt;
pdschSetup->pdsch_TimeDomainAllocationList->list.size = elementCnt * sizeof(PDSCH_TimeDomainResourceAllocation_t *);
pdschSetup->pdsch_TimeDomainAllocationList->list.size);
if(!pdschSetup->pdsch_TimeDomainAllocationList->list.array)
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
sizeof(PDSCH_TimeDomainResourceAllocation_t));
if(!pdschSetup->pdsch_TimeDomainAllocationList->list.array[idx])
{
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
return RFAILED;
}
}
- idx = 0;
- timeDomRsrcAllocInfo = pdschSetup->pdsch_TimeDomainAllocationList->list.array[idx];
-
- /* K0 */
- DU_ALLOC(timeDomRsrcAllocInfo->k0, sizeof(long));
- if(!timeDomRsrcAllocInfo->k0)
- {
- DU_LOG("\nDU APP : PDCCH Config memory alloc failed");
- return RFAILED;
- }
- *timeDomRsrcAllocInfo->k0 = duPdschCfg.k0;
-
- timeDomRsrcAllocInfo->mappingType = duPdschCfg.mapType;
- timeDomRsrcAllocInfo->startSymbolAndLength = duPdschCfg.sliv;
-
+ for(idx = 0; idx < pdschSetup->pdsch_TimeDomainAllocationList->list.count; idx++)
+ {
+ timeDomRsrcAllocInfo = pdschSetup->pdsch_TimeDomainAllocationList->list.array[idx];
+
+ /* K0 */
+ DU_ALLOC(timeDomRsrcAllocInfo->k0, sizeof(long));
+ if(!timeDomRsrcAllocInfo->k0)
+ {
+ DU_LOG("\nERROR --> DU APP : PDCCH Config memory alloc failed");
+ return RFAILED;
+ }
+ *timeDomRsrcAllocInfo->k0 = duPdschCfg.timeDomAlloc[idx].k0;
+
+ timeDomRsrcAllocInfo->mappingType = duPdschCfg.timeDomAlloc[idx].mapType;
+ timeDomRsrcAllocInfo->startSymbolAndLength = duPdschCfg.timeDomAlloc[idx].sliv;
+ }
break;
}
default:
{
- DU_LOG("\nDU APP: Invalid PDSCH Configuration type");
+ DU_LOG("\nERROR --> DU APP: Invalid PDSCH Configuration type");
return RFAILED;
}
}
sizeof(struct BWP_DownlinkCommon__pdcch_ConfigCommon));
if(!bwp->pdcch_ConfigCommon)
{
- DU_LOG("\nDU APP : DL BWP memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : DL BWP memory allocation failed");
return RFAILED;
}
ret=BuildPdcchCfgCommon(bwp->pdcch_ConfigCommon);
sizeof(struct BWP_DownlinkCommon__pdsch_ConfigCommon));
if(!bwp->pdsch_ConfigCommon)
{
- DU_LOG("\nDU APP : DL BWP memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : DL BWP memory allocation failed");
return RFAILED;
}
ret=BuildPdschCfgCommon(bwp->pdsch_ConfigCommon);
return ROK;
}/* BuildBcchConfig */
+/*******************************************************************
+ *
+ * @brief fills First PDCCH monitoring Paging occasions
+ *
+ * @details
+ *
+ * Function : fillFirstPdcchMonitoringOcc
+ *
+ * Functionality:
+ * Fills PDCCH Monitoring PO in PCCH configuration
+ *
+ * @params[in]
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t fillFirstPdcchMonitoringOcc(struct PCCH_Config__firstPDCCH_MonitoringOccasionOfPO *firstPO,\
+ PcchCfg *srcPcchCfg)
+{
+ uint8_t numPO = 0, poIdx = 0;
+
+ firstPO->present = srcPcchCfg->firstPDCCHMontioringType;
+
+ GET_NUM_PAGING_OCC(srcPcchCfg->ns, numPO);
+ if(srcPcchCfg->ns == 0)
+ {
+ DU_LOG("\nINFO --> DU APP : Paging Occasions is ZERO, no need to fill further");
+ return ROK;
+ }
+
+ /*Note: Valid values for each number of PO is from Spec 36.331: PCCH-COnfig*/
+ switch(firstPO->present)
+ {
+ case PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_NOTHING:
+ {
+ break;
+ }
+ case PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_sCS15KHZoneT:
+ {
+ DU_ALLOC(firstPO->choice.sCS15KHZoneT, \
+ sizeof(struct PCCH_Config__firstPDCCH_MonitoringOccasionOfPO__sCS15KHZoneT));
+
+ if(firstPO->choice.sCS15KHZoneT == NULLP)
+ {
+ DU_LOG("\nERROR --> DU APP : FirstPdcchMonitoringPO Memory allocation failure");
+ return RFAILED;
+ }
+ firstPO->choice.sCS15KHZoneT->list.count = numPO;
+ firstPO->choice.sCS15KHZoneT->list.size = numPO * sizeof(long *);
+
+ DU_ALLOC(firstPO->choice.sCS15KHZoneT->list.array, firstPO->choice.sCS15KHZoneT->list.size);
+ if(!firstPO->choice.sCS15KHZoneT->list.array)
+ {
+ DU_LOG("\nERROR --> DU APP : FirstPdcchMonitoringPO Memory allocation failure");
+ return RFAILED;
+ }
+
+ for(poIdx = 0; poIdx < numPO; poIdx++)
+ {
+ /* Spec 36.331: PCCH-Config: firstPDCCH-MonitoringOccasionOfPO [MAX of sCS15KHZoneT]
+ * Since FirstPDCCHMonitoring_PO is not valid thus no need to continue further*/
+ if(srcPcchCfg->firstPDCCHMontioringInfo[poIdx] > 139)
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid Paging Ocassion value for 15kHz");
+ return RFAILED;
+ }
+ DU_ALLOC(firstPO->choice.sCS15KHZoneT->list.array[poIdx], sizeof(long));
+ if(!firstPO->choice.sCS15KHZoneT->list.array[poIdx])
+ {
+ DU_LOG("\nERROR --> DU APP : FirstPdcchMonitoringPO Memory allocation failure");
+ return RFAILED;
+ }
+ }
+
+ poIdx = 0;
+ *firstPO->choice.sCS15KHZoneT->list.array[poIdx] = srcPcchCfg->firstPDCCHMontioringInfo[poIdx];
+
+ break;
+ }
+ case PCCH_Config__firstPDCCH_MonitoringOccasionOfPO_PR_sCS30KHZoneT_SCS15KHZhalfT:
+ {
+ DU_ALLOC(firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT, \
+ sizeof(struct PCCH_Config__firstPDCCH_MonitoringOccasionOfPO__sCS30KHZoneT_SCS15KHZhalfT));
+
+ if(firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT == NULLP)
+ {
+ DU_LOG("\nERROR --> DU APP : FirstPdcchMonitoringPO Memory allocation failure");
+ return RFAILED;
+ }
+ firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.count = numPO;
+ firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.size = numPO * sizeof(long *);
+
+ DU_ALLOC(firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.array, \
+ firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.size);
+
+ if(!firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.array)
+ {
+ DU_LOG("\nERROR --> DU APP : FirstPdcchMonitoringPO Memory allocation failure");
+ return RFAILED;
+ }
+
+ for(poIdx = 0; poIdx < numPO; poIdx++)
+ {
+ /* Spec 36.331: PCCH-Config:firstPDCCH-MonitoringOccasionOfPO [MAX of sCS30KHZoneT-SCS15KHZhalfT]
+ * Since FirstPDCCHMonitoring_PO is not valid thus no need to continue further*/
+ if(srcPcchCfg->firstPDCCHMontioringInfo[poIdx] > 279)
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid Paging Ocassion value for 30kHz or 15kHz HAlFT");
+ return RFAILED;
+ }
+ DU_ALLOC(firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.array[poIdx], sizeof(long));
+ if(!firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.array[poIdx])
+ {
+ DU_LOG("\nERROR --> DU APP : FirstPdcchMonitoringPO Memory allocation failure");
+ return RFAILED;
+ }
+ }
+
+ poIdx = 0;
+ *firstPO->choice.sCS30KHZoneT_SCS15KHZhalfT->list.array[poIdx] = srcPcchCfg->firstPDCCHMontioringInfo[poIdx];
+ break;
+ }
+ //TODO for other cases
+ default:
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid firstPDCCH-MonitoringOccasionOfPO");
+ return RFAILED;
+
+ break;
+ }
+ }
+ return ROK;
+}
/*******************************************************************
*
* @brief Builds PCCH configuration
duPcchCfg = duCfgParam.sib1Params.srvCellCfgCommSib.dlCfg.pcchCfg;
pcchCfg->defaultPagingCycle = duPcchCfg.dfltPagingCycle;
- pcchCfg->nAndPagingFrameOffset.present = duPcchCfg.nAndPagingFrmOffPresent;
+ pcchCfg->nAndPagingFrameOffset.present = duPcchCfg.nAndPagingFrmOffsetType;
switch(pcchCfg->nAndPagingFrameOffset.present)
{
+ /**Note: PagingFrame Offset Value differs for each Paging Duration
+ *(oneT, halfT,...). The Range of Offset given in Spec 38.331,Pcch-Config*/
case PCCH_Config__nAndPagingFrameOffset_PR_NOTHING:
- {
- //TODO
- break;
- }
+ {
+ //TODO
+ break;
+ }
case PCCH_Config__nAndPagingFrameOffset_PR_oneT:
- {
- //TODO
- break;
- }
+ {
+ pcchCfg->nAndPagingFrameOffset.choice.oneT = NULLD;
+ break;
+ }
case PCCH_Config__nAndPagingFrameOffset_PR_halfT:
- {
- //TODO
- break;
- }
+ {
+ /*Spec 38.331: PCCH_Config: nAndPagingFrameOffset [MAX value of halfT] */
+ if(duPcchCfg.pageFrameOffset > 1)
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid PagingFrameOffset for HALF_T");
+ return RFAILED;
+ }
+ pcchCfg->nAndPagingFrameOffset.choice.halfT = duPcchCfg.pageFrameOffset;
+ break;
+ }
case PCCH_Config__nAndPagingFrameOffset_PR_quarterT:
- {
- //TODO
- break;
- }
+ {
+ /*Spec 38.331: PCCH_Config: nAndPagingFrameOffset [MAX value of quarterT] */
+ if(duPcchCfg.pageFrameOffset > 3)
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid PagingFrameOffset for QUARTER_T");
+ return RFAILED;
+ }
+ pcchCfg->nAndPagingFrameOffset.choice.quarterT = duPcchCfg.pageFrameOffset;
+ break;
+ }
case PCCH_Config__nAndPagingFrameOffset_PR_oneEighthT:
- {
- //TODO
- break;
- }
+ {
+ /*Spec 38.331: PCCH_Config: nAndPagingFrameOffset [MAX value of oneEighthT] */
+ if(duPcchCfg.pageFrameOffset > 7)
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid PagingFrameOffset for ONE_EIGHTH_T");
+ return RFAILED;
+ }
+ pcchCfg->nAndPagingFrameOffset.choice.oneEighthT = duPcchCfg.pageFrameOffset;
+ break;
+ }
case PCCH_Config__nAndPagingFrameOffset_PR_oneSixteenthT:
- {
- //TODO
- break;
- }
+ {
+ /*Spec 38.331: PCCH_Config: nAndPagingFrameOffset [MAX value of oneSixteenthT] */
+ if(duPcchCfg.pageFrameOffset > 15)
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid PagingFrameOffset for ONE_SIXTEENTH_T");
+ return RFAILED;
+ }
+ pcchCfg->nAndPagingFrameOffset.choice.oneSixteenthT = duPcchCfg.pageFrameOffset;
+ break;
+ }
default:
- {
- DU_LOG("\nDU APP : Invalid nAndPagingFrameOffset configuration");
- return RFAILED;
- }
+ {
+ DU_LOG("\nERROR --> DU APP : Invalid nAndPagingFrameOffset configuration");
+ return RFAILED;
+ }
}
- pcchCfg->ns = duPcchCfg.numPagingOcc;
+ pcchCfg->ns = duPcchCfg.ns;
+ DU_ALLOC(pcchCfg->firstPDCCH_MonitoringOccasionOfPO, \
+ sizeof(struct PCCH_Config__firstPDCCH_MonitoringOccasionOfPO));
+ if(pcchCfg->firstPDCCH_MonitoringOccasionOfPO == NULLP)
+ {
+ DU_LOG("\nERROR --> DU APP : BuildPcchConfig >> Memory Allocation fails");
+ return RFAILED;
+ }
+
+ if(fillFirstPdcchMonitoringOcc(pcchCfg->firstPDCCH_MonitoringOccasionOfPO, &duPcchCfg) == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : BuildPcchConfig >> Filling of Paging Occ failed");
+ return RFAILED;
+ }
return ROK;
}/* BuildPcchConfig */
frequencyInfoDL->frequencyBandList.list.size);
if(!frequencyInfoDL->frequencyBandList.list.array)
{
- DU_LOG("\nDU APP : SIB1 DL Configuration memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SIB1 DL Configuration memory allocation failed");
return RFAILED;
}
sizeof(NR_MultiBandInfo_t));
if(!frequencyInfoDL->frequencyBandList.list.array[idx])
{
- DU_LOG("\nDU APP : SIB1 DL Configuration memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SIB1 DL Configuration memory allocation failed");
return RFAILED;
}
}
DU_ALLOC(multiBandInfo->freqBandIndicatorNR, sizeof(FreqBandIndicatorNR_t));
if(!multiBandInfo->freqBandIndicatorNR)
{
- DU_LOG("\nDU APP : SIB1 DL Configuration memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SIB1 DL Configuration memory allocation failed");
return RFAILED;
}
*multiBandInfo->freqBandIndicatorNR = dlCfg.freqBandInd;
DU_ALLOC(scsCarrierList->list.array, scsCarrierList->list.size);
if(!scsCarrierList->list.array)
{
- DU_LOG("\nDU APP : SCS Specific Carrier list memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SCS Specific Carrier list memory allocation failed");
return RFAILED;
}
DU_ALLOC(scsCarrierList->list.array[idx], sizeof(SCS_SpecificCarrier_t));
if(!scsCarrierList->list.array[idx])
{
- DU_LOG("\nDU APP : SCS Specific Carrier list memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : SCS Specific Carrier list memory allocation failed");
return RFAILED;
}
}
DU_ALLOC(frequencyInfoUL->p_Max, sizeof(P_Max_t));
if(!frequencyInfoUL->p_Max)
{
- DU_LOG("\nDU APP : UL Frequency Infoo memory allocation failure");
+ DU_LOG("\nERROR --> DU APP : UL Frequency Infoo memory allocation failure");
return RFAILED;
}
*frequencyInfoUL->p_Max = ulCfg.pMax;
DU_ALLOC(rachCfg->choice.setup, sizeof(RACH_ConfigCommon_t));
if(!rachCfg->choice.setup)
{
- DU_LOG("\nDU APP : Rach Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Rach Config memory alloc failed");
return RFAILED;
}
setup = rachCfg->choice.setup;
DU_ALLOC(setup->totalNumberOfRA_Preambles, sizeof(long));
if(!setup->totalNumberOfRA_Preambles)
{
- DU_LOG("\nDU APP : Rach Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Rach Config memory alloc failed");
return RFAILED;
}
*setup->totalNumberOfRA_Preambles = duRachCfg.numRaPreamble;
sizeof(struct RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB));
if(!setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB)
{
- DU_LOG("\nDU APP : Rach Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Rach Config memory alloc failed");
return RFAILED;
}
setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present = \
}
default:
{
- DU_LOG("\nDU APP: Invalid value for \
+ DU_LOG("\nERROR --> DU APP: Invalid value for \
ssb_PerRach_OccassionAndCB_PreamblesPerSSB");
return RFAILED;
}
DU_ALLOC(setup->rsrp_ThresholdSSB, sizeof(RSRP_Range_t));
if(!setup->rsrp_ThresholdSSB)
{
- DU_LOG("\nDU APP : Rach Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Rach Config memory alloc failed");
return RFAILED;
}
*setup->rsrp_ThresholdSSB = duRachCfg.rsrpThreshSsb;
}
default:
{
- DU_LOG("\nDU APP: Inavlid PRACH root sequence index type");
+ DU_LOG("\nERROR --> DU APP: Inavlid PRACH root sequence index type");
return RFAILED;
}
}
DU_ALLOC(setup->msg1_SubcarrierSpacing, sizeof(SubcarrierSpacing_t));
if(!setup->msg1_SubcarrierSpacing)
{
- DU_LOG("\nDU APP : Rach Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : Rach Config memory alloc failed");
return RFAILED;
}
*setup->msg1_SubcarrierSpacing = duRachCfg.msg1Scs;
}
default:
{
- DU_LOG("\nDU APP : Invalid RACH Config type ");
+ DU_LOG("\nERROR --> DU APP : Invalid RACH Config type ");
return RFAILED;
}
}
duPuschCfg = duCfgParam.sib1Params.srvCellCfgCommSib.ulCfg.puschCfg;
- puschCfg->present = duPuschCfg.present;
+ puschCfg->present = duPuschCfg.puschCfgPresent;
switch(puschCfg->present)
{
case BWP_UplinkCommon__pusch_ConfigCommon_PR_NOTHING:
DU_ALLOC(puschCfg->choice.setup, sizeof(PUSCH_ConfigCommon_t));
if(!puschCfg->choice.setup)
{
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
setup = puschCfg->choice.setup;
sizeof(PUSCH_TimeDomainResourceAllocationList_t));
if(!setup->pusch_TimeDomainAllocationList)
{
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
- elementCnt = ODU_VALUE_ONE;
+ elementCnt = duPuschCfg.numTimeDomRsrcAlloc;
setup->pusch_TimeDomainAllocationList->list.count = elementCnt;
setup->pusch_TimeDomainAllocationList->list.size = \
elementCnt * sizeof(PUSCH_TimeDomainResourceAllocation_t *);
setup->pusch_TimeDomainAllocationList->list.size);
if(!setup->pusch_TimeDomainAllocationList->list.array)
{
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
sizeof(PUSCH_TimeDomainResourceAllocation_t));
if(!setup->pusch_TimeDomainAllocationList->list.array[idx])
{
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
}
- idx = 0;
- timeDomRsrcAllocInfo = setup->pusch_TimeDomainAllocationList->list.array[idx];
-
- /* K2 */
- DU_ALLOC(timeDomRsrcAllocInfo->k2, sizeof(long));
- if(!timeDomRsrcAllocInfo->k2)
- {
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
- return RFAILED;
- }
- *timeDomRsrcAllocInfo->k2 = duPuschCfg.k2;
-
- timeDomRsrcAllocInfo->mappingType = duPuschCfg.mapType;
- timeDomRsrcAllocInfo->startSymbolAndLength = duPuschCfg.sliv;
-
+ for(idx = 0; idx < elementCnt; idx++)
+ {
+ timeDomRsrcAllocInfo = setup->pusch_TimeDomainAllocationList->list.array[idx];
+
+ /* K2 */
+ DU_ALLOC(timeDomRsrcAllocInfo->k2, sizeof(long));
+ if(!timeDomRsrcAllocInfo->k2)
+ {
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
+ return RFAILED;
+ }
+ *timeDomRsrcAllocInfo->k2 = duPuschCfg.timeDomAllocList[idx].k2;
+ timeDomRsrcAllocInfo->mappingType = duPuschCfg.timeDomAllocList[idx].mapType;
+ timeDomRsrcAllocInfo->startSymbolAndLength = duPuschCfg.timeDomAllocList[idx].sliv;
+ }
/* Msg3 Delta Preamble */
DU_ALLOC(setup->msg3_DeltaPreamble, sizeof(long));
if(!setup->msg3_DeltaPreamble)
{
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
*setup->msg3_DeltaPreamble = duPuschCfg.msg3DeltaPreamble;
DU_ALLOC(setup->p0_NominalWithGrant, sizeof(long));
if(!setup->p0_NominalWithGrant)
{
- DU_LOG("\nDU APP : PUSCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
*setup->p0_NominalWithGrant = duPuschCfg.p0NominalWithGrant;
}
default:
{
- DU_LOG("\nDU APP : Invalid PUSCH configuration type ");
+ DU_LOG("\nERROR --> DU APP : Invalid PUSCH configuration type ");
return RFAILED;
}
}
DU_ALLOC(pucchCfg->choice.setup, sizeof(PUCCH_ConfigCommon_t));
if(!pucchCfg->choice.setup)
{
- DU_LOG("\nDU APP : PUCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUCCH Config memory alloc failed");
return RFAILED;
}
setup = pucchCfg->choice.setup;
DU_ALLOC(setup->pucch_ResourceCommon, sizeof(long));
if(!setup->pucch_ResourceCommon)
{
- DU_LOG("\nDU APP : PUCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUCCH Config memory alloc failed");
return RFAILED;
}
*setup->pucch_ResourceCommon = duPucchCfg.rsrcComm;
DU_ALLOC(setup->p0_nominal, sizeof(long));
if(!setup->p0_nominal)
{
- DU_LOG("\nDU APP : PUCCH Config memory alloc failed");
+ DU_LOG("\nERROR --> DU APP : PUCCH Config memory alloc failed");
return RFAILED;
}
*setup->p0_nominal = duPucchCfg.p0Nominal;
}
default:
{
- DU_LOG("\nDU APP : Invalid PUCCH Config type");
+ DU_LOG("\nERROR --> DU APP : Invalid PUCCH Config type");
return RFAILED;
}
}
sizeof(struct BWP_UplinkCommon__rach_ConfigCommon));
if(!bwp->rach_ConfigCommon)
{
- DU_LOG("\nDU APP : UL BWP memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : UL BWP memory allocation failed");
return RFAILED;
}
ret = BuildRachCfgCommon(bwp->rach_ConfigCommon);
sizeof(struct BWP_UplinkCommon__pusch_ConfigCommon));
if(!bwp->pusch_ConfigCommon)
{
- DU_LOG("\nDU APP : UL BWP memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : UL BWP memory allocation failed");
return RFAILED;
}
ret = BuildPuschCfgCommon(bwp->pusch_ConfigCommon);
sizeof(struct BWP_UplinkCommon__pucch_ConfigCommon));
if(!bwp->pucch_ConfigCommon)
{
- DU_LOG("\nDU APP : UL BWP memory allocation failed");
+ DU_LOG("\nERROR --> DU APP : UL BWP memory allocation failed");
return RFAILED;
}
ret = BuildPucchCfgCommon(bwp->pucch_ConfigCommon);
DU_ALLOC(ssbPosInBurst->buf, ssbPosInBurst->size * sizeof(uint8_t));
if(!ssbPosInBurst->buf)
{
- DU_LOG("\nDU APP : Serving cell config common memory allocation failure");
+ DU_LOG("\nERROR --> DU APP : Serving cell config common memory allocation failure");
return RFAILED;
}
ssbPosInBurst->buf[0] = duSrvCellCfg.ssbPosInBurst;
DU_ALLOC(srvCellCfg->uplinkConfigCommon, sizeof(UplinkConfigCommonSIB_t));
if(!srvCellCfg->uplinkConfigCommon)
{
- DU_LOG("\nDU APP : Serving cell config common memory allocation failure");
+ DU_LOG("\nERROR --> DU APP : Serving cell config common memory allocation failure");
return RFAILED;
}
ret = BuildUlCfgCommSib(srvCellCfg->uplinkConfigCommon);
DU_ALLOC(srvCellCfg->tdd_UL_DL_ConfigurationCommon, sizeof(TDD_UL_DL_ConfigCommon_t));
if(!srvCellCfg->tdd_UL_DL_ConfigurationCommon)
{
- DU_LOG("\nDU APP : Serving cell config common memory allocation failure");
+ DU_LOG("\nERROR --> DU APP : Serving cell config common memory allocation failure");
return RFAILED;
}
ret = BuildTddUlDlCfgComm(srvCellCfg->tdd_UL_DL_ConfigurationCommon);
DU_ALLOC(sib1Msg, sizeof(SIB1_t));
if(!sib1Msg)
{
- DU_LOG("DU APP: SIB1 msg memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: SIB1 msg memory allocation failure");
break;
}
DU_ALLOC(sib1Msg->connEstFailureControl, sizeof(ConnEstFailureControl_t));
if(!sib1Msg->connEstFailureControl)
{
- DU_LOG("DU APP: sib1Msg->connEstFailureControl memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: sib1Msg->connEstFailureControl memory allocation failure");
break;
}
sib1Msg->connEstFailureControl->connEstFailCount =\
DU_ALLOC(sib1Msg->si_SchedulingInfo, sizeof(SI_SchedulingInfo_t));
if(!sib1Msg->si_SchedulingInfo)
{
- DU_LOG("DU APP: sib1Msg->si_SchedulingInfo memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: sib1Msg->si_SchedulingInfo memory allocation failure");
break;
}
elementCnt = ODU_VALUE_ONE;
DU_ALLOC(sib1Msg->servingCellConfigCommon, sizeof(ServingCellConfigCommonSIB_t));
if(!sib1Msg->servingCellConfigCommon)
{
- DU_LOG("DU APP: sib1Msg->servingCellConfigCommon memory allocation failure");
+ DU_LOG("\nERROR --> DU APP: sib1Msg->servingCellConfigCommon memory allocation failure");
break;
}
ret1 = BuildServCellCfgCommonSib(sib1Msg->servingCellConfigCommon);
printf("\nencbufSize: %d\n", encBufSize);
if(encRetVal.encoded == -1)
{
- DU_LOG("\nDU APP : Could not encode SIB1 structure (at %s)\n",\
+ DU_LOG("\nERROR --> DU APP : Could not encode SIB1 structure (at %s)\n",\
encRetVal.failed_type ?
encRetVal.failed_type->name :
"unknown");