|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public static final int sampleTime
public static final int bytePeriod
Method Detail |
public Position getPosition()
public void addNeighbor(LocalAir r)
r
- node radiopublic void removeNeighbor(LocalAir r)
r
- node radiopublic java.util.Iterator getNeighbors()
public int sampleRSSI(long cycles)
cycles
- time
public void addPacket(Radio.RadioPacket p, double pow, Radio sender)
p
- packetpow
- transission powerpublic void scheduleDelivery(long time, Simulator sim)
time
- delivery timesim
- the simulatorpublic Radio getRadio()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |