Package se.sics.cooja

Examples of se.sics.cooja.MoteInterface


        if (moteInterfaceClass == null) {
          logger.fatal("Could not load mote interface class: " + intfClass);
          return false;
        }

        MoteInterface moteInterface = getInterfaces().getInterfaceOfType(moteInterfaceClass);
        moteInterface.setConfigXML(element.getChildren(), visAvailable);
      }
    }

    return true;
  }
View Full Code Here


        if (moteInterfaceClass == null) {
          logger.fatal("Could not load mote interface class: " + element.getText().trim());
          return false;
        }

        MoteInterface moteInterface = getInterfaces().getInterfaceOfType(moteInterfaceClass);
        moteInterface.setConfigXML(element.getChildren(), visAvailable);
      }
    }

    return true;
  }
View Full Code Here

        if (moteInterfaceClass == null) {
          logger.fatal("Could not load mote interface class: " + intfClass);
          return false;
        }

        MoteInterface moteInterface = getInterfaces().getInterfaceOfType(moteInterfaceClass);
        if (moteInterface == null) {
            logger.fatal("Could not find mote interface of class: " + moteInterfaceClass);
            return false;
        }
        moteInterface.setConfigXML(element.getChildren(), visAvailable);
      }
    }

    /* Schedule us immediately */
    requestImmediateWakeup();
View Full Code Here

  public String getQuickHelp() {
    String help = "<b>" + GUI.getDescriptionOf(this) + "</b>";
    help += "<p>Lists mote interfaces, and allows mote inspection and interaction via mote interface visualizers.";

    MoteInterface intf = selectedMoteInterface;
    if (intf != null) {
      if (intf instanceof HasQuickHelp) {
        help += "<p>" + ((HasQuickHelp)intf).getQuickHelp();
      } else {
        help += "<p><b>" + GUI.getDescriptionOf(intf) + "</b>";
View Full Code Here

      super(parent, objectToObserve);
      myMote = mote;
    }

    public void update(Observable obs, Object obj) {
      final MoteInterface moteInterface = (MoteInterface) obs;
      int moteID = myMote.getID();

      myParent.actOnChange("'" + GUI.getDescriptionOf(moteInterface.getClass())
          + "'" + " of mote '" + (moteID > 0 ? Integer.toString(moteID) : "?")
          + "'" + " changed at time "
          + myParent.mySimulation.getSimulationTime(), new AbstractAction(
          "View interface visualizer") {
        public void actionPerformed(ActionEvent e) {
          MoteInterfaceViewer plugin =
            (MoteInterfaceViewer) mySimulation.getGUI().tryStartPlugin(
                MoteInterfaceViewer.class, mySimulation.getGUI(), mySimulation, myMote);
          plugin.setSelectedInterface(GUI.getDescriptionOf(moteInterface.getClass()));
        }
      });
    }
View Full Code Here

        if (moteInterfaceClass == null) {
          logger.fatal("Could not load mote interface class: " + element.getText().trim());
          return false;
        }

        MoteInterface moteInterface = getInterfaces().getInterfaceOfType(moteInterfaceClass);
        moteInterface.setConfigXML(element.getChildren(), visAvailable);
      }
    }

    /* Schedule us immediately */
    requestImmediateWakeup();
View Full Code Here

        if (moteInterfaceClass == null) {
          logger.warn("Can't find mote interface class: " + element.getText());
          return false;
        }

        MoteInterface moteInterface = moteInterfaces.getInterfaceOfType(moteInterfaceClass);
        moteInterface.setConfigXML(element.getChildren(), visAvailable);
      }
    }
    requestImmediateWakeup();
    return true;
  }
View Full Code Here

        if (moteInterfaceClass == null) {
          logger.fatal("Could not load mote interface class: " + element.getText().trim());
          return false;
        }

        MoteInterface moteInterface = myInterfaceHandler.getInterfaceOfType(moteInterfaceClass);
        if (moteInterface != null) {
          moteInterface.setConfigXML(element.getChildren(), visAvailable);
        } else {
          logger.warn("Can't restore configuration for non-existing interface: " + moteInterfaceClass.getName());
        }
      }
    }
View Full Code Here

TOP

Related Classes of se.sics.cooja.MoteInterface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.