Merge "[Epic-ID: ODUHIGH-405][Task-ID: ODUHIGH-437] Establishing communication betwee...
[o-du/l2.git] / src / cm / ckw.x
index ecd5bf2..c7769c5 100755 (executable)
@@ -33,7 +33,7 @@
 #define __CKW_X__
 
 #ifdef __cplusplus
-EXTERN "C" {
+extern "C" {
 #endif  /*for extern "C"*/
 
 /** @file ckw.x
@@ -48,9 +48,9 @@ EXTERN "C" {
    Logical Channel Information */
 typedef struct ckwLChInfo
 {
-   U8                   lChId;               /*!< Logical Channel ID.
+   uint8_t                   lChId;               /*!< Logical Channel ID.
                                                   The allowed values are [1..10] */
-   U8                   type;                /*!< Logical Channel Type - 
+   uint8_t                   type;                /*!< Logical Channel Type - 
                                                   BCCH/PCCH/CCCH/DTCH/DCCH */
 }CkwLChInfo;
 
@@ -60,13 +60,13 @@ typedef struct rlcUmInfo
 {
    struct   _umDl
    {
-      U8                snLen;               /*!< Sequence Number length in bits. Allowed values are 6 and 12*/
+      uint8_t                snLen;          /*!< Sequence Number length in bits. Allowed values are 6 and 12*/
    }dl;                                      /*!< Downlink */
    struct   _umUl
    {
-      U8                snLen;               /*!< Sequence Number length in bits.*/
+      uint8_t                snLen;          /*!< Sequence Number length in bits.*/
                                              /*!< Allowed values are 6 and 12*/
-      U8                reOrdTmr;            /*!< T_reordering Timer in msec */
+      uint8_t                reAsmblTmr;     /*!< T_reassembly Timer in msec */
    }ul;                                      /*!< Uplink */
 }RlcUmInfo;
 
@@ -76,23 +76,23 @@ typedef struct rlcAmInfo
 {
    struct   _amDl
    {
-      U8                snLen;               /*!< Sequence Number length in
+      uint8_t                snLen;               /*!< Sequence Number length in
                                                bits. Allowed values are 12 and 18 */
-      U16               pollRetxTmr;         /*!< T_poll_retransmit Timer in msec */
+      uint16_t               pollRetxTmr;         /*!< T_poll_retransmit Timer in msec */
       S16               pollPdu;             /*!< Used to trigger a poll for every pollPdu.*/
                                              /*!< This field indicates the number of PDUs */
       /* Patch ckw_x_001.main_5 */
                                              /* !<For Infinite, RLC expects value 0xFFFF */
       S32               pollByte;            /*!< Poll_Byte in bytes. */
                                              /*!<For Infinite RLC expects value 0xFFFFFFFF */
-      U8                maxRetx;             /*!< Max_Retx_Threshold */
+      uint8_t                maxRetx;             /*!< Max_Retx_Threshold */
    }dl;                                      /*!< Down link */
    struct   _amUl
    {
-      U8                snLen;               /*!< Sequence Number length in
+      uint8_t                snLen;               /*!< Sequence Number length in
                                                bits. Allowed values are 12 and 18 */
-      U16               staProhTmr;          /*!< T_status_prohibit Timer in msec*/
-      U8                reOrdTmr;            /*!< T_reordering Timer in msec*/
+      uint16_t               staProhTmr;          /*!< T_status_prohibit Timer in msec*/
+      uint8_t                reAsmblTmr;            /*!< T_reordering Timer in msec*/
    }ul;                                      /*!< Up link */
 }RlcAmInfo;
 
@@ -102,7 +102,7 @@ typedef union rlcTmInfo
 {
    struct   _tmDl
    {
-      U32               buffSize;            /*!< Buffer Size in bytes */
+      uint32_t               buffSize;            /*!< Buffer Size in bytes */
    }dl;                                      /*!< Down link */
 }RlcTmInfo;
 
@@ -110,22 +110,23 @@ typedef union rlcTmInfo
    Entity Configuration Information */
 typedef struct rlcEntCfgInfo
 {
-   U8                   cfgType;             /*!< Type of Configuration - 
-                                             ADD/MODIFY/DELETE/RE-ESTABLISH/
-                                             DELTEUE */
-   U8                   rbId;                /* RB ID. The allowed
-                                                Values are [0..255] */
-   U8                   rbType;              /* Type of the RB - can be SRB or DRB */
-   U8                   qci;                 /*!< qCI value Associated with that RB */
-   CkwLChInfo           lCh[CM_LTE_MAX_LOGCH_PER_RB];  /*!< Logical channel
+   uint8_t                   cfgType;             /*!< Type of Configuration - 
+                                                  ADD/MODIFY/DELETE/RE-ESTABLISH/
+                                                  DELTEUE */
+   uint8_t                   rbId;                /* RB ID. The allowed
+                                                  Values are [0..255] */
+   uint8_t                   rbType;              /* Type of the RB - can be SRB or DRB */
+   uint8_t                   qci;                 /*!< qCI value Associated with that RB */
+   Snssai                    *snssai;              /* Snssai Associated with logical channel */
+   CkwLChInfo                lCh[CM_LTE_MAX_LOGCH_PER_RB];  /*!< Logical channel
                                                         information
                                                 In case of AM mode: 
                                                 idx = 0 implies DL and
                                                 idx = 1 implies UL
                                                 In case of TM/UM idx 0 is only
                                                 applicable */
-   CmLteRlcMode         entMode;             /*!< Entity mode: AM, UM or TM */
-   U8                   dir;                 /*!< Direction: It can be either
+   CmLteRlcMode              entMode;             /*!< Entity mode: AM, UM or TM */
+   uint8_t                   dir;                 /*!< Direction: It can be either
                                                UL / DL for TM mode 
                                                UL / DL or BOTH for UM mode 
                                                and for AM its always for both UL 
@@ -148,21 +149,19 @@ typedef struct rlcEntCfgInfo
    Configuration Information from RRC to RLC */
 typedef struct rlcCfgInfo
 {
-   U32                  transId;             /*!< Transaction Id */
+   uint32_t             transId;             /*!< Transaction Id */
    CmLteRnti            ueId;                /*!< UE ID */
    CmLteCellId          cellId;              /*!< Cell ID */
-   U8                   numEnt;              /*!< Number of entities to
-                                               configure */
-   RlcEntCfgInfo        entCfg[CKW_MAX_ENT_CFG];  /*!< Array of Entities to be
-                                              configure */
+   uint8_t              numEnt;              /*!< Number of entities to configure */
+   RlcEntCfgInfo        entCfg[CKW_MAX_ENT_CFG];  /*!< Array of Entities to be configure */
 }RlcCfgInfo;
 
 /** @brief
    Entity Configuration Confirmation Information */
 typedef struct rlcEntCfgCfmInfo
 {
-   U8                   rbId;                /*!< rb ID */
-   U8                   rbType;              /*!< RB type - can be SRB or DRB */
+   uint8_t              rbId;                /*!< rb ID */
+   uint8_t              rbType;              /*!< RB type - can be SRB or DRB */
    CmStatus             status;              /*!< Status of the confirmation */
 }RlcEntCfgCfmInfo;
 
@@ -170,10 +169,10 @@ typedef struct rlcEntCfgCfmInfo
    Configuration Confirmation Informatin RLC to RRC */
 typedef struct rlcCfgCfmInfo
 {
-   U32                  transId;             /*!< Transaction Id */
+   uint32_t             transId;             /*!< Transaction Id */
    CmLteRnti            ueId;                /*!< UE ID */
    CmLteCellId          cellId;              /*!< Cell ID */
-   U8                   numEnt;              /*!< Number of entities configured */
+   uint8_t              numEnt;              /*!< Number of entities configured */
    RlcEntCfgCfmInfo     entCfgCfm[CKW_MAX_ENT_CFG];   /*!< Array of Entity cfg
                                                          confiramations */
 }RlcCfgCfmInfo;
@@ -191,13 +190,13 @@ typedef struct ckwUeInfo
 typedef S16 (*RlcCfgReq)     ARGS((Pst *pst, RlcCfgInfo *cfgInfo));
 typedef S16 (*RlcCfgCfm)     ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
 
-typedef S16 (*CkwUeIdChgReq) ARGS((Pst *pst, SpId spId, U32 transId, 
+typedef S16 (*CkwUeIdChgReq) ARGS((Pst *pst, SpId spId, uint32_t transId, 
                                    CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
-typedef S16 (*CkwUeIdChgCfm) ARGS((Pst *pst, SuId suId, U32 transId, 
+typedef S16 (*CkwUeIdChgCfm) ARGS((Pst *pst, SuId suId, uint32_t transId, 
                                    CkwUeInfo *ueInfo, CmStatus status));
 
 typedef S16 (*CkwBndReq)     ARGS((Pst *pst, SuId suId, SpId spId));
-typedef S16 (*CkwBndCfm)     ARGS((Pst *pst, SuId suId, U8 status));
+typedef S16 (*CkwBndCfm)     ARGS((Pst *pst, SuId suId, uint8_t status));
 typedef S16 (*CkwUbndReq)    ARGS((Pst *pst, SpId spId, Reason reason));
 
 /** 
@@ -216,7 +215,7 @@ typedef S16 (*CkwUbndReq)    ARGS((Pst *pst, SpId spId, Reason reason));
  *                         Allowable values: 0 to 32767.
  * @return ROK
  */
-EXTERN S16 RlcUiCkwBndReq ARGS((Pst *pst, SuId suId, SpId spId));
+S16 RlcUiCkwBndReq ARGS((Pst *pst, SuId suId, SpId spId));
 
 /** 
  * @details RLC invokes the bind confirm primitive to acknowledge the receipt
@@ -235,7 +234,7 @@ CM_BND_OK: Bind request succeeded\n
 CM_BND_NOK: Error encountered during the processing of the bind request.
  * @return ROK
  */
-EXTERN S16 RlcUiCkwBndCfm ARGS((Pst *pst, SuId suId, U8 status));
+S16 RlcUiCkwBndCfm ARGS((Pst *pst, SuId suId, uint8_t status));
 
 /** 
  * @details The RLC service user initiates this primitive for performing
@@ -252,7 +251,7 @@ EXTERN S16 RlcUiCkwBndCfm ARGS((Pst *pst, SuId suId, U8 status));
  *                            Allowable value: CKW_UBND_REQ.
  * @return ROK
  */
-EXTERN S16 RlcUiCkwUbndReq ARGS((Pst *pst, SpId spId, Reason reason));
+S16 RlcUiCkwUbndReq ARGS((Pst *pst, SpId spId, Reason reason));
 
 /* Layer interface Control Primitives */
 /**
@@ -273,7 +272,7 @@ EXTERN S16 RlcUiCkwUbndReq ARGS((Pst *pst, SpId spId, Reason reason));
  * @param[in] cfgInfo   -  This structure contains the configuration information
  * @return ROK
  */
-EXTERN S16 RlcProcCfgReq ARGS((Pst *pst, RlcCfgInfo *cfgInfo));
+S16 RlcProcCfgReq ARGS((Pst *pst, RlcCfgInfo *cfgInfo));
 
 /**
  *@details This primitive is used by RLC to confirm the configuration requested
@@ -294,7 +293,7 @@ EXTERN S16 RlcProcCfgReq ARGS((Pst *pst, RlcCfgInfo *cfgInfo));
  * information.
  * @return ROK
  */
-EXTERN S16 RlcUiRlcCfgCfm ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
+S16 RlcUiRlcCfgCfm ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
 
 /**
  *@details This primitive is used by RRC to change the UeId for the existing UE
@@ -308,7 +307,7 @@ EXTERN S16 RlcUiRlcCfgCfm ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
  * @param[in] newUeInfo -  New UE Id Info for existing UE context. 
  * @return ROK
  */
-EXTERN S16 RlcUiCkwUeIdChgReq ARGS((Pst *pst, SpId spId, U32 transId,
+S16 RlcUiCkwUeIdChgReq ARGS((Pst *pst, SpId spId, uint32_t transId,
                                    CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
 
 /**
@@ -333,75 +332,75 @@ EXTERN S16 RlcUiCkwUeIdChgReq ARGS((Pst *pst, SpId spId, U32 transId,
  * information.
  * @return ROK
  */
-EXTERN S16 RlcUiCkwUeIdChgCfm  ARGS((Pst *pst, SuId suId, U32 transId, 
+S16 RlcUiCkwUeIdChgCfm  ARGS((Pst *pst, SuId suId, uint32_t transId, 
                                    CkwUeInfo *ueInfo, CmStatus status));
 
 /* RRC Extern declarations */
 #ifdef NH
-EXTERN S16 NhLiCkwBndReq ARGS((
+S16 NhLiCkwBndReq ARGS((
          Pst *pst,
          SuId suId,
          SpId spId));
 
-EXTERN S16 NhLiCkwUbndReq ARGS((
+S16 NhLiCkwUbndReq ARGS((
          Pst *pst,
          SpId spId,
          Reason reason));
 
-EXTERN S16 NhLiCkwBndCfm ARGS((Pst *pst,
+S16 NhLiCkwBndCfm ARGS((Pst *pst,
          SuId suId,
-         U8 status));
+         uint8_t status));
 
-EXTERN S16 NhLiRlcCfgReq ARGS((
+S16 NhLiRlcCfgReq ARGS((
          Pst *pst,
          SpId spId,
          RlcCfgInfo *cfgInfo));
 
-EXTERN S16 NhLiRlcCfgCfm ARGS((Pst *pst,
+S16 NhLiRlcCfgCfm ARGS((Pst *pst,
          SuId suId,
          RlcCfgCfmInfo* cfmInfo));
 
-EXTERN S16 NhLiCkwUeIdChgReq ARGS((Pst *pst, 
-         SpId spId, U32 transId,
+S16 NhLiCkwUeIdChgReq ARGS((Pst *pst, 
+         SpId spId, uint32_t transId,
          CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
 
-EXTERN S16 NhLiCkwUeIdChgCfm  ARGS((Pst *pst, 
-         SuId suId, U32 transId, 
+S16 NhLiCkwUeIdChgCfm  ARGS((Pst *pst, 
+         SuId suId, uint32_t transId, 
          CkwUeInfo *ueInfo, CmStatus status));
 
 #endif /* NH */
 
 /* Dummy RRC Interface primitives */
 #ifdef DM
-EXTERN S16 DmUiCkwBndReq ARGS((
+S16 DmUiCkwBndReq ARGS((
          Pst *pst,
          SuId suId,
          SpId spId));
 
-EXTERN S16 DmUiCkwUbndReq ARGS((
+S16 DmUiCkwUbndReq ARGS((
          Pst *pst,
          SpId spId,
          Reason reason));
 
-EXTERN S16 DmUiCkwBndCfm ARGS((Pst *pst,
+S16 DmUiCkwBndCfm ARGS((Pst *pst,
          SuId suId,
-         U8 status));
+         uint8_t status));
 
-EXTERN S16 DmUiRlcCfgReq ARGS((
+S16 DmUiRlcCfgReq ARGS((
          Pst *pst,
          SpId spId,
          RlcCfgInfo *cfgInfo));
 
-EXTERN S16 DmUiRlcCfgCfm ARGS((Pst *pst,
+S16 DmUiRlcCfgCfm ARGS((Pst *pst,
          SuId suId,
          RlcCfgCfmInfo* cfmInfo));
 
-EXTERN S16 DmUiCkwUeIdChgReq ARGS((Pst *pst, 
-         SpId spId, U32 transId,
+S16 DmUiCkwUeIdChgReq ARGS((Pst *pst, 
+         SpId spId, uint32_t transId,
          CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
 
-EXTERN S16 DmUiCkwUeIdChgCfm  ARGS((Pst *pst, 
-         SuId suId, U32 transId, 
+S16 DmUiCkwUeIdChgCfm  ARGS((Pst *pst, 
+         SuId suId, uint32_t transId, 
          CkwUeInfo *ueInfo, CmStatus status));
 
 #endif /* DM */
@@ -411,188 +410,188 @@ EXTERN S16 DmUiCkwUeIdChgCfm  ARGS((Pst *pst,
  ****************************************************************************/
 #ifdef LCCKW
 /* Packing functions */
-EXTERN S16 cmPkRlcTmInfo ARGS ((
+S16 cmPkRlcTmInfo ARGS ((
 RlcTmInfo      *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkRlcUmInfo ARGS ((
+S16 cmPkRlcUmInfo ARGS ((
 RlcEntCfgInfo  *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkRlcAmInfo ARGS ((
+S16 cmPkRlcAmInfo ARGS ((
 RlcAmInfo      *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkCkwLChInfo ARGS ((
+S16 cmPkCkwLChInfo ARGS ((
 CkwLChInfo     *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkRlcEntCfgInfo ARGS ((
+S16 cmPkRlcEntCfgInfo ARGS ((
 RlcEntCfgInfo  *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkRlcCfgInfo ARGS ((
+S16 cmPkRlcCfgInfo ARGS ((
 RlcCfgInfo     *param,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkRlcEntCfgCfmInfo ARGS ((
+S16 cmPkRlcEntCfgCfmInfo ARGS ((
 RlcEntCfgCfmInfo  *param,
 Buffer            *mBuf
 ));
 
-EXTERN S16 cmPkRlcCfgCfmInfo ARGS ((
+S16 cmPkRlcCfgCfmInfo ARGS ((
 RlcCfgCfmInfo  *param,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmPkCkwUeInfo ARGS ((
+S16 cmPkCkwUeInfo ARGS ((
 CkwUeInfo *param,
 Buffer    *mBuf
 ));
 
-EXTERN S16 cmPkCkwBndReq ARGS ((
+S16 cmPkCkwBndReq ARGS ((
 Pst *pst,
 SuId suId,
 SpId spId
 ));
 
-EXTERN S16 cmPkCkwUbndReq ARGS ((
+S16 cmPkCkwUbndReq ARGS ((
 Pst *pst,
 SpId spId,
 Reason reason
 ));
 
-EXTERN S16 cmPkCkwBndCfm ARGS ((
+S16 cmPkCkwBndCfm ARGS ((
 Pst *pst,
 SuId suId,
-U8 status
+uint8_t status
 ));
 
-EXTERN S16 packUeCreateReq ARGS ((
+S16 packUeCreateReq ARGS ((
 Pst               *pst,
 RlcCfgInfo        *cfgInfo
 ));
 
-EXTERN S16 cmPkRlcCfgCfm ARGS ((
+S16 cmPkRlcCfgCfm ARGS ((
 Pst               *pst,
 SuId              suId,
 RlcCfgCfmInfo     *cfgCfmInfo
 ));
 
-EXTERN S16 cmPkCkwUeIdChgReq ARGS ((
+S16 cmPkCkwUeIdChgReq ARGS ((
 Pst                *pst, 
 SpId               spId, 
-U32                transId,
+uint32_t                transId,
 CkwUeInfo          *ueInfo,
 CkwUeInfo          *newUeInfo
 ));
 
-EXTERN S16 cmPkCkwUeIdChgCfm  ARGS ((
+S16 cmPkCkwUeIdChgCfm  ARGS ((
 Pst                *pst, 
 SuId               suId, 
-U32                transId, 
+uint32_t                transId, 
 CkwUeInfo          *ueInfo, 
 CmStatus           status
 ));
 
 /* Unpacking functions */
-EXTERN S16 cmUnpkRlcTmInfo ARGS ((
+S16 cmUnpkRlcTmInfo ARGS ((
 RlcTmInfo      *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcUmInfo ARGS ((
+S16 cmUnpkRlcUmInfo ARGS ((
 RlcEntCfgInfo  *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcAmInfo ARGS ((
+S16 cmUnpkRlcAmInfo ARGS ((
 RlcAmInfo      *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwLInfo ARGS ((
+S16 cmUnpkCkwLInfo ARGS ((
 CkwLChInfo     *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcCfgCfmInfo ARGS ((
+S16 cmUnpkRlcCfgCfmInfo ARGS ((
 RlcCfgCfmInfo  *param,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwBndReq ARGS ((
+S16 cmUnpkCkwBndReq ARGS ((
 CkwBndReq      func,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwLChInfo ARGS ((
+S16 cmUnpkCkwLChInfo ARGS ((
 CkwLChInfo     *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcEntCfgInfo ARGS ((
+S16 cmUnpkRlcEntCfgInfo ARGS ((
 RlcEntCfgInfo  *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcCfgInfo ARGS ((
+S16 cmUnpkRlcCfgInfo ARGS ((
 RlcCfgInfo     *param,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwUeInfo ARGS ((
+S16 cmUnpkCkwUeInfo ARGS ((
 CkwUeInfo      *param,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcCfgCfm ARGS ((
+S16 cmUnpkRlcCfgCfm ARGS ((
 RlcCfgCfm         func,
 Pst               *pst,
 Buffer            *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwUbndReq ARGS ((
+S16 cmUnpkCkwUbndReq ARGS ((
 CkwUbndReq     func,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwBndCfm ARGS ((
+S16 cmUnpkCkwBndCfm ARGS ((
 CkwBndCfm      func,
 Pst            *pst,
 Buffer         *mBuf
 ));
 
-EXTERN S16 unpackUeCreateReq ARGS ((
+S16 unpackUeCreateReq ARGS ((
 RlcCfgReq         func,
 Pst               *pst,
 Buffer            *mBuf
 ));
 
-EXTERN S16 cmUnpkRlcEntCfgCfmInfo ARGS ((
+S16 cmUnpkRlcEntCfgCfmInfo ARGS ((
 RlcEntCfgCfmInfo  *param,
 Buffer            *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwUeIdChgReq ARGS ((
+S16 cmUnpkCkwUeIdChgReq ARGS ((
 CkwUeIdChgReq      func,
 Pst                *pst, 
 Buffer             *mBuf
 ));
 
-EXTERN S16 cmUnpkCkwUeIdChgCfm  ARGS ((
+S16 cmUnpkCkwUeIdChgCfm  ARGS ((
 CkwUeIdChgCfm      func,
 Pst                *pst, 
 Buffer             *mBuf