JIRA-ID ODUHIGH-275 classification of logs of RLC part -2
[o-du/l2.git] / src / 5gnrrlc / kw_ptmi.c
index cf38892..2696268 100755 (executable)
 /* local defines */
 #define MAXKWMI 2               /* max. layer management interfaces */
 
-#ifndef LCKWMILKW
-#define PTKWLKW
-#endif
-
-
-#ifndef SM
-#define PTKWLKW
-#endif
-
-
-\f
-#ifdef PTKWLKW
-/* portable functions */
-
-PRIVATE S16 PtMiRlcConfigCfm    ARGS((Pst *pst, RlcMngmt *cfm));
-PRIVATE S16 PtMiLkwCntrlCfm  ARGS((Pst *pst, RlcMngmt *cfm));
-PRIVATE S16 PtMiLkwStaInd    ARGS((Pst *pst, RlcMngmt *usta));
-
-PRIVATE S16 PtMiLkwStaCfm    ARGS((Pst *pst, RlcMngmt *cfm));
-PRIVATE S16 PtMiLkwStsCfm    ARGS((Pst *pst, Action action,
-                                RlcMngmt *cfm));
-PRIVATE S16 PtMiLkwTrcInd    ARGS((Pst *pst, RlcMngmt *trc,
-                                Buffer *mBuf));
-/* kw005.201 added support for L2 Measurement */
-#ifdef LTE_L2_MEAS
-PRIVATE S16 PtMiLkwL2MeasCfm   ARGS((Pst *pst, RlcL2MeasCfmEvt *measEvt));
-PRIVATE S16 PtMiLkwL2MeasStopCfm   ARGS((Pst *pst, U8 measType,U8 status));
-#endif /*  LTE_L2_MEAS */
-#endif /* PTKWLKW */
-
 \f
 /*********************************************************************
  *             Primitives for LKW interface 
  ********************************************************************/
 /* Configuration confirmation primitive */
 
-PRIVATE RlcConfigCfm rlcMiRlcConfigCfmMt[MAXKWMI] =
+static RlcConfigCfm rlcMiRlcConfigCfmMt[MAXKWMI] =
 {
 #ifdef LCKWMILKW
    packRlcConfigCfm,            /* 0 - loosely coupled - fc */
-#else
-   PtMiRlcConfigCfm,            /* 0 - tightly coupled portable */
 #endif /* LCRLMILKW */
 #ifdef SM
    SmMiRlcConfigCfm,            /* 1 - tightly coupled layer management*/
-#else
-   PtMiRlcConfigCfm,            /* 1 - tightly coupled portable */
 #endif /* SM */
 };
 
 /* control confirmation primitives */
 
-PRIVATE LkwCntrlCfm kwMiLkwCntrlCfmMt[MAXKWMI] =
+static LkwCntrlCfm kwMiLkwCntrlCfmMt[MAXKWMI] =
 {
 #ifdef LCKWMILKW 
    cmPkLkwCntrlCfm,          /* 0 - loosely coupled - fc */
-#else
-   PtMiLkwCntrlCfm,          /* 0 - tightly coupled portable */
 #endif /* LCRLMILKW */
 #ifdef SM
    SmMiLkwCntrlCfm,          /* 1 - tightly coupled layer management*/
-#else
-   PtMiLkwCntrlCfm,          /* 1 - tightly coupled portable */
 #endif /* SM */
 };
 
 /* Status Indication primitive */
 
-PRIVATE LkwStaInd kwMiLkwStaIndMt[MAXKWMI] =
+static LkwStaInd kwMiLkwStaIndMt[MAXKWMI] =
 {
 #ifdef LCKWMILKW 
    cmPkLkwStaInd,            /* 0 - loosely coupled  */
-#else
-   PtMiLkwStaInd,            /* 0 - tightly coupled, portable */
 #endif /* LCKWMILKW */
 #ifdef SM
    SmMiLkwStaInd,            /* 1 - tightly coupled, layer management */
-#else
-   PtMiLkwStaInd,            /* 1 - tightly coupled, portable */
 #endif /* SM */
 };
 
 /* Status confirm primitive */
 
