[Tinyos-help] RE: External Shutdown
Bessell, Travis
Travis.Bessell at dsto.defence.gov.au
Mon Jul 10 18:24:18 PDT 2006
Hello,
Well I found out the reason as to why the ExternalShutdown command used
within HighFrequencySampling does not work on the micaz motes. Turns out
the code for ExternalShutdown can be found in \tos\system\AMStandard.nc.
Within this code there is a control.stop() command that is invoked when
you call ExternalShutdown.stop(). The command is shown below.
Command bool Control.stop(){
result_t ok1 = call UartControl.stop();
result_t ok2 = call RadioControl.stop();
result_t ok3 = call ActivityTimer.stop();
call PowerManagement.adjustPower();
return rcombine3(ok1,ok2,ok3);
}
Now this code does not produce a successful result. However when I
changed the order around in which it stops the components, it works! For
example I changed the code shown below and the command work perfectly.
Command bool Control.stop(){
result_t ok3 = call ActivityTimer.stop();
result_t ok1 = call UartControl.stop();
result_t ok2 = call RadioControl.stop();
call PowerManagement.adjustPower();
return rcombine3(ok1,ok2,ok3);
}
This confused me greatly and I still have no idea why this would make a
difference. If anyone has some form of explanation for this it would be
greatly appreciated?
Regards
Travis
_____________________________________________
From: Bessell, Travis
Sent: Friday, 7 July 2006 3:06 PM
To: 'tinyos-help at Millennium.Berkeley.EDU'
Subject: Sec:u External Shutdown
Hello All,
I am wondering if any has successfully used the ExternalShutdown command
on the MicaZ? I have tried to use it, however, when I run the command
"call ExternalShutdown.stop()" it is never successful. Does anyone know
what I may be doing wrong?
Travis Bessell
Computer Systems Engineer
ISRD
200 labs
DSTO Edinburgh
EDINBURGH SA 5111
Telephone: (08) 8259 7116
E-mail: travis.bessell at dsto.defence.gov.au
IMPORTANT: This email remains the property of the Australian Defence
Organisation and is subject to the jurisdiction of section 70 of the
CRIMES ACT 1914. If you have received this email in error, you are
requested to contact the sender and delete the email.
More information about the Tinyos-help
mailing list