[Tinyos-help] #ifdef support in nesc.

Tehn Yit Chin tehn-yit.chin at greyinnovation.com
Thu Jun 29 18:53:42 PDT 2006


Philip Levis wrote:
> On Jun 29, 2006, at 5:33 PM, Tehn Yit Chin wrote:
> 
>> Hi,
>>
>> Does anyone know if #ifdef is supported in nesc?
> 
> 
> The full C preprocessor is supported. Your bug is that you are not  
> wiring the Sounder. You need to include it in the configuration.
> 

In Surge.nc, I was wiring Sounder as

implementation {
   components Main, SurgeM, TimerC, LedsC, NoLeds, Photo as Sensor, 
RandomLFSR,
     GenericCommPromiscuous as Comm, Bcast, MultiHopRouter as multihopM, 
QueuedSend;

#ifdef CHIRP_ENABLE
   Components Sounder;
#endif /* CHIRP_ENABLE */

....
}

Is this valid? Must all components be specify in one statement?

thanks,
tyc


More information about the Tinyos-help mailing list