X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=cmd%2Frtmgr.go;h=2d3d81e8677d15f698a32dc554bcd46805cae901;hb=a8b2771dbc9eb731e1f15c0d4d96a57ab5ab8f5e;hp=af0aba192604501548734f720cfc70026f14b810;hpb=2c131acf0418c45d9045a6a81baf3e7d047fcb38;p=ric-plt%2Frtmgr.git diff --git a/cmd/rtmgr.go b/cmd/rtmgr.go index af0aba1..2d3d81e 100644 --- a/cmd/rtmgr.go +++ b/cmd/rtmgr.go @@ -49,6 +49,14 @@ import ( const SERVICENAME = "rtmgr" +/*type RMRUpdateType int + +const ( + XappType = iota + SubsType + E2Type +)*/ + func SetupCloseHandler() { c := make(chan os.Signal, 2) signal.Notify(c, os.Interrupt, syscall.SIGTERM) @@ -67,18 +75,19 @@ func main() { rtmgr.Eps = make(rtmgr.Endpoints) rtmgr.Mtype = make(rtmgr.MessageTypeList) rtmgr.Rtmgr_ready = false + rtmgr.RMRConnStatus = make(map[string]bool) -// RMR thread is starting port: 4560 + // RMR thread is starting port: 4560 c := nbi.NewControl() go c.Run() -// Waiting for RMR to be ready + // Waiting for RMR to be ready time.Sleep(time.Duration(2) * time.Second) for xapp.Rmr.IsReady() == false { - time.Sleep(time.Duration(2) * time.Second) + time.Sleep(time.Duration(2) * time.Second) } - dummy_whid := int(xapp.Rmr.Openwh("localhost:4560")) + dummy_whid := int(xapp.Rmr.Openwh("rtmgr:4560")) xapp.Logger.Info("created dummy Wormhole ID for routingmanager and dummy_whid :%d", dummy_whid) nbi.Serve()