ill? take back the InProcServerWrapper::registerResource() wasn?t used, it's
just that
OCPlatform_impl::registerResource(OCResourceHandle& resourceHandle,
const std::shared_ptr<
OCResource > resource)
mangles the uri differently than
OCStackResult OCPlatform_impl::registerResource(OCResourceHandle&
resourceHandle,
std::string& resourceURI,
const std::string&
resourceTypeName,
const std::string&
resourceInterface,
EntityHandler entityHandler,
uint8_t resourceProperty)
So a name change may be in order? registerGroupResource()
Something like this should fix it
diff --git a/resource/src/OCPlatform_impl.cpp
b/resource/src/OCPlatform_impl.cpp
index 230f924..e7ff52c 100644
--- a/resource/src/OCPlatform_impl.cpp
+++ b/resource/src/OCPlatform_impl.cpp
@@ -245,7 +245,7 @@ namespace OC
std::vector<std::string> resourceTypes =
resource->getResourceTypes();
return checked_guard(m_server, &IServerWrapper::registerResource,
- std::ref(resourceHandle), resource->uri(),
+ std::ref(resourceHandle), resource->host() +
resource->uri(),
resourceTypes[0]/*"core.remote"*/, DEFAULT_INTERFACE,
(EntityHandler) nullptr, resourceProperty);
}
Charlie Lenahan | Software Engineer | Intel Corporation | 322 West Main
Street | Louisville, KY 40202 | W - 502.963.0917 | 8-963.0917
charlie.lenahan at intel.com | CDG ? WINS ? WSS EAST |
http://www.linkedin.com/in/charlielenahan
From: <Lenahan>, "Charlie Lenahan (Intel)" <[email protected]>
Date: Thursday, June 11, 2015 at 8:00 PM
To: "jihun.ha at samsung.com" <jihun.ha at samsung.com>, "Keane, Erich"
<erich.keane at intel.com>, "iotivity-dev at lists.iotivity.org"
<iotivity-dev at lists.iotivity.org>
Subject: Re: [dev] Sudden Function removal for Group Management.
Ok, I think I see the issue.
So even thought the low level OCCreateResourceWithHost wasn?t used, there is
InProcServerWrapper::registerResourceWithHost()
InProcServerWrapper::registerResource()
The registerResource() was never use , but the registerResourceWithHost()
was what was used , and it appending the host+uri, to make the uri.
So you can revert my change, and I?ll rework the patch, or I?ll create a new
patch to get that old behavior.
Charlie Lenahan | Software Engineer | Intel Corporation | 322 West Main
Street | Louisville, KY 40202 | W - 502.963.0917 | 8-963.0917
charlie.lenahan at intel.com | CDG ? WINS ? WSS EAST |
http://www.linkedin.com/in/charlielenahan
From: ??? <[email protected]>
Reply-To: "jihun.ha at samsung.com" <jihun.ha at samsung.com>
Date: Thursday, June 11, 2015 at 7:42 PM
To: "Keane, Erich" <erich.keane at intel.com>,
"iotivity-dev at lists.iotivity.org" <iotivity-dev at lists.iotivity.org>
Cc: "Charlie Lenahan (Intel)" <charlie.lenahan at intel.com>
Subject: Re: Re: [dev] Sudden Function removal for Group Management.
Samsung Enterprise Portal mySingle
Hi. Keane,
I'm Jihun Ha who is one of developers for Things Manager service.
Please refer to con-client application which is one of Things Manager's
sample application.
After discovering desired resources from the network, it tries to register
the found resource so as to bind these with a group resource. The found
resource is a remote resource thus we have to use registerResource having 2
parameters:
OCStackResult OCPlatform_impl::registerResource(OCResourceHandle&
resourceHandle,
const std::shared_ptr<
OCResource > resource)
Inside this function, registerResourceWithHost() function was called.
The case which Things Manager takes care of is the situation where multiple
resources with same URI are discovered and we create a group resource with
these found reosurces which are members. Think about group scenario with
same resource type, e.g., all bulbs group.
Best Regards
------- Original Message -------
Sender : Keane, Erich<erich.keane at intel.com>
Date : 2015-06-12 05:07 (GMT+09:00)
Title : Re: [dev] Sudden Function removal for Group Management.
Then I don't get what was using this function? I thought Uze said
ThingsManager was, but if it didn't use this call, what is the issue?
On Thu, 2015-06-11 at 18:39 +0000, Lenahan, Charlie wrote:
> ThingsManager is being built by jenkins
>
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/ActionSet.o
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/GroupManager.o
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/GroupSynchronizatio
> n.o
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/ThingsConfiguration
> .o
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/ThingsDiagnostics.o
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/ThingsManager.o
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/ActionSet.os
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/GroupManager.os
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/GroupSynchronizatio
> n.os
> Archiving
> out/linux/x86_64/release/service/things-manager/libTGMSDKLibrary.a
> Indexing Archive
> out/linux/x86_64/release/service/things-manager/libTGMSDKLibrary.a
> Install file:
> "out/linux/x86_64/release/service/things-manager/libTGMSDKLibrary.a" as
> "out/linux/x86_64/release/libTGMSDKLibrary.a"
> Compiling
> out/linux/x86_64/release/service/things-manager/sdk/src/ThingsConfiguration
> .os
>
>
>
> It uses the C++ API which the patchset didn?t change.
>
>
>
>
>
>
> On 6/11/15, 1:29 PM, "Keane, Erich" wrote:
>
> >The patch didn't break the build at all, is Things Manager not building
> >as a part of our build system? It seemed like a partially implemented
> >function that didn't really accomplish anything, and that no one was
> >using (as far as we could tell at the time).
> >
> >I'd be OK with reverting the patch if it is still in use (though it'll
> >take a rebase), though I'm concerned that it took this long for it to
> >come to light...
> >
> >Additionally, from looking at the code, it seems that the purpose is to
> >just have a context to a resource object, which can be dealt with via
> >std::bind on the EntityHandler.
> >
> >On Fri, 2015-06-12 at 02:25 +0900, ???(Uze Choi) wrote:
> >> Things Manager uses it.
> >>
> >> Function Internally host parameter is processed.
> >>
> >>
> >>
> >> BR, Uze Choi
> >>
> >> From: Lenahan, Charlie [mailto:charlie.lenahan at intel.com]
> >> Sent: Friday, June 12, 2015 1:23 AM
> >> To: ???(Uze Choi); Keane, Erich
> >> Cc: iotivity-dev at lists.iotivity.org
> >> Subject: Re: [dev] Sudden Function removal for Group Management.
> >>
> >>
> >>
> >>
> >> How was it referenced. The internal structure that had it wasn?t
> >> exposed anywhere.
> >>
> >>
> >>
> >>
> >>
> >> There is a change https://gerrit.iotivity.org/gerrit/#/c/1042/ that
> >> adds a callback parameter to CreateResource.
> >>
> >>
> >> Would that be a better fit?
> >>
> >>
> >>
> >>
> >>
> >> Charlie Lenahan | Software Engineer | Intel Corporation | 322 West
> >> Main Street | Louisville, KY 40202 | W - 502.963.0917 | 8-963.0917
> >> charlie.lenahan at intel.com | CDG ? WINS ? WSS EAST
> >> | http://www.linkedin.com/in/charlielenahan
> >>
> >>
> >>
> >>
> >>
> >> From: "??? (Uze Choi)"
> >> Date: Thursday, June 11, 2015 at 3:48 AM
> >> To: "Keane, Erich"
> >> Cc: "iotivity-dev at lists.iotivity.org"
> >>
> >> Subject: [dev] Sudden Function removal for Group Management.
> >>
> >>
> >>
> >>
> >>
> >> Charlie/Morrow/Erich
> >>
> >>
> >>
> >> From the https://gerrit.iotivity.org/gerrit/#/c/1143 change,
> >> CreateResourceWithHost() function has been removed.
> >>
> >> Commit comment says, ?host member is never referenced anywhere? but,
> >> it is definitely referenced from the Primitive service.
> >>
> >> Furthermore, this is the essential function for the Group Management
> >> feature which is officially published release feature.
> >>
> >>
> >>
> >> Due to the removal of it, Group related function does not work
> >> anymore.
> >>
> >> I was upset when this was removed and submitted even Morrow commented
> >> that this function had been implemented from Samsung folk.
> >>
> >>
> >>
> >> I wish you guide us what should we do enable it again.
> >>
> >>
> >>
> >> BR, Uze Choi
> >>
> >>
> >
_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev
?????. ??? ??.
Best Regards,
Jihun Ha (???/???, Ph.D.)
IoT, IoTivity, OIC | IoT Solution Lab
Software R&D Center | Samsung Electronics Co., Ltd
Mobile+82 10 2533 7947
jihun.ha at samsung.com| jhha85 at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150612/c1ad477a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 201506120842346_QKNMBDIF.gif
Type: image/gif
Size: 13168 bytes
Desc: not available
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150612/c1ad477a/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5859 bytes
Desc: not available
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150612/c1ad477a/attachment.p7s>