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: [email protected] [mailto:iotivity-dev-bounces at lists.iotivity.org] On Behalf Of ??? Sent: Thursday, April 16, 2015 5:50 AM To: 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 <http://ext.samsung.net/mailcheck/SeenTimeChecker?do=d083a0c0528fae52b1a7ecd 7ee82214a4503773a2bde9bd6ed81201521b94ff84e60fcf6aeb61df594c3b6ddffd7613bcb2 38d00164b0be48eeb9bec5ad9c75d326bbdfb2ea96a2fcf878f9a26ce15a0> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150416/e01bacb5/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 13168 bytes Desc: not available URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150416/e01bacb5/attachment.gif> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 7198 bytes Desc: not available URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150416/e01bacb5/attachment.p7s>
