Add additional parameter to COAP handler functions#12
Add additional parameter to COAP handler functions#12pekkanikander wants to merge 1 commit intokaspar030:masterfrom
Conversation
|
@pekkanikander Would "prefix handlers", whose path ends in '/' and which handle a whole subtree, serve your needs? |
|
Prefix handlers would probably cover a part of the use cases that can be handled with the mechanism I implemented. A lot depends on what parameters such a prefix handler would get. But in any case, such prefix handlers would be a very welcome addition. Especially if the handler search algorithm is changed so that you can first have a few special case handlers and then a prefix-handler as a default. |
|
Never mind this comment below. It looks like I'm finding a better solution to the observe problem. @kaspar030 I am now implementing also observe functionality, using gcoap. It would again be beneficial to extend Given this, I started to contemplate that maybe the An alternative would be to extend the Or the |
|
Given the experience so far, this way of adding a |
|
Closing in favour of #15. |
Adds a new additional
void *parameter to the handler functions. This makes it easier to write handlers functions that handle multiple URLs, e.g. a single function is enough to read multiple I/O pins.