Skip to content

Commit eef0e18

Browse files
Merge branch 'dev' into agpl_main
2 parents bed67d1 + ea358bb commit eef0e18

File tree

143 files changed

+288
-275
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+288
-275
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ ForEachMacros:
6262
- BOOST_FOREACH
6363
IncludeBlocks: Preserve
6464
IncludeCategories: #Changed
65-
- Regex: '^"(srsgnb|llvm|llvm-c|clang|clang-c)/'
65+
- Regex: '^"(srsran|llvm|llvm-c|clang|clang-c)/'
6666
Priority: 2
6767
- Regex: '^(<|"(CLI|fmt|gtest|gmock|isl|json|variant)/)'
6868
Priority: 3

apps/examples/phy/radio_ssb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "../radio/radio_notifier_sample.h"
3434
#include "lower_phy_example_factory.h"
3535
#include "rx_symbol_handler_example.h"
36+
#include "upper_phy_ssb_example.h"
3637
#include "srsran/phy/adapters/phy_error_adapter.h"
3738
#include "srsran/phy/adapters/phy_rg_gateway_adapter.h"
3839
#include "srsran/phy/adapters/phy_rx_symbol_adapter.h"
@@ -41,7 +42,6 @@
4142
#include "srsran/radio/radio_factory.h"
4243
#include "srsran/support/executors/task_worker.h"
4344
#include "srsran/support/math_utils.h"
44-
#include "upper_phy_ssb_example.h"
4545
#include <atomic>
4646
#include <csignal>
4747
#include <getopt.h>

