Package org.contikios.cooja.SimEventCentral

Examples of org.contikios.cooja.SimEventCentral.MoteCountListener


        ((Log)mi).addObserver(logObserver);
      }
    }

    /* Observe other motes: if removed, remove our relations to them too */
    mote.getSimulation().getEventCentral().addMoteCountListener(moteCountListener = new MoteCountListener() {
      public void moteWasAdded(Mote mote) {
        /* Ignored */
      }
      public void moteWasRemoved(Mote mote) {
        /* This mote was removed - cleanup by removed() */
 
View Full Code Here


  public PowerTracker(final Simulation simulation, final Cooja gui) {
    super("PowerTracker", gui, false);
    this.simulation = simulation;

    /* Automatically add/delete motes */
    simulation.getEventCentral().addMoteCountListener(moteCountListener = new MoteCountListener() {
      public void moteWasAdded(Mote mote) {
        addMote(mote);
        table.invalidate();
        table.repaint();
      }
View Full Code Here

      public void update(Observable o, Object arg) {
        dgrm.requestEdgeAnalysis();
      }
    };
    /* Re-analyze potential receivers if radios are added/removed. */
    simulation.getEventCentral().addMoteCountListener(new MoteCountListener() {
      public void moteWasAdded(Mote mote) {
        mote.getInterfaces().getPosition().addObserver(positionObserver);
        dgrm.requestEdgeAnalysis();
      }
      public void moteWasRemoved(Mote mote) {
View Full Code Here

      @Override
      public void update(Observable obs, Object obj) {
        repaint();
      }
    };
    simulation.getEventCentral().addMoteCountListener(newMotesListener = new MoteCountListener() {
      @Override
      public void moteWasAdded(Mote mote) {
        Position pos = mote.getInterfaces().getPosition();
        if (pos != null) {
          pos.addObserver(posObserver);
View Full Code Here

        adjuster.setAdjustColumn(COLUMN_DATA, false);
      }
    });

    logUpdateAggregator.start();
    simulation.getEventCentral().addMoteCountListener(logOutputListener = new MoteCountListener() {
      public void moteWasAdded(Mote mote) {
        /* Update title */
        try {
          startMonitoring(mote);
        } catch (Exception e) {
View Full Code Here

      @Override
      public void update(Observable obs, Object obj) {
        repaint();
      }
    };
    simulation.getEventCentral().addMoteCountListener(newMotesListener = new MoteCountListener() {
      @Override
      public void moteWasAdded(Mote mote) {
        Position pos = mote.getInterfaces().getPosition();
        if (pos != null) {
          pos.addObserver(posObserver);
View Full Code Here

        adjuster.setAdjustColumn(COLUMN_DATA, false);
      }
    });

    logUpdateAggregator.start();
    simulation.getEventCentral().addMoteCountListener(logOutputListener = new MoteCountListener() {
      @Override
      public void moteWasAdded(Mote mote) {
        /* Update title */
        try {
          startMonitoring(mote);
View Full Code Here

TOP

Related Classes of org.contikios.cooja.SimEventCentral.MoteCountListener

Copyright © 2018 www.massapicom. 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.