Em ter?a-feira, 26 de julho de 2016, ?s 22:29:26 PDT, ???(Uze Choi) escreveu: > Sorry for late question for this topic. > > Antu question is a little bit different from understanding. > IoTivity has the API to create the remote resource object with once > discovered resource information as follows. > > public static OcResource constructResourceObject( > String host, > String uri, > EnumSet<OcConnectivityType> connectivityTypeSet, > boolean isObservable, > List<String> resourceTypeList, > List<String> interfaceList) throws OcException > > This is usually used for accessing resource without discovery step which > discovered resource yesterday.
Ah, I see. This is a remote resource, to be used without discovery. It's a flawed API. A resource may be accessed at multiple IP addresses or other endpoints. If the code can discover or remember the resource without doing a new discovery, it may know more than one endpoint, so this API should accept a list of endpoints. > Regardless re-defining exact API naming, here host param will not accept > the address with interface name. That's a bug. It needs to be fixed to accept it. > Furthermore, for the discovered resource, interface detail can be stored in > the ifindex. That's part of the flaw I mentioned above, as the interface index can change depending on the endpoint in question. That is, the resource could be reached on two different interfaces, with different endpoint addresses. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
