[Tinyos-help] Information about nx_ types

Felipe Cruz Martínez felipecruz91 at hotmail.es
Mon Aug 6 05:50:57 PDT 2012


Hi,

i have defined a structure with some fields as follows:

typedef struct message {
    uint8_t type;
    uint8_t length;
    addr_t destination;
    addr_t source;
} msg_t;

If i want send that ‘message’ struct to other node, (i must get the PacketPayload of the MAC frame and fill it with the data),  should i define the structure as:

typedef nx_struct message {
    nx_uint8_t type;
    nx_uint8_t length;
    nx_addr_t destination;
    nx_addr_t source;
} msg_t;

I don’t know when use nx_ types nor if i have to use nx_ (big endian) or nx_le (little endian). I’m very confused.

Thanks very much,
Felipe.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20120806/931eff80/attachment.htm 


More information about the Tinyos-help mailing list