Control Slice Customized SM
Overview
A slice control xApp, utilizing the custom service model SLICE SM, is developed to manage and control slices within E2-Nodes. It offers support for three distinct action types: 1) adding/modifying slices, 2) associating UE's slice, and 3) deleting slices. This enables the creation of tailored slice control messages by populating various parameters with the appropriate slicing algorithm.
It includes the following stages:
- Init: initializes xApp based on configuration to set up the E42 connection with NearRT-RIC
- xApp Logic: creates customized control message
- Control Service: sends control request to each E2-Node
- Exit: terminates xApp
Sequence Diagram
Detail
source code: link
Init - Step 2 to 6
- Used Functions
xApp Logic - Step 7
Develop your xApp logic to generate the customized control message based on the given action type.
For example, utilize the function fill_slice_sm_ctrl_req()
below to generate a customized control message,
filling the necessary parameters according to the slice_ctrl_msg_t
structure.
fill_slice_sm_ctrl_req()
-
Input
Parameter Type in C Comment ran_func_id
uint16_t
Specific RAN Function id to perform control service. type
slice_ctrl_msg_e
Action types of slice (e.g. SLICE_CTRL_SM_V0_ADD
,SLICE_CTRL_SM_V0_DEL
, andSLICE_CTRL_SM_V0_UE_SLICE_ASSOC
)
Note: Different action types require specific input parameters. For instance,
SLICE_CTRL_SM_V0_ADD
uses theslice_conf_t
structure,SLICE_CTRL_SM_V0_UE_SLICE_ASSOC
utilizes theue_slice_conf_t
structure, andSLICE_CTRL_SM_V0_DEL
is based on thedel_slice_conf_t
structure.
-
Output
Parameter Type in Python Comment ctrl_msg
sm_ag_if_wr_t
Control message using SLICE SM -
Example - Add/Modify Slice
uint16_t ran_func_id = SM_SLICE_ID;
sm_ag_if_wr_t ctrl_msg = fill_slice_sm_ctrl_req(ran_func_id, SLICE_CTRL_SM_V0_ADD);
- Example - Associate UE's Slice
uint16_t ran_func_id = SM_SLICE_ID;
sm_ag_if_wr_t ctrl_msg = fill_slice_sm_ctrl_req(ran_func_id, cLICE_CTRL_SM_V0_UE_SLICE_ASSOC);
- Example - Delete Slice
uint16_t ran_func_id = SM_SLICE_ID;
sm_ag_if_wr_t ctrl_msg = fill_slice_sm_ctrl_req(ran_func_id, SLICE_CTRL_SM_V0_DEL);
- Example -
fill_slice_sm_ctrl_req()
static sm_ag_if_wr_t fill_slice_sm_ctrl_req(uint16_t ran_func_id, slice_ctrl_msg_e type)
{
// Check the RAN function's ID is the same as SLICE RAN function's ID
assert(ran_func_id == 145);
// Define the type for slice control message
sm_ag_if_wr_t wr = {.type = CONTROL_SM_AG_IF_WR };
wr.ctrl.type = SLICE_CTRL_REQ_V0;
wr.ctrl.slice_req_ctrl.hdr.dummy = 0;
if (type == SLICE_CTRL_SM_V0_ADD) {
wr.ctrl.slice_req_ctrl.msg.type = SLICE_CTRL_SM_V0_ADD;
// Generate the control message based on slice_conf_t
fill_add_mod_slice(&wr.ctrl.slice_req_ctrl.msg.u.add_mod_slice);
} else if (type == SLICE_CTRL_SM_V0_DEL) {
wr.ctrl.slice_req_ctrl.msg.type = SLICE_CTRL_SM_V0_DEL;
// Generate the control message based on del_slice_conf_t
fill_del_slice(&wr.ctrl.slice_req_ctrl.msg.u.del_slice);
} else if (type == SLICE_CTRL_SM_V0_UE_SLICE_ASSOC) {
wr.ctrl.slice_req_ctrl.msg.type = SLICE_CTRL_SM_V0_UE_SLICE_ASSOC;
// Generate the control message based on ue_slice_conf_t
fill_assoc_ue_slice(&wr.ctrl.slice_req_ctrl.msg.u.ue_slice);
} else {
assert(0 != 0 && "Unknown slice ctrl type");
}
return wr;
}
Control Service - Step 8 to 12
- Used function
Exit - Step 13 to 14
- Used function