Re: [Tinyos-help] Receiving messages during execution on Tmote Sky
NO, I didn't use any atomic statement. Just a normal receive: event TOS_MsgPtr ReceiveMessage.receive(TOS_MsgPtr m) { } but this event is not triggered when other mote sends a message. Michael Schippling wrote: you didn't put the for loop in an atomic{} block did you? That would shut off interrupts... MS Andrea Pacini wrote: I am using Tmote Sky motes and I noticed that , when a node is doing something (e.g. when it is doing a for cycle) it can't receive message, that is Receive.receive() event is not triggered. Instead , if the node is doing nothing , the receive event is fired and all woks. Note that the sender sends only one message . How is possible ? Doesn't exist a queue of WAITING EVENTS ? Thanks Andrea ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Receiving messages during execution on Tmote Sky
someone else (phil?) already sent some better ideas about task (non-)pre-emption problems. My suggestion was about the code that you believe is blocking the receive In any case, assuming things are mostly the same as the micas', byte-by-byte reception should be occurring in an interrupt routine, and the last of those receptions should (maybe, I hope) call your Message.receive() method -- still in the interrupt context. So, if interrupts are shut off for some reason -- e.g. atomic{} -- then you'll never get a receive(). On the other hand if the Meassage.receive() is called from a task that has been posted by the lowlevel radio code, you could be blocking it by hogging things with another task that doesn't finish. I don't think this is the case because I wouldn't expect Message.receive() to be labeled an event...as usual I'm probably wrong... good luck MS Andrea Pacini wrote: NO, I didn't use any atomic statement. Just a normal receive: event TOS_MsgPtr ReceiveMessage.receive(TOS_MsgPtr m) { } but this event is not triggered when other mote sends a message. Michael Schippling wrote: you didn't put the for loop in an atomic{} block did you? That would shut off interrupts... MS Andrea Pacini wrote: I am using Tmote Sky motes and I noticed that , when a node is doing something (e.g. when it is doing a for cycle) it can't receive message, that is Receive.receive() event is not triggered. Instead , if the node is doing nothing , the receive event is fired and all woks. Note that the sender sends only one message . How is possible ? Doesn't exist a queue of WAITING EVENTS ? Thanks Andrea ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Receiving messages during execution on Tmote Sky
you didn't put the for loop in an atomic{} block did you? That would shut off interrupts... MS Andrea Pacini wrote: I am using Tmote Sky motes and I noticed that , when a node is doing something (e.g. when it is doing a for cycle) it can't receive message, that is Receive.receive() event is not triggered. Instead , if the node is doing nothing , the receive event is fired and all woks. Note that the sender sends only one message . How is possible ? Doesn't exist a queue of WAITING EVENTS ? Thanks Andrea ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
Re: [Tinyos-help] Receiving messages during execution on Tmote Sky
Tasks execute first-come first-serve, and each task executes to completion before the next task can begin. Execute to completion means that your task routine must return / exit. Long running and non-terminating tasks block all other tasks from executing. Receive.receive is signaled from within task context -- which you can note from the absence of an async keyword for that event. That means that a task is posted within the radio stack that eventually signals receive. If you have a long running task in your application, it is blocking the receive task from executing. Hope that helps, Cory Sharp [EMAIL PROTECTED] On 1/18/06, Andrea Pacini [EMAIL PROTECTED] wrote: I am using Tmote Sky motes and I noticed that , when a node is doing something (e.g. when it is doing a for cycle) it can't receive message, that is Receive.receive() event is not triggered. Instead , if the node is doing nothing , the receive event is fired and all woks. Note that the sender sends only one message . How is possible ? Doesn't exist a queue of WAITING EVENTS ? Thanks Andrea ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help ___ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help