On Wednesday 23 August 2006 03:40 am, Jay Taneja wrote:
> ... it runs into
> errors when working with Collection, which has a StdControl interface
> (which has start(), and stop() functions). The problem is that I have
> implemented AMControl.startDone() and stopDone() events in MySenderP (for
> the Serial interface). However, these events aren't present in the
> Collection StdControl interface and the compiler complains thusly.
> [snip]
> Any suggestions for getting around this? Thanks for the help.
One solution is to wrap the Collection's StdControl interface in a custom
component implementing SplitControl. Maybe something a bit like this:
component CollectionSplitControl {
provides SplitControl;
uses StdControl;
...
}
implementation {
task void startDone() {
return SUCCESS;
}
command error_t SplitControl.start() {
error_t ret = RealCollection.start();
if (ret == SUCCESS)
post startDone();
return ret;
}
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help