-PRIVATE LkwStaCfm kwMiLkwStaCfmMt[MAXKWMI] =
+static LkwStaCfm kwMiLkwStaCfmMt[MAXKWMI] =
 {
 #ifdef LCKWMILKW 
    cmPkLkwStaCfm,            /* 0 - loosely coupled  */
-#else
-   PtMiLkwStaCfm,            /* 0 - tightly coupled, portable */
 #endif /* LCKWMILKW */
 #ifdef SM
    SmMiLkwStaCfm,            /* 1 - tightly coupled, layer management */
-#else
-   PtMiLkwStaCfm,            /* 1 - tightly coupled, portable */
 #endif /* SM */
 };
 
 /* Statistics confirm primitive */
 
-PRIVATE LkwStsCfm kwMiLkwStsCfmMt[MAXKWMI] =
+static LkwStsCfm kwMiLkwStsCfmMt[MAXKWMI] =
 {
 #ifdef LCKWMILKW
    cmPkLkwStsCfm,            /* 0 - loosely coupled  */
-#else
-   PtMiLkwStsCfm,            /* 0 - tightly coupled, portable */
 #endif /* LCRLMILKW */
 #ifdef SM
    SmMiLkwStsCfm,            /* 1 - tightly coupled, layer management */
-#else
-   PtMiLkwStsCfm,            /* 1 - tightly coupled, portable */
 #endif /* SM */
 };
 
 /* Trace indication primitive */
 
-PRIVATE LkwTrcInd kwMiLkwTrcIndMt[MAXKWMI] =
+static LkwTrcInd kwMiLkwTrcIndMt[MAXKWMI] =
 {
 #ifdef LCKWMILKW
    cmPkLkwTrcInd,            /* 0 - loosely coupled  */
-#else
-   PtMiLkwTrcInd,            /* 0 - tightly coupled, portable */
 #endif /* LCKWMILKW */
 #ifdef SM
    SmMiLkwTrcInd,            /* 1 - tightly coupled, layer management */
-#else
-   PtMiLkwTrcInd,            /* 1 - tightly coupled, portable */
 #endif /* SM */
 };
 
 /* kw005.201 added support for L2 Measurement */
 #ifdef LTE_L2_MEAS
-PRIVATE CONSTANT LkwL2MeasCfm rlcMiLkwL2MeasCfmMt[] =
+static const LkwL2MeasCfm rlcMiLkwL2MeasCfmMt[] =
 {
 #ifdef LCKWMILKW
    cmPkLkwL2MeasCfm,
-#else
-   PtMiLkwL2MeasCfm,
 #endif
 #ifdef SM
    SmMiLkwL2MeasCfm,
-#else
-   PtMiLkwL2MeasCfm,
 #endif
 };
-PRIVATE CONSTANT LkwL2MeasStopCfm RlcMiLkwL2MeasStopCfmMt[] =
+static const LkwL2MeasStopCfm RlcMiLkwL2MeasStopCfmMt[] =
 {
 #ifdef LCKWMILKW
    cmPkLkwL2MeasStopCfm,
-#else
-   PtMiLkwL2MeasStopCfm,
 #endif
 #ifdef SM
    SmMiLkwL2MeasStopCfm,
-#else
-   PtMiLkwL2MeasStopCfm,
 #endif
 };
 #endif /*  LTE_L2_MEAS */
@@ -236,19 +174,12 @@ PRIVATE CONSTANT LkwL2MeasStopCfm RlcMiLkwL2MeasStopCfmMt[] =
      the layer manager API provided.
 
 */
-#ifdef ANSI
 S16 RlcMiRlcConfigCfm
 (
 Pst        *pst,                /* post structure */
 RlcMngmt    *cfm                 /* Layer Management structure */
 )
-#else
-S16 RlcMiRlcConfigCfm(pst, cfm)
-Pst        *pst;                /* post structure */
-RlcMngmt    *cfm;                /* Layer Management structure */
-#endif
 {
-   TRC3(RlcMiRlcConfigCfm);
 
    /* jump to specific primitive depending on configured selector */
    (*rlcMiRlcConfigCfmMt[pst->selector])(pst, cfm);
@@ -270,19 +201,12 @@ RlcMngmt    *cfm;                /* Layer Management structure */
      layer manager API provided.
 
 */
-#ifdef ANSI
 S16 RlcMiLkwCntrlCfm
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cfm                 /* configure */
 )
