1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /* This file contains all E2AP message handler related functionality */
21 #define MAX_NUM_TRANSACTION 256 /* As per, O-RAN WG3 E2AP v3.0, section 9.2.33 */
22 #define MAX_E2_SETUP_TMR 1
23 #define EVENT_E2_SETUP_TMR 1
29 }E2ProcedureDirection;
33 E2_RAN_FUNCTION_ID_INVALID,
34 E2_ACTION_NOT_SUPPORTED,
35 E2_EXECESSIVE_ACTIONS,
37 E2_DUPLICATE_EVENT_TRIGGER,
38 E2_FUNCTION_RESOURCE_LIMIT,
39 E2_REQUEST_ID_UNKNOWN,
40 E2_INCONSISTENT_ACTION_SUBSEQUENT_ACTION_SEQUENCE,
41 E2_CONTROL_MESSAGE_INVALID,
42 E2_RIC_CALL_PROCESS_ID_INVALID,
43 E2_CONTROL_TIMER_EXPIRED,
44 E2_CONTROL_FAILED_TO_EXECUTE,
46 E2_RIC_REQUEST_CAUSE_UNSPECIFIED,
47 E2_RIC_SUBSCRIPTION_END_TIME_EXPIRED,
48 E2_RIC_SUBSCRIPTION_END_TIME_INVALID,
49 E2_DUPLICATE_RIC_REQUEST_ID,
50 E2_EVENT_TRIGGER_NOT_SUPPORTED,
51 E2_REQUEST_INFORMATION_UNAVAILABLE,
52 E2_INVALID_INFORMATION_REQUEST
57 E2_RAN_FUNCTION_NOT_SUPPORTED,
58 E2_EXCESSIVE_FUNCTIONS,
59 E2_RIC_RESOURCE_LIMIT,
64 E2_NODE_COMPONENT_UNKNOWN
69 E2_TRANSPORT_CAUSE_UNSPECIFIED,
70 E2_TRANSPORT_RESOURCE_UNAVAILABLE
75 E2_TRANSFER_SYNTAX_ERROR,
76 E2_ABSTRACT_SYNTAX_ERROR_REJECT,
77 E2_ABSTRACT_SYNTAX_ERROR_IGNORE_AND_NOTIFY,
78 E2_MESSAGE_NOT_COMPATIBLE_WITH_RECEIVER_STATE,
80 E2_ABSTRACT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MESSAGE,
81 E2_PROTOCOL_CAUSE_UNSPECIFIED
86 E2_CONTROL_PROCESSING_OVERLOAD,
89 E2_MISCELLANEOUS_CAUSE_UNSPECIFIED
103 typedef uint8_t E2Cause;
107 uint8_t transactionId;
108 uint8_t procedureCode;
111 typedef struct e2Transcation
113 uint8_t transIdCounter;
114 E2TransInfo onGoingTransaction[MAX_NUM_TRANSACTION];
115 /* Any new parameter for transaction handling can be added here in future */
118 typedef struct e2Timer
120 CmTimer e2SetupTimer;
121 /* More timers can be added to this structure in future */
124 typedef struct e2apDb
127 E2Transcation e2TransInfo;
130 uint32_t ricInstanceId;
132 uint8_t *ricEventTrigger;
133 uint32_t ricActionId;
134 uint32_t ricActionType;
136 uint8_t e2SetupTimerInterval;
139 uint8_t assignTransactionId();
140 uint8_t ResetE2Request(E2ProcedureDirection dir, E2CauseType type, E2Cause cause);
141 uint8_t SendE2APMsg(Region region, Pool pool, char *encBuf, int encBufSize);
142 /**********************************************************************
144 **********************************************************************/