コード例 #1
0
 public AntiTheftGui() {
   try {
     guiInit();
     /* Setup communication with the mote and request a messageReceived
     callback when an AlertMsg is received */
     mote = new MoteIF(this);
     mote.registerListener(new AlertMsg(), this);
   } catch (Exception e) {
     e.printStackTrace();
     System.exit(2);
   }
 }
コード例 #2
0
  public TestTtsp() {
    try {
      mote = new MoteIF(PrintStreamMessenger.err);
      mote.registerListener(new TestTtspMsg(), this);
      System.out.println("Connecting to basestation...OK");
    } catch (Exception e) {
      System.out.println("Connecting to basestation...FAILED");
      e.printStackTrace();
      System.exit(2);
    }

    System.out.println(
        "[Reception Time (ms)] [Node] [Beacon] [GlobalTime (ms)] [LocalTime (ms)] [Offset (ms)] [Root] [Period]");
  }