X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fcommon_def.h;h=f5591a482368cf690359b4a8e4fa10cf3eff8865;hb=6b44407d464a5a4e060999255233a7cfe78bb0fa;hp=534cdfc2ffdc203fe2d410768f3057ef21139950;hpb=105199ef642ffe9736ea24a01d4546578fa25e60;p=o-du%2Fl2.git diff --git a/src/cm/common_def.h b/src/cm/common_def.h index 534cdfc2f..f5591a482 100644 --- a/src/cm/common_def.h +++ b/src/cm/common_def.h @@ -15,6 +15,9 @@ # limitations under the License. # ################################################################################ *******************************************************************************/ +#ifndef __COMMON_DEF_H__ +#define __COMMON_DEF_H__ + #include #include #include @@ -49,6 +52,11 @@ #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 @@ -58,3 +66,54 @@ #define ODU_SELECTOR_TC 1 #define ODU_SELECTOR_LWLC 2 +#define ODU_START_CRNTI 100 +#define ODU_END_CRNTI 500 + +#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 SET_BITS_MSB(_startBit, _numBits, _byte) \ +{ \ + _byte = (~((0xFF) >> _numBits)); \ + _byte >>= _startBit; \ +} + +#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 +***********************************************************************/