Commit 0001f6eb authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

MovementSupported: Removed AfterComponentsMoved

parent 5080829c
...@@ -32,14 +32,6 @@ package de.tud.kom.p2psim.api.topology.movement; ...@@ -32,14 +32,6 @@ package de.tud.kom.p2psim.api.topology.movement;
*/ */
public interface MovementListener { public interface MovementListener {
/**
* As most {@link MovementModel}s are round-based we add this callback. It
* is triggered after all componentMoved-Calls are triggered for this round.
* If a model is not round based, it will trigger this method every time a
* component moves
*/
public void afterComponentsMoved();
/** /**
* Triggered, after the respective component moved. * Triggered, after the respective component moved.
* *
......
...@@ -193,13 +193,6 @@ public class DefaultTopologyComponent implements TopologyComponent { ...@@ -193,13 +193,6 @@ public class DefaultTopologyComponent implements TopologyComponent {
} }
} }
@Override
public void afterComponentsMoved() {
for (MovementListener moveListener : movementListeners) {
moveListener.afterComponentsMoved();
}
}
@Override @Override
public boolean movementActive() { public boolean movementActive() {
/* /*
...@@ -598,14 +591,9 @@ public class DefaultTopologyComponent implements TopologyComponent { ...@@ -598,14 +591,9 @@ public class DefaultTopologyComponent implements TopologyComponent {
return currentView; return currentView;
} }
@Override
public void afterComponentsMoved() {
this.isInvalid = true;
}
@Override @Override
public void afterComponentMoved(MovementSupported comp) { public void afterComponentMoved(MovementSupported comp) {
// don't care, we calculate based on global knowledge. this.isInvalid = true;
} }
@Override @Override
......
/*
* Copyright (c) 2005-2013 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.tud.kom.p2psim.impl.topology.events;
/**
* This event is posted when a component scales
* the map to a specific size.
*
* Posted by
* - AppJobberDataLoader
* - AbstractWaypointMovementModel
*
* @author Fabio Zöllner
* @version 1.0, 09.02.13
*/
public class ScaleWorldEvent {
private double scaleFactor = 1.0;
public ScaleWorldEvent(double scaleFactor) {
this.scaleFactor = scaleFactor;
}
public double getFactor() {
return scaleFactor;
}
}
...@@ -106,15 +106,6 @@ public abstract class AbstractMovementModel implements MovementModel { ...@@ -106,15 +106,6 @@ public abstract class AbstractMovementModel implements MovementModel {
listeners.remove(listener); listeners.remove(listener);
} }
/**
* Notify Listeners
*/
protected void notifyRoundEnd() {
for (MovementListener listener : listeners) {
listener.afterComponentsMoved();
}
}
protected void notifyPositionChange(MovementSupported comp) { protected void notifyPositionChange(MovementSupported comp) {
for (MovementListener listener : listeners) { for (MovementListener listener : listeners) {
listener.afterComponentMoved(comp); listener.afterComponentMoved(comp);
......
...@@ -27,8 +27,6 @@ import java.util.Random; ...@@ -27,8 +27,6 @@ import java.util.Random;
import java.util.Set; import java.util.Set;
import java.util.WeakHashMap; import java.util.WeakHashMap;
import com.google.common.eventbus.Subscribe;
import de.tud.kom.p2psim.api.topology.movement.MovementListener; import de.tud.kom.p2psim.api.topology.movement.MovementListener;
import de.tud.kom.p2psim.api.topology.movement.MovementModel; import de.tud.kom.p2psim.api.topology.movement.MovementModel;
import de.tud.kom.p2psim.api.topology.movement.MovementSupported; import de.tud.kom.p2psim.api.topology.movement.MovementSupported;
...@@ -37,7 +35,6 @@ import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel; ...@@ -37,7 +35,6 @@ import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel;
import de.tud.kom.p2psim.impl.scenario.simcfg2.annotations.After; import de.tud.kom.p2psim.impl.scenario.simcfg2.annotations.After;
import de.tud.kom.p2psim.impl.scenario.simcfg2.annotations.Configure; import de.tud.kom.p2psim.impl.scenario.simcfg2.annotations.Configure;
import de.tud.kom.p2psim.impl.topology.PositionVector; import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tud.kom.p2psim.impl.topology.events.ScaleWorldEvent;
import de.tud.kom.p2psim.impl.util.Either; import de.tud.kom.p2psim.impl.util.Either;
import de.tud.kom.p2psim.impl.util.geo.maps.MapLoader; import de.tud.kom.p2psim.impl.util.geo.maps.MapLoader;
import de.tudarmstadt.maki.simonstrator.api.Event; import de.tudarmstadt.maki.simonstrator.api.Event;
...@@ -116,18 +113,6 @@ public abstract class AbstractWaypointMovementModel implements MovementModel { ...@@ -116,18 +113,6 @@ public abstract class AbstractWaypointMovementModel implements MovementModel {
return true; return true;
} }
@Subscribe
public void scaleWorld(ScaleWorldEvent event) {
double scaleFactor = event.getFactor();
speedLimit = unscaledSpeedLimit * scaleFactor;
Monitor.log(
AbstractWaypointMovementModel.class,
Level.INFO,
"Movement speed of the local movement strategy has been adjusted for the waypoint model scale and is now "
+ speedLimit + "m/s");
}
/** /**
* Gets called periodically (after timeBetweenMoveOperations) or by an * Gets called periodically (after timeBetweenMoveOperations) or by an
* application and should be used to recalculate positions * application and should be used to recalculate positions
...@@ -138,8 +123,6 @@ public abstract class AbstractWaypointMovementModel implements MovementModel { ...@@ -138,8 +123,6 @@ public abstract class AbstractWaypointMovementModel implements MovementModel {
for (int i = 0; i < nrOfSteps; i++) { for (int i = 0; i < nrOfSteps; i++) {
step(); step();
} }
notifyRoundEnd();
} }
private void step() { private void step() {
...@@ -322,16 +305,7 @@ public abstract class AbstractWaypointMovementModel implements MovementModel { ...@@ -322,16 +305,7 @@ public abstract class AbstractWaypointMovementModel implements MovementModel {
public void removeMovementListener(MovementListener listener) { public void removeMovementListener(MovementListener listener) {
listeners.remove(listener); listeners.remove(listener);
} }
/**
* Notify Listeners
*/
protected void notifyRoundEnd() {
for (MovementListener listener : listeners) {
listener.afterComponentsMoved();
}
}
protected void notifyPositionChange(MovementSupported comp) { protected void notifyPositionChange(MovementSupported comp) {
for (MovementListener listener : listeners) { for (MovementListener listener : listeners) {
listener.afterComponentMoved(comp); listener.afterComponentMoved(comp);
......
...@@ -298,11 +298,6 @@ public class BonnMotionMovementModel extends AbstractMovementModel implements ...@@ -298,11 +298,6 @@ public class BonnMotionMovementModel extends AbstractMovementModel implements
// log.warn(Simulator.getFormattedTime(Simulator.getCurrentTime())+" ID = " + bme.getHostID() +" pos = " + pos); // log.warn(Simulator.getFormattedTime(Simulator.getCurrentTime())+" ID = " + bme.getHostID() +" pos = " + pos);
} }
} }
if (lastNotificationTime + movementInterval < Simulator
.getCurrentTime()) {
notifyRoundEnd();
lastNotificationTime = Simulator.getCurrentTime();
}
} }
} }
......
...@@ -106,7 +106,6 @@ public class CsvMovement extends AbstractMovementModel { ...@@ -106,7 +106,6 @@ public class CsvMovement extends AbstractMovementModel {
if (info.getRemainingSteps() == 0 || info.getDelta() == null) { if (info.getRemainingSteps() == 0 || info.getDelta() == null) {
// assign next delta and next steps for next path point // assign next delta and next steps for next path point
if (!assignNextMovementInfo(comp)) { if (!assignNextMovementInfo(comp)) {
notifyRoundEnd();
return; return;
} }
} }
...@@ -114,7 +113,6 @@ public class CsvMovement extends AbstractMovementModel { ...@@ -114,7 +113,6 @@ public class CsvMovement extends AbstractMovementModel {
info.setRemainingSteps(info.getRemainingSteps() - 1); info.setRemainingSteps(info.getRemainingSteps() - 1);
comp.positionChanged(); comp.positionChanged();
} }
notifyRoundEnd();
} }
protected boolean assignNextMovementInfo(MovementSupported comp) { protected boolean assignNextMovementInfo(MovementSupported comp) {
......
...@@ -166,7 +166,6 @@ public class GaussMarkovMovement extends AbstractMovementModel { ...@@ -166,7 +166,6 @@ public class GaussMarkovMovement extends AbstractMovementModel {
notifyPositionChange(comp); notifyPositionChange(comp);
} }
} }
notifyRoundEnd();
} }
@Override @Override
......
...@@ -36,7 +36,6 @@ public class NoMovement extends AbstractMovementModel { ...@@ -36,7 +36,6 @@ public class NoMovement extends AbstractMovementModel {
@Override @Override
public void move() { public void move() {
// nothing to do // nothing to do
notifyRoundEnd();
} }
} }
...@@ -48,8 +48,6 @@ public class RandomMovement extends AbstractMovementModel { ...@@ -48,8 +48,6 @@ public class RandomMovement extends AbstractMovementModel {
comp.getMaxMovementSpeed())); comp.getMaxMovementSpeed()));
notifyPositionChange(comp); notifyPositionChange(comp);
} }
notifyRoundEnd();
} }
......
...@@ -75,7 +75,6 @@ public class RandomPathMovement extends AbstractMovementModel { ...@@ -75,7 +75,6 @@ public class RandomPathMovement extends AbstractMovementModel {
info.setRemainingSteps(info.getRemainingSteps() - 1); info.setRemainingSteps(info.getRemainingSteps() - 1);
notifyPositionChange(comp); notifyPositionChange(comp);
} }
notifyRoundEnd();
} }
protected void assignNewMovementInfo(MovementSupported comp) { protected void assignNewMovementInfo(MovementSupported comp) {
......
...@@ -72,7 +72,6 @@ public class TargetMovement extends AbstractMovementModel { ...@@ -72,7 +72,6 @@ public class TargetMovement extends AbstractMovementModel {
pos.add(vec); pos.add(vec);
notifyPositionChange(comp); notifyPositionChange(comp);
} }
notifyRoundEnd();
} }
public void setX(double x) { public void setX(double x) {
......
...@@ -252,8 +252,6 @@ public class ModularMovementModel implements MovementModel, EventHandler { ...@@ -252,8 +252,6 @@ public class ModularMovementModel implements MovementModel, EventHandler {
Event.scheduleWithDelay(timeBetweenMoveOperation, this, null, Event.scheduleWithDelay(timeBetweenMoveOperation, this, null,
EVENT_MOVE); EVENT_MOVE);
notifyRoundEnd();
} }
/** /**
...@@ -276,15 +274,6 @@ public class ModularMovementModel implements MovementModel, EventHandler { ...@@ -276,15 +274,6 @@ public class ModularMovementModel implements MovementModel, EventHandler {
} }
} }
/**
* Notify Listeners
*/
protected void notifyRoundEnd() {
for (MovementListener listener : movementListeners) {
listener.afterComponentsMoved();
}
}
protected void notifyPositionChange(MovementSupported comp) { protected void notifyPositionChange(MovementSupported comp) {
for (MovementListener listener : movementListeners) { for (MovementListener listener : movementListeners) {
listener.afterComponentMoved(comp); listener.afterComponentMoved(comp);
......
...@@ -226,8 +226,6 @@ public class ModularMovementModel implements MovementModel, EventHandler { ...@@ -226,8 +226,6 @@ public class ModularMovementModel implements MovementModel, EventHandler {
Event.scheduleWithDelay(timeBetweenMoveOperation, this, null, Event.scheduleWithDelay(timeBetweenMoveOperation, this, null,
EVENT_MOVE); EVENT_MOVE);
notifyRoundEnd();
} }
/** /**
...@@ -257,15 +255,6 @@ public class ModularMovementModel implements MovementModel, EventHandler { ...@@ -257,15 +255,6 @@ public class ModularMovementModel implements MovementModel, EventHandler {
} }
} }
/**
* Notify Listeners
*/
protected void notifyRoundEnd() {
for (MovementListener listener : movementListeners) {
listener.afterComponentsMoved();
}
}
protected void notifyPositionChange(MovementSupported comp) { protected void notifyPositionChange(MovementSupported comp) {
for (MovementListener listener : movementListeners) { for (MovementListener listener : movementListeners) {
listener.afterComponentMoved(comp); listener.afterComponentMoved(comp);
......
...@@ -43,6 +43,7 @@ import de.tud.kom.p2psim.impl.topology.PositionVector; ...@@ -43,6 +43,7 @@ import de.tud.kom.p2psim.impl.topology.PositionVector;
import de.tudarmstadt.maki.simonstrator.api.Monitor; import de.tudarmstadt.maki.simonstrator.api.Monitor;
import de.tudarmstadt.maki.simonstrator.api.Monitor.Level; import de.tudarmstadt.maki.simonstrator.api.Monitor.Level;
import de.tudarmstadt.maki.simonstrator.api.Rate; import de.tudarmstadt.maki.simonstrator.api.Rate;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location; import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
/** /**
...@@ -317,35 +318,32 @@ public abstract class AbstractTopologyView<L extends DefaultLink> implements ...@@ -317,35 +318,32 @@ public abstract class AbstractTopologyView<L extends DefaultLink> implements
public Collection<MacLayer> getAllMacs() { public Collection<MacLayer> getAllMacs() {
return macs.values(); return macs.values();
} }
long timeLastMovement = 0;
@Override @Override
public void afterComponentsMoved() { public void afterComponentMoved(MovementSupported comp) {
/* if (Time.getCurrentTime() != timeLastMovement) {
* again, topologies might or might not support movement. We do not timeLastMovement = Time.getCurrentTime();
* force handling of this callback. The default implementation does
* nothing. If a topology uses this callback is should mark
* neighborhoods as outdated and re-calculate them on-demand as soon as
* the hosts first requests the neighborhood again.
*/
if (movementSupported) {
/* /*
* mark all neighborhoods as outdated * again, topologies might or might not support movement. We do not
* force handling of this callback. The default implementation does
* nothing. If a topology uses this callback is should mark
* neighborhoods as outdated and re-calculate them on-demand as soon as
* the hosts first requests the neighborhood again.
*/ */
for (Entry<MacAddress, Boolean> entry : neighborsOutdated if (movementSupported) {
.entrySet()) { /*
entry.setValue(true); * mark all neighborhoods as outdated
*/
for (Entry<MacAddress, Boolean> entry : neighborsOutdated
.entrySet()) {
entry.setValue(true);
}
} }
} }
} }
@Override
public void afterComponentMoved(MovementSupported comp) {
/*
* don't care. One might optimize handling here when compared to a
* global recalculation.
*/
}
@Override @Override
public final L getLinkBetween(MacAddress source, MacAddress destination) { public final L getLinkBetween(MacAddress source, MacAddress destination) {
return getCachedLink(source, destination); return getCachedLink(source, destination);
......
...@@ -30,6 +30,7 @@ import de.tud.kom.p2psim.api.linklayer.mac.Link; ...@@ -30,6 +30,7 @@ import de.tud.kom.p2psim.api.linklayer.mac.Link;
import de.tud.kom.p2psim.api.linklayer.mac.MacAddress; import de.tud.kom.p2psim.api.linklayer.mac.MacAddress;
import de.tud.kom.p2psim.api.linklayer.mac.MacLayer; import de.tud.kom.p2psim.api.linklayer.mac.MacLayer;
import de.tud.kom.p2psim.api.linklayer.mac.PhyType; import de.tud.kom.p2psim.api.linklayer.mac.PhyType;
import de.tud.kom.p2psim.api.topology.movement.MovementSupported;
import de.tud.kom.p2psim.api.topology.obstacles.ObstacleModel; import de.tud.kom.p2psim.api.topology.obstacles.ObstacleModel;
import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel; import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel;
import de.tud.kom.p2psim.impl.topology.PositionVector; import de.tud.kom.p2psim.impl.topology.PositionVector;
...@@ -39,6 +40,7 @@ import de.tud.kom.p2psim.impl.topology.views.fiveg.FiveGTopologyDatabase.Entry; ...@@ -39,6 +40,7 @@ import de.tud.kom.p2psim.impl.topology.views.fiveg.FiveGTopologyDatabase.Entry;
import de.tudarmstadt.maki.simonstrator.api.Event; import de.tudarmstadt.maki.simonstrator.api.Event;
import de.tudarmstadt.maki.simonstrator.api.EventHandler; import de.tudarmstadt.maki.simonstrator.api.EventHandler;
import de.tudarmstadt.maki.simonstrator.api.Host; import de.tudarmstadt.maki.simonstrator.api.Host;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.handover.HandoverSensor; import de.tudarmstadt.maki.simonstrator.api.component.sensor.handover.HandoverSensor;
import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor; import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor;
import edu.emory.mathcs.backport.java.util.Arrays; import edu.emory.mathcs.backport.java.util.Arrays;
...@@ -131,7 +133,7 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> { ...@@ -131,7 +133,7 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
Event.scheduleImmediately(new EventHandler() { Event.scheduleImmediately(new EventHandler() {
@Override @Override
public void eventOccurred(Object content, int type) { public void eventOccurred(Object content, int type) {
afterComponentsMoved(); checkAPAssociations();
} }
}, null, 0); }, null, 0);
} }
...@@ -210,16 +212,14 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> { ...@@ -210,16 +212,14 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
null); null);
} }
} }
@Override /**
public void afterComponentsMoved() { * Check, if a node moved into a new segment. If so, we need to update
super.afterComponentsMoved(); * the HandoverSensor to trigger the listeners. We only need to check
/* * nodes that are included in the list of ap-enabled nodes (i.e., they
* Check, if a node moved into a new segment. If so, we need to update * already have a HandoverSensor-instance).
* the HandoverSensor to trigger the listeners. We only need to check */
* nodes that are included in the list of ap-enabled nodes (i.e., they protected void checkAPAssociations() {
* already have a HandoverSensor-instance).
*/
for (HandoverSensor5G sensor : handoverSensors) { for (HandoverSensor5G sensor : handoverSensors) {
PositionVector pos = getCachedPosition(sensor.macAddr); PositionVector pos = getCachedPosition(sensor.macAddr);
int segId = databaseAccessPoints.getSegmentID(pos.getX(), int segId = databaseAccessPoints.getSegmentID(pos.getX(),
...@@ -238,7 +238,17 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> { ...@@ -238,7 +238,17 @@ public class FiveGTopologyView extends AbstractTopologyView<CellLink> {
for (MacAddress mobileClient : mobileClientsList) { for (MacAddress mobileClient : mobileClientsList) {
updateMaxMacBandwidth(mobileClient); updateMaxMacBandwidth(mobileClient);
} }
}
long lastMovementTimestamp = 0;
@Override
public void afterComponentMoved(MovementSupported comp) {
super.afterComponentMoved(comp);
if (lastMovementTimestamp != Time.getCurrentTime()) {
lastMovementTimestamp = Time.getCurrentTime();
checkAPAssociations();
}
} }
/** /**
......
...@@ -33,11 +33,13 @@ import de.tud.kom.p2psim.api.linklayer.mac.Link; ...@@ -33,11 +33,13 @@ import de.tud.kom.p2psim.api.linklayer.mac.Link;
import de.tud.kom.p2psim.api.linklayer.mac.MacAddress; import de.tud.kom.p2psim.api.linklayer.mac.MacAddress;
import de.tud.kom.p2psim.api.linklayer.mac.MacLayer; import de.tud.kom.p2psim.api.linklayer.mac.MacLayer;
import de.tud.kom.p2psim.api.linklayer.mac.PhyType; import de.tud.kom.p2psim.api.linklayer.mac.PhyType;
import de.tud.kom.p2psim.api.topology.movement.MovementSupported;
import de.tud.kom.p2psim.api.topology.obstacles.Obstacle; import de.tud.kom.p2psim.api.topology.obstacles.Obstacle;
import de.tud.kom.p2psim.api.topology.obstacles.ObstacleModel; import de.tud.kom.p2psim.api.topology.obstacles.ObstacleModel;
import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel; import de.tud.kom.p2psim.api.topology.waypoints.WaypointModel;
import de.tud.kom.p2psim.impl.util.LiveMonitoring; import de.tud.kom.p2psim.impl.util.LiveMonitoring;
import de.tud.kom.p2psim.impl.util.LiveMonitoring.ProgressValue; import de.tud.kom.p2psim.impl.util.LiveMonitoring.ProgressValue;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor; import de.tudarmstadt.maki.simonstrator.api.util.XMLConfigurableConstructor;
/** /**
...@@ -210,20 +212,24 @@ public class RangedTopologyView extends AbstractTopologyView<RangedLink> { ...@@ -210,20 +212,24 @@ public class RangedTopologyView extends AbstractTopologyView<RangedLink> {
} }
return updatedNeighbors; return updatedNeighbors;
} }
long lastMovementTime = 0;
@Override @Override
public void afterComponentsMoved() { public void afterComponentMoved(MovementSupported comp) {
super.afterComponentsMoved(); super.afterComponentMoved(comp);
if (lastMovementTime != Time.getCurrentTime()) {
/* lastMovementTime = Time.getCurrentTime();
* mark all links as outdated /*
*/ * mark all links as outdated
synchronized (linkList) { */
for (RangedLink link : linkList) { synchronized (linkList) {
link.setOutdated(true); for (RangedLink link : linkList) {
} link.setOutdated(true);
for (Dijkstra dijkstra : dijkstras.values()) { }
dijkstra.afterComponentsMoved(); for (Dijkstra dijkstra : dijkstras.values()) {
dijkstra.afterComponentsMoved();
}
} }
} }
} }
......
...@@ -78,6 +78,7 @@ import de.tud.kom.p2psim.impl.topology.views.visualization.world.TopologyCompone ...@@ -78,6 +78,7 @@ import de.tud.kom.p2psim.impl.topology.views.visualization.world.TopologyCompone
import de.tud.kom.p2psim.impl.topology.views.visualization.world.WeakWaypointComponentVis; import de.tud.kom.p2psim.impl.topology.views.visualization.world.WeakWaypointComponentVis;
import de.tud.kom.p2psim.impl.util.NotSupportedException; import de.tud.kom.p2psim.impl.util.NotSupportedException;
import de.tudarmstadt.maki.simonstrator.api.Binder; import de.tudarmstadt.maki.simonstrator.api.Binder;
import de.tudarmstadt.maki.simonstrator.api.Time;
import de.tudarmstadt.maki.simonstrator.api.common.graph.INodeID; import de.tudarmstadt.maki.simonstrator.api.common.graph.INodeID;
import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location; import de.tudarmstadt.maki.simonstrator.api.component.sensor.location.Location;
...@@ -262,14 +263,15 @@ public class VisualizationTopologyView extends JFrame implements TopologyView, ...@@ -262,14 +263,15 @@ public class VisualizationTopologyView extends JFrame implements TopologyView,
* obstacle); worldPanel.add(obsVis); } } * obstacle); worldPanel.add(obsVis); } }
*/ */
@Override
public void afterComponentsMoved() { long lastMove = 0;
worldPanel.invalidate();
}
@Override @Override
public void afterComponentMoved(MovementSupported comp) { public void afterComponentMoved(MovementSupported comp) {
// don't care if (lastMove != Time.getCurrentTime()) {
worldPanel.invalidate();
lastMove = Time.getCurrentTime();
}
} }
@Override @Override
......
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