mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 01:29:33 +00:00
minor updates due to deleted static variables
This commit is contained in:
parent
d579da7a8a
commit
6a6b900955
@ -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: MantisMote.java,v 1.1 2006/11/09 19:31:15 fros4943 Exp $
|
||||
* $Id: MantisMote.java,v 1.2 2007/01/09 10:02:16 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.mantismote;
|
||||
@ -188,7 +188,7 @@ public class MantisMote implements Mote {
|
||||
}
|
||||
|
||||
public boolean setConfigXML(Simulation simulation,
|
||||
Collection<Element> configXML) {
|
||||
Collection<Element> configXML, boolean visAvailable) {
|
||||
mySimulation = simulation;
|
||||
|
||||
for (Element element : configXML) {
|
||||
@ -201,7 +201,7 @@ public class MantisMote implements Mote {
|
||||
.getMoteInterfaces());
|
||||
|
||||
} 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) {
|
||||
@ -213,7 +213,7 @@ public class MantisMote implements Mote {
|
||||
MoteInterface moteInterface = myInterfaceHandler
|
||||
.getInterfaceOfType(moteInterfaceClass);
|
||||
if (moteInterface != null)
|
||||
moteInterface.setConfigXML(element.getChildren());
|
||||
moteInterface.setConfigXML(element.getChildren(), visAvailable);
|
||||
else
|
||||
logger
|
||||
.warn("Can't restore configuration for non-existing interface: "
|
||||
|
@ -26,7 +26,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: MantisMoteType.java,v 1.1 2006/11/09 19:31:15 fros4943 Exp $
|
||||
* $Id: MantisMoteType.java,v 1.2 2007/01/09 10:02:16 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.mantismote;
|
||||
@ -355,7 +355,8 @@ public class MantisMoteType implements MoteType {
|
||||
return new MantisMote(this, mySimulation);
|
||||
}
|
||||
|
||||
public boolean configureAndInit(JFrame parentFrame, Simulation simulation) {
|
||||
public boolean configureAndInit(JFrame parentFrame, Simulation simulation, boolean visAvailable) {
|
||||
if (!visAvailable) logger.fatal(">>>>>>> NOT IMPLEMENTED");
|
||||
return MantisMoteTypeDialog.showDialog(parentFrame, simulation, this);
|
||||
}
|
||||
|
||||
@ -383,7 +384,7 @@ public class MantisMoteType implements MoteType {
|
||||
}
|
||||
|
||||
public boolean setConfigXML(Simulation simulation,
|
||||
Collection<Element> configXML) {
|
||||
Collection<Element> configXML, boolean visAvailable) {
|
||||
mySimulation = simulation;
|
||||
|
||||
for (Element element : configXML) {
|
||||
@ -400,7 +401,7 @@ public class MantisMoteType 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: MantisMoteTypeDialog.java,v 1.1 2006/11/09 19:31:14 fros4943 Exp $
|
||||
* $Id: MantisMoteTypeDialog.java,v 1.2 2007/01/09 10:02:16 fros4943 Exp $
|
||||
*/
|
||||
|
||||
package se.sics.cooja.mantismote;
|
||||
@ -156,12 +156,12 @@ public class MantisMoteTypeDialog extends JDialog {
|
||||
}
|
||||
|
||||
// Load all mote interface classes
|
||||
String[] moteInterfaces = GUI.currentGUI.getPlatformConfig().getStringArrayValue(MantisMoteType.class, "MOTE_INTERFACES");
|
||||
String[] moteInterfaces = simulation.getGUI().getPlatformConfig().getStringArrayValue(MantisMoteType.class, "MOTE_INTERFACES");
|
||||
myDialog.moteInterfaceClasses = new Vector<Class<? extends MoteInterface>>();
|
||||
for (String moteInterface : moteInterfaces) {
|
||||
try {
|
||||
Class<? extends MoteInterface> newMoteInterfaceClass =
|
||||
GUI.currentGUI.tryLoadClass(GUI.currentGUI, MoteInterface.class, moteInterface);
|
||||
simulation.getGUI().tryLoadClass(simulation.getGUI(), MoteInterface.class, moteInterface);
|
||||
myDialog.moteInterfaceClasses.add(newMoteInterfaceClass);
|
||||
/*logger.info("Loaded Mantis mote interface: " + newMoteInterfaceClass);*/
|
||||
} catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user