package xapp
import (
- rnibcommon "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/common"
rnibentities "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
rnibreader "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/reader"
sdl "gerrit.o-ran-sc.org/r/ric-plt/sdlgo"
- uenibprotobuf "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uernibprotobuf"
- uenibreader "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uernibreader"
- uenibwriter "gerrit.o-ran-sc.org/r/ric-plt/ue-nib/uernibwriter"
rnibwriter "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/rnib"
"sync"
"time"
ready bool
}
-// Alias
-type EventCategory = uenibreader.EventCategory
-type EventCallback = uenibreader.EventCallback
-type MeasResultNR = uenibprotobuf.MeasResultNR
-type MeasQuantityResults = uenibprotobuf.MeasResultNR_MeasQuantityResults
-type MeasResultServMO = uenibprotobuf.MeasResults_MeasResultServMO
-type MeasResults = uenibprotobuf.MeasResults
-
-type UENIBClient struct {
- reader *uenibreader.Reader
- writer *uenibwriter.Writer
-}
-
// Alias
type RNIBNodeType = rnibentities.Node_Type
type RNIBGlobalNbId = rnibentities.GlobalNbId
type RNIBNodebInfo = rnibentities.NodebInfo
-type RNIBIRNibError = rnibcommon.IRNibError
+type RNIBIRNibError = error
type RNIBCells = rnibentities.Cells
type RNIBNbIdentity = rnibentities.NbIdentity
type RNIBCellType = rnibentities.Cell_Type
return s.db.SetAndPublish(channelsAndEvents, pairs...)
}
+func (s *SDLClient) Delete(keys []string) (err error) {
+ return s.db.Remove(keys)
+}
+
func (s *SDLClient) Clear() {
s.db.RemoveAll()
}
return
}
-func NewUENIBClient() *UENIBClient {
- return &UENIBClient{
- reader: uenibreader.NewReader(),
- writer: uenibwriter.NewWriter(),
- }
-}
-
-func (u *UENIBClient) StoreUeMeasurement(gNbId string, gNbUeX2ApId string, data *uenibprotobuf.MeasResults) error {
- return u.writer.UpdateUeMeasurement(gNbId, gNbUeX2ApId, data)
-}
-
-func (u *UENIBClient) CreateUeContext(gNbId string, gNbUeX2ApId string) error {
- return u.writer.UeContextAddComplete(gNbId, gNbUeX2ApId)
-}
-
-func (u *UENIBClient) ReleaseUeContext(gNbId string, gNbUeX2ApId string) error {
- return u.writer.RemoveUeContext(gNbId, gNbUeX2ApId)
-}
-
-func (u *UENIBClient) ReadUeMeasurement(gNbId string, gNbUeX2ApId string) (*uenibprotobuf.MeasResults, error) {
- return u.reader.GetUeMeasurement(gNbId, gNbUeX2ApId)
-}
-
-func (u *UENIBClient) SubscribeEvents(gNbIDs []string, eventCategories []EventCategory, cb EventCallback) error {
- return u.reader.SubscribeEvents(gNbIDs, eventCategories, cb)
-}
-
func NewRNIBClient(ns string) *RNIBClient {
- rnibreader.Init("rnib", 1)
- rnibwriter.InitWriter("rnib", 1)
+ rnibreader.Init("e2Manager", 1)
+ rnibwriter.InitWriter("e2Manager", 1)
return &RNIBClient{
reader: nil,
writer: nil,
return rnibreader.GetRNibReader().GetCellList(invName)
}
-func (r *RNIBClient) GetListGnbIds() (*[]*RNIBNbIdentity, RNIBIRNibError) {
+func (r *RNIBClient) GetListGnbIds() ([]*RNIBNbIdentity, RNIBIRNibError) {
return rnibreader.GetRNibReader().GetListGnbIds()
}
-func (r *RNIBClient) GetListEnbIds() (*[]*RNIBNbIdentity, RNIBIRNibError) {
+func (r *RNIBClient) GetListEnbIds() ([]*RNIBNbIdentity, RNIBIRNibError) {
return rnibreader.GetRNibReader().GetListEnbIds()
}