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
* 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() {
}
}

View File

@ -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;