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 https://lists.iotivity.org/mailman/listinfo/iotivity-dev