On Thu, Dec 27, 2018, 8:30 AM Oleksandr Grytsov <al1...@gmail.com wrote:
> ... > . > Shall this client populate any OCF resources (like oic.wk.p, oic.wk.d > etc.)? You might know this but to be clear, the OCF mandatory resources like these are automatically created by the engine. For device and platform you can set the values, but you don't create them. It looks like, yes, because it should be discovered and > provisioned in order to communicate with other devices in my network. > My understanding is that a client that needs to be onboarded must also implement the server role, so it can respond to requests from the obt. Then the engine will take care of on onboarding, I don't think you need to write any application code to enable this, its OCF stuff. Another question, how to make logical link between the client device > and the server device? I mean, how to tell the client (switch) that it > should communicate with this particular service (the lamp)? > I think it depends on how universal you want your button to be. If you want it to control any device that comes onboard it will have to discover, then ask for introspection data. Then (I think) it will have to be provisioned in order to control the resources it has discovered. And they might have to be provisioned too, in order to auth the button. Otoh you can write the button code for a specific scenario, where it already knows what to expect and it discovers to find out if the expected stuff is there, ignoring stuff it doesn't already understand. (Your question "how to tell the client (switch) that it should communicate with this particular service (the lamp)?" At the extreme you could pre-provision everything and dispense with onboarding. Iow with introspection you needn't "tell" the client what to deal with ahead of time. At the cost of a lot more logic. At least that's my understanding, heh. I haven't worked much with otgc but it looks pretty helpful, esp. for introspection. Hth Gregg -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10093): https://lists.iotivity.org/g/iotivity-dev/message/10093 Mute This Topic: https://lists.iotivity.org/mt/28858136/21656 Group Owner: iotivity-dev+ow...@lists.iotivity.org Unsubscribe: https://lists.iotivity.org/g/iotivity-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-