added toString method
This commit is contained in:
parent
0bb6e99326
commit
28ace6d912
|
@ -26,7 +26,7 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: ContikiRadio.java,v 1.24 2008/12/04 14:03:42 joxe Exp $
|
* $Id: ContikiRadio.java,v 1.25 2009/02/24 15:09:07 fros4943 Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package se.sics.cooja.contikimote.interfaces;
|
package se.sics.cooja.contikimote.interfaces;
|
||||||
|
@ -388,8 +388,7 @@ public class ContikiRadio extends Radio implements ContikiMoteInterface, PolledA
|
||||||
|
|
||||||
// Calculate transmission duration (ms)
|
// Calculate transmission duration (ms)
|
||||||
int duration = (int) ((280 + 10 * size) / RADIO_TRANSMISSION_RATE_kbps);
|
int duration = (int) ((280 + 10 * size) / RADIO_TRANSMISSION_RATE_kbps);
|
||||||
transmissionEndTime = myMote.getSimulation().getSimulationTime()
|
transmissionEndTime = myMote.getSimulation().getSimulationTime() + Math.max(1, duration);
|
||||||
+ Math.max(1, duration);
|
|
||||||
lastEventTime = myMote.getSimulation().getSimulationTime();
|
lastEventTime = myMote.getSimulation().getSimulationTime();
|
||||||
|
|
||||||
lastEvent = RadioEvent.TRANSMISSION_STARTED;
|
lastEvent = RadioEvent.TRANSMISSION_STARTED;
|
||||||
|
@ -497,4 +496,8 @@ public class ContikiRadio extends Radio implements ContikiMoteInterface, PolledA
|
||||||
public Mote getMote() {
|
public Mote getMote() {
|
||||||
return myMote;
|
return myMote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return "Radio at " + myMote;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue