Instrumenting Radio SimulationsRadios are the primary communication mechanism in wireless sensor networks. Avrora simulates the radio hardware and its interface to the microcontroller which gives it the ability to simulate entire sensor networks, including the transmission and reception of packets over the radio. Similar to the Simulator and FiniteStateMachine classes, the Radio class exposes an interface called Radio.RadioProbe that allows users to add instrumentation to the operation of each radio device in the network.
package avrora.sim.radio;
public interface Radio {
...
public interface RadioProbe {
public void fireAtPowerChange(Radio r, int newPower);
public void fireAtFrequencyChange(Radio r, double freq);
public void fireAtBitRateChange(Radio r, int newbitrate);
public void fireAtTransmit(Radio r, Radio.Transmission p);
public void fireAtReceive(Radio r, Radio.Transmission p);
}
public void insertProbe(RadioProbe p);
public void removeProbe(RadioProbe p);
}
The radio allows the user to add instrumentation when radio parameters such as the power level and frequency are altered by the program, or when the program begins to transmit data over the radio. More information:
|