new method for getting observable object

This commit is contained in:
fros4943 2007-01-09 09:47:10 +00:00
parent ab2373cfec
commit 286dfe0e54

View file

@ -26,13 +26,13 @@
* 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: SilentRadioMedium.java,v 1.1 2006/08/21 12:13:14 fros4943 Exp $ * $Id: SilentRadioMedium.java,v 1.2 2007/01/09 09:47:10 fros4943 Exp $
*/ */
package se.sics.cooja.radiomediums; package se.sics.cooja.radiomediums;
import java.util.Collection; import java.util.Collection;
import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import org.jdom.Element; import org.jdom.Element;
import se.sics.cooja.*; import se.sics.cooja.*;
@ -43,9 +43,12 @@ import se.sics.cooja.interfaces.*;
* *
* @author Fredrik Osterlind * @author Fredrik Osterlind
*/ */
@ClassDescription("Silent Radio") @ClassDescription("No radio traffic")
public class SilentRadioMedium extends RadioMedium { public class SilentRadioMedium extends RadioMedium {
public SilentRadioMedium(Simulation simulation) {
}
public void registerMote(Mote mote, Simulation sim) { public void registerMote(Mote mote, Simulation sim) {
// Do nothing // Do nothing
} }
@ -66,6 +69,11 @@ public class SilentRadioMedium extends RadioMedium {
// Do nothing // Do nothing
} }
public Observable getRadioMediumObservable() {
// Return empty observable
return new Observable();
}
public void deleteRadioMediumObserver(Observer observer) { public void deleteRadioMediumObserver(Observer observer) {
// Do nothing // Do nothing
} }
@ -82,7 +90,7 @@ public class SilentRadioMedium extends RadioMedium {
return null; return null;
} }
public boolean setConfigXML(Collection<Element> configXML) { public boolean setConfigXML(Collection<Element> configXML, boolean visAvailable) {
return true; return true;
} }