1. Modify the wrong name file ans1c to asn1c 2.Update the do_MIB function 3.Update the gNB initial parameter for non-standalone
This commit is contained in:
@@ -333,7 +333,7 @@ add_custom_command (
|
||||
add_list2_option(NR_RRC_ASN1_VERSION "Rel15" "ASN.1 version of NR_RRC interface")
|
||||
|
||||
if (${NR_RRC_ASN1_VERSION} STREQUAL "Rel15")
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/ans1c/ASN1_files/NR-RRC-Definitions.asn)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-Definitions.asn)
|
||||
endif (${NR_RRC_ASN1_VERSION} STREQUAL "Rel15")
|
||||
|
||||
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
|
||||
|
||||
@@ -64,6 +64,8 @@ typedef UL_DCCH_Message_t RrcUlDcchMessage;
|
||||
|
||||
#define NBIOTRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nbiotrrc_configuration_req
|
||||
|
||||
#define NRRRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nrrrc_configuration_req
|
||||
|
||||
#define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req
|
||||
#define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
|
||||
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
|
||||
@@ -87,13 +89,13 @@ typedef struct RrcStateInd_s {
|
||||
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
typedef struct RrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
uint32_t cell_identity;
|
||||
|
||||
uint16_t tac;
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
|
||||
paging_drx_t default_drx;
|
||||
@@ -171,159 +173,250 @@ typedef struct RrcConfigurationReq_s {
|
||||
} RrcConfigurationReq;
|
||||
#define MAX_NUM_NBIOT_CELEVELS 3
|
||||
typedef struct NbIoTRrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
uint32_t cell_identity;
|
||||
|
||||
uint16_t tac;
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
lte_frame_type_t frame_type;
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
lte_frame_type_t frame_type;
|
||||
uint8_t tdd_config;
|
||||
uint8_t tdd_config_s;
|
||||
lte_prefix_type_t prefix_type;
|
||||
lte_prefix_type_t prefix_type_UL;
|
||||
lte_prefix_type_t prefix_type_UL;
|
||||
int16_t eutra_band;
|
||||
uint32_t downlink_frequency;
|
||||
int32_t uplink_frequency_offset;
|
||||
int16_t Nid_cell;// for testing, change later
|
||||
int16_t N_RB_DL;// for testing, change later
|
||||
//RACH
|
||||
long rach_raResponseWindowSize_NB;
|
||||
long rach_macContentionResolutionTimer_NB;
|
||||
long rach_powerRampingStep_NB;
|
||||
long rach_preambleInitialReceivedTargetPower_NB;
|
||||
long rach_preambleTransMax_CE_NB;
|
||||
long rach_raResponseWindowSize_NB;
|
||||
long rach_macContentionResolutionTimer_NB;
|
||||
long rach_powerRampingStep_NB;
|
||||
long rach_preambleInitialReceivedTargetPower_NB;
|
||||
long rach_preambleTransMax_CE_NB;
|
||||
//BCCH
|
||||
long bcch_modificationPeriodCoeff_NB;
|
||||
long bcch_modificationPeriodCoeff_NB;
|
||||
//PCCH
|
||||
long pcch_defaultPagingCycle_NB;
|
||||
long pcch_nB_NB;
|
||||
long pcch_npdcch_NumRepetitionPaging_NB;
|
||||
long pcch_defaultPagingCycle_NB;
|
||||
long pcch_nB_NB;
|
||||
long pcch_npdcch_NumRepetitionPaging_NB;
|
||||
//NPRACH
|
||||
long nprach_CP_Length;
|
||||
long nprach_rsrp_range;
|
||||
long nprach_Periodicity[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_StartTime[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_SubcarrierOffset[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_NumSubcarriers[MAX_NUM_NBIOT_CELEVELS];
|
||||
long numRepetitionsPerPreambleAttempt_NB[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_SubcarrierMSG3_RangeStart;
|
||||
long maxNumPreambleAttemptCE_NB;
|
||||
long npdcch_NumRepetitions_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long npdcch_StartSF_CSS_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long npdcch_Offset_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_CP_Length;
|
||||
long nprach_rsrp_range;
|
||||
long nprach_Periodicity[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_StartTime[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_SubcarrierOffset[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_NumSubcarriers[MAX_NUM_NBIOT_CELEVELS];
|
||||
long numRepetitionsPerPreambleAttempt_NB[MAX_NUM_NBIOT_CELEVELS];
|
||||
long nprach_SubcarrierMSG3_RangeStart;
|
||||
long maxNumPreambleAttemptCE_NB;
|
||||
long npdcch_NumRepetitions_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long npdcch_StartSF_CSS_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
long npdcch_Offset_RA[MAX_NUM_NBIOT_CELEVELS];
|
||||
//NPDSCH
|
||||
long npdsch_nrs_Power;
|
||||
long npdsch_nrs_Power;
|
||||
//NPUSCH
|
||||
long npusch_ack_nack_numRepetitions_NB;
|
||||
long npusch_srs_SubframeConfig_NB;
|
||||
long npusch_threeTone_CyclicShift_r13;
|
||||
long npusch_sixTone_CyclicShift_r13;
|
||||
BOOLEAN_t npusch_groupHoppingEnabled;
|
||||
long npusch_groupAssignmentNPUSCH_r13;
|
||||
long npusch_ack_nack_numRepetitions_NB;
|
||||
long npusch_srs_SubframeConfig_NB;
|
||||
long npusch_threeTone_CyclicShift_r13;
|
||||
long npusch_sixTone_CyclicShift_r13;
|
||||
BOOLEAN_t npusch_groupHoppingEnabled;
|
||||
long npusch_groupAssignmentNPUSCH_r13;
|
||||
|
||||
//DL_GapConfig
|
||||
long dl_GapThreshold_NB;
|
||||
long dl_GapPeriodicity_NB;
|
||||
long dl_GapDurationCoeff_NB;
|
||||
long dl_GapThreshold_NB;
|
||||
long dl_GapPeriodicity_NB;
|
||||
long dl_GapDurationCoeff_NB;
|
||||
//Uplink power control Common
|
||||
long npusch_p0_NominalNPUSCH;
|
||||
long npusch_alpha;
|
||||
long deltaPreambleMsg3;
|
||||
long npusch_p0_NominalNPUSCH;
|
||||
long npusch_alpha;
|
||||
long deltaPreambleMsg3;
|
||||
//UE timers and constants
|
||||
long ue_TimersAndConstants_t300_NB;
|
||||
long ue_TimersAndConstants_t301_NB;
|
||||
long ue_TimersAndConstants_t310_NB;
|
||||
long ue_TimersAndConstants_t311_NB;
|
||||
long ue_TimersAndConstants_n310_NB;
|
||||
long ue_TimersAndConstants_n311_NB;
|
||||
long ue_TimersAndConstants_t300_NB;
|
||||
long ue_TimersAndConstants_t301_NB;
|
||||
long ue_TimersAndConstants_t310_NB;
|
||||
long ue_TimersAndConstants_t311_NB;
|
||||
long ue_TimersAndConstants_n310_NB;
|
||||
long ue_TimersAndConstants_n311_NB;
|
||||
} NbIoTRrcConfigurationReq;
|
||||
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
typedef struct RrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
|
||||
uint16_t tac;
|
||||
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
|
||||
/*
|
||||
paging_drx_t default_drx;
|
||||
// gNB: GNB_APP -> RRC messages
|
||||
typedef struct NRRrcConfigurationReq_s {
|
||||
uint32_t cell_identity;
|
||||
uint16_t tac;
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint8_t mnc_digit_length;
|
||||
int16_t nb_cc;
|
||||
lte_frame_type_t frame_type[MAX_NUM_CCs];
|
||||
uint8_t tdd_config[MAX_NUM_CCs];
|
||||
uint8_t tdd_config_s[MAX_NUM_CCs];
|
||||
lte_prefix_type_t prefix_type[MAX_NUM_CCs];
|
||||
uint8_t pbch_repetition[MAX_NUM_CCs];
|
||||
int16_t eutra_band[MAX_NUM_CCs];
|
||||
uint32_t downlink_frequency[MAX_NUM_CCs];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs];
|
||||
int16_t Nid_cell[MAX_NUM_CCs];// for testing, change later
|
||||
int16_t N_RB_DL[MAX_NUM_CCs];// for testing, change later
|
||||
int nb_antenna_ports[MAX_NUM_CCs];
|
||||
long prach_root[MAX_NUM_CCs];
|
||||
long prach_config_index[MAX_NUM_CCs];
|
||||
BOOLEAN_t prach_high_speed[MAX_NUM_CCs];
|
||||
long prach_zero_correlation[MAX_NUM_CCs];
|
||||
long prach_freq_offset[MAX_NUM_CCs];
|
||||
long pucch_delta_shift[MAX_NUM_CCs];
|
||||
long pucch_nRB_CQI[MAX_NUM_CCs];
|
||||
long pucch_nCS_AN[MAX_NUM_CCs];
|
||||
#if !defined(Rel10) && !defined(Rel14)
|
||||
long pucch_n1_AN[MAX_NUM_CCs];
|
||||
#endif
|
||||
long pdsch_referenceSignalPower[MAX_NUM_CCs];
|
||||
long pdsch_p_b[MAX_NUM_CCs];
|
||||
long pusch_n_SB[MAX_NUM_CCs];
|
||||
long pusch_hoppingMode[MAX_NUM_CCs];
|
||||
long pusch_hoppingOffset[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_enable64QAM[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_groupHoppingEnabled[MAX_NUM_CCs];
|
||||
long pusch_groupAssignment[MAX_NUM_CCs];
|
||||
BOOLEAN_t pusch_sequenceHoppingEnabled[MAX_NUM_CCs];
|
||||
long pusch_nDMRS1[MAX_NUM_CCs];
|
||||
long phich_duration[MAX_NUM_CCs];
|
||||
long phich_resource[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_enable[MAX_NUM_CCs];
|
||||
long srs_BandwidthConfig[MAX_NUM_CCs];
|
||||
long srs_SubframeConfig[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_ackNackST[MAX_NUM_CCs];
|
||||
BOOLEAN_t srs_MaxUpPts[MAX_NUM_CCs];
|
||||
long pusch_p0_Nominal[MAX_NUM_CCs];
|
||||
long pusch_alpha[MAX_NUM_CCs];
|
||||
long pucch_p0_Nominal[MAX_NUM_CCs];
|
||||
long msg3_delta_Preamble[MAX_NUM_CCs];
|
||||
long ul_CyclicPrefixLength[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1 pucch_deltaF_Format1[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format1b pucch_deltaF_Format1b[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2 pucch_deltaF_Format2[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2a pucch_deltaF_Format2a[MAX_NUM_CCs];
|
||||
e_DeltaFList_PUCCH__deltaF_PUCCH_Format2b pucch_deltaF_Format2b[MAX_NUM_CCs];
|
||||
long rach_numberOfRA_Preambles[MAX_NUM_CCs];
|
||||
BOOLEAN_t rach_preamblesGroupAConfig[MAX_NUM_CCs];
|
||||
long rach_sizeOfRA_PreamblesGroupA[MAX_NUM_CCs];
|
||||
long rach_messageSizeGroupA[MAX_NUM_CCs];
|
||||
e_RACH_ConfigCommon__preambleInfo__preamblesGroupAConfig__messagePowerOffsetGroupB rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
|
||||
long rach_powerRampingStep[MAX_NUM_CCs];
|
||||
long rach_preambleInitialReceivedTargetPower[MAX_NUM_CCs];
|
||||
long rach_preambleTransMax[MAX_NUM_CCs];
|
||||
long rach_raResponseWindowSize[MAX_NUM_CCs];
|
||||
long rach_macContentionResolutionTimer[MAX_NUM_CCs];
|
||||
long rach_maxHARQ_Msg3Tx[MAX_NUM_CCs];
|
||||
long bcch_modificationPeriodCoeff[MAX_NUM_CCs];
|
||||
long pcch_defaultPagingCycle[MAX_NUM_CCs];
|
||||
long pcch_nB[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t300[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t301[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_t311[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n310[MAX_NUM_CCs];
|
||||
long ue_TimersAndConstants_n311[MAX_NUM_CCs];
|
||||
long ue_TransmissionMode[MAX_NUM_CCs];
|
||||
*/
|
||||
|
||||
///NR
|
||||
//NR FrequencyInfoDL
|
||||
long absoluteFrequencySSB[MAX_NUM_CCs];
|
||||
uint32_t ssb_SubcarrierOffset[MAX_NUM_CCs];
|
||||
long DL_FreqBandIndicatorNR[MAX_NUM_CCs];
|
||||
long DL_absoluteFrequencyPointA[MAX_NUM_CCs];
|
||||
|
||||
//NR DL SCS-SpecificCarrier
|
||||
uint32_t DL_offsetToCarrier[MAX_NUM_CCs];
|
||||
long DL_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
long DL_SCS_SpecificCarrier_k0[MAX_NUM_CCs];
|
||||
uint32_t DL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
//NR BWP-DownlinkCommon
|
||||
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
//NR_prefix_type_t DL_prefix_type[MAX_NUM_CCs];
|
||||
|
||||
//NR FrequencyInfoUL
|
||||
long UL_FreqBandIndicatorNR[MAX_NUM_CCs];
|
||||
long UL_absoluteFrequencyPointA[MAX_NUM_CCs];
|
||||
long FrequencyInfoUL_p_Max[MAX_NUM_CCs];
|
||||
long frequencyShift7p5khz[MAX_NUM_CCs];
|
||||
|
||||
//NR UL SCS-SpecificCarrier
|
||||
uint32_t UL_offsetToCarrier[MAX_NUM_CCs];
|
||||
long UL_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
long UL_SCS_SpecificCarrier_k0[MAX_NUM_CCs];
|
||||
uint32_t UL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
// NR BWP-UplinkCommon
|
||||
uint32_t UL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
//NR_prefix_type_t UL_prefix_type[MAX_NUM_CCs];
|
||||
|
||||
|
||||
long ssb_periodicityServingCell[MAX_NUM_CCs];
|
||||
long dmrs_TypeA_Position[MAX_NUM_CCs];
|
||||
long NIA_SubcarrierSpacing[MAX_NUM_CCs]; ///ServingCellConfigCommon Used only for non-initial access
|
||||
long ss_PBCH_BlockPower[MAX_NUM_CCs];
|
||||
|
||||
|
||||
//NR TDD-UL-DL-ConfigCommon
|
||||
long referenceSubcarrierSpacing[MAX_NUM_CCs];
|
||||
long dl_UL_TransmissionPeriodicity[MAX_NUM_CCs];
|
||||
long nrofDownlinkSlots[MAX_NUM_CCs];
|
||||
long nrofDownlinkSymbols[MAX_NUM_CCs];
|
||||
long nrofUplinkSlots[MAX_NUM_CCs];
|
||||
long nrofUplinkSymbols[MAX_NUM_CCs];
|
||||
|
||||
//NR RACH-ConfigCommon
|
||||
long rach_totalNumberOfRA_Preambles[MAX_NUM_CCs];
|
||||
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[MAX_NUM_CCs];
|
||||
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[MAX_NUM_CCs];
|
||||
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[MAX_NUM_CCs];
|
||||
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[MAX_NUM_CCs];
|
||||
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[MAX_NUM_CCs];
|
||||
long rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[MAX_NUM_CCs];
|
||||
uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[MAX_NUM_CCs];
|
||||
uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[MAX_NUM_CCs];
|
||||
uint32_t rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[MAX_NUM_CCs];
|
||||
BOOLEAN_t rach_groupBconfigured[MAX_NUM_CCs];
|
||||
long rach_ra_Msg3SizeGroupA[MAX_NUM_CCs];
|
||||
long rach_messagePowerOffsetGroupB[MAX_NUM_CCs];
|
||||
long rach_numberOfRA_PreamblesGroupA[MAX_NUM_CCs];
|
||||
long rach_ra_ContentionResolutionTimer[MAX_NUM_CCs];
|
||||
long rsrp_ThresholdSSB[MAX_NUM_CCs];
|
||||
long rsrp_ThresholdSSB_SUL[MAX_NUM_CCs];
|
||||
long prach_RootSequenceIndex_choice[MAX_NUM_CCs];
|
||||
uint32_t prach_RootSequenceIndex_l839[MAX_NUM_CCs];
|
||||
uint32_t prach_RootSequenceIndex_l139[MAX_NUM_CCs];
|
||||
long prach_msg1_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
long restrictedSetConfig[MAX_NUM_CCs];
|
||||
long msg3_transformPrecoding[MAX_NUM_CCs];
|
||||
//ssb-perRACH-OccasionAndCB-PreamblesPerSSB not sure
|
||||
|
||||
//NR RACH-ConfigGeneric
|
||||
uint32_t prach_ConfigurationIndex[MAX_NUM_CCs];
|
||||
long prach_msg1_FDM[MAX_NUM_CCs];
|
||||
long prach_msg1_FrequencyStart[MAX_NUM_CCs];
|
||||
uint32_t zeroCorrelationZoneConfig[MAX_NUM_CCs];
|
||||
long preambleReceivedTargetPower[MAX_NUM_CCs];
|
||||
long preambleTransMax[MAX_NUM_CCs];
|
||||
long powerRampingStep[MAX_NUM_CCs];
|
||||
long ra_ResponseWindow[MAX_NUM_CCs];
|
||||
|
||||
//NR PUSCH-ConfigCommon
|
||||
BOOLEAN_t groupHoppingEnabledTransformPrecoding[MAX_NUM_CCs];
|
||||
long msg3_DeltaPreamble[MAX_NUM_CCs];
|
||||
long p0_NominalWithGrant[MAX_NUM_CCs];
|
||||
|
||||
///NR PUSCH-TimeDomainResourceAllocation
|
||||
uint32_t PUSCH_TimeDomainResourceAllocation_k2[MAX_NUM_CCs];
|
||||
long PUSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs];
|
||||
|
||||
//NR PUCCH-ConfigCommon
|
||||
long pucch_GroupHopping[MAX_NUM_CCs];
|
||||
long p0_nominal[MAX_NUM_CCs];
|
||||
|
||||
//NR PDSCH-ConfigCOmmon
|
||||
//NR PDSCH-TimeDomainResourceAllocation
|
||||
uint32_t PDSCH_TimeDomainResourceAllocation_k0[MAX_NUM_CCs];
|
||||
long PDSCH_TimeDomainResourceAllocation_mappingType[MAX_NUM_CCs];
|
||||
|
||||
|
||||
//NR RateMatchPattern is used to configure one rate matching pattern for PDSCH
|
||||
long rateMatchPatternId[MAX_NUM_CCs];
|
||||
long RateMatchPattern_patternType[MAX_NUM_CCs];
|
||||
long symbolsInResourceBlock[MAX_NUM_CCs];
|
||||
long periodicityAndPattern[MAX_NUM_CCs];
|
||||
long RateMatchPattern_controlResourceSet[MAX_NUM_CCs]; ///ControlResourceSetId
|
||||
long RateMatchPattern_subcarrierSpacing[MAX_NUM_CCs];
|
||||
long RateMatchPattern_mode[MAX_NUM_CCs];
|
||||
|
||||
//NR PDCCH-ConfigCommon
|
||||
long searchSpaceSIB1[MAX_NUM_CCs];
|
||||
long searchSpaceOtherSystemInformation[MAX_NUM_CCs];
|
||||
long pagingSearchSpace[MAX_NUM_CCs];
|
||||
long ra_SearchSpace[MAX_NUM_CCs];
|
||||
long rach_ra_ControlResourceSet[MAX_NUM_CCs];
|
||||
//NR PDCCH-ConfigCommon commonControlResourcesSets
|
||||
long PDCCH_common_controlResourceSetId[MAX_NUM_CCs];
|
||||
long PDCCH_common_ControlResourceSet_duration[MAX_NUM_CCs];
|
||||
long PDCCH_cce_REG_MappingType[MAX_NUM_CCs];
|
||||
long PDCCH_reg_BundleSize[MAX_NUM_CCs];
|
||||
long PDCCH_interleaverSize[MAX_NUM_CCs];
|
||||
long PDCCH_shiftIndex[MAX_NUM_CCs];
|
||||
long PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality'
|
||||
BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs];
|
||||
|
||||
//NR PDCCH-ConfigCommon commonSearchSpaces
|
||||
long SearchSpaceId[MAX_NUM_CCs];
|
||||
long commonSearchSpaces_controlResourceSetId[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_choice[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl1[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl2[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl4[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl5[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl8[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl10[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl16[MAX_NUM_CCs];
|
||||
long SearchSpace_monitoringSlotPeriodicityAndOffset_sl20[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel1[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel2[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel4[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel8[MAX_NUM_CCs];
|
||||
long SearchSpace_nrofCandidates_aggregationLevel16[MAX_NUM_CCs];
|
||||
long SearchSpace_searchSpaceType[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_3_monitoringPeriodicity[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_3_nrofPDCCH_Candidates[MAX_NUM_CCs];
|
||||
long ue_Specific__dci_Formats[MAX_NUM_CCs];
|
||||
|
||||
|
||||
|
||||
} gNB_RrcConfigurationReq;
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file openair2/GNB_APP/RRC_paramsvalues.h
|
||||
* \brief macro definitions for RRC authorized and asn1 parameters values, to be used in paramdef_t/chechedparam_t structure initializations
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __NRRRC_PARAMSVALUES__H__
|
||||
#define __NRRRC_PARAMSVALUES__H__
|
||||
/* cell configuration section name */
|
||||
#define GNB_CONFIG_STRING_GNB_LIST "gNBs"
|
||||
/* component carriers configuration section name */
|
||||
#define GNB_CONFIG_STRING_COMPONENT_CARRIERS "component_carriers"
|
||||
|
||||
#define GNB_CONFIG_STRING_FRAME_TYPE "frame_type"
|
||||
#define GNB_CONFIG_STRING_TDD_CONFIG "tdd_config"
|
||||
#define GNB_CONFIG_STRING_TDD_CONFIG_S "tdd_config_s"
|
||||
#define GNB_CONFIG_STRING_PREFIX_TYPE "prefix_type"
|
||||
#define GNB_CONFIG_STRING_PREFIX_TYPE_UL "prefix_type_UL"
|
||||
#define GNB_CONFIG_STRING_EUTRA_BAND "eutra_band"
|
||||
#define GNB_CONFIG_STRING_DOWNLINK_FREQUENCY "downlink_frequency"
|
||||
#define GNB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET "uplink_frequency_offset"
|
||||
#define GNB_CONFIG_STRING_NID_CELL "Nid_cell"
|
||||
#define GNB_CONFIG_STRING_N_RB_DL "N_RB_DL"
|
||||
#define GNB_CONFIG_STRING_CELL_MBSFN "Nid_cell_mbsfn"
|
||||
|
||||
|
||||
#define FRAMETYPE_OKVALUES {"FDD","TDD"}
|
||||
#define FRAMETYPE_MODVALUES { FDD, TDD}
|
||||
|
||||
#define TDDCFG(A) TDD_Config__subframeAssignment_ ## A
|
||||
#define TDDCONFIG_OKRANGE { TDDCFG(sa0), TDDCFG(sa6)}
|
||||
|
||||
#define TDDCFGS(A) TDD_Config__specialSubframePatterns_ ## A
|
||||
#define TDDCONFIGS_OKRANGE { TDDCFGS(ssp0), TDDCFGS(ssp8)}
|
||||
|
||||
#define PREFIX_OKVALUES {"NORMAL","EXTENDED"}
|
||||
#define PREFIX_MODVALUES { NORMAL, EXTENDED}
|
||||
|
||||
#define PREFIXUL_OKVALUES {"NORMAL","EXTENDED"}
|
||||
#define PREFIXUL_MODVALUES { NORMAL, EXTENDED}
|
||||
|
||||
#define NRBDL_OKVALUES {6,15,25,50,75,100}
|
||||
|
||||
#define UETIMER_T300_OKVALUES {100,200,300,400,600,1000,1500,2000}
|
||||
#define UETT300(A) UE_TimersAndConstants__t300_ ## A
|
||||
#define UETIMER_T300_MODVALUES { UETT300(ms100), UETT300(ms200),UETT300(ms300),UETT300(ms400),UETT300(ms600),UETT300(ms1000),UETT300(ms1500),UETT300(ms2000)}
|
||||
|
||||
#define UETIMER_T301_OKVALUES {100,200,300,400,600,1000,1500,2000}
|
||||
#define UETT301(A) UE_TimersAndConstants__t301_ ## A
|
||||
#define UETIMER_T301_MODVALUES { UETT301(ms100), UETT301(ms200),UETT301(ms300),UETT301(ms400),UETT301(ms600),UETT301(ms1000),UETT301(ms1500),UETT301(ms2000)}
|
||||
|
||||
#define UETIMER_T310_OKVALUES {0,50,100,200,500,1000,2000}
|
||||
#define UETT310(A) UE_TimersAndConstants__t310_ ## A
|
||||
#define UETIMER_T310_MODVALUES { UETT310(ms0), UETT310(ms50),UETT310(ms100),UETT310(ms200),UETT310(ms500),UETT310(ms1000),UETT310(ms2000)}
|
||||
|
||||
#define UETIMER_T311_OKVALUES {1000,3110,5000,10000,15000,20000,31100}
|
||||
#define UETT311(A) UE_TimersAndConstants__t311_ ## A
|
||||
#define UETIMER_T311_MODVALUES { UETT311(ms1000), UETT311(ms3000),UETT311(ms5000),UETT311(ms10000),UETT311(ms15000),UETT311(ms20000),UETT311(ms30000)}
|
||||
|
||||
#define UETIMER_N310_OKVALUES {1,2,3,4,6,8,10,20}
|
||||
#define UETN310(A) UE_TimersAndConstants__n310_ ## A
|
||||
#define UETIMER_N310_MODVALUES { UETN310(n1), UETN310(n2),UETN310(n3),UETN310(n4),UETN310(n6),UETN310(n8),UETN310(n10),UETN310(n20)}
|
||||
|
||||
#define UETIMER_N311_OKVALUES {1,2,3,4,5,6,8,10}
|
||||
#define UETN311(A) UE_TimersAndConstants__n311_ ## A
|
||||
#define UETIMER_N311_MODVALUES { UETN311(n1), UETN311(n2),UETN311(n3),UETN311(n4),UETN311(n5),UETN311(n6),UETN311(n8),UETN311(n10)}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,291 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
gnb_app.c
|
||||
-------------------
|
||||
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr and Navid Nikaein
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "gnb_app.h"
|
||||
#include "gnb_config.h"
|
||||
#include "assertions.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# include "timer.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# endif
|
||||
|
||||
extern unsigned char NB_gNB_INST;
|
||||
#endif
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# define ENB_REGISTER_RETRY_DELAY 10
|
||||
# endif
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
static void configure_phy(module_id_t enb_id, const Enb_properties_array_t* enb_properties)
|
||||
{
|
||||
MessageDef *msg_p;
|
||||
int CC_id;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, PHY_CONFIGURATION_REQ);
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_CONFIGURATION_REQ (msg_p).frame_type[CC_id] = enb_properties->properties[enb_id]->frame_type[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).prefix_type[CC_id] = enb_properties->properties[enb_id]->prefix_type[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).downlink_frequency[CC_id] = enb_properties->properties[enb_id]->downlink_frequency[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[CC_id] = enb_properties->properties[enb_id]->uplink_frequency_offset[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).nb_antennas_tx[CC_id] = enb_properties->properties[enb_id]->nb_antennas_tx[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).nb_antennas_rx[CC_id] = enb_properties->properties[enb_id]->nb_antennas_rx[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).tx_gain[CC_id] = enb_properties->properties[enb_id]->tx_gain[CC_id];
|
||||
PHY_CONFIGURATION_REQ (msg_p).rx_gain[CC_id] = enb_properties->properties[enb_id]->rx_gain[CC_id];
|
||||
}
|
||||
|
||||
itti_send_msg_to_task (TASK_PHY_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
}
|
||||
*/
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
static void configure_rrc(uint32_t enb_id)
|
||||
{
|
||||
MessageDef *msg_p = NULL;
|
||||
// int CC_id;
|
||||
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, RRC_CONFIGURATION_REQ);
|
||||
|
||||
if (RC.rrc[enb_id]) {
|
||||
RCconfig_NRRRC(msg_p,enb_id, RC.rrc[enb_id]);
|
||||
|
||||
|
||||
LOG_I(ENB_APP,"Sending configuration message to RRC task\n");
|
||||
itti_send_msg_to_task (TASK_RRC_GNB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
|
||||
}
|
||||
else AssertFatal(0,"RRC context for eNB %d not allocated\n",enb_id);
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
# if defined(ENABLE_USE_MME)
|
||||
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, const Enb_properties_array_t *enb_properties)
|
||||
{
|
||||
uint32_t enb_id;
|
||||
MessageDef *msg_p;
|
||||
uint32_t register_enb_pending = 0;
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
{
|
||||
s1ap_register_enb_req_t *s1ap_register_eNB;
|
||||
|
||||
/* note: there is an implicit relationship between the data structure and the message name */
|
||||
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
|
||||
|
||||
RCconfig_S1(msg_p, enb_id);
|
||||
|
||||
if (enb_id == 0) RCconfig_gtpu();
|
||||
|
||||
s1ap_register_eNB = &S1AP_REGISTER_ENB_REQ(msg_p);
|
||||
LOG_I(ENB_APP,"default drx %d\n",s1ap_register_eNB->default_drx);
|
||||
|
||||
LOG_I(ENB_APP,"[eNB %d] eNB_app_register for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
|
||||
|
||||
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||
|
||||
register_enb_pending++;
|
||||
}
|
||||
}
|
||||
|
||||
return register_enb_pending;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*------------------------------------------------------------------------------*/
|
||||
void *eNB_app_task(void *args_p)
|
||||
{
|
||||
#if defined(ENABLE_ITTI)
|
||||
uint32_t enb_nb = RC.nb_inst;
|
||||
uint32_t enb_id_start = 0;
|
||||
uint32_t enb_id_end = enb_id_start + enb_nb;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
uint32_t register_enb_pending;
|
||||
uint32_t registered_enb;
|
||||
long enb_register_retry_timer_id;
|
||||
# endif
|
||||
uint32_t enb_id;
|
||||
MessageDef *msg_p = NULL;
|
||||
const char *msg_name = NULL;
|
||||
instance_t instance;
|
||||
int result;
|
||||
/* for no gcc warnings */
|
||||
(void)instance;
|
||||
|
||||
itti_mark_task_ready (TASK_ENB_APP);
|
||||
|
||||
LOG_I(PHY, "%s() Task ready initialise structures\n", __FUNCTION__);
|
||||
|
||||
RCconfig_L1();
|
||||
|
||||
RCconfig_macrlc();
|
||||
|
||||
LOG_I(PHY, "%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst);
|
||||
|
||||
if (RC.nb_L1_inst>0) AssertFatal(l1_north_init_eNB()==0,"could not initialize L1 north interface\n");
|
||||
|
||||
AssertFatal (enb_nb <= RC.nb_inst,
|
||||
"Number of eNB is greater than eNB defined in configuration file (%d/%d)!",
|
||||
enb_nb, RC.nb_inst);
|
||||
|
||||
LOG_I(ENB_APP,"Allocating eNB_RRC_INST for %d instances\n",RC.nb_inst);
|
||||
|
||||
RC.rrc = (eNB_RRC_INST **)malloc(RC.nb_inst*sizeof(eNB_RRC_INST *));
|
||||
LOG_I(PHY, "%s() RC.nb_inst:%d RC.rrc:%p\n", __FUNCTION__, RC.nb_inst, RC.rrc);
|
||||
|
||||
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||
RC.rrc[enb_id] = (eNB_RRC_INST*)malloc(sizeof(eNB_RRC_INST));
|
||||
LOG_I(PHY, "%s() Creating RRC instance RC.rrc[%d]:%p (%d of %d)\n", __FUNCTION__, enb_id, RC.rrc[enb_id], enb_id+1, enb_id_end);
|
||||
memset((void *)RC.rrc[enb_id],0,sizeof(eNB_RRC_INST));
|
||||
configure_rrc(enb_id);
|
||||
}
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
/* Try to register each eNB */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
# else
|
||||
/* Start L2L1 task */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
# endif
|
||||
|
||||
do {
|
||||
// Wait for a message
|
||||
itti_receive_msg (TASK_ENB_APP, &msg_p);
|
||||
|
||||
msg_name = ITTI_MSG_NAME (msg_p);
|
||||
instance = ITTI_MSG_INSTANCE (msg_p);
|
||||
|
||||
switch (ITTI_MSG_ID(msg_p)) {
|
||||
case TERMINATE_MESSAGE:
|
||||
LOG_W(ENB_APP, " *** Exiting ENB_APP thread\n");
|
||||
itti_exit_task ();
|
||||
break;
|
||||
|
||||
case MESSAGE_TEST:
|
||||
LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
|
||||
break;
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
|
||||
DevAssert(register_enb_pending > 0);
|
||||
register_enb_pending--;
|
||||
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
} else {
|
||||
uint32_t not_associated = enb_nb - registered_enb;
|
||||
|
||||
LOG_W(ENB_APP, " %d eNB %s not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
not_associated, not_associated > 1 ? "are" : "is", ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
|
||||
/* TODO handle recovering of registration */
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", msg_name, TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
|
||||
break;
|
||||
# endif
|
||||
|
||||
default:
|
||||
LOG_E(ENB_APP, "Received unexpected message %s\n", msg_name);
|
||||
break;
|
||||
}
|
||||
|
||||
result = itti_free (ITTI_MSG_ORIGIN_ID(msg_p), msg_p);
|
||||
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
|
||||
} while (1);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
gnb_app.h
|
||||
-------------------
|
||||
AUTHOR : Laurent Winckel, Sebastien ROUX, Lionel GAUTHIER, Navid Nikaein
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef GNB_APP_H_
|
||||
#define GNB_APP_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void *gNB_app_task(void *args_p);
|
||||
|
||||
|
||||
#endif /* GNB_APP_H_ */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*
|
||||
gnb_config.h
|
||||
-------------------
|
||||
AUTHOR : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel
|
||||
COMPANY : EURECOM
|
||||
EMAIL : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef GNB_CONFIG_H_
|
||||
#define GNB_CONFIG_H_
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <libconfig.h>
|
||||
|
||||
#include "commonDef.h"
|
||||
#include "platform_types.h"
|
||||
#include "platform_constants.h"
|
||||
#include "PHY/impl_defs_lte.h"
|
||||
#include "PHY/defs.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
//#ifdef CMAKER
|
||||
//#include "SystemInformationBlockType2.h"
|
||||
//#include "rrc_messages_types.h"
|
||||
//#else
|
||||
//#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
|
||||
//#endif
|
||||
#include "intertask_interface_types.h"
|
||||
#include "RRC/NR/defs_NR.h"
|
||||
|
||||
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
|
||||
struct in_addr inp;\
|
||||
if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
|
||||
AssertFatal (0, MeSsAgE);\
|
||||
} else {\
|
||||
NwBo = inp.s_addr;\
|
||||
}\
|
||||
} while (0);
|
||||
|
||||
/** @defgroup _enb_app ENB APP
|
||||
* @ingroup _oai2
|
||||
* @{
|
||||
*/
|
||||
|
||||
// Hard to find a defined value for max enb...
|
||||
#define MAX_ENB 16
|
||||
|
||||
/*
|
||||
typedef struct mme_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
unsigned ipv6:1;
|
||||
unsigned active:1;
|
||||
char *ipv4_address;
|
||||
char *ipv6_address;
|
||||
} mme_ip_address_t;
|
||||
|
||||
typedef struct ru_config_s {
|
||||
// indicates if local or remote rf is used (1 == LOCAL)
|
||||
unsigned local_rf:1;
|
||||
// indicates if UDP socket is used
|
||||
unsigned udp:1;
|
||||
// indicates if RAW socket is used
|
||||
unsigned raw:1;
|
||||
char *ru_if_name;
|
||||
char *local_address;
|
||||
char *remote_address;
|
||||
uint16_t local_port;
|
||||
uint16_t remote_port;
|
||||
uint8_t udpif4p5;
|
||||
uint8_t rawif4p5;
|
||||
uint8_t rawif5_mobipass;
|
||||
uint8_t if_compress;
|
||||
} ru_config_t;
|
||||
*/
|
||||
//extern void RCconfig_RU(void);
|
||||
//extern void RCconfig_flexran(void);
|
||||
//extern void RCconfig_L1(void);
|
||||
//extern void RCconfig_macrlc(void);
|
||||
//extern int RCconfig_gtpu(void );
|
||||
extern void NRRCConfig(void);
|
||||
|
||||
//void enb_config_display(void);
|
||||
//void ru_config_display(void);
|
||||
|
||||
int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
|
||||
//int RCconfig_S1(MessageDef *msg_p, uint32_t i);
|
||||
|
||||
#endif /* GNB_CONFIG_H_ */
|
||||
/** @} */
|
||||
@@ -0,0 +1,404 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file openair2/GNB_APP/gnb_paramdef.f
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
* \company NOKIA BellLabs France
|
||||
* \email: francois.taburet@nokia-bell-labs.com
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "common/config/config_paramdesc.h"
|
||||
#include "NRRRC_paramsvalues.h"
|
||||
|
||||
|
||||
#define GNB_CONFIG_STRING_CC_NODE_FUNCTION "node_function"
|
||||
#define GNB_CONFIG_STRING_CC_NODE_TIMING "node_timing"
|
||||
#define GNB_CONFIG_STRING_CC_NODE_SYNCH_REF "node_synch_ref"
|
||||
|
||||
|
||||
// OTG config per GNB-UE DL
|
||||
#define GNB_CONF_STRING_OTG_CONFIG "otg_config"
|
||||
#define GNB_CONF_STRING_OTG_UE_ID "ue_id"
|
||||
#define GNB_CONF_STRING_OTG_APP_TYPE "app_type"
|
||||
#define GNB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
|
||||
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
extern int asn_debug;
|
||||
extern int asn1_xer_print;
|
||||
#endif
|
||||
|
||||
#ifdef LIBCONFIG_LONG
|
||||
#define libconfig_int long
|
||||
#else
|
||||
#define libconfig_int int
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
RU = 0,
|
||||
L1 = 1,
|
||||
L2 = 2,
|
||||
L3 = 3,
|
||||
S1 = 4,
|
||||
lastel = 5
|
||||
} NRRC_config_functions_t;
|
||||
|
||||
#define CONFIG_STRING_ACTIVE_RUS "Active_RUs"
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* RUs configuration section name */
|
||||
#define CONFIG_STRING_RU_LIST "RUs"
|
||||
#define CONFIG_STRING_RU_CONFIG "ru_config"
|
||||
|
||||
/* RUs configuration parameters name */
|
||||
#define CONFIG_STRING_RU_LOCAL_IF_NAME "local_if_name"
|
||||
#define CONFIG_STRING_RU_LOCAL_ADDRESS "local_address"
|
||||
#define CONFIG_STRING_RU_REMOTE_ADDRESS "remote_address"
|
||||
#define CONFIG_STRING_RU_LOCAL_PORTC "local_portc"
|
||||
#define CONFIG_STRING_RU_REMOTE_PORTC "remote_portc"
|
||||
#define CONFIG_STRING_RU_LOCAL_PORTD "local_portd"
|
||||
#define CONFIG_STRING_RU_REMOTE_PORTD "remote_portd"
|
||||
#define CONFIG_STRING_RU_LOCAL_RF "local_rf"
|
||||
#define CONFIG_STRING_RU_TRANSPORT_PREFERENCE "tr_preference"
|
||||
#define CONFIG_STRING_RU_BAND_LIST "bands"
|
||||
#define CONFIG_STRING_RU_GNB_LIST "gNB_instances"
|
||||
#define CONFIG_STRING_RU_NB_TX "nb_tx"
|
||||
#define CONFIG_STRING_RU_NB_RX "nb_rx"
|
||||
#define CONFIG_STRING_RU_ATT_TX "att_tx"
|
||||
#define CONFIG_STRING_RU_ATT_RX "att_rx"
|
||||
#define CONFIG_STRING_RU_MAX_RS_EPRE "max_pdschReferenceSignalPower"
|
||||
#define CONFIG_STRING_RU_MAX_RXGAIN "max_rxgain"
|
||||
#define CONFIG_STRING_RU_IF_COMPRESSION "if_compression"
|
||||
#define CONFIG_STRING_RU_NBIOTRRC_LIST "NbIoT_RRC_instances"
|
||||
|
||||
#define RU_LOCAL_IF_NAME_IDX 0
|
||||
#define RU_LOCAL_ADDRESS_IDX 1
|
||||
#define RU_REMOTE_ADDRESS_IDX 2
|
||||
#define RU_LOCAL_PORTC_IDX 3
|
||||
#define RU_REMOTE_PORTC_IDX 4
|
||||
#define RU_LOCAL_PORTD_IDX 5
|
||||
#define RU_REMOTE_PORTD_IDX 6
|
||||
#define RU_TRANSPORT_PREFERENCE_IDX 7
|
||||
#define RU_LOCAL_RF_IDX 8
|
||||
#define RU_NB_TX_IDX 9
|
||||
#define RU_NB_RX_IDX 10
|
||||
#define RU_MAX_RS_EPRE_IDX 11
|
||||
#define RU_MAX_RXGAIN_IDX 12
|
||||
#define RU_BAND_LIST_IDX 13
|
||||
#define RU_GNB_LIST_IDX 14
|
||||
#define RU_ATT_TX_IDX 15
|
||||
#define RU_ATT_RX_IDX 16
|
||||
#define RU_NBIOTRRC_LIST_IDX 17
|
||||
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* RU configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define RUPARAMS_DESC { \
|
||||
{CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if5", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_GNB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFGNBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFGNBS, TYPE_INTARRAY, 1}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* value definitions for ASN1 verbosity parameter */
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none"
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
|
||||
|
||||
|
||||
/* global parameters, not under a specific section */
|
||||
#define GNB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
#define GNB_CONFIG_STRING_ACTIVE_GNBS "Active_gNBs"
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* global configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define GNBSPARAMS_DESC { \
|
||||
{GNB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:GNB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_ACTIVE_GNBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \
|
||||
}
|
||||
#define GNB_ASN1_VERBOSITY_IDX 0
|
||||
#define GNB_ACTIVE_GNBS_IDX 1
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* cell configuration parameters names */
|
||||
#define GNB_CONFIG_STRING_GNB_ID "gNB_ID"
|
||||
#define GNB_CONFIG_STRING_CELL_TYPE "cell_type"
|
||||
#define GNB_CONFIG_STRING_GNB_NAME "gNB_name"
|
||||
#define GNB_CONFIG_STRING_TRACKING_AREA_CODE "tracking_area_code"
|
||||
#define GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE "mobile_country_code"
|
||||
#define GNB_CONFIG_STRING_MOBILE_NETWORK_CODE "mobile_network_code"
|
||||
#define GNB_CONFIG_STRING_TRANSPORT_S_PREFERENCE "tr_s_preference"
|
||||
#define GNB_CONFIG_STRING_LOCAL_S_IF_NAME "local_s_if_name"
|
||||
#define GNB_CONFIG_STRING_LOCAL_S_ADDRESS "local_s_address"
|
||||
#define GNB_CONFIG_STRING_REMOTE_S_ADDRESS "remote_s_address"
|
||||
#define GNB_CONFIG_STRING_LOCAL_S_PORTC "local_s_portc"
|
||||
#define GNB_CONFIG_STRING_REMOTE_S_PORTC "remote_s_portc"
|
||||
#define GNB_CONFIG_STRING_LOCAL_S_PORTD "local_s_portd"
|
||||
#define GNB_CONFIG_STRING_REMOTE_S_PORTD "remote_s_portd"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* cell configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define GNBPARAMS_DESC {\
|
||||
{GNB_CONFIG_STRING_GNB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_GNB", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_GNB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_MOBILE_COUNTRY_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_MOBILE_NETWORK_CODE, NULL, 0, strptr:NULL, defstrval:"0", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{GNB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{GNB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
}
|
||||
#define GNB_GNB_ID_IDX 0
|
||||
#define GNB_CELL_TYPE_IDX 1
|
||||
#define GNB_GNB_NAME_IDX 2
|
||||
#define GNB_TRACKING_AREA_CODE_IDX 3
|
||||
#define GNB_MOBILE_COUNTRY_CODE_IDX 4
|
||||
#define GNB_MOBILE_NETWORK_CODE_IDX 5
|
||||
#define GNB_TRANSPORT_S_PREFERENCE_IDX 6
|
||||
#define GNB_LOCAL_S_IF_NAME_IDX 7
|
||||
#define GNB_LOCAL_S_ADDRESS_IDX 8
|
||||
#define GNB_REMOTE_S_ADDRESS_IDX 9
|
||||
#define GNB_LOCAL_S_PORTC_IDX 10
|
||||
#define GNB_REMOTE_S_PORTC_IDX 11
|
||||
#define GNB_LOCAL_S_PORTD_IDX 12
|
||||
#define GNB_REMOTE_S_PORTD_IDX 13
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
/* component carries configuration parameters name */
|
||||
|
||||
#define GNB_CONFIG_STRING_NB_ANT_PORTS "nb_antenna_ports"
|
||||
#define GNB_CONFIG_STRING_NB_ANT_TX "nb_antennas_tx"
|
||||
#define GNB_CONFIG_STRING_NB_ANT_RX "nb_antennas_rx"
|
||||
#define GNB_CONFIG_STRING_TX_GAIN "tx_gain"
|
||||
#define GNB_CONFIG_STRING_RX_GAIN "rx_gain"
|
||||
|
||||
///NR
|
||||
//NR FREQUENCYINFODL
|
||||
#define GNB_CONFIG_STRING_ABSOLUTEFREQUENCYSSB "absoluteFrequencySSB"
|
||||
#define GNB_CONFIG_STRING_SSB_SUBCARRIEROFFSET "SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_DL_FREQBANDINDICATORNR "DL_FreqBandIndicatorNR"
|
||||
#define GNB_CONFIG_STRING_DL_ABSOLUTEFREQUENCYPOINTA "DL_absoluteFrequencyPointA"
|
||||
|
||||
//NR DL SCS-SPECIFICCARRIER
|
||||
#define GNB_CONFIG_STRING_DL_OFFSETTOCARRIER "DL_offsetToCarrier"
|
||||
#define GNB_CONFIG_STRING_DL_SUBCARRIERSPACING "DL_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_DL_SCS_SPECIFICCARRIER_K0 "DL_SCS_SpecificCarrier_k0"
|
||||
#define GNB_CONFIG_STRING_DL_CARRIERBANDWIDTH "DL_carrierBandwidth"
|
||||
|
||||
// NR BWP-DOWNLINKCOMMON
|
||||
#define GNB_CONFIG_STRING_DL_LOCATIONANDBANDWIDTH "DL_locationAndBandwidth"
|
||||
///#define GNB_CONFIG_STRING_DL_PREFIX_TYPE;
|
||||
|
||||
//NR FREQUENCYINFOUL
|
||||
#define GNB_CONFIG_STRING_UL_FREQBANDINDICATORNR "UL_FreqBandIndicatorNR"
|
||||
#define GNB_CONFIG_STRING_UL_ABSOLUTEFREQUENCYPOINTA "UL_absoluteFrequencyPointA"
|
||||
#define GNB_CONFIG_STRING_FREQUENCYINFOUL_P_MAX "FrequencyInfoUL_p_Max"
|
||||
#define GNB_CONFIG_STRING_FREQUENCYSHIFT7P5KHZ "frequencyShift7p5khz"
|
||||
|
||||
//NR UL SCS-SPECIFICCARRIER
|
||||
#define GNB_CONFIG_STRING_UL_OFFSETTOCARRIER "UL_offsetToCarrier"
|
||||
#define GNB_CONFIG_STRING_UL_SUBCARRIERSPACING "UL_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_UL_SCS_SPECIFICCARRIER_K0 "UL_SCS_SpecificCarrier_k0"
|
||||
#define GNB_CONFIG_STRING_UL_CARRIERBANDWIDTH "UL_carrierBandwidth"
|
||||
|
||||
// NR BWP-UPLINKCOMMON
|
||||
#define GNB_CONFIG_STRING_UL_LOCATIONANDBANDWIDTH "UL_locationAndBandwidth"
|
||||
//NR_PREFIX_TYPE_T UL_PREFIX_TYPE[MAX_NUM_CCS];
|
||||
|
||||
|
||||
#define GNB_CONFIG_STRING_SSB_PERIODICITYSERVINGCELL "ssb_periodicityServingCell"
|
||||
#define GNB_CONFIG_STRING_DMRS_TYPEA_POSITION "dmrs_TypeA_Position"
|
||||
#define GNB_CONFIG_STRING_NIA_SUBCARRIERSPACING "NIA_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SS_PBCH_BLOCKPOWER "ss_PBCH_BlockPower"
|
||||
|
||||
|
||||
//NR TDD-UL-DL-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_REFERENCESUBCARRIERSPACING "referenceSubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_DL_UL_TRANSMISSIONPERIODICITY "dl_UL_TransmissionPeriodicity"
|
||||
#define GNB_CONFIG_STRING_NROFDOWNLINKSLOTS "nrofDownlinkSlots"
|
||||
#define GNB_CONFIG_STRING_NROFDOWNLINKSYMBOLS "nrofDownlinkSymbols"
|
||||
#define GNB_CONFIG_STRING_NROFUPLINKSLOTS "nrofUplinkSlots"
|
||||
#define GNB_CONFIG_STRING_NROFUPLINKSYMBOLS "nrofUplinkSymbols"
|
||||
|
||||
//NR RACH-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_RACH_TOTALNUMBEROFRA_PREAMBLES "rach_totalNumberOfRA_Preambles"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_CHOICE "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_ONEEIGHTH "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_ONEFOURTH "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_ONEHALF "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_ONE "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_TWO "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_FOUR "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_EIGHT "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight"
|
||||
#define GNB_CONFIG_STRING_RACH_SSB_PERRACH_OCCASIONANDCB_PREAMBLESPERSSB_SIXTEEN "rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen"
|
||||
#define GNB_CONFIG_STRING_RACH_GROUPBCONFIGURED "rach_groupBconfigured "
|
||||
#define GNB_CONFIG_STRING_RACH_RA_MSG3SIZEGROUPA "rach_ra_Msg3SizeGroupA"
|
||||
#define GNB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB "rach_messagePowerOffsetGroupB"
|
||||
#define GNB_CONFIG_STRING_RACH_NUMBEROFRA_PREAMBLESGROUPA "rach_numberOfRA_PreamblesGroupA"
|
||||
#define GNB_CONFIG_STRING_RACH_RA_CONTENTIONRESOLUTIONTIMER "rach_ra_ContentionResolutionTimer"
|
||||
#define GNB_CONFIG_STRING_RSRP_THRESHOLDSSB "rsrp_ThresholdSSB"
|
||||
#define GNB_CONFIG_STRING_RSRP_THRESHOLDSSB_SUL "rsrp_ThresholdSSB_SUL"
|
||||
#define GNB_CONFIG_STRING_PRACH_ROOTSEQUENCEINDEX_CHOICE "prach_RootSequenceIndex_choice"
|
||||
#define GNB_CONFIG_STRING_PRACH_ROOTSEQUENCEINDEX_L839 "prach_RootSequenceIndex_l839"
|
||||
#define GNB_CONFIG_STRING_PRACH_ROOTSEQUENCEINDEX_L139 "prach_RootSequenceIndex_l139"
|
||||
#define GNB_CONFIG_STRING_PRACH_MSG1_SUBCARRIERSPACING "prach_msg1_SubcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_RESTRICTEDSETCONFIG "restrictedSetConfig"
|
||||
#define GNB_CONFIG_STRING_MSG3_TRANSFORMPRECODING "msg3_transformPrecoding"
|
||||
//SSB-PERRACH-OCCASIONANDCB-PREAMBLESPERSSB NOT SURE
|
||||
|
||||
//NR RACH-CONFIGGENERIC
|
||||
#define GNB_CONFIG_STRING_PRACH_CONFIGURATIONINDEX "prach_ConfigurationIndex"
|
||||
#define GNB_CONFIG_STRING_PRACH_MSG1_FDM "prach_msg1_FDM"
|
||||
#define GNB_CONFIG_STRING_PRACH_MSG1_FREQUENCYSTART "prach_msg1_FrequencyStart"
|
||||
#define GNB_CONFIG_STRING_ZEROCORRELATIONZONECONFIG "zeroCorrelationZoneConfig"
|
||||
#define GNB_CONFIG_STRING_PREAMBLERECEIVEDTARGETPOWER "preambleReceivedTargetPower"
|
||||
#define GNB_CONFIG_STRING_PREAMBLETRANSMAX "preambleTransMax"
|
||||
#define GNB_CONFIG_STRING_POWERRAMPINGSTEP "powerRampingStep"
|
||||
#define GNB_CONFIG_STRING_RA_RESPONSEWINDOW "ra_ResponseWindow"
|
||||
|
||||
//PUSCH-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_GROUPHOPPINGENABLEDTRANSFORMPRECODING "groupHoppingEnabledTransformPrecoding"
|
||||
#define GNB_CONFIG_STRING_MSG3_DELTAPREAMBLE "msg3_DeltaPreamble"
|
||||
#define GNB_CONFIG_STRING_P0_NOMINALWITHGRANT "p0_NominalWithGrant"
|
||||
|
||||
///PUSCH-TIMEDOMAINRESOURCEALLOCATION
|
||||
#define GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_K2 "PUSCH_TimeDomainResourceAllocation_k2"
|
||||
#define GNB_CONFIG_STRING_PUSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE "PUSCH_TimeDomainResourceAllocation_mappingType"
|
||||
|
||||
//PUCCH-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_PUCCH_GROUPHOPPING "pucch_GroupHopping"
|
||||
#define GNB_CONFIG_STRING_P0_NOMINAL "p0_nominal"
|
||||
|
||||
//PDSCH-CONFIGCOMMON
|
||||
//PDSCH-TIMEDOMAINRESOURCEALLOCATION
|
||||
#define GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_K0 "PDSCH_TimeDomainResourceAllocation_k0"
|
||||
#define GNB_CONFIG_STRING_PDSCH_TIMEDOMAINRESOURCEALLOCATION_MAPPINGTYPE "PDSCH_TimeDomainResourceAllocation_mappingType"
|
||||
|
||||
//RATEMATCHPATTERN IS USED TO CONFIGURE ONE RATE MATCHING PATTERN FOR PDSCH
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERNID "rateMatchPatternId"
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERN_PATTERNTYPE "RateMatchPattern_patternType"
|
||||
#define GNB_CONFIG_STRING_SYMBOLSINRESOURCEBLOCK "symbolsInResourceBlock"
|
||||
#define GNB_CONFIG_STRING_PERIODICITYANDPATTERN "periodicityAndPattern"
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERN_CONTROLRESOURCESET "RateMatchPattern_controlResourceSet"
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERN_SUBCARRIERSPACING "RateMatchPattern_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_RATEMATCHPATTERN_MODE "RateMatchPattern_mode"
|
||||
|
||||
//PDCCH-CONFIGCOMMON
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACESIB1 "searchSpaceSIB1"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACEOTHERSYSTEMINFORMATION "searchSpaceOtherSystemInformation"
|
||||
#define GNB_CONFIG_STRING_PAGINGSEARCHSPACE "pagingSearchSpace"
|
||||
#define GNB_CONFIG_STRING_RA_SEARCHSPACE "ra_SearchSpace"
|
||||
#define GNB_CONFIG_STRING_RACH_RA_CONTROLRESOURCESET "rach_ra_ControlResourceSet"
|
||||
//NR PDCCH-CONFIGCOMMON COMMONCONTROLRESOURCESSETS
|
||||
#define GNB_CONFIG_STRING_PDCCH_COMMON_CONTROLRESOURCESETID "PDCCH_common_controlResourceSetId"
|
||||
#define GNB_CONFIG_STRING_PDCCH_COMMON_CONTROLRESOURCESET_DURATION "PDCCH_common_ControlResourceSet_duration"
|
||||
#define GNB_CONFIG_STRING_PDCCH_CCE_REG_MAPPINGTYPE "PDCCH_cce_REG_MappingType"
|
||||
#define GNB_CONFIG_STRING_PDCCH_REG_BUNDLESIZE "PDCCH_reg_BundleSize"
|
||||
#define GNB_CONFIG_STRING_PDCCH_INTERLEAVERSIZE "PDCCH_interleaverSize"
|
||||
#define GNB_CONFIG_STRING_PDCCH_SHIFTINDEX "PDCCH_shiftIndex"
|
||||
#define GNB_CONFIG_STRING_PDCCH_PRECODERGRANULARITY "PDCCH_precoderGranularity"
|
||||
#define GNB_CONFIG_STRING_TCI_PRESENTINDCI "tci_PresentInDCI"
|
||||
|
||||
//NR PDCCH-ConfigCommon commonSearchSpaces
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACEID "SearchSpaceId"
|
||||
#define GNB_CONFIG_STRING_COMMONSEARCHSPACES_CONTROLRESOURCESETID "commonSearchSpaces_controlResourceSetId"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_CHOICE "SearchSpace_monitoringSlotPeriodicityAndOffset_choice"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL1 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl1"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL2 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl2"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL4 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl4"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL5 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl5"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL8 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl8"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL10 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl10"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL16 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl16"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_MONITORINGSLOTPERIODICITYANDOFFSET_SL20 "SearchSpace_monitoringSlotPeriodicityAndOffset_sl20"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL1 "SearchSpace_nrofCandidates_aggregationLevel1"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL2 "SearchSpace_nrofCandidates_aggregationLevel2"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL4 "SearchSpace_nrofCandidates_aggregationLevel4"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL8 "SearchSpace_nrofCandidates_aggregationLevel8"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_NROFCANDIDATES_AGGREGATIONLEVEL16 "SearchSpace_nrofCandidates_aggregationLevel16"
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACE_SEARCHSPACETYPE "SearchSpace_searchSpaceType"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_0_NROFCANDIDATES_SFI_AGGREGATIONLEVEL1 "Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_0_NROFCANDIDATES_SFI_AGGREGATIONLEVEL2 "Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_0_NROFCANDIDATES_SFI_AGGREGATIONLEVEL4 "Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_0_NROFCANDIDATES_SFI_AGGREGATIONLEVEL8 "Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_0_NROFCANDIDATES_SFI_AGGREGATIONLEVEL16 "Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_3_MONITORINGPERIODICITY "Common_dci_Format2_3_monitoringPeriodicity"
|
||||
#define GNB_CONFIG_STRING_COMMON_DCI_FORMAT2_3_NROFPDCCH_CANDIDATES "Common_dci_Format2_3_nrofPDCCH_Candidates"
|
||||
#define GNB_CONFIG_STRING_UE_SPECIFIC__DCI_FORMATS "ue_Specific__dci_Formats"
|
||||
|
||||
|
||||
//PDCCH-CONFIGCOMMON
|
||||
|
||||
//CONTROLRESOURCESET
|
||||
#define GNB_CONFIG_STRING_CONTROLRESOURCESETID = 0;
|
||||
#define GNB_CONFIG_STRING_FREQUENCYDOMAINRESOURCES = 0;
|
||||
#define GNB_CONFIG_STRING_CONTROLRESOURCESET_DURATION = 0;
|
||||
#define GNB_CONFIG_STRING_PRECODERGRANULARITY = 0; //CORRESPONDS TO L1 PARAMETER 'CORESET-PRECODER-GRANUALITY'
|
||||
#define GNB_CONFIG_STRING_TCI_PRESENTINDCI = NULL;
|
||||
|
||||
//SEARCHSPACE
|
||||
#define GNB_CONFIG_STRING_SEARCHSPACEID = 0;
|
||||
#define GNB_CONFIG_STRING_DCI_FORMAT2_3_MONITORINGPERIODICITY = 0;
|
||||
#define GNB_CONFIG_STRING_DCI_FORMAT2_3_NROFPDCCH_CANDIDATES = 0;
|
||||
|
||||
|
||||
// NR SYNCHRONIZATION SIGNAL BLOCK
|
||||
|
||||
#define GNB_CONFIG_STRING_SSB_PERIODICITYSERVINGCELL = 0;
|
||||
#define GNB_CONFIG_STRING_SS_PBCH_BLOCKPOWER = 0;
|
||||
|
||||
|
||||
+245
-191
@@ -48,41 +48,42 @@
|
||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||
#include <per_encoder.h>
|
||||
|
||||
#include "RRC/NR/defs_NR.h"
|
||||
//#include "RRC/LITE/extern.h"
|
||||
|
||||
#if defined(Rel15)
|
||||
#include "assertions.h"
|
||||
#include "RRCConnectionRequest.h"
|
||||
#include "UL-CCCH-Message.h"
|
||||
//#include "RRCConnectionRequest.h"
|
||||
//#include "UL-CCCH-Message.h"
|
||||
#include "UL-DCCH-Message.h"
|
||||
#include "DL-CCCH-Message.h"
|
||||
//#include "DL-CCCH-Message.h"
|
||||
#include "DL-DCCH-Message.h"
|
||||
#include "EstablishmentCause.h"
|
||||
#include "RRCConnectionSetup.h"
|
||||
//#include "EstablishmentCause.h"
|
||||
//#include "RRCConnectionSetup.h"
|
||||
#include "SRB-ToAddModList.h"
|
||||
#include "DRB-ToAddModList.h"
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
#include "MCCH-Message.h"
|
||||
//#include "MCCH-Message.h"
|
||||
//#define MRB1 1
|
||||
#endif
|
||||
|
||||
#include "RRC/LITE/defs.h"
|
||||
#include "RRC/LITE/extern.h"
|
||||
#include "RRCConnectionSetupComplete.h"
|
||||
#include "RRCConnectionReconfigurationComplete.h"
|
||||
#include "RRCConnectionReconfiguration.h"
|
||||
#include "MasterInformationBlock.h"
|
||||
#include "SystemInformation.h"
|
||||
//#include "RRCConnectionSetupComplete.h"
|
||||
//#include "RRCConnectionReconfigurationComplete.h"
|
||||
//#include "RRCConnectionReconfiguration.h"
|
||||
#include "MIB.h"
|
||||
//#include "SystemInformation.h"
|
||||
|
||||
#include "SystemInformationBlockType1.h"
|
||||
#include "SIB1.h"
|
||||
|
||||
#include "SIB-Type.h"
|
||||
//#include "SIB-Type.h"
|
||||
|
||||
#include "BCCH-DL-SCH-Message.h"
|
||||
//#include "BCCH-DL-SCH-Message.h"
|
||||
|
||||
#include "PHY/defs.h"
|
||||
//#include "PHY/defs.h"
|
||||
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "ReportConfigToAddModList.h"
|
||||
#include "MeasIdToAddModList.h"
|
||||
#include "enb_config.h"
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
@@ -110,7 +111,9 @@ typedef struct xer_sprint_string_s {
|
||||
size_t string_index;
|
||||
} xer_sprint_string_t;
|
||||
|
||||
extern unsigned char NB_eNB_INST;
|
||||
//repplace LTE
|
||||
//extern unsigned char NB_eNB_INST;
|
||||
extern unsigned char NB_gNB_INST;
|
||||
extern uint8_t usim_test;
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
@@ -129,7 +132,7 @@ uint16_t two_tier_hexagonal_adjacent_cellIds[7][6] = {{1,2,4,5,7,8}, // CellI
|
||||
* This is a helper function for xer_sprint, which directs all incoming data
|
||||
* into the provided string.
|
||||
*/
|
||||
static int xer__print2s (const void *buffer, size_t size, void *app_key)
|
||||
static int xer__print2s_NR (const void *buffer, size_t size, void *app_key)
|
||||
{
|
||||
xer_sprint_string_t *string_buffer = (xer_sprint_string_t *) app_key;
|
||||
size_t string_remaining = string_buffer->string_size - string_buffer->string_index;
|
||||
@@ -146,7 +149,7 @@ static int xer__print2s (const void *buffer, size_t size, void *app_key)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xer_sprint (char *string, size_t string_size, asn_TYPE_descriptor_t *td, void *sptr)
|
||||
int xer_sprint_NR (char *string, size_t string_size, asn_TYPE_descriptor_t *td, void *sptr)
|
||||
{
|
||||
asn_enc_rval_t er;
|
||||
xer_sprint_string_t string_buffer;
|
||||
@@ -170,13 +173,13 @@ int xer_sprint (char *string, size_t string_size, asn_TYPE_descriptor_t *td, voi
|
||||
return er.encoded;
|
||||
}
|
||||
|
||||
uint16_t get_adjacent_cell_id(uint8_t Mod_id,uint8_t index)
|
||||
uint16_t get_adjacent_cell_id_NR(uint8_t Mod_id,uint8_t index)
|
||||
{
|
||||
return(two_tier_hexagonal_adjacent_cellIds[Mod_id][index]);
|
||||
}
|
||||
/* This only works for the hexagonal topology...need a more general function for other topologies */
|
||||
|
||||
uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId)
|
||||
uint8_t get_adjacent_cell_mod_id_NR(uint16_t phyCellId)
|
||||
{
|
||||
uint8_t i;
|
||||
|
||||
@@ -190,94 +193,89 @@ uint8_t get_adjacent_cell_mod_id(uint16_t phyCellId)
|
||||
return 0xFF; //error!
|
||||
}
|
||||
|
||||
uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich_Resource, uint32_t phich_duration, uint32_t frame)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
uint32_t frame,
|
||||
uint32_t ssb_SubcarrierOffset,
|
||||
uint32_t pdcch_ConfigSIB1,
|
||||
uint32_t subCarrierSpacingCommon,
|
||||
uint32_t dmrs_TypeA_Position)
|
||||
{
|
||||
|
||||
asn_enc_rval_t enc_rval;
|
||||
BCCH_BCH_Message_t *mib=&carrier->mib ;
|
||||
uint8_t sfn = (uint8_t)((frame>>2)&0xff);
|
||||
uint16_t *spare= calloc(1, sizeof(uint16_t));
|
||||
|
||||
BCCH_BCH_Message_t *mib=&carrier->mib_NR ;
|
||||
memset(mib,0,sizeof(BCCH_BCH_Message_t));
|
||||
mib->message.present = BCCH_BCH_MessageType_PR_mib;
|
||||
|
||||
//36.331 SFN BIT STRING (SIZE (8) , 38.331 SFN BIT STRING (SIZE (6))
|
||||
uint8_t sfn = (uint8_t)((frame>>4)&0x3f);
|
||||
mib->message.choice.mib.systemFrameNumber.buf = &sfn;
|
||||
mib->message.choice.mib.systemFrameNumber.size = 1;
|
||||
mib->message.choice.mib.systemFrameNumber.bits_unused=0;
|
||||
|
||||
//38.331 spare BIT STRING (SIZE (1))
|
||||
uint8_t *spare= calloc(1, sizeof(uint8_t));
|
||||
if (spare == NULL) abort();
|
||||
mib->message.choice.mib.spare.buf = (uint8_t *)spare;
|
||||
mib->message.choice.mib.spare.size = 1;
|
||||
mib->message.choice.mib.spare.bits_unused = 7; // This makes a spare of 1 bits
|
||||
|
||||
switch (N_RB_DL) {
|
||||
mib->message.choice.mib.ssb_SubcarrierOffset = ssb_SubcarrierOffset;
|
||||
mib->message.choice.mib.pdcch_ConfigSIB1 = pdcch_ConfigSIB1;
|
||||
|
||||
switch (subCarrierSpacingCommon) {
|
||||
case 15:
|
||||
mib->message.choice.mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
mib->message.dl_Bandwidth = MasterInformationBlock__dl_Bandwidth_n6;
|
||||
break;
|
||||
case 30:
|
||||
mib->message.choice.mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs30or120;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
mib->message.dl_Bandwidth = MasterInformationBlock__dl_Bandwidth_n15;
|
||||
break;
|
||||
case 60:
|
||||
mib->message.choice.mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs15or60;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
mib->message.dl_Bandwidth = MasterInformationBlock__dl_Bandwidth_n25;
|
||||
break;
|
||||
case 120:
|
||||
mib->message.choice.mib.subCarrierSpacingCommon = MIB__subCarrierSpacingCommon_scs30or120;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
mib->message.dl_Bandwidth = MasterInformationBlock__dl_Bandwidth_n50;
|
||||
break;
|
||||
|
||||
case 75:
|
||||
mib->message.dl_Bandwidth = MasterInformationBlock__dl_Bandwidth_n75;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
mib->message.dl_Bandwidth = MasterInformationBlock__dl_Bandwidth_n100;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown dl_Bandwidth %d\n",N_RB_DL);
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown subCarrierSpacingCommon %d\n",subCarrierSpacingCommon);
|
||||
}
|
||||
|
||||
AssertFatal(phich_Resource <= PHICH_Config__phich_Resource_two,"Illegal phich_Resource\n");
|
||||
mib->message.phich_Config.phich_Resource = phich_Resource;
|
||||
AssertFatal(phich_Resource <= PHICH_Config__phich_Duration_extended,"Illegal phich_Duration\n");
|
||||
mib->message.phich_Config.phich_Duration = phich_duration;
|
||||
LOG_I(RRC,"[MIB] systemBandwidth %x, phich_duration %x, phich_resource %x,sfn %x\n",
|
||||
(uint32_t)mib->message.dl_Bandwidth,
|
||||
(uint32_t)phich_duration,
|
||||
(uint32_t)phich_Resource,
|
||||
(uint32_t)sfn);
|
||||
switch (dmrs_TypeA_Position) {
|
||||
case 2:
|
||||
mib->message.choice.mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos2;
|
||||
break;
|
||||
|
||||
mib->message.systemFrameNumber.buf = &sfn;
|
||||
mib->message.systemFrameNumber.size = 1;
|
||||
mib->message.systemFrameNumber.bits_unused=0;
|
||||
mib->message.spare.buf = (uint8_t *)spare;
|
||||
#ifndef Rel14
|
||||
mib->message.spare.size = 2;
|
||||
mib->message.spare.bits_unused = 6; // This makes a spare of 10 bits
|
||||
#else
|
||||
mib->message.spare.size = 1;
|
||||
mib->message.spare.bits_unused = 3; // This makes a spare of 5 bits
|
||||
mib->message.schedulingInfoSIB1_BR_r13 = 0; // turn off eMTC
|
||||
#endif
|
||||
case 3:
|
||||
mib->message.choice.mib.dmrs_TypeA_Position = MIB__dmrs_TypeA_Position_pos3;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Unknown dmrs_TypeA_Position %d\n",dmrs_TypeA_Position);
|
||||
|
||||
}
|
||||
|
||||
// assign_enum
|
||||
mib->message.choice.mib.cellBarred = MIB__cellBarred_notBarred;
|
||||
// assign_enum
|
||||
mib->message.choice.mib.intraFreqReselection = MIB__intraFreqReselection_notAllowed;
|
||||
|
||||
|
||||
|
||||
//encode MIB to data
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
|
||||
(void*)mib,
|
||||
carrier->MIB,
|
||||
carrier->MIB_NR,
|
||||
24);
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if !defined(DISABLE_XER_SPRINT)
|
||||
{
|
||||
char message_string[20000];
|
||||
size_t message_string_size;
|
||||
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_BCCH_BCH_Message, (void *) &mib)) > 0) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_BCCH, message_string_size + sizeof (IttiMsgText));
|
||||
msg_p->ittiMsg.rrc_dl_bcch.size = message_string_size;
|
||||
memcpy(&msg_p->ittiMsg.rrc_dl_bcch.text, message_string, message_string_size);
|
||||
|
||||
itti_send_msg_to_task(TASK_UNKNOWN, enb_module_idP, msg_p);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
*/
|
||||
if (enc_rval.encoded==-1) {
|
||||
return(-1);
|
||||
}
|
||||
@@ -285,12 +283,15 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
||||
int Mod_id,int CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, RrcConfigurationReq *configuration
|
||||
#endif
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
int Mod_id,
|
||||
int CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, gNB_RrcConfigurationReq *configuration
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
// SystemInformation_t systemInformation;
|
||||
@@ -302,7 +303,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
||||
|
||||
uint8_t *buffer = carrier->SIB1;
|
||||
BCCH_DL_SCH_Message_t *bcch_message = &carrier->siblock1;
|
||||
SystemInformationBlockType1_t **sib1 = &carrier->sib1;
|
||||
SIB1_t **sib1 = &carrier->sib1;
|
||||
|
||||
|
||||
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
|
||||
@@ -494,6 +495,8 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
uint8_t do_SIB23(uint8_t Mod_id,
|
||||
|
||||
int CC_id
|
||||
@@ -960,9 +963,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
||||
bcch_message->message.present = BCCH_DL_SCH_MessageType_PR_c1;
|
||||
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType__c1_PR_systemInformation;
|
||||
|
||||
/* memcpy((void*)&bcch_message.message.choice.c1.choice.systemInformation,
|
||||
(void*)systemInformation,
|
||||
sizeof(SystemInformation_t));*/
|
||||
//memcpy((void*)&bcch_message.message.choice.c1.choice.systemInformation,(void*)systemInformation,sizeof(SystemInformation_t));
|
||||
|
||||
bcch_message->message.choice.c1.choice.systemInformation.criticalExtensions.present = SystemInformation__criticalExtensions_PR_systemInformation_r8;
|
||||
|
||||
@@ -1024,7 +1025,11 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
|
||||
{
|
||||
|
||||
@@ -1109,7 +1114,11 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS)
|
||||
{
|
||||
|
||||
@@ -1140,24 +1149,24 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
|
||||
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME =
|
||||
NULL;//calloc(1,sizeof(*rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME));
|
||||
/*
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->plmn_Identity=NULL;
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.buf = calloc(2,1);
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.buf[0] = 0x0;
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.buf[1] = 0x1;
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.size=2;
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.bits_unused=0;
|
||||
*/
|
||||
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->plmn_Identity=NULL;
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.buf = calloc(2,1);
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.buf[0] = 0x0;
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.buf[1] = 0x1;
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.size=2;
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmegi.bits_unused=0;
|
||||
|
||||
memset(&rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.dedicatedInfoNAS,0,sizeof(OCTET_STRING_t));
|
||||
OCTET_STRING_fromBuf(&rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.dedicatedInfoNAS,
|
||||
dedicatedInfoNAS, dedicatedInfoNASLength);
|
||||
|
||||
/*
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.buf = calloc(1,1);
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.buf[0] = 0x98;
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.size=1;
|
||||
rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.bits_unused=0;
|
||||
*/
|
||||
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.buf = calloc(1,1);
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.buf[0] = 0x98;
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.size=1;
|
||||
//rrcConnectionSetupComplete->criticalExtensions.choice.c1.choice.rrcConnectionSetupComplete_r8.registeredMME->mmec.bits_unused=0;
|
||||
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
|
||||
(void*)&ul_dcch_msg,
|
||||
@@ -1192,8 +1201,11 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
|
||||
return((enc_rval.encoded+7)/8);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t
|
||||
do_RRCConnectionReconfigurationComplete(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -1253,9 +1265,11 @@ do_RRCConnectionReconfigurationComplete(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t
|
||||
do_RRCConnectionSetup(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -1444,16 +1458,16 @@ do_RRCConnectionSetup(
|
||||
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic=CALLOC(1,sizeof(*physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic));
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_release;
|
||||
/*
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_setup;
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex = 0; // n2_pucch
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex = 0; // Icqi/pmi
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present = CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI; // subband CQI
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.choice.subbandCQI.k=4;
|
||||
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->present = CQI_ReportPeriodic_PR_setup;
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex = 0; // n2_pucch
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_pmi_ConfigIndex = 0; // Icqi/pmi
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.present = CQI_ReportPeriodic__setup__cqi_FormatIndicatorPeriodic_PR_subbandCQI; // subband CQI
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.cqi_FormatIndicatorPeriodic.choice.subbandCQI.k=4;
|
||||
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex=NULL;
|
||||
physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI=0;
|
||||
*/
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.ri_ConfigIndex=NULL;
|
||||
//physicalConfigDedicated2->cqi_ReportConfig->cqi_ReportPeriodic->choice.setup.simultaneousAckNackAndCQI=0;
|
||||
|
||||
|
||||
//soundingRS-UL-ConfigDedicated
|
||||
if (rrc->srs_enable[CC_id]==1) {
|
||||
@@ -1516,36 +1530,36 @@ do_RRCConnectionSetup(
|
||||
case 2:
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm2;
|
||||
break;
|
||||
/*
|
||||
case 3:
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3;
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,
|
||||
sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction));
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
|
||||
AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
|
||||
|
||||
//case 3:
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm3;
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction= CALLOC(1,
|
||||
// sizeof(*physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction));
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->present =
|
||||
// AntennaInfoDedicated__codebookSubsetRestriction_PR_n2TxAntenna_tm3;
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf= MALLOC(1);
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.buf[0] = 0xc0;
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.size=1;
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.codebookSubsetRestriction->choice.n2TxAntenna_tm3.bits_unused=6;
|
||||
|
||||
break;
|
||||
// break;
|
||||
|
||||
case 4:
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm4;
|
||||
break;
|
||||
//case 4:
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm4;
|
||||
// break;
|
||||
|
||||
case 5:
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm5;
|
||||
break;
|
||||
//case 5:
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm5;
|
||||
// break;
|
||||
|
||||
case 6:
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6;
|
||||
break;
|
||||
//case 6:
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm6;
|
||||
// break;
|
||||
|
||||
case 7:
|
||||
physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7;
|
||||
break;
|
||||
*/
|
||||
//case 7:
|
||||
// physicalConfigDedicated2->antennaInfo->choice.explicitValue.transmissionMode= AntennaInfoDedicated__transmissionMode_tm7;
|
||||
// break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1649,8 +1663,11 @@ do_RRCConnectionSetup(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t
|
||||
do_SecurityModeCommand(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -1728,8 +1745,11 @@ do_SecurityModeCommand(
|
||||
// exit(-1);
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t
|
||||
do_UECapabilityEnquiry(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -1804,8 +1824,11 @@ do_UECapabilityEnquiry(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint16_t
|
||||
do_RRCConnectionReconfiguration(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
@@ -1963,8 +1986,11 @@ do_RRCConnectionReconfiguration(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t
|
||||
do_RRCConnectionReestablishmentReject(
|
||||
uint8_t Mod_id,
|
||||
@@ -2021,8 +2047,11 @@ do_RRCConnectionReestablishmentReject(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t
|
||||
do_RRCConnectionReject(
|
||||
uint8_t Mod_id,
|
||||
@@ -2043,7 +2072,7 @@ do_RRCConnectionReject(
|
||||
// RRCConnectionReject
|
||||
rrcConnectionReject->criticalExtensions.present = RRCConnectionReject__criticalExtensions_PR_c1;
|
||||
rrcConnectionReject->criticalExtensions.choice.c1.present = RRCConnectionReject__criticalExtensions__c1_PR_rrcConnectionReject_r8;
|
||||
/* let's put a wait time of 1s for the moment */
|
||||
/// let's put a wait time of 1s for the moment
|
||||
rrcConnectionReject->criticalExtensions.choice.c1.choice.rrcConnectionReject_r8.waitTime = 1;
|
||||
|
||||
#ifdef XER_PRINT
|
||||
@@ -2082,7 +2111,11 @@ do_RRCConnectionReject(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t do_RRCConnectionRelease(
|
||||
uint8_t Mod_id,
|
||||
uint8_t *buffer,
|
||||
@@ -2120,10 +2153,15 @@ uint8_t do_RRCConnectionRelease(
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
uint8_t sync_area,
|
||||
@@ -2190,10 +2228,10 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
pmch_Info_1 = CALLOC(1,sizeof(PMCH_Info_r9_t));
|
||||
memset((void*)pmch_Info_1,0,sizeof(PMCH_Info_r9_t));
|
||||
|
||||
/*
|
||||
* take the value of last mbsfn subframe in this CSA period because there is only one PMCH in this mbsfn area
|
||||
* Note: this has to be set based on the subframeAllocation and CSA
|
||||
*/
|
||||
|
||||
///take the value of last mbsfn subframe in this CSA period because there is only one PMCH in this mbsfn area
|
||||
///Note: this has to be set based on the subframeAllocation and CSA
|
||||
|
||||
pmch_Info_1->pmch_Config_r9.sf_AllocEnd_r9= 3;
|
||||
pmch_Info_1->pmch_Config_r9.dataMCS_r9= 7;
|
||||
pmch_Info_1->pmch_Config_r9.mch_SchedulingPeriod_r9= PMCH_Config_r9__mch_SchedulingPeriod_r9_rf16;
|
||||
@@ -2218,23 +2256,23 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
mbms_Session_1->logicalChannelIdentity_r9= MTCH;
|
||||
ASN_SEQUENCE_ADD(&pmch_Info_1->mbms_SessionInfoList_r9.list,mbms_Session_1);
|
||||
|
||||
/* // Session 2
|
||||
/// Session 2
|
||||
//mbms_Session_2 = CALLOC(1,sizeof(MBMS_SessionInfo_r9_t));
|
||||
memset(mbms_Session_2,0,sizeof(MBMS_SessionInfo_r9_t));
|
||||
// TMGI value
|
||||
mbms_Session_2->tmgi_r9.plmn_Id_r9.present= TMGI_r9__plmn_Id_r9_PR_plmn_Index_r9;
|
||||
mbms_Session_2->tmgi_r9.plmn_Id_r9.choice.plmn_Index_r9= 1;
|
||||
// Service ID
|
||||
memset(&mbms_Session_2->tmgi_r9.serviceId_r9,0,sizeof(OCTET_STRING_t));// need to check
|
||||
OCTET_STRING_fromBuf(&mbms_Session_2->tmgi_r9.serviceId_r9,(const char*)&TMGI[3],3);
|
||||
// Session ID is still missing here
|
||||
mbms_Session_2->sessionID_r9->buf= MALLOC(1);
|
||||
mbms_Session_2->sessionID_r9->size= 1;
|
||||
mbms_Session_2->sessionID_r9->buf[0]= 0x11;
|
||||
// Logical Channel ID
|
||||
mbms_Session_2->logicalChannelIdentity_r9= 2;
|
||||
ASN_SEQUENCE_ADD(&pmch_Info_1->mbms_SessionInfoList_r9.list,mbms_Session_2);
|
||||
*/
|
||||
//memset(mbms_Session_2,0,sizeof(MBMS_SessionInfo_r9_t));
|
||||
/// TMGI value
|
||||
//mbms_Session_2->tmgi_r9.plmn_Id_r9.present= TMGI_r9__plmn_Id_r9_PR_plmn_Index_r9;
|
||||
//mbms_Session_2->tmgi_r9.plmn_Id_r9.choice.plmn_Index_r9= 1;
|
||||
/// Service ID
|
||||
//memset(&mbms_Session_2->tmgi_r9.serviceId_r9,0,sizeof(OCTET_STRING_t));// need to check
|
||||
//OCTET_STRING_fromBuf(&mbms_Session_2->tmgi_r9.serviceId_r9,(const char*)&TMGI[3],3);
|
||||
/// Session ID is still missing here
|
||||
//mbms_Session_2->sessionID_r9->buf= MALLOC(1);
|
||||
//mbms_Session_2->sessionID_r9->size= 1;
|
||||
//mbms_Session_2->sessionID_r9->buf[0]= 0x11;
|
||||
/// Logical Channel ID
|
||||
//mbms_Session_2->logicalChannelIdentity_r9= 2;
|
||||
//ASN_SEQUENCE_ADD(&pmch_Info_1->mbms_SessionInfoList_r9.list,mbms_Session_2);
|
||||
|
||||
ASN_SEQUENCE_ADD(&(*mbsfnAreaConfiguration)->pmch_InfoList_r9.list,pmch_Info_1);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
@@ -2278,7 +2316,11 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,long rsrp_s,long rsrq_s,long rsrp_t,long rsrq_t)
|
||||
{
|
||||
|
||||
@@ -2406,7 +2448,11 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t do_DLInformationTransfer(uint8_t Mod_id, uint8_t **buffer, uint8_t transaction_id, uint32_t pdu_length, uint8_t *pdu_buffer)
|
||||
{
|
||||
ssize_t encoded;
|
||||
@@ -2427,30 +2473,34 @@ uint8_t do_DLInformationTransfer(uint8_t Mod_id, uint8_t **buffer, uint8_t trans
|
||||
|
||||
encoded = uper_encode_to_new_buffer (&asn_DEF_DL_DCCH_Message, NULL, (void*) &dl_dcch_msg, (void **) buffer);
|
||||
|
||||
/*
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if !defined(DISABLE_XER_SPRINT)
|
||||
{
|
||||
char message_string[10000];
|
||||
size_t message_string_size;
|
||||
|
||||
// #if defined(ENABLE_ITTI)
|
||||
// # if !defined(DISABLE_XER_SPRINT)
|
||||
// {
|
||||
// char message_string[10000];
|
||||
// size_t message_string_size;
|
||||
|
||||
if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message, (void *)&dl_dcch_msg)) > 0) {
|
||||
MessageDef *msg_p;
|
||||
// if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_DCCH_Message, (void *)&dl_dcch_msg)) > 0) {
|
||||
// MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
|
||||
msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size;
|
||||
memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size);
|
||||
// msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_DCCH, message_string_size + sizeof (IttiMsgText));
|
||||
// msg_p->ittiMsg.rrc_dl_dcch.size = message_string_size;
|
||||
// memcpy(&msg_p->ittiMsg.rrc_dl_dcch.text, message_string, message_string_size);
|
||||
|
||||
itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
*/
|
||||
// itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p);
|
||||
// }
|
||||
// }
|
||||
// # endif
|
||||
// #endif
|
||||
|
||||
|
||||
return encoded;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer)
|
||||
{
|
||||
ssize_t encoded;
|
||||
@@ -2472,10 +2522,14 @@ uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t
|
||||
|
||||
return encoded;
|
||||
}
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
|
||||
{
|
||||
static OAI_UECapability_t UECapability; /* TODO declared static to allow returning this has an address should be allocated in a cleaner way. */
|
||||
static OAI_UECapability_t UECapability; /// TODO declared static to allow returning this has an address should be allocated in a cleaner way.
|
||||
static SupportedBandEUTRA_t Bandlist[4]; // the macro ASN_SEQUENCE_ADD() does not copy the source, but only stores a reference to it
|
||||
static InterFreqBandInfo_t InterFreqBandInfo[4][4]; // the macro ASN_SEQUENCE_ADD() does not copy the source, but only stores a reference to it
|
||||
static BandInfoEUTRA_t BandInfoEUTRA[4]; // the macro ASN_SEQUENCE_ADD() does not copy the source, but only stores a reference to it
|
||||
@@ -2652,7 +2706,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
|
||||
UECapability.sdu_size, enc_rval.encoded + 7);
|
||||
{
|
||||
char *sdu;
|
||||
sdu = malloc (3 * UECapability.sdu_size + 1 /* For '\0' */);
|
||||
//sdu = malloc (3 * UECapability.sdu_size + 1 ); ///* For '\0'
|
||||
|
||||
for (i = 0; i < UECapability.sdu_size; i++) {
|
||||
sprintf (&sdu[3 * i], "%02x.", UECapability.sdu[i]);
|
||||
|
||||
@@ -0,0 +1,274 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file asn1_msg.h
|
||||
* \brief primitives to build the asn1 messages
|
||||
* \author Raymond Knopp and Navid Nikaein
|
||||
* \date 2011
|
||||
* \version 1.0
|
||||
* \company Eurecom
|
||||
* \email: raymond.knopp@eurecom.fr and navid.nikaein@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h> /* for atoi(3) */
|
||||
#include <unistd.h> /* for getopt(3) */
|
||||
#include <string.h> /* for strerror(3) */
|
||||
#include <sysexits.h> /* for EX_* exit codes */
|
||||
#include <errno.h> /* for errno */
|
||||
#else
|
||||
#include <linux/module.h> /* Needed by all modules */
|
||||
#endif
|
||||
|
||||
#include <asn_application.h>
|
||||
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
|
||||
|
||||
#include "RRC/NR/defs_NR.h"
|
||||
|
||||
/*
|
||||
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
|
||||
* output into the chosen string buffer.
|
||||
* RETURN VALUES:
|
||||
* 0: The structure is printed.
|
||||
* -1: Problem printing the structure.
|
||||
* WARNING: No sensible errno value is returned.
|
||||
*/
|
||||
int xer_sprint_NR(char *string, size_t string_size, struct asn_TYPE_descriptor_s *td, void *sptr);
|
||||
|
||||
uint16_t get_adjacent_cell_id_NR(uint8_t Mod_id,uint8_t index);
|
||||
|
||||
uint8_t get_adjacent_cell_mod_id_NR(uint16_t phyCellId);
|
||||
|
||||
/**
|
||||
\brief Generate configuration for SIB1 (eNB).
|
||||
@param carrier pointer to Carrier information
|
||||
@param N_RB_DL Number of downlink PRBs
|
||||
@param phich_Resource PHICH resoure parameter
|
||||
@param phich_duration PHICH duration parameter
|
||||
@param frame radio frame number
|
||||
@return size of encoded bit stream in bytes*/
|
||||
uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
|
||||
uint32_t frame,
|
||||
uint32_t ssb_SubcarrierOffset,
|
||||
uint32_t pdcch_ConfigSIB1,
|
||||
uint32_t subCarrierSpacingCommon,
|
||||
uint32_t dmrs_TypeA_Position);
|
||||
/**
|
||||
\brief Generate configuration for SIB1 (eNB).
|
||||
@param carrier pointer to Carrier information
|
||||
@param Mod_id Instance of eNB
|
||||
@param Component carrier Component carrier to configure
|
||||
@param configuration Pointer Configuration Request structure
|
||||
@return size of encoded bit stream in bytes*/
|
||||
|
||||
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,int Mod_id,int CC_id, gNB_RrcConfigurationReq *configuration
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Generate a default configuration for SIB2/SIB3 in one System Information PDU (eNB).
|
||||
@param Mod_id Index of eNB (used to derive some parameters)
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of SI PDU
|
||||
@param systemInformation Pointer to asn1c C representation of SI PDU
|
||||
@param sib2 Pointer (returned) to sib2 component withing SI PDU
|
||||
@param sib3 Pointer (returned) to sib3 component withing SI PDU
|
||||
@param sib13 Pointer (returned) to sib13 component withing SI PDU
|
||||
@param MBMS_flag Indicates presence of MBMS system information (when 1)
|
||||
@return size of encoded bit stream in bytes*/
|
||||
|
||||
/*uint8_t do_SIB23(uint8_t Mod_id,
|
||||
int CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, RrcConfigurationReq *configuration
|
||||
#endif
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionRequest UL-CCCH-Message (UE) based on random string or S-TMSI. This
|
||||
routine only generates an mo-data establishment cause.
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
|
||||
@param rv 5 byte random string or S-TMSI
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
|
||||
/*uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
|
||||
|
||||
/** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE)
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
|
||||
/*uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t* buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength,
|
||||
const char* dedicatedInfoNAS);
|
||||
|
||||
/** \brief Generate an RRCConnectionReconfigurationComplete UL-DCCH-Message (UE)
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
|
||||
/*uint8_t
|
||||
do_RRCConnectionReconfigurationComplete(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t* buffer,
|
||||
const uint8_t Transaction_id
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionSetup DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB2) and
|
||||
PhysicalConfigDedicated IEs. The latter does not enable periodic CQI reporting (PUCCH format 2/2a/2b) or SRS.
|
||||
@param ctxt_pP Running context
|
||||
@param ue_context_pP UE context
|
||||
@param CC_id Component Carrier ID
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
|
||||
@param transmission_mode Transmission mode for UE (1-9)
|
||||
@param UE_id UE index for this message
|
||||
@param Transaction_id Transaction_ID for this message
|
||||
@param SRB_configList Pointer (returned) to SRB1_config/SRB2_config(later) IEs for this UE
|
||||
@param physicalConfigDedicated Pointer (returned) to PhysicalConfigDedicated IE for this UE
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
/*uint8_t
|
||||
do_RRCConnectionSetup(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
rrc_eNB_ue_context_t* const ue_context_pP,
|
||||
int CC_id,
|
||||
uint8_t* const buffer,
|
||||
const uint8_t transmission_mode,
|
||||
const uint8_t Transaction_id,
|
||||
SRB_ToAddModList_t** SRB_configList,
|
||||
struct PhysicalConfigDedicated** physicalConfigDedicated
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionReconfiguration DL-DCCH-Message (eNB). This routine configures SRBToAddMod (SRB2) and one DRBToAddMod
|
||||
(DRB3). PhysicalConfigDedicated is not updated.
|
||||
@param ctxt_pP Running context
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
|
||||
@param Transaction_id Transaction_ID for this message
|
||||
@param SRB_list Pointer to SRB List to be added/modified (NULL if no additions/modifications)
|
||||
@param DRB_list Pointer to DRB List to be added/modified (NULL if no additions/modifications)
|
||||
@param DRB_list2 Pointer to DRB List to be released (NULL if none to be released)
|
||||
@param sps_Config Pointer to sps_Config to be modified (NULL if no modifications, or default if initial configuration)
|
||||
@param physicalConfigDedicated Pointer to PhysicalConfigDedicated to be modified (NULL if no modifications)
|
||||
@param MeasObj_list Pointer to MeasObj List to be added/modified (NULL if no additions/modifications)
|
||||
@param ReportConfig_list Pointer to ReportConfig List (NULL if no additions/modifications)
|
||||
@param QuantityConfig Pointer to QuantityConfig to be modified (NULL if no modifications)
|
||||
@param MeasId_list Pointer to MeasID List (NULL if no additions/modifications)
|
||||
@param mobilityInfo mobility control information for handover
|
||||
@param speedStatePars speed state parameteres for handover
|
||||
@param mac_MainConfig Pointer to Mac_MainConfig(NULL if no modifications)
|
||||
@param measGapConfig Pointer to MeasGapConfig (NULL if no modifications)
|
||||
@param cba_rnti RNTI for the cba transmission
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
|
||||
/*uint16_t
|
||||
do_RRCConnectionReconfiguration(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t *buffer,
|
||||
uint8_t Transaction_id,
|
||||
SRB_ToAddModList_t *SRB_list,
|
||||
DRB_ToAddModList_t *DRB_list,
|
||||
DRB_ToReleaseList_t *DRB_list2,
|
||||
struct SPS_Config *sps_Config,
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
MeasObjectToAddModList_t *MeasObj_list,
|
||||
ReportConfigToAddModList_t *ReportConfig_list,
|
||||
QuantityConfig_t *quantityConfig,
|
||||
MeasIdToAddModList_t *MeasId_list,
|
||||
MAC_MainConfig_t *mac_MainConfig,
|
||||
MeasGapConfig_t *measGapConfig,
|
||||
MobilityControlInfo_t *mobilityInfo,
|
||||
struct MeasConfig__speedStatePars *speedStatePars,
|
||||
RSRP_Range_t *rsrp,
|
||||
C_RNTI_t *cba_rnti,
|
||||
struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList* dedicatedInfoNASList
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
, SCellToAddMod_r10_t *SCell_config
|
||||
#endif
|
||||
);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionReestablishmentReject DL-CCCH-Message (eNB).
|
||||
@param Mod_id Module ID of eNB
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
/*uint8_t
|
||||
do_RRCConnectionReestablishmentReject(
|
||||
uint8_t Mod_id,
|
||||
uint8_t* const buffer);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionReject DL-CCCH-Message (eNB).
|
||||
@param Mod_id Module ID of eNB
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
/*uint8_t
|
||||
do_RRCConnectionReject(
|
||||
uint8_t Mod_id,
|
||||
uint8_t* const buffer);
|
||||
|
||||
/**
|
||||
\brief Generate an RRCConnectionRequest UL-CCCH-Message (UE) based on random string or S-TMSI. This
|
||||
routine only generates an mo-data establishment cause.
|
||||
@param Mod_id Module ID of eNB
|
||||
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
|
||||
@param transaction_id Transaction index
|
||||
@returns Size of encoded bit stream in bytes*/
|
||||
|
||||
/*uint8_t do_RRCConnectionRelease(uint8_t Mod_id, uint8_t *buffer,int Transaction_id);
|
||||
|
||||
/***
|
||||
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
|
||||
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
|
||||
* @returns Size of encoded bit stream in bytes
|
||||
*/
|
||||
/*uint8_t do_MCCHMessage(uint8_t *buffer);
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
/***
|
||||
* \brief Generate an MCCH-Message (eNB). This routine configures MBSFNAreaConfiguration (PMCH-InfoList and Subframe Allocation for MBMS data)
|
||||
* @param buffer Pointer to PER-encoded ASN.1 description of MCCH-Message PDU
|
||||
* @returns Size of encoded bit stream in bytes
|
||||
*/
|
||||
/*uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
uint8_t sync_area,
|
||||
uint8_t *buffer,
|
||||
MCCH_Message_t *mcch_message,
|
||||
MBSFNAreaConfiguration_r9_t **mbsfnAreaConfiguration);
|
||||
#endif
|
||||
|
||||
uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_id,long rsrp_s,long rsrq_s,long rsrp_t,long rsrq_t);
|
||||
|
||||
uint8_t do_DLInformationTransfer(uint8_t Mod_id, uint8_t **buffer, uint8_t transaction_id, uint32_t pdu_length, uint8_t *pdu_buffer);
|
||||
|
||||
uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer);
|
||||
|
||||
OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer);
|
||||
|
||||
uint8_t
|
||||
do_UECapabilityEnquiry(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t* const buffer,
|
||||
const uint8_t Transaction_id
|
||||
);
|
||||
|
||||
uint8_t do_SecurityModeCommand(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
uint8_t* const buffer,
|
||||
const uint8_t Transaction_id,
|
||||
const uint8_t cipheringAlgorithm,
|
||||
const uint8_t integrityProtAlgorithm);
|
||||
@@ -0,0 +1,282 @@
|
||||
NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- TAG-HANDOVER-COMMAND-START
|
||||
|
||||
HandoverCommand ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
handoverCommand HandoverCommand-IEs,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
HandoverCommand-IEs ::= SEQUENCE {
|
||||
handoverCommandMessage OCTET STRING (CONTAINING RRCReconfiguration),
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
-- TAG-HANDOVER-COMMAND-STOP
|
||||
-- TAG-HANDOVER-PREPARATION-INFORMATION-START
|
||||
|
||||
HandoverPreparationInformation ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
handoverPreparationInformation HandoverPreparationInformation-IEs,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
HandoverPreparationInformation-IEs ::= SEQUENCE {
|
||||
ue-CapabilityRAT-List UE-CapabilityRAT-ContainerList,
|
||||
sourceConfig OCTET STRING (CONTAINING RRCReconfiguration),
|
||||
rrm-Config RRM-Config OPTIONAL,
|
||||
as-Context AS-Context OPTIONAL,
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
AS-Context ::= SEQUENCE {
|
||||
reestablishmentInfo SEQUENCE {
|
||||
sourcePhysCellId PhysCellId,
|
||||
targetCellShortMAC-I ShortMAC-I,
|
||||
additionalReestabInfoList ReestabNCellInfoList OPTIONAL
|
||||
} OPTIONAL,
|
||||
-- FFS Whether to change e.g. move all re-establishment info to Xx
|
||||
configRestrictInfo ConfigRestrictInfoSCG OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
ReestabNCellInfoList ::= SEQUENCE ( SIZE (1..maxCellPrep) ) OF ReestabNCellInfo
|
||||
|
||||
ReestabNCellInfo::= SEQUENCE{
|
||||
cellIdentity CellIdentity,
|
||||
key-gNodeB-Star BIT STRING (SIZE (256)),
|
||||
shortMAC-I ShortMAC-I
|
||||
}
|
||||
|
||||
RRM-Config ::= SEQUENCE {
|
||||
ue-InactiveTime ENUMERATED {
|
||||
s1, s2, s3, s5, s7, s10, s15, s20,
|
||||
s25, s30, s40, s50, min1, min1s20c, min1s40,
|
||||
min2, min2s30, min3, min3s30, min4, min5, min6,
|
||||
min7, min8, min9, min10, min12, min14, min17, min20,
|
||||
min24, min28, min33, min38, min44, min50, hr1,
|
||||
hr1min30, hr2, hr2min30, hr3, hr3min30, hr4, hr5, hr6,
|
||||
hr8, hr10, hr13, hr16, hr20, day1, day1hr12, day2,
|
||||
day2hr12, day3, day4, day5, day7, day10, day14, day19,
|
||||
day24, day30, dayMoreThan30} OPTIONAL ,
|
||||
candidateCellInfoList CandidateCellInfoList OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- TAG-HANDOVER-PREPARATION-INFORMATION-STOP
|
||||
-- TAG-CG-CONFIG-START
|
||||
|
||||
CG-Config ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
cg-Config CG-Config-IEs,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
CG-Config-IEs ::= SEQUENCE {
|
||||
scg-CellGroupConfig OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL,
|
||||
scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL,
|
||||
configRestrictModReq ConfigRestrictModReqSCG OPTIONAL,
|
||||
drx-InfoSCG DRX-Info OPTIONAL,
|
||||
candidateCellInfoListSN OCTET STRING (CONTAINING CandidateCellInfoList) OPTIONAL,
|
||||
measConfigSN MeasConfigSN OPTIONAL,
|
||||
selectedBandCombinationNR BandCombinationIndex OPTIONAL,
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
MeasConfigSN ::= SEQUENCE {
|
||||
measuredFrequenciesFR1 SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF NR-FreqInfo OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
NR-FreqInfo ::= SEQUENCE {
|
||||
measuredFrequency ARFCN-ValueNR OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
ConfigRestrictModReqSCG ::= SEQUENCE {
|
||||
requestedBC-MRDC BandCombinationIndex OPTIONAL,
|
||||
requestedBPC-ListMRDC BPC-IndexList OPTIONAL,
|
||||
requestedP-MaxFR1 P-Max OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
BandCombinationIndex ::= INTEGER (1..maxBandComb)
|
||||
|
||||
-- TAG-CG-CONFIG-STOP
|
||||
-- TAG-CG-CONFIG-INFO-START
|
||||
|
||||
CG-ConfigInfo ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
cg-ConfigInfo CG-ConfigInfo-IEs,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
CG-ConfigInfo-IEs ::= SEQUENCE {
|
||||
ue-CapabilityInfo OCTET STRING (CONTAINING UE-CapabilityRAT-ContainerList) OPTIONAL,-- Cond SN-Addition
|
||||
candidateCellInfoListMN CandidateCellInfoList OPTIONAL,
|
||||
candidateCellInfoListSN OCTET STRING (CONTAINING CandidateCellInfoList) OPTIONAL,
|
||||
measResultCellListSFTD MeasResultCellListSFTD OPTIONAL,
|
||||
scgFailureInfo SEQUENCE {
|
||||
failureType ENUMERATED { t310-Expiry, randomAccessProblem,
|
||||
rlc-MaxNumRetx, scg-ChangeFailure,
|
||||
scg-reconfigFailure,
|
||||
srb3-IntegrityFailure},
|
||||
measResultSCG OCTET STRING (CONTAINING MeasResultSCG-Failure)
|
||||
} OPTIONAL,
|
||||
configRestrictInfo ConfigRestrictInfoSCG OPTIONAL,
|
||||
drx-InfoMCG DRX-Info OPTIONAL,
|
||||
measConfigMN MeasConfigMN OPTIONAL,
|
||||
sourceConfigSCG OCTET STRING (CONTAINING RRCReconfiguration) OPTIONAL,
|
||||
scg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL,
|
||||
mcg-RB-Config OCTET STRING (CONTAINING RadioBearerConfig) OPTIONAL,
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
ConfigRestrictInfoSCG ::= SEQUENCE {
|
||||
allowedBC-ListMRDC BandCombinationIndexList OPTIONAL,
|
||||
allowedBPC-ListMRDC BPC-IndexList OPTIONAL,
|
||||
powerCoordination-FR1 SEQUENCE {
|
||||
p-maxNR P-Max OPTIONAL,
|
||||
p-maxEUTRA P-Max OPTIONAL
|
||||
} OPTIONAL,
|
||||
servCellIndexRangeSCG SEQUENCE {
|
||||
lowBound ServCellIndex,
|
||||
upBound ServCellIndex
|
||||
} OPTIONAL, -- Cond SN-Addition
|
||||
maxMeasFreqsSCG-NR INTEGER(1..maxMeasFreqsMN) OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
BandCombinationIndexList ::= SEQUENCE (SIZE (1..maxBandComb)) OF BandCombinationIndex
|
||||
|
||||
BPC-IndexList ::= SEQUENCE (SIZE (1..maxBasebandProcComb)) OF BPC-Index
|
||||
BPC-Index ::= INTEGER (1..maxBasebandProcComb)
|
||||
|
||||
DRX-Info ::= SEQUENCE {
|
||||
drx-LongCycleStartOffset CHOICE {
|
||||
ms10 INTEGER(0..9),
|
||||
ms20 INTEGER(0..19),
|
||||
ms32 INTEGER(0..31),
|
||||
ms40 INTEGER(0..39),
|
||||
ms60 INTEGER(0..59),
|
||||
ms64 INTEGER(0..63),
|
||||
ms70 INTEGER(0..69),
|
||||
ms80 INTEGER(0..79),
|
||||
ms128 INTEGER(0..127),
|
||||
ms160 INTEGER(0..159),
|
||||
ms256 INTEGER(0..255),
|
||||
ms320 INTEGER(0..319),
|
||||
ms512 INTEGER(0..511),
|
||||
ms640 INTEGER(0..639),
|
||||
ms1024 INTEGER(0..1023),
|
||||
ms1280 INTEGER(0..1279),
|
||||
ms2048 INTEGER(0..2047),
|
||||
ms2560 INTEGER(0..2559),
|
||||
ms5120 INTEGER(0..5119),
|
||||
ms10240 INTEGER(0..10239)
|
||||
},
|
||||
shortDRX SEQUENCE {
|
||||
drx-ShortCycle ENUMERATED {
|
||||
ms2, ms3, ms4, ms5, ms6, ms7, ms8, ms10, ms14, ms16, ms20, ms30, ms32,
|
||||
ms35, ms40, ms64, ms80, ms128, ms160, ms256, ms320, ms512, ms640, spare9,
|
||||
spare8, spare7, spare6, spare5, spare4, spare3, spare2, spare1 },
|
||||
drx-ShortCycleTimer INTEGER (1..16)
|
||||
} OPTIONAL
|
||||
}
|
||||
|
||||
MeasConfigMN ::= SEQUENCE {
|
||||
measuredFrequenciesMN SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF NR-FreqInfo OPTIONAL,
|
||||
measGapConfigFR1 GapConfig OPTIONAL,
|
||||
gapPurpose ENUMERATED {perUE, perFR1} OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
|
||||
-- TAG-CG-CONFIG-INFO-STOP
|
||||
-- TAG-MEASUREMENT-TIMING-CONFIGURATION-START
|
||||
|
||||
MeasurementTimingConfiguration ::= SEQUENCE {
|
||||
criticalExtensions CHOICE {
|
||||
c1 CHOICE{
|
||||
measTimingConf MeasurementTimingConfiguration-IEs,
|
||||
spare3 NULL, spare2 NULL, spare1 NULL
|
||||
},
|
||||
criticalExtensionsFuture SEQUENCE {}
|
||||
}
|
||||
}
|
||||
|
||||
MeasurementTimingConfiguration-IEs ::= SEQUENCE {
|
||||
measTiming MeasTimingList OPTIONAL,
|
||||
nonCriticalExtension SEQUENCE {} OPTIONAL
|
||||
}
|
||||
|
||||
MeasTimingList ::= SEQUENCE (SIZE (1..maxMeasFreqsMN)) OF MeasTiming
|
||||
|
||||
MeasTiming ::= SEQUENCE {
|
||||
carrierFreq ARFCN-ValueNR OPTIONAL,
|
||||
ssb-MeasurementTimingConfiguration ENUMERATED {ffsTypeAndValue} OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- TAG-MEASUREMENT-TIMING-CONFIGURATION-STOP
|
||||
-- TAG-CANDIDATE-CELL-INFO-LIST-START
|
||||
|
||||
CandidateCellInfoList ::= SEQUENCE (SIZE (1.. maxNrofSCells)) OF CandidateCellInfo
|
||||
|
||||
CandidateCellInfo ::= SEQUENCE {
|
||||
cellIdentification SEQUENCE {
|
||||
physCellId PhysCellId,
|
||||
dl-CarrierFreq ARFCN-ValueNR
|
||||
},
|
||||
measResultCell MeasQuantityResults OPTIONAL,
|
||||
candidateRS-IndexListSSB CandidateRS-IndexInfoListSSB OPTIONAL,
|
||||
candidateRS-IndexListCSI-RS CandidateRS-IndexInfoListCSI-RS OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
CandidateRS-IndexInfoListSSB ::= SEQUENCE (SIZE (1..maxNrofIndexesToReport)) OF CandidateRS-IndexInfoSSB
|
||||
|
||||
CandidateRS-IndexInfoSSB ::= SEQUENCE {
|
||||
ssb-Index SSB-Index,
|
||||
measResultSSB MeasQuantityResults OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
CandidateRS-IndexInfoListCSI-RS ::= SEQUENCE (SIZE (1..maxNrofIndexesToReport)) OF CandidateRS-IndexInfoCSI-RS
|
||||
|
||||
CandidateRS-IndexInfoCSI-RS ::= SEQUENCE {
|
||||
csi-RS-Index CSI-RS-Index,
|
||||
measResultCSI-RS MeasQuantityResults OPTIONAL,
|
||||
...
|
||||
}
|
||||
|
||||
-- TAG-CANDIDATE-CELL-INFO-LIST-STOP
|
||||
-- TAG_NR-MULTIPLICITY-AND-CONSTRAINTS-START
|
||||
|
||||
maxMeasFreqsMN INTEGER ::= 32 -- Maximum number of MN-configured measurement frequencies
|
||||
maxCellPrep INTEGER ::= 32 -- Maximum number of cells prepared for handover
|
||||
|
||||
-- TAG_NR-MULTIPLICITY-AND-CONSTRAINTS-STOP
|
||||
-- TAG_NR-INTER-NODE-DEFINITIONS-END-START
|
||||
|
||||
END
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=
|
||||
|
||||
BEGIN
|
||||
|
||||
-- TAG-VAR-MEAS-CONFIG-START
|
||||
|
||||
VarMeasConfig ::= SEQUENCE {
|
||||
-- Measurement identities
|
||||
measIdList MeasIdToAddModList OPTIONAL,
|
||||
-- Measurement objects
|
||||
measObjectList MeasObjectToAddModList OPTIONAL,
|
||||
-- Reporting configurations
|
||||
reportConfigList ReportConfigToAddModList OPTIONAL,
|
||||
-- Other parameters
|
||||
quantityConfig QuantityConfig OPTIONAL,
|
||||
|
||||
s-MeasureConfig CHOICE {
|
||||
ssb-RSRP RSRP-Range,
|
||||
csi-RSRP RSRP-Range
|
||||
} OPTIONAL
|
||||
|
||||
}
|
||||
|
||||
-- TAG-VAR-MEAS-CONFIG-STOP
|
||||
-- TAG-VAR-MEAS-REPORT-START
|
||||
|
||||
VarMeasReportList ::= SEQUENCE (SIZE (1..maxNrofMeasId)) OF VarMeasReport
|
||||
|
||||
VarMeasReport ::= SEQUENCE {
|
||||
-- List of measurement that have been triggered
|
||||
measId MeasId,
|
||||
cellsTriggeredList CellsTriggeredList OPTIONAL,
|
||||
numberOfReportsSent INTEGER
|
||||
}
|
||||
|
||||
CellsTriggeredList ::= SEQUENCE (SIZE (1..maxNrofCellMeas)) OF CHOICE {
|
||||
physCellId PhysCellId,
|
||||
-- Not needed for EN-DC.
|
||||
physCellIdEUTRA ENUMERATED {ffsTypeAndValue}
|
||||
}
|
||||
|
||||
|
||||
-- TAG-VAR-MEAS-REPORT-STOP
|
||||
|
||||
END
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/perl
|
||||
# This script extracts the ASN1 definition from and TS 38.331 and generates 3 output files that can be processed by asn2wrs
|
||||
# First download the specification from 3gpp.org as a word document and open it
|
||||
# Then in "view" menu, select normal or web layout (needed to removed page header and footers)
|
||||
# Finally save the document as a text file
|
||||
# Call the script: "perl extract_asn1_from_spec.pl 38331-xxx.txt"
|
||||
# It should generate: NR-RRC-Definitions.asn, NR-UE-Variables.asn and NR-InterNodeDefinitions
|
||||
use warnings;
|
||||
$input_file = $ARGV[0];
|
||||
$NR_def_output_file = "NR-RRC-Definitions.asn";
|
||||
$NR_var_output_file = "NR-UE-Variables.asn";
|
||||
$NR_internode_output_file = "NR-InterNodeDefinitions.asn";
|
||||
|
||||
|
||||
sub extract_asn1;
|
||||
|
||||
open(INPUT_FILE, "< $input_file") or die "Can not open file $input_file";
|
||||
|
||||
while (<INPUT_FILE>) {
|
||||
|
||||
# Process the NR-RRC-Definitions section
|
||||
if( m/NR-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=/){
|
||||
open(OUTPUT_FILE, "> $NR_def_output_file") or die "Can not open file $def_output_file";
|
||||
syswrite OUTPUT_FILE,"$_ \n";
|
||||
syswrite OUTPUT_FILE,"BEGIN\n\n";
|
||||
|
||||
# Get all the text delimited by -- ASN1START and -- ASN1STOP
|
||||
extract_asn1();
|
||||
|
||||
syswrite OUTPUT_FILE,"END\n\n";
|
||||
close(OUTPUT_FILE);
|
||||
}
|
||||
|
||||
# Process the NR-UE-Variables section
|
||||
if( m/NR-UE-Variables DEFINITIONS AUTOMATIC TAGS ::=/){
|
||||
open(OUTPUT_FILE, "> $NR_var_output_file") or die "Can not open file $def_output_file";
|
||||
syswrite OUTPUT_FILE,"$_ \n";
|
||||
syswrite OUTPUT_FILE,"BEGIN\n\n";
|
||||
|
||||
# Get all the text delimited by -- ASN1START and -- ASN1STOP
|
||||
extract_asn1();
|
||||
|
||||
syswrite OUTPUT_FILE,"END\n\n";
|
||||
close(OUTPUT_FILE);
|
||||
}
|
||||
# Process the NR-InterNodeDefinitions section
|
||||
if( m/NR-InterNodeDefinitions DEFINITIONS AUTOMATIC TAGS ::=/){
|
||||
open(OUTPUT_FILE, "> $NR_internode_output_file") or die "Can not open file $def_output_file";
|
||||
syswrite OUTPUT_FILE,"$_ \n";
|
||||
syswrite OUTPUT_FILE,"BEGIN\n\n";
|
||||
|
||||
# Get all the text delimited by -- ASN1START and -- ASN1STOP
|
||||
extract_asn1();
|
||||
|
||||
syswrite OUTPUT_FILE,"END\n\n";
|
||||
close(OUTPUT_FILE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
close(INPUT_FILE);
|
||||
|
||||
# This subroutine copies the text delimited by -- ASN1START and -- ASN1STOP in INPUT_FILE
|
||||
# and copies it into OUTPUT_FILE.
|
||||
# It stops when it meets the keyword "END"
|
||||
sub extract_asn1 {
|
||||
my $line = <INPUT_FILE>;
|
||||
my $is_asn1 = 0;
|
||||
|
||||
while(($line ne "END\n") && ($line ne "END\r\n")){
|
||||
if ($line =~ m/-- ASN1STOP/) {
|
||||
$is_asn1 = 0;
|
||||
}
|
||||
if ($is_asn1 == 1){
|
||||
syswrite OUTPUT_FILE,"$line";
|
||||
}
|
||||
if ($line =~ m/-- ASN1START/) {
|
||||
$is_asn1 = 1;
|
||||
}
|
||||
$line = <INPUT_FILE>;
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ typedef unsigned int uid_NR_t;
|
||||
typedef struct uid_linear_allocator_NR_s {
|
||||
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE_NR];
|
||||
} uid_allocator_NR_t;
|
||||
|
||||
|
||||
|
||||
#define PROTOCOL_RRC_CTXT_UE_FMT PROTOCOL_CTXT_FMT
|
||||
#define PROTOCOL_RRC_CTXT_UE_ARGS(CTXT_Pp) PROTOCOL_CTXT_ARGS(CTXT_Pp)
|
||||
@@ -391,9 +391,10 @@ typedef struct {
|
||||
// buffer that contains the encoded messages
|
||||
uint8_t *MIB_NR;
|
||||
uint8_t sizeof_MIB_NR;
|
||||
|
||||
uint8_t *SIB1_NR;
|
||||
uint8_t sizeof_SIB1_NR;
|
||||
/*
|
||||
uint8_t *SIB1_NB_IoT;
|
||||
uint8_t sizeof_SIB1_NB_IoT;
|
||||
uint8_t *SIB23_NB_IoT;
|
||||
uint8_t sizeof_SIB23_NB_IoT;
|
||||
*/
|
||||
@@ -425,7 +426,7 @@ typedef struct {
|
||||
uint32_t dl_CarrierFreq; //detected by the UE
|
||||
uint32_t ul_CarrierFreq; //detected by the UE
|
||||
uint16_t physCellId; //not stored in the MIB-NB but is getting through NPSS/NSSS
|
||||
|
||||
|
||||
//are the only static one (memory has been already allocated)
|
||||
BCCH_BCH_Message_t mib_NR;
|
||||
|
||||
|
||||
+38
-43
@@ -89,7 +89,7 @@
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
#endif
|
||||
|
||||
|
||||
#if ENABLE_RAL
|
||||
# include "rrc_eNB_ral.h"
|
||||
#endif
|
||||
@@ -138,59 +138,54 @@ init_SI(
|
||||
const int CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
,
|
||||
RrcConfigurationReq * configuration
|
||||
gNB_RrcConfigurationReq * configuration
|
||||
#endif
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
#if defined(Rel10) || defined(Rel14)
|
||||
int i;
|
||||
#endif
|
||||
|
||||
#ifdef Rel14
|
||||
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext=(SystemInformationBlockType1_v1310_IEs_t *)NULL;
|
||||
#endif
|
||||
|
||||
LOG_D(RRC,"%s()\n\n\n\n",__FUNCTION__);
|
||||
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].MIB = (uint8_t*) malloc16(4);
|
||||
// copy basic parameters
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id];
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Ncp = configuration->prefix_type[CC_id];
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
|
||||
#ifdef Rel14
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].pbch_repetition = configuration->pbch_repetition[CC_id];
|
||||
#endif
|
||||
LOG_I(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
|
||||
(int)configuration->N_RB_DL[CC_id],
|
||||
(int)configuration->phich_resource[CC_id],
|
||||
(int)configuration->phich_duration[CC_id]);
|
||||
do_MIB(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
|
||||
#ifdef ENABLE_ITTI
|
||||
configuration->N_RB_DL[CC_id],
|
||||
configuration->phich_resource[CC_id],
|
||||
configuration->phich_duration[CC_id]
|
||||
#else
|
||||
50,0,0
|
||||
#endif
|
||||
,0);
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId = configuration->Nid_cell[CC_id];
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB = configuration->nb_antenna_ports[CC_id];
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].Ncp = configuration->prefix_type[CC_id];
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].dl_CarrierFreq = configuration->downlink_frequency[CC_id];
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
|
||||
|
||||
///MIB
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB_NR = 0;
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].MIB_NR = (uint8_t*) malloc16(4);
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_MIB_NR = do_MIB_NR(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],0,
|
||||
#ifdef ENABLE_ITTI
|
||||
configuration->ssb_SubcarrierOffset[CC_id],
|
||||
configuration->pdcch_ConfigSIB1[CC_id],
|
||||
configuration->subCarrierSpacingCommon[CC_id],
|
||||
configuration->dmrs_TypeA_Position[CC_id]
|
||||
#else
|
||||
0,0,15,2
|
||||
#endif
|
||||
);
|
||||
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 = 0;
|
||||
///SIB1
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_NR = 0;
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_NR = (uint8_t*) malloc16(32);
|
||||
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_NR! = NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for NR SIB1 allocated\n",PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
|
||||
|
||||
RC.nr_rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_NR = do_SIB1_NR(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
|
||||
ctxt_pP->module_id,
|
||||
CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, configuration
|
||||
#endif
|
||||
);
|
||||
|
||||
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.nr_rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1_NR == 255");
|
||||
|
||||
|
||||
/*
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = 0;
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1 = (uint8_t*) malloc16(32);
|
||||
|
||||
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
|
||||
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],ctxt_pP->module_id,CC_id
|
||||
#if defined(ENABLE_ITTI)
|
||||
, configuration
|
||||
#endif
|
||||
);
|
||||
|
||||
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
|
||||
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23 = (uint8_t*) malloc16(64);
|
||||
AssertFatal(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB23!=NULL,"cannot allocate memory for SIB");
|
||||
@@ -301,7 +296,7 @@ init_SI(
|
||||
#endif
|
||||
|
||||
LOG_D(RRC, "About to call rrc_mac_config_req_eNB\n");
|
||||
|
||||
*/
|
||||
rrc_mac_config_req_eNB(ctxt_pP->module_id, CC_id,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].physCellId,
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].p_eNB,
|
||||
|
||||
Reference in New Issue
Block a user