Merge "Separation of logs Part - 2"
[o-du/l2.git] / src / 5gnrmac / rg_l2m.c
index c464569..0ba47b0 100755 (executable)
@@ -63,12 +63,12 @@ static int RLOG_MODULE_ID=4096;
 
 /* local defines */
 #ifdef LTE_L2_MEAS
-PRIVATE S16 rgL2mInsertMeasCb ARGS((
+static S16 rgL2mInsertMeasCb ARGS((
          RgCellCb       *cell,
          RgL2MeasCb     *measCb,
          RgInfL2MeasReq *measInfo ));
 
-PRIVATE RgL2MeasCb * rgL2mAllocMeasCb ARGS((
+static RgL2MeasCb * rgL2mAllocMeasCb ARGS((
          RgCellCb       *cell,
          RgInfL2MeasReq *measInfo,
          RgErrInfo      *err));
@@ -86,33 +86,25 @@ PRIVATE RgL2MeasCb * rgL2mAllocMeasCb ARGS((
  *
  * @param  [in] RgCellCb       *cell
  * @param  [in] RgInfL2MeasReq *measInfo
- * @param  [in] U8             measType
+ * @param  [in] uint8_t             measType
  * @param  [out] RgErrInfo      *err
  * @return  S16
  *      -# ROK 
  *      -# RFAILED 
  *
  */
-#ifdef ANSI
 S16 rgL2mCreateMeasCb 
 (
 RgCellCb       *cell,
 RgInfL2MeasReq *measInfo, 
-U8              measType,
+uint8_t        measType,
 RgErrInfo      *err
 )
-#else
-S16 rgL2mCreateMeasCb(cell, measInfo, measType, err)
-RgCellCb       *cell;
-RgInfL2MeasReq *measInfo; 
-U8              measType;
-RgErrInfo      *err;
-#endif    
 {
   // Inst    inst = cell->macInst - RG_INST_START;
-   U32     idx;
-   RgL2MeasCb       *measCb = NULLP;
-   U8            qciVal = 0;
+   uint32_t     idx;
+   RgL2MeasCb   *measCb = NULLP;
+   uint8_t      qciVal = 0;
 
    UNUSED(measType);
    UNUSED(err);
@@ -123,7 +115,7 @@ RgErrInfo      *err;
       return RFAILED;
    }
    //Memcpy is already done in rgL2mAllocMeasCb
-   /*memcpy(&measCb->measReq, (CONSTANT U8 *)measInfo,\
+   /*memcpy(&measCb->measReq, (const uint8_t *)measInfo,\
      sizeof(RgInfL2MeasReq));*/
    rgL2mInsertMeasCb(cell, measCb, measInfo);
    measCb->measReq.timePrd = measInfo->timePrd;
@@ -164,19 +156,12 @@ RgErrInfo      *err;
  *  @return  S16
  *      -# ROK
  **/
-#ifdef ANSI
 S16 rgL2mMeasReq 
 (
 RgCellCb       *cell,
 RgInfL2MeasReq *measInfo,
 RgErrInfo      *err
 )
-#else
-S16 rgL2mMeasReq(cell, measInfo, err)
-RgCellCb       *cell;
-RgInfL2MeasReq *measInfo; 
-RgErrInfo      *err;
-#endif    
 {
    S16  ret=RFAILED;
 
@@ -199,17 +184,7 @@ RgErrInfo      *err;
  * @param  [in] RgCellCb          *cell
  * @param  [in] RgInfL2MeasCfm    *measCfm
  */
-#ifdef ANSI
-PRIVATE Void rgSndL2MeasCfm
-(
-RgCellCb          *cell, 
-RgInfL2MeasCfm    *measCfm
-)
-#else
-PRIVATE Void rgSndL2MeasCfm (cell, measCfm)
-RgCellCb          *cell; 
-RgInfL2MeasCfm    *measCfm;   
-#endif
+static Void rgSndL2MeasCfm(RgCellCb *cell, RgInfL2MeasCfm *measCfm)
 {
    Pst             pst;
    Inst            macInst = cell->macInst - RG_INST_START;
@@ -218,7 +193,7 @@ RgInfL2MeasCfm    *measCfm;
    rgGetPstToInst(&pst,macInst, cell->schInstMap.schInst);
    RgMacSchL2Meas(&pst, measCfm);
 
-   RETVOID;
+   return;
 }/* rgSndL2MeasCfm */
 
 /** @brief This function sends the measurement stop confirm
@@ -231,17 +206,7 @@ RgInfL2MeasCfm    *measCfm;
  * @param  [in] RgCellCb          *cell
  * @param  [in] RgInfL2MeasCfm    *measCfm
  */
-#ifdef ANSI
-PRIVATE Void rgSndL2MeasStopCfm
-(
-RgCellCb          *cell,
-RgInfL2MeasCfm    *measCfm
-)
-#else
-PRIVATE Void rgSndL2MeasStopCfm (cell, measCfm)
-RgCellCb          *cell;
-RgInfL2MeasCfm    *measCfm;
-#endif
+static Void rgSndL2MeasStopCfm(RgCellCb *cell,RgInfL2MeasCfm *measCfm)
 {
    Pst             pst;
    Inst            macInst = cell->macInst - RG_INST_START;
@@ -250,7 +215,7 @@ RgInfL2MeasCfm    *measCfm;
    rgGetPstToInst(&pst,macInst, cell->schInstMap.schInst);
    RgMacSchL2MeasStop(&pst, measCfm);
 
-   RETVOID;
+   return;
 }/* rgSndL2MeasStopCfm */
 
 /**
@@ -267,17 +232,11 @@ RgInfL2MeasCfm    *measCfm;
  *      -# ROK
  *      -# RFAILED
  **/
-#ifdef ANSI
 S16 RgSchMacL2MeasReq
 (
 Pst               *pst,          /* post structure  */
 RgInfL2MeasReq    *measInfo      /* Meas Req Info */
 )
-#else
-S16 RgSchMacL2MeasReq(pst, measInfo)
-Pst               *pst;          /* post structure  */
-RgInfL2MeasReq    *measInfo;      /* Meas Req Info */
-#endif    
 {
    Inst            inst;
    RgCellCb        *cellCb = NULLP;
@@ -328,26 +287,19 @@ RgInfL2MeasReq    *measInfo;      /* Meas Req Info */
  *      -# ROK
  *      -# RFAILED
  **/
-#ifdef ANSI
 S16 RgSchMacL2MeasStopReq
 (
 Pst               *pst,          /* post structure  */
 RgInfL2MeasStopReq *measInfo      /* Meas Req Info */
 )
-#else
-S16 RgSchMacL2MeasStopReq(pst, measInfo)
-Pst               *pst;          /* post structure  */
-RgInfL2MeasStopReq *measInfo;      /* Meas Req Info */
-#endif
 {
-   S16             ret = ROK;   
-   CmLList         *node   = NULLP;
-   RgL2MeasCb      *measCb = NULLP;
-   U8               idx;
-   U8               qciVal;
-   Inst             inst;
-   RgCellCb        *cellCb = NULLP;
-
+   S16            ret = ROK;   
+   CmLList        *node   = NULLP;
+   RgL2MeasCb     *measCb = NULLP;
+   uint8_t        idx;
+   uint8_t        qciVal;
+   Inst           inst;
+   RgCellCb       *cellCb = NULLP;
    RgInfL2MeasCfm  measCfm;
 
    RG_IS_INST_VALID(pst->dstInst);
@@ -399,17 +351,11 @@ RgInfL2MeasStopReq *measInfo;      /* Meas Req Info */
  *      -# ROK
  *      -# RFAILED
  **/
-#ifdef ANSI
 S16 RgSchMacL2MeasSendReq
 (
 Pst               *pst,          /* post structure  */
 RgInfL2MeasSndReq *measInfo      /* Meas Req Info */
 )
-#else
-S16 RgSchMacL2MeasSendReq(pst, measInfo)
-Pst               *pst;          /* post structure  */
-RgInfL2MeasSndReq *measInfo;      /* Meas Req Info */
-#endif
 {
    Inst            inst;
    RgCellCb       *cellCb = NULLP;
@@ -446,23 +392,16 @@ RgInfL2MeasSndReq *measInfo;      /* Meas Req Info */
  *      -# ROK 
  *      -# RFAILED 
  */
-#ifdef ANSI
-PRIVATE S16 rgL2mInsertMeasCb
+static S16 rgL2mInsertMeasCb
 (
 RgCellCb       *cell,
 RgL2MeasCb     *measCb,
 RgInfL2MeasReq *measInfo
 )
-#else
-PRIVATE S16 rgL2mInsertMeasCb(cell, measCb, measInfo)
-RgCellCb       *cell;
-RgL2MeasCb     *measCb;
-RgInfL2MeasReq *measInfo;
-#endif
 {
-   CmLList   *lnk, *node;
-   RgL2MeasCb  *oldMeasCb;
-   U16         diffTime;
+   CmLList    *lnk, *node;
+   RgL2MeasCb *oldMeasCb;
+   uint16_t   diffTime;
 
       /* 
        * 1. Check if l2mList has any entries.
@@ -511,19 +450,12 @@ RgInfL2MeasReq *measInfo;
  * @param  [out] RgErrInfo      *err
  * @return  RgSchL2MeasCb *
  */
-#ifdef ANSI
-PRIVATE RgL2MeasCb * rgL2mAllocMeasCb
+static RgL2MeasCb * rgL2mAllocMeasCb
 (
 RgCellCb       *cell,
 RgInfL2MeasReq *measInfo,
 RgErrInfo      *err
 )
-#else
-PRIVATE RgL2MeasCb * rgL2mAllocMeasCb(cell, measInfo, err)
-RgCellCb       *cell;
-RgInfL2MeasReq *measInfo;
-RgErrInfo      *err;
-#endif
 {
    RgL2MeasCb       *measCb = NULLP;
    Inst             inst = cell->macInst - RG_INST_START;
@@ -559,24 +491,16 @@ RgErrInfo      *err;
  *      -# ROK
  *      -# RFAILED
  **/
-#ifdef ANSI
-S16 rgL2Meas
-(
-RgCellCb  *cell
-)
-#else
-S16 rgL2Meas(cell)
-RgCellCb  *cell;
-#endif
+S16 rgL2Meas(RgCellCb  *cell)
 {
    CmLList         *node   = NULLP;
    RgL2MeasCb      *measCb = NULLP;
-   RgInfL2MeasCfm  measCfm;
-   U8              idx = 0;
-   U8              qciVal = 0;
-   U32             measPrd; /*LTE_L2_MEAS_PHASE2*/
+   RgInfL2MeasCfm   measCfm;
+   uint8_t          idx = 0;
+   uint8_t          qciVal = 0;
+   uint32_t         measPrd; /*LTE_L2_MEAS_PHASE2*/
    CmLteTimingInfo  crntTime;
-   Inst           inst = cell->macInst - RG_INST_START;
+   Inst             inst = cell->macInst - RG_INST_START;
    
    node = cell->l2mList.first;