On 4/3/07, Richard Dobbis <[EMAIL PROTECTED]> wrote:
Does the 'default event …' capability work in tinyOS 1.x ??

It's a feature of the nesC language, not of TinyOS x.y. And yes, it
does work, but now how you think it does...

I built a simple test using the Timer module and commented-out the
'Timer.fired' event in my 'testM.nc' and the compiler complained that I had
not implemented the event. The event is properly defaulted in the TimerM.nc
module. Thanks !!

Providing default handlers for an event is a way for the provider of
an interface to allow that interface to not be wirred. However, it
does not allow users of that interface to omit implementing the
interface. I.e., if your module says "uses interface Timer as Foo",
then it *must* implement Foo.fired, irrespective of the presence or
absence of a default event handler in the provider of the Timer
interface.

David Gay

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

Reply via email to