|
30 | 30 | #include "flexible_o_du_impl.h" |
31 | 31 | #include "srsran/du/o_du_factory.h" |
32 | 32 | #include "srsran/e2/e2_du_metrics_connector.h" |
| 33 | +#include "srsran/fapi_adaptor/mac/mac_fapi_adaptor.h" |
| 34 | +#include "srsran/fapi_adaptor/mac/mac_fapi_sector_adaptor.h" |
| 35 | +#include "srsran/fapi_adaptor/phy/phy_fapi_adaptor.h" |
| 36 | +#include "srsran/fapi_adaptor/phy/phy_fapi_sector_adaptor.h" |
33 | 37 |
|
34 | 38 | using namespace srsran; |
35 | 39 |
|
@@ -74,16 +78,29 @@ o_du_unit flexible_o_du_factory::create_flexible_o_du(const o_du_unit_dependenci |
74 | 78 |
|
75 | 79 | // Adjust the dependencies. |
76 | 80 | for (unsigned i = 0, e = du_cells.size(); i != e; ++i) { |
77 | | - auto& sector_dependencies = odu_hi_unit_dependencies.o_du_hi_dependencies.sectors.emplace_back(); |
78 | | - sector_dependencies.gateway = &odu_lo_unit.o_du_lo->get_slot_message_gateway(i); |
79 | | - sector_dependencies.last_msg_notifier = &odu_lo_unit.o_du_lo->get_slot_last_message_notifier(i); |
80 | | - sector_dependencies.fapi_executor = config.odu_high_cfg.fapi_cfg.l2_nof_slots_ahead != 0 |
81 | | - ? std::optional(dependencies.workers->fapi_exec[i]) |
82 | | - : std::make_optional<task_executor*>(); |
| 81 | + auto& sector_dependencies = odu_hi_unit_dependencies.o_du_hi_dependencies.sectors.emplace_back(); |
| 82 | + sector_dependencies.gateway = |
| 83 | + &odu_lo_unit.o_du_lo->get_phy_fapi_adaptor().get_sector_adaptor(i).get_slot_message_gateway(); |
| 84 | + sector_dependencies.last_msg_notifier = |
| 85 | + &odu_lo_unit.o_du_lo->get_phy_fapi_adaptor().get_sector_adaptor(i).get_slot_last_message_notifier(); |
| 86 | + sector_dependencies.fapi_executor = config.odu_high_cfg.fapi_cfg.l2_nof_slots_ahead != 0 |
| 87 | + ? std::optional(dependencies.workers->fapi_exec[i]) |
| 88 | + : std::make_optional<task_executor*>(); |
83 | 89 | } |
84 | 90 |
|
85 | 91 | o_du_high_unit odu_hi_unit = make_o_du_high_unit(config.odu_high_cfg, std::move(odu_hi_unit_dependencies)); |
86 | 92 |
|
| 93 | + // Connect the adaptors. |
| 94 | + for (unsigned i = 0, e = du_cells.size(); i != e; ++i) { |
| 95 | + fapi_adaptor::phy_fapi_sector_adaptor& odu_lo = odu_lo_unit.o_du_lo->get_phy_fapi_adaptor().get_sector_adaptor(i); |
| 96 | + fapi_adaptor::mac_fapi_sector_adaptor& odu_hi = odu_hi_unit.o_du_hi->get_mac_fapi_adaptor().get_sector_adaptor(i); |
| 97 | + |
| 98 | + // Connect O-DU low with O-DU high. |
| 99 | + odu_lo.set_slot_time_message_notifier(odu_hi.get_slot_time_message_notifier()); |
| 100 | + odu_lo.set_slot_error_message_notifier(odu_hi.get_slot_error_message_notifier()); |
| 101 | + odu_lo.set_slot_data_message_notifier(odu_hi.get_slot_data_message_notifier()); |
| 102 | + } |
| 103 | + |
87 | 104 | o_du.metrics = std::move(odu_hi_unit.metrics); |
88 | 105 | o_du.commands = std::move(odu_hi_unit.commands); |
89 | 106 |
|
|
0 commit comments