Hi Clarke,

Thank you for pointing me out. This new example is really great. I've
also tried almost all old examples before, as well as examples
provided with IoTivity sources.
But still there is some unclear part for me. All examples shows how to
create and handle a device which has server resources (like binary
switch). It is pretty clear how to discover, perform on boarding and
operate with such device. Of cause there is the client part in the
examples as well. But it is rather some abstract client not real one.
In the real case, like a smart home, for example, the home network
consists not only of server devices but of client device as well.
Very basic example: I have a lamp device with has binary switch
resource. This lamp is the OCF server device. It can be discovered,
provisioned and operated. Then I have a simple switch device (just
button) which should control this particular lamp. In order to control
the lamp, this switch device should be the OCF client. It doesn't have
any resource. This is pure binary switch client in term of OCF.
Shall this client populate any OCF resources (like oic.wk.p, oic.wk.d
etc.)? It looks like, yes, because it should be discovered and
provisioned in order to communicate with other devices in my network.
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)?

Unfortunately, I didn't find any explanation of above scenario neither
in IoTivity examples nor in OCF spec. Do I miss something in OCF
architecture?  Or do I have wrong OCF concept understanding?

Thanks.

On Thu, Dec 27, 2018 at 9:35 AM Clarke Stevens <csteven...@gmail.com> wrote:
>
> Oleksandr,
>
> Probably the easiest way to figure this out is to build the new basic sample 
> (which does a light) at the “Getting Started” link from the IoTivity home 
> page. It uses a simple JSON input file and automatically generates source 
> code for the server. Then you can use the OTGC client which has pre-compiled 
> versions in Android, Linux and Windows plus source code for these three 
> platforms and iOS.
>
> If you go through this example, you can have a working server with a working 
> client in a very short time (I can do it in about 3 minutes, but I’ve had a 
> lot of practice).
>
> Also, if you have access to a Raspberry Pi, ARTIK EagleEye 530s or a linux 
> machine with Glyde, there are examples in the OCF GitHub repo that will 
> actually control the hardware interfaces (or GTK UI in the case of linux).
>
> The older IoTivity samples are good for understanding the different pieces of 
> code, but I find that the new full example with security, discovery, etc. is 
> more instructive.
>
> Thanks,
> -Clarke
>
> > On Dec 26, 2018, at 7:54 AM, Oleksandr Grytsov <al1...@gmail.com> wrote:
> >
> > Hi All,
> >
> > I'm playing with IoTivity and OCF. But I miss some basic things: e.g.
> > how to link client with resource server (similar to ZigBee binding).
> > For example: I have number of a lamp devices which implement
> > oic.r.switch.binary resource. Then I have physical switch device which
> > implements oic.r.switch.binary client and I would like to control
> > certain lamp devices with the switch device.
> >
> > The questions are:
> > 1. Shall the switch device (if it is only oic.r.switch.binary client)
> > implement generic resources: oic.wk.p, oic.wk.d etc.?
> > 2. During resource discovery the switch device will receive resource
> > information from all lamp devices, is there any mechanism to tell the
> > switch device which exactly resources to use?
> > 3. Does IoTivity provide any API to store discovered resources in
> > order to be used after reboot or it should be created from discovered
> > URL (constructResourceObject API)?
> > 4. Is there any OCF defined place to store controlled by the switch
> > device resources? I'm thinking about "links" and link interface but it
> > looks like they are designed for different purposes.
> >
> > Thanks.
> >
> > --
> > Best Regards,
> > Oleksandr Grytsov.
> >
> > 
> >
>


-- 
Best Regards,
Oleksandr Grytsov.

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

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