Re: [Tinyos-help] receive msg

2008-05-28 Thread Paul Stickney
In general, once you pass a message pointer to a send or return it from a receive you say "it's yours, I'm not going to use it anymore" (until you give it back). This allows re-using the same data over and over again (because the same pointers are just passed back and forth). By-and-by, the pointer

Re: [Tinyos-help] receive msg

2008-05-28 Thread Michael Schippling
I'm a little confused...What is this from? The receive() call is supposed to return a pointer to the message buffer in order for the caller to be able to free the buffer (which may be redundant or silly, but that's the way it is). I don't know what "msg" is, since it's not declared in your code s

Re: [Tinyos-help] receive msg

2008-05-28 Thread Daniel Pereira
Hi, I had the same doubt about that, you can see a good explanation in TinyOS Programming(tinyos-programming.pdf), page 48. Where It talks about the Receive interface. I hope it can help you. On Wed, May 28, 2008 at 6:45 AM, dima . <[EMAIL PROTECTED]> wrote: > > > hello plz i have 2 questions whe

[Tinyos-help] receive msg

2008-05-28 Thread dima .
hello plz i have 2 questions when sending a message and receiving it 1-like in this command the message being sent is it pmsg? or it is ret=msg ??? event TOS_MsgPtr ReceiveCmdMsg.receive(TOS_MsgPtr pmsg){TOS_MsgPtr ret = msg;result_t retval; retval = call ProcessCmd.execute(pm