Hi, Eunok,
You payload looks strange even though Habib fix later.
At least one of the device should have the IP:port information with baseURI
property.
Otherwise second resources in the second device will not be parsed into
resource.
I put the sample baseURI information as follows.(red font)
[
{ di=717111ce-31c1-47a0-81a1-3e39eca,
links=[
{href=/q/resource_foo1, rt=core.foo,
if=oic.if.baseline, p={bm=1}},
{href=/q/resource_foo2, rt=core.foo,
if=oic.if.baseline, p={bm=1}}
]
},
{ di=a7b77e75-e6d5-4158-af16-3a4dd95,
baseURI=coap://192.1.1.1:4524
links=[
{href=/q/resource_foo1, rt=core.foo,
if=oic.if.baseline, p={bm=1}},
{href=/q/resource_foo2, rt=core.foo,
if=oic.if.baseline, p={bm=1}}
]
}
]
BR, Uze Choi
From: [email protected] [mailto:iotivity-dev-
bounces at lists.iotivity.org] On Behalf Of Habib Virji
Sent: Friday, March 04, 2016 6:39 PM
To: eunok.shin at samsung.com; iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Parsing about a payload including resource information
of multiple devices
Hi Eunok,
In current code base, it sets the size of the discovery array as one.
So only first element is sent and it does not send other resources. That?s
below will not parse in current code base.
Why it is 1, is because Discovery response currently can hold only one di.
It can have multiple links attributes (resource). For RD this is an issue
and it needs some change in cstack to send multiple response.
I have been looking into the issue and have a solution. But it requires
some effort on testing and updating test case. I will try to update this at
the earliest.
Regards
Habib
From: [email protected] [mailto:iotivity-dev-
bounces at lists.iotivity.org] On Behalf Of ???
Sent: 04 March 2016 02:17
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Parsing about a payload including resource information of
multiple devices
Hi, I have tested cloud resource directory with IoTivity resource client
and I found a issue, so I'd like to share.
The issue description is following :
Assuming the siatuation that many servers published their resource
information into resource directory(RD),
then the RD will send response including multiple device information for
the discovery request by resouce type.
That means a response payload will be comprised of multiple device list
including resource information.
But now, the resource client can parse only the first device's resource
information..
There is the payload I tested as follow
[
{ di=717111ce-31c1-47a0-81a1-3e39eca,
links=[
{href=/q/resource_foo1, rt=core.foo,
if=oic.if.baseline, p={bm=1}},
{href=/q/resource_foo2, rt=core.foo,
if=oic.if.baseline, p={bm=1}}
]
},
{ di=a7b77e75-e6d5-4158-af16-3a4dd95,
links=[
{href=/q/resource_foo1, rt=core.foo,
if=oic.if.baseline, p={bm=1}},
{href=/q/resource_foo2, rt=core.foo,
if=oic.if.baseline, p={bm=1}}
]
}
]
So, I think that the parsing a payload about discovery should be fixed.
I registered the Jira issue as follow
https://jira.iotivity.org/browse/IOT-967
Please check this problem and fix.
( I don't know who is the right developer for it )
Thanks,
BR.
<http://ext.samsung.net/mailcheck/SeenTimeChecker?do=22f8650517ba68652dd9ecf
23db48c430005da7c6bf6bb97b0a6f40ee81f6c2ebe7dd83ce6b932973c40f787d33f357d4b3
1597edd603a7ce5a22f09e2218feaa728c55b39cc59eacf878f9a26ce15a0>
-------------- next part --------------
HTML ?????? ??????????????...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160304/3e436ab3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13168 bytes
Desc: ?????? ?? ????????.
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160304/3e436ab3/attachment.gif>