Commit 51b2f461 authored by Yann Garcia's avatar Yann Garcia
Browse files

Emhance RNI support

parent 82198b0b
Loading
Loading
Loading
Loading
+10 −6
Changes for go-apps/meep-gis-engine/server/gis-engine.go: 10 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -547,22 +547,26 @@ func setUe(asset *Asset, pl *dataModel.PhysicalLocation, geoData *AssetGeoData)
		asset.geoData = geoData

	} else {
		// Update Geodata
		// Update Geodata. Compare before mutating so a path+velocity GIS
		// update (internal MOVEMENT) still refreshes path_increment.
		if geoData != nil {
			if geoData.position != "" && geoData.position != asset.geoData.position {
			posChanged := geoData.position != "" && geoData.position != asset.geoData.position
			velChanged := geoData.velocity != asset.geoData.velocity
			modeChanged := geoData.mode != "" && geoData.mode != asset.geoData.mode
			pathChanged := geoData.path != "" && geoData.path != asset.geoData.path
			if posChanged {
				ueData[am.FieldPosition] = geoData.position
				asset.geoData.position = geoData.position
			}
			if geoData.velocity != asset.geoData.velocity {
			if velChanged {
				ueData[am.FieldVelocity] = geoData.velocity
				asset.geoData.velocity = geoData.velocity
			}
			if geoData.mode != "" && geoData.mode != asset.geoData.mode {
			if modeChanged {
				ueData[am.FieldMode] = geoData.mode
				asset.geoData.mode = geoData.mode
			}
			if geoData.path != "" && (geoData.path != asset.geoData.path ||
				geoData.mode != asset.geoData.mode || geoData.velocity != asset.geoData.velocity) {
			if geoData.path != "" && (pathChanged || modeChanged || velChanged) {
				ueData[am.FieldPath] = geoData.path
				ueData[am.FieldMode] = geoData.mode
				ueData[am.FieldVelocity] = geoData.velocity
+10 −2
Changes for go-packages/meep-gis-asset-mgr/asset-mgr.go: 10 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -809,7 +809,10 @@ func (am *AssetMgr) UpdateUe(name string, data map[string]interface{}) (err erro
		}
	}

	// Velocity without a GIS path (Simu5G/SUMO publishes speed only).
	// Velocity without a new path payload (Simu5G/SUMO). If a GIS path
	// already exists (internal MOVEMENT), recompute path_increment so
	// AdvanceAllUePosition keeps the configured speed. Do not reset
	// path_fraction (unlike refreshUePath).
	if !pathUpdated {
		if dataVelocity, found := data[FieldVelocity]; found {
			velocity, ok := dataVelocity.(float32)
@@ -817,7 +820,12 @@ func (am *AssetMgr) UpdateUe(name string, data map[string]interface{}) (err erro
				return errors.New("Invalid velocity data type")
			}
			query := `UPDATE ` + UeTable + `
				SET path_velocity = $2
				SET path_velocity = $2,
					path_increment = CASE
						WHEN path IS NOT NULL AND ST_Length(path::geography) > 0
						THEN $2 / ST_Length(path::geography)
						ELSE path_increment
					END
				WHERE name = ($1)`
			_, err = am.db.Exec(query, name, velocity)
			if err != nil {
+5 −2
Changes for js-apps/meep-admin-console/src/js/containers/idc-map.js: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -694,13 +694,16 @@ class IDCMap extends Component {
    var poaInRange = false;
    if (marker && table && table.entries) {
      var latlng = marker.getLatLng();
      var hasPath = (marker.options.meep.ue.path) ? true : false;
      var msg = '<b>id: ' + marker.options.meep.ue.id + '</b><br>';
      var ownMac = getElemFieldVal(table.entries[marker.options.meep.ue.id], FIELD_UE_MAC_ID);
      if (ownMac !== '') {
        msg += 'mac: ' + ownMac + '<br>';
      }
      msg += 'velocity: ' + (hasPath ? marker.options.meep.ue.velocity : '0') + ' m/s<br>';
      var velocity = marker.options.meep.ue.velocity;
      if (velocity === null || velocity === undefined || velocity === '') {
        velocity = 0;
      }
      msg += 'velocity: ' + velocity + ' m/s<br>';
      if (this.isD2dEnabled(marker.options.meep.ue.id)) {
        if (marker.options.meep.ue.d2dInRange) {
          var d2dConnType = 'd2d: ' + marker.options.meep.ue.d2dInRange + '<br>';
+9 −9
Changes for tools/simu5g/monaco-harbor-integration-config.json: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -31,49 +31,49 @@
  "ueMappings": [
    {
      "ueId": "ue-car-0",
      "sandboxIpCidr": "192.168.108.158/32",
      "sandboxIpCidr": "192.168.108.191/32",
      "simu5gModulePath": "MonacoHarbor.ue_car[0]"
    },
    {
      "ueId": "ue-car-1",
      "sandboxIpCidr": "192.168.108.131/32",
      "sandboxIpCidr": "192.168.108.128/32",
      "simu5gModulePath": "MonacoHarbor.ue_car[1]"
    },
    {
      "ueId": "ue-car-2",
      "sandboxIpCidr": "192.168.108.186/32",
      "sandboxIpCidr": "192.168.108.149/32",
      "simu5gModulePath": "MonacoHarbor.ue_car[2]"
    },
    {
      "ueId": "ue-car-3",
      "sandboxIpCidr": "192.168.108.149/32",
      "sandboxIpCidr": "192.168.108.158/32",
      "simu5gModulePath": "MonacoHarbor.ue_car[3]"
    },
    {
      "ueId": "ue-ped-0",
      "sandboxIpCidr": "192.168.108.143/32",
      "sandboxIpCidr": "192.168.108.147/32",
      "simu5gModulePath": "MonacoHarbor.ue_ped[0]"
    },
    {
      "ueId": "ue-ped-1",
      "sandboxIpCidr": "192.168.108.137/32",
      "sandboxIpCidr": "192.168.108.141/32",
      "simu5gModulePath": "MonacoHarbor.ue_ped[1]"
    },
    {
      "ueId": "ue-ped-2",
      "sandboxIpCidr": "192.168.108.170/32",
      "sandboxIpCidr": "192.168.108.178/32",
      "simu5gModulePath": "MonacoHarbor.ue_ped[2]"
    },
    {
      "ueId": "ue-ped-3",
      "sandboxIpCidr": "192.168.108.189/32",
      "sandboxIpCidr": "192.168.108.137/32",
      "simu5gModulePath": "MonacoHarbor.ue_ped[3]"
    }
  ],
  "mecEndpoints": [
    {
      "endpointId": "mep1",
      "sandboxIpCidr": "192.168.108.153/32",
      "sandboxIpCidr": "192.168.108.146/32",
      "simu5gModulePath": "router"
    }
  ],