In 802.15.4, the frame format is defined as: | PHY preamble | SFD | length | MAC_header | MAC_payload | MAC_footer
Therefore the previous three (or two) fields seem to form the PHY header.
But in tinyos 2.x there is:
async command error_t PhySend.send(message_t* msg, uint8_t len) {
...
// message_header_t can contain more than only the message_radio_header_t
byteCnt = (sizeof(message_header_t) - sizeof(message_radio_header_t)); // offset
...
// message_header_t can contain more than only the message_radio_header_t
byteCnt = (sizeof(message_header_t) - sizeof(message_radio_header_t)); // offset
...
}
where it looks like the the PHY header is part of MAC header! (since message_header_t is defined as { length + MAC_header } )
I also checked out the definition of message_radio_header_t, which is only found under tda5250 chip (so this may not be relevant)
typedef nx_struct tda5250_header_t {
nx_am_addr_t addr;
nx_uint8_t length;
nx_am_group_t group;
nx_am_id_t type;
} tda5250_header_t;
this totally differ from the 802.15.4 frame spec, rather, it looks like a MAC header.
So, what on earth is the PHY header used in TinyOS?
Basically I want to know how many bytes are transmitted for a packet. To my existing understanding, it is PLCP + MAC_frame_length, but I did not find the corresponding PLCP defintion in Tinyos.
--
Regards,
Tie
_______________________________________________ Tinyos-help mailing list Tinyos-help@Millennium.Berkeley.EDU https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help