Skip to content

Commit 79f67d7

Browse files
AlaiaLcodebot
authored andcommitted
apps: added the application_unit interface
1 parent d82b495 commit 79f67d7

20 files changed

+47
-8
lines changed

apps/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
add_subdirectory(examples)
1010
add_subdirectory(gnb)
11-
add_subdirectory(modules)
11+
add_subdirectory(units)
1212
add_subdirectory(services)

apps/gnb/gnb.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include "apps/services/metrics_hub.h"
4545
#include "apps/services/rlc_metrics_plotter_json.h"
4646

47-
#include "apps/modules/flexible_du/split_ru_dynamic/dynamic_du_factory.h"
47+
#include "apps/units/flexible_du/split_ru_dynamic/dynamic_du_factory.h"
4848
#include "srsran/phy/upper/upper_phy_timing_notifier.h"
4949

5050
#include "srsran/ru/ru_adapters.h"
@@ -59,12 +59,12 @@
5959

6060
#include <atomic>
6161

62-
#include "../modules/cu_cp/logger_registrator.h"
63-
#include "../modules/cu_cp/pcap_factory.h"
64-
#include "../modules/cu_up/logger_registrator.h"
65-
#include "../modules/cu_up/pcap_factory.h"
66-
#include "../modules/flexible_du/du_high/pcap_factory.h"
67-
#include "../modules/flexible_du/split_ru_dynamic/logger_registrator.h"
62+
#include "../units/cu_cp/logger_registrator.h"
63+
#include "../units/cu_cp/pcap_factory.h"
64+
#include "../units/cu_up/logger_registrator.h"
65+
#include "../units/cu_up/pcap_factory.h"
66+
#include "../units/flexible_du/du_high/pcap_factory.h"
67+
#include "../units/flexible_du/split_ru_dynamic/logger_registrator.h"
6868

6969
#ifdef DPDK_FOUND
7070
#include "srsran/hal/dpdk/dpdk_eal_factory.h"
File renamed without changes.

apps/units/application_unit.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
*
3+
* Copyright 2021-2024 Software Radio Systems Limited
4+
*
5+
* By using this file, you agree to the terms and conditions set
6+
* forth in the LICENSE file which can be found at the top level of
7+
* the distribution.
8+
*
9+
*/
10+
11+
#pragma once
12+
13+
namespace CLI {
14+
class App;
15+
} // namespace CLI
16+
17+
namespace srsran {
18+
19+
/// \brief Application unit interface.
20+
///
21+
/// An application unit object is the most basic building block used by an application. Possible implementations of this
22+
/// object can be a CU or DU. The application must register the unit capabilities in its services, so it can use them.
23+
/// An application is composed of 1 or more units.
24+
class application_unit
25+
{
26+
public:
27+
virtual ~application_unit() = default;
28+
29+
/// Registers the parsing configuration properties that will be used by this application unit.
30+
virtual void on_parsing_configuration_registration(CLI::App& app) = 0;
31+
32+
/// Validates the configuration of this application unit. Returns true on success, otherwise false.
33+
virtual bool on_configuration_validation() const = 0;
34+
35+
/// Registers the loggers of this application unit.
36+
virtual void on_loggers_registration() = 0;
37+
};
38+
39+
} // namespace srsran
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)