notify radio medium when simulation finished loading

This commit is contained in:
fros4943 2010-12-10 15:55:47 +00:00
parent cc2601bb85
commit e2436d023e
2 changed files with 12 additions and 2 deletions

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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; package se.sics.cooja;
@ -171,4 +171,10 @@ public abstract class RadioMedium {
*/ */
public void removed() { public void removed() {
} }
/**
* Notifies radio medium that the simulation finished loading.
*/
public void simulationFinishedLoading() {
}
} }

View file

@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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; package se.sics.cooja;
@ -674,6 +674,10 @@ public class Simulation extends Observable implements Runnable {
} }
} }
if (currentRadioMedium != null) {
currentRadioMedium.simulationFinishedLoading();
}
setChanged(); setChanged();
notifyObservers(this); notifyObservers(this);
return true; return true;