|
| 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 | +#include "cu_cp_log_unit_config.h" |
| 14 | +#include "srsran/adt/optional.h" |
| 15 | +#include "srsran/ran/gnb_id.h" |
| 16 | +#include "srsran/ran/nr_band.h" |
| 17 | +#include "srsran/ran/pci.h" |
| 18 | +#include <vector> |
| 19 | + |
| 20 | +namespace srsran { |
| 21 | + |
| 22 | +/// Report configuration, for now only supporting the A3 event. |
| 23 | +struct cu_cp_report_unit_config { |
| 24 | + unsigned report_cfg_id; |
| 25 | + std::string report_type; |
| 26 | + optional<unsigned> report_interval_ms; |
| 27 | + std::string a3_report_type; |
| 28 | + optional<int> a3_offset_db; ///< [-30..30] Note the actual value is field value * 0.5 dB. E.g. putting a value of -6 |
| 29 | + ///< here results in -3dB offset. |
| 30 | + optional<unsigned> a3_hysteresis_db; |
| 31 | + optional<unsigned> a3_time_to_trigger_ms; |
| 32 | +}; |
| 33 | + |
| 34 | +struct cu_cp_neighbor_cell_unit_config_item { |
| 35 | + uint64_t nr_cell_id; ///< Cell id. |
| 36 | + std::vector<uint64_t> report_cfg_ids; ///< Report config ids |
| 37 | +}; |
| 38 | + |
| 39 | +/// Each item describes the relationship between one cell to all other cells. |
| 40 | +struct cu_cp_cell_unit_config_item { |
| 41 | + uint64_t nr_cell_id; ///< Cell id. |
| 42 | + optional<unsigned> periodic_report_cfg_id; |
| 43 | + |
| 44 | + // These parameters must only be set for external cells |
| 45 | + // TODO: Add optional SSB parameters. |
| 46 | + optional<unsigned> gnb_id_bit_length; ///< gNodeB identifier bit length. |
| 47 | + optional<pci_t> pci; ///< PCI. |
| 48 | + optional<nr_band> band; ///< NR band. |
| 49 | + optional<unsigned> ssb_arfcn; ///< SSB ARFCN. |
| 50 | + optional<unsigned> ssb_scs; ///< SSB subcarrier spacing. |
| 51 | + optional<unsigned> ssb_period; ///< SSB period. |
| 52 | + optional<unsigned> ssb_offset; ///< SSB offset. |
| 53 | + optional<unsigned> ssb_duration; ///< SSB duration. |
| 54 | + |
| 55 | + std::vector<cu_cp_neighbor_cell_unit_config_item> ncells; ///< Vector of cells that are a neighbor of this cell. |
| 56 | +}; |
| 57 | + |
| 58 | +/// All mobility related configuration parameters. |
| 59 | +struct mobility_unit_config { |
| 60 | + std::vector<cu_cp_cell_unit_config_item> cells; ///< List of all cells known to the CU-CP. |
| 61 | + std::vector<cu_cp_report_unit_config> report_configs; ///< Report config. |
| 62 | + bool trigger_handover_from_measurements = false; ///< Whether to start HO if neighbor cell measurements arrive. |
| 63 | +}; |
| 64 | + |
| 65 | +/// RRC specific configuration parameters. |
| 66 | +struct rrc_appconfig { |
| 67 | + bool force_reestablishment_fallback = false; |
| 68 | + unsigned rrc_procedure_timeout_ms = 720; ///< Timeout for RRC procedures (2 * default SRB maxRetxThreshold * |
| 69 | + ///< t-PollRetransmit = 2 * 8 * 45ms = 720ms, see TS 38.331 Sec 9.2.1). |
| 70 | +}; |
| 71 | + |
| 72 | +/// Security configuration parameters. |
| 73 | +struct security_unit_config { |
| 74 | + std::string integrity_protection = "not_needed"; |
| 75 | + std::string confidentiality_protection = "required"; |
| 76 | + std::string nea_preference_list = "nea0,nea2,nea1,nea3"; |
| 77 | + std::string nia_preference_list = "nia2,nia1,nia3"; |
| 78 | +}; |
| 79 | + |
| 80 | +/// F1AP-CU configuration parameters. |
| 81 | +struct f1ap_cu_unit_config { |
| 82 | + /// Timeout for the UE context setup procedure in milliseconds. |
| 83 | + unsigned ue_context_setup_timeout = 1000; |
| 84 | +}; |
| 85 | + |
| 86 | +/// CU-CP application configuration. |
| 87 | +struct cu_cp_unit_config { |
| 88 | + // :TODO: not sure if gNB id should be here. |
| 89 | + gnb_id_t gnb_id = {411, 22}; |
| 90 | + // :TODO: AMF should be here too? |
| 91 | + uint16_t max_nof_dus = 6; |
| 92 | + uint16_t max_nof_cu_ups = 6; |
| 93 | + int inactivity_timer = 5; // in seconds |
| 94 | + unsigned pdu_session_setup_timeout = 3; // in seconds (must be larger than T310) |
| 95 | + mobility_unit_config mobility_config; |
| 96 | + rrc_appconfig rrc_config; |
| 97 | + security_unit_config security_config; |
| 98 | + f1ap_cu_unit_config f1ap_config; |
| 99 | + cu_cp_log_unit_config loggers; |
| 100 | +}; |
| 101 | + |
| 102 | +} // namespace srsran |
0 commit comments