Could you check

OCPlatform:: <https://api-
docs.iotivity.org/latest/namespace_o_c_1_1_o_c_platform.html#a9e96de317c68e0
da5c375503201800a1> constructResourceObject (const std::string &host, const
std::string &uri,  <https://api-
docs.iotivity.org/latest/octypes_8h.html#a916b07a8f92b7cd59809e83309846b4a>
OCConnectivityTypeconnectivityType, bool isObservable, const std::vector<
std::string > &resourceTypes, const std::vector< std::string > &interfaces)

BR, UZe Choi

From: [email protected] [mailto:iotivity-dev-
bounces at lists.iotivity.org] On Behalf Of Nash, George
Sent: Friday, June 03, 2016 5:36 AM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Is it possible to create an OCResouce if I know the URI





If I know the URI of a device can I create an OCResource without calling
findResouce?



For example



I call 

    OCPlatform::findResource(??, ?/oic/res?rt=oic.d.light?, CT_DEFAULT,
myCallbackHandler);



I then get a response with a light resource that contains links to other
resources:



Example:

[{

  ?rt?: ?oic.d.light?,

  ?di?: "0685B960-736F-46F7-BEC0-9E6CBD61ADC1",

  ?links?:

    [

      { ?href?: ?/light/switch?,

        ?rel?: ?contained?,

        ?rt?: ?oic.r.switch.binary?,

        ?if?: ?oic.if.a?},

      { ?href?: ?/light/brightness?,

        ?rel?: ?contained?,

        ?rt?: ?oic.r.light.brightness?,

        ?if?: ?oic.if.a?}

    ]

}]



I want to interact with the oic.r.switch.binary and the
oic.r.light.brightness I still have OCResource for the found oic.d.light is
it possible to create a new OCResource for the oic.r.switch.binary and
oic.r.light.brightness without calling find for each of the contained
resource types?



George

-------------- next part --------------
HTML ?????? ??????????????...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160603/a4e7479a/attachment.html>

Reply via email to