X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.h;h=2f2a4e67083f207b01ff3afe0285a1b382f4cf4e;hb=e550b2091fb29289d12a5722b189acbede7862f0;hp=335c182074613c639792b0bbcbac7a09e1234ddf;hpb=451e626d5ac7c7e7586bab23358161230449af46;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.h b/src/cm/du_app_mac_inf.h index 335c18207..2f2a4e670 100644 --- a/src/cm/du_app_mac_inf.h +++ b/src/cm/du_app_mac_inf.h @@ -26,11 +26,23 @@ #define NUM_SSB 1 /* max value is 64 */ #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */ +#define SIB1_NEW_TX_PERIOD 160 +#define SIB1_REPETITION_PERIOD 20 +#define CORESET_0_INDEX 0 +#define SEARCHSPACE_0_INDEX 0 +#define SIB1_MCS 4 +/* Macros for coupling */ +#define DU_MAC_LC 0 +#define DU_MAC_TC 1 +#define DU_MAC_LWLC 2 /* Event IDs */ #define EVENT_MAC_CELL_CONFIG_REQ 200 #define EVENT_MAC_CELL_CONFIG_CFM 201 +#define EVENT_MAC_CELL_START_REQ 202 +#define EVENT_MAC_CELL_STOP_REQ 203 +#define EVENT_MAC_SLOT_IND 204 typedef enum { @@ -112,16 +124,16 @@ typedef struct carrierCfg typedef struct ssbCfg { - U32 ssbPbchPwr; /* SSB block power */ - BchPduOpt bchPayloadOption; /* Options for generation of payload */ - U8 scsCmn; /* subcarrier spacing for common */ - U16 ssbPrbOffset; /* SSB PRB offset from point A */ + uint32_t ssbPbchPwr; /* SSB block power */ + BchPduOpt bchPayloadFlag; /* Options for generation of payload */ + uint8_t scsCmn; /* subcarrier spacing for common */ + uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */ BetaPss betaPss; SSBPeriod ssbPeriod; /* SSB Periodicity in msec */ - U8 ssbSubcOffset; /* Subcarrier Offset */ - U32 mibPdu; /* MIB payload */ - U32 nSSBMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */ - U8 beamId[NUM_SSB]; + uint8_t ssbScOffset; /* Subcarrier Offset */ + uint8_t mibPdu[3]; /* MIB payload */ + uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */ + uint8_t beamId[NUM_SSB]; Bool multCarrBand; /* Multiple carriers in a band */ Bool multCellCarr; /* Multiple cells in single carrier */ }SsbCfg; @@ -155,6 +167,17 @@ typedef struct tddCfg SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT]; }TDDCfg; +typedef struct sib1CellCfg +{ + uint8_t *sib1Pdu; + uint16_t sib1PduLen; + uint16_t sib1NewTxPeriod; + uint16_t sib1RepetitionPeriod; + uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */ + uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */ + uint16_t sib1Mcs; +} Sib1CellCfg; + typedef struct macCellCfg { U16 transId; @@ -170,55 +193,79 @@ typedef struct macCellCfg PrachCfg prachCfg; /* PRACH Configuration */ TDDCfg tddCfg; /* TDD periodicity and slot configuration */ RSSIMeasUnit rssiUnit; /* RSSI measurement unit */ + Sib1CellCfg sib1Cfg; }MacCellCfg; typedef struct macCellCfgCfm { + uint8_t rsp; U16 transId; }MacCellCfgCfm; -/* function pointers for packing macCellCfg Request */ -typedef S16 (*packMacCellCfgReq) ARGS(( +typedef struct slotInfo +{ + uint16_t sfn; + uint16_t slot; +}SlotInfo; + +typedef struct macCellStartInfo +{ + uint16_t cellId; +}MacCellStartInfo; + +typedef struct macCellStopInfo +{ + uint16_t cellId; +}MacCellStopInfo; + +/* Functions for slot Ind from MAC to DU APP*/ +typedef uint16_t (*DuMacSlotInd) ARGS(( + Pst *pst, + SlotInfo *slotInfo )); + +extern uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ); +extern uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf); +extern uint16_t duHandleSlotInd(Pst *pst, SlotInfo *slotInfo); + +/* Functions for mac cell start req */ +typedef uint16_t (*DuMacCellStartReq) ARGS(( + Pst *pst, + MacCellStartInfo *cellStartInfo )); + +extern uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo); +extern uint16_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf); +extern uint16_t MacHdlCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo); + +/* Functions for mac cell stop request */ +typedef uint16_t (*DuMacCellStopReq) ARGS(( + Pst *pst, + MacCellStopInfo *cellStopInfo )); + +extern uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo); +extern uint16_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf); +extern uint16_t MacHdlCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo); + +/* Function pointers for packing macCellCfg Request and Confirm */ +typedef uint16_t (*packMacCellCfgReq) ARGS(( Pst *pst, - MacCellCfg *macCellCfg -)); + MacCellCfg *macCellCfg )); -typedef S16 (*packMacCellCfgCfm) ARGS(( +typedef uint16_t (*packMacCellCfgConfirm) ARGS(( Pst *pst, - MacCellCfgCfm *macCellCfgCfm -)); - -typedef S16 (*DuMacCellCfgReq) ARGS(( - Pst *pst, /* Post Structure */ - MacCellCfg *macCellCfg /* Config Structure */ - )); - -typedef S16 (*DuMacCellCfgCfm) ARGS(( - MacCellCfgCfm *macCellCfgCfm /* Config Structure */ - )); - -S16 packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg); - -EXTERN S16 MacHdlCellCfgReq -( - Pst *pst, - MacCellCfg *macCellCfg -); - -void cmUnpackLwLcMacCellCfg( - DuMacCellCfgReq func, - Pst *pst, - Buffer *mBuf); - -S16 unpackMacCellCfgCfm( - DuMacCellCfgCfm func, - Pst *pst, - Buffer *mBuf); - -EXTERN S16 duHandleMacCellCfgCfm -( - MacCellCfgCfm *macCellCfgCfm -); + MacCellCfgCfm *macCellCfgCfm )); + +typedef uint16_t (*DuMacCellCfgReq) ARGS(( + Pst *pst, + MacCellCfg *macCellCfg)); + +typedef uint16_t (*DuMacCellCfgCfm) ARGS(( + MacCellCfgCfm *macCellCfgCfm )); + +extern uint16_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg); +extern int MacHdlCellCfgReq(Pst *pst, MacCellCfg *macCellCfg); +extern void cmUnpackLwLcMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf); +extern uint16_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf); +extern uint16_t duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm); #endif