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:
  Monitor, 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.ATMega128LController` A CC1000 Controller class for the ATMega128L microcontroller cpu.
`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.RadioPacket`

Field Summary
`protected RadioAir` | `air` Radio environment into which this radio broadcasts.
`static int` | `CAL`
`protected CC1000Radio.CALRegister` | `CAL_reg`
`static int` | `CURRENT`
`protected CC1000Radio.CurrentRegister` | `CURRENT_reg`
`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 Simulator.Printer` | `radioPrinter`
`protected CC1000Radio.Receiver` | `receiver`
`protected CC1000Radio.RadioRegister[]` | `registers`
`protected Simulator` | `sim`
`protected SimulatorThread` | `simThread`
`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`

Fields inherited from interface avrora.sim.radio.Radio
`TRANSFER_TIME`

Constructor Summary
`CC1000Radio(Microcontroller mcu)`

Method Summary
`void` | `activateLocalAir(Position pos)` activate positions
`RadioAir` | `getAir()`
`double` | `getFrequency()` get transission frequency
`LocalAir` | `getLocalAir()` get local air
`int` | `getPower()` get the transmission power
`Simulator` | `getSimulator()` Get the `Simulator` on which this radio is running.
`SimulatorThread` | `getSimulatorThread()` Gets the `SimulatorThread` of this radio.
`void` | `receive(Radio.RadioPacket packet)` Part of the `Radio` interface.
`void` | `report()` The `report()` method is called after the simulation is complete.
`void` | `setSimulatorThread(SimulatorThread thread)` Sets the `SimulatorThread` of this radio.
`void` | `transmit(Radio.RadioPacket packet)` Transmit a packet of data into the `RadioAir`.

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

Field Detail

### registers

    protected CC1000Radio.RadioRegister[] registers

### 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

### 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

### mcu

    protected final Microcontroller mcu

  Connected Microcontroller, Simulator and SimulatorThread should all correspond.

### sim

    protected final Simulator sim

### simThread

    protected SimulatorThread simThread

### air

    protected RadioAir air

  Radio environment into which this radio broadcasts.

Constructor Detail

### CC1000Radio

    public CC1000Radio(Microcontroller mcu)

Method Detail

### setSimulatorThread

    public void setSimulatorThread(SimulatorThread thread)

  Sets the `SimulatorThread` of this radio. Should be done BEFORE adding this radio to a `RadioAir` environment.

  Specified by:
    `setSimulatorThread` in interface `Radio`

### getSimulatorThread

    public SimulatorThread getSimulatorThread()

  Gets the `SimulatorThread` of this radio.

  Specified by:
    `getSimulatorThread` in interface `Radio`

### receive

    public void receive(Radio.RadioPacket packet)

  Part of the `Radio` interface. It should be called by the `RadioAir` that this radio is transmitting over when data is to be received.

  Specified by:
    `receive` in interface `Radio`

### transmit

    public void transmit(Radio.RadioPacket packet)

  Transmit a packet of data into the `RadioAir`.

  Specified by:
    `transmit` 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 transission frequency

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

### getLocalAir

    public LocalAir getLocalAir()

  get local air

  Specified by:
    `getLocalAir` in interface `Radio`
  Returns:
    local air
  See Also:
    `Radio.getLocalAir()`

### activateLocalAir

    public void activateLocalAir(Position pos)

  activate positions

  Specified by:
    `activateLocalAir` in interface `Radio`
  Parameters:
    `pos` - node position
  See Also:
    `Radio.activateLocalAir(avrora.sim.radio.freespace.Position)`

### getAir

    public RadioAir getAir()

  Specified by:
    `getAir` in interface `Radio`

### report

    public void report()

  Description copied from interface: `Monitor`
  The `report()` method is called after the simulation is complete. The monitor generates a textual or other format representation of the information collected during the execution of the program.

  Specified by:
    `report` in interface `Monitor`

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