X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fxapp%2Ftypes.go;h=571dcbaef592b951e745cc0369755fa5fa568d8f;hb=622bae3417eaaacfb798a82d530363f3c278e993;hp=71338ad2b9189965190940c1e8b7b3c223b59961;hpb=9636bfad71a9d42593c698870a269b02cd67dd48;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/xapp/types.go b/pkg/xapp/types.go index 71338ad..571dcba 100755 --- a/pkg/xapp/types.go +++ b/pkg/xapp/types.go @@ -26,7 +26,12 @@ import ( // To be removed ... type RMRStatistics struct{} +// +// +// type RMRClient struct { + protPort string + contextMux sync.Mutex context unsafe.Pointer ready int wg sync.WaitGroup @@ -37,11 +42,46 @@ type RMRClient struct { readyCbParams interface{} } +// +// +// type RMRMeid struct { - PlmnID string - EnbID string + PlmnID string + EnbID string + RanName string } +func (meid *RMRMeid) String() string { + str := "meid(" + pad := "" + if len(meid.PlmnID) > 0 { + str += pad + "PlmnID=" + meid.PlmnID + pad = " " + } + if len(meid.EnbID) > 0 { + str += pad + "EnbID=" + meid.EnbID + pad = " " + } + if len(meid.RanName) > 0 { + str += pad + "RanName=" + meid.RanName + pad = " " + } + str += ")" + return str +} + +// +// +// +type MessageConsumerFunc func(*RMRParams) error + +func (fn MessageConsumerFunc) Consume(params *RMRParams) error { + return fn(params) +} + +// +// +// type MessageConsumer interface { - Consume(mtype int, sid int, payload []byte, meid *RMRMeid) error + Consume(params *RMRParams) error }