Skip to main content

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


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

    ParameterType in CComment
    ran_func_iduint16_tSpecific RAN Function id to perform control service.
    typeslice_ctrl_msg_eAction types of slice (e.g. SLICE_CTRL_SM_V0_ADD, SLICE_CTRL_SM_V0_DEL, and SLICE_CTRL_SM_V0_UE_SLICE_ASSOC)

Note: Different action types require specific input parameters. For instance, SLICE_CTRL_SM_V0_ADD uses the slice_conf_t structure, SLICE_CTRL_SM_V0_UE_SLICE_ASSOC utilizes the ue_slice_conf_t structure, and SLICE_CTRL_SM_V0_DEL is based on the del_slice_conf_t structure.

  • Output

    ParameterType in PythonComment
    ctrl_msgsm_ag_if_wr_tControl 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


Exit - Step 13 to 14