Hi Ethan

Just curious what's real need is coming from: you wish just to get notified
when "/oic/res" is called on the server, or you rather want to filter /
modify the response?


Max

On Wed, Apr 25, 2018 at 4:25 AM, Wright, Ethan J <ethan.wri...@charter.com>
wrote:

> Nathan,
>
>
> Thanks for your input, that is exactly what I was looking to do.
>
>
> I was worried that I was missing an API component and I wanted to build my
> server in the most OCF compliant way possible.
>
>
> It sounds like short of modifying stack code the device proxy solution I
> have come up with is acceptable so I will keep doing that as it will be
> easier to maintain.
>
>
> I appreciate your input and this really helped clear things up for me,
>
>
> Ethan
> ------------------------------
> *From:* Heldt-Sheller, Nathan <nathan.heldt-shel...@intel.com>
> *Sent:* Tuesday, April 24, 2018 6:40 PM
> *To:* Gregg Reynolds; Wright, Ethan J
> *Cc:* iotivity-dev
> *Subject:* RE: [dev] oic/res entity handler
>
>
> Ethan if I’m understanding right, you basically want to “do something” in
> the Server’s application layer, when the Server receives as discovery
> request (multicast to /oic/res).
>
>
>
> If that’s right, I think you’ll need to modify the stack… I don’t know of
> any way to “hook” the in-stack “entity handler” (the request endpoint) for
> /oic/res.  Your alternate Resource approach is more in keeping with the
> Specification (since side-effects on Discovery aren’t really a thing,
> AFAIK), but if that doesn’t work for your use case, then I think you’re
> looking at editing IoTivity code.  Shouldn’t be too hard really but just
> make sure you are careful to not create side effects that change the
> Device/Resource state from an OCF perspective… that would be out of line
> with RESTful nature of the OCF Reource interfaces… make sense?
>
> Thanks,
> Nathan
>
>
>
> *From:* iotivity-dev-boun...@lists.iotivity.org [mailto:
> iotivity-dev-boun...@lists.iotivity.org] *On Behalf Of *Gregg Reynolds
> *Sent:* Tuesday, April 24, 2018 2:50 PM
> *To:* Wright, Ethan J <ethan.wri...@charter.com>
> *Cc:* iotivity-dev <iotivity-dev@lists.iotivity.org>
> *Subject:* Re: [dev] oic/res entity handler
>
>
>
>
>
> On Tue, Apr 24, 2018, 4:26 PM Wright, Ethan J <ethan.wri...@charter.com>
> wrote:
>
> Sorry I didn't want to obfuscate the problem by providing too specific
> of information:
>
>
>
> I want to be able to kick off a gather devices request to a separate
> process, such as gathering the devices list from a hue bridge and
> registering any new lights as resources.
>
>
>
> Sorry, not at all clear to me. You need to make a clear distinction
> between what happens on the server and the client. I don't know what "kick
> off a gather devices request to a separate process" means.
>
>
>
> I just need to be able to catch when a discovery request is made to
> oic/res so I can build out the logic.
>
> AFAIK multicast discovery requests are handled by the stack, not the
> application. What do you mean by "build out the logic"?
>
> I've implemented it currently by building a resource "/bridge/oic/res" and
> then adding an entity handler for get requests but this feels like a
> hacked work around.​
>
> /oic/res is an OCF-defined resource. You do not need to write a handler
> for discovery requests.
>
>
>
> Sorry, I'm still not quite grokking.
>
> Hopefully this clears things up a little,
>
>
>
> Ethan​
>
>
>
>
> ------------------------------
>
> *From:* Gregg Reynolds <d...@mobileink.com>
> *Sent:* Tuesday, April 24, 2018 3:14 PM
> *To:* Wright, Ethan J
> *Cc:* iotivity-dev
> *Subject:* Re: [dev] oic/res entity handler
>
>
>
>
>
> On Tue, Apr 24, 2018, 4:08 PM Wright, Ethan J <ethan.wri...@charter.com>
> wrote:
>
> Hi All,
>
>
>
> I've been reading through the documentation and have been having trouble
> finding a way to attach an entity handler to the default iotivity server
> interface oic/res.
>
>
>
> I'm hoping to expose oic/res so that my server can do extra things when
> hit with a discovery request.
>
> Please be more specific. What exactly are you trying to do, and what
> exactly is the problem you're having? What does "extra things" mean?
>
> Anyone have any clue where I would look to implement this?​
>
>
>
> Thanks,
>
>
>
> Ethan Wright
>
>
>
> The contents of this e-mail message and
> any attachments are intended solely for the
> addressee(s) and may contain confidential
> and/or legally privileged information. If you
> are not the intended recipient of this message
> or if this message has been addressed to you
> in error, please immediately alert the sender
> by reply e-mail and then delete this message
> and any attachments. If you are not the
> intended recipient, you are notified that
> any use, dissemination, distribution, copying,
> or storage of this message or any attachment
> is strictly prohibited.
>
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev@lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev
>
>
_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to