| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Radio interface should be implemented by classes which would like to act as radios and
 access an instance of the RadioAir interface.
| Nested Class Summary | |
| static interface | Radio.RadioControllerA RadioControlleris an object installed into a Microcontroller. | 
| static interface | Radio.RadioProbeThe RadioProbeinterface encapsulates the idea of a probe inserted on a radio
 that is notified when changes in the state of the radio occur and when packets are sent and received
 from this radio. | 
| static class | Radio.TransmissionA Transmissionis an object describing the data transmitted overRadioAirover
 some period of time. | 
| Field Summary | |
| static int | MAX_BIT_RATE | 
| static int | NODE_HZ | 
| static int | TRANSFER_TIMETime in main clock cycles it takes for one byte to be sent over the air. | 
| Method Summary | |
|  RadioAir | getAir() | 
|  FiniteStateMachine | getFiniteStateMachine()The getFiniteStateMachine()method gets a reference to the finite state
 machine that represents this radio's state. | 
|  double | getFrequency()get the current frequency | 
|  int | getPower()get the transmission power | 
|  Simulator | getSimulator()Get the Simulatoron which this radio is running. | 
|  void | insertProbe(Radio.RadioProbe p)The insertProbe()method inserts a probe into a radio. | 
|  boolean | isListening() | 
|  void | removeProbe(Radio.RadioProbe p)The removeProbe()method removes a probe on this radio. | 
|  void | setAir(RadioAir air) | 
| Field Detail | 
public static final int NODE_HZ
public static final int MAX_BIT_RATE
public static final int TRANSFER_TIME
| Method Detail | 
public Simulator getSimulator()
Simulator on which this radio is running.
public int getPower()
public double getFrequency()
public boolean isListening()
public RadioAir getAir()
public void setAir(RadioAir air)
public FiniteStateMachine getFiniteStateMachine()
getFiniteStateMachine() method gets a reference to the finite state
 machine that represents this radio's state. For example, there are states corresponding
 to "on", "off", "transmitting", and "receiving". The state names and numbers will vary
 by radio implementation. The FiniteStateMachine instance allows the user
 to instrument the state transitions in order to gather information during simulation.
public void insertProbe(Radio.RadioProbe p)
insertProbe() method inserts a probe into a radio. The probe is then
 notified when the radio changes power, frequency, baud rate, or transmits or receives
 a byte.
p - the probe to insert on this radiopublic void removeProbe(Radio.RadioProbe p)
removeProbe() method removes a probe on this radio.
p - the probe to remove from this radio instance| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||