mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.0 KiB
C
66 lines
2.0 KiB
C
6 years ago
|
/*
|
||
5 years ago
|
* Copyright 2013-2020 Software Radio Systems Limited
|
||
8 years ago
|
*
|
||
|
* This file is part of srsLTE.
|
||
|
*
|
||
6 years ago
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
8 years ago
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
6 years ago
|
* srsLTE is distributed in the hope that it will be useful,
|
||
8 years ago
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* A copy of the GNU Affero General Public License can be found in
|
||
|
* the LICENSE file in the top-level directory of this distribution
|
||
|
* and at http://www.gnu.org/licenses/.
|
||
|
*
|
||
|
*/
|
||
|
|
||
7 years ago
|
#ifndef SRSENB_SCHEDULER_METRIC_H
|
||
|
#define SRSENB_SCHEDULER_METRIC_H
|
||
8 years ago
|
|
||
4 years ago
|
#include "sched.h"
|
||
8 years ago
|
|
||
|
namespace srsenb {
|
||
6 years ago
|
|
||
8 years ago
|
class dl_metric_rr : public sched::metric_dl
|
||
|
{
|
||
6 years ago
|
const static int MAX_RBG = 25;
|
||
7 years ago
|
|
||
6 years ago
|
public:
|
||
5 years ago
|
void set_params(const sched_cell_params_t& cell_params_) final;
|
||
5 years ago
|
void sched_users(std::map<uint16_t, sched_ue>& ue_db, dl_sf_sched_itf* tti_sched) final;
|
||
8 years ago
|
|
||
6 years ago
|
private:
|
||
5 years ago
|
bool find_allocation(uint32_t min_nof_rbg, uint32_t max_nof_rbg, rbgmask_t* rbgmask);
|
||
5 years ago
|
dl_harq_proc* allocate_user(sched_ue* user);
|
||
7 years ago
|
|
||
5 years ago
|
const sched_cell_params_t* cc_cfg = nullptr;
|
||
|
srslte::log_ref log_h;
|
||
5 years ago
|
dl_sf_sched_itf* tti_alloc = nullptr;
|
||
8 years ago
|
};
|
||
|
|
||
|
class ul_metric_rr : public sched::metric_ul
|
||
|
{
|
||
|
public:
|
||
5 years ago
|
void set_params(const sched_cell_params_t& cell_params_) final;
|
||
5 years ago
|
void sched_users(std::map<uint16_t, sched_ue>& ue_db, ul_sf_sched_itf* tti_sched) final;
|
||
6 years ago
|
|
||
8 years ago
|
private:
|
||
4 years ago
|
bool find_allocation(uint32_t L, prb_interval* alloc);
|
||
5 years ago
|
ul_harq_proc* allocate_user_newtx_prbs(sched_ue* user);
|
||
|
ul_harq_proc* allocate_user_retx_prbs(sched_ue* user);
|
||
8 years ago
|
|
||
5 years ago
|
const sched_cell_params_t* cc_cfg = nullptr;
|
||
|
srslte::log_ref log_h;
|
||
5 years ago
|
ul_sf_sched_itf* tti_alloc = nullptr;
|
||
|
uint32_t current_tti = 0;
|
||
8 years ago
|
};
|
||
|
|
||
5 years ago
|
} // namespace srsenb
|
||
8 years ago
|
|
||
7 years ago
|
#endif // SRSENB_SCHEDULER_METRIC_H
|