Unterfinger Jérémy wrote:
At the line 70 in the component LinkEstimatorP is written:
//////////////////
INFINITY = 0xff,
//////////////////

I tried to understand why i have this problem, and nobody never spoke about
it on the mailing list, but i'm not workimg with Tinyos for a long time and
i could not find any reasons.
I just discover that suppressing the line 70 from LinkEstimatorP makes the
Tossim compilation working well, but the simple compilation "make micaz"
does not work this time.

In the standard C library, the built-in math.h header file predefines INFINITY to be some really large constant. This creates a conflict when you're compiling LinkEstimatorP.nc for TOSSIM, since line 70 will effectively try to redefine the constant INFINITY in a way that the C compiler can't interpret. There's no naming conflict when you do "make micaz", since the motes use a limited C library that doesn't predefine INFINITY.

The simplest solution to this problem is to do a search-and-replace in LinkEstimatorP.nc, replacing INFINITY with INFINITY_. This version will compile fine for both TOSSIM and actual mote hardware.

Greg Hackmann
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to