On 1/4/07, Michael Newman <[EMAIL PROTECTED]> wrote:
The first thing I did was to read the documentation.

The 2.0 Source code documentation link  on page
http://www.tinyos.net/tinyos-2.x/doc/ is broken, it points to
http://www.tinyos.net/tinyos-2.x/doc/html/nesdoc/ which gets a 404 error.
The 2.0 TEP is quite clear, I never got there. The 2.0 Tutorial and the
example code in Blink is wrong, leading you down the same path that I
followed.


The best documentation is the source code itself. Timer.h and Timer.nc
point to TEP 102 for additional details. As for the tutorial being
wrong,

The 1.1 documentation leads you to the tutorial which is clear too, it does
not match the implementation. I only looked at the 1.1 documentation which
matches my environment.

I started on the web site, followed the links under documentation and the
TinyOS 1.1 link there:

        http://www.tinyos.net/tinyos-1.x/doc/

There is no design document for timers (or link to the TEPs). From there I
went to the tutorial and examples which are VERY CLEAR and describe the
milliseconds as decimal time. They clearly describe one second as matching
1000 milliseconds with examples that show this correspondence.

Note that an interface which takes arguments in decimal milliseconds can
easily be presented against the existing back end. Rounding or truncation
error will occur when the decimal arguments have no exact representation in
binary milliseconds.

I suggest having both interfaces, there is no cost in space or time it all
gets resolved at compile time. The following would be equivalent calls:

        call Timer.startMS(TIMER_REPEAT,  1000);
        call Timer.startBinaryMS(TIMER_REPEAT,  1024);

You can debate which way to implemented the current start interface, for
compatibility it should match startBinaryMS, to match the 1.1 documentation
and existing examples it should match startMS.

        call Timer.start(TIMER_REPEAT,  1024);


DOCUMENTATION BUG: The link to TEP 102 on the bottom of the page:
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson2.html goes to TEP
107.

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help



--
Chad @ Home
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to