|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectavrora.sim.radio.SimpleAir
Very simple implementation of radio air. It assumes a lossless environment where all radios are able to communicate with each other. This simple air is blind to the frequencies used in transmission (i.e. it assumes that all frequencies are really the same). This class should provide the proper scheduling policy with respect to threads that more complicated radio implementations can use the time scheduling policy and only overload the delivery policy.
| Nested Class Summary | |
protected class |
SimpleAir.DeliveryMeet
|
protected class |
SimpleAir.RadioClock
An extended version of GlobalClock that implements a version of
LocalMeet that is appropriate for delivering radio packets. |
protected class |
SimpleAir.RadioTicker
The RadioTicker class is the global timer for the radio. |
| Field Summary | |
int |
bitPeriod
|
int |
bitPeriod2
|
long |
bitsDiscarded
|
int |
bytePeriod
The amount of cycles it takes for one byte to be sent. |
long |
bytesAttempted
|
long |
bytesCorrupted
|
long |
bytesDelivered
|
protected Radio.RadioPacket |
firstPacket
|
long |
firstPacketTime
|
protected java.util.LinkedList |
packetsLeftOver
|
protected java.util.LinkedList |
packetsThisPeriod
|
protected SimpleAir.RadioClock |
radioClock
GlobalClock used by the air environment. |
protected java.util.HashSet |
radios
|
int |
sampleTime
|
static SimpleAir |
simpleAir
|
protected boolean |
utilization
|
| Constructor Summary | |
SimpleAir()
|
|
| Method Summary | |
void |
addRadio(Radio r)
Add a radio to the environment. |
void |
recordUtilization(boolean v)
|
void |
removeRadio(Radio r)
Remove a radio from the environment. |
int |
sampleRSSI(Radio r)
|
void |
transmit(Radio r,
Radio.RadioPacket f)
Transmits frame f into the radio environment. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final SimpleAir simpleAir
protected final SimpleAir.RadioClock radioClock
protected Radio.RadioPacket firstPacket
protected java.util.LinkedList packetsThisPeriod
protected java.util.LinkedList packetsLeftOver
protected final java.util.HashSet radios
protected boolean utilization
public long firstPacketTime
public long bytesDelivered
public long bytesAttempted
public long bitsDiscarded
public long bytesCorrupted
public final int bytePeriod
public final int bitPeriod
public final int bitPeriod2
public final int sampleTime
| Constructor Detail |
public SimpleAir()
| Method Detail |
public void recordUtilization(boolean v)
public void addRadio(Radio r)
RadioAir
addRadio in interface RadioAirpublic void removeRadio(Radio r)
RadioAir
removeRadio in interface RadioAir
public void transmit(Radio r,
Radio.RadioPacket f)
RadioAirf into the radio environment.
transmit in interface RadioAirpublic int sampleRSSI(Radio r)
sampleRSSI in interface RadioAir
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||