|
|
|
@ -49,12 +49,30 @@ public:
|
|
|
|
|
uint16_t nr_rnti; /// RNTI assigned to UE on NR carrier
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Called from EUTRA-RRC when EN-DC (for UE) shall be removed/released
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
struct sgnb_rel_req_ev {
|
|
|
|
|
uint16_t nr_rnti; /// RNTI assigned to UE on NR carrier
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Event sent from NR-RRC to EUTRA when UE has been removed from SgNB
|
|
|
|
|
*
|
|
|
|
|
* sent in response to SgNB Release Request
|
|
|
|
|
*/
|
|
|
|
|
struct sgnb_rel_req_ack_ev {};
|
|
|
|
|
|
|
|
|
|
rrc_endc(srsenb::rrc::ue* outer_ue, const rrc_endc_cfg_t& endc_cfg_);
|
|
|
|
|
~rrc_endc();
|
|
|
|
|
|
|
|
|
|
bool fill_conn_recfg(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn_recfg);
|
|
|
|
|
void handle_eutra_capabilities(const asn1::rrc::ue_eutra_cap_s& eutra_caps);
|
|
|
|
|
void handle_ue_meas_report(const asn1::rrc::meas_report_s& msg);
|
|
|
|
|
|
|
|
|
|
void start_sgnb_release();
|
|
|
|
|
|
|
|
|
|
bool is_endc_supported();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
@ -70,6 +88,7 @@ private:
|
|
|
|
|
// vars
|
|
|
|
|
bool endc_supported = false;
|
|
|
|
|
rrc_endc_cfg_t endc_cfg = {};
|
|
|
|
|
uint16_t nr_rnti = SRSRAN_INVALID_RNTI; // C-RNTI assigned to UE on NR side
|
|
|
|
|
asn1::rrc::rrc_conn_recfg_complete_s pending_recfg_complete;
|
|
|
|
|
|
|
|
|
|
// fixed ENDC variables
|
|
|
|
@ -94,22 +113,30 @@ private:
|
|
|
|
|
};
|
|
|
|
|
struct wait_add_complete_st {}; // user needs to complete RA procedure and send C-RNTI CE
|
|
|
|
|
struct endc_activated_st {}; // user has enabled EN-DC successfully and is currently served
|
|
|
|
|
struct wait_sgnb_rel_req_resp_st {}; // release EN-DC
|
|
|
|
|
|
|
|
|
|
// FSM guards
|
|
|
|
|
|
|
|
|
|
// FSM transition handlers
|
|
|
|
|
void handle_sgnb_add_req_ack(wait_sgnb_add_req_resp_st& s, const sgnb_add_req_ack_ev& ev);
|
|
|
|
|
void handle_sgnb_rel_req(endc_activated_st& s, const sgnb_rel_req_ev& ev);
|
|
|
|
|
void handle_rrc_reest(wait_add_complete_st& s, const rrc_reest_rx_ev& ev);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
// states
|
|
|
|
|
state_list<endc_deactivated_st, wait_sgnb_add_req_resp_st, prepare_recfg_st, wait_add_complete_st, endc_activated_st>
|
|
|
|
|
state_list<endc_deactivated_st,
|
|
|
|
|
wait_sgnb_add_req_resp_st,
|
|
|
|
|
prepare_recfg_st,
|
|
|
|
|
wait_add_complete_st,
|
|
|
|
|
endc_activated_st,
|
|
|
|
|
wait_sgnb_rel_req_resp_st>
|
|
|
|
|
states{this,
|
|
|
|
|
endc_deactivated_st{},
|
|
|
|
|
wait_sgnb_add_req_resp_st{},
|
|
|
|
|
prepare_recfg_st{this},
|
|
|
|
|
wait_add_complete_st{},
|
|
|
|
|
endc_activated_st{}};
|
|
|
|
|
endc_activated_st{},
|
|
|
|
|
wait_sgnb_rel_req_resp_st{}};
|
|
|
|
|
|
|
|
|
|
// transitions
|
|
|
|
|
using fsm = rrc_endc;
|
|
|
|
@ -123,8 +150,11 @@ protected:
|
|
|
|
|
row< wait_sgnb_add_req_resp_st, endc_deactivated_st, sgnb_add_req_reject_ev >,
|
|
|
|
|
row< prepare_recfg_st, wait_add_complete_st, rrc_recfg_sent_ev >,
|
|
|
|
|
row< wait_add_complete_st, endc_activated_st, sgnb_add_complete_ev >,
|
|
|
|
|
row< wait_add_complete_st, endc_deactivated_st, rrc_reest_rx_ev, &fsm::handle_rrc_reest >
|
|
|
|
|
row< wait_add_complete_st, endc_deactivated_st, rrc_reest_rx_ev, &fsm::handle_rrc_reest >,
|
|
|
|
|
// +---------------------------+--------------------------+------------------------+------------------------------+-------------------------+
|
|
|
|
|
row< endc_activated_st, wait_sgnb_rel_req_resp_st, sgnb_rel_req_ev, &fsm::handle_sgnb_rel_req >,
|
|
|
|
|
row< wait_sgnb_rel_req_resp_st, endc_deactivated_st, sgnb_rel_req_ack_ev >
|
|
|
|
|
|
|
|
|
|
>;
|
|
|
|
|
// clang-format on
|
|
|
|
|
};
|
|
|
|
|