Package avrora.sim

Examples of avrora.sim.FiniteStateMachine$TransitionEvent


//    cc2420.updateActiveFrequency();
      return (int) cc2420.getFrequency();
  }

  public boolean isRadioOn() {
      FiniteStateMachine fsm = cc2420.getFiniteStateMachine();
      /* based on reading the source code it seems that the fsm state = 3 means on */
      //System.out.println("COOJA: cc2420 FSM: " + fsm.getCurrentState());
      return fsm.getCurrentState() >= 3;
  }
View Full Code Here


        dfStatus = DF_STATUS_REGISTER_DENSITY | DF_STATUS_READY;
        tick = false;
        i = 0;
        step = 0;

        stateMachine = new FiniteStateMachine(sim.getClock(), startMode, modeName, 0);
        // connect Pins
        // output
        mcu.getPin("PA3").connect(new PA3Output());
        mcu.getPin("PD3").connect(new PD3Output());
        mcu.getPin("PD5").connect(new PD5Output());
View Full Code Here

    protected PinWire(Simulator s, int colorNum, String pinName) {

        sim = s;
        Clock clk = sim.getClock();
        state = new FiniteStateMachine(clk, startMode, modeName, 0);
        wireOutput = new WireOutput();
        wireInput = new WireInput();

        acceptsInput = false;
        acceptsOutput = false;
View Full Code Here

    protected PinWire(Simulator s, int colorNum, String pinName, int interruptNum, Microcontroller mcu) {

        sim = s;
        Clock clk = sim.getClock();
        state = new FiniteStateMachine(clk, startMode, modeName, 0);
        wireOutput = new WireOutput();
        wireInput = new WireInput();

        acceptsInput = false;
        acceptsOutput = false;
View Full Code Here

        }

    }

    public ATMega128(int id, ClockDomain cd, InterpreterFactory f, Program p) {
        super(cd, props, new FiniteStateMachine(cd.getMainClock(), MODE_ACTIVE, idleModeNames, transitionTimeMatrix));
        simulator = new Simulator(id, f, this, p);
        interpreter = simulator.getInterpreter();
        MCUCR_reg = getIOReg("MCUCR");
        installPins();
        installDevices();
View Full Code Here

        }

    }

    public ATMega16(int id, ClockDomain cd, InterpreterFactory f, Program p) {
        super(cd, props, new FiniteStateMachine(cd.getMainClock(), MODE_ACTIVE, idleModeNames, transitionTimeMatrix));
        simulator = new Simulator(id, f, this, p);
        interpreter = simulator.getInterpreter();
        MCUCR_reg = getIOReg("MCUCR");
        installPins();
        installDevices();
View Full Code Here

        controller.install(mcu);

        //setup energy recording
        Simulator simulator = mcu.getSimulator();
        stateMachine = new FiniteStateMachine(simulator.getClock(), RadioEnergy.startMode, allModeNames, ttm);
       
        new Energy("Radio", RadioEnergy.modeAmpere, stateMachine);

    }
View Full Code Here

        }

    }

    public ATMega32(int id, ClockDomain cd, InterpreterFactory f, Program p) {
        super(cd, props, new FiniteStateMachine(cd.getMainClock(), MODE_ACTIVE, idleModeNames, transitionTimeMatrix));
        simulator = new Simulator(id, f, this, p);
        interpreter = simulator.getInterpreter();
        MCUCR_reg = getIOReg("MCUCR");
        installPins();
        installDevices();
View Full Code Here

        colornum = n;
        color = c;
        //setup energy recording
        Clock clk = sim.getClock();
       
        state = new FiniteStateMachine(clk, startMode, modeName, 0);
        probe = new LEDProbe();
        new Energy(c, modeAmpere, state);
    }
View Full Code Here

    public SensorBoard(Simulator s) {
        sim = s;       
        //setup energy recording
        //note: the name sensorBoard was choosen on purpose as it is used in the log files
        //if you use sensor board, you may have trouble with importing the data as it is separated by white spaces
        FiniteStateMachine fsm = new FiniteStateMachine(s.getClock(), startMode, modeName, 0);
        new Energy("SensorBoard", modeAmpere, fsm);
    }
View Full Code Here

TOP

Related Classes of avrora.sim.FiniteStateMachine$TransitionEvent

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.