Spam detection software, running on the system "mail.Millennium.Berkeley.EDU",
has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: Hi all. To my understanding, the three calls to
Timer.startPeriodic
are executed sequentially. They are not tasks. In TinyOS, there is only one
FIFO scheduler which are shared by different tasks. Anybody: If I'm not
right,
please correct me. [...]
Content analysis details: (4.8 points, 3.3 required)
pts rule name description
---- ---------------------- --------------------------------------------------
3.2 FH_DATE_PAST_20XX The date is grossly in the future.
1.5 FROM_STARTS_WITH_NUMS From: starts with many numbers
-2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1%
[score: 0.0000]
0.0 HTML_MESSAGE BODY: HTML included in message
1.8 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding
1.5 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily
-0.5 AWL AWL: From: address is in the auto white-list
The original message was not completely plain text, and may be unsafe to
open with some email clients; in particular, it may contain a virus,
or confirm that your address can receive spam. If you wish to view
it, it may be safer to save it to a file and open it with an editor.
--- Begin Message ---
Hi all.
To my understanding, the three calls to Timer.startPeriodic are executed
sequentially. They are not tasks. In TinyOS, there is only one FIFO scheduler
which are shared by different tasks.
Anybody: If I'm not right, please correct me.
Regards,
Qiyuan
------------------ Original ------------------
From: "zheng manchun"<[email protected]>;
Date: Wed, Jan 6, 2010 05:28 PM
To: "Manjunath Doddavenkatappa"<[email protected]>;
Cc: "tinyos-help"<[email protected]>;
Subject: Re: [Tinyos-help] Questions abt the Execution Model of TinyOS
Dear Manjunath and All,
Thanks so much for your clarification. However, I still have further questions.
Looking back at the Blink application, we can see that BlinkC call three
commands in booted().
The startPeriodic is defined as synchronous. My concern here is how these 3
commands execute with the event booted(). Are they executing concurrently or
are they executing sequentially? or are they scheduled in the scheduler like a
task?
Another question that bothers me a lot is during the execution of an nesC
application, do all tasks posted by all components share the same task
scheduler or does each component have their separate task scheduler?
Looking forward to your reply & many thanks in advance.
On Wed, Jan 6, 2010 at 5:17 PM, Manjunath Doddavenkatappa
<[email protected]> wrote:
Hi,
Please have a look at /opt/tinyos-2.x/tos/system/RealMainP.nc. The execution
starts from the main() and proceeds to initialize the system and then signals
Boot.booted(). If you notice interrupts are enabled just before signalling
Boot.booted().
Now your doubt reduces to the question "Is main() a intterupt handler or a task
?".
Certainly, it is not an interrupt handler as it is the routine that enables
interrupts for the first time.
Is it a task ?
Once execution starts, tasks can be posted and main() is the point where your
system execution starts. Therefore, main() is neither a task nor an interrupt
handler. However, I do not want group it under a separate 3rd category as
execution has to start somewhere and it starts at main().
Anybody: If I am wrong please correct me.
Regards,
Manjunath D
################################################################################################################
***************************************************************************************************************
On Wed, 6 Jan 2010, zheng manchun wrote:
Hi, I'm reading the Execution Model Chapter of TinyOS programming book
recently.
I've got some difficulties in understanding the execution model of the
example application Blink.
As stated in the book, code is either synchronous or asynchronous.
And execution might be either a task or an interrupt handler.
When the hardware boots successfully, Boot.booted event is signaled.
While event booted is defined as synchronous in the Interface Boot, then
Boot.booted can not be invoked by an interrupt handler.
Therefore, it can only be a task. Or there is a 3rd kind of execution
(besides task and interrupt handler)?
I hope that some one can help to explain the execution model of the
application Blink for me.
Thanks in advance.
===================================================
//BlinkAppC.nc
configuration BlinkAppC
{
}
implementation
{
components MainC, BlinkC, LedsC;
components new TimerMilliC() as Timer0;
components new TimerMilliC() as Timer1;
components new TimerMilliC() as Timer2;
BlinkC -> MainC.Boot;
BlinkC.Timer0 -> Timer0;
BlinkC.Timer1 -> Timer1;
BlinkC.Timer2 -> Timer2;
BlinkC.Leds -> LedsC;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//BlinkC.nc
#include "Timer.h"
module BlinkC @safe()
{
uses interface Timer<TMilli> as Timer0;
uses interface Timer<TMilli> as Timer1;
uses interface Timer<TMilli> as Timer2;
uses interface Leds;
uses interface Boot;
}
implementation
{
event void Boot.booted()
{
call Timer0.startPeriodic( 250 );
call Timer1.startPeriodic( 500 );
call Timer2.startPeriodic( 1000 );
}
event void Timer0.fired()
{
dbg("BlinkC", "Timer 0 fired @ %s.\n", sim_time_string());
call Leds.led0Toggle();
}
event void Timer1.fired()
{
dbg("BlinkC", "Timer 1 fired @ %s \n", sim_time_string());
call Leds.led1Toggle();
}
event void Timer2.fired()
{
dbg("BlinkC", "Timer 2 fired @ %s.\n", sim_time_string());
call Leds.led2Toggle();
}
}
=====================================================
--
Thanks & Best Regards,
Mc
--
Thanks & Best Regards,
Manchun
</:includetail>
--- End Message ---
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help