Ejemplo n.º 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);
   }
 }
Ejemplo n.º 2
0
  public RadioSignalMeter(String motePort, String outputFile) {
    this.motePort = motePort;
    this.outputFile = outputFile;

    PhoenixSource phoenixLocal = null;

    if (motePort == null) {
      phoenixLocal = BuildSource.makePhoenix(PrintStreamMessenger.err);
    } else {
      phoenixLocal = BuildSource.makePhoenix(motePort, PrintStreamMessenger.err);
    }

    moteIF = new MoteIF(phoenixLocal);
    moteIF.registerListener(new RadioSignalResultsMsg(), this);
  }
Ejemplo n.º 3
0
 private void addMsgType(Message msg) {
   moteIF.registerListener(msg, this);
 }