Commit a627bcbc authored by Yann Garcia's avatar Yann Garcia
Browse files

Update ProvChgUuUniSubscription & V2xMsgSubscription subscription/Notification, predictedQosPost

parent 90df3f77
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package server

import (
	"encoding/json"
	//"fmt"

	log "github.com/InterDigitalInc/AdvantEDGE/go-packages/meep-logger"
)
@@ -40,6 +41,33 @@ func convertProblemDetailstoJson(probdetails *ProblemDetails) string {
	return string(jsonInfo)
}

func convertProvChgUuUniSubscriptionToJson(provChgUuUniSubscription *ProvChgUuUniSubscription) string {
	jsonInfo, err := json.Marshal(*provChgUuUniSubscription)
	if err != nil {
		log.Error(err.Error())
		return ""
	}
	return string(jsonInfo)
}

func convertProvChgUuMbmsSubscriptionToJson(provChgUuMbmsSubscription *ProvChgUuMbmsSubscription) string {
	jsonInfo, err := json.Marshal(*provChgUuMbmsSubscription)
	if err != nil {
		log.Error(err.Error())
		return ""
	}
	return string(jsonInfo)
}

func convertProvChgPc5SubscriptionToJson(provChgPc5Subscription *ProvChgPc5Subscription) string {
	jsonInfo, err := json.Marshal(*provChgPc5Subscription)
	if err != nil {
		log.Error(err.Error())
		return ""
	}
	return string(jsonInfo)
}

func convertV2xMsgSubscriptionToJson(v2xMsgSubscription *V2xMsgSubscription) string {
	jsonInfo, err := json.Marshal(*v2xMsgSubscription)
	if err != nil {
@@ -49,6 +77,15 @@ func convertV2xMsgSubscriptionToJson(v2xMsgSubscription *V2xMsgSubscription) str
	return string(jsonInfo)
}

func convertPredQosSubscriptionToJson(predQosSubscription *PredQosSubscription) string {
	jsonInfo, err := json.Marshal(*predQosSubscription)
	if err != nil {
		log.Error(err.Error())
		return ""
	}
	return string(jsonInfo)
}

// func convertV2xMsgPublicationToJson(v2xMsgPublication *V2xMsgPublication) string {
// 	jsonInfo, err := json.Marshal(*v2xMsgPublication)
// 	if err != nil {
+0 −1
Original line number Diff line number Diff line
@@ -11,6 +11,5 @@ package server

// Hyperlink related to the resource. This shall be only included in the HTTP responses and in HTTP PUT requests.
type Links1 struct {

	Self *LinkType `json:"self"`
}
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ package server

// List of hyperlinks related to the resource.
type Links2 struct {

	Self *LinkType `json:"self"`

	Subscriptions []Subscriptions `json:"subscriptions,omitempty"`
+0 −1
Original line number Diff line number Diff line
@@ -11,6 +11,5 @@ package server

// Links to resources related to this notification.
type Links3 struct {

	Subscription *LinkType `json:"subscription"`
}
+0 −1
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
package server

type Ecgi struct {

	CellId *CellId `json:"cellId"`

	Plmn *Plmn `json:"plmn"`
Loading