import (
"gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/xapptweaks"
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
+ "strconv"
"strings"
"testing"
"time"
}
}
-func (tc *RmrStubControl) Init(desc string, rtfile string, port string, stat string, initMsg int) {
+func (tc *RmrStubControl) Init(desc string, srcId RmrSrcId, rtgSvc RmrRtgSvc, stat string, initMsg int) {
tc.InitMsg = initMsg
tc.Active = false
tc.RecvChan = make(chan *xapptweaks.RMRParams)
- tc.RmrControl.Init(desc, rtfile, port)
+ tc.RmrControl.Init(desc, srcId, rtgSvc)
tc.RmrWrapper.Init()
- tc.Rmr = xapp.NewRMRClientWithParams("tcp:"+port, 65534, 1, 0, stat)
+ tc.Rmr = xapp.NewRMRClientWithParams("tcp:"+strconv.FormatUint(uint64(srcId.Port), 10), 65534, 1, 0, stat)
tc.Rmr.SetReadyCB(tc.ReadyCB, nil)
go tc.Rmr.Start(tc)
msg := xapptweaks.NewParams(params)
tc.CntRecvMsg++
+ cPay := append(msg.Payload[:0:0], msg.Payload...)
+ msg.Payload = cPay
+ msg.PayloadLen = len(cPay)
+
if msg.Mtype == tc.InitMsg {
tc.Logger.Info("Testing message ignore %s", msg.String())
tc.SetActive()