proc_phr: rename start_periodic_timer() and make sure its only started if a valid config is present

master
Andre Puschmann 4 years ago
parent fab86382c1
commit 937067a205

@ -44,7 +44,7 @@ public:
bool is_extended();
void timer_expired(uint32_t timer_id);
void start_timer();
void start_periodic_timer();
private:
bool pathloss_changed();

@ -515,10 +515,10 @@ void mac::new_grant_ul(uint32_t cc_idx,
mac_interface_phy_lte::mac_grant_ul_t grant,
mac_interface_phy_lte::tb_action_ul_t* action)
{
/* Start PHR Periodic timer on first UL dci */
// Start PHR Periodic timer on first UL DCI (See TS 36.321 Sec 5.4.6)
if (is_first_ul_grant) {
is_first_ul_grant = false;
phr_procedure.start_timer();
phr_procedure.start_periodic_timer();
}
// Assert UL HARQ entity

@ -100,16 +100,19 @@ bool phr_proc::pathloss_changed()
}
}
void phr_proc::start_timer()
void phr_proc::start_periodic_timer()
{
if (phr_cfg.enabled && phr_cfg.periodic_timer > 0) {
timer_periodic.run();
}
}
/* Trigger PHR when timers exires */
void phr_proc::timer_expired(uint32_t timer_id)
{
if (!phr_cfg.enabled) {
Warning("PHR: Timer triggered but PHR has been disabled\n");
Warning("PHR: %s timer triggered but PHR has been disabled\n",
timer_id == timer_periodic.id() ? "Periodic" : "Prohibit");
return;
}
if (timer_id == timer_periodic.id()) {

Loading…
Cancel
Save