Skip to content

1. RC Subscription Response

1.1 RcXappSubscriptionResponsePublisherPubData

The XappRcSubscriptionResponsePublisherPubData defines the structure of the response to an RC (Radio Connection) subscription request between the E2 nodes and the RAN Intelligent Controller (RIC) over the E2 interface.

This response message informs the RIC whether the subscription request for monitoring radio connections was successfully processed by the E2 node.

It includes details such as whether the subscription setup was successful or if any errors occurred during the process.

1.2 Examples

Info

To receive a RC Subscription response, the following NATS subject must be used:

e2-t.E2SM-RANCTL-SUBSCRIPTION-RESP
This subject is responsible for sending the RC subscription message.

The following Python example demonstrates how to receive an RC subscription response:

Example

Receive RC Subscription Response example:

# Add Accelleran xapp library
from xapp_lib import xapp_lib
# Add protobuf definitions
from xapp_lib.proto_pb2.accelleran.e2 import genXappRc_pb2
# Add function to serialize json dict in protobuf
from google.protobuf.json_format import ParseDict

def e2sm_rc_subscription_resp(encoded_data):
    data = genXappRc_pb2.XappRcSubscriptionResponsePublisherPubData()
    data.ParseFromString(encoded_data)
    return data.E2smBaseSubscriptionResponseData

msgList = [
    ("E2SM-RANCTL-SUBSCRIPTION-RESP", e2sm_rc_subscription_resp),
]

def get_subject_list(req_id, ins_id):
    subjects = []
    for msg in msgList:
        subjects.append(
            "e2-t."
            + msg[0]
            + ".RIC_REQUESTOR="
            + str(req_id)
            + ".RIC_INSTANCE="
            + str(ins_id)
        )
    return subjects

def decoder(subject, encoded_data):
    item = [item for item in msgList if item[0] == subject and item[1] != None]
    if not item:
        logging.error(f"Subject not supported: {subject}. Cannot decode the message.")
        return None
    return dict(item)[subject](encoded_data)

def extract_subject(input_string):
    components = input_string.split(".")
    for component in components:
        for subject, _ in msgList:
            if subject in component:
                return subject
    return None

def main():

    ### Use xApp Builder to create the xApp
    builder = xapp_lib.XAppBuilder("../..", absolute=False)
    builder.metadata("core/xapp_metadata.json")
    builder.endpoints("config/xapp_endpoints.json")
    builder.config("config/xapp_config.json")
    builder.readme("README.md")
    xapp = builder.build()

    # Get xApp request id
    req_id = xapp.id
    # Get xApp instance id
    node_a_ins_id = xapp.transaction_id_gen.get()

    # Listen for E2 Subscription responses
    e2_node_a_subjects = get_subject_list(req_id, node_a_ins_id)
    xapp.nats(endpoint="NATS_URL_5G").subscribe(e2_node_a_subjects)

    # Reception of E2 subscription response
    for _ in range(10):
        data = xapp.nats().recv_data()
        subject = extract_subject(data[0])
        decoded_resp = decoder(subject, data[1])
        logging.info("Received message: {data}".format(data=decoded_resp))

1.3 Schema

This section provides the json schema for the E2 RC Subscription Response, which outlines the expected structure and data types.

E2 RC Subscription Response schema
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$ref": "#/definitions/RcXappSubscriptionResponsePublisherPubData",
    "definitions": {
        "PBE2apMsgData.E2smBaseSubscriptionResponseData": {
            "properties": {
                "RequestId": {
                    "$ref": "#/definitions/PBE2apMsgData.RicRequestId",
                    "additionalProperties": true
                },
                "RanFunctionName": {
                    "type": "string"
                },
                "RanFunctionId": {
                    "type": "integer"
                },
                "RcNodeId": {
                    "$ref": "#/definitions/PBE2apMsgData.GlobalE2NodeId",
                    "additionalProperties": true
                },
                "RicActionsAdmitted": {
                    "$ref": "#/definitions/PBE2apMsgData.RicActionIdList",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "E 2 Sm Base Subscription Response Data"
        },
        "PBE2apMsgData.GlobalE2NodeId": {
            "properties": {
                "GlobalGnbId": {
                    "$ref": "#/definitions/PBE2apMsgData.GlobalGnbId",
                    "additionalProperties": true
                },
                "OptionalGnbCuUpId": {
                    "type": "string"
                },
                "OptionalGnbDuId": {
                    "type": "string"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Global E 2 Node Id",
            "description": "*O-RAN.WG3.E2AP-v02.00 9.2.6 Global E2 Node ID"
        },
        "PBE2apMsgData.GlobalGnbId": {
            "properties": {
                "PlmnIdentity": {
                    "$ref": "#/definitions/PBE2apMsgData.PlmnIdentity",
                    "additionalProperties": true
                },
                "GnbId": {
                    "$ref": "#/definitions/PBE2apMsgData.GnbId",
                    "additionalProperties": true
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Global Gnb Id"
        },
        "PBE2apMsgData.GnbId": {
            "properties": {
                "Value": {
                    "type": "integer"
                },
                "Length": {
                    "type": "integer",
                    "description": "Number of bits used in the gnbId. This may vary from 22 to 32"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Gnb Id"
        },
        "PBE2apMsgData.PlmnIdentity": {
            "properties": {
                "Data": {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Plmn Identity",
            "description": "*O-RAN.WG3.E2SM-R003-v03.00 6.2.3.1 PLMN Identity"
        },
        "PBE2apMsgData.RicActionIdList": {
            "properties": {
                "items": {
                    "items": {
                        "type": "integer"
                    },
                    "type": "array",
                    "description": "Carries max MAX_OF_RIC_ACTION_ID elements of type uint32"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Ric Action Id List"
        },
        "PBE2apMsgData.RicRequestId": {
            "properties": {
                "RicRequestorId": {
                    "type": "integer"
                },
                "RicInstanceId": {
                    "type": "integer"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Ric Request Id"
        },
        "RcXappSubscriptionResponsePublisherPubData": {
            "properties": {
                "E2smBaseSubscriptionResponseData": {
                    "$ref": "#/definitions/PBE2apMsgData.E2smBaseSubscriptionResponseData",
                    "additionalProperties": true,
                    "description": "See E2smBaseSubscriptionResponseData for detailed description of this field"
                },
                "tlpublishTime": {
                    "type": "string",
                    "description": "Contains the time of publishing in EPOCH milliseconds"
                },
                "spanContext": {
                    "type": "string",
                    "description": "Contains an opentracing spancontext",
                    "format": "binary",
                    "binaryEncoding": "base64"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Rc Xapp Subscription Response Publisher Pub Data",
            "description": "* Publisher : RcXappSubscriptionResponsePublisher Topic : E2SM-RANCTL-SUBSCRIPTION-RESP.RIC_REQUESTOR=*.RIC_INSTANCE=* Description : Publishes the E2 subscription response received from the E2 Termination node to the xAPP"
        }
    }
}