}
func (c *Control) handleSubscriptionRequest(datagram *RmrDatagram) ( err error) {
+ /* TODO: removed to being able to integrate with UEMGR
content, err := c.e2ap.GetPayloadContent(datagram.Payload)
- xapp.Logger.Info("Subscription Request received: %v", content)
+ */
+ xapp.Logger.Info("Subscription Request Message received with ID: %v", datagram.SubscriptionId)
new_sub_id := c.registry.GetSubscriptionId()
+ /* TODO: removed to being able to integrate with UEMGR
payload, err := c.e2ap.SetSubscriptionSequenceNumber(datagram.Payload, new_sub_id)
if err != nil {
xapp.Logger.Error("Unable to set Subscription Sequence Number in Payload due to: "+ err.Error())
return
}
- xapp.Logger.Info("New Subscription Accepted, Forwarding to E2T")
- c.rmrSend(&RmrDatagram{C.RIC_SUB_REQ , new_sub_id, payload})
+ */
+ xapp.Logger.Info("New Subscription Registered, forwarding to E2T")
+ c.rmrSend(&RmrDatagram{C.RIC_SUB_REQ , new_sub_id, datagram.Payload})
return
}
func (c *Control) handleSubscriptionResponse(datagram *RmrDatagram) ( err error) {
+ /* TODO: removed to being able to integrate with UEMGR
content, err := c.e2ap.GetPayloadContent(datagram.Payload)
- xapp.Logger.Info("Subscription Response received: %v", content)
+ */
+ xapp.Logger.Info("Subscription Response Message received with ID: %v", datagram.SubscriptionId)
+ xapp.Logger.Info("Subscription Response Registered, forwarding to Requestor")
+ c.rmrSend(&RmrDatagram{C.RIC_SUB_RESP , datagram.SubscriptionId, datagram.Payload})
return
}
\ No newline at end of file
import (
"gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/xapp"
+ /* TODO: removed to being able to integrate with UEMGR
submgr "gerrit.o-ran-sc.org/r/ric-plt/submgr/pkg/control"
+ */
"errors"
)
}
func (e E2t ) Consume(mtype, sub_id int, len int, payload []byte) (err error) {
+ /* TODO: removed to being able to integrate with UEMGR
asn1 := submgr.Asn1{}
message, err := asn1.Decode(payload)
if err != nil {
xapp.Logger.Debug("E2T asn1Decoding failure due to "+ err.Error())
return
}
- xapp.Logger.Info("E2T Received Message content: %v", message)
- err = e.subscriptionResponse(sub_id)
+ */
+ xapp.Logger.Info("E2T Received Message with RMR Subsriprion ID: %v, Responding...", sub_id)
+ err = e.subscriptionResponse(sub_id, payload)
return
}
-func (e E2t ) subscriptionResponse(sub_id int) (err error) {
+func (e E2t ) subscriptionResponse(sub_id int, payload []byte) (err error) {
+ /* TODO: removed to being able to integrate with UEMGR
asn1 := submgr.Asn1{}
payload, err := asn1.Encode(submgr.RmrPayload{8, sub_id, "E2T: RCO Subscribed"})
if err != nil {
return
}
+ */
if !xapp.Rmr.Send(12011, sub_id, len(payload), payload) {
err = errors.New("rmr.Send() failed")
}