Update available SDL version to v0.7.0
[ric-plt/xapp-frame.git] / test / xapp / generator.go
index 9f3527d..5a17ad4 100755 (executable)
@@ -17,8 +17,8 @@ var (
 type Generator struct {
 }
 
-func (m Generator) Consume(mtype, subId int, payload []byte, meid *xapp.RMRMeid) (err error) {
-       xapp.Logger.Debug("message received - type=%d subId=%d meid=%v", mtype, subId, meid)
+func (m Generator) Consume(params *xapp.RMRParams) (err error) {
+       xapp.Logger.Debug("message received - type=%d txid=%s ubId=%d meid=%s", params.Mtype, params.Xid, params.SubId, params.Meid.RanName)
 
        mux.Lock()
        rx++
@@ -54,7 +54,13 @@ func runTests(mtype, subId, amount, msize, ack int) {
 
        start := time.Now()
        for i := 0; i < amount; i++ {
-               if ok := xapp.Rmr.Send(mtype, subId, s, &xapp.RMRMeid{PlmnID: "123456", EnbID: "7788"}); ok {
+               params := &xapp.RMRParams{}
+               params.Mtype = mtype
+               params.SubId = subId
+               params.Payload = s
+               params.Meid = &xapp.RMRMeid{PlmnID: "123456", EnbID: "7788", RanName: "RanName-gnb-1234"}
+               params.Xid = "TestXID1234"
+               if ok := xapp.Rmr.SendMsg(params); ok {
                        tx++
                        if ack != 0 {
                                wg.Add(1)