Package se.sics.cooja

Examples of se.sics.cooja.MoteInterfaceHandler


    return true;
  }

  protected MoteInterfaceHandler createMoteInterfaceHandler() {
    /* Uses current mote type configuration */
    MoteInterfaceHandler moteInterfaceHandler =
      super.createMoteInterfaceHandler();

    return moteInterfaceHandler;
  }
View Full Code Here


    return true;
  }

  protected MoteInterfaceHandler createMoteInterfaceHandler() {
    /* Uses current mote type configuration */
    MoteInterfaceHandler moteInterfaceHandler =
      super.createMoteInterfaceHandler();

    return moteInterfaceHandler;
  }
View Full Code Here

      myMoteInterfaceHandler = createMoteInterfaceHandler();
    }
  }

  protected MoteInterfaceHandler createMoteInterfaceHandler() {
    return new MoteInterfaceHandler(this, getType().getMoteInterfaceClasses());
  }
View Full Code Here

    return true;
  }

  private MoteInterfaceHandler createMoteInterfaceHandler() {
    System.out.println("Creating mote interface handler....");
    MoteInterfaceHandler moteInterfaceHandler = new MoteInterfaceHandler();

      // Add position interface
      Position motePosition = new Position(this);
      Random random = new Random(); /* Do not use main random generator for positioning */
      motePosition.setCoordinates(random.nextDouble()*100, random.nextDouble()*100, random.nextDouble()*100);
      moteInterfaceHandler.addInterface(motePosition);

      // Add LED interface
      moteInterfaceHandler.addInterface(new MicaZLED(micaZ));
      // Add Radio interface
      moteInterfaceHandler.addInterface(new MicaZRadio(this));
      // Add Clock interface
      moteInterfaceHandler.addInterface(new MicaClock(this));
      // Add Serial interface
      moteInterfaceHandler.addInterface(new MicaSerial(this));


      return moteInterfaceHandler;
  }
View Full Code Here

    stopNextInstruction = true;
    getCPU().stop();
  }

  protected MoteInterfaceHandler createMoteInterfaceHandler() {
    return new MoteInterfaceHandler(this, getType().getMoteInterfaceClasses());
  }
View Full Code Here

  public void stopNextInstruction() {
    stopNextInstruction = true;
  }

  private MoteInterfaceHandler createMoteInterfaceHandler() {
    return new MoteInterfaceHandler(this, getType().getMoteInterfaceClasses());
  }
View Full Code Here

  public abstract void receivedPacket(RadioPacket p);
  public abstract void sentPacket(RadioPacket p);
 
  public AbstractApplicationMote() {
    moteInterfaces = new MoteInterfaceHandler(this, moteType.getMoteInterfaceClasses());
  }
View Full Code Here

  public AbstractApplicationMote(MoteType moteType, Simulation sim) {
    setSimulation(sim);
    this.moteType = moteType;
    this.memory = new SectionMoteMemory(new HashMap<String, Integer>(), 0);
    this.moteInterfaces = new MoteInterfaceHandler(this, moteType.getMoteInterfaceClasses());
    this.moteInterfaces.getRadio().addObserver(radioDataObserver);
    requestImmediateWakeup();
  }
View Full Code Here

   */
  public ContikiMote(ContikiMoteType moteType, Simulation sim) {
    setSimulation(sim);
    this.myType = moteType;
    this.myMemory = moteType.createInitialMemory();
    this.myInterfaceHandler = new MoteInterfaceHandler(this, moteType.getMoteInterfaceClasses());

    requestImmediateWakeup();
  }
View Full Code Here

  }

  public boolean setConfigXML(Simulation simulation, Collection<Element> configXML, boolean visAvailable) {
    setSimulation(simulation);
    myMemory = myType.createInitialMemory();
    myInterfaceHandler = new MoteInterfaceHandler(this, myType.getMoteInterfaceClasses());

    for (Element element: configXML) {
      String name = element.getName();

      if (name.equals("motetype_identifier")) {
View Full Code Here

TOP

Related Classes of se.sics.cooja.MoteInterfaceHandler

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.