-#else
-S16 RlcMiLkwCntrlCfm(pst, cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* confirm */
-#endif
 {
-   TRC3(RlcMiLkwCntrlCfm)
 
    /* jump to specific primitive depending on configured selector */
    (*kwMiLkwCntrlCfmMt[pst->selector])(pst, cfm);
@@ -309,20 +233,12 @@ RlcMngmt *cfm;                /* confirm */
    - For a tightly coupled interface, the actual function called depends on
      the layer manager API provided.
 */
-#ifdef ANSI
 S16 RlcMiLkwStaInd
 (
 Pst     *pst,                /* post structure */
 RlcMngmt *usta                /* unsolicited status */
 )
-#else
-S16 RlcMiLkwStaInd(pst, usta)
-Pst     *pst;                /* post structure */
-RlcMngmt *usta;               /* unsolicited status */
-#endif
 {
-   TRC3(RlcMiLkwStaInd);
-
    /* jump to specific primitive depending on configured selector */
    (*kwMiLkwStaIndMt[pst->selector])(pst, usta);
 
@@ -347,19 +263,12 @@ RlcMngmt *usta;               /* unsolicited status */
       on the layer manager API provided.
 
 */
-#ifdef ANSI
 S16 RlcMiLkwStaCfm
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *cfm                 /* solicited status confirmation */
 )
-#else
-S16 RlcMiLkwStaCfm(pst, cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* solicited status confirmation */
-#endif
 {
-   TRC3(RlcMiLkwStaCfm);
 
    /* jump to specific primitive depending on configured selector */
    (*kwMiLkwStaCfmMt[pst->selector])(pst, cfm);
@@ -386,22 +295,13 @@ RlcMngmt *cfm;                /* solicited status confirmation */
       on the layer manager API provided.
 
 */
-#ifdef ANSI
 S16 RlcMiLkwStsCfm
 (
 Pst *pst,                    /* post structure */
 Action action,               /* action */
 RlcMngmt *cfm                 /* statistics confirmation */
 )
-#else
-S16 RlcMiLkwStsCfm(pst, action, cfm)
-Pst *pst;                    /* post structure */
-Action action;               /* action */
-RlcMngmt *cfm;                /* statistics confirmation */
-#endif
 {
-   TRC3(RlcMiLkwStsCfm);
-
    /* jump to specific primitive depending on configured selector */
    (*kwMiLkwStsCfmMt[pst->selector])(pst, action, cfm);
 
@@ -426,22 +326,13 @@ RlcMngmt *cfm;                /* statistics confirmation */
       the layer manager API provided.
 
 */
-#ifdef ANSI
 S16 RlcMiLkwTrcInd
 (
 Pst *pst,                    /* post structure */
 RlcMngmt *trc,                /* trace indication */
 Buffer *mBuf                 /* message buffer */
 )
-#else
-S16 RlcMiLkwTrcInd(pst, trc, mBuf)
-Pst *pst;                    /* post structure */
-RlcMngmt *trc;                /* trace indication */
-Buffer *mBuf;                /* message buffer */
-#endif
 {
-   TRC3(RlcMiLkwTrcInd);
-
    /* jump to specific primitive depending on configured selector */
    (*kwMiLkwTrcIndMt[pst->selector])(pst, trc, mBuf);
 
@@ -452,328 +343,23 @@ Buffer *mBuf;                /* message buffer */
 
 /* kw005.201 added support for L2 Measurement */
 #ifdef LTE_L2_MEAS
-#ifdef ANSI
-S16 RlcMiLkwL2MeasCfm
-(
-Pst * pst,
-RlcL2MeasCfmEvt *measEvt
-)
-#else
-S16 RlcMiLkwL2MeasCfm(pst, measEvt)
-Pst * pst;
-RlcL2MeasCfmEvt *measEvt;
-#endif
+S16 RlcMiLkwL2MeasCfm(Pst * pst,RlcL2MeasCfmEvt *measEvt)
 {
 
-   TRC3(RlcMiLkwL2MeasCfm)
-
    (*rlcMiLkwL2MeasCfmMt[pst->selector])(pst, measEvt);
 
    return ROK;
 
 }
-#ifdef ANSI
-S16 RlcMiLkwL2MeasStopCfm
-(  
-Pst *pst,
-U8  measType,
-U8  status
-)
-#else
-S16 RlcMiLkwL2MeasStopCfm(pst, measType,status)
-Pst *pst;
-U8  measType;
-U8  status;
-#endif
+S16 RlcMiLkwL2MeasStopCfm(Pst *pst,uint8_t measType,uint8_t status)
 {
 
-   TRC3(RlcMiLkwL2MeasStopCfm)
-
    (*RlcMiLkwL2MeasStopCfmMt[pst->selector])(pst, measType,status);
 
    return ROK;
 
 }
 #endif /*  LTE_L2_MEAS */
-#ifdef PTKWLKW
-
-\f
-/*************************************************************************
- *                         Porting Functions
- ************************************************************************/
-/*
- *
- *       Fun:   configuration  Confirm
- *
- *       Desc:  This function is used to confirm the receipt of configuration
- *              request from layer management.
- *
- *       Ret:   ROK      - ok
- *
- *       Notes: None
- *
- *       File:  kw_ptmi.c
- *
- */
-
-#ifdef ANSI
-S16 PtMiRlcConfigCfm
-(
-Pst *pst,                    /* post structure */
-RlcMngmt *cfm                 /* Layer Management structure */
-)
-#else
-S16 PtMiRlcConfigCfm(pst, cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* Layer Management structure */
-#endif
-{
-   TRC3(PtMiRlcConfigCfm)
-
-   UNUSED(pst);
-   UNUSED(cfm);
-
-   TRC2(PtMiRlcConfigCfm() : function is not implemented)
-
-   return ROK;
-} /* end of PtMiRlcConfigCfm */
-
-/*
- *
- *       Fun:   Control Confirmation
- *
- *       Desc:  This function is the portable version of used to
- *              confirm the receipt of configuration request from
- *              layer management.
- *
- *       Ret:   ROK      - ok
- *
- *       Notes: None
- *
- *       File:  kw_ptmi.c
- *
- */
-
-#ifdef ANSI
-PRIVATE S16 PtMiLkwCntrlCfm
-(
-Pst *pst,                 /* Post structure */
-RlcMngmt *cfm              /* Layer Management structure */
-)
-#else
-PRIVATE S16 PtMiLkwCntrlCfm(pst, cfm)
-Pst *pst;                 /* Post structure */
-RlcMngmt *cfm;             /* Layer Management structure */
-#endif
-{
-   TRC3(PtMiLkwCntrlCfm);
-
-   UNUSED(pst);
-   UNUSED(cfm);
-
-   TRC2(PtMiLkwCntrlCfm() :  function is not implemented)
-
-   return ROK;
-} /* end of PtMiLkwCntrlCfm */
-
-
-/*
- *
- *       Fun:   unsolicited status indication
- *
- *       Desc:  This function is the portable version  used to
- *              send the status indication to the layer manager
- *
- *       Ret:   ROK      - ok
- *
- *       Notes: None
- *
- *       File:  kw_ptmi.c
- *
- */
-#ifdef ANSI
-PRIVATE S16 PtMiLkwStaInd
-(
-Pst *pst,                    /* post structure */
-RlcMngmt *usta                /* unsolicited status */
-)
-#else
-PRIVATE S16 PtMiLkwStaInd(pst, usta)
-Pst *pst;                    /* post structure */
-RlcMngmt *usta;               /* unsolicited status */
-#endif
-{
-   TRC3(PtMiLkwStaInd)
-
-   UNUSED(pst);
-   UNUSED(usta);
-
-   TRC2(PtMiLkwStaInd() : function is not implemented)
-
-   return ROK;
-} /* end of PtMiLkwStaInd */
-
-
-/*
- *
- *       Fun:   portable function for solicited status confirmation
- *
- *       Desc:  This function is the portable version  used to
- *              send the status confirmation to the layer manager
- *
- *       Ret:   ROK      - ok
- *
- *       Notes: None
- *
- *       File:  kw_ptmi.c
- *
- */
-#ifdef ANSI
-PRIVATE S16 PtMiLkwStaCfm
-(
-Pst *pst,                    /* post structure */
-RlcMngmt *cfm                 /* solicited status confirmation */
-)
-#else
-PRIVATE S16 PtMiLkwStaCfm(pst, cfm)
-Pst *pst;                    /* post structure */
-RlcMngmt *cfm;                /* solicited status confirmation */
-#endif
-{
-   TRC3(PtMiLkwStaCfm)
-
-   UNUSED(pst);
-   UNUSED(cfm);
-
-   return ROK;
-} /* end of PtMiLkwStaCfm */
-
-
-/*
- *
- *       Fun:   portable function for statistics confirmation
- *
- *       Desc:  This function is the portable version  used to
- *              send the statistics confirmation to the layer manager
- *
- *       Ret:   ROK      - ok
- *
- *       Notes: None
- *
- *       File:  kw_ptmi.c
- *
- */
-#ifdef ANSI
-PRIVATE S16 PtMiLkwStsCfm
-(
-Pst *pst,                    /* post structure */
-Action action,               /* action */
-RlcMngmt *cfm                 /* statistics confirmation */
-)
-#else
-PRIVATE S16 PtMiLkwStsCfm(pst, action, cfm)
-Pst *pst;                    /* post structure */
-Action action;               /* action */
-RlcMngmt *cfm;                /* statistics confirmation */
-#endif
-{
-   TRC3(PtMiLkwStsCfm)
-
-   UNUSED(pst);
-   UNUSED(action);
-   UNUSED(cfm);
-
-   return ROK;
-} /* end of PtMiLkwStsCfm */
-
-
-/*
- *
- *       Fun:   portable function for trace indication
- *
- *       Desc:  This function is the portable version  used to
- *              send trace indication to the layer manager
- *
- *       Ret:   ROK      - ok
- *
- *       Notes: None
- *
- *       File:  kw_ptmi.c
- *
- */
-#ifdef ANSI
-PRIVATE S16 PtMiLkwTrcInd
-(
-Pst *pst,                    /* post structure */
-RlcMngmt *trc,                /* trace indication */
-Buffer *mBuf                 /* message buffer */
-)
-#else
-PRIVATE S16 PtMiLkwTrcInd(pst, trc, mBuf)
-Pst *pst;                    /* post structure */
-RlcMngmt *trc;                /* trace indication */
-Buffer *mBuf;                /* message buffer */
-#endif
-{
-   TRC3(PtMiLkwTrcInd)
-
-   UNUSED(pst);
-   UNUSED(trc);
-   UNUSED(mBuf);
-
-   return ROK;
-} /* end of PtMiLkwTrcInd */
-
-/* kw005.201 added support for L2 Measurement */
-#ifdef LTE_L2_MEAS
-#ifdef ANSI
-PRIVATE S16 PtMiLkwL2MeasCfm
-(
-Pst * pst,
-RlcL2MeasCfmEvt * measEvt
-)
-#else
-PRIVATE S16 PtMiLkwL2MeasCfm(pst, measEvt)
-Pst * pst;
-RlcL2MeasCfmEvt * measEvt;
-#endif
-{
-
-   TRC3(PtMiLkwL2MeasCfm)
-
-   UNUSED(pst);
-   UNUSED(measEvt);
-
-   return ROK;
-
-}
-#ifdef ANSI
-PRIVATE S16 PtMiLkwL2MeasStopCfm
-(
-Pst * pst,
-U8 measType,
-U8 status
-)
-#else
-PRIVATE S16 PtMiLkwL2MeasStopCfm(pst, measType,status)
-Pst * pst;
-U8  measType;
-U8  status;
-#endif
-{
-
-   TRC3(PtMiLkwL2MeasStopCfm)
-
-   UNUSED(pst);
-   UNUSED(measType);
-   UNUSED(status);
-
-   return ROK;
-
-}
-#endif /*  LTE_L2_MEAS */
-#endif /* PTKWLKW */
-
 
 /********************************************************************30**