|
|
@ -2547,6 +2547,8 @@ void rrc::rrc_meas::calculate_triggers(uint32_t tti)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (std::map<uint32_t, meas_t>::iterator m = active.begin(); m != active.end(); ++m) {
|
|
|
|
for (std::map<uint32_t, meas_t>::iterator m = active.begin(); m != active.end(); ++m) {
|
|
|
|
report_cfg_t *cfg = &reports_cfg[m->second.report_id];
|
|
|
|
report_cfg_t *cfg = &reports_cfg[m->second.report_id];
|
|
|
|
float hyst = 0.5*cfg->event.hysteresis;
|
|
|
|
float hyst = 0.5*cfg->event.hysteresis;
|
|
|
@ -2571,45 +2573,53 @@ void rrc::rrc_meas::calculate_triggers(uint32_t tti)
|
|
|
|
enter_condition = Mp + hyst < range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range);
|
|
|
|
enter_condition = Mp + hyst < range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range);
|
|
|
|
exit_condition = Mp - hyst > range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range);
|
|
|
|
exit_condition = Mp - hyst > range_to_value(cfg->trigger_quantity, cfg->event.event_a1.eutra.range);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// check only if
|
|
|
|
gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition,
|
|
|
|
gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition,
|
|
|
|
&m->second, &m->second.cell_values[serving_cell_idx]);
|
|
|
|
&m->second, &pcell_measurement);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (gen_report) {
|
|
|
|
|
|
|
|
log_h->info("Triggered by A1/A2 event\n");
|
|
|
|
|
|
|
|
}
|
|
|
|
// Rest are evaluated for every cell in frequency
|
|
|
|
// Rest are evaluated for every cell in frequency
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
meas_obj_t *obj = &objects[m->second.object_id];
|
|
|
|
meas_obj_t *obj = &objects[m->second.object_id];
|
|
|
|
for (std::map<uint32_t, meas_cell_t>::iterator cell = obj->cells.begin(); cell != obj->cells.end(); ++cell) {
|
|
|
|
for (std::map<uint32_t, meas_cell_t>::iterator cell = obj->cells.begin(); cell != obj->cells.end(); ++cell) {
|
|
|
|
float Ofn = obj->q_offset;
|
|
|
|
if (m->second.cell_values.count(cell->second.pci)) {
|
|
|
|
float Ocn = cell->second.q_offset;
|
|
|
|
float Ofn = obj->q_offset;
|
|
|
|
float Mn = m->second.cell_values[cell->second.pci].ms[cfg->trigger_quantity];
|
|
|
|
float Ocn = cell->second.q_offset;
|
|
|
|
float Off=0, th=0, th1=0, th2=0;
|
|
|
|
float Mn = m->second.cell_values[cell->second.pci].ms[cfg->trigger_quantity];
|
|
|
|
bool enter_condition = false;
|
|
|
|
float Off=0, th=0, th1=0, th2=0;
|
|
|
|
bool exit_condition = false;
|
|
|
|
bool enter_condition = false;
|
|
|
|
switch (event_id) {
|
|
|
|
bool exit_condition = false;
|
|
|
|
case LIBLTE_RRC_EVENT_ID_EUTRA_A3:
|
|
|
|
switch (event_id) {
|
|
|
|
Off = 0.5*cfg->event.event_a3.offset;
|
|
|
|
case LIBLTE_RRC_EVENT_ID_EUTRA_A3:
|
|
|
|
enter_condition = Mn + Ofn + Ocn - hyst > Mp + Ofp + Ocp + Off;
|
|
|
|
Off = 0.5*cfg->event.event_a3.offset;
|
|
|
|
exit_condition = Mn + Ofn + Ocn + hyst < Mp + Ofp + Ocp + Off;
|
|
|
|
enter_condition = Mn + Ofn + Ocn - hyst > Mp + Ofp + Ocp + Off;
|
|
|
|
break;
|
|
|
|
exit_condition = Mn + Ofn + Ocn + hyst < Mp + Ofp + Ocp + Off;
|
|
|
|
case LIBLTE_RRC_EVENT_ID_EUTRA_A4:
|
|
|
|
break;
|
|
|
|
th = range_to_value(cfg->trigger_quantity, cfg->event.event_a4.eutra.range);
|
|
|
|
case LIBLTE_RRC_EVENT_ID_EUTRA_A4:
|
|
|
|
enter_condition = Mn + Ofn + Ocn - hyst > th;
|
|
|
|
th = range_to_value(cfg->trigger_quantity, cfg->event.event_a4.eutra.range);
|
|
|
|
exit_condition = Mn + Ofn + Ocn + hyst < th;
|
|
|
|
enter_condition = Mn + Ofn + Ocn - hyst > th;
|
|
|
|
break;
|
|
|
|
exit_condition = Mn + Ofn + Ocn + hyst < th;
|
|
|
|
case LIBLTE_RRC_EVENT_ID_EUTRA_A5:
|
|
|
|
break;
|
|
|
|
th1 = range_to_value(cfg->trigger_quantity, cfg->event.event_a5.eutra1.range);
|
|
|
|
case LIBLTE_RRC_EVENT_ID_EUTRA_A5:
|
|
|
|
th2 = range_to_value(cfg->trigger_quantity, cfg->event.event_a5.eutra2.range);
|
|
|
|
th1 = range_to_value(cfg->trigger_quantity, cfg->event.event_a5.eutra1.range);
|
|
|
|
enter_condition = (Mp + hyst < th1) && (Mn + Ofn + Ocn - hyst > th2);
|
|
|
|
th2 = range_to_value(cfg->trigger_quantity, cfg->event.event_a5.eutra2.range);
|
|
|
|
exit_condition = (Mp - hyst > th1) && (Mn + Ofn + Ocn + hyst < th2);
|
|
|
|
enter_condition = (Mp + hyst < th1) && (Mn + Ofn + Ocn - hyst > th2);
|
|
|
|
break;
|
|
|
|
exit_condition = (Mp - hyst > th1) && (Mn + Ofn + Ocn + hyst < th2);
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
log_h->error("Error event %s not implemented\n", event_str);
|
|
|
|
default:
|
|
|
|
|
|
|
|
log_h->error("Error event %s not implemented\n", event_str);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition,
|
|
|
|
|
|
|
|
&m->second, &m->second.cell_values[cell->second.pci]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
gen_report |= process_event(&cfg->event, tti, enter_condition, exit_condition,
|
|
|
|
|
|
|
|
&m->second, &m->second.cell_values[cell->second.pci]);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (gen_report) {
|
|
|
|
if (gen_report) {
|
|
|
|
|
|
|
|
log_h->info("Generate report MeasId=%d, from event\n", m->first);
|
|
|
|
generate_report(m->first);
|
|
|
|
generate_report(m->first);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2639,6 +2649,7 @@ void rrc::rrc_meas::ho_finish() {
|
|
|
|
bool rrc::rrc_meas::timer_expired(uint32_t timer_id) {
|
|
|
|
bool rrc::rrc_meas::timer_expired(uint32_t timer_id) {
|
|
|
|
for (std::map<uint32_t, meas_t>::iterator iter = active.begin(); iter != active.end(); ++iter) {
|
|
|
|
for (std::map<uint32_t, meas_t>::iterator iter = active.begin(); iter != active.end(); ++iter) {
|
|
|
|
if (iter->second.periodic_timer == timer_id) {
|
|
|
|
if (iter->second.periodic_timer == timer_id) {
|
|
|
|
|
|
|
|
log_h->info("Generate report MeasId=%d, from timerId=%d\n", iter->first, timer_id);
|
|
|
|
generate_report(iter->first);
|
|
|
|
generate_report(iter->first);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2822,6 +2833,8 @@ void rrc::rrc_meas::parse_meas_config(LIBLTE_RRC_MEAS_CONFIG_STRUCT *cfg)
|
|
|
|
remove_meas_id(cfg->meas_id_to_remove_list[i]);
|
|
|
|
remove_meas_id(cfg->meas_id_to_remove_list[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log_h->info("nof active measId=%d\n", active.size());
|
|
|
|
|
|
|
|
|
|
|
|
// Measurement identity addition/modification 5.5.2.3
|
|
|
|
// Measurement identity addition/modification 5.5.2.3
|
|
|
|
if (cfg->meas_id_to_add_mod_list_present) {
|
|
|
|
if (cfg->meas_id_to_add_mod_list_present) {
|
|
|
|
for (uint32_t i=0;i<cfg->meas_id_to_add_mod_list.N_meas_id;i++) {
|
|
|
|
for (uint32_t i=0;i<cfg->meas_id_to_add_mod_list.N_meas_id;i++) {
|
|
|
@ -2836,8 +2849,9 @@ void rrc::rrc_meas::parse_meas_config(LIBLTE_RRC_MEAS_CONFIG_STRUCT *cfg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
active[measId->meas_id].object_id = measId->meas_obj_id;
|
|
|
|
active[measId->meas_id].object_id = measId->meas_obj_id;
|
|
|
|
active[measId->meas_id].report_id = measId->rep_cnfg_id;
|
|
|
|
active[measId->meas_id].report_id = measId->rep_cnfg_id;
|
|
|
|
log_h->info("MEAS: %s measId=%d, measObjectId=%d, reportConfigId=%d\n",
|
|
|
|
log_h->info("MEAS: %s measId=%d, measObjectId=%d, reportConfigId=%d, nof_values=%d\n",
|
|
|
|
is_new?"Added":"Updated", measId->meas_id, measId->meas_obj_id, measId->rep_cnfg_id);
|
|
|
|
is_new?"Added":"Updated", measId->meas_id, measId->meas_obj_id, measId->rep_cnfg_id,
|
|
|
|
|
|
|
|
active[measId->meas_id].cell_values.size());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|