Examples of MspMoteTimeEvent


Examples of se.sics.cooja.mspmote.MspMoteTimeEvent

      if (isInterfered()) {
        b = (byte) 0xFF;
      }

      final byte byteToDeliver = b;
      getMote().getSimulation().scheduleEvent(new MspMoteTimeEvent(mote, 0) {
        public void execute(long t) {
          super.execute(t);
          radio.receivedByte(byteToDeliver);
          mote.requestImmediateWakeup();
        }
View Full Code Here

Examples of se.sics.cooja.mspmote.MspMoteTimeEvent

    if (isInterfered()) {
      inputByte = (byte)0xFF;
    } else {
      inputByte = lastIncomingByte;
    }
    mote.getSimulation().scheduleEvent(new MspMoteTimeEvent(mote, 0) {
      public void execute(long t) {
        super.execute(t);
        radio.receivedByte(inputByte);
        mote.requestImmediateWakeup();
      }
View Full Code Here

Examples of se.sics.cooja.mspmote.MspMoteTimeEvent

    if (signalStrength == currentSignalStrength) {
      return; /* ignored */
    }
    currentSignalStrength = signalStrength;
    if (rssiLastCounter == 0) {
      getMote().getSimulation().scheduleEvent(new MspMoteTimeEvent(mote, 0) {
        public void execute(long t) {
          super.execute(t);

          /* Update average */
          System.arraycopy(rssiLast, 1, rssiLast, 0, 7);
View Full Code Here

Examples of se.sics.cooja.mspmote.MspMoteTimeEvent

          MspSerial.this.dataReceived(data);
        }
      });
    }

    writeDataEvent = new MspMoteTimeEvent((MspMote) mote, 0) {
      public void execute(long t) {
        super.execute(t);
       
        tryWriteNextByte();
        if (!incomingData.isEmpty()) {
View Full Code Here

Examples of se.sics.cooja.mspmote.MspMoteTimeEvent

 
  public SkyButton(Mote mote) {
    skyMote = (SkyMote) mote;
    sim = mote.getSimulation();
   
    pressButtonEvent = new MspMoteTimeEvent((SkyMote)mote, 0) {
      public void execute(long t) {
        skyMote.skyNode.setButton(true);
      }
    };
    releaseButtonEvent = new MspMoteTimeEvent((SkyMote)mote, 0) {
      public void execute(long t) {
        skyMote.skyNode.setButton(false);
      }
    };
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.