timers: rename value() to time_elapsed()

this seems to be better readable than value() since
we've sometimes confused it with the timeout value
master
Andre Puschmann 5 years ago
parent b085a8eabf
commit ed179fd311

@ -69,7 +69,7 @@ class timer_handler
bool is_expired() const { return active and not running and timeout > 0 and timeout <= parent->cur_time; }
uint32_t value() const { return std::min(duration, parent->cur_time - (timeout - duration)); }
uint32_t time_elapsed() const { return std::min(duration, parent->cur_time - (timeout - duration)); }
bool set(uint32_t duration_)
{
@ -184,7 +184,7 @@ public:
bool is_expired() const { return impl()->is_expired(); }
uint32_t value() const { return impl()->value(); }
uint32_t time_elapsed() const { return impl()->time_elapsed(); }
void run() { impl()->run(); }

@ -281,7 +281,7 @@ uint32_t rlc_am_lte::rlc_am_lte_tx::get_buffer_state()
RB_NAME,
do_status() ? "yes" : "no",
status_prohibit_timer.is_running() ? "yes" : "no",
status_prohibit_timer.value(),
status_prohibit_timer.time_elapsed(),
status_prohibit_timer.duration());
// Bytes needed for status report

@ -275,7 +275,7 @@ int timers2_test4()
// assert no timer got wrong values
for (uint32_t i = 0; i < nof_timers; i++) {
if (ctx->timers[i].is_running()) {
TESTASSERT(ctx->timers[i].value() <= ctx->timers[i].duration());
TESTASSERT(ctx->timers[i].time_elapsed() <= ctx->timers[i].duration());
}
}

@ -1022,7 +1022,8 @@ void rrc::ue::activity_timer_expired()
{
if (parent) {
if (parent->rrc_log) {
parent->rrc_log->warning("Activity timer for rnti=0x%x expired after %d ms\n", rnti, activity_timer.value());
parent->rrc_log->warning(
"Activity timer for rnti=0x%x expired after %d ms\n", rnti, activity_timer.time_elapsed());
}
if (parent->s1ap->user_exists(rnti)) {

@ -305,8 +305,10 @@ bool demux::process_ce(srslte::sch_subh* subh)
void demux::parse_ta_cmd(srslte::sch_subh *subh) {
phy_h->set_timeadv(subh->get_ta_cmd());
Info("Received TA=%d (%d/%d) \n", subh->get_ta_cmd(),
time_alignment_timer->value(), time_alignment_timer->duration());
Info("Received TA=%d (%d/%d) \n",
subh->get_ta_cmd(),
time_alignment_timer->time_elapsed(),
time_alignment_timer->duration());
// Start or restart timeAlignmentTimer only if set
if (time_alignment_timer->is_set()) {
time_alignment_timer->run();

@ -1017,7 +1017,7 @@ srslte::proc_outcome_t rrc::connection_reest_proc::step_cell_reselection()
} else {
// Out-of-sync, relaunch reselection
Info("Serving cell is out-of-sync, re-launching re-selection procedure. T311: %d/%d ms\n",
rrc_ptr->t311.value(),
rrc_ptr->t311.time_elapsed(),
rrc_ptr->t311.duration());
if (!rrc_ptr->cell_reselector.launch()) {
return proc_outcome_t::error;
@ -1071,7 +1071,7 @@ srslte::proc_outcome_t rrc::connection_reest_proc::cell_criteria()
// Actions following cell reselection while T311 is running 5.3.7.3
// Upon selecting a suitable E-UTRA cell, the UE shall:
Info("Cell Selection criteria passed after %dms. Sending RRC Connection Reestablishment Request\n",
rrc_ptr->t311.value());
rrc_ptr->t311.time_elapsed());
// stop timer T311;
rrc_ptr->t311.stop();

Loading…
Cancel
Save