[Tinyos-help] DTOSH_DATA_LENGTH
Nahr Elk
nahrelk at gmail.com
Mon May 18 23:39:41 PDT 2009
Hi!
Ok, so the best solution in my case (the worst case for RAM) is by compiling
my app with the largest DATA_LENGTH (128) and then it will change the data
payload size if necessary.
But, please just a clarification:
Suppose that I kept DATA_LENGTH to the default value and the payload size
will not exceed this value
However at the Send command level I do something like that :
send(0, MyMsg, 256);
Could this be done??
Thank you!
Best regards,
Nahr Elk
2009/5/19 Razvan Musaloiu-E. <razvanm at cs.jhu.edu>
> Hi!
>
> On Mon, 18 May 2009, Michael Schippling wrote:
>
> Unless Things Have Changed(TM) in T2, only the length number of bytes
>> is transmitted -- at least over the radio -- so you're not losing
>> bandwidth with a larger DATA_LENGTH. You do waste RAM because buffers
>> are allocated for the max size, which is one reason it's a compile
>> time setting, but that may not matter in your system.
>>
>>
> Thinks haven't changed so what Michael said is correct. The only penalty is
> in RAM. The packets in the air have variable length based on the length
> specified in AMSend.send:
>
> command error_t send(am_addr_t addr, message_t* msg, uint8_t len);
>
> --
> Razvan ME
>
> Nahr Elk wrote:
>>
>>> Hi,
>>> Thank you Razvan,
>>> I would like to change the data payload size dynamically according to my
>>> application exigences.
>>> And I am not so convinced that setPayloadLength(message_t* msg, uint8_t
>>> len) is the right solution
>>>
>>> Best regards,
>>> Nahr Elk
>>>
>>> 2009/5/18 Razvan Musaloiu-E. <razvanm at cs.jhu.edu>
>>>
>>> Hi!
>>>
>>>
>>> On Sun, 17 May 2009, Nahr Elk wrote:
>>>
>>> Hi
>>> Is there any way to change DTOSH_DATA_LENGTH at run time instead
>>> of at
>>> compile time ? :)
>>>
>>>
>>> No. TOSH_DATA_LENGTH is used to allocate the size of the data field
>>> from message_t (types/message.h) so you cannot alter it at during
>>> runtime. May I ask why do you want to do this?
>>>
>>> --
>>> Razvan ME
>>>
>>>
>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090519/931e0839/attachment.htm
More information about the Tinyos-help
mailing list