-
Notifications
You must be signed in to change notification settings - Fork 6
Fix missing platform info #2
Comments
You are right, they should be optional (nullable). And it is a good question if there should be separate function for platform discovery, or should we bound them together, as you seem to have understood. Looks like the C++ API is out of sync with the OIC Core spec 1.0. Platform should be a core resource on each instance of an OIC device. If getting platform for a device (supposedly a local operation) is not supported in the C++ API, I think we should not work that around in the JS API. We just leave it as In general, in the API when we use a structure, it is not guaranteed that a given operation provides all properties of that structure. So it is not a problem if platform info is missing after discovery, but we do need to fix the API, and does need to be documented. As an example on partial information, when doing device discovery, only a list of device id's (UUID) is returned, eventually together with a list of { resourceURL, resourceType, interfaces } per device. But the (partial) resource list may be missing. If present, a retrieve operation can be made right away, otherwise a resource discovery is needed. Anyway, I am going to fix the spec. Also, I have added a new file describing the new version of the high level spec. Both are in this PR: |
In fact the C++ API permits retrieval of both platform and device info (independently), so it complies with the spec there. The issue is when doing multicast oic/d and oic/p discovery info with C++ API:
OK. But then the web API provides no platform info.
OK. |
Yes, it needs to be fixed in IoTivity (my point was only that we should not work around it in the JS API). Please file a bug. |
https://jira.iotivity.org/browse/IOT-828 Resolved. Scheduled for IoTivity-1.0.1 |
OicDeviceInfo
must contain platform info.OicDeviceInfo
contains device and platform infoIssue:
OCDoResource
andOCClientResponse
)OCClientResponse
providesdevAddr
devAddr
can be used directly to make a unicast query for the platform info of the device.OCPlatform::getDeviceInfo
andOCRepresentation
)Note: this issue is not relevant for iotivity-node as it uses the C API.
@poussa, @zolkis, am I missing something?
Providing host info at
OCRepresentation
level would simplify things.The text was updated successfully, but these errors were encountered: