method parameter updates
This commit is contained in:
parent
34c020d87e
commit
d579da7a8a
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: Battery.java,v 1.3 2006/09/26 13:08:05 fros4943 Exp $
|
||||
* $Id: Battery.java,v 1.4 2007/01/09 10:02:44 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.interfaces;
|
||||
@ -285,7 +285,7 @@ public class Battery extends MoteInterface implements PassiveMoteInterface {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfigXML(Collection<Element> configXML) {
|
||||
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
|
||||
for (Element element : configXML) {
|
||||
if (element.getName().equals("infinite")) {
|
||||
hasInfiniteEnergy = Boolean.parseBoolean(element.getText());
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: Position.java,v 1.1 2006/08/21 12:12:59 fros4943 Exp $
|
||||
* $Id: Position.java,v 1.2 2007/01/09 10:02:44 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.interfaces;
|
||||
@ -211,7 +211,7 @@ public class Position extends MoteInterface {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfigXML(Collection<Element> configXML) {
|
||||
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
|
||||
double x = 0, y = 0, z = 0;
|
||||
|
||||
for (Element element : configXML) {
|
||||
|
@ -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: DisturberMote.java,v 1.1 2006/12/07 14:25:22 fros4943 Exp $
|
||||
* $Id: DisturberMote.java,v 1.2 2007/01/09 10:01:14 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.motes;
|
||||
@ -190,7 +190,7 @@ public class DisturberMote implements Mote {
|
||||
}
|
||||
|
||||
public boolean setConfigXML(Simulation simulation,
|
||||
Collection<Element> configXML) {
|
||||
Collection<Element> configXML, boolean visAvailable) {
|
||||
|
||||
// Set initial configuration
|
||||
mySim = simulation;
|
||||
@ -208,7 +208,7 @@ public class DisturberMote implements Mote {
|
||||
if (name.equals("motetype_identifier")) {
|
||||
myType = simulation.getMoteType(element.getText());
|
||||
} else if (name.equals("interface_config")) {
|
||||
Class<? extends MoteInterface> moteInterfaceClass = GUI.currentGUI
|
||||
Class<? extends MoteInterface> moteInterfaceClass = simulation.getGUI()
|
||||
.tryLoadClass(this, MoteInterface.class, element.getText().trim());
|
||||
|
||||
if (moteInterfaceClass == null) {
|
||||
@ -218,7 +218,7 @@ public class DisturberMote implements Mote {
|
||||
|
||||
MoteInterface moteInterface = myInterfaceHandler
|
||||
.getInterfaceOfType(moteInterfaceClass);
|
||||
moteInterface.setConfigXML(element.getChildren());
|
||||
moteInterface.setConfigXML(element.getChildren(), visAvailable);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class DisturberMoteType implements MoteType {
|
||||
return new DisturberMote(this, simulation);
|
||||
}
|
||||
|
||||
public boolean configureAndInit(JFrame parentFrame, Simulation simulation) {
|
||||
public boolean configureAndInit(JFrame parentFrame, Simulation simulation, boolean visAvailable) {
|
||||
|
||||
if (identifier == null) {
|
||||
// Create unique identifier
|
||||
@ -225,7 +225,7 @@ public class DisturberMoteType implements MoteType {
|
||||
}
|
||||
|
||||
public boolean setConfigXML(Simulation simulation,
|
||||
Collection<Element> configXML) {
|
||||
Collection<Element> configXML, boolean visAvailable) {
|
||||
for (Element element : configXML) {
|
||||
moteInterfaces = new Vector<Class<? extends MoteInterface>>(); /* TV */
|
||||
mySimulation = simulation; /* TV */
|
||||
@ -237,7 +237,7 @@ public class DisturberMoteType implements MoteType {
|
||||
} else if (name.equals("description")) {
|
||||
description = element.getText();
|
||||
} else if (name.equals("moteinterface")) { /* TV */
|
||||
Class<? extends MoteInterface> moteInterfaceClass = GUI.currentGUI
|
||||
Class<? extends MoteInterface> moteInterfaceClass = simulation.getGUI()
|
||||
.tryLoadClass(this, MoteInterface.class, element.getText().trim());
|
||||
|
||||
if (moteInterfaceClass == null) {
|
||||
@ -250,7 +250,7 @@ public class DisturberMoteType implements MoteType {
|
||||
}
|
||||
}
|
||||
|
||||
boolean createdOK = configureAndInit(GUI.frame, simulation);
|
||||
boolean createdOK = configureAndInit(GUI.frame, simulation, visAvailable);
|
||||
return createdOK;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: DisturberRadio.java,v 1.1 2006/12/07 14:25:22 fros4943 Exp $
|
||||
* $Id: DisturberRadio.java,v 1.2 2007/01/09 10:01:14 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.motes;
|
||||
@ -242,7 +242,7 @@ public class DisturberRadio extends Radio {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfigXML(Collection<Element> configXML) {
|
||||
public void setConfigXML(Collection<Element> configXML, boolean visAvailable) {
|
||||
for (Element element : configXML) {
|
||||
String name = element.getName();
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: DummyMote.java,v 1.2 2006/09/26 13:08:05 fros4943 Exp $
|
||||
* $Id: DummyMote.java,v 1.3 2007/01/09 10:01:14 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.motes;
|
||||
@ -183,7 +183,7 @@ public class DummyMote implements Mote {
|
||||
}
|
||||
|
||||
public boolean setConfigXML(Simulation simulation,
|
||||
Collection<Element> configXML) {
|
||||
Collection<Element> configXML, boolean visAvailable) {
|
||||
mySim = simulation;
|
||||
myMemory = new SectionMoteMemory(new Properties());
|
||||
myInterfaceHandler = new MoteInterfaceHandler();
|
||||
@ -195,7 +195,7 @@ public class DummyMote implements Mote {
|
||||
if (name.equals("motetype_identifier")) {
|
||||
myType = simulation.getMoteType(element.getText());
|
||||
} else if (name.equals("interface_config")) {
|
||||
Class<? extends MoteInterface> moteInterfaceClass = GUI.currentGUI
|
||||
Class<? extends MoteInterface> moteInterfaceClass = simulation.getGUI()
|
||||
.tryLoadClass(this, MoteInterface.class, element.getText().trim());
|
||||
|
||||
if (moteInterfaceClass == null) {
|
||||
@ -205,7 +205,7 @@ public class DummyMote implements Mote {
|
||||
|
||||
MoteInterface moteInterface = myInterfaceHandler
|
||||
.getInterfaceOfType(moteInterfaceClass);
|
||||
moteInterface.setConfigXML(element.getChildren());
|
||||
moteInterface.setConfigXML(element.getChildren(), visAvailable);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: DummyMoteType.java,v 1.1 2006/08/21 12:13:12 fros4943 Exp $
|
||||
* $Id: DummyMoteType.java,v 1.2 2007/01/09 10:01:14 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.motes;
|
||||
@ -60,7 +60,7 @@ public class DummyMoteType implements MoteType {
|
||||
return new DummyMote(this, simulation);
|
||||
}
|
||||
|
||||
public boolean configureAndInit(JFrame parentFrame, Simulation simulation) {
|
||||
public boolean configureAndInit(JFrame parentFrame, Simulation simulation, boolean visAvailable) {
|
||||
|
||||
if (identifier == null) {
|
||||
// Create unique identifier
|
||||
@ -138,7 +138,7 @@ public class DummyMoteType implements MoteType {
|
||||
return config;
|
||||
}
|
||||
|
||||
public boolean setConfigXML(Simulation simulation, Collection<Element> configXML) {
|
||||
public boolean setConfigXML(Simulation simulation, Collection<Element> configXML, boolean visAvailable) {
|
||||
for (Element element : configXML) {
|
||||
String name = element.getName();
|
||||
|
||||
@ -151,7 +151,7 @@ public class DummyMoteType implements MoteType {
|
||||
}
|
||||
}
|
||||
|
||||
boolean createdOK = configureAndInit(GUI.frame, simulation);
|
||||
boolean createdOK = configureAndInit(GUI.frame, simulation, visAvailable);
|
||||
return createdOK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user