avrora.sim.radio.freespace
Class LocalAirImpl

java.lang.Object
  extended byavrora.sim.radio.freespace.LocalAirImpl

public class LocalAirImpl
extends java.lang.Object

Implementation of Local Air


Field Summary
static int bytePeriod
           
static int sampleTime
           
 
Constructor Summary
LocalAirImpl(Radio r, Position pos, Synchronizer synch)
          new local air
 
Method Summary
 void addNeighbor(LocalAirImpl r)
          add neighbor
 void addPacket(Radio.Transmission p, double pow, Radio sender)
          receive a packet
 void advanceChannel()
           
 java.util.Iterator getNeighbors()
          tell me, who is around
 Position getPosition()
          get node position
 Radio getRadio()
           
 byte readChannel()
           
 void removeNeighbor(LocalAirImpl r)
          remove a node
 int sampleRSSI(long gtime)
          compute signal strength bases on @see avrora.sim.radio.SimpleAir#sampleRSSI(long) by Daniel Lee
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sampleTime

public static final int sampleTime
See Also:
Constant Field Values

bytePeriod

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

LocalAirImpl

public LocalAirImpl(Radio r,
                    Position pos,
                    Synchronizer synch)
new local air

Parameters:
r - radio
pos - position
Method Detail

getPosition

public Position getPosition()
get node position


getRadio

public Radio getRadio()

addNeighbor

public void addNeighbor(LocalAirImpl r)
add neighbor


removeNeighbor

public void removeNeighbor(LocalAirImpl r)
remove a node


getNeighbors

public java.util.Iterator getNeighbors()
tell me, who is around


addPacket

public void addPacket(Radio.Transmission p,
                      double pow,
                      Radio sender)
receive a packet


sampleRSSI

public int sampleRSSI(long gtime)
compute signal strength bases on @see avrora.sim.radio.SimpleAir#sampleRSSI(long) by Daniel Lee


advanceChannel

public void advanceChannel()

readChannel

public byte readChannel()