---
# System prepended metadata

title: WG3 mapping to oai
tags: [WG3]

---

# WG3 mapping to oai
###### tags: `WG3`


## Near-RT RIC architecture
![](https://i.imgur.com/GcchA4Q.png)

## Representation of an O-RAN E2AP packet
![](https://i.imgur.com/S1juNCz.png)

the E2 interface is based on SCTP protocol. It has conent some message in the following:

- E2SM (four services)
    - report
    - insert
    - control
    - policy

![](https://i.imgur.com/y5IazjH.png)

- E2AP(application)
    - setup
    - indication
    - reset
    - update
- E2Packet
    - E2AP
    - E2SM

![](https://i.imgur.com/zipblN0.png)
![](https://i.imgur.com/9Yw1hiK.png)

## flexric (oai Near RT-RIC)

![](https://i.imgur.com/wodP8n0.png)

![](https://i.imgur.com/f3eH1rH.png)

The flexric consist of two components, which is splited two parts, gNB Agent library and RIC(controller) .

This Agent Library is an interface that is used to connection with RIC and xApp service model, which is implemented to dynamic library as following. 

![](https://i.imgur.com/whw2JOJ.png)

the dynamic library in the /usr/local/lib/flexric/


![](https://i.imgur.com/GLy90Go.png)
![](https://i.imgur.com/QLtAQQ8.png)

### the illustrate the flow of message
![](https://i.imgur.com/xNXYpb9.png)

## Demo

[Flexric gitlab](https://gitlab.eurecom.fr/mosaic5g/flexric)

![](https://i.imgur.com/4RnlkZU.png)



nearRT-RIC
```
./build/examples/ric/nearRT-RIC
```
xApp
```
./build/examples/xApp/c/monitor/xapp_gtp_moni
```
gNB
```
./build/examples/emulator/agent/emu_agent_gnb
```

## gNB side API
in the openairInterface5g, gNB provide two API:
- read_RAN
- write_RAN

![](https://i.imgur.com/jyCMr3v.png)

xAPP control gNB
![](https://i.imgur.com/PmBMv2g.png)
