Hi Gregg, The OIC spec used to have “Advertisement” specified. But in push to move OCF and get a spec out, advertisement was removed. At the time, I recall someone stated the intention was to bring it back immediately after OCF 1.0.
As you can see it never did. I can give you some hints of what presence did at the time of implementation: * Presence functionality is re-using Observe functionality (code re-use). Except, it’s effectively an Observe-Get response to the “oic/ad” virtual resource. (This is specified in draft versions of OIC. Try checking 0.9 or prior.) * A Presence Notification goes out at Presence start, stop, some TTL, and every time an Observe Notification occurs. (Every time you invoke Notify(), the IoTivity stack also invokes something akin to “PresenceNotifyAll().”) * Notifications for Presence do not contain any useful information about what has changed. The presence payload should contain a ResourceType if the Presence Notification was caused by an ObserveNotification. * Presence also implements a TTL feature. If not set by server application when invoking “StartPresence(int secs = 60)”, then at 50% (and maybe 70%, 80%, 95%, 100%) of 60 seconds, a new Presence Notification will go out unicast to each presence observers. Note “Presence Observers” are called “subscribers.” The client side API offers “SubscribePresence().” If I may add, IoTivity offers Discovery to check who’s all out there. IoTivity offers Presence to see when someone has left. IoTivity does NOT offer what I would term “Advertisement” to see when someone new has come. (You may be able to attain this functionality with a Resource Directory, however.) Thanks, Joey Morrow From: <[email protected]<mailto:[email protected]>> on behalf of Gregg Reynolds <[email protected]<mailto:[email protected]>> Date: Tuesday, December 12, 2017 at 2:19 PM To: David Brody <[email protected]<mailto:[email protected]>> Cc: iotivity-dev <[email protected]<mailto:[email protected]>> Subject: Re: [dev] Multiple presence server/client on same network On Dec 12, 2017 10:03 AM, "David Brody" <[email protected]<mailto:[email protected]>> wrote: .. Any help or clarity would be GREATLY appreciated. The documentation on this is very limited and I've dug into the code a bit too far with no luck. Sorry I cannot help, but if you don't mind I'll piggyback here and ask if somebody can explain "presence". It is not in the OCF specs. What is in the specs is advertising discovery, but the text is indecipherable, to me at least. "Resource to enable discovery" gets my vote as the most impenetrable (and inane) phrase ever written in a tech spec. Have read the spec 123 times, still have no idea what it means. -g
_______________________________________________ iotivity-dev mailing list [email protected] https://lists.iotivity.org/mailman/listinfo/iotivity-dev