apps/gnb/gnb.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ static std::unique_ptr<radio_session>
325325
build_radio(task_executor& executor, radio_notification_handler& radio_handler, const gnb_appconfig& config)
326326
{
327327
std::unique_ptr<radio_factory> factory = create_radio_factory(config.rf_driver_cfg.device_driver);
328-
report_fatal_error_if_not(factory, "Invalid radio factory.");
328+
if (!factory) {
329+
return nullptr;
330+
}
329331

330332
// Create radio configuration. Assume 1 sector per stream.
331333
radio_configuration::radio radio_config = generate_radio_config(config, factory->get_configuration_validator());

apps/gnb/gnb_appconfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ struct amplitude_control_appconfig {
104104

105105
/// Base cell configuration.
106106
struct base_cell_appconfig {
107+
/// Physical cell identifier.
108+
pci_t pci = 1;
107109
/// Downlink arfcn.
108110
unsigned dl_arfcn = 536020;
109111
/// NR band.
@@ -132,8 +134,6 @@ struct base_cell_appconfig {
132134

133135
/// Cell configuration
134136
struct cell_appconfig {
135-
/// Physical cell identifier.
136-
pci_t pci = 1;
137137
/// Cell configuration.
138138
base_cell_appconfig cell;
139139
};

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ static void configure_cli11_amplitude_control_args(CLI::App& app, amplitude_cont
233233

234234
static void configure_cli11_common_cell_args(CLI::App& app, base_cell_appconfig& cell_params)
235235
{
236+
app.add_option("--pci", cell_params.pci, "PCI")->capture_default_str()->check(CLI::Range(0, 1007));
236237
app.add_option("--dl_arfcn", cell_params.dl_arfcn, "Donwlink ARFCN")->capture_default_str();
237238
add_auto_enum_option(app, "--band", cell_params.band, "NR band");
238239
app.add_option("--common_scs", cell_params.common_scs, "Cell common subcarrier spacing")
@@ -306,7 +307,6 @@ static void configure_cli11_common_cell_args(CLI::App& app, base_cell_appconfig&
306307

307308
static void configure_cli11_cells_args(CLI::App& app, cell_appconfig& cell_params)
308309
{
309-
app.add_option("--pci", cell_params.pci, "PCI")->capture_default_str()->check(CLI::Range(0, 1007));
310310
configure_cli11_common_cell_args(app, cell_params.cell);
311311
}
312312

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ std::vector<du_cell_config> srsran::generate_du_cell_config(const gnb_appconfig&
3333
for (const auto& cell : config.cells_cfg) {
3434
cell_config_builder_params param;
3535
const base_cell_appconfig& base_cell = cell.cell;
36-
param.pci = cell.pci;
36+
param.pci = base_cell.pci;
3737
param.scs_common = base_cell.common_scs;
3838
param.channel_bw_mhz = base_cell.channel_bw_mhz;
3939
param.dl_arfcn = base_cell.dl_arfcn;
@@ -49,7 +49,7 @@ std::vector<du_cell_config> srsran::generate_du_cell_config(const gnb_appconfig&
4949
base_cell.dl_arfcn, *param.band, nof_crbs, base_cell.common_scs, base_cell.common_scs, ss0_idx);
5050

5151
if (!ssb_freq_loc.has_value()) {
52-
report_error("Unable to derive a valid SSB pointA and k_SSB for cell id ({}).\n", cell.pci);
52+
report_error("Unable to derive a valid SSB pointA and k_SSB for cell id ({}).\n", base_cell.pci);
5353
}
5454

5555
srslog::basic_logger& logger = srslog::fetch_basic_logger("GNB", false);
@@ -65,7 +65,7 @@ std::vector<du_cell_config> srsran::generate_du_cell_config(const gnb_appconfig&
6565
logger.info(
6666
"SSB derived parameters for cell: {}, band: {}, dl_arfcn:{}, crbs: {} scs:{}, ssb_scs:{}:\n\t - SSB offset "
6767
"pointA:{} \n\t - k_SSB:{} \n\t - SSB arfcn:{} \n\t - Coreset index:{} \n\t - Searchspace index:{}",
68-
cell.pci,
68+
base_cell.pci,
6969
base_cell.band,
7070
base_cell.dl_arfcn,
7171
nof_crbs,

apps/gnb/gnb_appconfig_validators.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ static bool validate_dl_arfcn_and_band(const base_cell_appconfig& config)
104104
/// Validates the given cell application configuration. Returns true on success, otherwise false.
105105
static bool validate_base_cell_appconfig(const base_cell_appconfig& config)
106106
{
107+
if (config.pci > 1007) {
108+
fmt::print("Invalid PCI (i.e. {}). PCI ranges from 0 to {}.\n", config.pci, MAX_PCI);
109+
return false;
110+
}
107111
if (config.nof_antennas_dl == 0) {
108112
fmt::print("The number of DL antennas cannot be zero.");
109113
return false;
@@ -156,11 +160,6 @@ static bool validate_base_cell_appconfig(const base_cell_appconfig& config)
156160

157161
static bool validate_cells_appconfig(const cell_appconfig& config)
158162
{
159-
if (config.pci > 1007) {
160-
fmt::print("Invalid PCI (i.e. {}). PCI ranges from 0 to {}.\n", config.pci, MAX_PCI);
161-
return false;
162-
}
163-
164163
return validate_base_cell_appconfig(config.cell);
165164
}
166165

apps/gnb/helpers/gnb_console_helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
*/
2222

2323
#include "gnb_console_helper.h"
24+
#include "string_helpers.h"
2425
#include "srsran/radio/radio_factory.h"
2526
#include "srsran/ran/band_helper.h"
2627
#include "srsran/ran/bs_channel_bandwidth.h"
2728
#include "srsran/support/build_info/build_info.h"
28-
#include "string_helpers.h"
2929
#include <fcntl.h>
3030
#include <list>
3131
#include <signal.h>

include/srsran/adt/slotted_array.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#pragma once
2424

2525
#include "span.h"
26-
#include "srsran/support/srsran_assert.h"
2726
#include "tiny_optional.h"
27+
#include "srsran/support/srsran_assert.h"
2828
#include <array>
2929

3030
/// \file Definitions of slotted_array<T, N>, slotted_vector<T> used to manage containers with optional elements. All

include/srsran/adt/unique_function.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class empty_table_t final : public oper_table_t<R, Args...>
6868
constexpr empty_table_t() = default;
6969
R call(void* src, Args... args) const override
7070
{
71-
srsgnb_terminate("bad function call (cause: function ptr is empty)");
71+
srsran_terminate("bad function call (cause: function ptr is empty)");
7272
}
7373
void move(void* src, void* dest) const override {}
7474
void dtor(void* src) const override {}

0 commit comments

Comments
 (0)