From: Fredrik Ãs. <fro...@us...> - 2007-10-31 13:58:38
|
Update of /cvsroot/contiki/contiki-2.x/tools/cooja/java/se/sics/cooja/radiomediums In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv26637/tools/cooja/java/se/sics/cooja/radiomediums Modified Files: UDGM.java Log Message: removed old using Index: UDGM.java =================================================================== RCS file: /cvsroot/contiki/contiki-2.x/tools/cooja/java/se/sics/cooja/radiomediums/UDGM.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** UDGM.java 23 Oct 2007 08:39:21 -0000 1.9 --- UDGM.java 31 Oct 2007 13:58:21 -0000 1.10 *************** *** 90,95 **** private Simulation mySimulation; - private boolean usingRandom = false; - private Random random = new Random(); --- 90,93 ---- *************** *** 398,403 **** simulation.getGUI().registerTemporaryPlugin(VisUDGM.class); - usingRandom = false; - myRadioMedium = this; mySimulation = simulation; --- 396,399 ---- *************** *** 416,420 **** // If in random state, check if transmission fails ! if (usingRandom && random.nextDouble() > SUCCESS_RATIO) { return newConnection; } --- 412,416 ---- // If in random state, check if transmission fails ! if (SUCCESS_RATIO < 1.0 && random.nextDouble() > SUCCESS_RATIO) { return newConnection; } *************** *** 543,550 **** config.add(element); - element = new Element("using_random"); - element.setText("" + usingRandom); - config.add(element); - element = new Element("success_ratio"); element.setText("" + SUCCESS_RATIO); --- 539,542 ---- *************** *** 565,575 **** } - if (element.getName().equals("using_random")) { - usingRandom = Boolean.parseBoolean(element.getText()); - if (usingRandom) { - random.setSeed(mySimulation.getRandomSeed()); - } - } - if (element.getName().equals("success_ratio")) { SUCCESS_RATIO = Double.parseDouble(element.getText()); --- 557,560 ---- |