bthnycl / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
0 stars 0 forks source link

[feature] Enable CoAP resources to access URI query information #94

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently TinyOS CoAP resources have no way of getting access to any request 
components such as URI query parameters (e.g. when called with GET 
/resource?foo=bar). In essence this limits CoAP resources to be fixed 
resources, which is, well, rather limiting.

The attached patch extends the ReadResource interface used by the CoAP 
resources to also be passed a coap_uri_t object, from which things such a query 
parameters and network authority can be obtained, and this in turn can then be 
used by the resource to alter its behavior accordingly. In our case for 
example, we need this to be able to request particular sensor samples by their 
sequence number.

Note that this patch also updates the handling of CoAP query options to match 
the later drafts - each key-value pair is now expected in its own query option, 
rather than ampersand (&) delimited in a single query option the early drafts 
specified.

Original issue reported on code.google.com by jmatts...@dius.com.au on 25 Nov 2011 at 3:47

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by sdh...@gmail.com on 25 Nov 2011 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by marku...@gmail.com on 26 Nov 2011 at 4:29

GoogleCodeExporter commented 9 years ago
Updated patch. Replaces original patch. Assumes patches from 89/90 have been 
applied first.

Original comment by jmatts...@dius.com.au on 20 Dec 2011 at 12:48

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by marku...@gmail.com on 12 Jan 2012 at 8:54