[Tinyos-help] Can someone please help?

Daniele ufoman1900 at libero.it
Fri Sep 16 00:23:56 PDT 2005


I am reading Wireless School on Wireless sensor Networks
and Smart objects,that is regards "SUMMER SCHOOL on WIRELESS SENSOR... Moteiv Corporation,and i have found some errors on the code C  and NesC.An example ,i have this error: 

mkdir -p build/telosb

ExchangeRSSIM.nc: In function `Timer.fired':

ExchangeRSSIM.nc:37: implicit declaration of function `sendValue'

make: *** [exe0] Error 1



This are the components:



configuration ExchangeRSSIC {

}

implementation {

components Main, ExchangeRSSIM, TimerC, LedsC;


Main.StdControl -> TimerC;

Main.StdControl -> ExchangeRSSIM;

ExchangeRSSIM.Timer -> TimerC.Timer[unique("Timer")];

ExchangeRSSIM.Leds -> LedsC;


}

 And 



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; 

} 

}



For me "sendValue" must be declared
BEFORE it is used,but what i do?

And are there other guide for this compilation/installation techniques? 

Thank you.

Daniele

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20050916/447480b9/attachment.html


More information about the Tinyos-help mailing list