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
Interface Radio

All Superinterfaces:
  Monitor

All Known Implementing Classes:
  CC1000Radio

public interface Radio
extends Monitor

The `Radio` interface should be implemented by classes which would like to act as radios and access an instance of the `RadioAir` interface.

Nested Class Summary
`static interface` | `Radio.RadioController` A `RadioController` is an object installed into a Microcontroller.
`static class` | `Radio.RadioPacket` A `RadioPacket` is an object describing the data transmitted over `RadioAir` over some period of time.

Field Summary
`static int` | `TRANSFER_TIME` Time in ATMega128L cycles it takes for one byte to be sent over the air.

Method Summary
`void` | `activateLocalAir(Position pos)` activate local air, by setting params
`RadioAir` | `getAir()`
`double` | `getFrequency()` get the current frequency
`LocalAir` | `getLocalAir()` get local air implementation
`int` | `getPower()` get the transmission power
`Simulator` | `getSimulator()` Get the `Simulator` on which this radio is running.
`SimulatorThread` | `getSimulatorThread()` Get the `SimulatorThread` thread on which this radio is running.
`void` | `receive(Radio.RadioPacket f)` Receive a frame from the air.
`void` | `setSimulatorThread(SimulatorThread thread)` Set the `SimulatorThread` of this radio.
`void` | `transmit(Radio.RadioPacket f)` Transmit a frame from the controller.

Methods inherited from interface avrora.monitors.Monitor
`report`

Field Detail

### TRANSFER_TIME

    public static final int TRANSFER_TIME

  Time in ATMega128L cycles it takes for one byte to be sent over the air. Much of the implementation is derived from this constant, so generalizing in the future may require some careful consideration.

  See Also:
    Constant Field Values

Method Detail

### receive

    public void receive(Radio.RadioPacket f)

  Receive a frame from the air. Should be called by the `RadioAir` and pass data into the `RadioController`.

### transmit

    public void transmit(Radio.RadioPacket f)

  Transmit a frame from the controller. Should be called by the `RadioController` and transmitted into the `RadioAir`.

### getSimulator

    public Simulator getSimulator()

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

### getSimulatorThread

    public SimulatorThread getSimulatorThread()

  Get the `SimulatorThread` thread on which this radio is running.

### setSimulatorThread

    public void setSimulatorThread(SimulatorThread thread)

  Set the `SimulatorThread` of this radio.

### getPower

    public int getPower()

  get the transmission power

  Returns:
    transmission power

### getFrequency

    public double getFrequency()

  get the current frequency

  Returns:
    frequency

### getLocalAir

    public LocalAir getLocalAir()

  get local air implementation

  Returns:
    local air

### activateLocalAir

    public void activateLocalAir(Position pos)

  activate local air, by setting params

  Parameters:
    `pos` - node position

### getAir

    public RadioAir getAir()

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