Hmm we are doing rest server from device perspective so in normal operation 
every call can be made at any time..
It is up to the UI of the client to impose an logical order, it also up to the 
UI of the client so show which devices it will show.

Taking out the device concept and just look at the individual resources: yes 
that can be done… but you have to ask yourself: what is the user experience of 
such an list of resources..
e.g. a lot of interactions are possible, but not all of them are useful, and on 
top of that, an API should not restrict in how to use the OCF 
devices/resources, the UI should do that.

Kind Regards,
Wouter

From: Thiago Moura [mailto:thiago...@gmail.com]
Sent: 16 December 2017 19:11
To: Morrow, Joseph L <joseph.l.mor...@intel.com>
Cc: Wouter van der Beek (wovander) <wovan...@cisco.com>; Nash, George 
<george.n...@intel.com>; iotivity-dev@lists.iotivity.org
Subject: Re: [dev] Finding relationship between device and resources

Hi
This is a very interesting topic! The APIs does not make it clear how to 
interact with devices, actually it is very confusing.
Currently the use case to interact only with dimming resources (as example) is 
not handled.
The reason for it that dimming can be used in other situations, hence the 
context of using dimming is important.
see in the device spec where the binary switch is being used: one wants to know 
the device where it is implemented in otherwise the UI just have an list of 
binary switches
but one does not know if it is an light or an fridge being turned on/off…

As far as I understand this is not true. We can perform a discovery on dimming 
resources and interact with them without knowing the actual device. If this is 
not meant to be done the APIs shouldn't allow it.

On Thu, Dec 14, 2017 at 3:14 PM, Morrow, Joseph L 
<joseph.l.mor...@intel.com<mailto:joseph.l.mor...@intel.com>> wrote:
It would be cool to have a query that looks like this instead (where “pdt” is 
parent device type): “/oic/res?pdt=oic.d.light”

Then all resources and devices associated with DeviceType “oic.d.light” would 
return. Furthermore, it would be cool if the Resource representation in the 
“/oic/res” discovery response contained “pdt”: “oic.d.light"

From: 
<iotivity-dev-boun...@lists.iotivity.org<mailto:iotivity-dev-boun...@lists.iotivity.org>>
 on behalf of "Wouter van der Beek (wovander)" 
<wovan...@cisco.com<mailto:wovan...@cisco.com>>
Date: Thursday, December 14, 2017 at 2:20 AM
To: "Nash, George" <george.n...@intel.com<mailto:george.n...@intel.com>>, 
"iotivity-dev@lists.iotivity.org<mailto:iotivity-dev@lists.iotivity.org>" 
<iotivity-dev@lists.iotivity.org<mailto:iotivity-dev@lists.iotivity.org>>
Subject: Re: [dev] Finding relationship between device and resources

Hi George,

The thinking (from use case perspective) is that the devices are the thing you 
want to interact with..
e.g. search for the devices and then loop over oic/res to find all implemented 
resources.
If an light device also implements the optional dimming/brightness then it can 
be visualized as part of the light device that you are interacting with.

Currently the use case to interact only with dimming resources (as example) is 
not handled.
The reason for it that dimming can be used in other situations, hence the 
context of using dimming is important.
see in the device spec where the binary switch is being used: one wants to know 
the device where it is implemented in otherwise the UI just have an list of 
binary switches
but one does not know if it is an light or an fridge being turned on/off…

hope this helps
Wouter

From: 
iotivity-dev-boun...@lists.iotivity.org<mailto:iotivity-dev-boun...@lists.iotivity.org>
 [mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Nash, George
Sent: 13 December 2017 21:04
To: iotivity-dev@lists.iotivity.org<mailto:iotivity-dev@lists.iotivity.org>
Subject: [dev] Finding relationship between device and resources

If I am writing a client that wants to find all oic.d.light devices I will 
simply do a find on /oic/res?rt=oic.d.light this will return me a list of 
resources that implement the light device.

As best I can understand from the OCF Core Specification v1.3 oic.d.<thing> can 
only be exposed on href /oic/d or as part of a oic.wk.col found in links.

How am I expected to go from finding device to finding out what resource(s) it 
implements? Or the URI for the resource(s)?

OCF Device Specification v.1.3 makes it clear that a Light is required to 
implement oic.r.switch.binary.  So I know that will be present but it is also 
possible it will implement other resources like, oic.r.light.brightness or 
oic.r.light.dimming, etc. How do I know? How am I expected to find the 
resources?

George Nash

_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org<mailto:iotivity-dev@lists.iotivity.org>
https://lists.iotivity.org/mailman/listinfo/iotivity-dev



--
Thiago Guedes Cunha de Moura
cel.: (31)99484-9864
_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to