[Tinyos-devel] Bug in mig
Matt Welsh
mdw at eecs.harvard.edu
Thu Mar 6 05:50:41 PST 2008
Yep, this has been a bug for a long time...
On Mar 6, 2008, at 2:02 AM, Kevin Klues wrote:
> When I have a struct containing an array of 32 bit numbers, the code
> that mig generates wants to concatenate the values down to bytes when
> printing them out via the toString() method even though they are 32
> bit numbers .
>
> i.e.
> typedef nx_struct nx_my_struct {
> .....
> nx_uint32_t array[2];
> } my_struct_t;
>
>
> results in the following code being generated when run through mig:
>
> try {
> s += " [array=";
> for (int i = 0; i < 2; i++) {
> s += "0x"+Long.toHexString(getElement_sample_timestamp(i) 0xff)+"
> ";
> }
> s += "]\n";
>
> There should either be no concatenation via the (& 0xff) or this
> should somehow be printed out in terms of bytes instead of elements.
>
> --
> ~Kevin
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
More information about the Tinyos-devel
mailing list