2 ==================================================================================
3 Copyright (c) 2019 AT&T Intellectual Property.
4 Copyright (c) 2019 Nokia
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================================
25 "gerrit.o-ran-sc.org/r/ric-plt/e2ap/pkg/e2ap"
26 "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
32 type RequestId struct {
36 func (rid *RequestId) String() string {
37 return "reqid(" + rid.RequestId.String() + ")"
40 type Sdlnterface interface {
41 Set(ns string, pairs ...interface{}) error
42 Get(ns string, keys []string) (map[string]interface{}, error)
43 GetAll(ns string) ([]string, error)
44 Remove(ns string, keys []string) error
45 RemoveAll(ns string) error
48 type E2SubscriptionDirectives struct {
49 // How many times E2 subscription request is retried
55 // How long time response is waited from E2 node
58 E2TimeoutTimerValue time.Duration
60 // Subscription needs RMR route from E2Term to xApp
64 type ErrorInfo struct {
70 func (e *ErrorInfo) SetInfo(errorCause string, errorSource string, timeoutType string) {
71 e.ErrorCause = errorCause
72 e.ErrorSource = errorSource
73 e.TimeoutType = timeoutType
76 type XappRnibInterface interface {
77 XappRnibSubscribe(cb func(string, ...string), channel string) error
78 XappRnibGetListGnbIds() ([]*xapp.RNIBNbIdentity, xapp.RNIBIRNibError)
79 XappRnibStoreAndPublish(channel string, event string, pairs ...interface{}) error
80 XappRnibGetNodeb(inventoryName string) (*xapp.RNIBNodebInfo, xapp.RNIBIRNibError)