net/gcoap: add/use Packet API Block implementation#11056
net/gcoap: add/use Packet API Block implementation#11056benpicco merged 3 commits intoRIOT-OS:masterfrom
Conversation
ca69b47 to
96719c1
Compare
|
Rebased |
96719c1 to
257dade
Compare
|
Rebased and added a couple of minor fixups. |
fjmolinas
left a comment
There was a problem hiding this comment.
Code looks good. For now I only tested the CLI example which is working nicely. I'll try to make time soon to reproduce your test suit.
Some minor comments, mostly regarding documentation and corner cases.
| * the Observe option value set to 1. The server does not support cancellation | ||
| * via a reset (RST) response to a non-confirmable notification. | ||
| * | ||
| * ## Block Operation ## |
There was a problem hiding this comment.
Doxygen is generating this as a big blob, ### are treated as comments and don't show up. Since this isn't a README
maybe consider using * ===== or * ------- do mark section limits.
There was a problem hiding this comment.
That is indeed strange, when I generate it locally I get this layout:
This is when calling make doc locally and opening the generated html. How are you opening/generating your file?
I see that in http://riot-os.org/api is the same you are showing. This looks like an issue with my doxygen version, I have 1.8.16 which should support markdown. Anyway if your version is rendering correctly then I trust the issue is on my side.
There was a problem hiding this comment.
I am using doxygen 1.8.13 from Ubuntu 19.04. I built the 1.8.16 release from source and regenerated the doc, with no change to the output. I display the doc from a local Apache web server. If I display from a file: URL, the fonts are different, but the structure is the same. So, I agree it seems that there is some difference in your setup.
I did notice that the level 3 headings for the block documentation in this PR do not include a closing ### at the end of the line. The doxygen doc shows that the absence of the closing hashes should not matter. However, I will add them to be consistent with the rest of the module documentation.
|
All comments addressed. |
|
@fjmolinas, I reran my functional tests, and all looks good. I am happy to work through any issues you are experiencing. |
|
The documentation is generated properly for me too. (I checked All other comments have been addressed and @fjmolinas provided testing. |
|
Running part functional tests (block related ones), all looking good. sudo -E pytest block1_client_test.pysudo -E pytest block2_client_test.pysudo -E pytest block1_server_test.pysudo -E pytest block2_server_test.pyI did have an issue with the regex matching in the first test, but it was a test issue and not functional issue. |
b4cdc30 to
68ccf4b
Compare
|
Squashed and builds are happy. |


Contribution description
#11002 and #11024 completed the Blockwise implementation for the Buffer API, traditionally used with nanocoap sock's message send/receive functions. This PR completes the implementation for the Packet API, used by gcoap. It includes two pairs of functions:
N is 1 when acting on a blockwise payload in a PUT/POST request, and 2 when acting on a blockwise payload in a GET response.
This PR also adds module documentation to describe typical use of these functions to send/receive blockwise content. Finally, this PR adds generic client side control use in the gcoap example to request blockwise content from a server. For example, this use allows gcoap to retrieve the full response from the nanocoap_server example for the /.well-known/core resource.
Testing procedure
The gcoap module doc references an example for each use:
The gcoap example caches the request path to retrieve remaining blocks. If the path is too long, the example displays
Path too long; can't complete blockwise. To test this against nanocoap_server as described above, decrease_LAST_REQ_PATH_MAXin the example to 16.FWIW, I use these examples in my automated functional tests.
Issues/PRs references
Partially implements #10732.