Thanks, Gregg,

So, OCF doesn't specify how to create "logical link" between client
and server. In other words, it is up to the client device how to
choose and how to store the right resource to work with.

There is still IoTivity API related question. Once, resource is
discovered, I have OCResource object to perform further interaction
with the resource. The real client will not perform resource discovery
each boot but rather once at the initial stage.
The question is: is there IoTivity API to store and retrieve
OCResource? I have found only constructResourceObject to create
OCResource by URL, resource types and interfaces. But it looks not so
convenient to use.

Thanks.

On Thu, Dec 27, 2018 at 9:52 PM Gregg Reynolds <d...@mobileink.com> wrote:
>
>
>
> 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



-- 
Best Regards,
Oleksandr Grytsov.

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#10098): 
https://lists.iotivity.org/g/iotivity-dev/message/10098
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]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to