Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## avrora.sim.radio
Class CC1000Radio

    java.lang.Object
      avrora.sim.radio.CC1000Radio

All Implemented Interfaces:
  Radio

public class CC1000Radio
extends java.lang.Object
implements Radio

The `CC1000Radio` class is a simulation of the CC1000 radio for use with avrora. The CC1000 radio is used with the Mica2 platform in the real world. Verbose printers for this class include "sim.cc1000", "sim.cc1000.data", "sim.cc1000.pinconfig".

Nested Class Summary
`class` | `CC1000Radio.ATMegaController` A CC1000 Controller class for the ATMega microcontroller family.
`protected class` | `CC1000Radio.CALRegister`
`protected class` | `CC1000Radio.CurrentRegister` The `CurrentRegister` controls various currents running through the CC1000 wiring.
`protected class` | `CC1000Radio.DummyRegister` The `DummyRegister` is a filler class for registers within the 7-bit address space of the radio registers, but do not actually exist/do anything in the real radio.
`protected class` | `CC1000Radio.FrequencyRegister` A frequency register on the CC1000.
`protected class` | `CC1000Radio.FrequencySeparationRegister` The frequency separation register on the CC1000.
`protected class` | `CC1000Radio.FrontEndRegister`
`protected class` | `CC1000Radio.FSCTRLRegister`
`protected class` | `CC1000Radio.LockRegister`
`protected class` | `CC1000Radio.MainRegister` The main register on the CC1000.
`protected class` | `CC1000Radio.MatchRegister`
`protected class` | `CC1000Radio.Modem0Register` The baud rate of the system is determined by values on the MODEM0 register.
`protected class` | `CC1000Radio.Modem1Register`
`protected class` | `CC1000Radio.Modem2Register`
`protected class` | `CC1000Radio.PA_POWRegister`
`protected class` | `CC1000Radio.PLLRegister`
`protected class` | `CC1000Radio.PrescalerRegister`
`protected class` | `CC1000Radio.RadioRegister` The `RadioRegister` is an abstract register grouping together registers on the CC1000 radio.
`protected class` | `CC1000Radio.Receiver` TODO: determine if I will really need this for anything more than debugging.
`protected class` | `CC1000Radio.SerialConfigurationInterface` Reads the three pins used in the three wire serial configuration interface.
`protected class` | `CC1000Radio.Transmitter` This class is a state machine similar to `Receiver`, but for the transmitter on the radio.

Nested classes inherited from class avrora.sim.radio.Radio
`Radio.RadioController, Radio.RadioProbe, Radio.Transmission`

Field Summary
`protected RadioAir` | `air` Radio environment into which this radio broadcasts.
`protected static java.lang.String[]` | `allModeNames`
`static int` | `CAL`
`protected CC1000Radio.CALRegister` | `CAL_reg`
`protected Radio.RadioController` | `controller`
`static int` | `CURRENT`
`protected CC1000Radio.CurrentRegister` | `CURRENT_reg`
`protected CC1000Radio.FrequencyRegister` | `currentFrequencyRegister`
`static int` | `FREQ_0A`
`static int` | `FREQ_0B`
`static int` | `FREQ_1A`
`static int` | `FREQ_1B`
`static int` | `FREQ_2A`
`static int` | `FREQ_2B`
`protected CC1000Radio.FrequencyRegister` | `FREQ_A_reg`
`protected CC1000Radio.FrequencyRegister` | `FREQ_B_reg`
`static int` | `FRONT_END`
`protected CC1000Radio.FrontEndRegister` | `FRONT_END_reg`
`static int` | `FSCTRL`
`protected CC1000Radio.FSCTRLRegister` | `FSCTRL_reg`
`protected CC1000Radio.FrequencySeparationRegister` | `FSEP_reg`
`static int` | `FSEP0`
`static int` | `FSEP1`
`static int` | `LOCK`
`protected CC1000Radio.LockRegister` | `LOCK_reg`
`static int` | `MAIN` Register addresses.
`protected CC1000Radio.MainRegister` | `MAIN_reg` Registers
`static int` | `MATCH`
`protected CC1000Radio.MatchRegister` | `MATCH_reg`
`protected Microcontroller` | `mcu` Connected Microcontroller, Simulator and SimulatorThread should all correspond.
`protected CC1000Radio.Modem0Register` | `MODEM_0_reg`
`protected CC1000Radio.Modem1Register` | `MODEM_1_reg`
`protected CC1000Radio.Modem2Register` | `MODEM_2_reg`
`static int` | `MODEM0`
`static int` | `MODEM1`
`static int` | `MODEM2`
`static int` | `PA_POW`
`protected CC1000Radio.PA_POWRegister` | `PA_POW_reg`
`static int` | `PLL`
`protected CC1000Radio.PLLRegister` | `PLL_reg`
`static int` | `PRESCALER`
`protected CC1000Radio.PrescalerRegister` | `PRESCALER_reg`
`protected avrora.sim.radio.CC1000Radio.ProbeList` | `probes`
`protected Simulator.Printer` | `radioPrinter`
`protected CC1000Radio.Receiver` | `receiver`
`protected CC1000Radio.RadioRegister[]` | `registers`
`protected Simulator` | `sim`
`protected FiniteStateMachine` | `stateMachine`
`static int` | `TEST0`
`static int` | `TEST1`
`static int` | `TEST2`
`static int` | `TEST3`
`static int` | `TEST4`
`static int` | `TEST5`
`static int` | `TEST6`
`protected CC1000Radio.Transmitter` | `transmitter`
`protected static int[][]` | `ttm`
`protected long` | `xoscFrequency`

