[RICPLT-2157] Restructure handlers and converters.......
[ric-plt/e2mgr.git] / E2Manager / handlers / rmrmsghandlers / enb_load_information_notification_handler.go
@@ -1,7 +1,9 @@
-package handlers
+package rmrmsghandlers
 
 import "C"
 import (
+       "e2mgr/converters"
+       "e2mgr/e2pdus"
        "e2mgr/logger"
        "e2mgr/models"
        "e2mgr/rNibWriter"
@@ -26,7 +28,7 @@ func elapsed(startTime time.Time) float64 {
 
 func (src EnbLoadInformationNotificationHandler) Handle(logger *logger.Logger, e2Sessions sessions.E2Sessions, request *models.NotificationRequest, messageChannel chan<- *models.NotificationResponse) {
 
-       pdu, err := unpackX2apPdu(logger, MaxAsn1CodecAllocationBufferSize, request.Len, request.Payload, MaxAsn1CodecMessageBufferSize)
+       pdu, err := converters.UnpackX2apPdu(logger, e2pdus.MaxAsn1CodecAllocationBufferSize, request.Len, request.Payload, e2pdus.MaxAsn1CodecMessageBufferSize)
 
        if err != nil {
                logger.Errorf("#EnbLoadInformationNotificationHandler.Handle - RAN name: %s - Unpack failed. Error: %v", request.RanName, err)
@@ -37,10 +39,10 @@ func (src EnbLoadInformationNotificationHandler) Handle(logger *logger.Logger, e
 
        ranLoadInformation := &entities.RanLoadInformation{LoadTimestamp: uint64(request.StartTime.UnixNano())}
 
-       err = extractAndBuildRanLoadInformation(pdu, ranLoadInformation)
+       err = converters.ExtractAndBuildRanLoadInformation(pdu, ranLoadInformation)
 
        if (err != nil) {
-               logger.Errorf("#EnbLoadInformationNotificationHandler.Handle - RAN name: %s - Failed at extractAndBuildRanLoadInformation. Error: %v", request.RanName, err)
+               logger.Errorf("#EnbLoadInformationNotificationHandler.Handle - RAN name: %s - Failed at ExtractAndBuildRanLoadInformation. Error: %v", request.RanName, err)
                return
        }