From e2436d023e1e79a27b5d27d82b2af73fecc5ac62 Mon Sep 17 00:00:00 2001 From: fros4943 Date: Fri, 10 Dec 2010 15:55:47 +0000 Subject: [PATCH] notify radio medium when simulation finished loading --- tools/cooja/java/se/sics/cooja/RadioMedium.java | 8 +++++++- tools/cooja/java/se/sics/cooja/Simulation.java | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/cooja/java/se/sics/cooja/RadioMedium.java b/tools/cooja/java/se/sics/cooja/RadioMedium.java index 69dad8494..f6a1da1c7 100644 --- a/tools/cooja/java/se/sics/cooja/RadioMedium.java +++ b/tools/cooja/java/se/sics/cooja/RadioMedium.java @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: RadioMedium.java,v 1.10 2010/12/02 15:25:50 fros4943 Exp $ + * $Id: RadioMedium.java,v 1.11 2010/12/10 15:55:47 fros4943 Exp $ */ package se.sics.cooja; @@ -171,4 +171,10 @@ public abstract class RadioMedium { */ public void removed() { } + + /** + * Notifies radio medium that the simulation finished loading. + */ + public void simulationFinishedLoading() { + } } diff --git a/tools/cooja/java/se/sics/cooja/Simulation.java b/tools/cooja/java/se/sics/cooja/Simulation.java index f6705211d..dfcd3180e 100644 --- a/tools/cooja/java/se/sics/cooja/Simulation.java +++ b/tools/cooja/java/se/sics/cooja/Simulation.java @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: Simulation.java,v 1.68 2010/12/02 15:25:49 fros4943 Exp $ + * $Id: Simulation.java,v 1.69 2010/12/10 15:55:47 fros4943 Exp $ */ package se.sics.cooja; @@ -674,6 +674,10 @@ public class Simulation extends Observable implements Runnable { } } + if (currentRadioMedium != null) { + currentRadioMedium.simulationFinishedLoading(); + } + setChanged(); notifyObservers(this); return true;