Fields inherited from interface avrora.sim.radio.Radio
`MAX_BIT_RATE, NODE_HZ, TRANSFER_TIME`

Constructor Summary
`CC1000Radio(Microcontroller mcu, long xfreq)`

Method Summary
`RadioAir` | `getAir()`
`FiniteStateMachine` | `getFiniteStateMachine()` The `getFiniteStateMachine()` method gets a reference to the finite state machine that represents this radio's state.
`double` | `getFrequency()` get transmission frequency
`int` | `getPower()` get the transmission power
`Simulator` | `getSimulator()` Get the `Simulator` on which this radio is running.
`void` | `insertProbe(Radio.RadioProbe p)` The `insertProbe()` method inserts a probe into a radio.
`boolean` | `isListening()`
`void` | `removeProbe(Radio.RadioProbe p)` The `removeProbe()` method removes a probe on this radio.
`void` | `setAir(RadioAir nair)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAIN

    public static final int MAIN

  Register addresses.

  See Also:
    Constant Field Values

### FREQ_2A

    public static final int FREQ_2A

See Also:
  Constant Field Values

### FREQ_1A

    public static final int FREQ_1A

See Also:
  Constant Field Values

### FREQ_0A

    public static final int FREQ_0A

See Also:
  Constant Field Values

### FREQ_2B

    public static final int FREQ_2B

See Also:
  Constant Field Values

### FREQ_1B

    public static final int FREQ_1B

See Also:
  Constant Field Values

### FREQ_0B

    public static final int FREQ_0B

See Also:
  Constant Field Values

### FSEP1

    public static final int FSEP1

See Also:
  Constant Field Values

### FSEP0

    public static final int FSEP0

See Also:
  Constant Field Values

### CURRENT

    public static final int CURRENT

See Also:
  Constant Field Values

### FRONT_END

    public static final int FRONT_END

See Also:
  Constant Field Values

### PA_POW

    public static final int PA_POW

See Also:
  Constant Field Values

### PLL

    public static final int PLL

See Also:
  Constant Field Values

### LOCK

    public static final int LOCK

See Also:
  Constant Field Values

### CAL

    public static final int CAL

See Also:
  Constant Field Values

### MODEM2

    public static final int MODEM2

See Also:
  Constant Field Values

### MODEM1

    public static final int MODEM1

See Also:
  Constant Field Values

### MODEM0

    public static final int MODEM0

See Also:
  Constant Field Values

### MATCH

    public static final int MATCH

See Also:
  Constant Field Values

### FSCTRL

    public static final int FSCTRL

See Also:
  Constant Field Values

### PRESCALER

    public static final int PRESCALER

See Also:
  Constant Field Values

### TEST6

    public static final int TEST6

See Also:
  Constant Field Values

### TEST5

    public static final int TEST5

See Also:
  Constant Field Values

### TEST4

    public static final int TEST4

See Also:
  Constant Field Values

### TEST3

    public static final int TEST3

See Also:
  Constant Field Values

### TEST2

    public static final int TEST2

See Also:
  Constant Field Values

### TEST1

    public static final int TEST1

See Also:
  Constant Field Values

### TEST0

    public static final int TEST0

See Also:
  Constant Field Values

### allModeNames

    protected static final java.lang.String[] allModeNames

### ttm

    protected static final int[][] ttm

### registers

    protected CC1000Radio.RadioRegister[] registers

### MAIN_reg

    protected final CC1000Radio.MainRegister MAIN_reg

  Registers

### FREQ_A_reg

    protected final CC1000Radio.FrequencyRegister FREQ_A_reg

### FREQ_B_reg

    protected final CC1000Radio.FrequencyRegister FREQ_B_reg

### FSEP_reg

    protected final CC1000Radio.FrequencySeparationRegister FSEP_reg

### CURRENT_reg

    protected final CC1000Radio.CurrentRegister CURRENT_reg

### FRONT_END_reg

    protected final CC1000Radio.FrontEndRegister FRONT_END_reg

### PA_POW_reg

    protected final CC1000Radio.PA_POWRegister PA_POW_reg

### PLL_reg

    protected final CC1000Radio.PLLRegister PLL_reg

### LOCK_reg

    protected final CC1000Radio.LockRegister LOCK_reg

### CAL_reg

    protected final CC1000Radio.CALRegister CAL_reg

### MODEM_2_reg

    protected final CC1000Radio.Modem2Register MODEM_2_reg

### MODEM_1_reg

    protected final CC1000Radio.Modem1Register MODEM_1_reg

### MODEM_0_reg

    protected final CC1000Radio.Modem0Register MODEM_0_reg

### MATCH_reg

    protected final CC1000Radio.MatchRegister MATCH_reg

### FSCTRL_reg

    protected final CC1000Radio.FSCTRLRegister FSCTRL_reg

### PRESCALER_reg

    protected final CC1000Radio.PrescalerRegister PRESCALER_reg

### radioPrinter

    protected final Simulator.Printer radioPrinter

### receiver

    protected final CC1000Radio.Receiver receiver

### transmitter

    protected final CC1000Radio.Transmitter transmitter

### probes

    protected final avrora.sim.radio.CC1000Radio.ProbeList probes

### xoscFrequency

    protected final long xoscFrequency

### currentFrequencyRegister

    protected CC1000Radio.FrequencyRegister currentFrequencyRegister

### mcu

    protected final Microcontroller mcu

  Connected Microcontroller, Simulator and SimulatorThread should all correspond.

### sim

    protected final Simulator sim

### stateMachine

    protected final FiniteStateMachine stateMachine

### controller

    protected Radio.RadioController controller

### air

    protected RadioAir air

  Radio environment into which this radio broadcasts.

Constructor Detail

### CC1000Radio

    public CC1000Radio(Microcontroller mcu,
                       long xfreq)

Method Detail

### getFiniteStateMachine

    public FiniteStateMachine getFiniteStateMachine()

  The `getFiniteStateMachine()` method gets a reference to the finite state machine that represents this radio's state. For example, there are states corresponding to "on", "off", "transmitting", and "receiving". The state names and numbers will vary by radio implementation. The `FiniteStateMachine` instance allows the user to instrument the state transitions in order to gather information during simulation.

  Specified by:
    `getFiniteStateMachine` in interface `Radio`
  Returns:
    a reference to the finite state machine for this radio

### insertProbe

    public void insertProbe(Radio.RadioProbe p)

  The `insertProbe()` method inserts a probe into a radio. The probe is then notified when the radio changes power, frequency, baud rate, or transmits or receives a byte.

  Specified by:
    `insertProbe` in interface `Radio`
  Parameters:
    `p` - the probe to insert on this radio

### removeProbe

    public void removeProbe(Radio.RadioProbe p)

  The `removeProbe()` method removes a probe on this radio.

  Specified by:
    `removeProbe` in interface `Radio`
  Parameters:
    `p` - the probe to remove from this radio instance

### isListening

    public boolean isListening()

  Specified by:
    `isListening` in interface `Radio`

### getSimulator

    public Simulator getSimulator()

  Get the `Simulator` on which this radio is running.

  Specified by:
    `getSimulator` in interface `Radio`

### getPower

    public int getPower()

  get the transmission power

  Specified by:
    `getPower` in interface `Radio`
  Returns:
    transmission power
  See Also:
    `Radio.getPower()`

### getFrequency

    public double getFrequency()

  get transmission frequency

  Specified by:
    `getFrequency` in interface `Radio`
  Returns:
    frequency
  See Also:
    `Radio.getFrequency()`

### getAir

    public RadioAir getAir()

  Specified by:
    `getAir` in interface `Radio`

### setAir

    public void setAir(RadioAir nair)

  Specified by:
    `setAir` in interface `Radio`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD