If there is large differences, I create FooC and BarC such that they
contain the different components.
These are both wired in MyAppC, but only one is started (I let MyC
take care of the radio/serial control and send this to FooC/BarC as
needed through interface proxies).
If there are small differences (sometimes this can be as small as only
starting a timer for one and enabling a routing root status for the
other), then I put that in the startup/initialization.
I try to avoid having conditionals throughout the code, and where they
exist it's to proxy to the correct sub-component.
It's an ugly enough approach to start with...

On Sun, Jun 15, 2008 at 1:53 AM, Juri Lelli <[EMAIL PROTECTED]> wrote:
> Hi,
> I have to run a simulation where different application cooperate. I
> have created a single application with all my code in it. Now I have
> to enable/disable different part of it.
> How can I do that task? I've tried to insert something like
> "if(TOS_LOCAL_ADDRESS == X)" in my modules.. Is it the right way?
>
> Thanks.
>
> --
> Juri Lelli
> Linux User #404535
> Ubuntu User #19211
>
> Ubuntu 8.04 Hardy Enron
> http://www.ubuntu-it.org/index.php
> http://www.ubuntu.com/
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to