Hi,

Trying to understand the right ways to implement observation on the OCF
servers.

>From the sample code, I see 2 choices:

1. Maintain the list of the observers in the server code, and send the
OcRepresentation (explicit) of the resource to all of them.

2. Use OcPlatform.notifyAllObservers() - in this case IoTivity manages the
subscribers' list, but there is no explicit value to be sent. My
understanding is that the infrastructure issues a GET request to retrieve
the values.

Is there any guidance on when to use which method?

Is there any way to let IoTivity maintain the observers, but pass an
explicit OcRepresentation? (in my case, GET has some overhead)

Thanks and best regards,

Max
_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to