[Tinyos-help] Question on Default Command and Event implementation
Hui KANG
huk at a.cs.okstate.edu
Sun Jan 7 22:31:58 PST 2007
Dr. Levis:
As you mentioned in the TinyOS programming book, default command and
event implementations address the problem of parameterized interface. It
provides a default implementation of command and event so that the user
does not need to wire all the instances.
However when I digged the code in CC2420RadioM.nc, I found something like
this.
default event TOS_MsgPtr Receive.receive( TOS_MsgPtr msg ) {
return msg;
}
And in CC2420RadioC.nc
configuration CC2420RadioC
{
provides {
interface ReceiveMsg as Receive @exactlyonce();
}
}
This Receive interface is not parameterized. But there is the default
implementation. However, nesC can compile it successfully if I
commentted the default implementation. Could you explain why?
Regards,
Hui
More information about the Tinyos-help
mailing list