+/* Calculates cellIdx from cellId */
+#define GET_CELL_IDX(_cellId, _cellIdx) \
+{ \
+ _cellIdx = _cellId - 1; \
+}
+
+#define SET_BITS_MSB(_startBit, _numBits, _byte) \
+{ \
+ _byte = (~((0xFF) >> _numBits)); \
+ _byte >>= _startBit; \
+}
+
+#define SET_BITS_LSB(_startBit, _numBits, _byte) \
+{ \
+ _byte = (~((0xFF) << _numBits)); \
+ _byte <<= _startBit; \
+}
+
+/* this MACRO set 1 bit at the bit position */
+#define SET_ONE_BIT(_bitPos, _out) \
+{ \
+ _out = ((1<<_bitPos) | _out); \
+}
+
+/* this MACRO un-set 1 bit at the bit position */
+#define UNSET_ONE_BIT(_bitPos, _out) \
+{ \
+ _out = (~(1<<_bitPos) & _out); \
+}
+
+/* this MACRO finds the index of the rightmost set bit */
+#define GET_RIGHT_MOST_SET_BIT( _in,_bitPos) \
+{ \
+ _bitPos = __builtin_ctz(_in); \
+}
+
+/* MACRO for checking CRNTI range*/
+#define CHECK_CRNTI(_crnti, _isCrntiValid) \
+{ \
+ _isCrntiValid = ((_crnti >= ODU_START_CRNTI && _crnti <= ODU_END_CRNTI ) ? 1 : 0); \
+}
+
+#define CHECK_LCID(_lcId, _isLcidValid) \
+{\
+ _isLcidValid = ((_lcId >= SRB0_LCID && _lcId <= MAX_DRB_LCID) ? 1 : 0);\
+}
+
+typedef enum
+{
+ SUCCESSFUL,
+ CELLID_INVALID,
+ UEID_INVALID,
+ RESOURCE_UNAVAILABLE,
+ SLICE_NOT_FOUND,
+}CauseOfResult ;
+
+typedef enum
+{
+ UE_CFG_INACTIVE,
+ UE_CFG_INPROGRESS,
+ UE_CREATE_COMPLETE,
+ UE_DELETE_COMPLETE,
+ UE_RECFG_COMPLETE,
+ UE_RESET_COMPLETE
+}UeCfgState;
+
+typedef enum
+{
+ CONFIG_UNKNOWN,
+ CONFIG_ADD,
+ CONFIG_MOD,
+ CONFIG_DEL,
+ CONFIG_REESTABLISH
+}ConfigType;
+
+#ifdef NR_TDD
+typedef enum
+{
+ TX_PRDCTY_MS_0P5,
+ TX_PRDCTY_MS_0P625,
+ TX_PRDCTY_MS_1,
+ TX_PRDCTY_MS_1P25,
+ TX_PRDCTY_MS_2,
+ TX_PRDCTY_MS_2P5,
+ TX_PRDCTY_MS_5,
+ TX_PRDCTY_MS_10
+}DlUlTxPeriodicity;
+#endif
+
+typedef enum
+{
+ SCS_15KHZ,
+ SCS_30KHZ,
+ SCS_60KHZ,
+ SCS_120KHZ,
+ SCS_240KHZ
+}SCS;
+
+typedef enum
+{
+ SSB_5MS,
+ SSB_10MS,
+ SSB_20MS,
+ SSB_40MS,
+ SSB_80MS,
+ SSB_160MS
+}SSBPeriodicity;
+
+typedef enum
+{
+ CELL_UP,
+ CELL_DOWN
+}OduCellStatus;
+
+
+typedef enum
+{
+ DIR_NONE,
+ DIR_UL,
+ DIR_DL,
+ DIR_BOTH
+}Direction;
+
+typedef enum
+{
+ SEARCH,
+ CREATE,
+ DELETE,
+ PRINT,
+ TRAVERSE_ALL
+}ActionTypeLL;
+
+typedef struct slotTimingInfo
+{
+ uint16_t cellId;
+ uint16_t sfn;
+ uint16_t slot;
+}SlotTimingInfo;
+
+typedef struct PlmnIdentity
+{
+ uint8_t mcc[3];
+ uint8_t mnc[3];
+}Plmn;
+
+typedef struct snssai
+{
+ uint8_t sst;
+ uint8_t sd[SD_SIZE];
+}Snssai;
+
+typedef struct oduCellId
+{
+ uint16_t cellId;
+}OduCellId;
+
+#ifdef NR_TDD
+typedef struct tddCfg
+{
+ DlUlTxPeriodicity tddPeriod; /*DL UL Transmission periodicity */
+ uint8_t nrOfDlSlots; /*No. of consecultive full DL slots at beginning of DL-UL pattern*/
+ uint8_t nrOfDlSymbols; /*No. of consecultive DL symbol at beginning of slot after last full DL slot*/
+ uint8_t nrOfUlSlots; /*No. of consecutive full UL slots at the end of each DL-UL pattern*/
+ uint8_t nrOfUlSymbols; /*No. of consecutive UL symbols in the end of the slot before the first full UL slot*/
+}TDDCfg;
+#endif
+
+OduCellStatus gCellStatus;
+uint64_t gSlotCount;
+uint64_t gDlDataRcvdCnt; /* Number of DL data received at EGTP */
+
+void fillCoresetFeqDomAllocMap(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain);
+void oduCpyFixBufToMsg(uint8_t *fixBuf, Buffer *mBuf, uint16_t len);
+uint8_t buildPlmnId(Plmn plmn, uint8_t *buf);
+uint16_t convertScsEnumValToScsVal(uint8_t scsEnumValue);
+uint8_t convertScsValToScsEnum(uint32_t num);
+uint8_t convertSSBPeriodicityToEnum(uint32_t num);
+
+uint8_t SGetSBufNewForDebug(char *file, const char *func, int line, Region region, Pool pool, Data **ptr, Size size);
+uint8_t SPutSBufNewForDebug(char *file, const char *func, int line, Region region, Pool pool, Data *ptr, Size size);
+uint8_t SGetStaticBufNewForDebug(char *file, const char *func, int line, \
+Region region, Pool pool, Data **ptr, Size size, uint8_t memType);
+uint8_t SPutStaticBufNewForDebug(char *file, const char *func, int line, \
+Region region, Pool pool, Data *ptr, Size size, uint8_t memType);
+uint8_t countSetBits(uint32_t num);
+uint32_t convertArfcnToFreqKhz(uint32_t arfcn);
+#endif
+