avrora.sim.radio.freespace
Interface LocalAir

All Known Implementing Classes:
LocalAirImpl

public interface LocalAir

local air each device has a local view on the global air. It sees different packets and transmission power.


Nested Class Summary
static class LocalAir.PowerRadioPacket
          class to model a packet and transmission power
 
Field Summary
static int bytePeriod
           
static int sampleTime
           
 
Method Summary
 void addNeighbor(LocalAir r)
          add a new node the air
 void addPacket(Radio.RadioPacket p, double pow, Radio sender)
          add packet to be received, called by transmitting nodes
 java.util.Iterator getNeighbors()
          get list of nodes around
 Position getPosition()
          get the position of this node
 Radio getRadio()
           
 void removeNeighbor(LocalAir r)
          remove node from the air
 int sampleRSSI(long cycles)
          measure the signal strength around here
 void scheduleDelivery(long time, Simulator sim)
          schedule deivery of packets
 

Field Detail

sampleTime

public static final int sampleTime
See Also:
Constant Field Values

bytePeriod

public static final int bytePeriod
See Also:
Constant Field Values
Method Detail

getPosition

public Position getPosition()
get the position of this node

Returns:
node position

addNeighbor

public void addNeighbor(LocalAir r)
add a new node the air

Parameters:
r - node radio

removeNeighbor

public void removeNeighbor(LocalAir r)
remove node from the air

Parameters:
r - node radio

getNeighbors

public java.util.Iterator getNeighbors()
get list of nodes around

Returns:
node list iterator

sampleRSSI

public int sampleRSSI(long cycles)
measure the signal strength around here

Parameters:
cycles - time
Returns:
signal strength

addPacket

public void addPacket(Radio.RadioPacket p,
                      double pow,
                      Radio sender)
add packet to be received, called by transmitting nodes

Parameters:
p - packet
pow - transission power

scheduleDelivery

public void scheduleDelivery(long time,
                             Simulator sim)
schedule deivery of packets

Parameters:
time - delivery time
sim - the simulator

getRadio

public Radio getRadio()