Examples of PingIntervalBlock


Examples of jNab.core.protocol.PingIntervalBlock

  Packet p = new Packet();
  MessageBlock mb = new MessageBlock(600);
  mb.addPlayLocalSoundCommand("echo" + this.bunny.getSerialNumber() + ".wav");
  mb.addWaitPreviousEndCommand();
  p.addBlock(mb);
  p.addBlock(new PingIntervalBlock(1));
  this.bunny.addPacket(p);
    }
View Full Code Here

Examples of jNab.core.protocol.PingIntervalBlock

      MessageBlock mb = new MessageBlock(600);
      mb.addPlayLocalSoundCommand("message" + receiver + ".wav");
      mb.addWaitPreviousEndCommand();
      Packet p = new Packet();
      p.addBlock(mb);
      p.addBlock(new PingIntervalBlock(1));

      this.bunny.getBurrow().getBunny(receiver).addPacket(p);
  }
  catch (NoSuchBunnyException e)
  {
View Full Code Here

Examples of jNab.core.protocol.PingIntervalBlock

    {
  // Preparing a new packet
  Packet p = new Packet();
 
  // Asking the bunny to ping 20s later (i.e. when the choreography has finished playing)
  p.addBlock(new PingIntervalBlock(20));
  MessageBlock mb = new MessageBlock(12345);
 
  // Playing the choreography associated to current level.
  mb.addPlayChoreographyFromLibraryCommand(this.getChoreography());
  mb.addWaitPreviousEndCommand();
View Full Code Here

Examples of jNab.core.protocol.PingIntervalBlock

    public void onEndOfMessage()
    {
  // When choreography has finished playing, bunny notifies a end-of-message
  // Then it is asked to ping immediately
  Packet p = new Packet();
  p.addBlock(new PingIntervalBlock(1));
  this.bunny.addPacket(p);
    }
View Full Code Here

Examples of jNab.core.protocol.PingIntervalBlock

  // If some click occurs while the choreography is playing, it is handled as a single-click event
  // A choreography is sent to raise both ears and bunny is asked to ping immediately after (to be able to send
  // packets generated by single-click event handling)
  this.bunny.handleEvent(Bunny.SINGLE_CLICK_EVENT, null);
  Packet p = new Packet();
  p.addBlock(new PingIntervalBlock(1));
  MessageBlock mb = new MessageBlock(12345);
  mb.addPlayChoreographyFromLibraryCommand("raisedEars");
  p.addBlock(mb);
  this.bunny.forcePacket(p);
    }
View Full Code Here

Examples of jNab.core.protocol.PingIntervalBlock

  mb.addPlayLocalSoundCommand("files/sounds/dice/get.mp3");
  mb.addWaitPreviousEndCommand();
  mb.addPlayLocalSoundCommand("files/sounds/dice/" + n + ".mp3");
  mb.addWaitPreviousEndCommand();
  p.addBlock(mb);
  p.addBlock(new PingIntervalBlock(1));
  this.bunny.addPacket(p);
    }
View Full Code Here

Examples of jNab.core.protocol.PingIntervalBlock

  mb.addPlaySoundCommand("broadcast/files/sounds/dice/" + n1 + ".mp3");
  mb.addWaitPreviousEndCommand();
  mb.addPlaySoundCommand("broadcast/files/sounds/dice/" + n2 + ".mp3");
  mb.addWaitPreviousEndCommand();
  p.addBlock(mb);
  p.addBlock(new PingIntervalBlock(1));
  this.bunny.addPacket(p);
    }
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.