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.
76 lines
2.0 KiB
C
76 lines
2.0 KiB
C
4 years ago
|
/**
|
||
6 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
6 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2020 Software Radio Systems Limited
|
||
6 years ago
|
*
|
||
4 years ago
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
6 years ago
|
*
|
||
|
*/
|
||
|
|
||
|
#ifndef SRSENB_PHCH_WORKER_H
|
||
|
#define SRSENB_PHCH_WORKER_H
|
||
|
|
||
5 years ago
|
#include <mutex>
|
||
6 years ago
|
#include <string.h>
|
||
|
|
||
4 years ago
|
#include "../phy_common.h"
|
||
5 years ago
|
#include "cc_worker.h"
|
||
6 years ago
|
#include "srslte/srslte.h"
|
||
|
|
||
|
namespace srsenb {
|
||
4 years ago
|
namespace lte {
|
||
6 years ago
|
|
||
|
class sf_worker : public srslte::thread_pool::worker
|
||
|
{
|
||
|
public:
|
||
5 years ago
|
sf_worker() = default;
|
||
5 years ago
|
~sf_worker();
|
||
6 years ago
|
void init(phy_common* phy, srslte::log* log_h);
|
||
|
|
||
5 years ago
|
cf_t* get_buffer_rx(uint32_t cc_idx, uint32_t antenna_idx);
|
||
5 years ago
|
void set_time(uint32_t tti_, uint32_t tx_worker_cnt_, const srslte::rf_timestamp_t& tx_time_);
|
||
6 years ago
|
|
||
5 years ago
|
int add_rnti(uint16_t rnti, uint32_t cc_idx);
|
||
6 years ago
|
void rem_rnti(uint16_t rnti);
|
||
5 years ago
|
int pregen_sequences(uint16_t rnti);
|
||
6 years ago
|
uint32_t get_nof_rnti();
|
||
|
|
||
|
/* These are used by the GUI plotting tools */
|
||
5 years ago
|
uint32_t get_nof_carriers();
|
||
|
int get_carrier_pci(uint32_t cc_idx);
|
||
|
int read_ce_abs(uint32_t cc_idx, float* ce_abs);
|
||
|
int read_ce_arg(uint32_t cc_idx, float* ce_abs);
|
||
|
int read_pusch_d(uint32_t cc_idx, cf_t* pusch_d);
|
||
|
int read_pucch_d(uint32_t cc_idx, cf_t* pusch_d);
|
||
4 years ago
|
void start_plot();
|
||
6 years ago
|
|
||
4 years ago
|
uint32_t get_metrics(std::vector<phy_metrics_t>& metrics);
|
||
6 years ago
|
|
||
|
private:
|
||
5 years ago
|
void work_imp() final;
|
||
|
|
||
|
/* Common objects */
|
||
5 years ago
|
srslte::log* log_h = nullptr;
|
||
|
phy_common* phy = nullptr;
|
||
|
bool initiated = false;
|
||
|
bool running = false;
|
||
5 years ago
|
std::mutex work_mutex;
|
||
6 years ago
|
|
||
5 years ago
|
uint32_t tti_rx = 0, tti_tx_dl = 0, tti_tx_ul = 0;
|
||
|
uint32_t t_rx = 0, t_tx_dl = 0, t_tx_ul = 0;
|
||
|
uint32_t tx_worker_cnt = 0;
|
||
|
srslte::rf_timestamp_t tx_time = {};
|
||
6 years ago
|
|
||
5 years ago
|
std::vector<std::unique_ptr<cc_worker> > cc_workers;
|
||
6 years ago
|
|
||
5 years ago
|
srslte_softbuffer_tx_t temp_mbsfn_softbuffer = {};
|
||
6 years ago
|
};
|
||
|
|
||
4 years ago
|
} // namespace lte
|
||
6 years ago
|
} // namespace srsenb
|
||
|
|
||
|
#endif // SRSENB_PHCH_WORKER_H
|