Added new implementation for the following feature requests:
[ric-plt/xapp-frame.git] / test / xapp / generator.go
index 9f3527d..7db5f80 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 subId=%d meid=%v", params.Mtype, params.SubId, params.Meid)
 
        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"}
+               params.Xid = "TestXID"
+               if ok := xapp.Rmr.SendMsg(params); ok {
                        tx++
                        if ack != 0 {
                                wg.Add(1)