X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_e2ap_mgr.h;h=c018f57091592e905246ff31d624eb91906165d2;hb=a3796bdbd76c38cd78ed1c9ef5cbf4cee1c355de;hp=1cdb2f410edca34a39d1481371cfa5010d05677d;hpb=47fcf084ca2e186a81772c24a3a213acb5ee71d0;p=o-du%2Fl2.git diff --git a/src/du_app/du_e2ap_mgr.h b/src/du_app/du_e2ap_mgr.h index 1cdb2f410..c018f5709 100644 --- a/src/du_app/du_e2ap_mgr.h +++ b/src/du_app/du_e2ap_mgr.h @@ -18,10 +18,14 @@ /* This file contains all E2AP message handler related functionality */ #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 */ @@ -32,6 +36,7 @@ #define MAX_LABEL_INFO 2147483648 /* O-RAN.WG3.E2SM-KPM-R003-v03.00 : Section 8.2.1.2.1 : maxnoofLabelInfo */ #define MAX_RIC_ACTION 16 /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.1.1.1 : maxofRICActionID */ #define MAX_RIC_REQUEST 65535 /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.2.7 */ +#define MAX_PENDING_SUBSCRIPTION_RSP 5 /* Number of statistics request in processing */ #define STRING_SIZE_150_BYTES 150 #define STRING_SIZE_1000_BYTES 1000 @@ -66,9 +71,11 @@ typedef enum typedef enum { E2_NODE_COMPONENT_ADD, - E2_NODE_COMPONENT_UPDATE + E2_NODE_COMPONENT_UPDATE, + E2_NODE_COMPONENT_DEL }ComponentActionType; + /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.2.30 */ typedef enum { @@ -165,6 +172,12 @@ typedef enum typedef uint8_t E2Cause; +typedef struct e2FailureCause +{ + E2CauseType causeType; + uint8_t cause; +}E2FailureCause; + typedef struct { uint8_t transactionId; @@ -207,10 +220,33 @@ typedef struct CmTimer timer; }RicServiceUpdateTimer; +typedef struct e2NodeCfgItem +{ + InterfaceType interface; + ComponentActionType actionType; +}E2NodeConfigItem; + +typedef struct e2NodeCfgList +{ + uint16_t addE2NodeCount; + E2NodeConfigItem addE2Node[MAX_E2_NODE_COMPONENT]; + uint16_t updateE2NodeCount; + E2NodeConfigItem updateE2Node[MAX_E2_NODE_COMPONENT]; + uint16_t removeE2NodeCount; + E2NodeConfigItem removeE2Node[MAX_E2_NODE_COMPONENT]; +}E2NodeConfigList; + +typedef struct +{ + E2NodeConfigList configList; + CmTimer timer; +}E2NodeConfigUpdateTimer; + typedef struct e2Timer { CmTimer e2SetupTimer; - RicServiceUpdateTimer ricServiceUpdateTimer; + RicServiceUpdateTimer ricServiceUpdateTimer; + E2NodeConfigUpdateTimer e2NodeConfigUpdate; /* More timers can be added to this structure in future */ }E2Timer; @@ -258,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 */ @@ -344,7 +387,7 @@ 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; @@ -354,11 +397,29 @@ typedef struct typedef struct { RicRequestId requestId; + uint16_t ranFuncId; EventTriggerDefinition eventTriggerDefinition; uint8_t numOfActions; ActionInfo actionSequence[MAX_RIC_ACTION]; + CmTimer ricSubsReportTimer; }RicSubscription; +typedef struct rejectedAction +{ + uint8_t id; + E2FailureCause failureCause; +}RejectedAction; + +typedef struct pendingSubsRspInfo +{ + RicRequestId requestId; + uint16_t ranFuncId; + uint8_t numOfAcceptedActions; + uint8_t acceptedActionList[MAX_RIC_ACTION]; + uint8_t numOfRejectedActions; + RejectedAction rejectedActionList[MAX_RIC_ACTION]; +}PendingSubsRspInfo; + typedef struct { /* O-RAN.WG3.E2SM-KPM-R003-v03.00 : Section 8.2.2.1 */ @@ -373,6 +434,8 @@ typedef struct uint8_t ricIndicationMessageFormat; /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.1.1.1 */ CmLListCp subscriptionList; + uint8_t numPendingSubsRsp; + PendingSubsRspInfo pendingSubsRspInfo[MAX_PENDING_SUBSCRIPTION_RSP]; }RanFunction; /* O-RAN.WG3.E2AP-R003-v03.00 : Section 9.2.26-9.2.27 */ @@ -423,15 +486,23 @@ typedef struct E2TimersInfo e2TimersInfo; }E2apDb; -typedef struct e2FailureCause -{ - E2CauseType causeType; - uint8_t cause; -}E2FailureCause; - uint8_t assignTransactionId(); +ActionInfo *fetchActionInfoFromActionId(uint8_t actionId, RicSubscription *ricSubscriptionInfo); +RicSubscription *fetchSubsInfoFromRicReqId(RicRequestId ricReqId, RanFunction *ranFuncDb, CmLList **ricSubscriptionNode); +RanFunction *fetchRanFuncFromRanFuncId(uint16_t ranFuncId); +uint8_t fetchSubsInfoFromSubsId(uint64_t subscriptionId, RanFunction **ranFuncDb, CmLList **ricSubscriptionNode, \ + RicSubscription **ricSubscriptionInfo); + +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); + /********************************************************************** End of file **********************************************************************/