コード例 #1
0
ファイル: Drip.java プロジェクト: saurabhd14/tinyos-1.x
  public Drip(int id) {

    log.info("Started id=" + id);
    try {
      moteIF = new MoteIF();
      moteIF.registerListener(new DripMsg(), this);
    } catch (Exception e) {
      System.out.println("ERROR: Couldn't contact serial forwarder.");
      System.exit(1);
    }

    this.id = id;
  }
コード例 #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);
  }
コード例 #3
0
 public DrainConnector(int p_spAddr, MoteIF p_moteIF) {
   spAddr = p_spAddr;
   moteIF = p_moteIF;
   moteIF.registerListener(new DrainMsg(), this);
   log.info("Started myAddr = " + spAddr + ", listening for DrainMsg");
 }
コード例 #4
0
ファイル: MsgReader.java プロジェクト: edgemaster/pervasive
 private void addMsgType(Message msg) {
   moteIF.registerListener(msg, this);
 }