"strconv"\r
"sync"\r
"time"\r
-\r
+ //"encoding/hex"\r
"gerrit.o-ran-sc.org/r/ric-app/rc/protocol/grpc/ricmsgcommrpc/rc"\r
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"\r
)\r
\r
lNrOrEUtraCellType := aRicHoControlMsg.RicControlGrpcReqPtr.RICControlMessageData.RICControlCellTypeVal\r
lTargetCellVal := aRicHoControlMsg.RicControlGrpcReqPtr.RICControlMessageData.TargetCellID\r
+ //lTargetCellValBuf, _:= hex.DecodeString(lTargetCellVal)\r
lTargetCellValBuf := []byte(lTargetCellVal)\r
//lNRPlmnId := []byte(aRicHoControlMsg.RicControlGrpcReqPtr.RICControlMessageData.TargetCellID.PlmnID)\r
//lNRCellId := aRicHoControlMsg.RicControlGrpcReqPtr.RICControlMessageData.TargetCellID.NRCellID\r
\r
\r
var lRicControlMessage []byte = make([]byte, 1024)\r
- lRicControlMessageEncoded, err := e2sm.SetRicControlMessage(lRicControlMessage, lTargetPrimaryCell, lTargetCell, lNrCGIOrECGI, int64(lNrOrEUtraCellType), lTargetCellValBuf)\r
+ lRicControlMessageEncoded, err := e2sm.SetRicControlMessage(lRicControlMessage, lTargetPrimaryCell, lTargetCell, lNrCGIOrECGI, int64(lNrOrEUtraCellType), ueId_data.pLMNIdentitybuf, lTargetCellValBuf)\r
if err != nil {\r
xapp.Logger.Error("SetRicControlMessage Failed: %v, UEID:%v", err, aRicHoControlMsg.RicControlGrpcReqPtr.RICControlHeaderData.UEID)\r
log.Printf("SetRicControlMessage Failed: %v, UEID:%v", err, aRicHoControlMsg.RicControlGrpcReqPtr.RICControlHeaderData.UEID)\r
\r
func HandleControlFailure(params *xapp.RMRParams) (err error) {\r
\r
+ var e2ap *E2ap\r
+\r
xapp.Logger.Debug("The SubId in RIC_CONTROL_FAILURE is %d", params.SubId)\r
log.Printf("The SubId in RIC_CONTROL_FAILURE is %d", params.SubId)\r
\r
+ controlAck, err := e2ap.GetControlFailureMsg(params.Payload)\r
+ if err != nil {\r
+ xapp.Logger.Debug("Failed to decode RIC Control message: %v", err)\r
+ log.Println("Failed to decode RIC Control Ack: %v", err)\r
+ return\r
+ }\r
+ log.Println("E2ap RIC Control Ack message decoded \n")\r
+ xapp.Logger.Debug("E2ap RIC Control Ack message decoded \n")\r
+\r
+ gControlData.eventRicControlReqExpiredMu.Lock()\r
+ _, ok := gControlData.eventRicControlReqExpiredMap[int(controlAck.InstanceId)]\r
+ if !ok {\r
+ gControlData.eventRicControlReqExpiredMu.Unlock()\r
+ xapp.Logger.Debug("RIC_CONTROL_REQ has been deleted!")\r
+ log.Printf("RIC_CONTROL_REQ has been deleted!")\r
+ return nil\r
+ } else {\r
+ gControlData.eventRicControlReqExpiredMap[int(controlAck.InstanceId)] = true\r
+ gControlData.eventRicControlReqExpiredMu.Unlock()\r
+ }\r
return nil\r
}\r