Store U-plane related info from xml
- interface name, - TX/RX carrier names, and - TX/RX endpoint names
This commit is contained in:
@@ -170,6 +170,10 @@ bool manage_ru(ru_session_t *ru_session, const openair0_config_t *oai, const siz
|
||||
success = get_config_for_xran(operational_ds, max_num_ant, &ru_session->xran_mplane);
|
||||
AssertError(success, return false, "[MPLANE] Unable to retrieve required info for xran from RU \"%s\".\n", ru_session->ru_ip_add);
|
||||
|
||||
// save the U-plane info
|
||||
success = get_uplane_info(operational_ds, &ru_session->ru_mplane_config);
|
||||
AssertError(success, return false, "[MPLANE] Unable to get U-plane info from RU operational datastore.\n");
|
||||
|
||||
free(operational_ds);
|
||||
free(watchdog_answer);
|
||||
|
||||
|
||||
@@ -125,3 +125,33 @@ bool get_config_for_xran(const char *buffer, const int max_num_ant, xran_mplane_
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool get_uplane_info(const char *buffer, ru_mplane_config_t *ru_mplane_config)
|
||||
{
|
||||
// Interface name
|
||||
ru_mplane_config->interface_name = get_ru_xml_node(buffer, "interface");
|
||||
|
||||
// PDSCH
|
||||
uplane_info_t *tx_end = &ru_mplane_config->tx_endpoints;
|
||||
get_ru_xml_list(buffer, "static-low-level-tx-endpoints", &tx_end->name, &tx_end->num);
|
||||
AssertError(tx_end->name != NULL, return false, "[MPLANE] Cannot get TX endpoint names.\n");
|
||||
|
||||
// TX carriers
|
||||
uplane_info_t *tx_carriers = &ru_mplane_config->tx_carriers;
|
||||
get_ru_xml_list(buffer, "tx-arrays", &tx_carriers->name, &tx_carriers->num);
|
||||
AssertError(tx_carriers->name != NULL, return false, "[MPLANE] Cannot get TX carrier names.\n");
|
||||
|
||||
// PUSCH and PRACH
|
||||
uplane_info_t *rx_end = &ru_mplane_config->rx_endpoints;
|
||||
get_ru_xml_list(buffer, "static-low-level-rx-endpoints", &rx_end->name, &rx_end->num);
|
||||
AssertError(rx_end->name != NULL, return false, "[MPLANE] Cannot get RX endpoint names.\n");
|
||||
|
||||
// RX carriers
|
||||
uplane_info_t *rx_carriers = &ru_mplane_config->rx_carriers;
|
||||
get_ru_xml_list(buffer, "rx-arrays", &rx_carriers->name, &rx_carriers->num);
|
||||
AssertError(rx_carriers->name != NULL, return false, "[MPLANE] Cannot get RX carrier names.\n");
|
||||
|
||||
MP_LOG_I("Successfully retrieved all the U-plane info - interface name, TX/RX carrier names, and TX/RX endpoint names.\n");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -94,4 +94,6 @@ typedef struct {
|
||||
|
||||
bool get_config_for_xran(const char *buffer, const int max_num_ant, xran_mplane_t *xran_mplane);
|
||||
|
||||
bool get_uplane_info(const char *buffer, ru_mplane_config_t *ru_mplane_config);
|
||||
|
||||
#endif /* RU_MPLANE_API_H */
|
||||
|
||||
Reference in New Issue
Block a user