Commit e6c9d9c6 authored by Nick Ho's avatar Nick Ho

Fix error occurs at PHY and MAC (done), RRC & ASN.1 still ongoing

parent eca9fdc5
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
/*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/ /*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/
void phy_config_mib_eNB_NB_IoT(int Mod_id, void phy_config_mib_eNB_NB_IoT(int Mod_id,
int CC_id,
int eutra_band, int eutra_band,
int Nid_cell, int Nid_cell,
int Ncp, int Ncp,
...@@ -57,14 +58,16 @@ void phy_config_mib_eNB_NB_IoT(int Mod_id, ...@@ -57,14 +58,16 @@ void phy_config_mib_eNB_NB_IoT(int Mod_id,
// ); // );
void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id, void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
int CC_id,
nfapi_nb_iot_config_t *config, nfapi_nb_iot_config_t *config,
nfapi_rf_config_t *rf_config, nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config, nfapi_uplink_reference_signal_config_t *ul_nrs_config,
extra_phyConfig_t* extra_phy_parms); extra_phyConfig_t *extra_phy_parms);
void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id, void phy_config_dedicated_eNB_NB_IoT(uint8_t Mod_id,
rnti_t rnti, int CC_id,
extra_phyConfig_t* extra_phy_parms); uint16_t rnti,
extra_phyConfig_t *extra_parms);
// void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms); // void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms);
void phy_init_nb_iot_eNB(PHY_VARS_eNB_NB_IoT *phyvar); void phy_init_nb_iot_eNB(PHY_VARS_eNB_NB_IoT *phyvar);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
//#include "defs.h" //#include "defs.h"
#include "SCHED_NBIOT/defs_NB_IoT.h" #include "SCHED_NBIOT/defs_NB_IoT.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/extern_NB_IoT.h" // PHY/defs_NB_IoT.h is called here , log.h & LTE_TRANSPORT/defs_NB_IoT.h are included through PHY/defs_NB_IoT.h #include "PHY/extern_NB_IoT.h" // PHY/defs_NB_IoT.h is called here , log.h & LTE_TRANSPORT/defs_NB_IoT.h are included through PHY/defs_NB_IoT.h
#include "openair2/LAYER2/MAC/proto_NB_IoT.h" // for functions: from_earfcn_NB_IoT, get_uldl_offset_NB_IoT #include "openair2/LAYER2/MAC/proto_NB_IoT.h" // for functions: from_earfcn_NB_IoT, get_uldl_offset_NB_IoT
//#include "SIMULATION/TOOLS/defs.h" //#include "SIMULATION/TOOLS/defs.h"
......
...@@ -80,8 +80,9 @@ void lte_sync_timefreq_NB_IoT(PHY_VARS_UE_NB_IoT *ue,int band,unsigned int DL_fr ...@@ -80,8 +80,9 @@ void lte_sync_timefreq_NB_IoT(PHY_VARS_UE_NB_IoT *ue,int band,unsigned int DL_fr
while (1) { while (1) {
//compute frequency-domain representation of 6144-sample chunk //compute frequency-domain representation of 6144-sample chunk
// Nick : Not sure about scale
dft6144((int16_t *)rxp, dft6144((int16_t *)rxp,
sp); sp,1);
/* /*
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "PHY/NBIoT_TRANSPORT/extern_NB_IoT.h" #include "PHY/NBIoT_TRANSPORT/extern_NB_IoT.h"
//#define DEBUG_CH //#define DEBUG_CH
#include "PHY/LTE_TRANSPORT/sc_rotation_NB_IoT.h" #include "PHY/NBIoT_TRANSPORT/sc_rotation_NB_IoT.h"
#include "T.h" #include "T.h"
......
...@@ -38,7 +38,7 @@ extern int G_tab[18]; ...@@ -38,7 +38,7 @@ extern int G_tab[18];
extern short conjugate[8],conjugate2[8]; extern short conjugate[8],conjugate2[8];
extern short *ul_ref_sigs_rx_NB_IoT[30][4]; // NB-IoT: format 1 pilots extern short *ul_ref_sigs_rx_NB_IoT[30][4]; // NB-IoT: format 1 pilots
extern short *ul_ref_sigs_f2_rx_NB_IoT[16]; // NB-IoT: format 2 pilots extern short *ul_ref_sigs_f2_rx_NB_IoT[16]; // NB-IoT: format 2 pilots
extern unsigned short dftsizes[33]; //extern unsigned short dftsizes[33];
extern int16_t e_phi_re_m6[120]; extern int16_t e_phi_re_m6[120];
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#include "UTIL/OCG/OCG_extern.h" #include "UTIL/OCG/OCG_extern.h"
#endif #endif
*/ */
#include "UTIL/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
//#define DEBUG_ULSCH_DECODING //#define DEBUG_ULSCH_DECODING
...@@ -921,7 +921,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr ...@@ -921,7 +921,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr
// NB_IoT: functions in ulsch_decoding_data_NB_IoT must be defined // NB_IoT: functions in ulsch_decoding_data_NB_IoT must be defined
int ulsch_decoding_data_NB_IoT(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) { int ulsch_decoding_data_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,int UE_id,int harq_pid,int llr8_flag) {
unsigned int r,r_offset=0,Kr,Kr_bytes,iind; unsigned int r,r_offset=0,Kr,Kr_bytes,iind;
uint8_t crc_type; uint8_t crc_type;
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> //#include <linux/init.h>
#include <linux/module.h> //#include <linux/module.h>
#include <linux/version.h> #include <linux/version.h>
#include <linux/types.h> #include <linux/types.h>
......
...@@ -11,9 +11,9 @@ ...@@ -11,9 +11,9 @@
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h" #include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h" #include "LAYER2/MAC/extern_NB_IoT.h"
#include "BCCH-DL-SCH-Message-NB.h" #include "LTE_BCCH-DL-SCH-Message-NB.h"
#include "RRCConnectionSetup-NB.h" #include "LTE_RRCConnectionSetup-NB.h"
#include "BCCH-BCH-Message-NB.h" #include "LTE_BCCH-BCH-Message-NB.h"
//#include "SIB-Type-NB-r13.h" //#include "SIB-Type-NB-r13.h"
typedef struct eutra_bandentry_NB_s { typedef struct eutra_bandentry_NB_s {
...@@ -96,7 +96,7 @@ void config_mib_fapi_NB_IoT(int physCellId, ...@@ -96,7 +96,7 @@ void config_mib_fapi_NB_IoT(int physCellId,
int dl_CarrierFreq, int dl_CarrierFreq,
int ul_CarrierFreq, int ul_CarrierFreq,
long *eutraControlRegionSize, long *eutraControlRegionSize,
BCCH_BCH_Message_NB_t *mib_NB_IoT LTE_BCCH_BCH_Message_NB_t *mib_NB_IoT
) )
{ {
...@@ -114,7 +114,7 @@ void config_mib_fapi_NB_IoT(int physCellId, ...@@ -114,7 +114,7 @@ void config_mib_fapi_NB_IoT(int physCellId,
switch (mib_NB_IoT->message.operationModeInfo_r13.present) switch (mib_NB_IoT->message.operationModeInfo_r13.present)
{ {
//FAPI specs pag 135 //FAPI specs pag 135
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13: case LTE_MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13:
cfg->nb_iot_config.operating_mode.value = 0; cfg->nb_iot_config.operating_mode.value = 0;
cfg->nb_iot_config.prb_index.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0 cfg->nb_iot_config.prb_index.value = mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13; //see TS 36.213 ch 16.0
...@@ -127,7 +127,7 @@ void config_mib_fapi_NB_IoT(int physCellId, ...@@ -127,7 +127,7 @@ void config_mib_fapi_NB_IoT(int physCellId,
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13: case LTE_MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_DifferentPCI_r13:
cfg->nb_iot_config.operating_mode.value = 1; cfg->nb_iot_config.operating_mode.value = 1;
//fapi think to define also eutra_CRS_sequenceInfo also for in band with different PCI but the problem is that we don-t have i //fapi think to define also eutra_CRS_sequenceInfo also for in band with different PCI but the problem is that we don-t have i
...@@ -140,7 +140,7 @@ void config_mib_fapi_NB_IoT(int physCellId, ...@@ -140,7 +140,7 @@ void config_mib_fapi_NB_IoT(int physCellId,
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13: case LTE_MasterInformationBlock_NB__operationModeInfo_r13_PR_guardband_r13:
cfg->nb_iot_config.operating_mode.value = 2; cfg->nb_iot_config.operating_mode.value = 2;
cfg->nb_iot_config.control_region_size.value = -1; //should not being defined so we put a negative value cfg->nb_iot_config.control_region_size.value = -1; //should not being defined so we put a negative value
...@@ -148,7 +148,7 @@ void config_mib_fapi_NB_IoT(int physCellId, ...@@ -148,7 +148,7 @@ void config_mib_fapi_NB_IoT(int physCellId,
break; break;
case MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13: case LTE_MasterInformationBlock_NB__operationModeInfo_r13_PR_standalone_r13:
cfg->nb_iot_config.operating_mode.value = 3; cfg->nb_iot_config.operating_mode.value = 3;
cfg->nb_iot_config.prb_index.value = -1; // is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures) cfg->nb_iot_config.prb_index.value = -1; // is not defined for this case (put a negative random value--> will be not considered for encoding, scrambling procedures)
...@@ -165,7 +165,7 @@ void config_mib_fapi_NB_IoT(int physCellId, ...@@ -165,7 +165,7 @@ void config_mib_fapi_NB_IoT(int physCellId,
void config_sib2_fapi_NB_IoT( void config_sib2_fapi_NB_IoT(
int physCellId, int physCellId,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon LTE_RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
) )
{ {
...@@ -180,7 +180,7 @@ void config_sib2_fapi_NB_IoT( ...@@ -180,7 +180,7 @@ void config_sib2_fapi_NB_IoT(
/*NPRACH section*/ /*NPRACH section*/
NPRACH_Parameters_NB_r13_t* nprach_parameter; LTE_NPRACH_Parameters_NB_r13_t* nprach_parameter;
cfg->nb_iot_config.nprach_config_0_enabled.value = 0; cfg->nb_iot_config.nprach_config_0_enabled.value = 0;
cfg->nb_iot_config.nprach_config_1_enabled.value = 0; cfg->nb_iot_config.nprach_config_1_enabled.value = 0;
...@@ -292,10 +292,10 @@ void rrc_mac_config_req_NB_IoT( ...@@ -292,10 +292,10 @@ void rrc_mac_config_req_NB_IoT(
int CC_idP, int CC_idP,
int rntiP, int rntiP,
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
SystemInformationBlockType1_NB_t *sib1_NB_IoT, LTE_LTE_SystemInformationBlockType1_NB_t *sib1_NB_IoT,
RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon, LTE_RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon,
PhysicalConfigDedicated_NB_r13_t *physicalConfigDedicated, LTE_PhysicalConfigDedicated_NB_r13_t *physicalConfigDedicated,
LogicalChannelConfig_NB_r13_t *logicalChannelConfig, LTE_LogicalChannelConfig_NB_r13_t *logicalChannelConfig,
uint8_t ded_flag, uint8_t ded_flag,
uint8_t ue_list_ded_num) uint8_t ue_list_ded_num)
{ {
......
...@@ -51,14 +51,14 @@ typedef enum sib_MappingInfo{ ...@@ -51,14 +51,14 @@ typedef enum sib_MappingInfo{
} sib_MappingInfo_NB_IoT; } sib_MappingInfo_NB_IoT;
typedef enum si_TB{ typedef enum si_TB{
si_TB_56=2, si_TB_56=0,
si_TB_120=2, si_TB_120,
si_TB_208=8, si_TB_208,
si_TB_256=8, si_TB_256,
si_TB_328=8, si_TB_328,
si_TB_440=8, si_TB_440,
si_TB_552=8, si_TB_552,
si_TB_680=8 si_TB_680
} si_TB_NB_IoT; } si_TB_NB_IoT;
///RACH_ConfigCommon configuration ///RACH_ConfigCommon configuration
......
...@@ -103,7 +103,7 @@ typedef enum{ ...@@ -103,7 +103,7 @@ typedef enum{
#define MAX_MAX_MOBILES_PER_ENB_NB_IoT 20 #define MAX_MAX_MOBILES_PER_ENB_NB_IoT 20
#define SCH_PAYLOAD_SIZE_MAX_NB_IoT 320 #define SCH_PAYLOAD_SIZE_MAX_NB_IoT 320
#define MAX_NUMBER_OF_SIBs_NB_IoT 16 #define MAX_NUMBER_OF_SIBs_NB_IoT 16
#define MAX_NUMBER_OF_UE_MAX_NB_IoT 20
/*!\brief Values of BCCH0 logical channel for MIB*/ /*!\brief Values of BCCH0 logical channel for MIB*/
#define BCCH0_NB_IoT 11 // MIB-NB_IoT #define BCCH0_NB_IoT 11 // MIB-NB_IoT
/*!\brief Values of BCCH1 logical channel for SIBs */ /*!\brief Values of BCCH1 logical channel for SIBs */
...@@ -130,33 +130,6 @@ typedef enum{ ...@@ -130,33 +130,6 @@ typedef enum{
/*Index of PADDING logical channel*/ /*Index of PADDING logical channel*/
#define PADDING 31 #define PADDING 31
/// NPRACH-ParametersList-NB_IoT-r13 from 36.331 RRC spec defined in PHY
/*typedef struct NPRACH_Parameters_NB_IoT{
/// the period time for nprach
int nprach_Periodicity;
/// for the start time for the NPRACH resource from 40ms-2560ms
int nprach_StartTime;
/// for the subcarrier of set to the NPRACH preamble from n0 - n34
int nprach_SubcarrierOffset;
///number of subcarriers in a NPRACH resource allowed values (n12,n24,n36,n48)
int nprach_NumSubcarriers;
/// where is the region that in NPRACH resource to indicate if this UE support MSG3 for multi-tone or not. from 0 - 1
int nprach_SubcarrierMSG3_RangeStart;
/// The max preamble transmission attempt for the CE level from 1 - 128
int maxNumPreambleAttemptCE;
/// Number of NPRACH repetitions per attempt for each NPRACH resource
int numRepetitionsPerPreambleAttempt;
/// The number of the repetition for DCI use in RAR/MSG3/MSG4 from 1 - 2048 (Rmax)
int npdcch_NumRepetitions_RA;
/// Starting subframe for NPDCCH Common searching space for (RAR/MSG3/MSG4)
int npdcch_StartSF_CSS_RA;
/// Fractional period offset of starting subframe for NPDCCH common search space
int npdcch_Offset_RA;
} nprach_parameters_NB_IoT_t;*/
/*! \brief Downlink SCH PDU Structure */ /*! \brief Downlink SCH PDU Structure */
typedef struct { typedef struct {
uint8_t payload[SCH_PAYLOAD_SIZE_MAX_NB_IoT]; uint8_t payload[SCH_PAYLOAD_SIZE_MAX_NB_IoT];
...@@ -213,10 +186,9 @@ typedef struct { ...@@ -213,10 +186,9 @@ typedef struct {
int RRC_connected; int RRC_connected;
uint8_t flag_schedule_success; uint8_t flag_schedule_success;
// UE active flag // UE active flag
int active; boolean_t active;
//boolean_t active;
uint8_t allocated_data_size_ul; uint8_t allocated_data_size_ul;
} UE_TEMPLATE_NB_IoT; } UE_TEMPLATE_NB_IoT;
// link list of uplink resource node // link list of uplink resource node
...@@ -330,24 +302,24 @@ typedef struct{ ...@@ -330,24 +302,24 @@ typedef struct{
typedef struct { typedef struct {
/// DCI template and MAC connection parameters for UEs /// DCI template and MAC connection parameters for UEs
UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_MAX_MOBILES_PER_ENB_NB_IoT]; UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_NUMBER_OF_UE_MAX_NB_IoT];
UE_SCHED_CTRL_NB_IoT_t UE_sched_ctrl_NB_IoT[MAX_NUMBER_OF_UE_MAX_NB_IoT];
UE_SCHED_CTRL_NB_IoT_t UE_sched_ctrl_NB_IoT[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
/// NPDCCH Period and searching space info /// NPDCCH Period and searching space info
NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated; NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated;
//int next[MAX_MAX_MOBILES_PER_ENB_NB_IoT]; //int next[MAX_NUMBER_OF_UE_MAX_NB_IoT];
// -1:No UE in list // -1:No UE in list
int head; int head;
// -1:No UE in list // -1:No UE in list
int tail; int tail;
int num_UEs; int num_UEs;
//boolean_t active[MAX_MAX_MOBILES_PER_ENB_NB_IoT]; //boolean_t active[MAX_NUMBER_OF_UE_MAX_NB_IoT];
} UE_list_NB_IoT_t; } UE_list_NB_IoT_t;
// scheduling flag calculated by computing flag function
typedef struct{ typedef struct{
// flag to indicate scheduing MIB-NB_IoT // flag to indicate scheduing MIB-NB_IoT
uint8_t flag_MIB; uint8_t flag_MIB;
// flag to indicate scheduling SIB1-NB_IoT // flag to indicate scheduling SIB1-NB_IoT
...@@ -359,7 +331,7 @@ typedef struct{ ...@@ -359,7 +331,7 @@ typedef struct{
// flag to indicate scheduling type1 NPDCCH CSS with different CE level // flag to indicate scheduling type1 NPDCCH CSS with different CE level
uint8_t flag_type1_css[3]; uint8_t flag_type1_css[3];
// flag to indicate scheduling NPDCCH USS with UE list // flag to indicate scheduling NPDCCH USS with UE list
uint8_t flag_uss[MAX_MAX_MOBILES_PER_ENB_NB_IoT]; uint8_t flag_uss[MAX_NUMBER_OF_UE_MAX_NB_IoT];
// flag to indicate scheduling sib1/MIB // flag to indicate scheduling sib1/MIB
uint8_t flag_fix_scheduling; uint8_t flag_fix_scheduling;
// number of the type2 css to schedule in this period // number of the type2 css to schedule in this period
...@@ -368,10 +340,8 @@ typedef struct{ ...@@ -368,10 +340,8 @@ typedef struct{
uint8_t num_type1_css_run; uint8_t num_type1_css_run;
// number of the uss to schedule in this period // number of the uss to schedule in this period
uint8_t num_uss_run; uint8_t num_uss_run;
}scheduling_flag_t; }scheduling_flag_t;
/*!\brief MAC subheader short with 7bit Length field */ /*!\brief MAC subheader short with 7bit Length field */
typedef struct { typedef struct {
uint8_t LCID:5; // octet 1 LSB uint8_t LCID:5; // octet 1 LSB
...@@ -381,6 +351,7 @@ typedef struct { ...@@ -381,6 +351,7 @@ typedef struct {
uint8_t L:7; // octet 2 LSB uint8_t L:7; // octet 2 LSB
uint8_t F:1; // octet 2 MSB uint8_t F:1; // octet 2 MSB
} __attribute__((__packed__))SCH_SUBHEADER_SHORT_NB_IoT; } __attribute__((__packed__))SCH_SUBHEADER_SHORT_NB_IoT;
typedef struct { typedef struct {
uint8_t LCID:5; // octet 1 LSB uint8_t LCID:5; // octet 1 LSB
uint8_t E:1; uint8_t E:1;
...@@ -390,6 +361,7 @@ typedef struct { ...@@ -390,6 +361,7 @@ typedef struct {
uint8_t F:1; // octet 2 MSB uint8_t F:1; // octet 2 MSB
uint8_t L_LSB:8; uint8_t L_LSB:8;
} __attribute__((__packed__))SCH_SUBHEADER_LONG_NB_IoT; } __attribute__((__packed__))SCH_SUBHEADER_LONG_NB_IoT;
typedef struct { typedef struct {
uint8_t LCID:5; // octet 1 LSB uint8_t LCID:5; // octet 1 LSB
uint8_t E:1; uint8_t E:1;
...@@ -398,12 +370,12 @@ typedef struct { ...@@ -398,12 +370,12 @@ typedef struct {
uint8_t L_MSB:8; // octet 2 MSB uint8_t L_MSB:8; // octet 2 MSB
uint8_t L_LSB:8; uint8_t L_LSB:8;
} __attribute__((__packed__))SCH_SUBHEADER_LONG_EXTEND_NB_IoT; } __attribute__((__packed__))SCH_SUBHEADER_LONG_EXTEND_NB_IoT;
/*!\brief MAC subheader short without length field */ /*!\brief MAC subheader short without length field */
typedef struct { typedef struct {
uint8_t LCID:5; uint8_t LCID:5;
uint8_t F2:1;
uint8_t E:1; uint8_t E:1;
uint8_t R:1; uint8_t R:2;
} __attribute__((__packed__))SCH_SUBHEADER_FIXED_NB_IoT; } __attribute__((__packed__))SCH_SUBHEADER_FIXED_NB_IoT;
...@@ -425,7 +397,7 @@ typedef struct { ...@@ -425,7 +397,7 @@ typedef struct {
} __attribute__((__packed__))RA_HEADER_RAPID_NB_IoT; } __attribute__((__packed__))RA_HEADER_RAPID_NB_IoT;
typedef struct Available_available_resource_DL{ typedef struct Available_resource_tones_UL_s{
///Available Resoruce for sixtone ///Available Resoruce for sixtone
available_resource_UL_t *sixtone_Head;//, *sixtone_npusch_frame; available_resource_UL_t *sixtone_Head;//, *sixtone_npusch_frame;
...@@ -475,6 +447,14 @@ typedef struct schedule_result{ ...@@ -475,6 +447,14 @@ typedef struct schedule_result{
uint8_t *rar_buffer; uint8_t *rar_buffer;
int16_t dl_sdly;
int16_t ul_sdly;
int16_t num_sf;
int16_t harq_round;
// determine this uplink data is msg3 or not (different TBS table here)
uint8_t msg3_flag;
}schedule_result_t; }schedule_result_t;
/*Flag structure used for trigger each scheduler*/ /*Flag structure used for trigger each scheduler*/
...@@ -518,7 +498,9 @@ typedef struct RA_TEMPLATE_NB_IoT_s{ ...@@ -518,7 +498,9 @@ typedef struct RA_TEMPLATE_NB_IoT_s{
boolean_t wait_msg4_ack; boolean_t wait_msg4_ack;
boolean_t wait_msg3_ack; boolean_t wait_msg3_ack;
uint8_t rar_buffer[7]; uint8_t rar_buffer[7];
uint8_t *ccch_buffer;
uint8_t msg4_buffer[16];
uint8_t *msg4_rrc_buffer;
} RA_TEMPLATE_NB_IoT; } RA_TEMPLATE_NB_IoT;
typedef struct RA_template_list_s{ typedef struct RA_template_list_s{
...@@ -527,28 +509,39 @@ typedef struct RA_template_list_s{ ...@@ -527,28 +509,39 @@ typedef struct RA_template_list_s{
}RA_template_list_t; }RA_template_list_t;
/*36331 NPDCCH-ConfigDedicated-NB_IoT*/
typedef struct{
//npdcch-NumRepetitions-r13
uint32_t R_max;
//npdcch-StartSF-CSS-r13
double G;
//npdcch-Offset-USS-r13
double a_offset;
//NPDCCH period
uint32_t T;
//Starting subfrane of Search Space which is mod T
uint32_t ss_start_css;
}NPDCCH_config_common_NB_IoT_t;
/*! \brief top level eNB MAC structure */ /*! \brief top level eNB MAC structure */
typedef struct eNB_MAC_INST_NB_IoT_s { typedef struct mac_NB_IoT_s{
/// Ethernet parameters for northbound midhaul interface
eth_params_t eth_params_n;
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params_s;
uint8_t Mod_id; uint8_t Mod_id;
// System // System
uint32_t hyper_system_frame; uint32_t hyper_system_frame;
uint32_t system_frame; uint32_t system_frame;
uint32_t sub_frame; uint32_t sub_frame;
uint32_t current_subframe; uint32_t current_subframe;
/// Pointer to IF module instance for PHY
IF_Module_t *if_inst;
// RA // RA
RA_template_list_t RA_msg2_list; RA_template_list_t RA_msg2_list;
RA_template_list_t RA_msg3_list; RA_template_list_t RA_msg3_list;
RA_template_list_t RA_msg4_list; RA_template_list_t RA_msg4_list;
RA_TEMPLATE_NB_IoT RA_template[MAX_MAX_MOBILES_PER_ENB_NB_IoT]; RA_TEMPLATE_NB_IoT RA_template[MAX_NUMBER_OF_UE_MAX_NB_IoT];
//int32_t last_tx_subframe; //int32_t last_tx_subframe;
...@@ -569,15 +562,18 @@ typedef struct eNB_MAC_INST_NB_IoT_s { ...@@ -569,15 +562,18 @@ typedef struct eNB_MAC_INST_NB_IoT_s {
scheduling_flag_t scheduling_flag; scheduling_flag_t scheduling_flag;
uint32_t schedule_subframe_DL; uint32_t schedule_subframe_DL;
uint32_t schedule_subframe_UL; //uint32_t schedule_subframe_UL;
NPDCCH_config_common_NB_IoT_t npdcch_config_common[3];
rrc_config_NB_IoT_t rrc_config; rrc_config_NB_IoT_t rrc_config;
nfapi_config_request_t config; nfapi_config_request_t config;
IF_Module_NB_IoT_t *if_inst_NB_IoT; IF_Module_NB_IoT_t *if_inst_NB_IoT;
Sched_Rsp_NB_IoT_t Sched_INFO; Sched_Rsp_NB_IoT_t Sched_INFO;
} eNB_MAC_INST_NB_IoT; } eNB_MAC_INST_NB_IoT;
// actually not here, but for now put it here // actually not here, but for now put it here
...@@ -593,8 +589,6 @@ typedef struct { ...@@ -593,8 +589,6 @@ typedef struct {
nprach_parameters_NB_IoT_t nprach_list[3]; nprach_parameters_NB_IoT_t nprach_list[3];
//DLSF Table //DLSF Table
DLSF_INFO_t DLSF_information; DLSF_INFO_t DLSF_information;
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include "defs_NB_IoT.h" #include "defs_NB_IoT.h"
#include "proto_NB_IoT.h" #include "proto_NB_IoT.h"
#include "extern_NB_IoT.h" #include "extern_NB_IoT.h"
#include "RRC/NBIOT/proto.h" #include "RRC/NBIOT/proto_NB_IoT.h"
#include "RRC/NBIOT/extern.h" #include "RRC/NBIOT/extern_NB_IoT.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
unsigned char str20[] = "DCI_uss"; unsigned char str20[] = "DCI_uss";
......
...@@ -51,26 +51,26 @@ ...@@ -51,26 +51,26 @@
//#include for NB-IoT------------------- //#include for NB-IoT-------------------
#include "RRCConnectionRequest-NB.h" #include "LTE_RRCConnectionRequest-NB.h"
#include "BCCH-DL-SCH-Message-NB.h" #include "LTE_BCCH-DL-SCH-Message-NB.h"
#include "UL-CCCH-Message-NB.h" #include "LTE_UL-CCCH-Message-NB.h"
#include "UL-DCCH-Message-NB.h" #include "LTE_UL-DCCH-Message-NB.h"
#include "DL-CCCH-Message-NB.h" #include "LTE_DL-CCCH-Message-NB.h"
#include "DL-DCCH-Message-NB.h" #include "LTE_DL-DCCH-Message-NB.h"
#include "EstablishmentCause-NB-r13.h" #include "LTE_EstablishmentCause-NB-r13.h"
#include "RRCConnectionSetup-NB.h" #include "LTE_RRCConnectionSetup-NB.h"
#include "SRB-ToAddModList-NB-r13.h" #include "LTE_SRB-ToAddModList-NB-r13.h"
#include "DRB-ToAddModList-NB-r13.h" #include "LTE_DRB-ToAddModList-NB-r13.h"
#include "RRC/NBIOT/defs_NB_IoT.h" #include "RRC/NBIOT/defs_NB_IoT.h"
#include "RRCConnectionSetupComplete-NB.h" #include "LTE_RRCConnectionSetupComplete-NB.h"
#include "RRCConnectionReconfigurationComplete-NB.h" #include "LTE_RRCConnectionReconfigurationComplete-NB.h"
#include "RRCConnectionReconfiguration-NB.h" #include "LTE_RRCConnectionReconfiguration-NB.h"
#include "MasterInformationBlock-NB.h" #include "LTE_MasterInformationBlock-NB.h"
#include "SystemInformation-NB.h" #include "LTE_SystemInformation-NB.h"
#include "SystemInformationBlockType1.h" #include "LTE_SystemInformationBlockType1.h"
#include "SIB-Type-NB-r13.h" #include "LTE_SIB-Type-NB-r13.h"
#include "RRCConnectionResume-NB.h" #include "LTE_RRCConnectionResume-NB.h"
#include "RRCConnectionReestablishment-NB.h" #include "LTE_RRCConnectionReestablishment-NB.h"
#include "PHY/defs_L1_NB_IoT.h" #include "PHY/defs_L1_NB_IoT.h"
//---------------------------------------- //----------------------------------------
...@@ -101,7 +101,7 @@ uint8_t do_MIB_NB_IoT( ...@@ -101,7 +101,7 @@ uint8_t do_MIB_NB_IoT(
uint32_t hyper_frame) uint32_t hyper_frame)
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
BCCH_BCH_Message_NB_t *mib_NB_IoT = &(carrier->mib_NB_IoT); LTE_BCCH_BCH_Message_NB_t *mib_NB_IoT = &(carrier->mib_NB_IoT);
/* /*
* systemFrameNumber-MSB: (TS 36.331 pag 576) * systemFrameNumber-MSB: (TS 36.331 pag 576)
...@@ -143,14 +143,14 @@ uint8_t do_MIB_NB_IoT( ...@@ -143,14 +143,14 @@ uint8_t do_MIB_NB_IoT(
mib_NB_IoT->message.ab_Enabled_r13 = 0; mib_NB_IoT->message.ab_Enabled_r13 = 0;
//to be decided //to be decided
mib_NB_IoT->message.operationModeInfo_r13.present = MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13; mib_NB_IoT->message.operationModeInfo_r13.present = LTE_MasterInformationBlock_NB__operationModeInfo_r13_PR_inband_SamePCI_r13;
mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 8; /// TODO: take into account RB_index of NB-IoT mib_NB_IoT->message.operationModeInfo_r13.choice.inband_SamePCI_r13.eutra_CRS_SequenceInfo_r13 = 8; /// TODO: take into account RB_index of NB-IoT
// printf("[MIB] Intialization of frame information ,sfn_MSB %x, hsfn_LSB %x\n", // printf("[MIB] Intialization of frame information ,sfn_MSB %x, hsfn_LSB %x\n",
// (uint32_t)sfn_MSB, // (uint32_t)sfn_MSB,
// (uint32_t)hsfn_LSB); // (uint32_t)hsfn_LSB);
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_BCH_Message_NB,
(void*)mib_NB_IoT, (void*)mib_NB_IoT,
carrier->MIB_NB_IoT, carrier->MIB_NB_IoT,
100); 100);
...@@ -172,16 +172,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -172,16 +172,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
uint32_t frame uint32_t frame
) )
{ {
BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT); LTE_BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT);
SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT); LTE_SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT);
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
PLMN_IdentityInfo_NB_r13_t PLMN_identity_info_NB_IoT; LTE_PLMN_IdentityInfo_NB_r13_t PLMN_identity_info_NB_IoT;
MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3]; LTE_MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3];
SchedulingInfo_NB_r13_t schedulingInfo_NB_IoT; LTE_SchedulingInfo_NB_r13_t schedulingInfo_NB_IoT;
SIB_Type_NB_r13_t sib_type_NB_IoT; LTE_SIB_Type_NB_r13_t sib_type_NB_IoT;
long* attachWithoutPDN_Connectivity = NULL; long* attachWithoutPDN_Connectivity = NULL;
...@@ -195,12 +195,12 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -195,12 +195,12 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
long *offset=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI) long *offset=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI)
offset = CALLOC(1,sizeof(long)); offset = CALLOC(1,sizeof(long));
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t)); memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t));
bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1; bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_NB_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13; bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
memset(&schedulingInfo_NB_IoT,0,sizeof(SchedulingInfo_NB_r13_t)); memset(&schedulingInfo_NB_IoT,0,sizeof(LTE_SchedulingInfo_NB_r13_t));
memset(&sib_type_NB_IoT,0,sizeof(SIB_Type_NB_r13_t)); memset(&sib_type_NB_IoT,0,sizeof(LTE_SIB_Type_NB_r13_t));
//allocation //allocation
*sib1_NB_IoT = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13; *sib1_NB_IoT = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13;
...@@ -217,7 +217,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -217,7 +217,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
(*sib1_NB_IoT)->hyperSFN_MSB_r13.size = 1; (*sib1_NB_IoT)->hyperSFN_MSB_r13.size = 1;
(*sib1_NB_IoT)->hyperSFN_MSB_r13.bits_unused = 0; (*sib1_NB_IoT)->hyperSFN_MSB_r13.bits_unused = 0;
memset(&PLMN_identity_info_NB_IoT,0,sizeof(PLMN_IdentityInfo_NB_r13_t)); memset(&PLMN_identity_info_NB_IoT,0,sizeof(LTE_PLMN_IdentityInfo_NB_r13_t));
PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc = CALLOC(1,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc)); PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc = CALLOC(1,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
memset(PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc,0,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc)); memset(PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc,0,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
...@@ -273,7 +273,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -273,7 +273,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
} }
//still set to "notReserved" as in the previous case //still set to "notReserved" as in the previous case
PLMN_identity_info_NB_IoT.cellReservedForOperatorUse_r13=PLMN_IdentityInfo_NB_r13__cellReservedForOperatorUse_r13_notReserved; PLMN_identity_info_NB_IoT.cellReservedForOperatorUse_r13=LTE_PLMN_IdentityInfo_NB_r13__cellReservedForOperatorUse_r13_notReserved;
*attachWithoutPDN_Connectivity = 0; *attachWithoutPDN_Connectivity = 0;
PLMN_identity_info_NB_IoT.attachWithoutPDN_Connectivity_r13 = attachWithoutPDN_Connectivity; PLMN_identity_info_NB_IoT.attachWithoutPDN_Connectivity_r13 = attachWithoutPDN_Connectivity;
...@@ -311,16 +311,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -311,16 +311,16 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4; (*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4;
//Still set to "notBarred" as in the previous case //Still set to "notBarred" as in the previous case
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellBarred_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred; (*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellBarred_r13=LTE_SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred;
//Still Set to "notAllowed" like in the previous case //Still Set to "notAllowed" like in the previous case
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.intraFreqReselection_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed; (*sib1_NB_IoT)->cellAccessRelatedInfo_r13.intraFreqReselection_r13=LTE_SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed;
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589 (*sib1_NB_IoT)->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_QualMin_r13 =-22; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value) (*sib1_NB_IoT)->cellSelectionInfo_r13.q_QualMin_r13 =-22; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
(*sib1_NB_IoT)->p_Max_r13 = CALLOC(1, sizeof(P_Max_t)); (*sib1_NB_IoT)->p_Max_r13 = CALLOC(1, sizeof(LTE_P_Max_t));
*((*sib1_NB_IoT)->p_Max_r13) = 23; *((*sib1_NB_IoT)->p_Max_r13) = 23;
//FIXME //FIXME
...@@ -335,9 +335,9 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -335,9 +335,9 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
// Now, follow the scheduler SIB configuration // Now, follow the scheduler SIB configuration
// There is only one sib2+sib3 common setting // There is only one sib2+sib3 common setting
schedulingInfo_NB_IoT.si_Periodicity_r13= SchedulingInfo_NB_r13__si_Periodicity_r13_rf64; //SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096; // (to be set to 64) schedulingInfo_NB_IoT.si_Periodicity_r13= LTE_SchedulingInfo_NB_r13__si_Periodicity_r13_rf64; //SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096; // (to be set to 64)
schedulingInfo_NB_IoT.si_RepetitionPattern_r13= SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every4thRF; //This Indicates the starting radio frames within the SI window used for SI message transmission. schedulingInfo_NB_IoT.si_RepetitionPattern_r13= LTE_SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every4thRF; //This Indicates the starting radio frames within the SI window used for SI message transmission.
schedulingInfo_NB_IoT.si_TB_r13= SchedulingInfo_NB_r13__si_TB_r13_b680;//208 bits schedulingInfo_NB_IoT.si_TB_r13= LTE_SchedulingInfo_NB_r13__si_TB_r13_b680;//208 bits
// This is for SIB2/3 // This is for SIB2/3
...@@ -345,7 +345,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -345,7 +345,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
* in the first SystemInformation message * in the first SystemInformation message
* listed in the schedulingInfoList list. * listed in the schedulingInfoList list.
* */ * */
sib_type_NB_IoT=SIB_Type_NB_r13_sibType3_NB_r13; sib_type_NB_IoT=LTE_SIB_Type_NB_r13_sibType3_NB_r13;
ASN_SEQUENCE_ADD(&schedulingInfo_NB_IoT.sib_MappingInfo_r13.list,&sib_type_NB_IoT); ASN_SEQUENCE_ADD(&schedulingInfo_NB_IoT.sib_MappingInfo_r13.list,&sib_type_NB_IoT);
ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->schedulingInfoList_r13.list,&schedulingInfo_NB_IoT); ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->schedulingInfoList_r13.list,&schedulingInfo_NB_IoT);
...@@ -365,7 +365,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -365,7 +365,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
//FIXME which value chose for the following parameter //FIXME which value chose for the following parameter
*offset =1; *offset =1;
//FIXME which value chose for the following parameter //FIXME which value chose for the following parameter
(*sib1_NB_IoT)->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160; (*sib1_NB_IoT)->si_WindowLength_r13=LTE_SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
(*sib1_NB_IoT)->si_RadioFrameOffset_r13=offset; (*sib1_NB_IoT)->si_RadioFrameOffset_r13=offset;
/////optional parameters, decide to use at future /////optional parameters, decide to use at future
...@@ -384,11 +384,11 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -384,11 +384,11 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
*eutraControlRegionSize = 2; *eutraControlRegionSize = 2;
(*sib1_NB_IoT)->eutraControlRegionSize_r13 = eutraControlRegionSize; (*sib1_NB_IoT)->eutraControlRegionSize_r13 = eutraControlRegionSize;
#ifdef XER_PRINT //generate xml files #ifdef XER_PRINT //generate xml files
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
#endif #endif
//bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT; //bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT;
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_NB,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB1_NB_IoT, carrier->SIB1_NB_IoT,
100); 100);
...@@ -414,16 +414,16 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -414,16 +414,16 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
uint16_t mnc_digit_length, uint16_t mnc_digit_length,
uint32_t frame) uint32_t frame)
{ {
BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT); LTE_BCCH_DL_SCH_Message_NB_t *bcch_message= &(carrier->siblock1_NB_IoT);
SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT); LTE_SystemInformationBlockType1_NB_t **sib1_NB_IoT= &(carrier->sib1_NB_IoT);
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
PLMN_IdentityInfo_NB_r13_t PLMN_identity_info_NB_IoT; LTE_PLMN_IdentityInfo_NB_r13_t PLMN_identity_info_NB_IoT;
MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3]; LTE_MCC_MNC_Digit_t dummy_mcc[3],dummy_mnc[3];
SchedulingInfo_NB_r13_t schedulingInfo_NB_IoT; LTE_SchedulingInfo_NB_r13_t schedulingInfo_NB_IoT;
SIB_Type_NB_r13_t sib_type_NB_IoT; LTE_SIB_Type_NB_r13_t sib_type_NB_IoT;
long* attachWithoutPDN_Connectivity = NULL; long* attachWithoutPDN_Connectivity = NULL;
...@@ -437,12 +437,12 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -437,12 +437,12 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
long *offset=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI) long *offset=NULL; //this parameter should be set only if we are considering in-band operating mode (samePCI or differentPCI)
offset = CALLOC(1,sizeof(long)); offset = CALLOC(1,sizeof(long));
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t)); memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t));
bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1; bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_NB_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13; bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformationBlockType1_r13;
memset(&schedulingInfo_NB_IoT,0,sizeof(SchedulingInfo_NB_r13_t)); memset(&schedulingInfo_NB_IoT,0,sizeof(LTE_SchedulingInfo_NB_r13_t));
memset(&sib_type_NB_IoT,0,sizeof(SIB_Type_NB_r13_t)); memset(&sib_type_NB_IoT,0,sizeof(LTE_SIB_Type_NB_r13_t));
//allocation //allocation
*sib1_NB_IoT = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13; *sib1_NB_IoT = &bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13;
...@@ -459,7 +459,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -459,7 +459,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
(*sib1_NB_IoT)->hyperSFN_MSB_r13.size = 1; (*sib1_NB_IoT)->hyperSFN_MSB_r13.size = 1;
(*sib1_NB_IoT)->hyperSFN_MSB_r13.bits_unused = 0; (*sib1_NB_IoT)->hyperSFN_MSB_r13.bits_unused = 0;
memset(&PLMN_identity_info_NB_IoT,0,sizeof(PLMN_IdentityInfo_NB_r13_t)); memset(&PLMN_identity_info_NB_IoT,0,sizeof(LTE_PLMN_IdentityInfo_NB_r13_t));
PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc = CALLOC(1,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc)); PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc = CALLOC(1,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
memset(PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc,0,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc)); memset(PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc,0,sizeof(*PLMN_identity_info_NB_IoT.plmn_Identity_r13.mcc));
...@@ -515,7 +515,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -515,7 +515,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
} }
//still set to "notReserved" as in the previous case //still set to "notReserved" as in the previous case
PLMN_identity_info_NB_IoT.cellReservedForOperatorUse_r13=PLMN_IdentityInfo_NB_r13__cellReservedForOperatorUse_r13_notReserved; PLMN_identity_info_NB_IoT.cellReservedForOperatorUse_r13=LTE_PLMN_IdentityInfo_NB_r13__cellReservedForOperatorUse_r13_notReserved;
*attachWithoutPDN_Connectivity = 0; *attachWithoutPDN_Connectivity = 0;
PLMN_identity_info_NB_IoT.attachWithoutPDN_Connectivity_r13 = attachWithoutPDN_Connectivity; PLMN_identity_info_NB_IoT.attachWithoutPDN_Connectivity_r13 = attachWithoutPDN_Connectivity;
...@@ -553,16 +553,16 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -553,16 +553,16 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4; (*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellIdentity_r13.bits_unused=4;
//Still set to "notBarred" as in the previous case //Still set to "notBarred" as in the previous case
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellBarred_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred; (*sib1_NB_IoT)->cellAccessRelatedInfo_r13.cellBarred_r13=LTE_SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__cellBarred_r13_notBarred;
//Still Set to "notAllowed" like in the previous case //Still Set to "notAllowed" like in the previous case
(*sib1_NB_IoT)->cellAccessRelatedInfo_r13.intraFreqReselection_r13=SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed; (*sib1_NB_IoT)->cellAccessRelatedInfo_r13.intraFreqReselection_r13=LTE_SystemInformationBlockType1_NB__cellAccessRelatedInfo_r13__intraFreqReselection_r13_notAllowed;
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589 (*sib1_NB_IoT)->cellSelectionInfo_r13.q_RxLevMin_r13=-65; //which value?? TS 36.331 V14.2.1 pag. 589
(*sib1_NB_IoT)->cellSelectionInfo_r13.q_QualMin_r13 =-22; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value) (*sib1_NB_IoT)->cellSelectionInfo_r13.q_QualMin_r13 =-22; //FIXME new parameter for SIB1-NB, not present in SIB1 (for cell reselection but if not used the UE should apply the default value)
(*sib1_NB_IoT)->p_Max_r13 = CALLOC(1, sizeof(P_Max_t)); (*sib1_NB_IoT)->p_Max_r13 = CALLOC(1, sizeof(LTE_P_Max_t));
*((*sib1_NB_IoT)->p_Max_r13) = 23; *((*sib1_NB_IoT)->p_Max_r13) = 23;
//FIXME //FIXME
...@@ -576,9 +576,9 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -576,9 +576,9 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
// Now, follow the scheduler SIB configuration // Now, follow the scheduler SIB configuration
// There is only one sib2+sib3 common setting // There is only one sib2+sib3 common setting
schedulingInfo_NB_IoT.si_Periodicity_r13= SchedulingInfo_NB_r13__si_Periodicity_r13_rf64; //SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096; // (to be set to 64) schedulingInfo_NB_IoT.si_Periodicity_r13= LTE_SchedulingInfo_NB_r13__si_Periodicity_r13_rf64; //SchedulingInfo_NB_r13__si_Periodicity_r13_rf4096; // (to be set to 64)
schedulingInfo_NB_IoT.si_RepetitionPattern_r13= SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every4thRF; //This Indicates the starting radio frames within the SI window used for SI message transmission. schedulingInfo_NB_IoT.si_RepetitionPattern_r13= LTE_SchedulingInfo_NB_r13__si_RepetitionPattern_r13_every4thRF; //This Indicates the starting radio frames within the SI window used for SI message transmission.
schedulingInfo_NB_IoT.si_TB_r13= SchedulingInfo_NB_r13__si_TB_r13_b680;//208 bits schedulingInfo_NB_IoT.si_TB_r13= LTE_SchedulingInfo_NB_r13__si_TB_r13_b680;//208 bits
// This is for SIB2/3 // This is for SIB2/3
/*SIB3 --> There is no mapping information of SIB2 since it is always present /*SIB3 --> There is no mapping information of SIB2 since it is always present
...@@ -605,7 +605,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -605,7 +605,7 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
//FIXME which value chose for the following parameter //FIXME which value chose for the following parameter
*offset =1; *offset =1;
//FIXME which value chose for the following parameter //FIXME which value chose for the following parameter
(*sib1_NB_IoT)->si_WindowLength_r13=SystemInformationBlockType1_NB__si_WindowLength_r13_ms160; (*sib1_NB_IoT)->si_WindowLength_r13=LTE_SystemInformationBlockType1_NB__si_WindowLength_r13_ms160;
(*sib1_NB_IoT)->si_RadioFrameOffset_r13=offset; (*sib1_NB_IoT)->si_RadioFrameOffset_r13=offset;
/////optional parameters, decide to use at future /////optional parameters, decide to use at future
...@@ -624,11 +624,11 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id, ...@@ -624,11 +624,11 @@ uint8_t do_SIB1_NB_IoT_x(uint8_t Mod_id, int CC_id,
*eutraControlRegionSize = 2; *eutraControlRegionSize = 2;
(*sib1_NB_IoT)->eutraControlRegionSize_r13 = eutraControlRegionSize; (*sib1_NB_IoT)->eutraControlRegionSize_r13 = eutraControlRegionSize;
#ifdef XER_PRINT //generate xml files #ifdef XER_PRINT //generate xml files
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
#endif #endif
//bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT; //bcch_message->message.choice.c1.choice.systemInformationBlockType1_r13 = **sib1_NB_IoT;
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_NB,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB1_NB_IoT, carrier->SIB1_NB_IoT,
100); 100);
...@@ -651,16 +651,16 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -651,16 +651,16 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier,//MP: this is already a carrier[CC_id] rrc_eNB_carrier_data_NB_IoT_t *carrier,//MP: this is already a carrier[CC_id]
RrcConfigurationReq *configuration ) //openair2/COMMON/rrc_messages_types.h RrcConfigurationReq *configuration ) //openair2/COMMON/rrc_messages_types.h
{ {
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part; struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib2_NB_part;
struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib3_NB_part; struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member *sib3_NB_part;
BCCH_DL_SCH_Message_NB_t *bcch_message = &(carrier->systemInformation_NB_IoT); //is the systeminformation-->BCCH_DL_SCH_Message_NB LTE_BCCH_DL_SCH_Message_NB_t *bcch_message = &(carrier->systemInformation_NB_IoT); //is the systeminformation-->BCCH_DL_SCH_Message_NB
SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT; LTE_SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT; LTE_SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
RACH_Info_NB_r13_t rach_Info_NB_IoT; LTE_RACH_Info_NB_r13_t rach_Info_NB_IoT;
NPRACH_Parameters_NB_r13_t *nprach_parameters; LTE_NPRACH_Parameters_NB_r13_t *nprach_parameters;
//optional //optional
long *connEstFailOffset = NULL; long *connEstFailOffset = NULL;
...@@ -669,16 +669,16 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -669,16 +669,16 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
// RSRP_ThresholdsNPRACH_InfoList_NB_r13_t *rsrp_ThresholdsPrachInfoList; // RSRP_ThresholdsNPRACH_InfoList_NB_r13_t *rsrp_ThresholdsPrachInfoList;
// RSRP_Range_t rsrp_range; // RSRP_Range_t rsrp_range;
ACK_NACK_NumRepetitions_NB_r13_t ack_nack_repetition; LTE_ACK_NACK_NumRepetitions_NB_r13_t ack_nack_repetition;
struct NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13 *dmrs_config; struct LTE_NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13 *dmrs_config;
struct DL_GapConfig_NB_r13 *dl_Gap; struct LTE_DL_GapConfig_NB_r13 *dl_Gap;
long *srs_SubframeConfig; long *srs_SubframeConfig;
srs_SubframeConfig= CALLOC(1, sizeof(long)); srs_SubframeConfig= CALLOC(1, sizeof(long));
if (bcch_message) { if (bcch_message) {
memset(bcch_message,0,sizeof(BCCH_DL_SCH_Message_NB_t)); memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t));
} else { } else {
LOG_E(RRC,"[NB-IoT %d] BCCH_MESSAGE_NB is null, exiting\n", Mod_id); LOG_E(RRC,"[NB-IoT %d] BCCH_MESSAGE_NB is null, exiting\n", Mod_id);
exit(-1); exit(-1);
...@@ -698,13 +698,13 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -698,13 +698,13 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
LOG_I(RRC,"[NB-IoT %d] Configuration SIB2/3\n", Mod_id); LOG_I(RRC,"[NB-IoT %d] Configuration SIB2/3\n", Mod_id);
sib2_NB_part = CALLOC(1,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member)); sib2_NB_part = CALLOC(1,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
sib3_NB_part = CALLOC(1,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member)); sib3_NB_part = CALLOC(1,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
memset(sib2_NB_part,0,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member)); memset(sib2_NB_part,0,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
memset(sib3_NB_part,0,sizeof(struct SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member)); memset(sib3_NB_part,0,sizeof(struct LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member));
sib2_NB_part->present = SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib2_r13; sib2_NB_part->present = LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib2_r13;
sib3_NB_part->present = SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib3_r13; sib3_NB_part->present = LTE_SystemInformation_NB_r13_IEs__sib_TypeAndInfo_r13__Member_PR_sib3_r13;
//may bug if not correct allocation of memory //may bug if not correct allocation of memory
carrier->sib2_NB_IoT = &sib2_NB_part->choice.sib2_r13; carrier->sib2_NB_IoT = &sib2_NB_part->choice.sib2_r13;
...@@ -712,11 +712,11 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -712,11 +712,11 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
sib2_NB_IoT = carrier->sib2_NB_IoT; sib2_NB_IoT = carrier->sib2_NB_IoT;
sib3_NB_IoT = carrier->sib3_NB_IoT; sib3_NB_IoT = carrier->sib3_NB_IoT;
nprach_parameters = (NPRACH_Parameters_NB_r13_t *) malloc (3*sizeof(NPRACH_Parameters_NB_r13_t)); nprach_parameters = (LTE_NPRACH_Parameters_NB_r13_t *) malloc (3*sizeof(LTE_NPRACH_Parameters_NB_r13_t));
memset(&nprach_parameters[0],0,sizeof(NPRACH_Parameters_NB_r13_t)); memset(&nprach_parameters[0],0,sizeof(LTE_NPRACH_Parameters_NB_r13_t));
memset(&nprach_parameters[1],0,sizeof(NPRACH_Parameters_NB_r13_t)); memset(&nprach_parameters[1],0,sizeof(LTE_NPRACH_Parameters_NB_r13_t));
memset(&nprach_parameters[2],0,sizeof(NPRACH_Parameters_NB_r13_t)); memset(&nprach_parameters[2],0,sizeof(LTE_NPRACH_Parameters_NB_r13_t));
/// SIB2-NB----------------------------------------- /// SIB2-NB-----------------------------------------
...@@ -816,7 +816,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -816,7 +816,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
/*OPTIONAL*/ /*OPTIONAL*/
dmrs_config = CALLOC(1,sizeof(struct NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13)); dmrs_config = CALLOC(1,sizeof(struct LTE_NPUSCH_ConfigCommon_NB_r13__dmrs_Config_r13));
dmrs_config->threeTone_CyclicShift_r13 = configuration->npusch_threeTone_CyclicShift_r13[CC_id]; dmrs_config->threeTone_CyclicShift_r13 = configuration->npusch_threeTone_CyclicShift_r13[CC_id];
dmrs_config->sixTone_CyclicShift_r13 = configuration->npusch_sixTone_CyclicShift_r13[CC_id]; dmrs_config->sixTone_CyclicShift_r13 = configuration->npusch_sixTone_CyclicShift_r13[CC_id];
...@@ -840,7 +840,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -840,7 +840,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
//dl_GAP---------------------------------------------------------------------------------/*OPTIONAL*/ //dl_GAP---------------------------------------------------------------------------------/*OPTIONAL*/
dl_Gap = CALLOC(1,sizeof(struct DL_GapConfig_NB_r13)); dl_Gap = CALLOC(1,sizeof(struct LTE_DL_GapConfig_NB_r13));
dl_Gap->dl_GapDurationCoeff_r13= configuration-> dl_GapDurationCoeff_NB[CC_id]; dl_Gap->dl_GapDurationCoeff_r13= configuration-> dl_GapDurationCoeff_NB[CC_id];
dl_Gap->dl_GapPeriodicity_r13= configuration->dl_GapPeriodicity_NB[CC_id]; dl_Gap->dl_GapPeriodicity_r13= configuration->dl_GapPeriodicity_NB[CC_id];
dl_Gap->dl_GapThreshold_r13= configuration->dl_GapThreshold_NB[CC_id]; dl_Gap->dl_GapThreshold_r13= configuration->dl_GapThreshold_NB[CC_id];
...@@ -865,14 +865,14 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -865,14 +865,14 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
sib2_NB_IoT->freqInfo_r13.additionalSpectrumEmission_r13 = 1; sib2_NB_IoT->freqInfo_r13.additionalSpectrumEmission_r13 = 1;
sib2_NB_IoT->freqInfo_r13.ul_CarrierFreq_r13 = NULL; /*OPTIONAL*/ sib2_NB_IoT->freqInfo_r13.ul_CarrierFreq_r13 = NULL; /*OPTIONAL*/
sib2_NB_IoT->timeAlignmentTimerCommon_r13=TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120; sib2_NB_IoT->timeAlignmentTimerCommon_r13=LTE_TimeAlignmentTimer_infinity;//TimeAlignmentTimer_sf5120;
/*OPTIONAL*/ /*OPTIONAL*/
sib2_NB_IoT->multiBandInfoList_r13 = NULL; sib2_NB_IoT->multiBandInfoList_r13 = NULL;
/// SIB3-NB------------------------------------------------------- /// SIB3-NB-------------------------------------------------------
sib3_NB_IoT->cellReselectionInfoCommon_r13.q_Hyst_r13=SystemInformationBlockType3_NB_r13__cellReselectionInfoCommon_r13__q_Hyst_r13_dB4; sib3_NB_IoT->cellReselectionInfoCommon_r13.q_Hyst_r13=LTE_SystemInformationBlockType3_NB_r13__cellReselectionInfoCommon_r13__q_Hyst_r13_dB4;
sib3_NB_IoT->cellReselectionServingFreqInfo_r13.s_NonIntraSearch_r13=0; //or define in configuration? sib3_NB_IoT->cellReselectionServingFreqInfo_r13.s_NonIntraSearch_r13=0; //or define in configuration?
sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_RxLevMin_r13 = -70; sib3_NB_IoT->intraFreqCellReselectionInfo_r13.q_RxLevMin_r13 = -70;
...@@ -890,10 +890,10 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -890,10 +890,10 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
///BCCH message (generate the SI message) ///BCCH message (generate the SI message)
bcch_message->message.present = BCCH_DL_SCH_MessageType_NB_PR_c1; bcch_message->message.present = LTE_BCCH_DL_SCH_MessageType_NB_PR_c1;
bcch_message->message.choice.c1.present = BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformation_r13; bcch_message->message.choice.c1.present = LTE_BCCH_DL_SCH_MessageType_NB__c1_PR_systemInformation_r13;
bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.present = SystemInformation_NB__criticalExtensions_PR_systemInformation_r13; bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.present = LTE_SystemInformation_NB__criticalExtensions_PR_systemInformation_r13;
bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.count=0; bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list.count=0;
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list, ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list,
...@@ -902,9 +902,9 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -902,9 +902,9 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
sib3_NB_part); sib3_NB_part);
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message); xer_fprint(stdout, &asn_DEF_LTE_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_BCCH_DL_SCH_Message_NB,
(void*)bcch_message, (void*)bcch_message,
carrier->SIB23_NB_IoT, carrier->SIB23_NB_IoT,
900); 900);
...@@ -941,7 +941,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -941,7 +941,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
int CC_id, int CC_id,
uint8_t* const buffer, //Srb0.Tx_buffer.Payload uint8_t* const buffer, //Srb0.Tx_buffer.Payload
const uint8_t Transaction_id, const uint8_t Transaction_id,
SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //for both SRB1bis and SRB1 LTE_SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //for both SRB1bis and SRB1
struct PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT) struct PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT)
{ {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
...@@ -956,21 +956,21 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -956,21 +956,21 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
// At the first moment of MSG4 testing we set NULL to those optional // At the first moment of MSG4 testing we set NULL to those optional
struct SRB_ToAddMod_NB_r13* SRB1_config_NB_IoT = NULL; struct LTE_SRB_ToAddMod_NB_r13* SRB1_config_NB_IoT = NULL;
struct SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1_rlc_config_NB_IoT = NULL; struct LTE_SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1_rlc_config_NB_IoT = NULL;
struct SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1_lchan_config_NB_IoT = NULL; struct LTE_SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1_lchan_config_NB_IoT = NULL;
struct SRB_ToAddMod_NB_r13* SRB1bis_config_NB_IoT = NULL; struct LTE_SRB_ToAddMod_NB_r13* SRB1bis_config_NB_IoT = NULL;
struct SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1bis_rlc_config_NB_IoT = NULL; struct LTE_SRB_ToAddMod_NB_r13__rlc_Config_r13* SRB1bis_rlc_config_NB_IoT = NULL;
struct SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1bis_lchan_config_NB_IoT = NULL; struct LTE_SRB_ToAddMod_NB_r13__logicalChannelConfig_r13* SRB1bis_lchan_config_NB_IoT = NULL;
PhysicalConfigDedicated_NB_r13_t* physicalConfigDedicated2_NB_IoT = NULL; LTE_PhysicalConfigDedicated_NB_r13_t* physicalConfigDedicated2_NB_IoT = NULL;
DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT; LTE_DL_CCCH_Message_NB_t dl_ccch_msg_NB_IoT;
RRCConnectionSetup_NB_t* rrcConnectionSetup_NB_IoT = NULL; LTE_RRCConnectionSetup_NB_t* rrcConnectionSetup_NB_IoT = NULL;
memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(DL_CCCH_Message_NB_t)); memset((void *)&dl_ccch_msg_NB_IoT,0,sizeof(LTE_DL_CCCH_Message_NB_t));
dl_ccch_msg_NB_IoT.message.present = DL_CCCH_MessageType_NB_PR_c1; dl_ccch_msg_NB_IoT.message.present = LTE_DL_CCCH_MessageType_NB_PR_c1;
dl_ccch_msg_NB_IoT.message.choice.c1.present = DL_CCCH_MessageType_NB__c1_PR_rrcConnectionSetup_r13; dl_ccch_msg_NB_IoT.message.choice.c1.present = LTE_DL_CCCH_MessageType_NB__c1_PR_rrcConnectionSetup_r13;
rrcConnectionSetup_NB_IoT = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionSetup_r13; rrcConnectionSetup_NB_IoT = &dl_ccch_msg_NB_IoT.message.choice.c1.choice.rrcConnectionSetup_r13;
...@@ -978,7 +978,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -978,7 +978,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
{ {
free(*SRB_configList_NB_IoT); free(*SRB_configList_NB_IoT);
} }
*SRB_configList_NB_IoT = CALLOC(1,sizeof(SRB_ToAddModList_NB_r13_t)); *SRB_configList_NB_IoT = CALLOC(1,sizeof(LTE_SRB_ToAddModList_NB_r13_t));
#if 0 #if 0
...@@ -1026,19 +1026,19 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1026,19 +1026,19 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
SRB1bis_rlc_config_NB_IoT = CALLOC(1,sizeof(*SRB1bis_rlc_config_NB_IoT)); SRB1bis_rlc_config_NB_IoT = CALLOC(1,sizeof(*SRB1bis_rlc_config_NB_IoT));
SRB1bis_config_NB_IoT->rlc_Config_r13 = SRB1bis_rlc_config_NB_IoT; SRB1bis_config_NB_IoT->rlc_Config_r13 = SRB1bis_rlc_config_NB_IoT;
SRB1bis_rlc_config_NB_IoT->present = SRB_ToAddMod_NB_r13__rlc_Config_r13_PR_explicitValue; SRB1bis_rlc_config_NB_IoT->present = LTE_SRB_ToAddMod_NB_r13__rlc_Config_r13_PR_explicitValue;
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.present=RLC_Config_NB_r13_PR_am;//MP: the only possible RLC config in NB_IoT SRB1bis_rlc_config_NB_IoT->choice.explicitValue.present=LTE_RLC_Config_NB_r13_PR_am;//MP: the only possible RLC config in NB_IoT
// Set from ourself not configuration files // Set from ourself not configuration files
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = T_PollRetransmit_NB_r13_ms250; SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.t_PollRetransmit_r13 = LTE_T_PollRetransmit_NB_r13_ms250;
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8; SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.ul_AM_RLC_r13.maxRetxThreshold_r13 = LTE_UL_AM_RLC_NB_r13__maxRetxThreshold_r13_t8;
//musT be disabled--> SRB1 config pag 640 specs //musT be disabled--> SRB1 config pag 640 specs
SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL; SRB1bis_rlc_config_NB_IoT->choice.explicitValue.choice.am.dl_AM_RLC_r13.enableStatusReportSN_Gap_r13 =NULL;
SRB1bis_lchan_config_NB_IoT = CALLOC(1,sizeof(*SRB1bis_lchan_config_NB_IoT)); SRB1bis_lchan_config_NB_IoT = CALLOC(1,sizeof(*SRB1bis_lchan_config_NB_IoT));
SRB1bis_config_NB_IoT->logicalChannelConfig_r13 = SRB1bis_lchan_config_NB_IoT; SRB1bis_config_NB_IoT->logicalChannelConfig_r13 = SRB1bis_lchan_config_NB_IoT;
SRB1bis_lchan_config_NB_IoT->present = SRB_ToAddMod_NB_r13__logicalChannelConfig_r13_PR_defaultValue; SRB1bis_lchan_config_NB_IoT->present = LTE_SRB_ToAddMod_NB_r13__logicalChannelConfig_r13_PR_defaultValue;
//prioritySRB1bis = CALLOC(1, sizeof(long)); //prioritySRB1bis = CALLOC(1, sizeof(long));
//*prioritySRB1bis = 1; //same as SRB1? //*prioritySRB1bis = 1; //same as SRB1?
...@@ -1055,7 +1055,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1055,7 +1055,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
#endif #endif
// start PHY dedicate config // start PHY dedicate config
physicalConfigDedicated2_NB_IoT = CALLOC(1,sizeof(*physicalConfigDedicated2_NB_IoT)); physicalConfigDedicated2_NB_IoT = CALLOC(1,sizeof(*LTE_physicalConfigDedicated2_NB_IoT));
*physicalConfigDedicated_NB_IoT = physicalConfigDedicated2_NB_IoT; *physicalConfigDedicated_NB_IoT = physicalConfigDedicated2_NB_IoT;
physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13=NULL; physicalConfigDedicated2_NB_IoT->carrierConfigDedicated_r13=NULL;
...@@ -1077,13 +1077,13 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1077,13 +1077,13 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
#endif #endif
// NPDCCH // NPDCCH
physicalConfigDedicated2_NB_IoT->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_NumRepetitions_r13_r16; physicalConfigDedicated2_NB_IoT->npdcch_ConfigDedicated_r13->npdcch_NumRepetitions_r13 =LTE_NPDCCH_ConfigDedicated_NB_r13__npdcch_NumRepetitions_r13_r16;
physicalConfigDedicated2_NB_IoT->npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13 =NPDCCH_ConfigDedicated_NB_r13__npdcch_Offset_USS_r13_zero; physicalConfigDedicated2_NB_IoT->npdcch_ConfigDedicated_r13->npdcch_Offset_USS_r13 =LTE_NPDCCH_ConfigDedicated_NB_r13__npdcch_Offset_USS_r13_zero;
physicalConfigDedicated2_NB_IoT->npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13=NPDCCH_ConfigDedicated_NB_r13__npdcch_StartSF_USS_r13_v4; physicalConfigDedicated2_NB_IoT->npdcch_ConfigDedicated_r13->npdcch_StartSF_USS_r13=LTE_NPDCCH_ConfigDedicated_NB_r13__npdcch_StartSF_USS_r13_v4;
// NPUSCH // NPUSCH
npusch_repetitions = CALLOC(1, sizeof(long)); npusch_repetitions = CALLOC(1, sizeof(long));
*npusch_repetitions = ACK_NACK_NumRepetitions_NB_r13_r8; *npusch_repetitions = LTE_ACK_NACK_NumRepetitions_NB_r13_r8;
physicalConfigDedicated2_NB_IoT->npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13= npusch_repetitions; physicalConfigDedicated2_NB_IoT->npusch_ConfigDedicated_r13->ack_NACK_NumRepetitions_r13= npusch_repetitions;
npusch_AllSymbols= CALLOC(1, sizeof(BOOLEAN_t)); npusch_AllSymbols= CALLOC(1, sizeof(BOOLEAN_t));
*npusch_AllSymbols= 1; //TRUE *npusch_AllSymbols= 1; //TRUE
...@@ -1097,7 +1097,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1097,7 +1097,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
//Fill the rrcConnectionSetup-NB message //Fill the rrcConnectionSetup-NB message
rrcConnectionSetup_NB_IoT->rrc_TransactionIdentifier = Transaction_id; //input value rrcConnectionSetup_NB_IoT->rrc_TransactionIdentifier = Transaction_id; //input value
rrcConnectionSetup_NB_IoT->criticalExtensions.present = RRCConnectionSetup_NB__criticalExtensions_PR_c1; rrcConnectionSetup_NB_IoT->criticalExtensions.present = LTE_RRCConnectionSetup_NB__criticalExtensions_PR_c1;
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.present =RRCConnectionSetup_NB__criticalExtensions__c1_PR_rrcConnectionSetup_r13 ; rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.present =RRCConnectionSetup_NB__criticalExtensions__c1_PR_rrcConnectionSetup_r13 ;
// carry only the phyiscal dedicate configuration // carry only the phyiscal dedicate configuration
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.srb_ToAddModList_r13 = *SRB_configList_NB_IoT; rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.srb_ToAddModList_r13 = *SRB_configList_NB_IoT;
...@@ -1108,9 +1108,9 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1108,9 +1108,9 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.mac_MainConfig_r13 = NULL; rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.mac_MainConfig_r13 = NULL;
#ifdef XER_PRINT #ifdef XER_PRINT
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); xer_fprint(stdout, &asn_DEF_LTE_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif #endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB, enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_DL_CCCH_Message_NB,
(void*)&dl_ccch_msg_NB_IoT, (void*)&dl_ccch_msg_NB_IoT,
buffer, buffer,
100); 100);
...@@ -1125,8 +1125,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -1125,8 +1125,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*
/*do_SecurityModeCommand - exactly the same as previous implementation*/
uint8_t do_SecurityModeCommand_NB_IoT( uint8_t do_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
...@@ -1188,7 +1187,6 @@ uint8_t do_SecurityModeCommand_NB_IoT( ...@@ -1188,7 +1187,6 @@ uint8_t do_SecurityModeCommand_NB_IoT(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_UECapabilityEnquiry_NB_IoT - very similar to legacy lte*/
uint8_t do_UECapabilityEnquiry_NB_IoT( uint8_t do_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
...@@ -1246,9 +1244,7 @@ uint8_t do_UECapabilityEnquiry_NB_IoT( ...@@ -1246,9 +1244,7 @@ uint8_t do_UECapabilityEnquiry_NB_IoT(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_RRCConnectionReconfiguration_NB_IoT-->may convey information for resource configuration
* (including RBs, MAC main configuration and physical channel configuration)
* including any associated dedicated NAS information.*/
uint16_t do_RRCConnectionReconfiguration_NB_IoT( uint16_t do_RRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
...@@ -1331,8 +1327,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT( ...@@ -1331,8 +1327,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_RRCConnectionReestablishmentReject - exactly the same as legacy LTE*/ \uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer) uint8_t* const buffer)
{ {
...@@ -1389,7 +1384,6 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT( ...@@ -1389,7 +1384,6 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
/*do_RRCConnectionReject_NB_IoT*/
uint8_t do_RRCConnectionReject_NB_IoT( uint8_t do_RRCConnectionReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer) uint8_t* const buffer)
...@@ -1409,7 +1403,6 @@ uint8_t do_RRCConnectionReject_NB_IoT( ...@@ -1409,7 +1403,6 @@ uint8_t do_RRCConnectionReject_NB_IoT(
// RRCConnectionReject-NB_IoT // RRCConnectionReject-NB_IoT
rrcConnectionReject_NB_IoT->criticalExtensions.present = RRCConnectionReject_NB__criticalExtensions_PR_c1; rrcConnectionReject_NB_IoT->criticalExtensions.present = RRCConnectionReject_NB__criticalExtensions_PR_c1;
rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.present = RRCConnectionReject_NB__criticalExtensions__c1_PR_rrcConnectionReject_r13; rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.present = RRCConnectionReject_NB__criticalExtensions__c1_PR_rrcConnectionReject_r13;
/* let's put an extended wait time of 1s for the moment */
rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.extendedWaitTime_r13 = 1; rrcConnectionReject_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReject_r13.extendedWaitTime_r13 = 1;
//new-use of suspend indication //new-use of suspend indication
//If present, this field indicates that the UE should remain suspended and not release its stored context. //If present, this field indicates that the UE should remain suspended and not release its stored context.
...@@ -1460,7 +1453,6 @@ uint8_t do_RRCConnectionReject_NB_IoT( ...@@ -1460,7 +1453,6 @@ uint8_t do_RRCConnectionReject_NB_IoT(
//no do_MBSFNAreaConfig(..) in NB-IoT //no do_MBSFNAreaConfig(..) in NB-IoT
//no do_MeasurementReport(..) in NB-IoT //no do_MeasurementReport(..) in NB-IoT
/*do_DLInformationTransfer_NB*/
uint8_t do_DLInformationTransfer_NB_IoT( uint8_t do_DLInformationTransfer_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t **buffer, uint8_t **buffer,
...@@ -1508,12 +1500,7 @@ uint8_t do_DLInformationTransfer_NB_IoT( ...@@ -1508,12 +1500,7 @@ uint8_t do_DLInformationTransfer_NB_IoT(
return encoded; return encoded;
} }
/*do_ULInformationTransfer*/
//for the moment is not needed (UE-SIDE)
/*OAI_UECapability_t *fill_ue_capability*/
/*do_RRCConnectionReestablishment_NB-->used to re-establish SRB1*/ //which parameter to use?
uint8_t do_RRCConnectionReestablishment_NB_IoT( uint8_t do_RRCConnectionReestablishment_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer, uint8_t* const buffer,
...@@ -1581,7 +1568,6 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT( ...@@ -1581,7 +1568,6 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
} }
/*do_RRCConnectionRelease_NB--> is used to command the release of an RRC connection*/
uint8_t do_RRCConnectionRelease_NB_IoT( uint8_t do_RRCConnectionRelease_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t *buffer, uint8_t *buffer,
...@@ -1621,7 +1607,7 @@ uint8_t do_RRCConnectionRelease_NB_IoT( ...@@ -1621,7 +1607,7 @@ uint8_t do_RRCConnectionRelease_NB_IoT(
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
} }
*/
// -----??????-------------------- // -----??????--------------------
#ifndef USER_MODE #ifndef USER_MODE
int init_module_NB_IoT(void) int init_module_NB_IoT(void)
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <sysexits.h> /* for EX_* exit codes */ #include <sysexits.h> /* for EX_* exit codes */
#include <errno.h> /* for errno */ #include <errno.h> /* for errno */
#else #else
#include <linux/module.h> /* Needed by all modules */ //#include <linux/module.h> /* Needed by all modules */
#endif #endif
#include <asn_application.h> #include <asn_application.h>
...@@ -163,8 +163,8 @@ uint8_t do_RRCConnectionSetup_NB_IoT( ...@@ -163,8 +163,8 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
int CC_id, int CC_id,
uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload
const uint8_t Transaction_id, const uint8_t Transaction_id,
SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //in order to be configured--> stanno puntando alla SRB_configlist dell ue_context LTE_SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //in order to be configured--> stanno puntando alla SRB_configlist dell ue_context
struct PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT //in order to be configured--> stanno puntando alla physicalConfigDedicated dell ue_context struct LTE_PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT //in order to be configured--> stanno puntando alla physicalConfigDedicated dell ue_context
); );
...@@ -190,12 +190,12 @@ do_RRCConnectionReconfiguration_NB_IoT( ...@@ -190,12 +190,12 @@ do_RRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
uint8_t Transaction_id, uint8_t Transaction_id,
SRB_ToAddModList_NB_r13_t *SRB_list_NB_IoT, LTE_SRB_ToAddModList_NB_r13_t *SRB_list_NB_IoT,
DRB_ToAddModList_NB_r13_t *DRB_list_NB_IoT, LTE_DRB_ToAddModList_NB_r13_t *DRB_list_NB_IoT,
DRB_ToReleaseList_NB_r13_t *DRB_list2_NB_IoT, LTE_DRB_ToReleaseList_NB_r13_t *DRB_list2_NB_IoT,
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated, struct LTE_PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated,
MAC_MainConfig_t *mac_MainConfig, LTE_MAC_MainConfig_t *mac_MainConfig,
struct RRCConnectionReconfiguration_NB_r13_IEs__dedicatedInfoNASList_r13* dedicatedInfoNASList_NB_IoT); struct LTE_RRCConnectionReconfiguration_NB_r13_IEs__dedicatedInfoNASList_r13* dedicatedInfoNASList_NB_IoT);
/** /**
* E-UTRAN applies the procedure as follows: when only for NB-IoT SRB1 and SRB1bis is established * E-UTRAN applies the procedure as follows: when only for NB-IoT SRB1 and SRB1bis is established
...@@ -287,7 +287,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT( ...@@ -287,7 +287,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed
SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT LTE_SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT
); );
/** /**
......
...@@ -267,7 +267,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s { ...@@ -267,7 +267,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid LTE_DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT
struct PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT; struct LTE_PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT;
LTE_MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT; LTE_MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
//No SPS(semi-persistent scheduling) in NB-IoT //No SPS(semi-persistent scheduling) in NB-IoT
......
...@@ -42,22 +42,20 @@ ...@@ -42,22 +42,20 @@
/**************/ /**************/
#include "openair1/SCHED_NBIOT/defs_NB_IoT.h" #include "openair1/SCHED_NBIOT/defs_NB_IoT.h"
#include "RRC/NBIOT/MESSAGES/asn1_msg_NB_IoT.h" #include "RRC/NBIOT/MESSAGES/asn1_msg_NB_IoT.h"
#include "RRCConnectionRequest-NB.h" #include "LTE_RRCConnectionRequest-NB.h"
#include "RRCConnectionReestablishmentRequest-NB.h" #include "LTE_RRCConnectionReestablishmentRequest-NB.h"
#include "ReestablishmentCause-NB-r13.h" #include "LTE_ReestablishmentCause-NB-r13.h"
#include "UL-CCCH-Message-NB.h" #include "LTE_UL-CCCH-Message-NB.h"
#include "DL-CCCH-Message-NB.h" #include "LTE_DL-CCCH-Message-NB.h"
#include "UL-DCCH-Message-NB.h" #include "LTE_UL-DCCH-Message-NB.h"
#include "DL-DCCH-Message-NB.h" #include "LTE_DL-DCCH-Message-NB.h"
#include "SRB-ToAddMod-NB-r13.h" #include "LTE_SRB-ToAddMod-NB-r13.h"
#include "common/utils/collection/tree.h" #include "common/utils/collection/tree.h"
#include "assertions.h" #include "assertions.h"
#include "asn1_conversions.h" #include "asn1_conversions.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h" #include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/proto.h" // For NB-IoT branch
#include "LAYER2/MAC/proto_NB_IoT.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "rlc.h" #include "rlc.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment