Commit ada9fd0c authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Implemented abstract spatial plot functionality

parent fc056159
/*
* Copyright (c) 2005-2010 KOM – Multimedia Communications Lab
*
* This file is part of PeerfactSim.KOM.
*
* PeerfactSim.KOM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* PeerfactSim.KOM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PeerfactSim.KOM. If not, see <http://www.gnu.org/licenses/>.
*
*/
package de.tudarmstadt.maki.simonstrator.api.common.metric;
import de.tudarmstadt.maki.simonstrator.api.common.metric.ActiveSpatialMetric.SpatialMetricValue;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
/**
* A metric that is actively updated (for example based on a sampling interval).
* Normally, only derived metrics (i.e. metrics that passed through a filter)
* should be active metrics, but in some cases overlays might want to provide
* metrics that are updated on specific operations.
*
* @author Tobias Meuser
* @version 1.0, 10.10.2018
*/
public interface ActiveSpatialMetric<M extends SpatialMetricValue<?>> extends Metric<M> {
/**
* Add a listener that is informed whenever the metric is updated
*
* @param listener
*/
public void addActiveSpatialMetricListener(ActiveSpatialMetricListener listener);
void notifyListeners();
/**
* Listener that is informed whenever the {@link ActiveSpatialMetric} is
* updated.
*
* @author Tobias Meuser
* @version 1.0, 10.10.2018
*/
public interface ActiveSpatialMetricListener {
/**
* The given metric was updated
*
* @param metric
*/
public void onMetricUpdate(ActiveSpatialMetric<?> metric);
}
/**
* Value of a metric. The {@link Metric}-concept implies that the aggregation of
* values is to be handled by the analyzer that calls getValue().
*
* For OverallMetrics (i.e. metrics that are already available as an aggregate),
* you should also implement toString in a meaningful way, as this string will
* be used by the live monitor.
*
* @author Tobias Meuser
* @version 1.0, 10.10.2018
* @param <T>
*/
public interface SpatialMetricValue<T> extends MetricValue<T> {
/**
* Get the location of the value.
*
* @return
*/
public Location getLocation();
}
}
......@@ -56,5 +56,4 @@ public interface EventRelevanceCalculationComponent extends HostComponent {
* @return The relevance of the event.
*/
double calculateRelevanceWithoutAnalyzer(RoadNetworkEdge pVehiclePosition, VehicularPointInformation pInformation);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment