Bandwidth Part
This xApp example changes the bandwidth part. At the moment this xApp only works in Amarisoft. The first part of the xApp is equal to the previous xApps, and thus, it is recommended to the reader to get familiar first with the previous examples.
import sys
import xapp_usr_sdk as xapp
xapp.init(sys.argv)
nodes = xapp.e2_nodes(xapp.BWP_USE_CASE_e)
assert(len(nodes) > 0 and "Needed at least one E2 node to change bwp")
n = nodes[0].node
cell = nodes[0].cell[0]
start_rb = 0
number_rb = 10
xapp.bandwidth_part(n, cell,xapp.DL_BWP_CONTEXT_SDK, start_rb, number_rb)
In the second part i.e.,
n = nodes[0].node
cell = nodes[0].cell[0]
start_rb = 0
number_rb = 10
xapp.bandwidth_part(n, cell, xapp.DL_BWP_CONTEXT_SDK, start_rb, number_rb)
the E2 Node, the cell, as well as the starting Resource Block (RB) and the number of RBs is selected and the xapp.bandwidth_part(n, cell, xapp.DL_BWP_CONTEXT_SDK, start_rb, number_rb)
in downlink is called.