-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffered List Chunk Reader #11705
Buffered List Chunk Reader #11705
Conversation
5016128
to
f2d7300
Compare
PR #11705: Size comparison from ebadd33 to f2d7300 Increases above 0.2%:
Increases (21 builds for efr32, esp32, k32w, linux, p6, qpg, telink)
Full report (23 builds for efr32, esp32, k32w, linux, p6, qpg, telink)
|
PR #11705: Size comparison from a5636fa to 4e6af09 Increases above 0.2%:
Increases (24 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
Full report (28 builds for efr32, esp32, k32w, linux, mbed, p6, qpg, telink)
|
4e6af09
to
08922da
Compare
PR #11705: Size comparison from 1adaf7a to 08922da Increases above 0.2%:
Increases (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
PR #11705: Size comparison from 1adaf7a to 48594ad Increases above 0.2%:
Increases (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
The Darwin test failure reproduces for me locally, and is due to a bug in this PR. We are getting a crash with the following stack:
and indeed
which is wrong: it should pass |
PR #11705: Size comparison from 5f847e0 to 70835d2 Increases above 0.2%:
Increases (15 builds for k32w, linux, p6, qpg, telink)
Full report (17 builds for k32w, linux, p6, qpg, telink)
|
70835d2
to
e2a05c0
Compare
PR #11705: Size comparison from 6cb75f4 to e2a05c0 Increases above 0.2%:
Increases (31 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (38 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
Once list chunking is implemented on the server, clients will need to be updated to deal the the fact that lists will be delivered across separate AttributeDataIBs and potentially, across multiple messages.
To reduce the burden of doing this on clients, this commit creates an adapter class (
BufferedReadCallback
) that sits in between the application and theReadClient
and buffers up each list chunk before reconstituting them into a contiguous list and dispatching that up to the application.This buffering is done natively in TLV. This avoids the need to understand the specifics of any data model types that the TLV will be decoded into.
We cannot do this buffering at the next level up (i.e at the cluster object level) since those objects are merely 'view' objects and not proper containers. Consequently, there is no way to 'patch' the state in those objects incrementally. By doing it at the TLV level, we can preserve the existing cluster object APIs, which is a significant win.
This PR does not actually fix the ReadClient to correctly handle
AttributeDataIBs
that contain list operations other than replace (i.e append). That should happen in a separate PR.Tests: A TestBufferedReadCallback test that exercises all possible permutations of list and non list data to ensure the state machine is validated.