|
|
@ -357,21 +357,21 @@ private:
|
|
|
|
uint16_t lcid;
|
|
|
|
uint16_t lcid;
|
|
|
|
} cmd_msg_t;
|
|
|
|
} cmd_msg_t;
|
|
|
|
|
|
|
|
|
|
|
|
bool running;
|
|
|
|
bool running = false;
|
|
|
|
srslte::block_queue<cmd_msg_t> cmd_q;
|
|
|
|
srslte::block_queue<cmd_msg_t> cmd_q;
|
|
|
|
void run_thread();
|
|
|
|
void run_thread();
|
|
|
|
|
|
|
|
|
|
|
|
void process_pcch(srslte::unique_byte_buffer_t pdu);
|
|
|
|
void process_pcch(srslte::unique_byte_buffer_t pdu);
|
|
|
|
|
|
|
|
|
|
|
|
srslte::byte_buffer_pool *pool;
|
|
|
|
srslte::byte_buffer_pool* pool = nullptr;
|
|
|
|
srslte::log *rrc_log;
|
|
|
|
srslte::log* rrc_log = nullptr;
|
|
|
|
phy_interface_rrc_lte* phy;
|
|
|
|
phy_interface_rrc_lte* phy = nullptr;
|
|
|
|
mac_interface_rrc *mac;
|
|
|
|
mac_interface_rrc* mac = nullptr;
|
|
|
|
rlc_interface_rrc *rlc;
|
|
|
|
rlc_interface_rrc* rlc = nullptr;
|
|
|
|
pdcp_interface_rrc *pdcp;
|
|
|
|
pdcp_interface_rrc* pdcp = nullptr;
|
|
|
|
nas_interface_rrc *nas;
|
|
|
|
nas_interface_rrc* nas = nullptr;
|
|
|
|
usim_interface_rrc *usim;
|
|
|
|
usim_interface_rrc* usim = nullptr;
|
|
|
|
gw_interface_rrc *gw;
|
|
|
|
gw_interface_rrc* gw = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
srslte::unique_byte_buffer_t dedicated_info_nas;
|
|
|
|
srslte::unique_byte_buffer_t dedicated_info_nas;
|
|
|
|
|
|
|
|
|
|
|
@ -382,40 +382,40 @@ private:
|
|
|
|
|
|
|
|
|
|
|
|
pthread_mutex_t mutex;
|
|
|
|
pthread_mutex_t mutex;
|
|
|
|
|
|
|
|
|
|
|
|
rrc_state_t state, last_state;
|
|
|
|
rrc_state_t state, last_state = RRC_STATE_IDLE;
|
|
|
|
uint8_t transaction_id;
|
|
|
|
uint8_t transaction_id = 0;
|
|
|
|
srslte::s_tmsi_t ue_identity;
|
|
|
|
srslte::s_tmsi_t ue_identity;
|
|
|
|
bool ue_identity_configured;
|
|
|
|
bool ue_identity_configured = false;
|
|
|
|
|
|
|
|
|
|
|
|
bool drb_up;
|
|
|
|
bool drb_up = false;
|
|
|
|
|
|
|
|
|
|
|
|
rrc_args_t args;
|
|
|
|
rrc_args_t args = {};
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t cell_clean_cnt;
|
|
|
|
uint32_t cell_clean_cnt = 0;
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t ho_src_rnti;
|
|
|
|
uint16_t ho_src_rnti = 0;
|
|
|
|
cell_t ho_src_cell;
|
|
|
|
cell_t ho_src_cell = {};
|
|
|
|
phy_interface_rrc_lte::phy_cfg_t current_phy_cfg, previous_phy_cfg;
|
|
|
|
phy_interface_rrc_lte::phy_cfg_t current_phy_cfg, previous_phy_cfg = {};
|
|
|
|
mac_interface_rrc::mac_cfg_t current_mac_cfg, previous_mac_cfg;
|
|
|
|
mac_interface_rrc::mac_cfg_t current_mac_cfg, previous_mac_cfg = {};
|
|
|
|
bool pending_mob_reconf;
|
|
|
|
bool pending_mob_reconf = false;
|
|
|
|
asn1::rrc::rrc_conn_recfg_s mob_reconf;
|
|
|
|
asn1::rrc::rrc_conn_recfg_s mob_reconf = {};
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t k_rrc_enc[32];
|
|
|
|
uint8_t k_rrc_enc[32] = {};
|
|
|
|
uint8_t k_rrc_int[32];
|
|
|
|
uint8_t k_rrc_int[32] = {};
|
|
|
|
uint8_t k_up_enc[32];
|
|
|
|
uint8_t k_up_enc[32] = {};
|
|
|
|
uint8_t k_up_int[32]; // Not used: only for relay nodes (3GPP 33.401 Annex A.7)
|
|
|
|
uint8_t k_up_int[32] = {}; // Not used: only for relay nodes (3GPP 33.401 Annex A.7)
|
|
|
|
|
|
|
|
|
|
|
|
srslte::CIPHERING_ALGORITHM_ID_ENUM cipher_algo;
|
|
|
|
srslte::CIPHERING_ALGORITHM_ID_ENUM cipher_algo = srslte::CIPHERING_ALGORITHM_ID_EEA0;
|
|
|
|
srslte::INTEGRITY_ALGORITHM_ID_ENUM integ_algo;
|
|
|
|
srslte::INTEGRITY_ALGORITHM_ID_ENUM integ_algo = srslte::INTEGRITY_ALGORITHM_ID_EIA0;
|
|
|
|
|
|
|
|
|
|
|
|
std::map<uint32_t, asn1::rrc::srb_to_add_mod_s> srbs;
|
|
|
|
std::map<uint32_t, asn1::rrc::srb_to_add_mod_s> srbs;
|
|
|
|
std::map<uint32_t, asn1::rrc::drb_to_add_mod_s> drbs;
|
|
|
|
std::map<uint32_t, asn1::rrc::drb_to_add_mod_s> drbs;
|
|
|
|
|
|
|
|
|
|
|
|
// RRC constants and timers
|
|
|
|
// RRC constants and timers
|
|
|
|
srslte::mac_interface_timers *mac_timers;
|
|
|
|
srslte::mac_interface_timers* mac_timers = nullptr;
|
|
|
|
uint32_t n310_cnt, N310;
|
|
|
|
uint32_t n310_cnt, N310 = 0;
|
|
|
|
uint32_t n311_cnt, N311;
|
|
|
|
uint32_t n311_cnt, N311 = 0;
|
|
|
|
uint32_t t300, t301, t302, t310, t311, t304;
|
|
|
|
uint32_t t300, t301, t302, t310, t311, t304 = 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Radio bearers
|
|
|
|
// Radio bearers
|
|
|
|
typedef enum{
|
|
|
|
typedef enum{
|
|
|
@ -448,7 +448,7 @@ private:
|
|
|
|
const static int NEIGHBOUR_TIMEOUT = 5;
|
|
|
|
const static int NEIGHBOUR_TIMEOUT = 5;
|
|
|
|
const static int NOF_NEIGHBOUR_CELLS = 8;
|
|
|
|
const static int NOF_NEIGHBOUR_CELLS = 8;
|
|
|
|
std::vector<cell_t*> neighbour_cells;
|
|
|
|
std::vector<cell_t*> neighbour_cells;
|
|
|
|
cell_t *serving_cell;
|
|
|
|
cell_t* serving_cell = nullptr;
|
|
|
|
void set_serving_cell(uint32_t cell_idx);
|
|
|
|
void set_serving_cell(uint32_t cell_idx);
|
|
|
|
void set_serving_cell(phy_interface_rrc_lte::phy_cell_t phy_cell);
|
|
|
|
void set_serving_cell(phy_interface_rrc_lte::phy_cell_t phy_cell);
|
|
|
|
|
|
|
|
|
|
|
@ -467,16 +467,16 @@ private:
|
|
|
|
uint32_t sib_start_tti(uint32_t tti, uint32_t period, uint32_t offset, uint32_t sf);
|
|
|
|
uint32_t sib_start_tti(uint32_t tti, uint32_t period, uint32_t offset, uint32_t sf);
|
|
|
|
const static int SIB_SEARCH_TIMEOUT_MS = 1000;
|
|
|
|
const static int SIB_SEARCH_TIMEOUT_MS = 1000;
|
|
|
|
|
|
|
|
|
|
|
|
bool initiated;
|
|
|
|
bool initiated = false;
|
|
|
|
bool ho_start;
|
|
|
|
bool ho_start = false;
|
|
|
|
bool go_idle;
|
|
|
|
bool go_idle = false;
|
|
|
|
asn1::rrc::reest_cause_e m_reest_cause;
|
|
|
|
asn1::rrc::reest_cause_e m_reest_cause = {};
|
|
|
|
uint16_t m_reest_rnti;
|
|
|
|
uint16_t m_reest_rnti = 0;
|
|
|
|
bool reestablishment_started = false;
|
|
|
|
bool reestablishment_started = false;
|
|
|
|
bool reestablishment_successful = false;
|
|
|
|
bool reestablishment_successful = false;
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t rlc_flush_counter;
|
|
|
|
uint32_t rlc_flush_counter = 0;
|
|
|
|
uint32_t rlc_flush_timeout;
|
|
|
|
uint32_t rlc_flush_timeout = 0;
|
|
|
|
|
|
|
|
|
|
|
|
// Measurements sub-class
|
|
|
|
// Measurements sub-class
|
|
|
|
class rrc_meas {
|
|
|
|
class rrc_meas {
|
|
|
@ -539,18 +539,18 @@ private:
|
|
|
|
std::map<uint32_t, report_cfg_t> reports_cfg;
|
|
|
|
std::map<uint32_t, report_cfg_t> reports_cfg;
|
|
|
|
std::map<uint32_t, meas_t> active;
|
|
|
|
std::map<uint32_t, meas_t> active;
|
|
|
|
|
|
|
|
|
|
|
|
rrc *parent;
|
|
|
|
rrc* parent = nullptr;
|
|
|
|
srslte::log *log_h;
|
|
|
|
srslte::log* log_h = nullptr;
|
|
|
|
phy_interface_rrc_lte* phy;
|
|
|
|
phy_interface_rrc_lte* phy = nullptr;
|
|
|
|
srslte::mac_interface_timers *mac_timers;
|
|
|
|
srslte::mac_interface_timers* mac_timers = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t filter_k_rsrp, filter_k_rsrq;
|
|
|
|
uint32_t filter_k_rsrp, filter_k_rsrq = 0;
|
|
|
|
float filter_a[NOF_MEASUREMENTS];
|
|
|
|
float filter_a[NOF_MEASUREMENTS] = {};
|
|
|
|
|
|
|
|
|
|
|
|
meas_value_t pcell_measurement;
|
|
|
|
meas_value_t pcell_measurement = {};
|
|
|
|
|
|
|
|
|
|
|
|
bool s_measure_enabled;
|
|
|
|
bool s_measure_enabled = false;
|
|
|
|
float s_measure_value;
|
|
|
|
float s_measure_value = 0.0;
|
|
|
|
|
|
|
|
|
|
|
|
void stop_reports(meas_t *m);
|
|
|
|
void stop_reports(meas_t *m);
|
|
|
|
void stop_reports_object(uint32_t object_id);
|
|
|
|
void stop_reports_object(uint32_t object_id);
|
|
|
@ -600,7 +600,7 @@ private:
|
|
|
|
float threshservinglow;
|
|
|
|
float threshservinglow;
|
|
|
|
} cell_resel_cfg_t;
|
|
|
|
} cell_resel_cfg_t;
|
|
|
|
|
|
|
|
|
|
|
|
cell_resel_cfg_t cell_resel_cfg;
|
|
|
|
cell_resel_cfg_t cell_resel_cfg = {};
|
|
|
|
|
|
|
|
|
|
|
|
float get_srxlev(float Qrxlevmeas);
|
|
|
|
float get_srxlev(float Qrxlevmeas);
|
|
|
|
float get_squal(float Qqualmeas);
|
|
|
|
float get_squal(float Qqualmeas);
|
|
|
@ -617,10 +617,10 @@ private:
|
|
|
|
|
|
|
|
|
|
|
|
phy_interface_rrc_lte::cell_search_ret_t cell_search();
|
|
|
|
phy_interface_rrc_lte::cell_search_ret_t cell_search();
|
|
|
|
|
|
|
|
|
|
|
|
srslte::plmn_id_t selected_plmn_id;
|
|
|
|
srslte::plmn_id_t selected_plmn_id = {};
|
|
|
|
bool plmn_is_selected;
|
|
|
|
bool plmn_is_selected = false;
|
|
|
|
|
|
|
|
|
|
|
|
bool security_is_activated;
|
|
|
|
bool security_is_activated = false;
|
|
|
|
|
|
|
|
|
|
|
|
// RLC interface
|
|
|
|
// RLC interface
|
|
|
|
void max_retx_attempted();
|
|
|
|
void max_retx_attempted();
|
|
|
|