-
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
Improve DecodableList when not in list #13607
Merged
andy31415
merged 2 commits into
project-chip:master
from
mlepage-google:null-valued-list-decode
Jan 17, 2022
Merged
Improve DecodableList when not in list #13607
andy31415
merged 2 commits into
project-chip:master
from
mlepage-google:null-valued-list-decode
Jan 17, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spec treats empty lists and null valued lists equivalently. However DecodableList expects a container, even if empty, and does not support the case where there is no container (i.e. null valued list). Add support for null valued list (i.e. no container) by handling it as a special case in the Decode function, the DecodableList, and its Iterator. This is done using an "empty" mReader (with container type "not specified") in the "no list" case.
pullapprove
bot
requested review from
andy31415,
anush-apple,
balducci-apple,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
erjiaqing,
franck-apple,
gjc13,
harimau-qirex,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
kpschoedel,
LuDuda,
lzgrablic02,
msandstedt,
mspang and
pan-apple
January 14, 2022 23:25
pullapprove
bot
requested review from
robszewczyk,
sagar-apple,
saurabhst,
selissia,
tecimovic,
vijs,
vivien-apple,
wbschiller,
woody-apple,
xylophone21 and
yufengwangca
January 14, 2022 23:25
PR #13607: Size comparison from a11413e to 31637e3 Increases (24 builds for efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (30 builds for efr32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
Keep the other changes, and adjust the documentation.
PR #13607: Size comparison from a11413e to 1ecd2a4 Increases (25 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Full report (32 builds for efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
bzbarsky-apple
approved these changes
Jan 15, 2022
mlepage-google
changed the title
Add support for decoding null valued lists
Improve DecodableList when not in list
Jan 17, 2022
andy31415
approved these changes
Jan 17, 2022
selissia
pushed a commit
to selissia/connectedhomeip
that referenced
this pull request
Jan 28, 2022
* Add support for decoding null valued lists Spec treats empty lists and null valued lists equivalently. However DecodableList expects a container, even if empty, and does not support the case where there is no container (i.e. null valued list). Add support for null valued list (i.e. no container) by handling it as a special case in the Decode function, the DecodableList, and its Iterator. This is done using an "empty" mReader (with container type "not specified") in the "no list" case. * Remove changes to Decode Keep the other changes, and adjust the documentation.
step0035
pushed a commit
to hank820/connectedhomeip
that referenced
this pull request
Feb 8, 2022
* Add support for decoding null valued lists Spec treats empty lists and null valued lists equivalently. However DecodableList expects a container, even if empty, and does not support the case where there is no container (i.e. null valued list). Add support for null valued list (i.e. no container) by handling it as a special case in the Decode function, the DecodableList, and its Iterator. This is done using an "empty" mReader (with container type "not specified") in the "no list" case. * Remove changes to Decode Keep the other changes, and adjust the documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
DecodableList doesn't behave well if you don't supply a reader
with a well-formed list.
Change overview
Add a ClearReader method, used by the constructor but also
reusable later, that initializes the internal reader to a
container-less state. Check for this container-less state in
ComputeSize and iterator methods such as Next.
Testing
Built and ran all-clusters-app on Linux with REPL to try null lists
as well as lists with items.