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 ==================================================================================
26 "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
36 func (meid *RMRMeid) String() string {
39 if len(meid.PlmnID) > 0 {
40 str += pad + "PlmnID=" + meid.PlmnID
43 if len(meid.EnbID) > 0 {
44 str += pad + "EnbID=" + meid.EnbID
47 if len(meid.RanName) > 0 {
48 str += pad + "RanName=" + meid.RanName
55 func NewMeid(meid *xapp.RMRMeid) *RMRMeid {
59 return &RMRMeid{&xapp.RMRMeid{}}
62 //-----------------------------------------------------------------------------
64 //-----------------------------------------------------------------------------
65 type RMRParams struct {
69 func (params *RMRParams) String() string {
71 fmt.Fprintf(&b, "params(Src=%s Mtype=%d SubId=%d Xid=%s Meid=%s Paylens=%d/%d Paymd5=%x)", params.Src, params.Mtype, params.SubId, params.Xid, (&RMRMeid{params.Meid}).String(), params.PayloadLen, len(params.Payload), md5.Sum(params.Payload))
75 func NewParams(params *xapp.RMRParams) *RMRParams {
77 return &RMRParams{params}
79 return &RMRParams{&xapp.RMRParams{}}