|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for the RadioAir
. An implementation of this interface should provide the policies
through which radio transmission is handled. Radios should transmit via the transmit method. The air should
deliver packets to the radio through the receive() method in the Radio
interface.
Method Summary | |
void |
addRadio(Radio r)
The addRadio() method adds a new radio to this radio model. |
Synchronizer |
getSynchronizer()
The getSynchronizer() method gets the synchronizer for this air
implementation. |
byte |
readChannel(Radio r)
The readChannel() method reads the value of the channel at the current
time so that the last 8 bits transmitted (where the bits are 0 if there are no
transmissions) are returned. |
void |
removeRadio(Radio r)
The removeRadio() method removes a radio from this radio model. |
int |
sampleRSSI(Radio r)
The sampleRSSI() method is called by a radio when it wants to
sample the RSSI value of the air around it at the current time. |
void |
transmit(Radio r,
Radio.Transmission f)
The transmit() method is called by a radio when it begins to transmit
a packet over the air. |
Method Detail |
public void addRadio(Radio r)
addRadio()
method adds a new radio to this radio model.
r
- the radio to add to this air implementationpublic void removeRadio(Radio r)
removeRadio()
method removes a radio from this radio model.
r
- the radio to remove from this air implementationpublic void transmit(Radio r, Radio.Transmission f)
transmit()
method is called by a radio when it begins to transmit
a packet over the air. The radio packet should be delivered to those radios in
range which are listening, according to the radio model.
r
- the radio transmitting this packetf
- the radio packet transmitted into the airpublic int sampleRSSI(Radio r)
sampleRSSI()
method is called by a radio when it wants to
sample the RSSI value of the air around it at the current time. The air may
need to block (i.e. wait for neighbors) because this thread may be ahead
of other threads in global time. The underlying air implementation should use
a Synchronizer
for this purpose.
r
- the radio sampling the RSSI value
public byte readChannel(Radio r)
readChannel()
method reads the value of the channel at the current
time so that the last 8 bits transmitted (where the bits are 0 if there are no
transmissions) are returned.
r
- the radio sampling the channel
public Synchronizer getSynchronizer()
getSynchronizer()
method gets the synchronizer for this air
implementation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |