settingsObservable superseded by radioMediumObserver

Wasn't used anyway
This commit is contained in:
Sebastian Schinabeck 2013-11-26 16:02:17 +01:00 committed by Moritz 'Morty' Strübe
parent c1a275f0b2
commit ef779d4fc1
2 changed files with 5 additions and 26 deletions

View File

@ -229,7 +229,7 @@ public class AreaViewer extends VisPlugin {
// We want to listen to changes both in the channel model as well as in the radio medium
currentChannelModel.addSettingsObserver(channelModelSettingsObserver);
currentRadioMedium.addSettingsObserver(radioMediumSettingsObserver);
currentRadioMedium.addRadioMediumObserver(radioMediumSettingsObserver);
currentRadioMedium.addRadioTransmissionObserver(radioMediumActivityObserver);
// Set initial size etc.
@ -2338,7 +2338,7 @@ public class AreaViewer extends VisPlugin {
}
if (currentRadioMedium != null && radioMediumSettingsObserver != null) {
currentRadioMedium.deleteSettingsObserver(radioMediumSettingsObserver);
currentRadioMedium.deleteRadioMediumObserver(radioMediumSettingsObserver);
} else {
logger.fatal("Could not remove observer: " + radioMediumSettingsObserver);
}

View File

@ -91,11 +91,6 @@ public class MRM extends AbstractRadioMedium {
private Random random = null;
private ChannelModel currentChannelModel = null;
/**
* Notifies observers when this radio medium has changed settings.
*/
private ScnObservable settingsObservable = new ScnObservable();
/**
* Creates a new Multi-path Ray-tracing Medium (MRM).
*/
@ -115,6 +110,9 @@ public class MRM extends AbstractRadioMedium {
WITH_CAPTURE_EFFECT = currentChannelModel.getParameterBooleanValue(ChannelModel.Parameter.captureEffect);
CAPTURE_EFFECT_THRESHOLD = currentChannelModel.getParameterDoubleValue(ChannelModel.Parameter.captureEffectSignalTreshold);
CAPTURE_EFFECT_PREAMBLE_DURATION = currentChannelModel.getParameterDoubleValue(ChannelModel.Parameter.captureEffectPreambleDuration);
/* Radio Medium changed here, so notify */
radioMediumObservable.setChangedAndNotify();
}
});
@ -409,25 +407,6 @@ public class MRM extends AbstractRadioMedium {
// -- MRM specific methods --
/**
* Adds an observer which is notified when this radio medium has
* changed settings, such as added or removed radios.
*
* @param obs New observer
*/
public void addSettingsObserver(Observer obs) {
settingsObservable.addObserver(obs);
}
/**
* Deletes an earlier registered setting observer.
*
* @param obs Earlier registered observer
*/
public void deleteSettingsObserver(Observer obs) {
settingsObservable.deleteObserver(obs);
}
/**
* @return Number of registered radios.
*/