On Oct 11, 2006, at 7:31 PM, Sarfraz Nawaz wrote:
The actual mote hardware has no support for multiply and divide.
However, there is a native math library (on my installation the
header file is /usr/avr/include/math.h) that comes with the tinyos
AVR tooclchain. It provides some math support in the form of
floating point multiply, divide, power, log etc. Tinyos-1.1.15 by
default links against this library (-lm flag).
On Tossim I believe your code is linked with the libc math library.
So to answer your question, yes it is possible to simulate a
network in Tossim in which sensors are perfroming multiplications etc.
This is all correct.
An observation from some recent optimizations of some parts of
TinyOS. It might be nice an elegant to use modulo (%), but if all
you're trying to test for is the edge case (e.g., wraparound in a
circular array), then an explicit test is much more efficient. On the
Telos platforms, a % is approximately 220 cycles.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help