thanks for the reply.
isn't uint16_t supposed to be the key?
if uint16_t is the data, i declared a structure like the following &
integrated it to TestDissemination application under DHV.
typedef nx_struct test {
nx_uint8_t type;
nx_uint8_t new_gid;
} test_t;
uses interface DisseminationUpdate<test_t> as DisseminationUpdate1;
uses interface DisseminationValue<test_t> as DisseminationValue1; but it
gives a segmentation fault. can you please tell me what is wrong here?
thanks
silva
On Fri, Aug 27, 2010 at 12:29 AM, <[email protected]> wrote:
> Hi silva,
>
> The tinyos message length is set in the Makefile (in TestDhv directory)
> using the tag DTOSH_DATA_LENGTH (eg. -DTOSH_DATA_LENGTH=32 ).
>
> The actual size of the data to be disseminated is however set in
> TestDhvP.nc.
>
> For example, the current version has
>
> uses interface DisseminationUpdate<uint16_t> as DisseminationUpdate1;
> uses interface DisseminationValue<uint16_t> as DisseminationValue1;
>
>
> you can change "uint16_t" to any data structure of any size you want.
> However, the overall TOS message length is consistent with DTOSH_DATA_LENGTH
> and should be smaller than 127 bytes.
>
> Hope that helps,
>
> Thanh
>
>
>
> Quoting sadun silva <[email protected]>:
>
> hi,
>>
>> you mentioned dtosh "data length is set in the TestDhvP.nc/TestDipP.nc
>> when
>> you declare the DisseminationValue/DisseminationUpdate interfaces." can
>> you
>> exactly tell where?
>>
>> thank you very much
>>
>> silva
>>
>> On Tue, Aug 17, 2010 at 10:01 AM, <[email protected]> wrote:
>>
>>
>>>
>>>
>>>
>>> ---------- Forwarded message ----------
>>> From: [email protected]
>>> To: [email protected]
>>> Date: Tue, 17 Aug 2010 09:59:12 -0700
>>> Subject: Re: Fwd: [Tinyos-help] Dissemination Protocols Comparison
>>> Hi Paul,
>>>
>>> Quoting Omprakash Gnawali <[email protected]>:
>>>
>>> ---------- Forwarded message ----------
>>>
>>>> From: Paul Gildea <[email protected]>
>>>> Date: Fri, Aug 13, 2010 at 12:22 PM
>>>> Subject: [Tinyos-help] Dissemination Protocols Comparison
>>>> To: [email protected]
>>>>
>>>>
>>>> Hello, I am new to tinyos, I am following this tutorial on
>>>> dissemination protocols, DIP/DRIP/DHV
>>>> http://docs.tinyos.net/index.php/Dissemination
>>>> I have created the test application and wish to study the power use of
>>>> the three of the protocols using powertossim z and graph the power
>>>> used by each when values are tuned etc.
>>>> DIP/DHV have three tunable parameters.
>>>>
>>>> The first is the Trickle values.
>>>>
>>>> #define DIP_TAU_LOW (1024L)
>>>> #define DIP_TAU_HIGH (65535L)
>>>>
>>>> The second is data size.
>>>>
>>>> typedef nx_struct dip_data {
>>>> nx_uint8_t data[16];
>>>> } dip_data_t;
>>>>
>>>> The third is advertisement size
>>>>
>>>> #define DIP_SUMMARY_VALUES_PER_PACKET 2
>>>> #define DIP_VECTOR_VALUES_PER_PACKET 2
>>>>
>>>> You can compute the proper size with the following formulas:
>>>>
>>>> DIP_SUMMARY_VALUES_PER_PACKET = (DTOSH_DATA_LENGTH - 5) / 3
>>>> DIP_VECTOR_VALUES_PER_PACKET = (DTOSH_DATA_LENGTH - 1) / 2
>>>>
>>>>
>>>> You might want to consider the suppression constant INFO_THRESHOLD
>>> defined
>>> in Dhv.h. It defines when a node suppresses its own transmission.
>>>
>>> Does DRIP have similar, so I can compare it? You seem to be able to
>>>
>>>> change the data size but I have not found where yet.
>>>>
>>>>
>>> I believe the current implementation of DRIP lets nodes transmit one
>>> (key,value) at a time randomly.
>>>
>>> I am unsure if this test application is suitable as I have tried with
>>>
>>>> both DIP and DHV to measure the power used when changing the data size
>>>> for each. Perhaps I am going about it wrong. For each I changed
>>>> nx_uint8_t data[x] from 0-17 and they all yielded very similar energy
>>>> use, which I will attach. I thought only 1-16 were valid byte sizes so
>>>> am confused as to why 0 and 17 still yield similar values? even
>>>> something like 1000 does, but for 1000000 a fault occurs,
>>>> 'segmentation fault'. I am wondering why all these results are so
>>>> similar? Perhaps more intensive use of leds etc in the program would
>>>> show diverse ranges? Should editing these byte sizes in Dip.h work
>>>> like that?
>>>>
>>>>
>>> Leds use a lot of energy compared to a single packet transmission. Did
>>> you
>>> try to compare Dhv/Dip without leds (You can turn off leds in
>>> TestDipP.nc/TestDhvP.nc). Even so, I think the packet length plays a
>>> little
>>> role in energy consumption (time to transmit one byte once the radio is
>>> already on is only a few micro seconds). The actual saving is the number
>>> of
>>> transmisions (how many packets are being sent/how many times the radio is
>>> turned on and off) and the node duty cycles.
>>>
>>> The protocols may not check the value for data size (eg. 1000), I will
>>> look
>>> into that and get back to you asap.
>>>
>>> For the other two tunign parameters I am unsure as to what values
>>>
>>>> would be useful for my tests. the trickle counter is supposed to be in
>>>> millisecond gradients so is the lower tau 1024 milliseconds and the
>>>> higher tau 65535 milliseconds? The third tuning parameter is
>>>> advertisement size, I am unsure of how to change this based on the
>>>> formulae above, where is dtosh data length etc coming froma nd would
>>>> changing these values be useful for what I hope to achieve, comparing
>>>> the power usage in these three protocols? Thanks
>>>>
>>>>
>>> dtosh data length is set in the TestDhvP.nc/TestDipP.nc when you declare
>>> the DisseminationValue/DisseminationUpdate interfaces.
>>>
>>>
>>> --
>>>> Paul
>>>>
>>>>
>>>> Hope that helps,
>>>
>>> Thanh
>>>
>>>
>>> _______________________________________________
>>> Tinyos-help mailing list
>>> [email protected]
>>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>>>
>>>
>>
>
>
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help