Skip to main content

Single variable

This is the simplest xApp from BubbleRAN's collection. It starts passing the configuration file path in python xapp.init.

import sys
import xapp_usr_sdk as xapp

xapp.init(sys.argv)
nodes = xapp.e2_nodes(xapp.MONITOR_USE_CASE_e)

v = xapp.mntr(nodes[0].node, xapp.PDCP_SDU_VOLUME_DL)
print("Value " + str(v))

A typical configuration file looks like the following:

xapp:
ip_ric: 127.0.0.1
e42_port: 36422
# IP to bind SCTP client
# Needs to be in the range of
# ip_ric. It is the interface
# from ifconfig cmd
ip_xapp: 127.0.0.1
sm_dir: /usr/local/lib/flexric/
log: 2
# trace: 0
# debug: 1
# info: 2
# warn: 3
# error: 4
# fatal: 5
# e.g., level = 2 -> level = info
# Comment the database section
# if no database is needed/used
db:
ip: 127.0.0.1
dir: /tmp/
filename: testdb
usr: xapp
psw: BubbleRAN
# Commands for setting up mysql
# $ sudo mysql
# $ mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
# $ mysql> grant all privileges on *.* to 'username'@'localhost';
# $ mysql> exit
  • ip_ric: This is the IP address where the MX RIC is listening.
  • e42_port: This is the port where MX RIC is listening.
  • ip_xapp: This is the IP address from the xApp. It is the IP address that the SDK will use to communicate with MX RIC.
  • log: Logginig level of the SDK. Range from [0,5] close range accepted.
  • db: If the xapp SDK is provided with a database, it's information needs to be specified here.

It then calls the function xapp.e2_nodes(xapp.MONITOR_USE_CASE_e) to collect the amount of connected E2 Nodes. Lastly, it calls v = xapp.mntr(nodes[0].node, xapp.PDCP_SDU_VOLUME_DL) to receive the value of the PDCP_SDU_VOLUME_DL from node[0] and prints the value.

The messages that flow between the xApp, MX RIC, E2 Agent and DB can be seen in the following diagram.

alt text

The E2 Node (remember that the E2 Node is embeded in your RAN e.g., gNB) tries to connect to the MX RIC sending the E2 Setup Request message until it receives an E2 Setup Response from the MX RIC. From that momment onwards, the E2 Node and the MX RIC are connected. Afterward, the xApp sends an E42 Setup Request to the MX RIC that responds with an E42 Setup Request Response. At that moment, the xApp and the MX RIC are connected. This step happens when the xapp.init(sys.argv) is executed. In the next step, the xApp sends an E42 Subscription Request message that is forwarded as an E2 Subscription Request to the E2 Node. The E2 Node responds with an E2 Subscription Response that is converted into an E42 Subscription Response before arriving into the xApp. From that moment on, once the periodicity is timeouted, an E2 Indication message is generated and forwarded to the xApp and the DB. Since in this example only a variable one time is requested, after the first E2 Indication message arrives, an E42 Subscription Delete is sent from the xApp to the E2 Node and waits for the response. All of the described messages happen in the line v = xapp.mntr(nodes[0].node, xapp.PDCP_SDU_VOLUME_DL) Lastly, the value is copied into the variable v .

Note: Even with all the messages involved, the latency is less than 2 ms in a BubbleRAN machine.