2 ==================================================================================
3 Copyright (c) 2019 AT&T Intellectual Property.
4 Copyright (c) 2019 Nokia
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================================
23 "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/conv"
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 E2AP_InitiatingMessage uint64 = 1
32 E2AP_SuccessfulOutcome uint64 = 2
33 E2AP_UnsuccessfulOutcome uint64 = 3
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
42 E2AP_RICSubscriptionRequest uint64 = 1
43 E2AP_RICSubscriptionDeleteRequest uint64 = 2
45 // E2AP_RICServiceUpdate uint64 = 3
46 // E2AP_RICControlRequest uint64 = 4
48 // //E2AP_X2SetupRequest uint64 = 5;
49 // E2AP_ENDCX2SetupRequest uint64 = 6
50 // E2AP_ResourceStatusRequest uint64 = 7
51 // E2AP_ENBConfigurationUpdate uint64 = 8
52 // E2AP_ENDCConfigurationUpdate uint64 = 9
53 // E2AP_ResetRequest uint64 = 10
54 // E2AP_RICIndication uint64 = 11
56 // E2AP_RICServiceQuery uint64 = 12
57 // E2AP_LoadInformation uint64 = 13
58 // E2AP_GNBStatusIndication uint64 = 14
59 // E2AP_ResourceStatusUpdate uint64 = 15
60 // E2AP_ErrorIndication uint64 = 16
67 E2AP_RICSubscriptionResponse uint64 = 1
68 E2AP_RICSubscriptionDeleteResponse uint64 = 2
70 // E2AP_RICserviceUpdateAcknowledge uint64 = 3
71 // E2AP_RICcontrolAcknowledge uint64 = 4
73 // //E2AP_X2SetupResponse uint64 = 5;
74 // E2AP_ENDCX2SetupResponse uint64 = 6
75 // E2AP_ResourceStatusResponse uint64 = 7
76 // E2AP_ENBConfigurationUpdateAcknowledge uint64 = 8
77 // E2AP_ENDCConfigurationUpdateAcknowledge uint64 = 9
78 // E2AP_ResetResponse uint64 = 10
83 // Unsuccessful outcome
85 E2AP_RICSubscriptionFailure uint64 = 1
86 E2AP_RICSubscriptionDeleteFailure uint64 = 2
88 // E2AP_RICserviceUpdateFailure uint64 = 3
89 // E2AP_RICcontrolFailure uint64 = 4
91 // //E2AP_X2SetupFailure uint64 = 5;
92 // E2AP_ENDCX2SetupFailure uint64 = 6
93 // E2AP_ResourceStatusFailure uint64 = 7
94 // E2AP_ENBConfigurationUpdateFailure uint64 = 8
95 // E2AP_ENDCConfigurationUpdateFailure uint64 = 9
99 //-----------------------------------------------------------------------------
101 //-----------------------------------------------------------------------------
103 E2AP_IndicationTypeReport uint64 = 0
104 E2AP_IndicationTypeInsert uint64 = 1
107 //-----------------------------------------------------------------------------
109 //-----------------------------------------------------------------------------
111 E2AP_ActionTypeReport uint64 = 0
112 E2AP_ActionTypeInsert uint64 = 1
113 E2AP_ActionTypePolicy uint64 = 2
114 E2AP_ActionTypeInvalid uint64 = 99 // For RIC internal usage only
117 //-----------------------------------------------------------------------------
119 //-----------------------------------------------------------------------------
121 E2AP_SubSeqActionTypeContinue uint64 = 0
122 E2AP_SubSeqActionTypeWait uint64 = 1
125 //-----------------------------------------------------------------------------
127 //-----------------------------------------------------------------------------
129 E2AP_TimeToWaitZero uint64 = 0
130 E2AP_TimeToWaitW1ms uint64 = 1
131 E2AP_TimeToWaitW2ms uint64 = 2
132 E2AP_TimeToWaitW5ms uint64 = 3
133 E2AP_TimeToWaitW10ms uint64 = 4
134 E2AP_TimeToWaitW20ms uint64 = 4
135 E2AP_TimeToWaitW30ms uint64 = 5
136 E2AP_TimeToWaitW40ms uint64 = 6
137 E2AP_TimeToWaitW50ms uint64 = 7
138 E2AP_TimeToWaitW100ms uint64 = 8
139 E2AP_TimeToWaitW200ms uint64 = 9
140 E2AP_TimeToWaitW500ms uint64 = 10
141 E2AP_TimeToWaitW1s uint64 = 11
142 E2AP_TimeToWaitW2s uint64 = 12
143 E2AP_TimeToWaitW5s uint64 = 13
144 E2AP_TimeToWaitW10s uint64 = 14
145 E2AP_TimeToWaitW20s uint64 = 15
146 E2AP_TimeToWaitW60 uint64 = 16
149 //-----------------------------------------------------------------------------
151 //-----------------------------------------------------------------------------
153 E2AP_InterfaceDirectionIncoming uint32 = 0
154 E2AP_InterfaceDirectionOutgoing uint32 = 1
157 //-----------------------------------------------------------------------------
159 //-----------------------------------------------------------------------------
161 E2AP_CriticalityReject uint8 = 0
162 E2AP_CriticalityIgnore uint8 = 1
163 E2AP_CriticalityNotify uint8 = 2
166 //-----------------------------------------------------------------------------
168 //-----------------------------------------------------------------------------
170 E2AP_ENBIDMacroPBits20 uint8 = 20
171 E2AP_ENBIDHomeBits28 uint8 = 28
172 E2AP_ENBIDShortMacroits18 uint8 = 18
173 E2AP_ENBIDlongMacroBits21 uint8 = 21
176 //-----------------------------------------------------------------------------
178 //-----------------------------------------------------------------------------
179 type PackedData struct {
183 //-----------------------------------------------------------------------------
185 //-----------------------------------------------------------------------------
186 type MessageInfo struct {
191 func (msgInfo *MessageInfo) String() string {
192 return "msginfo(" + strconv.FormatUint((uint64)(msgInfo.MsgType), 10) + string(":") + strconv.FormatUint((uint64)(msgInfo.MsgId), 10) + ")"
195 //-----------------------------------------------------------------------------
197 //-----------------------------------------------------------------------------
198 type RequestId struct {
203 func (rid *RequestId) String() string {
204 return strconv.FormatUint((uint64)(rid.Id), 10) + string(":") + strconv.FormatUint((uint64)(rid.Seq), 10)
207 //-----------------------------------------------------------------------------
209 //-----------------------------------------------------------------------------
210 type FunctionId uint16
212 //-----------------------------------------------------------------------------
214 //-----------------------------------------------------------------------------
220 func (nid *NodeId) String() string {
221 return strconv.FormatUint((uint64)(nid.Id), 10)
224 //-----------------------------------------------------------------------------
226 //-----------------------------------------------------------------------------
227 type GlobalNodeId struct {
229 PlmnIdentity conv.PlmnIdentity
233 func (gnid *GlobalNodeId) String() string {
234 return gnid.PlmnIdentity.String() + string(":") + gnid.NodeId.String()
237 //-----------------------------------------------------------------------------
239 //-----------------------------------------------------------------------------
240 type InterfaceId struct {
241 GlobalEnbId GlobalNodeId
242 GlobalGnbId GlobalNodeId
245 //-----------------------------------------------------------------------------
247 //-----------------------------------------------------------------------------
248 type EventTriggerDefinition struct {
250 InterfaceDirection uint32
256 //-----------------------------------------------------------------------------
258 //-----------------------------------------------------------------------------
259 type CallProcessId struct {
260 CallProcessIDVal uint32
264 //-----------------------------------------------------------------------------
266 //-----------------------------------------------------------------------------
267 type ActionDefinition struct {
274 //-----------------------------------------------------------------------------
276 //-----------------------------------------------------------------------------
277 type SubsequentAction struct {
283 //-----------------------------------------------------------------------------
285 //-----------------------------------------------------------------------------
286 type ActionToBeSetupItem struct {
293 //-----------------------------------------------------------------------------
295 //-----------------------------------------------------------------------------
301 //-----------------------------------------------------------------------------
303 //-----------------------------------------------------------------------------
304 type ActionAdmittedItem struct {
308 //-----------------------------------------------------------------------------
310 //-----------------------------------------------------------------------------
311 type ActionAdmittedList struct {
312 Items []ActionAdmittedItem //16
315 //-----------------------------------------------------------------------------
317 //-----------------------------------------------------------------------------
318 type ActionNotAdmittedItem struct {
323 //-----------------------------------------------------------------------------
325 //-----------------------------------------------------------------------------
326 type ActionNotAdmittedList struct {
327 Items []ActionNotAdmittedItem //16
330 //-----------------------------------------------------------------------------
332 //-----------------------------------------------------------------------------
333 type CriticalityDiagnosticsIEListItem struct {
334 IeCriticality uint8 //Crit
339 //-----------------------------------------------------------------------------
341 //-----------------------------------------------------------------------------
342 type CriticalityDiagnosticsIEList struct {
343 Items []CriticalityDiagnosticsIEListItem //256
346 //-----------------------------------------------------------------------------
348 //-----------------------------------------------------------------------------
349 type CriticalityDiagnostics struct {
356 ProcCrit uint8 //Crit
357 CriticalityDiagnosticsIEList