On Thu, April 19, 2007 5:41 am, Alan Medlar said:
> If my understanding of what you are doing is correct and you want to send
> packets of length TOSH_DATA_LENGTH, then the actual call to 'send' has to
> falsely state that the length of the packet payload is TOSH_DATA_LENGTH.
> (eg: call Send.send(ADDRESS, TOSH_DATA_LENGTH, &buf)  as opposed to  call
> Send.send(ADDRESS, sizeof(type_in_payload_t), &buf)  )
>
> Just setting the variable somewhere simply sets the maximum that a packet
> can be, (ie: to save ram if you have a pool of statically allocated TOS_Msg
> structs).
>
> Changing the value is AM.h will have no more effect than setting it in a
> Makefile as the definition of this is " #ifndef ".
>
>
> Alan
>
>> Hi all,
>>
>> I am using micaz fro my application and the default size of TOS_Msg
>> structure is 36byte(?).
>>
>> In order to change the massage packet size, I added
>>
>> CFLAGS += -DTOSH_DATA_LENGTH=64
>>
>> to Makelocal
>>
>> After that, I want to know actually whether its size is 64 or not.
>>
>> I used tiniViz.
>>
>> When I debug using tiniViz, I can see '[4] Sent Message <BaseTOSMsg>
>> [addr  ] and so on.
>>
>> However, Length is always expressed 0xc.
>>
0xC would be hexadecimal. The prefix 0x is used in many languages to
identify that. It would be 13 in decimal. It also was probably expressed
0x0C, since that would cover the full 8-bit value, if you meant 0xC0 it
would be 192. Each hex number only covers 4 bits, and it is common to group
them in pairs to prevent confusion, even if one digit is zero.

See: http://www.onlineconversion.com/base.htm

Also: 64 is 0x40.

-Ben M
-- 
The difference between the right word and the almost right word is really a
large matter- it's the difference between a lightning bug and the lightning.
-Twain

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

Reply via email to