O-RAN defines the E2 Service Models in the form of "ASN.1" specifications.
Each Service Model defines 5 top level objects:
- RAN Function Description (from the E2Node, describes the supported actions and triggers)
- Event Trigger Defintion (contained in a
RICSubscriptionRequest
, defines the conditions on which E2Node should send aRICIndication
) - Action Definition (contained in a
RICSubscriptionRequest
, defines the actions on an E2Node) - Indication Header (contained in a
RICIndication
, describes general parameters of the source E2 Node) - Indication Message (contained in a
RICIndication
, describes specific parameters requested)
The onos-e2-sm
project provides, for each of these Service Models:
- A Protobuf translation of these ASN.1 specifications e.g. e2sm_kpm_ies.proto
- Go code mapping between Protobuf and ASN.1 PER encoding
The implementation can be accessed as either:
- a Go module e.g.
go get github.com/onosproject/onos-e2-sm/servicemodels/[email protected]
(preferred for xApps who only need to access the Proto defintions) or - as a Go plugin e.g.
e2sm_kpm.so.1.0.0
(allowing a loose coupling withonos-e2t
andran-simulator
)
Since dynamically loaded modules in Go require being compiled in the code of the target they will plugin to, there are 2 versions of the plugin docker file produced
onosproject/service-model-docker-e2sm_kpm-1.0.0
andonosproject/service-model-ransim-e2sm_kpm-1.0.0
Third party vendors will be able to build their own Service Models and load them in to
onos-e2t
using the plugin method, and will be able to access the translated Protobuf in corresponding xApps
This is the first E2 Service Model to be handled by SD-RAN - it is for extracting statistics from the E2Node.
Currently supported version is E2SM KPM v2.0.3. E2SM KPM v1 is partially implemented and not supported anymore.
There is also an implementation of KPMv2 SM with Go-based APER library (produces APER bytes out of Protobuf).
While the Proto definitions have been created for this Service Model, the Go mapping code has not been implemented in SD-RAN yet.
Pre-standard E2 Service model with PCI and Neighbor relation table information from E2 Nodes.
There is also an implementation of RC-PRE SM with Go-based APER library.
E2 Service model for handling Mobile HandOver use case.
There is also an implementation of MHO SM with Go-based APER library.
E2 service model for handling RAN Slicing use case. It was implemented with Go-based APER library.
Service models are created from the ASN1 models stored at: https://github.com/onosproject/openairinterface5g/tree/develop-onf/openair2/RIC_AGENT/MESSAGES/ASN1/R01
From these:
- Protobuf is generated with
asn1c -B
(requires the specially modified version ofasn1c
tool - asn1c) - Go code is generated from this Protobuf as an interface/reusable layer e.g. e2sm_kpm_ie.pb.go
- C code is generated the version of the
asn1c
tool from the O-RAN Software Community withasn1c -fcompound-names -fincludes-quoted -fno-include-deps -findirect-choice -gen-PER -no-gen-OER -D.
e.g. E2SM-KPM-IndicationHeader.h - Then glue code is generated by hand (at first) using
CGO
(wrapping the C code in Go) e.g. E2SM-KPM-IndicationHeader.go- It's also possible to use
protoc-gen-cgo
, aprotoc
plugin that prints CGo code out of Protobuf. Some hand tweaks are still needed to be done.
- It's also possible to use
To generate the C code with the O-RAN Software Community version of the
asn1c
tool, it must be installed on your system withsudo make install
. This is because it takes skeleton file from/usr/local/share/asn1c
regardless of where it is run from.
The E2AP (E2 Application Protocol) is not a Service Model, and so is kept completely inside the onos-e2t
.
Here you can find a tutorial on how to create your own SM.