[Epic-ID: ODUHIGH-516][Task-ID: ODUHIGH-535] Implementation of E2 Removal Procedure...
[o-du/l2.git] / src / du_app / du_e2ap_mgr.h
index e1195d5..a4d05f9 100644 (file)
 #define MAX_E2_SETUP_TMR 1
 #define MAX_E2_NODE_CONFIG_UPDATE_TMR 1
 #define MAX_RIC_SERVICE_UPDATE_TMR 1
+#define MAX_RIC_SUBSCRIPTION_REPORTING_TMR 1
 
 #define EVENT_E2_SETUP_TMR 1
 #define EVENT_RIC_SERVICE_UPDATE_TMR 2
 #define EVENT_E2_NODE_CONFIG_UPDATE_TMR 3
+#define EVENT_RIC_SUBSCRIPTION_REPORTING_TMR 4
 
 #define MAX_NUM_TRANSACTION 256 /* As per, O-RAN WG3 E2AP v3.0, section 9.2.33 */
 #define MAX_RAN_FUNCTION 256        /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.1.2.2 : maxofRANfunctionID */
@@ -221,7 +223,7 @@ typedef struct
 typedef struct e2NodeCfgItem
 {
    InterfaceType interface;
-   ComponentActionType actionType;
+   uint64_t      componentId; 
 }E2NodeConfigItem;
 
 typedef struct e2NodeCfgList
@@ -292,10 +294,17 @@ typedef struct
    uint16_t instanceId;
 }RicRequestId;
 
+typedef struct reportStartTime
+{
+   uint32_t timeInSec;
+   uint32_t timeInMilliSec;
+}ReportStartTime;
+
 /* O-RAN.WG3.E2SM-KPM-R003-v03.00 : Section 8.2.1.1.1 */
 typedef struct
 {
    uint32_t reportingPeriod; /* In milliseconds */
+   ReportStartTime startTime;
 }EventTriggerFormat1;
 
 /* O-RAN.WG3.E2SM-KPM-R003-v03.00 : Section 8.2.1.1 */
@@ -378,19 +387,24 @@ typedef struct
 /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.1.1.1 : maxofRICActionID */
 typedef struct
 {
-   uint8_t           id;
+   int16_t           actionId;     /* O-RAN.WG3.E2AP-R003-v03.00 Section 9.2.10. Valid action id range = 0..255 */
    ActionType        type;
    ActionDefinition  definition;
    ConfigType        action;
+   E2FailureCause    failureCause; /* Used only when an action is required to be deleted */
 }ActionInfo;
 
 /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.1.1.1 : maxofRICActionID */
 typedef struct
 {
    RicRequestId           requestId;
+   uint16_t               ranFuncId;
    EventTriggerDefinition eventTriggerDefinition;
    uint8_t                numOfActions;
    ActionInfo             actionSequence[MAX_RIC_ACTION];  
+   CmTimer                ricSubsReportTimer;
+   ConfigType             action;
+   E2FailureCause         failureCause; /* Used only when a subscription is required to be deleted */
 }RicSubscription;
 
 typedef struct rejectedAction
@@ -430,13 +444,19 @@ typedef struct
 /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.2.26-9.2.27 */
 typedef struct
 {
-   InterfaceType        interfaceType;
-   uint64_t             componentId; 
-   ComponentActionType  componentActionType;
-   uint8_t              reqBufSize;
-   uint8_t              *componentRequestPart;
-   uint8_t              rspBufSize;
-   uint8_t              *componentResponsePart;
+   uint8_t    reqBufSize;
+   uint8_t    *componentRequestPart;
+   uint8_t    rspBufSize;
+   uint8_t    *componentResponsePart;
+}E2NodeConfig;
+
+typedef struct
+{
+   InterfaceType interfaceType;
+   uint64_t      componentId; 
+   E2NodeConfig  *addConfiguration;
+   E2NodeConfig  *updateConfiguration;
+   bool          deleteConfiguration;
 }E2NodeComponent;
 
 /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.2.29 */
@@ -481,16 +501,23 @@ RicSubscription *fetchSubsInfoFromRicReqId(RicRequestId ricReqId, RanFunction *r
 RanFunction *fetchRanFuncFromRanFuncId(uint16_t ranFuncId);
 uint8_t fetchSubsInfoFromSubsId(uint64_t subscriptionId, RanFunction **ranFuncDb, CmLList **ricSubscriptionNode, \
    RicSubscription **ricSubscriptionInfo);
+void fetchRicSubsToBeDeleted(CmLListCp *ricSubsToBeDelList);
 
-uint8_t fillRicSubsInMacStatsReq(MacStatsReq *macStatsReq, uint16_t ranFuncId, RicSubscription* ricSubscriptionInfo);
-void e2ProcStatsRsp(MacStatsRsp *statsRsp);
-void e2ProcStatsInd(MacStatsInd *statsInd);
+uint8_t fillRicSubsInMacStatsReq(MacStatsReq *macStatsReq, RicSubscription* ricSubscriptionInfo);
+uint8_t e2ProcStatsRsp(MacStatsRsp *statsRsp);
+uint8_t e2ProcStatsInd(MacStatsInd *statsInd);
+void E2apHdlRicSubsReportTmrExp(RicSubscription *ricSubscription);
 
 uint8_t ResetE2Request(E2ProcedureDirection dir, E2FailureCause resetCause);
 uint8_t SendE2APMsg(Region region, Pool pool, char *encBuf, int encBufSize);
-E2NodeComponent *fetchE2NodeComponentInfo(InterfaceType interfaceType, uint8_t componentActionType, CmLList **e2ComponentNode);
-uint8_t addOrModifyE2NodeComponent(InterfaceType interfaceType, uint8_t action, bool reqPart, uint8_t bufSize, char *bufString);
-
+E2NodeComponent *fetchE2NodeComponentInfo(InterfaceType interfaceType, uint64_t componentId, CmLList **e2ComponentNode);
+uint8_t fillE2NodeComponentReqInfo(InterfaceType interfaceType, uint64_t componentId, uint8_t action, uint8_t bufSize, char *bufString);
+uint8_t fillE2NodeComponentRspInfo(InterfaceType interfaceType, uint64_t componentId, uint8_t action, uint8_t bufSize, char *bufString);
+void deleteRicSubscriptionList(CmLListCp *subscriptionList);
+void deleteRicSubscriptionNode(CmLList *ricSubscriptionInfo);
+void deleteMeasurementInfoList(CmLListCp *measInfoList);
+void deleteActionSequence(ActionInfo *action);
+void deleteMeasuredValueList(CmLListCp *measuredValueList);
 /**********************************************************************
   End of file
  **********************************************************************/