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: xapp_slice_ctrl.go


Init - Step 2 to 5


xApp Logic - Step 6

Develop your xApp logic to generate the customized control message based on the given action type. For example, utilize the function FillSliceCtrlMsg() below to generate a customized control message, filling the necessary parameters according to the slice_ctrl_msg_t structure.

FillSliceCtrlMsg()

  • Input

    ParameterType in GoComment
    act_typestringAction types of slice (e.g., ADDMOD, ASSOC_UE_SLICE, and DEL)
    paramRequestRequired parameters to create customized control message

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

  • Output

    ParameterType in GoType in Swig Wrapper C++Comment
    msgxapp_sdk.SwigcptrSlice_ctrl_msg_tslice_ctrl_msg_tControl message using SLICE SM
  • Example - Add/Modify Slice

// Define action type
act_type := "ADDMOD"

// Define required parameters based on slice_conf_t
add_slice_parameters := Request{
NumSlices: 2,
SliceSchedAlgo: "NVS",
Slices: []Slice{
{
Id: 0,
Label: "s1",
UeSchedAlgo: "PF",
Type: "SLICE_SM_NVS_V0_CAPACITY",
SliceAlgoParams: SliceAlgoParams{PctRsvd: 0.5},
},
{
Id: 2,
Label: "idle",
UeSchedAlgo: "PF",
Type: "SLICE_SM_NVS_V0_CAPACITY",
SliceAlgoParams: SliceAlgoParams{PctRsvd: 0.05},
},
},
}

// Generate control message
msg := FillSliceCtrlMsg(act_type, add_slice_parameters)
  • Example - Associate UE's Slice
// Define action type
act_type = "ASSPC_UE_SLICE"

// Define required parameters based on ue_slice_conf_t
assoc_slice_parameter := Request{
NumUes: 1,
Ues: []Ue{
{
Rnti: 0x1234,
AssocDlSliceId: 2,
},
},
}

// Generate control message
msg := FillSliceCtrlMsg(act_type, assoc_slice_parameter)
  • Example - Delete Slice
// Define action type
act_type = "DEL"

// Define required parameters based on del_slice_conf_t
delete_slice_parameter := Request{
NumDlSlices: 1,
DeleteDlSliceId: []int{2},
}

// Generate control message
msg := FillSliceCtrlMsg(act_type, delete_slice_parameter)

Control Service - Step 7 to 11


Exit - Step 12