[Tinyos-help] Fwd: CTP header field

Philip Levis pal at cs.stanford.edu
Fri Nov 19 08:23:34 PST 2010


On Nov 19, 2010, at 7:07 AM, wasif masood wrote:

> 
> There is no explicit declaration for data in CTP header,yet forwarding works, can someone please please explaiin this????????????
> 
> 
> typedef nx_struct {
>   nx_ctp_options_t    options;
>   nx_uint8_t          thl;        // tried_hopcount
>   nx_uint16_t         etx;
>   nx_am_addr_t     origin;
>   nx_uint8_t   originSeqNo;        // msg_id
>   nx_uint8_t         retries;
> //  nx_collection_id_t  type;
> 
>   nx_uint8_t (COUNT(0) data)[0]; // Deputy place-holder, field will probably be removed when we Deputize Ctp
> } ctp_data_header_t;

It's a standard C construction. E.g., look at how dirents are handled in file systems. There are many online resources for C programming.

Phil


More information about the Tinyos-help mailing list