[Tinyos-help] ReceiveMsg.receive() : delayed or cancelled ?

Pacionet pacionet at email.it
Thu Sep 22 03:34:46 PDT 2005

ReceiveMsg is not ASYNC so it can't preempt a running task. That's ok but it
seems that its execution is not delayed AFTER the task but CANCELLED .
So a message sent in the meanwhile (while task is running) is always lost ?
Is there any way to recover it ?

A simple bit of code that shows the question:


void task dummy_task() {
uint32_t i;
for (i=0;i<10000000;i++) ;
call Leds.redOn();          // AFTER some seconds red led is switched on 

command result_t StdControl.start()
 post dummy_task();

ReceiveMessage.receive() { ... }


just sends a message immediately. This message is always lost in my runs
because, in my opinion, if task is running ReceiveMessage.receive() is
cancelled and not DELAYED.
Is it possible ?

 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 Con la Pietra Naturale puoi grigliare carne, pesce e verdura direttamente
in tavola!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=2743&d=20050922

More information about the Tinyos-help mailing list