Re: [Tinyos-help] how to change payload size

2012-10-17 Thread András Bíró
Hi, TOSH_DATA_LENGTH sets the available memory for the payload. The actual payload length is set up by the last parameter of AMSend.send (len). Andirs On Tue, Oct 16, 2012 at 6:12 PM, ANDRIA Lama lamaand...@yahoo.fr wrote: Hi, Someone know how to change payload size dynamically? My

[Tinyos-help] how to change payload size

2012-10-16 Thread ANDRIA Lama
Hi, Someone know how to change payload size dynamically? My algorithm is like that, My payload size is 1, I send my data every 1s, and after 10s (counter = 10), I want to update my packet size to 1 (TOSH_DATA_LENGTH + 1). I'm posting some of my code according to my logic I would do. 1)

Re: [Tinyos-help] how to change payload size

2012-10-16 Thread Eric Decker
TOSH_DATA_LENGTH is a define. So what you are trying to do doesn't work. packets (messages) in tinyos are fixed in size (data portion is TOSH_DATA_LENGTH). It was done to avoid the problems of dynamic allocation. Dynamic allocation requires dynamically changing pointers which can be very