|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.sim.radio.freespace.LocalAirImpl
Implementation of Local Air
| Nested Class Summary | |
protected class |
LocalAirImpl.Deliver
handles the final delivery to the radio |
| Nested classes inherited from class avrora.sim.radio.freespace.LocalAir |
LocalAir.PowerRadioPacket |
| Field Summary |
| Fields inherited from interface avrora.sim.radio.freespace.LocalAir |
bytePeriod, sampleTime |
| Constructor Summary | |
LocalAirImpl(Radio r,
Position pos)
new local air |
|
| Method Summary | |
void |
addNeighbor(LocalAir r)
add neighbor |
void |
addPacket(Radio.RadioPacket p,
double pow,
Radio sender)
receive a packet |
protected long |
computeNextDelivery(long globalTime)
find the right packet to deliver |
java.util.Iterator |
getNeighbors()
tell me, who is around |
Position |
getPosition()
get node position |
Radio |
getRadio()
|
void |
removeNeighbor(LocalAir r)
remove a node |
int |
sampleRSSI(long cycles)
compute signal strength bases on @see avrora.sim.radio.SimpleAir#sampleRSSI(long) by Daniel Lee |
void |
scheduleDelivery(long globalTime,
Simulator sim)
schedule a packet for delivery |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LocalAirImpl(Radio r,
Position pos)
r - radiopos - position| Method Detail |
public Position getPosition()
getPosition in interface LocalAirLocalAir.getPosition()public Radio getRadio()
getRadio in interface LocalAirpublic void addNeighbor(LocalAir r)
addNeighbor in interface LocalAirr - node radioLocalAir.addNeighbor(avrora.sim.radio.freespace.LocalAir)public void removeNeighbor(LocalAir r)
removeNeighbor in interface LocalAirr - node radioLocalAir.removeNeighbor(avrora.sim.radio.freespace.LocalAir)public java.util.Iterator getNeighbors()
getNeighbors in interface LocalAirLocalAir.getNeighbors()
public void addPacket(Radio.RadioPacket p,
double pow,
Radio sender)
addPacket in interface LocalAirp - packetpow - transission powerLocalAir.addPacket(avrora.sim.radio.Radio.RadioPacket, double, avrora.sim.radio.Radio)public int sampleRSSI(long cycles)
sampleRSSI in interface LocalAircycles - time
LocalAir.sampleRSSI(long)
public void scheduleDelivery(long globalTime,
Simulator sim)
scheduleDelivery in interface LocalAirglobalTime - delivery timesim - the simulatorLocalAir.scheduleDelivery(long, avrora.sim.Simulator)protected long computeNextDelivery(long globalTime)
globalTime - current time
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||