# limitations under the License. #
################################################################################
*******************************************************************************/
+#ifndef __COMMON_DEF_H__
+#define __COMMON_DEF_H__
+
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include "cm_hash.x"
#include "cm_lte.x"
#include "cm_lib.x"
+#include "du_log.h"
+
+/* MAX values */
+#define MAX_NUM_CELL 1
+#define MAX_NUM_UE 1
/* 5G ORAN phy delay */
#define PHY_DELTA 2
#define ODU_SELECTOR_TC 1
#define ODU_SELECTOR_LWLC 2
-#define CRNTI_START_RANGE 100
-#define CRNTI_END_RANGE 500
+#define ODU_START_CRNTI 100
+#define ODU_END_CRNTI 500
+
+/* Defining macros for common utility functions */
+#define ODU_GET_MSG_BUF SGetMsg
+#define ODU_PUT_MSG_BUF SPutMsg
+#define ODU_ADD_PRE_MSG_MULT SAddPreMsgMult
+#define ODU_ADD_POST_MSG_MULT SAddPstMsgMult
+#define ODU_START_TASK SStartTask
+#define ODU_STOP_TASK SStopTask
+#define ODU_ATTACH_TTSK SAttachTTsk
+#define ODU_POST_TASK SPstTsk
+#define ODU_COPY_MSG_TO_FIX_BUF SCpyMsgFix
+#define ODU_COPY_FIX_BUF_TO_MSG SCpyFixMsg
+#define ODU_REG_TTSK SRegTTsk
+#define ODU_SET_PROC_ID SSetProcId
+#define ODU_FIND_MSG_LEN SFndLenMsg
+#define ODU_EXIT_TASK SExitTsk
+#define ODU_PRINT_MSG SPrntMsg
+#define ODU_REM_PRE_MSG SRemPreMsg
+#define ODU_REG_TMR_MT SRegTmrMt
+
+#define GET_UE_IDX( _crnti,_ueIdx) \
+{ \
+ _ueIdx = _crnti - ODU_START_CRNTI + 1; \
+}
+
+#define GET_CRNTI( _crnti,_ueIdx) \
+{ \
+ _crnti = _ueIdx + ODU_START_CRTNI - 1; \
+}
+
+/* Calculates cellIdx from cellId */
+#define GET_CELL_IDX(_cellId, _cellIdx) \
+{ \
+ _cellIdx = _cellId - 1; \
+}
-#define GET_UE_IDX( _crnti,_ueIdx) \
-{ \
- _ueIdx = _crnti - CRNTI_START_RANGE; \
+#define SET_BITS_MSB(_startBit, _numBits, _byte) \
+{ \
+ _byte = (~((0xFF) >> _numBits)); \
+ _byte >>= _startBit; \
}
-#define GET_CRNTI( _crnti,_ueIdx) \
-{ \
- _crnti = _ueIdx + CRNTI_START_RANGE; \
+#define SET_BITS_LSB(_startBit, _numBits, _byte) \
+{ \
+ _byte = (~((0xFF) << _numBits)); \
+ _byte <<= _startBit; \
}
+
+typedef struct slotIndInfo
+{
+ uint16_t cellId;
+ uint16_t sfn;
+ uint16_t slot;
+}SlotIndInfo;
+
+typedef struct PlmnIdentity
+{
+ uint8_t mcc[3];
+ uint8_t mnc[3];
+}Plmn;
+
+void schAllocFreqDomRscType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain);
+
+#endif
+
/**********************************************************************
- End of file
-**********************************************************************/
+ End of file
+***********************************************************************/