On Tuesday 02 February 2016 18:45:33 Dwarkaprasad Dayama wrote: > > That's an acceptable solution. I don't see the Con as you described: what > > would need to store the default interface information for every resource > > and why? The way I see it, no one needs to store anything. Can you explain > > where storage would be necessary? > [Dwarka] If a client wants to query temperature resource of a refrigerator > device (refrigerator has 2 temperature resources with same name but > different default interface type), it should know if it is actuator or just > a sensor. There may be more such cases coming in future. Though we don?t > have any concept of generic client, but if any member tries to build one, > it has to store such information and use GET, PUT or POST depending on what > default interface is supported.
I'm struck by the "2 resources with the same name" part. Is than affect of a physical device that may be two things at the same time, like in your example, a sensor and actuator? This is weird and I fail to see how it's implemented at all. In any case, I also fail to see how that is relevant. We're talking about default interface per resource anyway, however the resource is named. Next, there's the question of why it wants to store the information. What is it going to use the information for? If it's not going to use the information, it need not store it. Generic clients don't count. > > This is also an acceptable solution. I again don't understand what the > > Cons > > are. Let's say the default for everything is oic.if.baseline: what kind of > > resource type would have a different interface that produces less data? > > Please make sure to answer with a resource type likely to be implemented > > by > > a constrained device -- a group resource isn't. > [Dwarka] Light bulb may send only value of luminance or thermostat may send > only value of temperature and not rest of the attributes for that resource, > which can save couple of bytes. Understood, but I don't see how that supports or detracts from the option. As Ravi said in his reply, all resources must implement all the mandatory interfaces, regardless of how much data they would produce. Leaving it up to the device to choose the default has no benefit on data transmission. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center