200 + format

This commit is contained in:
Andrea Lacava 2023-05-04 17:12:49 -04:00
parent 6a0da46d20
commit ab0229b28c
2 changed files with 21 additions and 20 deletions

View File

@ -9,6 +9,7 @@ import (
"strings" "strings"
"sync" "sync"
"time" "time"
"gerrit.o-ran-sc.org/r/ric-plt/sdlgo" "gerrit.o-ran-sc.org/r/ric-plt/sdlgo"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp" "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
//"github.com/go-redis/redis" //"github.com/go-redis/redis"
@ -94,7 +95,7 @@ func (c *Control) startTimerSubReq() {
count++ count++
xapp.Logger.Debug("send RIC_SUB_REQ to gNodeB with cnt=%d", count) xapp.Logger.Debug("send RIC_SUB_REQ to gNodeB with cnt=%d", count)
log.Printf("send RIC_SUB_REQ to gNodeB with cnt=%d", count) log.Printf("send RIC_SUB_REQ to gNodeB with cnt=%d", count)
err := c.sendRicSubRequest(1001, 200, 0) err := c.sendRicSubRequest(1001, 0, 200)
if err != nil && count < MAX_SUBSCRIPTION_ATTEMPTS { if err != nil && count < MAX_SUBSCRIPTION_ATTEMPTS {
t.Reset(5 * time.Second) t.Reset(5 * time.Second)
} else { } else {
@ -984,7 +985,6 @@ func (c *Control) handleIndication(params *xapp.RMRParams) (err error) {
continue continue
} }
//err = c.client.Set("{TS-cell-metrics}," + cellIDHdr, newCellJsonStr, 0).Err() //err = c.client.Set("{TS-cell-metrics}," + cellIDHdr, newCellJsonStr, 0).Err()
//if err != nil { //if err != nil {
// xapp.Logger.Error("Failed to set CellMetrics into redis with CellID [%s]: %v", cellIDHdr, err) // xapp.Logger.Error("Failed to set CellMetrics into redis with CellID [%s]: %v", cellIDHdr, err)
@ -1247,7 +1247,7 @@ func (c *Control) sendRicSubRequest(subID int, requestSN int, funcID int) (err e
log.Printf("Set Payload: %x", params.Payload) log.Printf("Set Payload: %x", params.Payload)
//params.Meid = &xapp.RMRMeid{RanName: c.ranList[index]} //params.Meid = &xapp.RMRMeid{RanName: c.ranList[index]}
params.Meid = &xapp.RMRMeid{PlmnID: "373437", EnbID: "10110101110001100111011110001", RanName: "gnb_734_733_b5c67788"} params.Meid = &xapp.RMRMeid{PlmnID: "313131", EnbID: "::", RanName: "gnb_131_133_31000000"}
xapp.Logger.Debug("The RMR message to be sent is %d with SubId=%d", params.Mtype, params.SubId) xapp.Logger.Debug("The RMR message to be sent is %d with SubId=%d", params.Mtype, params.SubId)
log.Printf("The RMR message to be sent is %d with SubId=%d", params.Mtype, params.SubId) log.Printf("The RMR message to be sent is %d with SubId=%d", params.Mtype, params.SubId)
@ -1283,10 +1283,10 @@ func (c *Control) sendRicSubDelRequest(subID int, requestSN int, funcID int) (er
if funcID == 0 { if funcID == 0 {
//params.Meid = &xapp.RMRMeid{PlmnID: "::", EnbID: "::", RanName: "0"} //params.Meid = &xapp.RMRMeid{PlmnID: "::", EnbID: "::", RanName: "0"}
params.Meid = &xapp.RMRMeid{PlmnID: "373437", EnbID: "10110101110001100111011110001", RanName: "gnb_734_733_b5c67788"} params.Meid = &xapp.RMRMeid{PlmnID: "313131", EnbID: "::", RanName: "gnb_131_133_31000000"}
} else { } else {
//params.Meid = &xapp.RMRMeid{PlmnID: "::", EnbID: "::", RanName: "3"} //params.Meid = &xapp.RMRMeid{PlmnID: "::", EnbID: "::", RanName: "3"}
params.Meid = &xapp.RMRMeid{PlmnID: "373437", EnbID: "10110101110001100111011110001", RanName: "gnb_734_733_b5c67788"} params.Meid = &xapp.RMRMeid{PlmnID: "313131", EnbID: "::", RanName: "gnb_131_133_31000000"}
} }
xapp.Logger.Debug("The RMR message to be sent is %d with SubId=%d", params.Mtype, params.SubId) xapp.Logger.Debug("The RMR message to be sent is %d with SubId=%d", params.Mtype, params.SubId)
@ -1303,4 +1303,3 @@ func (c *Control) sendRicSubDelRequest(subID int, requestSN int, funcID int) (er
return nil return nil
} }

View File

@ -20,4 +20,6 @@ unset $pod_name
pod_name=$(kubectl get pods -n ricxapp --no-headers -o custom-columns=":metadata.name") pod_name=$(kubectl get pods -n ricxapp --no-headers -o custom-columns=":metadata.name")
kubectl exec -ti -n ricxapp $pod_name bash echo kubectl exec -ti -n ricxapp $pod_name bash
# ./kpimon -f /opt/ric/config/config-file.json