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 ==================================================================================
22 // #cgo LDFLAGS: -le2ap_wrapper -le2ap -lstdc++
23 // #include <stdlib.h>
24 // #include <c_types.h>
25 // #include <E2AP_if.h>
26 // #include <strings.h>
28 // void initSubsRequest(RICSubscriptionRequest_t *data){
29 // bzero(data,sizeof(RICSubscriptionRequest_t));
31 // void initSubsResponse(RICSubscriptionResponse_t *data){
32 // bzero(data,sizeof(RICSubscriptionResponse_t));
34 // void initSubsFailure(RICSubscriptionFailure_t *data){
35 // bzero(data,sizeof(RICSubscriptionFailure_t));
37 // void initSubsDeleteRequest(RICSubscriptionDeleteRequest_t *data){
38 // bzero(data,sizeof(RICSubscriptionDeleteRequest_t));
40 // void initSubsDeleteResponse(RICSubscriptionDeleteResponse_t *data){
41 // bzero(data,sizeof(RICSubscriptionDeleteResponse_t));
43 // void initSubsDeleteFailure(RICSubscriptionDeleteFailure_t *data){
44 // bzero(data,sizeof(RICSubscriptionDeleteFailure_t));
46 // void initIndication(RICIndication_t *data){
47 // bzero(data,sizeof(RICIndication_t));
55 "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/conv"
56 "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap"
57 "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/packer"
61 //-----------------------------------------------------------------------------
63 //-----------------------------------------------------------------------------
64 type e2apEntryRequestID struct {
65 entry *C.RICRequestID_t
68 func (e2Item *e2apEntryRequestID) set(id *e2ap.RequestId) error {
69 e2Item.entry.ricRequestorID = (C.uint32_t)(id.Id)
70 e2Item.entry.ricRequestSequenceNumber = (C.uint32_t)(id.Seq)
74 func (e2Item *e2apEntryRequestID) get(id *e2ap.RequestId) error {
75 id.Id = (uint32)(e2Item.entry.ricRequestorID)
76 id.Seq = (uint32)(e2Item.entry.ricRequestSequenceNumber)
80 //-----------------------------------------------------------------------------
82 //-----------------------------------------------------------------------------
83 type e2apEntryActionToBeSetupItem struct {
84 entry *C.RICActionToBeSetupItem_t
87 func (e2Item *e2apEntryActionToBeSetupItem) set(id *e2ap.ActionToBeSetupItem) error {
89 e2Item.entry.ricActionID = (C.ulong)(id.ActionId)
90 e2Item.entry.ricActionType = (C.uint64_t)(id.ActionType)
92 if id.ActionDefinition.Present {
93 e2Item.entry.ricActionDefinitionPresent = true
94 e2Item.entry.ricActionDefinition.styleID = (C.uint64_t)(id.ActionDefinition.StyleId)
95 e2Item.entry.ricActionDefinition.sequenceOfActionParameters.parameterID = (C.uint32_t)(id.ActionDefinition.ParamId)
96 //e2Item.entry.ricActionDefinition.sequenceOfActionParameters.ParameterValue = id.ActionDefinition.ParamValue
99 if id.SubsequentAction.Present {
100 e2Item.entry.ricSubsequentActionPresent = true
101 e2Item.entry.ricSubsequentAction.ricSubsequentActionType = (C.uint64_t)(id.SubsequentAction.Type)
102 e2Item.entry.ricSubsequentAction.ricTimeToWait = (C.uint64_t)(id.SubsequentAction.TimetoWait)
107 func (e2Item *e2apEntryActionToBeSetupItem) get(id *e2ap.ActionToBeSetupItem) error {
109 id.ActionId = (uint64)(e2Item.entry.ricActionID)
110 id.ActionType = (uint64)(e2Item.entry.ricActionType)
112 if e2Item.entry.ricActionDefinitionPresent {
113 id.ActionDefinition.Present = true
114 id.ActionDefinition.StyleId = (uint64)(e2Item.entry.ricActionDefinition.styleID)
115 id.ActionDefinition.ParamId = (uint32)(e2Item.entry.ricActionDefinition.sequenceOfActionParameters.parameterID)
116 //id.ActionDefinition.ParamValue=e2Item.entry.ricActionDefinition.sequenceOfActionParameters.ParameterValue
119 if e2Item.entry.ricSubsequentActionPresent {
120 id.SubsequentAction.Present = true
121 id.SubsequentAction.Type = (uint64)(e2Item.entry.ricSubsequentAction.ricSubsequentActionType)
122 id.SubsequentAction.TimetoWait = (uint64)(e2Item.entry.ricSubsequentAction.ricTimeToWait)
127 //-----------------------------------------------------------------------------
129 //-----------------------------------------------------------------------------
130 type e2apEntryPlmnIdentity struct {
131 entry *C.PLMNIdentity_t
134 func (plmnId *e2apEntryPlmnIdentity) set(id *conv.PlmnIdentity) error {
136 plmnId.entry.contentLength = (C.uint8_t)(len(id.Val))
137 for i := 0; i < len(id.Val); i++ {
138 plmnId.entry.pLMNIdentityVal[i] = (C.uint8_t)(id.Val[i])
143 func (plmnId *e2apEntryPlmnIdentity) get(id *conv.PlmnIdentity) error {
144 conlen := (int)(plmnId.entry.contentLength)
145 bcdBuf := make([]uint8, conlen)
146 for i := 0; i < conlen; i++ {
147 bcdBuf[i] = (uint8)(plmnId.entry.pLMNIdentityVal[i])
153 //-----------------------------------------------------------------------------
155 //-----------------------------------------------------------------------------
156 type e2apEntryGlobalEnbId struct {
157 entry *C.GlobalNodeID_t
160 func (enbId *e2apEntryGlobalEnbId) checkbits(bits uint8) error {
162 case e2ap.E2AP_ENBIDMacroPBits20:
164 case e2ap.E2AP_ENBIDHomeBits28:
166 case e2ap.E2AP_ENBIDShortMacroits18:
168 case e2ap.E2AP_ENBIDlongMacroBits21:
171 return fmt.Errorf("GlobalEnbId: given bits %d not match allowed: 20,28,18,21", bits)
174 func (enbId *e2apEntryGlobalEnbId) set(id *e2ap.GlobalNodeId) error {
175 if err := enbId.checkbits(id.NodeId.Bits); err != nil {
178 enbId.entry.nodeID.bits = (C.uchar)(id.NodeId.Bits)
179 enbId.entry.nodeID.nodeID = (C.uint32_t)(id.NodeId.Id)
180 return (&e2apEntryPlmnIdentity{entry: &enbId.entry.pLMNIdentity}).set(&id.PlmnIdentity)
183 func (enbId *e2apEntryGlobalEnbId) get(id *e2ap.GlobalNodeId) error {
184 if err := enbId.checkbits((uint8)(enbId.entry.nodeID.bits)); err != nil {
187 id.NodeId.Bits = (uint8)(enbId.entry.nodeID.bits)
188 id.NodeId.Id = (uint32)(enbId.entry.nodeID.nodeID)
189 return (&e2apEntryPlmnIdentity{entry: &enbId.entry.pLMNIdentity}).get(&id.PlmnIdentity)
192 //-----------------------------------------------------------------------------
194 //-----------------------------------------------------------------------------
195 type e2apEntryGlobalGnbId struct {
196 entry *C.GlobalNodeID_t
199 func (gnbId *e2apEntryGlobalGnbId) checkbits(bits uint8) error {
200 if bits < 22 || bits > 32 {
201 return fmt.Errorf("GlobalGnbId: given bits %d not match allowed: 22-32", bits)
206 func (gnbId *e2apEntryGlobalGnbId) set(id *e2ap.GlobalNodeId) error {
207 if err := gnbId.checkbits(id.NodeId.Bits); err != nil {
210 gnbId.entry.nodeID.bits = (C.uchar)(id.NodeId.Bits)
211 gnbId.entry.nodeID.nodeID = (C.uint32_t)(id.NodeId.Id)
212 return (&e2apEntryPlmnIdentity{entry: &gnbId.entry.pLMNIdentity}).set(&id.PlmnIdentity)
215 func (gnbId *e2apEntryGlobalGnbId) get(id *e2ap.GlobalNodeId) error {
216 if err := gnbId.checkbits((uint8)(gnbId.entry.nodeID.bits)); err != nil {
219 id.NodeId.Bits = (uint8)(gnbId.entry.nodeID.bits)
220 id.NodeId.Id = (uint32)(gnbId.entry.nodeID.nodeID)
221 return (&e2apEntryPlmnIdentity{entry: &gnbId.entry.pLMNIdentity}).get(&id.PlmnIdentity)
224 //-----------------------------------------------------------------------------
226 //-----------------------------------------------------------------------------
227 type e2apEntryInterfaceId struct {
228 entry *C.InterfaceID_t
231 func (indId *e2apEntryInterfaceId) set(id *e2ap.InterfaceId) error {
232 if id.GlobalEnbId.Present {
233 indId.entry.globalENBIDPresent = true
234 if err := (&e2apEntryGlobalEnbId{entry: &indId.entry.globalENBID}).set(&id.GlobalEnbId); err != nil {
239 if id.GlobalGnbId.Present {
240 indId.entry.globalGNBIDPresent = true
241 if err := (&e2apEntryGlobalGnbId{entry: &indId.entry.globalGNBID}).set(&id.GlobalGnbId); err != nil {
248 func (indId *e2apEntryInterfaceId) get(id *e2ap.InterfaceId) error {
249 if indId.entry.globalENBIDPresent == true {
250 id.GlobalEnbId.Present = true
251 if err := (&e2apEntryGlobalEnbId{entry: &indId.entry.globalENBID}).get(&id.GlobalEnbId); err != nil {
256 if indId.entry.globalGNBIDPresent == true {
257 id.GlobalGnbId.Present = true
258 if err := (&e2apEntryGlobalGnbId{entry: &indId.entry.globalGNBID}).get(&id.GlobalGnbId); err != nil {
265 //-----------------------------------------------------------------------------
267 //-----------------------------------------------------------------------------
268 type e2apEntryEventTrigger struct {
269 entry *C.RICEventTriggerDefinition_t
272 func (evtTrig *e2apEntryEventTrigger) set(id *e2ap.EventTriggerDefinition) error {
273 evtTrig.entry.interfaceDirection = (C.uint8_t)(id.InterfaceDirection)
274 evtTrig.entry.interfaceMessageType.procedureCode = (C.uint8_t)(id.ProcedureCode)
275 evtTrig.entry.interfaceMessageType.typeOfMessage = (C.uint8_t)(id.TypeOfMessage)
276 return (&e2apEntryInterfaceId{entry: &evtTrig.entry.interfaceID}).set(&id.InterfaceId)
279 func (evtTrig *e2apEntryEventTrigger) get(id *e2ap.EventTriggerDefinition) error {
280 id.InterfaceDirection = (uint32)(evtTrig.entry.interfaceDirection)
281 id.ProcedureCode = (uint32)(evtTrig.entry.interfaceMessageType.procedureCode)
282 id.TypeOfMessage = (uint64)(evtTrig.entry.interfaceMessageType.typeOfMessage)
283 return (&e2apEntryInterfaceId{entry: &evtTrig.entry.interfaceID}).get(&id.InterfaceId)
286 //-----------------------------------------------------------------------------
288 //-----------------------------------------------------------------------------
289 type e2apEntryAdmittedList struct {
290 entry *C.RICActionAdmittedList_t
293 func (item *e2apEntryAdmittedList) set(data *e2ap.ActionAdmittedList) error {
295 if len(data.Items) > 16 {
296 return fmt.Errorf("ActionAdmittedList: too long %d while allowed %d", len(data.Items), 16)
299 item.entry.contentLength = 0
300 for i := 0; i < len(data.Items); i++ {
301 item.entry.ricActionID[item.entry.contentLength] = (C.ulong)(data.Items[i].ActionId)
302 item.entry.contentLength++
307 func (item *e2apEntryAdmittedList) get(data *e2ap.ActionAdmittedList) error {
308 conlen := (int)(item.entry.contentLength)
309 data.Items = make([]e2ap.ActionAdmittedItem, conlen)
310 for i := 0; i < conlen; i++ {
311 data.Items[i].ActionId = (uint64)(item.entry.ricActionID[i])
316 //-----------------------------------------------------------------------------
318 //-----------------------------------------------------------------------------
319 type e2apEntryNotAdmittedList struct {
320 entry *C.RICActionNotAdmittedList_t
323 func (item *e2apEntryNotAdmittedList) set(data *e2ap.ActionNotAdmittedList) error {
325 if len(data.Items) > 16 {
326 return fmt.Errorf("e2apEntryNotAdmittedList: too long %d while allowed %d", len(data.Items), 16)
329 item.entry.contentLength = 0
330 for i := 0; i < len(data.Items); i++ {
331 item.entry.RICActionNotAdmittedItem[item.entry.contentLength].ricActionID = (C.ulong)(data.Items[i].ActionId)
332 item.entry.RICActionNotAdmittedItem[item.entry.contentLength].ricCause.content = (C.uchar)(data.Items[i].Cause.Content) // C.cRICCauseRadioNetwork
333 item.entry.RICActionNotAdmittedItem[item.entry.contentLength].ricCause.cause = (C.uchar)(data.Items[i].Cause.CauseVal)
334 item.entry.contentLength++
339 func (item *e2apEntryNotAdmittedList) get(data *e2ap.ActionNotAdmittedList) error {
340 conlen := (int)(item.entry.contentLength)
341 data.Items = make([]e2ap.ActionNotAdmittedItem, conlen)
342 for i := 0; i < conlen; i++ {
343 data.Items[i].ActionId = (uint64)(item.entry.RICActionNotAdmittedItem[i].ricActionID)
344 data.Items[i].Cause.Content = (uint8)(item.entry.RICActionNotAdmittedItem[i].ricCause.content)
345 data.Items[i].Cause.CauseVal = (uint8)(item.entry.RICActionNotAdmittedItem[i].ricCause.cause)
350 //-----------------------------------------------------------------------------
352 //-----------------------------------------------------------------------------
353 type e2apEntryCriticalityDiagnostic struct {
354 entry *C.CriticalityDiagnostics__t
357 func (item *e2apEntryCriticalityDiagnostic) set(data *e2ap.CriticalityDiagnostics) error {
359 item.entry.procedureCodePresent = (C.bool)(data.ProcCodePresent)
360 item.entry.procedureCode = (C.uchar)(data.ProcCode)
362 item.entry.triggeringMessagePresent = (C.bool)(data.TrigMsgPresent)
363 item.entry.triggeringMessage = (C.uchar)(data.TrigMsg)
365 item.entry.procedureCriticalityPresent = (C.bool)(data.ProcCritPresent)
366 item.entry.procedureCriticality = (C.uchar)(data.ProcCrit)
368 item.entry.criticalityDiagnosticsIELength = 0
369 item.entry.iEsCriticalityDiagnosticsPresent = false
370 for i := 0; i < len(data.CriticalityDiagnosticsIEList.Items); i++ {
371 item.entry.criticalityDiagnosticsIEListItem[i].iECriticality = (C.uint8_t)(data.CriticalityDiagnosticsIEList.Items[i].IeCriticality)
372 item.entry.criticalityDiagnosticsIEListItem[i].iE_ID = (C.uint32_t)(data.CriticalityDiagnosticsIEList.Items[i].IeID)
373 item.entry.criticalityDiagnosticsIEListItem[i].typeOfError = (C.uint8_t)(data.CriticalityDiagnosticsIEList.Items[i].TypeOfError)
374 item.entry.criticalityDiagnosticsIELength++
375 item.entry.iEsCriticalityDiagnosticsPresent = true
380 func (item *e2apEntryCriticalityDiagnostic) get(data *e2ap.CriticalityDiagnostics) error {
382 data.ProcCodePresent = (bool)(item.entry.procedureCodePresent)
383 data.ProcCode = (uint64)(item.entry.procedureCode)
385 data.TrigMsgPresent = (bool)(item.entry.triggeringMessagePresent)
386 data.TrigMsg = (uint64)(item.entry.triggeringMessage)
388 data.ProcCritPresent = (bool)(item.entry.procedureCriticalityPresent)
389 data.ProcCrit = (uint8)(item.entry.procedureCriticality)
391 if item.entry.iEsCriticalityDiagnosticsPresent == true {
392 conlen := (int)(item.entry.criticalityDiagnosticsIELength)
393 data.CriticalityDiagnosticsIEList.Items = make([]e2ap.CriticalityDiagnosticsIEListItem, conlen)
394 for i := 0; i < conlen; i++ {
395 data.CriticalityDiagnosticsIEList.Items[i].IeCriticality = (uint8)(item.entry.criticalityDiagnosticsIEListItem[i].iECriticality)
396 data.CriticalityDiagnosticsIEList.Items[i].IeID = (uint32)(item.entry.criticalityDiagnosticsIEListItem[i].iE_ID)
397 data.CriticalityDiagnosticsIEList.Items[i].TypeOfError = (uint8)(item.entry.criticalityDiagnosticsIEListItem[i].typeOfError)
403 //-----------------------------------------------------------------------------
405 //-----------------------------------------------------------------------------
406 type e2apEntryIndicationHeader struct {
407 entry *C.RICIndicationHeader_t
410 func (indHdr *e2apEntryIndicationHeader) set(data *e2ap.IndicationHeader) error {
411 indHdr.entry.interfaceDirection = (C.uint8_t)(data.InterfaceDirection)
412 return (&e2apEntryInterfaceId{entry: &indHdr.entry.interfaceID}).set(&data.InterfaceId)
415 func (indHdr *e2apEntryIndicationHeader) get(data *e2ap.IndicationHeader) error {
416 data.InterfaceDirection = (uint32)(indHdr.entry.interfaceDirection)
417 return (&e2apEntryInterfaceId{entry: &indHdr.entry.interfaceID}).get(&data.InterfaceId)
420 //-----------------------------------------------------------------------------
422 //-----------------------------------------------------------------------------
423 type e2apEntryIndicationMessage struct {
424 entry *C.RICIndicationMessage_t
427 func (indMsg *e2apEntryIndicationMessage) set(data *e2ap.IndicationMessage) error {
428 if len(data.InterfaceMessage.Buf) > 1024 {
429 return fmt.Errorf("IndicationMessage.InterfaceMessage: too long %d while allowed %d", len(data.InterfaceMessage.Buf), 1024)
431 indMsg.entry.interfaceMessage.contentLength = (C.uint64_t)(len(data.InterfaceMessage.Buf))
432 for i := 0; i < len(data.InterfaceMessage.Buf); i++ {
433 indMsg.entry.interfaceMessage.data[i] = (C.uint8_t)(data.InterfaceMessage.Buf[i])
438 func (indMsg *e2apEntryIndicationMessage) get(data *e2ap.IndicationMessage) error {
439 conlen := (int)(indMsg.entry.interfaceMessage.contentLength)
441 data.InterfaceMessage.Buf = make([]byte, conlen)
442 for i := 0; i < conlen; i++ {
443 data.InterfaceMessage.Buf[i] = (uint8)(indMsg.entry.interfaceMessage.data[i])
450 //-----------------------------------------------------------------------------
452 //-----------------------------------------------------------------------------
453 type e2apEntryCallProcessId struct {
454 entry *C.RICCallProcessID_t
457 func (callProcId *e2apEntryCallProcessId) set(data *e2ap.CallProcessId) error {
458 callProcId.entry.ricCallProcessIDVal = (C.uint64_t)(data.CallProcessIDVal)
462 func (callProcId *e2apEntryCallProcessId) get(data *e2ap.CallProcessId) error {
463 data.CallProcessIDVal = (uint32)(callProcId.entry.ricCallProcessIDVal)
468 //-----------------------------------------------------------------------------
470 //-----------------------------------------------------------------------------
472 type e2apMessage struct {
473 pdu *C.e2ap_pdu_ptr_t
474 messageInfo C.E2MessageInfo_t
477 func (e2apMsg *e2apMessage) PduUnPack(logBuf []byte, data *packer.PackedData) error {
478 e2apMsg.pdu = C.unpackE2AP_pdu((C.size_t)(len(data.Buf)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), &e2apMsg.messageInfo)
482 func (e2apMsg *e2apMessage) MessageInfo() *packer.MessageInfo {
484 msgInfo := &packer.MessageInfo{}
486 switch e2apMsg.messageInfo.messageType {
487 case C.cE2InitiatingMessage:
488 msgInfo.MsgType = e2ap.E2AP_InitiatingMessage
489 switch e2apMsg.messageInfo.messageId {
490 case C.cRICSubscriptionRequest:
491 msgInfo.MsgId = e2ap.E2AP_RICSubscriptionRequest
493 case C.cRICSubscriptionDeleteRequest:
494 msgInfo.MsgId = e2ap.E2AP_RICSubscriptionDeleteRequest
496 case C.cRICIndication:
497 msgInfo.MsgId = e2ap.E2AP_RICIndication
500 case C.cE2SuccessfulOutcome:
501 msgInfo.MsgType = e2ap.E2AP_SuccessfulOutcome
502 switch e2apMsg.messageInfo.messageId {
503 case C.cRICSubscriptionResponse:
504 msgInfo.MsgId = e2ap.E2AP_RICSubscriptionResponse
506 case C.cRICsubscriptionDeleteResponse:
507 msgInfo.MsgId = e2ap.E2AP_RICSubscriptionDeleteResponse
510 case C.cE2UnsuccessfulOutcome:
511 msgInfo.MsgType = e2ap.E2AP_UnsuccessfulOutcome
512 switch e2apMsg.messageInfo.messageId {
513 case C.cRICSubscriptionFailure:
514 msgInfo.MsgId = e2ap.E2AP_RICSubscriptionFailure
516 case C.cRICsubscriptionDeleteFailure:
517 msgInfo.MsgId = e2ap.E2AP_RICSubscriptionDeleteFailure
525 func (e2apMsg *e2apMessage) UnPack(msg *packer.PackedData) *packer.MessageInfo {
526 err := packer.PduPackerUnPack(e2apMsg, msg)
530 return e2apMsg.MessageInfo()
533 func (e2apMsg *e2apMessage) String() string {
534 msgInfo := e2apMsg.MessageInfo()
538 return msgInfo.String()
541 //-----------------------------------------------------------------------------
543 //-----------------------------------------------------------------------------
545 type e2apMsgSubscriptionRequest struct {
547 msgC *C.RICSubscriptionRequest_t
550 func (e2apMsg *e2apMsgSubscriptionRequest) Set(data *e2ap.E2APSubscriptionRequest) error {
552 e2apMsg.msgC = &C.RICSubscriptionRequest_t{}
553 C.initSubsRequest(e2apMsg.msgC)
555 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
557 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
560 if err := (&e2apEntryEventTrigger{entry: &e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition}).set(&data.EventTriggerDefinition); err != nil {
564 if len(data.ActionSetups) > 16 {
565 return fmt.Errorf("IndicationMessage.InterfaceMessage: too long %d while allowed %d", len(data.ActionSetups), 16)
568 e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.contentLength = 0
569 for i := 0; i < len(data.ActionSetups); i++ {
570 item := &e2apEntryActionToBeSetupItem{entry: &e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.contentLength]}
571 e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.contentLength += 1
572 if err := item.set(&data.ActionSetups[i]); err != nil {
579 func (e2apMsg *e2apMsgSubscriptionRequest) Get() (error, *e2ap.E2APSubscriptionRequest) {
581 data := &e2ap.E2APSubscriptionRequest{}
583 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
585 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
588 if err := (&e2apEntryEventTrigger{entry: &e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition}).get(&data.EventTriggerDefinition); err != nil {
592 conlen := (int)(e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.contentLength)
593 data.ActionSetups = make([]e2ap.ActionToBeSetupItem, conlen)
594 for i := 0; i < conlen; i++ {
595 item := &e2apEntryActionToBeSetupItem{entry: &e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[i]}
596 if err := item.get(&data.ActionSetups[i]); err != nil {
604 func (e2apMsg *e2apMsgSubscriptionRequest) PduPack(logBuf []byte, data *packer.PackedData) error {
608 evtTrig := e2apEntryEventTrigger{entry: &e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition}
609 if err := evtTrig.pack(); err != nil {
613 var buflen uint32 = (uint32)(len(data.Buf))
614 errorNro := C.packRICSubscriptionRequest((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
615 if errorNro != C.e2err_OK {
616 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
618 data.Buf = data.Buf[0:buflen]
623 func (e2apMsg *e2apMsgSubscriptionRequest) PduUnPack(logBuf []byte, data *packer.PackedData) error {
625 e2apMsg.msgC = &C.RICSubscriptionRequest_t{}
626 C.initSubsRequest(e2apMsg.msgC)
628 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
629 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2InitiatingMessage || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICSubscriptionRequest {
630 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
632 errorNro := C.getRICSubscriptionRequestData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
633 if errorNro != C.e2err_OK {
634 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
639 evtTrig := e2apEntryEventTrigger{entry: &e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition}
640 if err := evtTrig.unpack(); err != nil {
647 func (e2apMsg *e2apMsgSubscriptionRequest) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
648 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
651 func (e2apMsg *e2apMsgSubscriptionRequest) UnPack(msg *packer.PackedData) error {
652 return packer.PduPackerUnPack(e2apMsg, msg)
655 func (e2apMsg *e2apMsgSubscriptionRequest) String() string {
657 fmt.Fprintln(&b, "ricSubscriptionRequest.")
658 fmt.Fprintln(&b, " ricRequestID.")
659 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
660 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
661 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
662 fmt.Fprintln(&b, " ricSubscription.")
663 fmt.Fprintln(&b, " ricEventTriggerDefinition.")
664 fmt.Fprintln(&b, " contentLength =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.octetString.contentLength)
665 fmt.Fprintln(&b, " interfaceID.globalENBIDPresent =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBIDPresent)
666 if e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBIDPresent {
667 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.contentLength =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBID.pLMNIdentity.contentLength)
668 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[0] =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[0])
669 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[1] =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[1])
670 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[2] =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[2])
671 fmt.Fprintln(&b, " interfaceID.globalENBID.nodeID.bits =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBID.nodeID.bits)
672 fmt.Fprintln(&b, " interfaceID.globalENBID.nodeID.nodeID =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalENBID.nodeID.nodeID)
674 fmt.Fprintln(&b, " interfaceID.globalGNBIDPresent =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBIDPresent)
675 if e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBIDPresent {
676 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.contentLength =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBID.pLMNIdentity.contentLength)
677 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[0] =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[0])
678 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[1] =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[1])
679 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[2] =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[2])
680 fmt.Fprintln(&b, " interfaceID.globalGNBID.nodeID.bits =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBID.nodeID.bits)
681 fmt.Fprintln(&b, " interfaceID.globalGNBID.nodeID.nodeID =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceID.globalGNBID.nodeID.nodeID)
683 fmt.Fprintln(&b, " interfaceDirection= ", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceDirection)
684 fmt.Fprintln(&b, " interfaceMessageType.procedureCode =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceMessageType.procedureCode)
685 fmt.Fprintln(&b, " interfaceMessageType.typeOfMessage =", e2apMsg.msgC.ricSubscription.ricEventTriggerDefinition.interfaceMessageType.typeOfMessage)
686 fmt.Fprintln(&b, " ricActionToBeSetupItemIEs.")
687 fmt.Fprintln(&b, " contentLength =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.contentLength)
690 for (C.uchar)(index) < e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.contentLength {
691 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricActionID =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionID)
692 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricActionType =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionType)
694 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricActionDefinitionPresent =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionDefinitionPresent)
695 if e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionDefinitionPresent {
696 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricActionDefinition.styleID =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionDefinition.styleID)
697 fmt.Fprintln(&b, " ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionDefinition.sequenceOfActionParameters.parameterID =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricActionDefinition.sequenceOfActionParameters.parameterID)
700 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricSubsequentActionPresent =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricSubsequentActionPresent)
701 if e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricSubsequentActionPresent {
702 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricSubsequentAction.ricSubsequentActionType =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricSubsequentAction.ricSubsequentActionType)
703 fmt.Fprintln(&b, " ricActionToBeSetupItem[index].ricSubsequentAction.ricTimeToWait =", e2apMsg.msgC.ricSubscription.ricActionToBeSetupItemIEs.ricActionToBeSetupItem[index].ricSubsequentAction.ricTimeToWait)
710 //-----------------------------------------------------------------------------
712 //-----------------------------------------------------------------------------
713 type e2apMsgSubscriptionResponse struct {
715 msgC *C.RICSubscriptionResponse_t
718 func (e2apMsg *e2apMsgSubscriptionResponse) Set(data *e2ap.E2APSubscriptionResponse) error {
720 e2apMsg.msgC = &C.RICSubscriptionResponse_t{}
721 C.initSubsResponse(e2apMsg.msgC)
723 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
725 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
729 if err := (&e2apEntryAdmittedList{entry: &e2apMsg.msgC.ricActionAdmittedList}).set(&data.ActionAdmittedList); err != nil {
733 e2apMsg.msgC.ricActionNotAdmittedListPresent = false
734 if len(data.ActionNotAdmittedList.Items) > 0 {
735 e2apMsg.msgC.ricActionNotAdmittedListPresent = true
736 if err := (&e2apEntryNotAdmittedList{entry: &e2apMsg.msgC.ricActionNotAdmittedList}).set(&data.ActionNotAdmittedList); err != nil {
743 func (e2apMsg *e2apMsgSubscriptionResponse) Get() (error, *e2ap.E2APSubscriptionResponse) {
745 data := &e2ap.E2APSubscriptionResponse{}
747 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
749 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
753 if err := (&e2apEntryAdmittedList{entry: &e2apMsg.msgC.ricActionAdmittedList}).get(&data.ActionAdmittedList); err != nil {
757 if e2apMsg.msgC.ricActionNotAdmittedListPresent == true {
758 if err := (&e2apEntryNotAdmittedList{entry: &e2apMsg.msgC.ricActionNotAdmittedList}).get(&data.ActionNotAdmittedList); err != nil {
766 func (e2apMsg *e2apMsgSubscriptionResponse) PduPack(logBuf []byte, data *packer.PackedData) error {
767 var buflen uint32 = (uint32)(len(data.Buf))
768 errorNro := C.packRICSubscriptionResponse((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
769 if errorNro != C.e2err_OK {
770 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
772 data.Buf = data.Buf[0:buflen]
776 func (e2apMsg *e2apMsgSubscriptionResponse) PduUnPack(logBuf []byte, data *packer.PackedData) error {
777 e2apMsg.msgC = &C.RICSubscriptionResponse_t{}
778 C.initSubsResponse(e2apMsg.msgC)
780 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
781 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2SuccessfulOutcome || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICSubscriptionResponse {
782 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
784 errorNro := C.getRICSubscriptionResponseData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
785 if errorNro != C.e2err_OK {
786 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
791 func (e2apMsg *e2apMsgSubscriptionResponse) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
792 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
795 func (e2apMsg *e2apMsgSubscriptionResponse) UnPack(msg *packer.PackedData) error {
796 return packer.PduPackerUnPack(e2apMsg, msg)
799 func (e2apMsg *e2apMsgSubscriptionResponse) String() string {
801 fmt.Fprintln(&b, "ricSubscriptionResponse.")
802 fmt.Fprintln(&b, " ricRequestID.")
803 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
804 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
805 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
806 fmt.Fprintln(&b, " ricActionAdmittedList.")
807 fmt.Fprintln(&b, " contentLength =", e2apMsg.msgC.ricActionAdmittedList.contentLength)
810 for (C.uchar)(index) < e2apMsg.msgC.ricActionAdmittedList.contentLength {
811 fmt.Fprintln(&b, " ricActionAdmittedList.ricActionID[index] =", e2apMsg.msgC.ricActionAdmittedList.ricActionID[index])
814 if e2apMsg.msgC.ricActionNotAdmittedListPresent {
815 fmt.Fprintln(&b, " ricActionNotAdmittedListPresent =", e2apMsg.msgC.ricActionNotAdmittedListPresent)
816 fmt.Fprintln(&b, " ricActionNotAdmittedList.")
817 fmt.Fprintln(&b, " contentLength =", e2apMsg.msgC.ricActionNotAdmittedList.contentLength)
819 for (C.uchar)(index) < e2apMsg.msgC.ricActionNotAdmittedList.contentLength {
820 fmt.Fprintln(&b, " RICActionNotAdmittedItem[index].ricActionID =", e2apMsg.msgC.ricActionNotAdmittedList.RICActionNotAdmittedItem[index].ricActionID)
821 fmt.Fprintln(&b, " RICActionNotAdmittedItem[index].ricCause.content =", e2apMsg.msgC.ricActionNotAdmittedList.RICActionNotAdmittedItem[index].ricCause.content)
822 fmt.Fprintln(&b, " RICActionNotAdmittedItem[index].ricCause.cause =", e2apMsg.msgC.ricActionNotAdmittedList.RICActionNotAdmittedItem[index].ricCause.cause)
829 //-----------------------------------------------------------------------------
831 //-----------------------------------------------------------------------------
832 type e2apMsgSubscriptionFailure struct {
834 msgC *C.RICSubscriptionFailure_t
837 func (e2apMsg *e2apMsgSubscriptionFailure) Set(data *e2ap.E2APSubscriptionFailure) error {
839 e2apMsg.msgC = &C.RICSubscriptionFailure_t{}
840 C.initSubsFailure(e2apMsg.msgC)
842 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
844 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
848 if err := (&e2apEntryNotAdmittedList{entry: &e2apMsg.msgC.ricActionNotAdmittedList}).set(&data.ActionNotAdmittedList); err != nil {
852 e2apMsg.msgC.criticalityDiagnosticsPresent = false
853 if data.CriticalityDiagnostics.Present {
854 e2apMsg.msgC.criticalityDiagnosticsPresent = true
855 if err := (&e2apEntryCriticalityDiagnostic{entry: &e2apMsg.msgC.criticalityDiagnostics}).set(&data.CriticalityDiagnostics); err != nil {
863 func (e2apMsg *e2apMsgSubscriptionFailure) Get() (error, *e2ap.E2APSubscriptionFailure) {
865 data := &e2ap.E2APSubscriptionFailure{}
867 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
869 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
873 if err := (&e2apEntryNotAdmittedList{entry: &e2apMsg.msgC.ricActionNotAdmittedList}).get(&data.ActionNotAdmittedList); err != nil {
877 if e2apMsg.msgC.criticalityDiagnosticsPresent == true {
878 data.CriticalityDiagnostics.Present = true
879 if err := (&e2apEntryCriticalityDiagnostic{entry: &e2apMsg.msgC.criticalityDiagnostics}).get(&data.CriticalityDiagnostics); err != nil {
887 func (e2apMsg *e2apMsgSubscriptionFailure) PduPack(logBuf []byte, data *packer.PackedData) error {
888 var buflen uint32 = (uint32)(len(data.Buf))
889 errorNro := C.packRICSubscriptionFailure((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
890 if errorNro != C.e2err_OK {
891 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
893 data.Buf = data.Buf[0:buflen]
897 func (e2apMsg *e2apMsgSubscriptionFailure) PduUnPack(logBuf []byte, data *packer.PackedData) error {
899 e2apMsg.msgC = &C.RICSubscriptionFailure_t{}
900 C.initSubsFailure(e2apMsg.msgC)
902 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
903 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2UnsuccessfulOutcome || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICSubscriptionFailure {
904 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
906 errorNro := C.getRICSubscriptionFailureData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
907 if errorNro != C.e2err_OK {
908 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
914 func (e2apMsg *e2apMsgSubscriptionFailure) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
915 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
918 func (e2apMsg *e2apMsgSubscriptionFailure) UnPack(msg *packer.PackedData) error {
919 return packer.PduPackerUnPack(e2apMsg, msg)
922 func (e2apMsg *e2apMsgSubscriptionFailure) String() string {
924 fmt.Fprintln(&b, "ricSubscriptionFailure.")
925 fmt.Fprintln(&b, " ricRequestID.")
926 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
927 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
928 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
929 fmt.Fprintln(&b, " ricActionNotAdmittedList.")
930 fmt.Fprintln(&b, " contentLength =", e2apMsg.msgC.ricActionNotAdmittedList.contentLength)
933 for (C.uchar)(index) < e2apMsg.msgC.ricActionNotAdmittedList.contentLength {
934 fmt.Fprintln(&b, " RICActionNotAdmittedItem[index].ricActionID =", e2apMsg.msgC.ricActionNotAdmittedList.RICActionNotAdmittedItem[index].ricActionID)
935 fmt.Fprintln(&b, " RICActionNotAdmittedItem[index].ricCause.content =", e2apMsg.msgC.ricActionNotAdmittedList.RICActionNotAdmittedItem[index].ricCause.content)
936 fmt.Fprintln(&b, " RICActionNotAdmittedItem[index].ricCause.cause =", e2apMsg.msgC.ricActionNotAdmittedList.RICActionNotAdmittedItem[index].ricCause.cause)
940 if e2apMsg.msgC.criticalityDiagnosticsPresent {
941 fmt.Fprintln(&b, " criticalityDiagnosticsPresent =", e2apMsg.msgC.criticalityDiagnosticsPresent)
942 fmt.Fprintln(&b, " criticalityDiagnostics.")
943 fmt.Fprintln(&b, " procedureCodePresent =", e2apMsg.msgC.criticalityDiagnostics.procedureCodePresent)
944 fmt.Fprintln(&b, " procedureCode =", e2apMsg.msgC.criticalityDiagnostics.procedureCode)
945 fmt.Fprintln(&b, " triggeringMessagePresent =", e2apMsg.msgC.criticalityDiagnostics.triggeringMessagePresent)
946 fmt.Fprintln(&b, " triggeringMessage =", e2apMsg.msgC.criticalityDiagnostics.triggeringMessage)
947 fmt.Fprintln(&b, " procedureCriticalityPresent=", e2apMsg.msgC.criticalityDiagnostics.procedureCriticalityPresent)
948 fmt.Fprintln(&b, " procedureCriticality =", e2apMsg.msgC.criticalityDiagnostics.procedureCriticality)
949 fmt.Fprintln(&b, " iEsCriticalityDiagnosticsPresent =", e2apMsg.msgC.criticalityDiagnostics.iEsCriticalityDiagnosticsPresent)
950 fmt.Fprintln(&b, " criticalityDiagnosticsIELength =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIELength)
953 for (C.ushort)(index2) < e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIELength {
954 fmt.Fprintln(&b, " criticalityDiagnosticsIEListItem[index2].iECriticality =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIEListItem[index2].iECriticality)
955 fmt.Fprintln(&b, " criticalityDiagnosticsIEListItem[index2].iE_ID =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIEListItem[index2].iE_ID)
956 fmt.Fprintln(&b, " criticalityDiagnosticsIEListItem[index2].typeOfError =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIEListItem[index2].typeOfError)
964 //-----------------------------------------------------------------------------
966 //-----------------------------------------------------------------------------
967 type e2apMsgSubscriptionDeleteRequest struct {
969 msgC *C.RICSubscriptionDeleteRequest_t
972 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) Set(data *e2ap.E2APSubscriptionDeleteRequest) error {
974 e2apMsg.msgC = &C.RICSubscriptionDeleteRequest_t{}
975 C.initSubsDeleteRequest(e2apMsg.msgC)
977 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
979 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
985 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) Get() (error, *e2ap.E2APSubscriptionDeleteRequest) {
987 data := &e2ap.E2APSubscriptionDeleteRequest{}
989 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
991 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
998 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) PduPack(logBuf []byte, data *packer.PackedData) error {
999 var buflen uint32 = (uint32)(len(data.Buf))
1000 errorNro := C.packRICSubscriptionDeleteRequest((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
1001 if errorNro != C.e2err_OK {
1002 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1004 data.Buf = data.Buf[0:buflen]
1009 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) PduUnPack(logBuf []byte, data *packer.PackedData) error {
1011 e2apMsg.msgC = &C.RICSubscriptionDeleteRequest_t{}
1012 C.initSubsDeleteRequest(e2apMsg.msgC)
1014 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
1015 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2InitiatingMessage || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICSubscriptionDeleteRequest {
1016 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
1018 errorNro := C.getRICSubscriptionDeleteRequestData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
1019 if errorNro != C.e2err_OK {
1020 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1025 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
1026 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
1029 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) UnPack(msg *packer.PackedData) error {
1030 return packer.PduPackerUnPack(e2apMsg, msg)
1033 func (e2apMsg *e2apMsgSubscriptionDeleteRequest) String() string {
1035 fmt.Fprintln(&b, "ricSubscriptionDeleteRequest.")
1036 fmt.Fprintln(&b, " ricRequestID.")
1037 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
1038 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
1039 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
1043 //-----------------------------------------------------------------------------
1045 //-----------------------------------------------------------------------------
1046 type e2apMsgSubscriptionDeleteResponse struct {
1048 msgC *C.RICSubscriptionDeleteResponse_t
1051 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) Set(data *e2ap.E2APSubscriptionDeleteResponse) error {
1053 e2apMsg.msgC = &C.RICSubscriptionDeleteResponse_t{}
1054 C.initSubsDeleteResponse(e2apMsg.msgC)
1056 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
1058 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
1064 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) Get() (error, *e2ap.E2APSubscriptionDeleteResponse) {
1066 data := &e2ap.E2APSubscriptionDeleteResponse{}
1068 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
1070 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
1076 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) PduPack(logBuf []byte, data *packer.PackedData) error {
1077 var buflen uint32 = (uint32)(len(data.Buf))
1078 errorNro := C.packRICSubscriptionDeleteResponse((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
1079 if errorNro != C.e2err_OK {
1080 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1082 data.Buf = data.Buf[0:buflen]
1086 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) PduUnPack(logBuf []byte, data *packer.PackedData) error {
1087 e2apMsg.msgC = &C.RICSubscriptionDeleteResponse_t{}
1088 C.initSubsDeleteResponse(e2apMsg.msgC)
1090 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
1091 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2SuccessfulOutcome || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICsubscriptionDeleteResponse {
1092 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
1094 errorNro := C.getRICSubscriptionDeleteResponseData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
1095 if errorNro != C.e2err_OK {
1096 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1101 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
1102 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
1105 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) UnPack(msg *packer.PackedData) error {
1106 return packer.PduPackerUnPack(e2apMsg, msg)
1109 func (e2apMsg *e2apMsgSubscriptionDeleteResponse) String() string {
1111 fmt.Fprintln(&b, "ricSubscriptionDeleteResponse.")
1112 fmt.Fprintln(&b, " ricRequestID.")
1113 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
1114 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
1115 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
1119 //-----------------------------------------------------------------------------
1121 //-----------------------------------------------------------------------------
1122 type e2apMsgSubscriptionDeleteFailure struct {
1124 msgC *C.RICSubscriptionDeleteFailure_t
1127 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) Set(data *e2ap.E2APSubscriptionDeleteFailure) error {
1129 e2apMsg.msgC = &C.RICSubscriptionDeleteFailure_t{}
1130 C.initSubsDeleteFailure(e2apMsg.msgC)
1132 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
1134 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
1138 e2apMsg.msgC.ricCause.content = (C.uchar)(data.Cause.Content)
1139 e2apMsg.msgC.ricCause.cause = (C.uchar)(data.Cause.CauseVal)
1141 e2apMsg.msgC.criticalityDiagnosticsPresent = false
1142 if data.CriticalityDiagnostics.Present {
1143 e2apMsg.msgC.criticalityDiagnosticsPresent = true
1144 if err := (&e2apEntryCriticalityDiagnostic{entry: &e2apMsg.msgC.criticalityDiagnostics}).set(&data.CriticalityDiagnostics); err != nil {
1151 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) Get() (error, *e2ap.E2APSubscriptionDeleteFailure) {
1153 data := &e2ap.E2APSubscriptionDeleteFailure{}
1155 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
1157 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
1161 data.Cause.Content = (uint8)(e2apMsg.msgC.ricCause.content)
1162 data.Cause.CauseVal = (uint8)(e2apMsg.msgC.ricCause.cause)
1164 if e2apMsg.msgC.criticalityDiagnosticsPresent == true {
1165 data.CriticalityDiagnostics.Present = true
1166 if err := (&e2apEntryCriticalityDiagnostic{entry: &e2apMsg.msgC.criticalityDiagnostics}).get(&data.CriticalityDiagnostics); err != nil {
1173 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) PduPack(logBuf []byte, data *packer.PackedData) error {
1174 var buflen uint32 = (uint32)(len(data.Buf))
1175 errorNro := C.packRICSubscriptionDeleteFailure((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
1176 if errorNro != C.e2err_OK {
1177 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1179 data.Buf = data.Buf[0:buflen]
1183 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) PduUnPack(logBuf []byte, data *packer.PackedData) error {
1185 e2apMsg.msgC = &C.RICSubscriptionDeleteFailure_t{}
1186 C.initSubsDeleteFailure(e2apMsg.msgC)
1188 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
1189 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2UnsuccessfulOutcome || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICsubscriptionDeleteFailure {
1190 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
1192 errorNro := C.getRICSubscriptionDeleteFailureData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
1193 if errorNro != C.e2err_OK {
1194 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1200 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
1201 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
1204 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) UnPack(msg *packer.PackedData) error {
1205 return packer.PduPackerUnPack(e2apMsg, msg)
1208 func (e2apMsg *e2apMsgSubscriptionDeleteFailure) String() string {
1210 fmt.Fprintln(&b, "ricSubscriptionDeleteFailure.")
1211 fmt.Fprintln(&b, " ricRequestID.")
1212 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
1213 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
1214 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
1216 if e2apMsg.msgC.criticalityDiagnosticsPresent {
1217 fmt.Fprintln(&b, " criticalityDiagnosticsPresent =", e2apMsg.msgC.criticalityDiagnosticsPresent)
1218 fmt.Fprintln(&b, " criticalityDiagnostics.")
1219 fmt.Fprintln(&b, " procedureCodePresent =", e2apMsg.msgC.criticalityDiagnostics.procedureCodePresent)
1220 fmt.Fprintln(&b, " procedureCode =", e2apMsg.msgC.criticalityDiagnostics.procedureCode)
1221 fmt.Fprintln(&b, " triggeringMessagePresent =", e2apMsg.msgC.criticalityDiagnostics.triggeringMessagePresent)
1222 fmt.Fprintln(&b, " triggeringMessage =", e2apMsg.msgC.criticalityDiagnostics.triggeringMessage)
1223 fmt.Fprintln(&b, " procedureCriticalityPresent=", e2apMsg.msgC.criticalityDiagnostics.procedureCriticalityPresent)
1224 fmt.Fprintln(&b, " procedureCriticality =", e2apMsg.msgC.criticalityDiagnostics.procedureCriticality)
1225 fmt.Fprintln(&b, " iEsCriticalityDiagnosticsPresent =", e2apMsg.msgC.criticalityDiagnostics.iEsCriticalityDiagnosticsPresent)
1226 fmt.Fprintln(&b, " criticalityDiagnosticsIELength =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIELength)
1229 for (C.ushort)(index2) < e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIELength {
1230 fmt.Fprintln(&b, " criticalityDiagnosticsIEListItem[index2].iECriticality =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIEListItem[index2].iECriticality)
1231 fmt.Fprintln(&b, " criticalityDiagnosticsIEListItem[index2].iE_ID =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIEListItem[index2].iE_ID)
1232 fmt.Fprintln(&b, " criticalityDiagnosticsIEListItem[index2].typeOfError =", e2apMsg.msgC.criticalityDiagnostics.criticalityDiagnosticsIEListItem[index2].typeOfError)
1240 //-----------------------------------------------------------------------------
1242 //-----------------------------------------------------------------------------
1243 type e2apMsgIndication struct {
1245 msgC *C.RICIndication_t
1248 func (e2apMsg *e2apMsgIndication) Set(data *e2ap.E2APIndication) error {
1250 e2apMsg.msgC = &C.RICIndication_t{}
1251 C.initIndication(e2apMsg.msgC)
1253 e2apMsg.msgC.ranFunctionID = (C.uint16_t)(data.FunctionId)
1254 e2apMsg.msgC.ricIndicationSN = (C.int32_t)(data.IndicationSn)
1255 e2apMsg.msgC.ricIndicationType = (C.uint64_t)(data.IndicationType)
1257 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).set(&data.RequestId); err != nil {
1260 if err := (&e2apEntryIndicationHeader{entry: &e2apMsg.msgC.ricIndicationHeader}).set(&data.IndicationHeader); err != nil {
1263 if err := (&e2apEntryIndicationMessage{entry: &e2apMsg.msgC.ricIndicationMessage}).set(&data.IndicationMessage); err != nil {
1267 if err := (&e2apEntryCallProcessId{entry: &e2apMsg.msgC.ricCallProcessID}).set(&data.CallProcessId); err != nil {
1274 func (e2apMsg *e2apMsgIndication) Get() (error, *e2ap.E2APIndication) {
1276 data := &e2ap.E2APIndication{}
1278 data.FunctionId = (e2ap.FunctionId)(e2apMsg.msgC.ranFunctionID)
1279 data.IndicationSn = (int32)(e2apMsg.msgC.ricIndicationSN)
1280 data.IndicationType = (uint64)(e2apMsg.msgC.ricIndicationType)
1282 if err := (&e2apEntryRequestID{entry: &e2apMsg.msgC.ricRequestID}).get(&data.RequestId); err != nil {
1285 if err := (&e2apEntryIndicationHeader{entry: &e2apMsg.msgC.ricIndicationHeader}).get(&data.IndicationHeader); err != nil {
1288 if err := (&e2apEntryIndicationMessage{entry: &e2apMsg.msgC.ricIndicationMessage}).get(&data.IndicationMessage); err != nil {
1292 if err := (&e2apEntryCallProcessId{entry: &e2apMsg.msgC.ricCallProcessID}).get(&data.CallProcessId); err != nil {
1299 func (e2apMsg *e2apMsgIndication) PduPack(logBuf []byte, data *packer.PackedData) error {
1302 callProcId := e2apEntryCallProcessId{entry: &e2apMsg.msgC.ricCallProcessID}
1303 if err := callProcId.pack(); err != nil {
1307 var buflen uint32 = (uint32)(len(data.Buf))
1308 errorNro := C.packRICIndication((*C.size_t)(unsafe.Pointer(&buflen)), (*C.uchar)(unsafe.Pointer(&data.Buf[0])), (*C.char)(unsafe.Pointer(&logBuf[0])), e2apMsg.msgC)
1309 if errorNro != C.e2err_OK {
1310 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1312 data.Buf = data.Buf[0:buflen]
1316 func (e2apMsg *e2apMsgIndication) PduUnPack(logBuf []byte, data *packer.PackedData) error {
1318 e2apMsg.msgC = &C.RICIndication_t{}
1319 C.initIndication(e2apMsg.msgC)
1321 e2apMsg.e2apMessage.PduUnPack(logBuf, data)
1322 if e2apMsg.e2apMessage.messageInfo.messageType != C.cE2InitiatingMessage || e2apMsg.e2apMessage.messageInfo.messageId != C.cRICIndication {
1323 return fmt.Errorf("unpackE2AP_pdu failed -> %s", e2apMsg.e2apMessage.String())
1325 errorNro := C.getRICIndicationData(e2apMsg.e2apMessage.pdu, e2apMsg.msgC)
1326 if errorNro != C.e2err_OK {
1327 return fmt.Errorf("%s", C.GoString(C.getE2ErrorString(errorNro)))
1331 callProcId := e2apEntryCallProcessId{entry: &e2apMsg.msgC.ricCallProcessID}
1332 if err := callProcId.unpack(); err != nil {
1339 func (e2apMsg *e2apMsgIndication) Pack(trg *packer.PackedData) (error, *packer.PackedData) {
1340 return packer.PduPackerPackAllocTrg(e2apMsg, trg)
1343 func (e2apMsg *e2apMsgIndication) UnPack(msg *packer.PackedData) error {
1344 return packer.PduPackerUnPack(e2apMsg, msg)
1347 func (e2apMsg *e2apMsgIndication) String() string {
1349 fmt.Fprintln(&b, "ricIndication.")
1350 fmt.Fprintln(&b, " ricRequestID.")
1351 fmt.Fprintln(&b, " ricRequestorID =", e2apMsg.msgC.ricRequestID.ricRequestorID)
1352 fmt.Fprintln(&b, " ricRequestSequenceNumber =", e2apMsg.msgC.ricRequestID.ricRequestSequenceNumber)
1353 fmt.Fprintln(&b, " ranFunctionID =", e2apMsg.msgC.ranFunctionID)
1355 fmt.Fprintln(&b, " ricActionID =", e2apMsg.msgC.ricActionID)
1356 fmt.Fprintln(&b, " ricIndicationSN =", e2apMsg.msgC.ricIndicationSN)
1357 fmt.Fprintln(&b, " ricIndicationType =", e2apMsg.msgC.ricIndicationType)
1358 fmt.Fprintln(&b, " ricIndication.ricIndicationHeader.")
1359 fmt.Fprintln(&b, " interfaceID.globalENBIDPresent =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBIDPresent)
1360 if e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBIDPresent {
1361 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.contentLength =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBID.pLMNIdentity.contentLength)
1362 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[0] =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[0])
1363 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[1] =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[1])
1364 fmt.Fprintln(&b, " interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[2] =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBID.pLMNIdentity.pLMNIdentityVal[2])
1365 fmt.Fprintln(&b, " interfaceID.globalENBID.nodeID.bits =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBID.nodeID.bits)
1366 fmt.Fprintln(&b, " interfaceID.globalENBID.nodeID.nodeID =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalENBID.nodeID.nodeID)
1368 fmt.Fprintln(&b, " interfaceID.globalGNBIDPresent =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBIDPresent)
1369 if e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBIDPresent {
1370 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.contentLength =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBID.pLMNIdentity.contentLength)
1371 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[0] =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[0])
1372 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[1] =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[1])
1373 fmt.Fprintln(&b, " interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[2] =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBID.pLMNIdentity.pLMNIdentityVal[2])
1374 fmt.Fprintln(&b, " interfaceID.globalGNBID.nodeID.bits =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBID.nodeID.bits)
1375 fmt.Fprintln(&b, " interfaceID.globalGNBID.nodeID.nodeID =", e2apMsg.msgC.ricIndicationHeader.interfaceID.globalGNBID.nodeID.nodeID)
1377 fmt.Fprintln(&b, " ricIndication.ricIndicationMessage.interfaceMessage.contentLength =", e2apMsg.msgC.ricIndicationMessage.interfaceMessage.contentLength)
1378 fmt.Fprintln(&b, " ricIndication.ricIndicationMessage.interfaceMessage.data =", e2apMsg.msgC.ricIndicationMessage.interfaceMessage.data[:e2apMsg.msgC.ricIndicationMessage.interfaceMessage.contentLength])
1379 // fmt.Fprintln(&b," ricIndication.ricCallProcessID.ricCallProcessIDVal =", e2apMsg.msgC.ricCallProcessID.ricCallProcessIDVal)
1383 //-----------------------------------------------------------------------------
1384 // Public E2AP packer creators
1385 //-----------------------------------------------------------------------------
1387 type cppasn1E2APPacker struct{}
1389 func (*cppasn1E2APPacker) NewPackerSubscriptionRequest() e2ap.E2APMsgPackerSubscriptionRequestIf {
1390 return &e2apMsgSubscriptionRequest{}
1393 func (*cppasn1E2APPacker) NewPackerSubscriptionResponse() e2ap.E2APMsgPackerSubscriptionResponseIf {
1394 return &e2apMsgSubscriptionResponse{}
1397 func (*cppasn1E2APPacker) NewPackerSubscriptionFailure() e2ap.E2APMsgPackerSubscriptionFailureIf {
1398 return &e2apMsgSubscriptionFailure{}
1401 func (*cppasn1E2APPacker) NewPackerSubscriptionDeleteRequest() e2ap.E2APMsgPackerSubscriptionDeleteRequestIf {
1402 return &e2apMsgSubscriptionDeleteRequest{}
1405 func (*cppasn1E2APPacker) NewPackerSubscriptionDeleteResponse() e2ap.E2APMsgPackerSubscriptionDeleteResponseIf {
1406 return &e2apMsgSubscriptionDeleteResponse{}
1409 func (*cppasn1E2APPacker) NewPackerSubscriptionDeleteFailure() e2ap.E2APMsgPackerSubscriptionDeleteFailureIf {
1410 return &e2apMsgSubscriptionDeleteFailure{}
1413 func (*cppasn1E2APPacker) NewPackerIndication() e2ap.E2APMsgPackerIndicationIf {
1414 return &e2apMsgIndication{}
1417 func (*cppasn1E2APPacker) MessageInfo(msg *packer.PackedData) *packer.MessageInfo {
1418 e2apMsg := &e2apMessage{}
1419 return e2apMsg.UnPack(msg)
1422 func NewAsn1E2Packer() e2ap.E2APPackerIf {
1423 return &cppasn1E2APPacker{}