removed magic numbers for s1ap timers, and handled the error in the s1 ho cmd

master
Francisco Paisana 5 years ago
parent 524c80a804
commit b792a3158c

@ -50,6 +50,9 @@ typedef struct {
class s1ap : public s1ap_interface_rrc class s1ap : public s1ap_interface_rrc
{ {
public: public:
static const uint32_t ts1_reloc_prep_timeout_ms = 10000;
static const uint32_t ts1_reloc_overall_timeout_ms = 10000;
s1ap(); s1ap();
bool init(s1ap_args_t args_, bool init(s1ap_args_t args_,
rrc_interface_s1ap* rrc_, rrc_interface_s1ap* rrc_,

@ -837,6 +837,7 @@ bool s1ap::handle_s1hocommand(LIBLTE_S1AP_MESSAGE_HANDOVERCOMMAND_STRUCT& msg)
auto user_it = users.find(enbid_to_rnti_map[msg.eNB_UE_S1AP_ID.ENB_UE_S1AP_ID]); auto user_it = users.find(enbid_to_rnti_map[msg.eNB_UE_S1AP_ID.ENB_UE_S1AP_ID]);
if (user_it == users.end()) { if (user_it == users.end()) {
s1ap_log->error("user rnti=0x%x no longer exists\n", user_it->first); s1ap_log->error("user rnti=0x%x no longer exists\n", user_it->first);
return false;
} }
user_it->second->get_ho_prep_proc().trigger(msg); user_it->second->get_ho_prep_proc().trigger(msg);
return true; return true;
@ -1354,9 +1355,10 @@ s1ap::ue::ue(uint16_t rnti_, s1ap* s1ap_ptr_) : s1ap_ptr(s1ap_ptr_), s1ap_log(s1
// initialize timers // initialize timers
ts1_reloc_prep = s1ap_ptr->timers->get_unique_timer(); ts1_reloc_prep = s1ap_ptr->timers->get_unique_timer();
ts1_reloc_prep.set(10000, [this](uint32_t tid) { ho_prep_proc.trigger(ho_prep_proc_t::ts1_reloc_prep_expired{}); }); ts1_reloc_prep.set(ts1_reloc_prep_timeout_ms,
[this](uint32_t tid) { ho_prep_proc.trigger(ho_prep_proc_t::ts1_reloc_prep_expired{}); });
ts1_reloc_overall = s1ap_ptr->timers->get_unique_timer(); ts1_reloc_overall = s1ap_ptr->timers->get_unique_timer();
ts1_reloc_overall.set(10000, [this](uint32_t tid) {}); ts1_reloc_overall.set(ts1_reloc_overall_timeout_ms, [](uint32_t tid) { /* TODO */ });
} }
bool s1ap::ue::send_ho_required(uint32_t target_eci, bool s1ap::ue::send_ho_required(uint32_t target_eci,

Loading…
Cancel
Save