Jay & Pat,
I would like to add that using a TTL value of 0, will default to 60 seconds.
Thanks,
Joey

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Lankswert, Patrick
Sent: Thursday, April 16, 2015 12:23 PM
To: junghyun.oh at samsung.com; iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Question - What is the usage of the "ttl" when using the 
"OCStartPresence"

Jay,
The TTL determines how long a device can be off the network before the stack 
considers it "gone".
So, a long TTL (for example, 4 hours) means that you will not be notified that 
the device is offline until it is not seen for 4 hours.
So, a short TTL (for example, 10 seconds) means that you will be notified very 
quickly if the device goes offline. You may even get some false positives (ie. 
it looks down when it really is not.)
The tradeoff is network traffic. The shorter the TTL the more messages are sent 
over the wire to maintain presence. The decision on the TTL is application 
specific since the device designer needs to trade-off timeliness against batter 
power, etc.
I would recommend starting with a TTL of 60 seconds.
Does this help?
BTW, as you may have heard this API needs to be refactored for simplicity and 
clarity. Once the community has a proposal, I hope that as a user of the API 
you will be available for commenting.
Pat

From: iotivity-dev-bounces at lists.iotivity.org<mailto:iotivity-dev-bounces at 
lists.iotivity.org> [mailto:[email protected]] On Behalf 
Of ???
Sent: Thursday, April 16, 2015 5:50 AM
To: iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at 
lists.iotivity.org>
Subject: [dev] Question - What is the usage of the "ttl" when using the 
"OCStartPresence"


Hi Pat,



I have a question about one API in the ocstack which is "OCStartPresence"

That API receives the "ttl" which probablity means "time to live".

Question is "what is the subject of the time-to-live?

            and "what is the purpose of setting the time-to-live?"

I just want to use this API as intended. :)

Thank you.

Jay.









Jung-hyun Oh.

IoT Solution Lab.  | SW R&D Center | SAMSUNG ELECTRONICS CO.,LTD

Mobile +82-10-9890-6731 | Beyond your imagination, Always





[cid:image001.gif at 01D07839.5E87EE20]

[http://ext.samsung.net/mailcheck/SeenTimeChecker?do=d083a0c0528fae52b1a7ecd7ee82214a4503773a2bde9bd6ed81201521b94ff84e60fcf6aeb61df594c3b6ddffd7613bcb238d00164b0be48eeb9bec5ad9c75d326bbdfb2ea96a2fcf878f9a26ce15a0]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150416/9d359392/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: image001.gif
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150416/9d359392/attachment.gif>

Reply via email to