[Tinyos-help] about CTP
Omprakash Gnawali
gnawali at gmail.com
Fri Jul 11 04:26:43 PDT 2008
2008/7/10 jiwen zhang <zhangjiwen029 at gmail.com>:
> Hello om_p :
> yes , you are right , when the user send the data , he does not put the
> data at the beginning of the payload of the message_t , but an offset whose
> length is the size of the ctp_header . i understand .
> another question :
> maybe i have asked the question to someone , but i can't find it . you
> use " nx_uint8_t data[0] " in ctp_data_header , what is the function of
> this field ? because it's size is zero . is it similar to a pointer ?
This allows you to access the variable size byte array as an array. If
the data always had n bytes, we would have used data[n].
- om_p
More information about the Tinyos-help
mailing list