FlexRAN: send loaded apps/macObjects to RTC
This commit is contained in:
@@ -2059,3 +2059,21 @@ void flexran_agent_mac_inform_delegation(mid_t mod_id,
|
||||
so->dl_handle = h;
|
||||
SLIST_INSERT_HEAD(&flexran_handles[mod_id], so, entries);
|
||||
}
|
||||
|
||||
void flexran_agent_mac_fill_loaded_mac_objects(
|
||||
mid_t mod_id,
|
||||
Protocol__FlexEnbConfigReply *reply) {
|
||||
int n = 0;
|
||||
flexran_agent_so_handle_t *so = NULL;
|
||||
SLIST_FOREACH(so, &flexran_handles[mod_id], entries)
|
||||
++n;
|
||||
reply->n_loadedmacobjects = n;
|
||||
reply->loadedmacobjects = calloc(n, sizeof(char *));
|
||||
if (!reply->loadedmacobjects) {
|
||||
reply->n_loadedmacobjects = 0;
|
||||
return;
|
||||
}
|
||||
n = 0;
|
||||
SLIST_FOREACH(so, &flexran_handles[mod_id], entries)
|
||||
reply->loadedmacobjects[n++] = so->name;
|
||||
}
|
||||
|
||||
@@ -139,4 +139,9 @@ void flexran_agent_destroy_mac_slice_config(Protocol__FlexCellConfig *conf);
|
||||
void flexran_agent_mac_inform_delegation(mid_t mod_id,
|
||||
Protocol__FlexControlDelegation *cdm);
|
||||
|
||||
/* fill the enb_config_reply with the shared objects in use by the MAC sublayer */
|
||||
void flexran_agent_mac_fill_loaded_mac_objects(
|
||||
mid_t mod_id,
|
||||
Protocol__FlexEnbConfigReply *reply);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -159,6 +159,8 @@ message flex_enb_config_reply {
|
||||
repeated flex_cell_config cell_config = 3;
|
||||
optional uint32 device_spec = 4;
|
||||
optional flex_s1ap_config s1ap = 5;
|
||||
repeated string loadedApps = 6;
|
||||
repeated string loadedMacObjects = 7;
|
||||
}
|
||||
|
||||
message flex_ue_config_request {
|
||||
|
||||
@@ -188,3 +188,20 @@ void flexran_agent_handle_apps(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void flexran_agent_fill_loaded_apps(mid_t mod_id,
|
||||
Protocol__FlexEnbConfigReply *reply) {
|
||||
int n = 0;
|
||||
flexran_agent_app_internal_t *so = NULL;
|
||||
SLIST_FOREACH(so, &flexran_apps[mod_id], entries)
|
||||
++n;
|
||||
reply->n_loadedapps = n;
|
||||
reply->loadedapps = calloc(n, sizeof(char *));
|
||||
if (!reply->loadedapps) {
|
||||
reply->n_loadedapps = 0;
|
||||
return;
|
||||
}
|
||||
n = 0;
|
||||
SLIST_FOREACH(so, &flexran_apps[mod_id], entries)
|
||||
reply->loadedapps[n++] = so->name;
|
||||
}
|
||||
|
||||
@@ -67,4 +67,8 @@ void flexran_agent_handle_apps(
|
||||
Protocol__FlexAgentReconfigurationSubsystem **subs,
|
||||
int n_subs);
|
||||
|
||||
/* Fills the enb_config_reply with the currently loaded (started) apps */
|
||||
void flexran_agent_fill_loaded_apps(mid_t mod_id,
|
||||
Protocol__FlexEnbConfigReply *reply);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -330,6 +330,12 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
|
||||
if (reply->s1ap)
|
||||
flexran_agent_free_s1ap_cell_config(&reply->s1ap);
|
||||
|
||||
if (reply->loadedapps)
|
||||
free(reply->loadedapps);
|
||||
|
||||
if (reply->loadedmacobjects)
|
||||
free(reply->loadedmacobjects);
|
||||
|
||||
free(reply->cell_config);
|
||||
free(reply);
|
||||
free(msg);
|
||||
@@ -836,6 +842,10 @@ int flexran_agent_enb_config_reply(mid_t mod_id, const void *params, Protocol__F
|
||||
if (flexran_agent_get_s1ap_xface(mod_id))
|
||||
flexran_agent_fill_s1ap_cell_config(mod_id, &enb_config_reply_msg->s1ap);
|
||||
|
||||
flexran_agent_fill_loaded_apps(mod_id, enb_config_reply_msg);
|
||||
|
||||
flexran_agent_mac_fill_loaded_mac_objects(mod_id, enb_config_reply_msg);
|
||||
|
||||
*msg = malloc(sizeof(Protocol__FlexranMessage));
|
||||
|
||||
if(*msg == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user