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 snippet. And nothing is being sent (unless ProcessCmd()
does a send). The received message is pointed to by "pmsg"
and that is what is being processed and what should be returned
in all cases.
MS
dima . wrote:
>
>
> 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(pmsg) ;
> if (retval==SUCCESS) {
> return ret;
> } else {
> return pmsg;
> }
>
>
>
> if the retval ==success the command return ret (=msg) is it the message
> that we are trying to send and receive ??
>
>
>
>
>
> thx
>
>
>
> else the event return pmsg ,what does it refers to ?
>
>
>
> thx alot
>
>
> ------------------------------------------------------------------------
> Invite your mail contacts to join your friends list with Windows Live
> Spaces. It's easy! Try it!
> <http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help