X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fhandlers%2Frmrmsghandlers%2Fe2_setup_request_notification_handler.go;h=d65516c71f7ec3004e36cbd1af540f4243b37549;hb=565a58f44b5a99f4088b5f0c7ef3f7b0498f2ced;hp=de17a4f0625cf9f33e0c8247fe1adb041763e634;hpb=7abc043a40d183f290391f6c99dfc98062f5f237;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go b/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go index de17a4f..d65516c 100644 --- a/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go +++ b/E2Manager/handlers/rmrmsghandlers/e2_setup_request_notification_handler.go @@ -163,6 +163,8 @@ func (h E2SetupRequestNotificationHandler) handleUnsuccessfulResponse(nodebInfo responsePayload = replaceEmptyTagsWithSelfClosing(responsePayload) + h.logger.Infof("#E2SetupRequestNotificationHandler.handleUnsuccessfulResponse - payload: %s", responsePayload) + msg := models.NewRmrMessage(rmrCgo.RIC_E2_SETUP_FAILURE, nodebInfo.RanName, responsePayload, req.TransactionId, req.GetMsgSrc()) h.logger.Infof("#E2SetupRequestNotificationHandler.handleUnsuccessfulResponse - RAN name: %s - RIC_E2_SETUP_RESP message has been built successfully. Message: %x", nodebInfo.RanName, msg) _ = h.rmrSender.WhSend(msg) @@ -171,7 +173,7 @@ func (h E2SetupRequestNotificationHandler) handleUnsuccessfulResponse(nodebInfo func (h E2SetupRequestNotificationHandler) handleSuccessfulResponse(ranName string, req *models.NotificationRequest, setupRequest *models.E2SetupRequestMessage) { - plmnId := buildPlmnId(strconv.Itoa(h.config.GlobalRicId.Mcc), strconv.Itoa(h.config.GlobalRicId.Mnc)) + plmnId := buildPlmnId(h.config.GlobalRicId.Mcc, h.config.GlobalRicId.Mnc) ricNearRtId, err := convertTo20BitString(h.config.GlobalRicId.RicId) if err != nil { @@ -187,6 +189,8 @@ func (h E2SetupRequestNotificationHandler) handleSuccessfulResponse(ranName stri responsePayload = replaceEmptyTagsWithSelfClosing(responsePayload) + h.logger.Infof("#E2SetupRequestNotificationHandler.handleSuccessfulResponse - payload: %s", responsePayload) + msg := models.NewRmrMessage(rmrCgo.RIC_E2_SETUP_RESP, ranName, responsePayload, req.TransactionId, req.GetMsgSrc()) h.logger.Infof("#E2SetupRequestNotificationHandler.handleSuccessfulResponse - RAN name: %s - RIC_E2_SETUP_RESP message has been built successfully. Message: %x", ranName, msg) _ = h.rmrSender.Send(msg) @@ -195,16 +199,16 @@ func (h E2SetupRequestNotificationHandler) handleSuccessfulResponse(ranName stri func buildPlmnId(mmc string, mnc string) string{ var b strings.Builder - b.WriteString(string (mmc[1])) - b.WriteString(string (mmc[0])) + b.WriteByte(mmc[1]) + b.WriteByte(mmc[0]) if len(mnc) == 2 { b.WriteString("F") } else { - b.WriteString(string (mnc[2])) + b.WriteByte(mnc[2]) } - b.WriteString(string (mmc[2])) - b.WriteString(string (mnc[1])) - b.WriteString(string (mnc[0])) + b.WriteByte(mmc[2]) + b.WriteByte(mnc[1]) + b.WriteByte(mnc[0]) return b.String() }