Hey, Brian!

So that means it always is 28 bytes, regardless of being "filled" or not? So
if my struct is 1 or 28 bytes, the data bytes are always 28?

Thanks!


On 6/30/07, Brian Mulanda <[EMAIL PROTECTED]> wrote:


TOSH_DATA_LENGTH represents the max data payload; in your case, the
struct. The size of
the struct is allocated out of the 28 bytes.

I am not certain of the total frame size; I think it is, coincidentally,
at least 28 (13+15). In the event
that escape bytes are included, to handle "reserved" bytes appearing in
the data, it could be more.

-Brian

On 6/29/07, Pedro Almeida <[EMAIL PROTECTED]> wrote:

> Hello all;
>
> I would like to know the exact length of the 802.15.4 frame. The reason
> that i'd like to know the exact length is because i need to do some duty
> cycles numbers and one of the inputs is the frame length. It would seem to
> equal the payload, but given it makes no sense to me the payload on the
> serial frame, i might as well doubt i can figure the length on the
> 802.15.4's.
>
> So according to TEP 125:
>
> The TinyOS 802.15.4 T-frame format is as follows:
>
> +-------------------+---------+------------------------------+--------------+
> | 802.15.4 Header | AM type | data | 802.15.4 CRC |
>
> +-------------------+---------+------------------------------+--------------+
>
> I presume the 802.15.4 Header, as according to CC2420.h, to be 10 bytes:
>
> typedef nx_struct cc2420_header_t {
> nxle_uint8_t length;
> nxle_uint16_t fcf;
> nxle_uint8_t dsn;
> nxle_uint16_t destpan;
> nxle_uint16_t dest;
> nxle_uint16_t src;
>
> /** I-Frame 6LowPAN interoperability byte */
> #ifdef CC2420_IFRAME_TYPE
> nxle_uint8_t network;
> #endif
>
> nxle_uint8_t type;
> } cc2420_header_t;
>
> AM Type, according to previous struct, another byte before "data".
> Total: 11.
>
> I suppose CRC to be 2 extra bytes added in the end. Total: 13
>
> The "data" field intrigues me.
>
> I see this being defined in CC2420.h
>
> #ifndef TOSH_DATA_LENGTH
> #define TOSH_DATA_LENGTH 28
> #endif
>
> Does this mean it's a fixed length that gets 'populated' according to
> each different situation (making a fixed total of 42 bytes), or is 28 a max,
> or am i understanding this all wrong?
> The struct in TestNetwork is 15 bytes. Would that means the total frame
> size is 13+15=28 bytes? Or is there anything extra added?
>
> Any help greatly appreciated!
> Thanks,
>
> Pedro
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
>


_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to