28 #include <libconfig.h++>
30 #include "srsran/srsran.h"
31 #include "srsran/interfaces/rrc_interface_types.h"
32 #include "srsran/common/gen_mch_tables.h"
33 #include "srsran/phy/common/phy_common.h"
47 typedef std::function<int(cf_t* data[SRSRAN_MAX_CHANNELS], uint32_t nsamples, srsran_timestamp_t* rx_time)>
get_samples_t;
57 Phy(
const libconfig::Config&
cfg,
get_samples_t cb, uint8_t cs_nof_prb, int8_t override_nof_prb, uint8_t rx_channels);
186 if (
_cell.mbms_dedicated) {
187 switch (
_sib13.mbsfn_area_info_list[0].subcarrier_spacing) {
198 if (
_cell.mbms_dedicated) {
199 switch (
_sib13.mbsfn_area_info_list[0].subcarrier_spacing) {
200 case srsran::mbsfn_area_info_t::subcarrier_spacing_t::khz_1dot25:
return 1.25;
201 case srsran::mbsfn_area_info_t::subcarrier_spacing_t::khz_7dot5:
return 7.5;
239 std::map< uint32_t, std::map< int, std::string >>
_dests;
constexpr unsigned int MAX_PRB
srsran_mbsfn_cfg_t mbsfn_config_for_tti(uint32_t tti, unsigned &area)
Returns the MBSFN configuration (MCS, etc) for the subframe with the passed TTI.
void set_cfo_from_channel_estimation(float cfo)
Set the CFO value from channel estimation.
std::function< int(cf_t *data[SRSRAN_MAX_CHANNELS], uint32_t nsamples, srsran_timestamp_t *rx_time)> get_samples_t
Definition of the callback function used to fetch samples from the SDR.
std::map< uint32_t, std::map< int, std::string > > _dests
bool mcch_configured()
Return true if MCCH has been configured.
SubcarrierSpacing mbsfn_subcarrier_spacing()
unsigned nr_prb()
Get the current number of PRB.
uint8_t mbsfn_area_id()
Returns the current MBSFN area ID.
void set_decode_mcch(bool d)
Enable MCCH decoding.
const std::vector< mch_info_t > & mch_info()
void set_mch_scheduling_info(const srsran::sib13_t &sib13)
Set the values received in SIB13.
std::vector< mch_info_t > _mch_info
cf_t * _mib_buffer[SRSRAN_MAX_CHANNELS]
bool get_next_frame(cf_t **buffer, uint32_t size)
Get the sample data for the next subframe.
srsran_cell_t cell()
Get the current cell (with params adjusted for MBSFN)
bool synchronize_subframe()
Synchronizes PSS/SSS and tries to deocode the MIB.
const libconfig::Config & _cfg
uint8_t nof_mbsfn_prb()
Get number of PRB in MBSFN/PMCH.
srsran_ue_cellsearch_t _cell_search
void reset()
Clear configuration values.
bool is_cas_subframe(unsigned tti)
uint32_t tti()
Get the current subframe TTI.
srsran_ue_sync_t _ue_sync
bool init()
Initialize the underlying components.
float mbsfn_subcarrier_spacing_khz()
bool cell_search()
Search for a cell.
virtual ~Phy()
Default destructor.
uint32_t _buffer_max_samples
void set_nof_mbsfn_prb(uint8_t prb)
Override number of PRB in MBSFN/PMCH.
void set_dest_for_lcid(uint32_t mch_idx, int lcid, std::string dest)
srsran::mcch_msg_t & mcch()
bool is_mbsfn_subframe(unsigned tti)
void set_mbsfn_config(const srsran::mcch_msg_t &mcch)
Set MBSFN configuration values.
float cfo()
Get the current CFO value.
srsran_ue_mib_sync_t _mib_sync
Phy(const libconfig::Config &cfg, get_samples_t cb, uint8_t cs_nof_prb, int8_t override_nof_prb, uint8_t rx_channels)
Default constructor.
static Config cfg
Global configuration object.
std::vector< mtch_info_t > mtchs