[Tinyos-help] Can someone please help?

Joe Polastre joe at polastre.com
Tue Sep 13 09:51:44 PDT 2005


This is a problem with your C coding.  "sendValue" must be declared
BEFORE it is used.

-Joe

On 9/13/05, Daniele <ufoman1900 at libero.it> wrote:
>  
> I have an erro when make the follow component: 
>   
>  
> 
> module ExchangeRSSIM 
> 
> { 
> 
> provides { 
> 
> interface StdControl; 
> 
> } 
> 
> uses { 
> 
> interface Timer; 
> 
> interface Leds; 
> 
> interface ReceiveMsg; 
> 
> } 
> 
> } 
> 
> implementation 
> 
> { 
> 
> uint16_t m_value; 
> 
> command result_t StdControl.init() 
> 
> { 
> 
> m_value=0; 
> 
> call Leds.init(); 
> 
> return SUCCESS; 
> 
> } 
> 
> command result_t StdControl.start() 
> 
> { 
> 
> call Timer.start(TIMER_REPEAT,100);//all nodes count 
> 
> return SUCCESS; 
> 
> } 
> 
> command result_t StdControl.stop() 
> 
> { 
> 
> return SUCCESS; 
> 
> } 
> 
> event result_t Timer.fired() 
> 
> { 
> 
> sendValue(m_value); 
> 
> return SUCCESS; 
> 
> } 
> 
> task void processStrength() 
> 
> { 
> 
> uint16_t leds = m_value >> 4; 
> 
> call Leds.set(leds); 
> 
> } 
> 
> event TOS_MsgPtr ReceiveMsg.receive(TOS_MsgPtr msg) 
> 
> { 
> 
> m_value = (msg->strength + 60)& 0xff; 
> 
> post processStrength(); 
> 
> return msg; 
> 
> } 
> 
> } 
> 
>   
> 
> while the follow is the EchangeRSSIC : 
> 
> configuration ExchangeRSSIC { 
> 
> } 
> 
> implementation { 
> 
> components Main, ExchangeRSSIM, TimerC, LedsC; 
> 
>  
> 
> Main.StdControl -> TimerC; 
> 
> Main.StdControl -> ExchangeRSSIM; 
> 
> ExchangeRSSIM.Timer -> TimerC.Timer[unique("Timer")]; 
> 
> ExchangeRSSIM.Leds -> LedsC; 
> 
>  
> 
> } 
> 
>   
> 
> This is the error : 
> 
> mkdir -p build/telosb 
> 
> ...................... 
> 
> ExchangeRSSIM.nc: In function `Timer.fired': 
> 
> ExchangeRSSIM.nc:36: implicit declaration of function `sendValue' 
> 
> make: *** [exe0] Error 1 
> 
>   
> 
> Excuse for my english.Can someone help me? Thanks 
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
>



More information about the Tinyos-help mailing list