+.. figure:: Xn_Based_Inter_CU_Handover.png
+ :width: 600
+ :alt: Xn-Based Inter-CU Handover
+
+ Figure 11 - Xn-Based Inter-CU Handover call flow
+
+Terminology:
+
+- Source GNB : GNB to which UE is connected and will be handed over from .
+- Source GNB DU : O-DU in source GNB
+- Source GNB CU : O-CU in source GNB
+- Target GNB : GNB to which UE will be handed over to.
+- Target GNB DU : O-DU in target GNB
+- Target GNB CU : O-CU in target GNB
+- Xn Inteface : Interface between Source GNB CU and Target GNB CU
+- UE : UE in handover from source GNB to target GNB
+
+Assumptions:
+
+- Xn setup is established between the two GNB
+- UE is RRC connected with DU
+- PDU data session is active.
+
+Call Flow :
+
+- UE sends Measurement Report message to source GNB. This message is sent from O-DU to O-CU in the UL RRC MESSAGE TRANSFER message over F1AP interface.
+
+- Based on UE Measurement Report, O-CU makes handover decision to a cell belonging to another GNB. Hereafter, this GNB will be referred to as target GNB.
+
+- Before initiating the handover procedure, source GNB CU sends a UE CONTEXT MODIFICATION REQUEST message to source GNB DU to query the latest configurations.
+
+- The source GNB DU responds with UE CONTEXT MODIFICATION RESPONSE message that includes latest full configuration information.
+
+- To start the handover, source GNB CU sends HANDOVER REQUEST to target GNB CU with UE configuration received from source GNB DU.
+
+- Target GNB CU sends a UE CONTEXT SETUP REQUEST message to target GNB DU to create a UE context and setup one or more data bearers. The UE CONTEXT SETUP REQUEST message includes Hand-overPreparationInformation. At DU, DU APP sends UE Create Request to MAC and RLC layers to create the UE context with radio resources and receives UE Create Response from the respective protocol layers.
+
+- The target GNB DU responds with UE CONTEXT SETUP RESPONSE message if it can admit resources for the handover.
+
+- Consequetively, target GNB CU sends HANDOVER REQUEST ACKNOWLEDGE message to source GNB CU to proceed with handover.
+
+- Now source GNB CU sends UE CONTEXT MODIFICATION REQUEST message to source GNB DU, which includes RRCReconfiguration message towards the UE. The CU also indicates the DU to stop the data transmission for the UE.
+
+- Source GNB DU forwards received RRCReconfiguration message to the UE and then sends DOWNLINK DATA DELIVERY STATUS message to CU to inform about successful delivery of message to UE.
+
+- Source GNB DU also sends UE Reconfiguration Request to MAC/Scheduler and RLC layers to stop data scheduling as requested by CU. Once all layers have responded with UE reconfiguration response, source GNB DU send UE CONTEXT MODIFICATION RESPONSE message to source GNB CU.
+
+- Using the information received in RRC Reconfiguration message, UE triggers Random Access procedure towards target GNB DU. This is a contention free random access if UE receives dedicated RACH resources information in RRC Reconfiguration message.
+
+- Once Random Access procedure with target GNB is complete, UE responds to target GNB DU with a RRCReconfigurationComplete message.
+
+- The target GNB DU sends UL RRC MESSAGE TRANSFER message to CU to convey the received RRCReconfigurationComplete message. This completes the UE attach to target GNB.
+
+- The downlink and uplink data packets are now sent to/from the UE through target GNB.
+
+- Once UE is successfully handed over to target GNB, its CU sends UE CONTEXT RELEASE message to source GNB CU.
+
+- Hence, source GNB CU sends UE CONTEXT RELEASE COMMAND message to the source GNB DU.
+
+- DU releases UE context at all layers and responds to source GNB CU with UE CONTEXT RELEASE COMPLETE message.
+
+Discontinuous reception (DRX)
+-----------------------------
+
+This section describes the Discontinuous reception (DRX) feature within O-DU High.
+
+
+.. figure:: Discontinuous_reception.PNG
+ :width: 600
+ :alt: Discontinuous reception flow
+
+ Figure 12 - Discontinuous reception flow
+
+- The connected mode DRX is used to improve UE's battery power consumption. This allows UE to be active for a certain amount of time to monitor PDCCH. UE shall become active or inactive based on the DRX timers.
+
+- When UE is created at O-DU during RRC connection setup procedure, DU APP forwards the default DRX configurationĀ to MAC, who then passes it to SCH as part of UE configuration request. SCH stores these configuration and will use it to calculate the start time and expiry time of various DRX timers. But these timers will only start after UE is RRC connected.
+
+- O-DU may receive modified DRX-configuration in UE CONTEXT SETUP REQUEST from O-CU. DU APP forwards it to MAC who forwards it to SCH as part of UE reconfiguration request. In this case, SCH will stop all DRX timers, re-calculate the start time and expiry time of various timers based on updated configuration and restart the drx-onDurationTimer.
+
+- Along with long cycle, DRX in O-DU high also supports short cycle which is enabled if short cycle configuration is recived in UE CONTEXT SETUP REQUEST.
+
+- DRX timers supported in ODU-High are drx-onDurationTimer, drx-InactivityTimer, drx-ShortCycleTimer, drx-HARQ-RTT-TimerDL, drx-RetransmissionTimerDL, drx-HARQ-RTT-TimerUL and drx-RetransmissionTimerUL.
+
+- UE is active when any of the following timers is running: drx-onDurationTimer, drx-InactivityTimer, drx-RetransmissionTimerDL or drx-RetransmissionTimerUL, else the UE is considered as inactive.
+
+- Initially, drx-onDurationTimer is started based on long cycle length. While drx-onDurationTimer or drx-InactivityTimer are running, UE becomes active to monitor PDCCH and send data in UL/DL. When drx-InactivityTimer expires, drx-ShortCycleTimer starts. While drx-ShortCycleTimer is running, drx-onDurationTimer is started based on short cycle length. Once drx-ShortCycleTimer expires, long cycle length is used again. Refer to figure 12 below for detailed working of these timers.
+
+.. figure:: Drx_Onduration_Inactive_ShortCycle_Timer.png
+ :width: 600
+ :alt: onDurationTimer,InactivityTimer,ShortCycleTimer flow
+
+ Figure 13 - onDurationTimer,InactivityTimer,ShortCycleTimer flow
+
+- If HARQ is received/sent, drx-HARQ-RTT-TimerDL or drx-HARQ-RTT-TimerUL is started. On its expiry drx-RetransmissionTimerDL or drx-RetransmissionTimerUL will start. While it is running, UE becomes active for retransmission of data in DL/UL. Refer to figure 13 and 14 below for detailed working of these timers.
+
+.. figure:: Drx_Dl_Harq_Retransmission_Timer.png
+ :width: 600
+ :alt: HARQ-RTT-TimerDL, RetransmissionTimerDL flow
+
+ Figure 14 - DL Harq Retransmission Timers flow
+
+.. figure:: Drx_Ul_Harq_Retransmission_Timer.png
+ :width: 600
+ :alt: HARQ-RTT-TimerUL, RetransmissionTimerUL flow
+
+ Figure 15 - UL Harq Retransmission Timers flow
+
+- If O-DU receives DRX configuration release indicator IE as a part of UE CONTEXT MODIFICATION REQUEST from O-CU, DU APP will forward this indicator to MAC which forwards it to SCH as part of UE reconfiguration request. In this case SCH stops all DRX timers, deletes DRX configuration and marks UE as active by default.
+
+
+E2AP Functionality
+------------------
+
+O-DU High communicates with Near RT RIC on the E2 interface using various Global Procedures and Near-RT RIC Functional Procedures.
+The implementation of these procedures are strictly compliant to O-RAN.WG3.E2GAP-R003-v03.00, O-RAN.WG3.E2AP-R003-v03.00.
+
+ODU-High supports E2 Service Model-Key Performance Measurement, compliant to O-RAN.WG3.E2SM-KPM-R003-v03.00.
+Following KPIs are implemented in ODU-High as part of E2SM-KPM. These comply with 3GPP 28.552 v15.6.0 section 5.1.1.2 Radio resource utilization.
+
++--------------------------------+-----------+-----------------------------------------+
+| KPI | Section | Remark |
++================================+===========+=========================================+
+|DL Total PRB Usage(RRU.PrbTotDl)| 5.1.1.2.1 | Calulates the total usage of PRBs on DL |
++--------------------------------+-----------+-----------------------------------------+
+|UL Total PRB Usage(RRU.PrbTotUl)| 5.1.1.2.2 | Calulates the total usage of PRBs on UL |
++--------------------------------+-----------+-----------------------------------------+
+
+E2 API Flow Triggered in ODU-High's stub-based test framework
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+This section describes the E2AP messages triggered when executing O-DU High in stub-based test framework.
+
+
+.. figure:: E2AP_Flow_Triggered_In_Code.PNG
+ :width: 600
+ :alt: E2AP Flow Triggered In Code
+
+ Figure 16 - E2AP Flow Triggered In Code
+
+E2AP Procedures Supported in ODU-High
+++++++++++++++++++++++++++++++++++++++
+
+This section contains flow diagrams for E2AP procedures that may/may not be triggered in ODU-High, however the code supports its working as per O-RAN WG3 E2 specifications.
+
+
+E2 Setup Procedure
+^^^^^^^^^^^^^^^^^^
+
+
+This section describes the E2 Setup Procedure within O-DU High and Near-RT RIC.
+
+
+.. figure:: E2_Setup_Procedure.PNG
+ :width: 600
+ :alt: E2 Setup Procedure
+
+ Figure 17 - E2 Setup Procedure
+
+E2 Node Configuration Update Procedure
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section describes the E2 Node Configuration Procedure within O-DU High and Near-RT RIC.
+
+.. figure:: E2_Node_Configuration_Update_Procedure.PNG
+ :width: 600
+ :alt: E2 Node Configuration Update Procedure
+
+ Figure 18 - E2 Node Configuration Update Procedure
+
+
+RIC Service Update procedure
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section describes the RIC Service Update Procedure within O-DU High and Near-RT RIC.
+Note - This API is not currently triggered by ODU-High.
+
+.. figure:: RIC_Service_Update_Procedure.PNG
+ :width: 600
+ :alt: RIC Service Update Procedure
+
+ Figure 19 - RIC Service Update Procedure
+
+
+E2 Connection Update Procedure
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section describes the E2 Connection Update Procedure within O-DU High and Near-RT RIC.
+Note - This API is not currently triggered by stub-based framework.
+
+.. figure:: E2_Connection_Update_Procedure.PNG
+ :width: 600
+ :alt: E2 Connection Update Procedure
+
+ Figure 20 - E2 Connection Update Procedure
+
+
+E2 Removal Procedure
+^^^^^^^^^^^^^^^^^^^^
+
+This section describes the E2 removal Procedure from both DU-initiated and RIC-initiated within O-DU High and Near-RT RIC.
+Note - This API is not currently triggered by ODU-High or Stub-based test framework as of now.
+
+.. figure:: E2_Removal_Procedure(DU-initiated).PNG
+ :width: 600
+ :alt: E2 Removal Procedure(DU-initiated)
+
+ Figure 21 - E2 Removal Procedure(DU-initiated)
+
+.. figure:: E2_Removal_Procedure(RIC-initiated).PNG
+ :width: 600
+ :alt: E2 Removal Procedure(RIC-initiated)
+
+ Figure 22 - E2 Removal Procedure(RIC-initiated)
+
+
+Reset Procedure
+^^^^^^^^^^^^^^^
+
+This section describes the Reset Procedure from both DU-initiated and RIC-initiated within O-DU High and Near-RT RIC.
+Note - This API is not currently triggered by ODU-High or Stub-based test framework as of now.
+
+.. figure:: Reset_Procedure(DU-initiated).PNG
+ :width: 600
+ :alt: Reset Procedure(DU-initiated)
+
+ Figure 23 - Reset Procedure(DU-initiated)
+
+.. figure:: Reset_Procedure(RIC-initiated).PNG
+ :width: 600
+ :alt: Reset Procedure(RIC-initiated)
+
+ Figure 24 - Reset Procedure(RIC-initiated)
+
+
+
+
+Error Indication Procedure
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This procedure can be triggered from either O-DU or Near-RT RIC. It informs that an error has been found in DU or Near-RT RIC.
+Note - This API is not currently triggered by ODU-High or Stub-based test framework as of now.
+
+RIC Subscription Procedure / RIC Indication
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section describes the RIC Subscription Procedure within O-DU High and Near-RT RIC. In addition to this procedure, the RIC indication procedure has been described.
+
+.. figure:: RIC_Subscription_Procedure.PNG
+ :width: 600
+ :alt: RIC Subscription Procedure
+
+ Figure 25 - RIC Subscription Procedure
+
+
+RIC Subscription Modification Required
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Only framework is added as part of this procedure. The complete handling and flow will be added once use-case is determined.
+
+
+RIC Subscription Modification Procedure
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section describes the RIC Subscription Modification Procedure within O-DU High and Near-RT RIC.
+Note - This API is not currently triggered by stub-based framework.
+
+.. figure:: RIC_Subscription_Modification_Procedure.png
+ :width: 600
+ :alt: RIC Subscription Modification Procedure
+
+ Figure 26 - RIC Subscription Modification Procedure
+
+
+RIC Subscription Delete Procedure
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This section describes the RIC Subscription Delete Procedure within O-DU High and Near-RT RIC.
+Note - This API is not currently triggered by stub-based framework.
+
+.. figure:: RIC_Subscription_Delete_Procedure.PNG
+ :width: 600
+ :alt: RIC Subscription Delete Procedure
+
+ Figure 27 - RIC Subscription Delete Procedure