diff --git a/openair2/ENB_APP/flexran_agent_common.c b/openair2/ENB_APP/flexran_agent_common.c index 1cbf411c650045a3aff84d9cc0facf4c5faf79fe..d08517edeab51b601fecbf2fc314e23acfa00c85 100644 --- a/openair2/ENB_APP/flexran_agent_common.c +++ b/openair2/ENB_APP/flexran_agent_common.c @@ -1123,3 +1123,16 @@ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void *params, Prot *msg = NULL; return 0; } + +int flexran_agent_handle_ue_config_reply(mid_t mod_id, const void *params, Protocol__FlexranMessage **msg) +{ + int i; + Protocol__FlexranMessage *input = (Protocol__FlexranMessage *)params; + Protocol__FlexUeConfigReply *ue_config_reply = input->ue_config_reply_msg; + + for (i = 0; i < ue_config_reply->n_ue_config; i++) + prepare_ue_slice_assoc_update(mod_id, ue_config_reply->ue_config[i]); + + *msg = NULL; + return 0; +} diff --git a/openair2/ENB_APP/flexran_agent_common.h b/openair2/ENB_APP/flexran_agent_common.h index 2738a2f3d325485a1fc29a9b78e97bda7d764081..5d78e382d43b59adf93417569be8d1ec90f58850 100644 --- a/openair2/ENB_APP/flexran_agent_common.h +++ b/openair2/ENB_APP/flexran_agent_common.h @@ -174,4 +174,12 @@ err_code_t flexran_agent_disable_cont_stats_update(mid_t mod_id); * issue another eNB config request message. */ int flexran_agent_handle_enb_config_reply(mid_t mod_id, const void* params, Protocol__FlexranMessage **msg); +/* Handle a received UE config reply message as an "order" to reconfigure the + * association of a UE to a slice. It does not come as a reconfiguration + * message as this is a "structured" ProtoBuf message (as opposed to + * "unstructured" YAML). There is no destructor since we do not reply to this + * message (yet). Instead, the controller has to issue another eNB config + * request message. */ +int flexran_agent_handle_ue_config_reply(mid_t mod_id, const void* params, Protocol__FlexranMessage **msg); + #endif diff --git a/openair2/ENB_APP/flexran_agent_handler.c b/openair2/ENB_APP/flexran_agent_handler.c index b3025bf769df4c00bc880b22b52437b39794b699..fa3270696a0095ce75e3229eff8f684312fbe765 100644 --- a/openair2/ENB_APP/flexran_agent_handler.c +++ b/openair2/ENB_APP/flexran_agent_handler.c @@ -48,7 +48,7 @@ flexran_agent_message_decoded_callback agent_messages_callback[][3] = { {flexran_agent_enb_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REQUEST_MSG*/ {flexran_agent_handle_enb_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_ENB_CONFIG_REPLY_MSG*/ {flexran_agent_ue_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REQUEST_MSG*/ - {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/ + {flexran_agent_handle_ue_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_UE_CONFIG_REPLY_MSG*/ {flexran_agent_lc_config_reply, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REQUEST_MSG*/ {0, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_LC_CONFIG_REPLY_MSG*/ {flexran_agent_mac_handle_dl_mac_config, 0, 0}, /*PROTOCOL__FLEXRAN_MESSAGE__MSG_DL_MAC_CONFIG_MSG*/