The message_t *msg looks like this:
typedef nx_struct message_t {
nx_uint8_t header[sizeof(message_header_t)];
nx_uint8_t data[TOSH_DATA_LENGTH];
nx_uint8_t footer[sizeof(message_footer_t)];
nx_uint8_t metadata[sizeof(message_metadata_t)];
} message_t;
This include things like Source address, destination address, message
length, etc...
Whereas the payload is only the actual payload you want to send.
The usage depends on what you want to achieve.
Arik
On Sun, Apr 18, 2010 at 14:05, chikh omar <[email protected]> wrote:
> hello,
> for the event revceive:
> event message_t *receive(message_t *msg, void *payload, uint8_t len)
>
> what is the difference between msg and payload and when we use each
> parameter
>
> thanks for explanation,
> Cheers,
>
> ***********************************************
> Omar Cheikhrouhou
> **Engineer & Researcher @SENS Lab (Software Engineering and Network
> Security)
> Higher Institute of Technological Studies - Address : Mahdia's road Km 2.5
> Sfax. BP 88 A - 3099 El Bustan Sfax Telephone : (+216)74 237425 Poste : 437
> ** **Fax: : (+216)74 431 386*
>
> *Ph.D @ CES Lab (Computer and Embedded System)-University of Sfax,
> National School of Engineers BP W, Sfax, 3038, Tunisia , Fax:(+216)74665369
> ** *
>
> *Coordinator C2i @ ISET Sfax (Certified C2i since 2008)*
>
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
--
Best Regards,
Arik Sapojnik
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help