Commit 7661bd95 authored by Yann Garcia's avatar Yann Garcia
Browse files

Bug fixed in qosKpis construtor

parent 598676ad
Loading
Loading
Loading
Loading
+6 −6
Changes for go-apps/meep-vis/sbi/vis-sbi.go: 6 added lines, 6 removed lines.
Original line number Original line Diff line number Diff line
@@ -556,7 +556,7 @@ func GetPredictedPowerValues(hour int32, inRsrp int32, inRsrq int32, poaName str
 * @param {struct} params HTTP request parameters
 * @param {struct} params HTTP request parameters
 * @param {struct} num_item contains the number of parameters
 * @param {struct} num_item contains the number of parameters
 * @return {struct} UuUnicastProvisioningInfoProInfoUuUnicast initialized data structure
 * @return {struct} UuUnicastProvisioningInfoProInfoUuUnicast initialized data structure
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.3.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.3.3.1 GET
 */
 */
func GetInfoUuUnicast(params []string, num_item int) (proInfoUuUnicast UuUnicastProvisioningInfoProInfoUuUnicast_list, err error) {
func GetInfoUuUnicast(params []string, num_item int) (proInfoUuUnicast UuUnicastProvisioningInfoProInfoUuUnicast_list, err error) {
	proInfoUuUnicast = nil
	proInfoUuUnicast = nil
@@ -631,7 +631,7 @@ func GetInfoUuUnicast(params []string, num_item int) (proInfoUuUnicast UuUnicast
 * @param {struct} params HTTP request parameters
 * @param {struct} params HTTP request parameters
 * @param {struct} num_item contains the number of parameters
 * @param {struct} num_item contains the number of parameters
 * @return {struct} UuMbmscastProvisioningInfoProInfoUuMbmscast initialized data structure
 * @return {struct} UuMbmscastProvisioningInfoProInfoUuMbmscast initialized data structure
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.4.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.4.3.1 GET
 */
 */
func GetInfoUuMbmscast(params []string, num_item int) (proInfoUuMbmscast UuMbmsProvisioningInfoProInfoUuMbms_list, err error) {
func GetInfoUuMbmscast(params []string, num_item int) (proInfoUuMbmscast UuMbmsProvisioningInfoProInfoUuMbms_list, err error) {
	proInfoUuMbmscast = nil
	proInfoUuMbmscast = nil
@@ -717,7 +717,7 @@ func GetInfoUuMbmscast(params []string, num_item int) (proInfoUuMbmscast UuMbmsP
 * @param {struct} params HTTP request parameters
 * @param {struct} params HTTP request parameters
 * @param {struct} num_item contains the number of parameters
 * @param {struct} num_item contains the number of parameters
 * @return {struct} Pc5ProvisioningInfoProInfoPc5 initialized data structure
 * @return {struct} Pc5ProvisioningInfoProInfoPc5 initialized data structure
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.4.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.4.3.1 GET
 */
 */
func GetInfoPc5(params []string, num_item int) (proInfoPc5 Pc5ProvisioningInfoProInfoPc5_list, err error) {
func GetInfoPc5(params []string, num_item int) (proInfoPc5 Pc5ProvisioningInfoProInfoPc5_list, err error) {
	proInfoPc5 = nil
	proInfoPc5 = nil
@@ -787,7 +787,7 @@ func GetInfoPc5(params []string, num_item int) (proInfoPc5 Pc5ProvisioningInfoPr
 * @param {string} stdOrganization ontains the V2X standard which apply to the V2X message (e,g, ETSI for C-ITS)
 * @param {string} stdOrganization ontains the V2X standard which apply to the V2X message (e,g, ETSI for C-ITS)
 * @param {struct} msgType conatins the type of the V2X message (e.g. CA message)
 * @param {struct} msgType conatins the type of the V2X message (e.g. CA message)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 */
 */
func PublishMessageOnMessageBroker(msgContent string, msgEncodeFormat string, stdOrganization string, msgType *int32) (err error) {
func PublishMessageOnMessageBroker(msgContent string, msgEncodeFormat string, stdOrganization string, msgType *int32) (err error) {
	return sbi.trafficMgr.PublishMessageOnMessageBroker(msgContent, msgEncodeFormat, stdOrganization, msgType)
	return sbi.trafficMgr.PublishMessageOnMessageBroker(msgContent, msgEncodeFormat, stdOrganization, msgType)
@@ -796,7 +796,7 @@ func PublishMessageOnMessageBroker(msgContent string, msgEncodeFormat string, st
/*
/*
 * StartV2xMessageBrokerServer start the brocker server (e.g. MQTT)
 * StartV2xMessageBrokerServer start the brocker server (e.g. MQTT)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 */
 */
func StartV2xMessageBrokerServer() (err error) {
func StartV2xMessageBrokerServer() (err error) {
	return sbi.trafficMgr.StartV2xMessageBrokerServer()
	return sbi.trafficMgr.StartV2xMessageBrokerServer()
@@ -805,7 +805,7 @@ func StartV2xMessageBrokerServer() (err error) {
/*
/*
 * StopV2xMessageBrokerServer shutdown the brocker server (e.g. MQTT)
 * StopV2xMessageBrokerServer shutdown the brocker server (e.g. MQTT)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 */
 */
func StopV2xMessageBrokerServer() {
func StopV2xMessageBrokerServer() {
	sbi.trafficMgr.StopV2xMessageBrokerServer()
	sbi.trafficMgr.StopV2xMessageBrokerServer()
+31 −31
Changes for go-apps/meep-vis/server/vis.go: 31 added lines, 31 removed lines.
Original line number Original line Diff line number Diff line
@@ -115,7 +115,7 @@ const PROV_CHG_UU_MBMS_NOTIF = "ProvChgUuMbmsNotification"
const PROV_CHG_PC5_NOTIF = "ProvChgPc5Notification"
const PROV_CHG_PC5_NOTIF = "ProvChgPc5Notification"
const V2X_MSG_NOTIF = "V2xMsgNotification"
const V2X_MSG_NOTIF = "V2xMsgNotification"


//const PRED_QOS_NOTIF = "PredQosNotification" // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
//const PRED_QOS_NOTIF = "PredQosNotification" // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
const TEST_NOTIF = "TestNotification"
const TEST_NOTIF = "TestNotification"
const NOTIFY_EXPIRY = "ExpiryNotification"
const NOTIFY_EXPIRY = "ExpiryNotification"


@@ -124,7 +124,7 @@ var provChgUuMbmsSubscriptionMap = map[int]*ProvChgUuMbmsSubscription{} // List
var provChgPc5SubscriptionMap = map[int]*ProvChgPc5Subscription{}       // List of registered PC5 subscription
var provChgPc5SubscriptionMap = map[int]*ProvChgPc5Subscription{}       // List of registered PC5 subscription
var v2xMsgSubscriptionMap = map[int]*V2xMsgSubscription{}               // List of registered V2X message subscription
var v2xMsgSubscriptionMap = map[int]*V2xMsgSubscription{}               // List of registered V2X message subscription


//var predQosSubscriptionMap = map[int]*PredQosSubscription{} // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
//var predQosSubscriptionMap = map[int]*PredQosSubscription{} // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)


var subscriptionExpiryMap = map[int][]int{}
var subscriptionExpiryMap = map[int][]int{}


@@ -634,7 +634,7 @@ func cleanUp() {
	provChgUuMbmsSubscriptionMap = map[int]*ProvChgUuMbmsSubscription{}
	provChgUuMbmsSubscriptionMap = map[int]*ProvChgUuMbmsSubscription{}
	provChgPc5SubscriptionMap = map[int]*ProvChgPc5Subscription{}
	provChgPc5SubscriptionMap = map[int]*ProvChgPc5Subscription{}
	v2xMsgSubscriptionMap = map[int]*V2xMsgSubscription{}
	v2xMsgSubscriptionMap = map[int]*V2xMsgSubscription{}
	//predQosSubscriptionMap = map[int]*PredQosSubscription{} // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
	//predQosSubscriptionMap = map[int]*PredQosSubscription{} // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)


	// Reset metrics store name
	// Reset metrics store name
	updateStoreName("")
	updateStoreName("")
@@ -679,7 +679,7 @@ func errHandlerProblemDetails(w http.ResponseWriter, error string, code int) {
 * predictedQosPost process the PredictedQos POST request and sends the response
 * predictedQosPost process the PredictedQos POST request and sends the response
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.7.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.7.3.4 POST
 */
 */
func predictedQosPost(w http.ResponseWriter, r *http.Request) {
func predictedQosPost(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> predictedQosPost: ", r)
	log.Debug(">>> predictedQosPost: ", r)
@@ -859,7 +859,7 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) {
 * provInfoUuUnicastGET process the uu_unicast_provisioning_info GET request and sends the response
 * provInfoUuUnicastGET process the uu_unicast_provisioning_info GET request and sends the response
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.3.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.3.3.1 GET
 */
 */
func provInfoUuUnicastGET(w http.ResponseWriter, r *http.Request) {
func provInfoUuUnicastGET(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> provInfoUuUnicastGET", r)
	log.Debug(">>> provInfoUuUnicastGET", r)
@@ -995,7 +995,7 @@ func provInfoUuUnicastGET(w http.ResponseWriter, r *http.Request) {
 * provInfoUuMbmsGET process the uu_mbms_provisioning_info GET request and sends the response
 * provInfoUuMbmsGET process the uu_mbms_provisioning_info GET request and sends the response
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.4.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.4.3.1 GET
 */
 */
func provInfoUuMbmsGET(w http.ResponseWriter, r *http.Request) {
func provInfoUuMbmsGET(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> provInfoUuMbmsGET", r)
	log.Debug(">>> provInfoUuMbmsGET", r)
@@ -1141,7 +1141,7 @@ func provInfoUuMbmsGET(w http.ResponseWriter, r *http.Request) {
 * provInfoPc5GET process the pc5_provisioning_info GET request and sends the response
 * provInfoPc5GET process the pc5_provisioning_info GET request and sends the response
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.5.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.5.3.1 GET
 */
 */
func provInfoPc5GET(w http.ResponseWriter, r *http.Request) {
func provInfoPc5GET(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> provInfoPc5GET", r)
	log.Debug(">>> provInfoPc5GET", r)
@@ -1275,7 +1275,7 @@ func provInfoPc5GET(w http.ResponseWriter, r *http.Request) {
 * v2xMsgDistributionServerPost process the V2x message distribution server POST request and sends the response
 * v2xMsgDistributionServerPost process the V2x message distribution server POST request and sends the response
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.6.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.6.3.1 GET
 */
 */
func v2xMsgDistributionServerPost(w http.ResponseWriter, r *http.Request) {
func v2xMsgDistributionServerPost(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> v2xMsgDistributionServerPost: ", r)
	log.Debug(">>> v2xMsgDistributionServerPost: ", r)
@@ -1425,8 +1425,8 @@ func v2xMsgPublicationPOST(w http.ResponseWriter, r *http.Request) {
 * sendV2xMsgNotification sends notification to the call reference address
 * sendV2xMsgNotification sends notification to the call reference address
 * @param {string} notifyUrl contains the call reference address
 * @param {string} notifyUrl contains the call reference address
 * @param {struct} notification contains notification body of type V2xMsgNotification
 * @param {struct} notification contains notification body of type V2xMsgNotification
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.4 POST
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.4.5 Type: V2xMsgNotification
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.4.5 Type: V2xMsgNotification
 */
 */
func sendV2xMsgNotification(notifyUrl string, notification V2xMsgNotification) {
func sendV2xMsgNotification(notifyUrl string, notification V2xMsgNotification) {
	startTime := time.Now()
	startTime := time.Now()
@@ -1454,7 +1454,7 @@ func sendV2xMsgNotification(notifyUrl string, notification V2xMsgNotification) {
 * subscriptionsPost is to create subscription at /subscriptions endpoint
 * subscriptionsPost is to create subscription at /subscriptions endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.4 POST
 */
 */
func subscriptionsPost(w http.ResponseWriter, r *http.Request) {
func subscriptionsPost(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> subscriptionsPost")
	log.Debug(">>> subscriptionsPost")
@@ -1550,8 +1550,8 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) {
		}
		}
		w.Header().Set("Location", v2xSubscription.Links.Self.Href)
		w.Header().Set("Location", v2xSubscription.Links.Self.Href)


	case PRED_QOS: // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
	case PRED_QOS: // FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
		errHandlerProblemDetails(w, "There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)", http.StatusBadRequest)
		errHandlerProblemDetails(w, "There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)", http.StatusBadRequest)
		return
		return
		// var predQosSubscription PredQosSubscription
		// var predQosSubscription PredQosSubscription
		// jsonResponse, err = processPredQosSubscription(bodyBytes, link, subsIdStr, &predQosSubscription)
		// jsonResponse, err = processPredQosSubscription(bodyBytes, link, subsIdStr, &predQosSubscription)
@@ -1588,7 +1588,7 @@ func subscriptionsPost(w http.ResponseWriter, r *http.Request) {
 * processProvChgUuUniSubscription is to create subscription at /subscriptions endpoint
 * processProvChgUuUniSubscription is to create subscription at /subscriptions endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.4 POST
 */
 */
func processProvChgUuUniSubscription(bodyBytes []byte, link *Links, subsIdStr string, provChgUuUniSubscription *ProvChgUuUniSubscription) (string, error) {
func processProvChgUuUniSubscription(bodyBytes []byte, link *Links, subsIdStr string, provChgUuUniSubscription *ProvChgUuUniSubscription) (string, error) {


@@ -1716,7 +1716,7 @@ func processProvChgUuUniSubscriptionUpdate(bodyBytes []byte, subsIdStr string) (
 * processProvChgUuMbmsSubscription is to create subscription at /subscriptions endpoint
 * processProvChgUuMbmsSubscription is to create subscription at /subscriptions endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.4 POST
 */
 */
func processProvChgUuMbmsSubscription(bodyBytes []byte, link *Links, subsIdStr string, provChgUuMbmsSubscription *ProvChgUuMbmsSubscription) (string, error) {
func processProvChgUuMbmsSubscription(bodyBytes []byte, link *Links, subsIdStr string, provChgUuMbmsSubscription *ProvChgUuMbmsSubscription) (string, error) {
	log.Debug(">>> processProvChgUuMbmsSubscription")
	log.Debug(">>> processProvChgUuMbmsSubscription")
@@ -1848,7 +1848,7 @@ func processProvChgUuMbmsSubscriptionUpdate(bodyBytes []byte, subsIdStr string)
 * processProvChgPc5Subscription is to create subscription at /subscriptions endpoint
 * processProvChgPc5Subscription is to create subscription at /subscriptions endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.4 POST
 */
 */
func processProvChgPc5Subscription(bodyBytes []byte, link *Links, subsIdStr string, provChgPc5Subscription *ProvChgPc5Subscription) (string, error) {
func processProvChgPc5Subscription(bodyBytes []byte, link *Links, subsIdStr string, provChgPc5Subscription *ProvChgPc5Subscription) (string, error) {
	log.Debug(">>> processProvChgPc5Subscription")
	log.Debug(">>> processProvChgPc5Subscription")
@@ -1976,7 +1976,7 @@ func processProvChgPc5SubscriptionUpdate(bodyBytes []byte, subsIdStr string) ([]
	return nil, false, errors.New("Not registered.")
	return nil, false, errors.New("Not registered.")
}
}


// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
// func processPredQosSubscription(bodyBytes []byte, link *Links, subsIdStr string, predQosSubscription *PredQosSubscription) (string, error) {
// func processPredQosSubscription(bodyBytes []byte, link *Links, subsIdStr string, predQosSubscription *PredQosSubscription) (string, error) {
// 	log.Debug(">>> processPredQosSubscription")
// 	log.Debug(">>> processPredQosSubscription")


@@ -2003,8 +2003,8 @@ func processProvChgPc5SubscriptionUpdate(bodyBytes []byte, subsIdStr string) ([]
func processPredQosSubscriptionUpdate(bodyBytes []byte, subsIdStr string) ([]byte, bool, error) {
func processPredQosSubscriptionUpdate(bodyBytes []byte, subsIdStr string) ([]byte, bool, error) {
	log.Debug(">>> processPredQosSubscriptionUpdate: subsIdStr: ", subsIdStr)
	log.Debug(">>> processPredQosSubscriptionUpdate: subsIdStr: ", subsIdStr)


	return nil, false, errors.New("There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)")
	return nil, false, errors.New("There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)")
	// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
	// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
	// var provChgPc5Subscription PredQosSubscription
	// var provChgPc5Subscription PredQosSubscription
	// err := json.Unmarshal(bodyBytes, &provChgPc5Subscription)
	// err := json.Unmarshal(bodyBytes, &provChgPc5Subscription)
	// if err != nil {
	// if err != nil {
@@ -2076,7 +2076,7 @@ func processPredQosSubscriptionUpdate(bodyBytes []byte, subsIdStr string) ([]byt
 * processV2xMsgSubscription is to create subscription at /subscriptions endpoint
 * processV2xMsgSubscription is to create subscription at /subscriptions endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.4 POST
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.4 POST
 */
 */
func processV2xMsgSubscription(bodyBytes []byte, link *Links, subsIdStr string, v2xSubscription *V2xMsgSubscription) (string, error) {
func processV2xMsgSubscription(bodyBytes []byte, link *Links, subsIdStr string, v2xSubscription *V2xMsgSubscription) (string, error) {
	log.Debug(">>> processV2xMsgSubscription: link: ", *link)
	log.Debug(">>> processV2xMsgSubscription: link: ", *link)
@@ -2151,8 +2151,8 @@ func processV2xMsgSubscription(bodyBytes []byte, link *Links, subsIdStr string,
 * sendTestNotification sends test notification to validate callback URI
 * sendTestNotification sends test notification to validate callback URI
 * @param {string} notifyUrl contains the call reference address
 * @param {string} notifyUrl contains the call reference address
 * @param {struct} notification contains the test notification
 * @param {struct} notification contains the test notification
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 6.4.6 Type: TestNotification
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 6.4.6 Type: TestNotification
 */
 */
func sendTestNotification(notifyUrl string, notification TestNotification) {
func sendTestNotification(notifyUrl string, notification TestNotification) {
	log.Debug(">>> sendTestNotification: notifyUrl: ", notifyUrl)
	log.Debug(">>> sendTestNotification: notifyUrl: ", notifyUrl)
@@ -2228,7 +2228,7 @@ func createSubscriptionLinkList(subType string) *SubscriptionLinkList {
				link.Subscriptions = append(link.Subscriptions, subscription)
				link.Subscriptions = append(link.Subscriptions, subscription)
			}
			}
		} // End of 'for' statement
		} // End of 'for' statement
		// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
		// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
		// } else if subType == "pred_qos" {
		// } else if subType == "pred_qos" {
		// 	for _, predQosSubscription := range predQosSubscriptionMap {
		// 	for _, predQosSubscription := range predQosSubscriptionMap {
		// 		if predQosSubscription != nil {
		// 		if predQosSubscription != nil {
@@ -2271,7 +2271,7 @@ func createSubscriptionLinkList(subType string) *SubscriptionLinkList {
				link.Subscriptions = append(link.Subscriptions, subscription)
				link.Subscriptions = append(link.Subscriptions, subscription)
			}
			}
		} // End of 'for' statement
		} // End of 'for' statement
		// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
		// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
		// for _, predQosSubscription := range predQosSubscriptionMap {
		// for _, predQosSubscription := range predQosSubscriptionMap {
		// 	if predQosSubscription != nil {
		// 	if predQosSubscription != nil {
		// 		var subscription Subscriptions
		// 		var subscription Subscriptions
@@ -2291,7 +2291,7 @@ func createSubscriptionLinkList(subType string) *SubscriptionLinkList {
 * subscriptionsGET is to retrieve information about all existing subscriptions at /subscriptions endpoint
 * subscriptionsGET is to retrieve information about all existing subscriptions at /subscriptions endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9.3.1
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9.3.1
 */
 */
func subscriptionsGET(w http.ResponseWriter, r *http.Request) {
func subscriptionsGET(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> subscriptionsGET: ", r)
	log.Debug(">>> subscriptionsGET: ", r)
@@ -2334,7 +2334,7 @@ func subscriptionsGET(w http.ResponseWriter, r *http.Request) {
 * individualSubscriptionGET is to retrive a specific subscriptionsInfo at /subscriptions/{subscriptionId} endpoint
 * individualSubscriptionGET is to retrive a specific subscriptionsInfo at /subscriptions/{subscriptionId} endpoint
 * @param {struct} w HTTP write reference
 * @param {struct} w HTTP write reference
 * @param {struct} r contains the HTTP request
 * @param {struct} r contains the HTTP request
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.9
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.9
 */
 */
func individualSubscriptionGET(w http.ResponseWriter, r *http.Request) {
func individualSubscriptionGET(w http.ResponseWriter, r *http.Request) {
	log.Debug(">>> individualSubscriptionGET: ", r)
	log.Debug(">>> individualSubscriptionGET: ", r)
@@ -2673,7 +2673,7 @@ func isSubscriptionIdRegisteredProvChgPc5(subsIdStr string) bool {
 * @param {struct} currentPredQosSubscription contains the existing PredQosSubscription
 * @param {struct} currentPredQosSubscription contains the existing PredQosSubscription
 * @param {struct} predQosSubscription contains request body send to /subscriptions endpoint
 * @param {struct} predQosSubscription contains request body send to /subscriptions endpoint
 */
 */
// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
// func registerPredQosSubscription(subId string, currentPredQosSubscription *PredQosSubscription, predQosSubscription *PredQosSubscription) {
// func registerPredQosSubscription(subId string, currentPredQosSubscription *PredQosSubscription, predQosSubscription *PredQosSubscription) {
// 	log.Debug(">>> registerPredQosSubscription: subId: ", subId)
// 	log.Debug(">>> registerPredQosSubscription: subId: ", subId)


@@ -2712,7 +2712,7 @@ func isSubscriptionIdRegisteredProvChgPc5(subsIdStr string) bool {
 * @param {string} subsIdStr contains an Id to uniquely subscription
 * @param {string} subsIdStr contains an Id to uniquely subscription
 * @return {bool} true on success, false otherwise
 * @return {bool} true on success, false otherwise
 */
 */
// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
// func isSubscriptionIdRegisteredPredQos(subsIdStr string) bool {
// func isSubscriptionIdRegisteredPredQos(subsIdStr string) bool {
// 	var returnVal bool
// 	var returnVal bool
// 	subsId, _ := strconv.Atoi(subsIdStr)
// 	subsId, _ := strconv.Atoi(subsIdStr)
@@ -2775,7 +2775,7 @@ func checkForExpiredSubscriptions() {
					} else {
					} else {
						continue
						continue
					}
					}
					// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
					// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
					// } else if strings.Contains(subscription, PRED_QOS) {
					// } else if strings.Contains(subscription, PRED_QOS) {
					// 	if predQosSubscriptionMap[subsId] != nil {
					// 	if predQosSubscriptionMap[subsId] != nil {
					// 		sendExpiryPredQosSubscription(predQosSubscriptionMap[subsId])
					// 		sendExpiryPredQosSubscription(predQosSubscriptionMap[subsId])
@@ -2871,7 +2871,7 @@ func delSubscription(subsId string, subscription string, mutexTaken bool) error
		deregisterProvChgPc5Subscription(subsId, mutexTaken)
		deregisterProvChgPc5Subscription(subsId, mutexTaken)
	} else if strings.Contains(subscription, V2X_MSG) {
	} else if strings.Contains(subscription, V2X_MSG) {
		deregisterV2xMsgSubscription(subsId, mutexTaken)
		deregisterV2xMsgSubscription(subsId, mutexTaken)
		// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
		// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
		// } else if strings.Contains(subscription, PRED_QOS) {
		// } else if strings.Contains(subscription, PRED_QOS) {
		// 	deregisterPredQosSubscription(subsId, mutexTaken)
		// 	deregisterPredQosSubscription(subsId, mutexTaken)
	}
	}
@@ -2918,7 +2918,7 @@ func deregisterProvChgPc5Subscription(subsIdStr string, mutexTaken bool) {
	log.Info("deregisterProvChgPc5Subscription: ", subsId, " type: ", PROV_CHG_PC5)
	log.Info("deregisterProvChgPc5Subscription: ", subsId, " type: ", PROV_CHG_PC5)
}
}


// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS MEC 030 V3.1.1 (2023-03)
// FIXME FSCOM There is no PredQosNotification defined by the standard ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03)
// func (subsIdStr string, mutexTaken bool) {
// func (subsIdStr string, mutexTaken bool) {
//	 log.Debug(">>> deregisterPredQosSubscription: subsId: ", subsIdStr)
//	 log.Debug(">>> deregisterPredQosSubscription: subsId: ", subsIdStr)
//
//
+1 −1
Changes for go-packages/meep-federation-mgr/federation-mgr.go: 1 added line, 1 removed line.
Original line number Original line Diff line number Diff line
@@ -151,7 +151,7 @@ func (fm *FederationMgr) StartFedMessageBrokerServer() (err error) {
/*
/*
 * StopFedMessageBrokerServer shutdown the brocker server (e.g. MQTT)
 * StopFedMessageBrokerServer shutdown the brocker server (e.g. MQTT)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as FED Message Distribution Server for exchanging non-session based FED messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as FED Message Distribution Server for exchanging non-session based FED messages
 */
 */
func (fm *FederationMgr) StopFedMessageBrokerServer() {
func (fm *FederationMgr) StopFedMessageBrokerServer() {
	log.Info("StopFedMessageBrokerServer: brokerRunning: ", brokerRunning)
	log.Info("StopFedMessageBrokerServer: brokerRunning: ", brokerRunning)
+6 −6
Changes for go-packages/meep-vis-traffic-mgr/traffic-mgr.go: 6 added lines, 6 removed lines.
Original line number Original line Diff line number Diff line
@@ -957,7 +957,7 @@ func findReducedSignalStrength(inRsrp int32, inRsrq int32, users int32, averageL
 * @param {struct} params HTTP request parameters
 * @param {struct} params HTTP request parameters
 * @param {struct} num_item contains the number of parameters
 * @param {struct} num_item contains the number of parameters
 * @return {struct} an initialized UuUnicastProvisioningInfoProInfoUuUnicast_list data structure
 * @return {struct} an initialized UuUnicastProvisioningInfoProInfoUuUnicast_list data structure
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.3.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.3.3.1 GET
 */
 */
func (tm *TrafficMgr) GetInfoUuUnicast(params []string, num_item int) (proInfoUuUnicast UuUnicastProvisioningInfoProInfoUuUnicast_list, err error) {
func (tm *TrafficMgr) GetInfoUuUnicast(params []string, num_item int) (proInfoUuUnicast UuUnicastProvisioningInfoProInfoUuUnicast_list, err error) {
	log.Debug(">>> GetInfoUuUnicast: params: ", params)
	log.Debug(">>> GetInfoUuUnicast: params: ", params)
@@ -1160,7 +1160,7 @@ func distance_gps_distance_in_km(lat1 float64, long1 float64, lat2 float64, long
 * @param {struct} params HTTP request parameters
 * @param {struct} params HTTP request parameters
 * @param {struct} num_item contains the number of parameters
 * @param {struct} num_item contains the number of parameters
 * @return {struct} an initialized UuMbmsProvisioningInfoProInfoUuMbms_list data structure
 * @return {struct} an initialized UuMbmsProvisioningInfoProInfoUuMbms_list data structure
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.4.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.4.3.1 GET
 */
 */
func (tm *TrafficMgr) GetInfoUuMbmscast(params []string, num_item int) (proInfoUuMbmscast UuMbmsProvisioningInfoProInfoUuMbms_list, err error) {
func (tm *TrafficMgr) GetInfoUuMbmscast(params []string, num_item int) (proInfoUuMbmscast UuMbmsProvisioningInfoProInfoUuMbms_list, err error) {
	log.Debug(">>> GetInfoUuMbmscast: params: ", params)
	log.Debug(">>> GetInfoUuMbmscast: params: ", params)
@@ -1293,7 +1293,7 @@ func (tm *TrafficMgr) GetInfoUuMbmscast(params []string, num_item int) (proInfoU
 * @param {struct} params HTTP request parameters
 * @param {struct} params HTTP request parameters
 * @param {struct} num_item contains the number of parameters
 * @param {struct} num_item contains the number of parameters
 * @return {struct} an initialized Pc5ProvisioningInfoProInfoPc5_list data structure
 * @return {struct} an initialized Pc5ProvisioningInfoProInfoPc5_list data structure
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Clause 7.4.3.1 GET
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Clause 7.4.3.1 GET
 */
 */
func (tm *TrafficMgr) GetInfoPc5(params []string, num_item int) (proInfoPc5 Pc5ProvisioningInfoProInfoPc5_list, err error) {
func (tm *TrafficMgr) GetInfoPc5(params []string, num_item int) (proInfoPc5 Pc5ProvisioningInfoProInfoPc5_list, err error) {
	log.Debug(">>> GetInfoPc5: params: ", params)
	log.Debug(">>> GetInfoPc5: params: ", params)
@@ -1403,7 +1403,7 @@ func (tm *TrafficMgr) GetInfoPc5(params []string, num_item int) (proInfoPc5 Pc5P
 * @param {string} stdOrganization ontains the V2X standard which apply to the V2X message (e,g, ETSI for C-ITS)
 * @param {string} stdOrganization ontains the V2X standard which apply to the V2X message (e,g, ETSI for C-ITS)
 * @param {struct} msgType conatins the type of the V2X message (e.g. CA message)
 * @param {struct} msgType conatins the type of the V2X message (e.g. CA message)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 */
 */
func (tm *TrafficMgr) PublishMessageOnMessageBroker(msgContent string, msgEncodeFormat string, stdOrganization string, msgType *int32) (err error) {
func (tm *TrafficMgr) PublishMessageOnMessageBroker(msgContent string, msgEncodeFormat string, stdOrganization string, msgType *int32) (err error) {
	if !brokerRunning {
	if !brokerRunning {
@@ -1417,7 +1417,7 @@ func (tm *TrafficMgr) PublishMessageOnMessageBroker(msgContent string, msgEncode
/*
/*
 * StartV2xMessageBrokerServer start the brocker server (e.g. MQTT)
 * StartV2xMessageBrokerServer start the brocker server (e.g. MQTT)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 */
 */
func (tm *TrafficMgr) StartV2xMessageBrokerServer() (err error) {
func (tm *TrafficMgr) StartV2xMessageBrokerServer() (err error) {
	if cellName2CellIdMap == nil || len(cellId2CellNameMap) == 0 {
	if cellName2CellIdMap == nil || len(cellId2CellNameMap) == 0 {
@@ -1463,7 +1463,7 @@ func (tm *TrafficMgr) StartV2xMessageBrokerServer() (err error) {
/*
/*
 * StopV2xMessageBrokerServer shutdown the brocker server (e.g. MQTT)
 * StopV2xMessageBrokerServer shutdown the brocker server (e.g. MQTT)
 * @return {struct} nil on success, error otherwise
 * @return {struct} nil on success, error otherwise
 * @see ETSI GS MEC 030 V3.1.1 (2023-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 * @see ETSI GS ETSI GS MEC 040 V3.2.1 (2024-03) Annex D (informative): State-of-the-art of using a Message Broker as V2X Message Distribution Server for exchanging non-session based V2X messages
 */
 */
func (tm *TrafficMgr) StopV2xMessageBrokerServer() {
func (tm *TrafficMgr) StopV2xMessageBrokerServer() {
	log.Info("StopV2xMessageBrokerServer: brokerRunning: ", brokerRunning)
	log.Info("StopV2xMessageBrokerServer: brokerRunning: ", brokerRunning)