[Tinyos-help] dynamic list of items in message payload

etreu at uni-potsdam.de etreu at uni-potsdam.de
Sun Nov 28 08:45:58 PST 2010


That's at least something that lead me to working solution. Ctp does  
not uses embedded structs (neither tymo does, too). Both use 'raw'  
bytes and point arithmetics. That's seems to be the way it works.

Quoting wasif masood <rwmasood at gmail.com>:

> you can get some idea form this CTP  header structure :
>
> typedef nx_struct {
>   nx_ctp_options_t    options;
>   nx_uint16_t        parent;
>   nx_uint16_t         etx;
>   nx_uint8_t (COUNT(0) data)[0]; // Deputy place-holder, field will probably
> be removed when we Deputize Ctp
> } ctp_routing_header_t;
>
> is uses flexible array.
>
>
> On Sun, Nov 28, 2010 at 2:04 PM, <etreu at uni-potsdam.de> wrote:
>
>> How can i send a varying array of items as part of a message?
>>
>> I cast the return of call Packet.getPayload to my struct. The struct
>> consists of some fix attributes. One of them is the number of
>> attributes.
>> The last attribute is a pointer/ array of an other struct.
>>
>> Is there anybody who did something similar or might tell how to do this?
>>
>> Best regards,
>> Enrico
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> Tinyos-help at millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>
>
>
>
> --
> Wasif Masood
>






More information about the Tinyos-help mailing list