X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fcontrol%2Fe2ap.go;h=54eba76a54fb727604f009224bd75fb31824a8cf;hb=26dfa71ac6430e592ad628a14efd8e1696e1e169;hp=d3bd36b255b0859357f2d82c6e5266a541d8bf96;hpb=37f85a0157751a7e34e03f766d356ce890bad838;p=ric-plt%2Fsubmgr.git diff --git a/pkg/control/e2ap.go b/pkg/control/e2ap.go index d3bd36b..54eba76 100644 --- a/pkg/control/e2ap.go +++ b/pkg/control/e2ap.go @@ -27,6 +27,7 @@ import "C" import ( "encoding/hex" "fmt" + "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap" "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap_wrapper" "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/models" @@ -35,6 +36,14 @@ import ( var packerif e2ap.E2APPackerIf = e2ap_wrapper.NewAsn1E2Packer() +func GetPackerIf() e2ap.E2APPackerIf { + return packerif +} + +func SetPackerIf(iface e2ap.E2APPackerIf) { + packerif = iface +} + type E2ap struct { } @@ -52,7 +61,8 @@ func (c *E2ap) FillSubscriptionReqMsgs(params interface{}, subreqList *e2ap.Subs if p.RANFunctionID != nil { subReqMsg.FunctionId = (e2ap.FunctionId)(*p.RANFunctionID) } - subReqMsg.RequestId = e2ap.RequestId{uint32(*subscriptionDetail.RequestorID), uint32(*subscriptionDetail.InstanceID)} + e2EventInstanceID := restSubscription.GetE2IdFromXappIdToE2Id(*subscriptionDetail.XappEventInstanceID) + subReqMsg.RequestId = e2ap.RequestId{uint32(*subscriptionDetail.XappEventInstanceID), uint32(e2EventInstanceID)} subReqMsg.EventTriggerDefinition.Data.Data = []byte(subscriptionDetail.EventTriggers.OctetString) subReqMsg.EventTriggerDefinition.Data.Length = uint64(len(subscriptionDetail.EventTriggers.OctetString))