/** * * \section COPYRIGHT * * Copyright 2013-2021 Software Radio Systems Limited * * 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. * */ #ifndef SRSRAN_INTRA_MEASURE_LTE_H #define SRSRAN_INTRA_MEASURE_LTE_H #include "intra_measure_base.h" #include "scell_recv.h" #include namespace srsue { namespace scell { /** * @brief Describes a class for performing LTE intra-frequency cell search and measurement */ class intra_measure_lte : public intra_measure_base { public: /** * @brief Constructor * @param logger Logging object * @param new_meas_itf_ Interface to report measurement to higher layers */ intra_measure_lte(srslog::basic_logger& logger, meas_itf& new_meas_itf_); /** * @brief Destructor */ ~intra_measure_lte() override; /** * @brief Initialises LTE specific measurement objects * @param args Configuration arguments */ void init(uint32_t cc_idx, const args_t& args); /** * @brief Sets the primary cell and selects LTE operation mode, configures the cell bandwidth and sampling rate * @param earfcn Frequency the component is receiving base-band from. Used only for reporting the EARFCN to the RRC * @param cell Actual cell configuration */ void set_primary_cell(uint32_t earfcn, srsran_cell_t cell); /** * @brief Get EARFCN of this component * @return EARFCN */ uint32_t get_earfcn() const override { return current_earfcn; }; private: /** * @brief Provides with the RAT to the base class * @return The RAT measured by this class which is LTE */ srsran::srsran_rat_t get_rat() const override { return srsran::srsran_rat_t::lte; } /** * @brief LTE specific measurement process * @param context Measurement context * @param buffer Provides the baseband buffer to perform the measurements * @param rx_gain_offset Provides last received rx_gain_offset * @return True if no error happens, otherwise false */ bool measure_rat(measure_context_t context, std::vector& buffer, float rx_gain_offset) override; srslog::basic_logger& logger; srsran_cell_t serving_cell = {}; ///< Current serving cell in the EARFCN, to avoid reporting it std::atomic current_earfcn = {0}; ///< Current EARFCN std::mutex mutex; /// LTE-based measuring objects scell_recv scell_rx; ///< Secondary cell searcher srsran_refsignal_dl_sync_t refsignal_dl_sync = {}; ///< Reference signal based measurement }; } // namespace scell } // namespace srsue #endif // SRSRAN_INTRA_MEASURE_LTE_H