# WG3 mapping to oai
###### tags: `WG3`
## Near-RT RIC architecture

## Representation of an O-RAN E2AP packet

the E2 interface is based on SCTP protocol. It has conent some message in the following:
- E2SM (four services)
- report
- insert
- control
- policy

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


## flexric (oai Near RT-RIC)


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.

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


### the illustrate the flow of message

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

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

xAPP control gNB
