#include "lrg.h"
#include "lkw.x"
#include "lrg.x"
+#include "du_app_mac_inf.h"
+#include "du_app_rlc_inf.h"
#include "du_cfg.h"
#include "du_mgr.h"
+#include "du_utils.h"
+#include "OCTET_STRING.h"
+#include "BIT_STRING.h"
+#include "odu_common_codec.h"
#include "du_sys_info_hdl.h"
#include "MIB.h"
#include "SearchSpace.h"
#include "SI-SchedulingInfo.h"
#include "ConnEstFailureControl.h"
#include "PLMN-IdentityInfo.h"
-#include "odu_common_codec.h"
#include "PDSCH-TimeDomainResourceAllocation.h"
#include "BCCH-Config.h"
#include "PagingCycle.h"
* ****************************************************************/
void FillSlotConfig()
{
- U8 slot;
- U8 symbol;
+ uint8_t slot;
+ uint8_t symbol;
for(slot = 0; slot <= 3; slot++)
{
/* This function is used to fill up the cell configuration for CL */
-S16 readMacCfg()
+uint8_t readMacCfg()
{
duCfgParam.macCellCfg.carrierId = CARRIER_IDX;
/* DL carrier configuration */
duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH;
- duCfgParam.macCellCfg.dlCarrCfg.freq = NR_ARFCN;
+ duCfgParam.macCellCfg.dlCarrCfg.freq = NR_DL_ARFCN;
duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[2] = 1;
/* UL Carrier configuration */
duCfgParam.macCellCfg.ulCarrCfg.pres = TRUE;
- duCfgParam.macCellCfg.ulCarrCfg.bw = SUL_ARFCN;
- duCfgParam.macCellCfg.ulCarrCfg.freq = NR_ARFCN;
+ duCfgParam.macCellCfg.ulCarrCfg.bw = BANDWIDTH;
+ duCfgParam.macCellCfg.ulCarrCfg.freq = NR_UL_ARFCN;
duCfgParam.macCellCfg.ulCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[1] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[2] = 1;
if(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq == NULLP)
{
DU_LOG("\nDU_APP : Memory allocation failed");
- RETVALUE(RFAILED);
+ return RFAILED;
}
*(duCfgParam.macCellCfg.prachCfg.fdm[0].unsuedRootSeq) = UNUSED_ROOT_SEQ;
}
(number of mandatory parameters) + (number of otional parameters being filled) */
duCfgParam.macCellCfg.numTlv = 40;
- RETVALUE(ROK);
+ return ROK;
}
/*******************************************************************
* RFAILED - failure
*
* ****************************************************************/
-S16 fillDuPort(U16 *duPort)
+uint8_t fillDuPort(uint16_t *duPort)
{
duPort[F1_INTERFACE] = DU_PORT; /* DU Port idx 0 38472 */
duPort[E2_INTERFACE] = RIC_PORT; /* RIC Port idx 1 38482 */
- RETVALUE(ROK);
+ return ROK;
}
/*******************************************************************
* RFAILED - failure
*
** ****************************************************************/
-S16 fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm)
+uint8_t fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm)
{
PdcchCfgCommon pdcchCfg;
PdschCfgCommon pdschCfg;
*
* ****************************************************************/
-S16 readCfg()
+uint8_t readCfg()
{
- U8 i,j,k;
- U32 ipv4_du, ipv4_cu, ipv4_ric;
+ uint8_t i,j,k;
+ uint32_t ipv4_du, ipv4_cu, ipv4_ric;
MibParams mib;
Sib1Params sib1;
duCfgParam.srvdCellLst[i].duCellInfo.tac = DU_TAC;
duCfgParam.srvdCellLst[i].duCellInfo.epsTac = DU_TAC; //to check and fill
/* NR Mode info */
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_ARFCN;
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.nrArfcn = NR_UL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrScs = SCS_120;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_66;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.ulNrFreqInfo.freqBand[j].sulBand[k] = SUL_BAND;
}
}
- duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_ARFCN;
+ duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.nrArfcn = NR_DL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulArfcn = SUL_ARFCN;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrScs = SCS_120;
duCfgParam.srvdCellLst[i].duCellInfo.f1Mode.mode.fdd.dlNrFreqInfo.sulInfo.sulTxBw.nrb = NRB_66;
if(readMacCfg() != ROK)
{
DU_LOG("\nDU_APP : Failed while reading MAC config");
- RETVALUE(RFAILED);
+ return RFAILED;
}
- RETVALUE(ROK);
+ return ROK;
}
/*******************************************************************
* RFAILED - failure
*
* ****************************************************************/
-S16 duReadCfg()
+uint8_t duReadCfg()
{
Pst pst;
Buffer *mBuf;
- cmMemset((U8 *)&duCfgParam, 0, sizeof(DuCfgParams));
+ memset((uint8_t *)&duCfgParam, 0, sizeof(DuCfgParams));
//Read configs into duCfgParams
if(readCfg() != ROK)
{
DU_LOG("\nDU_APP : Reading configuration failed");
- RETVALUE(RFAILED);
+ return RFAILED;
}
//Fill pst structure
- cmMemset((U8 *)&(pst), 0, sizeof(Pst));
+ memset((uint8_t *)&(pst), 0, sizeof(Pst));
pst.srcEnt = (Ent)ENTDUAPP;
pst.srcInst = (Inst)DU_INST;
pst.srcProcId = DU_PROC;
pst.pool= DU_POOL;
- if(SGetMsg(DFLT_REGION, DU_POOL, &mBuf) != ROK)
+ if(ODU_GET_MSG(DFLT_REGION, DU_POOL, &mBuf) != ROK)
{
DU_LOG("\nDU_APP : Memory allocation failed in duReadCfg");
return RFAILED;
}
- if (SPstTsk(&pst, mBuf) != ROK)
+ if (ODU_POST_TASK(&pst, mBuf) != ROK)
{
- DU_LOG("\nDU_APP : SPstTsk failed in duReadCfg");
+ DU_LOG("\nDU_APP : ODU_POST_TASK failed in duReadCfg");
return RFAILED;
}
return ROK;
}
-/*******************************************************************
- *
- * @brief Converts bit strings to integer
- *
- * @details
- *
- * Function : bitStringToInt
- *
- * Functionality:
- * - Converts ASN bit string format IEs to integer type
- *
- * @params[in] void
- * @return ROK - success
- * RFAILED - failure
- *
- * ****************************************************************/
-S16 bitStringToInt(BIT_STRING_t *bitString, U16 *val)
-{
- U16 idx;
- if(bitString->buf == NULL || bitString->size <= 0)
- {
- DU_LOG("\nDU_APP : Bit string is empty");
- return RFAILED;
- }
-
- for(idx=0; idx< bitString->size-1; idx++)
- {
- *val |= bitString->buf[idx];
- *val <<= 8;
- }
-
- *val |= bitString->buf[idx];
- *val >>= bitString->bits_unused;
-
- return ROK;
-}
-
-
/**********************************************************************
End of file
**********************************************************************/