-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Switch DataModel::Provider to a span-based list iterator - flash and ram savings, simpler interface #37033
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
Merged
mergify
merged 192 commits into
project-chip:master
from
andy31415:list-metadata-prototype
Jan 20, 2025
Merged
Switch DataModel::Provider to a span-based list iterator - flash and ram savings, simpler interface #37033
Changes from all commits
Commits
Show all changes
192 commits
Select commit
Hold shift + click to select a range
222d5fc
Copied over the new AttributePathExpandIterator and will incrementall…
andreilitvin 8edc026
Rename AttributePathExpandIterator to legacy
andreilitvin 2d4e3ad
Prepare for using new style iterators ... checking NOT YET enabled th…
andreilitvin 3b2c14d
Enabled checks ... and unit tests fail, but this now can be debugged
andreilitvin 27f6fdc
Fix some of the underlying bugs: read handling logic assumes we are o…
andreilitvin a458140
Unit tests pass now
andreilitvin 26a5b69
Restyle
andreilitvin b72fc9b
Use new iterator in IME
andreilitvin e764906
Update logic to use the new iterator on testRead
andreilitvin bb3be30
more updates
andreilitvin 5b5a612
Restyle
andreilitvin c566826
Remove the legacy attribute path expand iterator
andreilitvin 04d6626
Update naming
andreilitvin fef425f
Restyle
andreilitvin 56b1307
Remove extra argument for ReadHandler constructor
andreilitvin bf8c4ba
Restyle
andreilitvin 7d4475b
Slight flash improvement
andreilitvin 652e389
Fix up includes
andreilitvin 4fa0fc8
Removed empty line
andreilitvin 4a4ec3e
added comment on why state is a friend class
andreilitvin bc52596
Comment updates
andreilitvin 93079a2
Restyle, add some comments and add extra checks on validity check onl…
andreilitvin c05d9f9
Merge branch 'master' into attribute-path-expand-state
andy31415 75bb1c1
Remove an include
andy31415 851928a
Comment updates, renamed mLastOutputPath to mOutputPath
andy31415 5024a4a
Fix one typo
andy31415 6266f96
Re-arrange members of ReadHandler to optimize for memory layout. This…
andy31415 a080dcf
Restyle
andy31415 b9a5d1d
Rename State to Position
andy31415 6fe8461
One more rename
andy31415 255cffe
Remove redundant assigment ...we are at a net 0 txt increase now on qpg
andy31415 ed950cf
Add more unit tests for non-obvious requirement that wildcard expansi…
andy31415 2e2ebd3
Update src/app/AttributePathExpandIterator.cpp
andy31415 130c1f6
Update src/app/AttributePathExpandIterator.h
andy31415 a610782
Update src/app/AttributePathExpandIterator.h
andy31415 e30ae74
Update src/app/AttributePathExpandIterator.h
andy31415 f9cd8f5
Update src/app/ReadHandler.h
andy31415 aeecc5c
Update src/app/ReadHandler.cpp
andy31415 57198a6
Update src/app/AttributePathExpandIterator.h
andy31415 75173d3
Use different values for the cluster ids for testing
andy31415 0bbdee6
Merge branch 'attribute-path-expand-state' of github.com:andy31415/co…
andy31415 04d27ba
One more state to position change
andy31415 75564bf
mExpanded is now set during output path returning. Removed 2 more set…
andy31415 8fce5b2
Merge branch 'attribute-path-expand-state' into list-metadata-prototype
andreilitvin 3abc7e7
Import metadatalist class and test
andreilitvin f2470b6
Merge branch 'master' into attribute-path-expand-state
andreilitvin 91e8547
Remove some tests that seem redundant, keep only one
andreilitvin bc8f162
Merge branch 'attribute-path-expand-state' into list-metadata-prototype
andreilitvin 28ab9e3
Start with generated commands, see if we can replace its usage...
andreilitvin ccd52a1
Unit tests for GeneratedCommands pass
andreilitvin fe441f0
Start with an implementation of accepted commands (no testing yet)
andreilitvin a29ae90
More tests pass
andreilitvin 1245fd8
Updated AcceptedCommands as well .. unit tests pass
andreilitvin e45093a
Restyle
andreilitvin d8f1cfd
Fix namespaces
andreilitvin 1bae4c6
Slight refactor. Code is still very much ugly
andreilitvin 0966d48
A bit of refactor, code looks better and tests pass now
andreilitvin 72f2940
Code compile for semantic tag ... made std::optional support non-triv…
andreilitvin 1e115a4
Update test
andreilitvin 1d5e718
Make chip::Optional be trivially destructible if the underlying type is.
andreilitvin f96d388
Update src/app/AttributePathExpandIterator.cpp
andy31415 5962c1c
Update src/app/AttributePathExpandIterator.cpp
andy31415 3b6557d
Update src/app/AttributePathExpandIterator.cpp
andy31415 c2e23a2
Update src/app/AttributePathExpandIterator.cpp
andy31415 740d1c7
Update src/app/InteractionModelEngine.cpp
andy31415 321bfc3
Update src/app/ReadHandler.h
andy31415 a131e01
Update src/app/AttributePathExpandIterator.h
andy31415 78bdf32
Update src/app/ReadHandler.h
andy31415 1c0cf18
Use mCompletePosition
andy31415 efa903f
Another rename
andy31415 5310cf8
Merge branch 'master' into attribute-path-expand-state
andy31415 b06a268
Undo submodule update
andy31415 917d4a8
Restyle
andy31415 e6e42f1
Remove extra char
andy31415 6f3b85e
Remove unused variable
andy31415 a503615
Merge branch 'master' into optional-trivial-destructible
andy31415 a4f3d29
Update comment text to not sound like graph parsing
andy31415 e6b8003
Rename method to be more descriptive
andy31415 6eb101b
Remove one more unused variable
andy31415 9de15ec
Update peek attribute iterator to rollback and update code logic a bi…
andy31415 99bc8a8
Merge branch 'optional-trivial-destructible' into list-metadata-proto…
andy31415 7c2ada4
Semantic tags conversion is done
andy31415 33d1faa
Restyle
andy31415 a5c5321
Migrate device types to the new format
andy31415 5f82494
update comment a bit
andy31415 9add2d3
Add unused marker for chip errors used for logging only
andy31415 5a53b64
Fix descriptor cluster
andy31415 a29016e
Fix microwave oven
andy31415 0247195
Merge branch 'master' into list-metadata-prototype
andy31415 9d6e69d
Restyle
andy31415 ee12400
Fix intentional bugprone-use-after-move
andy31415 0fca820
Merge branch 'master' into attribute-path-expand-state
andy31415 f845b45
Merge branch 'master' into optional-trivial-destructible
andy31415 604b8a1
Merge branch 'attribute-path-expand-state' into list-metadata-prototype
andy31415 cc1f57b
Merge branch 'optional-trivial-destructible' into list-metadata-proto…
andy31415 8d9a20c
Fix intentional bugprone-use-after-move
andy31415 ae5a112
Restyle
andy31415 217be3a
Merge branch 'master' into list-metadata-prototype
andy31415 c660c1b
Fix based on clang feedback
andy31415 e7f1f9c
Move endpoints to the new style of iteration
andy31415 140b2cd
Fix includes
andy31415 e8acd39
Fix includes
andy31415 4a71ae1
Fix includes
andy31415 5aee545
make it standard that test Providers are for now CodegenDataModelProv…
andy31415 8155339
Restyle
andy31415 f6c2d79
Minor update in logic: do the endpoint selection when next is called
andy31415 36a65b8
Allow startup to try to mark attributes dirty even if no provider exi…
andy31415 d15b0d2
Fix typo
andy31415 91181fc
Merge branch 'master' into list-metadata-prototype
andreilitvin 33c9156
start implementing client clusters
andreilitvin beedb4b
Update ClientCluster logic
andreilitvin 80790db
Restyle
andreilitvin 6d834ea
Start defining the server cluster query
andreilitvin 5b319f7
Actually use the new server cluster functionality
andreilitvin 726349b
Fix an include
andreilitvin ddeab07
More include fixes
andreilitvin b227388
implement the get attributes and adapt unit tests
andreilitvin 4858fbc
Restyle
andreilitvin 63dd9a9
more updates to cleanup code. I am a bit concerned about O(n^2) attri…
andreilitvin 6013fa6
Merge branch 'list-metadata-prototype' of github.com:andy31415/connec…
andy31415 3d20e14
Merge branch 'master' into list-metadata-prototype
andy31415 3cd9728
A rename and moved finder methods out of inline. Saves 650 bytes of f…
andy31415 a94080c
Update logic to centralize metadata list code with less templating
andy31415 dcc871e
move the generic metadata list to detail, add an assert on trivial de…
andy31415 d7ee8ef
Fix namespace prefix
andy31415 90bc88e
Save 70 bytes by using references in condensed for loops
andy31415 e7d7b52
Replace count-if because it seems to result in smaller code (46 bytes)
andy31415 431bc3d
Another find_if replacement
andy31415 0c9bac0
Replaced some find_if...we are down to 92 bytes on qpg
andy31415 9e06eaf
Replaced one more find-if, saving another 88 bytes of flash
andy31415 b83a3bb
Removed algorithm includes: these are slow and would like compile to …
andy31415 764095f
Save more flash ... we should be at a net negative now
andy31415 7f4308f
This seems to save even more
andy31415 adf8ced
More savings by more encode overrides ... this is silly...
andy31415 cc4583e
Fix typos
andy31415 ff84571
More explicit casting, removed 64-bit overrides
andy31415 dcaf229
Added one more check for freeing memory .Still need to track a leak t…
andy31415 7829cc9
Fix memory leak in assignment
andy31415 a8955b7
Self-review: fix includes
andy31415 01dc8b8
Self-review: fix includes
andy31415 63634ca
Self-review: fix includes
andy31415 ff0598b
Self-review: fix includes
andy31415 32346df
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
andy31415 84a10fd
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
andy31415 b62c26e
Update src/app/AttributePathExpandIterator.h
andy31415 9b0fd87
Update src/app/AttributePathExpandIterator.h
andy31415 05bb27c
Update src/app/clusters/descriptor/descriptor.cpp
andy31415 0cd941e
Update src/app/clusters/descriptor/descriptor.cpp
andy31415 3c1f695
Update src/app/data-model-provider/MetadataList.cpp
andy31415 6f9b3af
Fix spelling for acquire
andy31415 32701f4
Update src/app/data-model-provider/MetadataList.h
andy31415 7b1be5f
Update src/app/data-model-provider/MetadataList.h
andy31415 7cc6dce
Update src/app/data-model-provider/MetadataList.h
andy31415 78c6e37
Fix is_trivially_destructible
andy31415 271db45
Update src/app/data-model-provider/MetadataSearch.h
andy31415 e415b35
More fixes
andy31415 8368d11
Merge branch 'list-metadata-prototype' of github.com:andy31415/connec…
andy31415 a0377ac
Fix includes
andy31415 7b1bad8
Fix invalid check typo
andy31415 6c0cd2e
Fix comment
andy31415 ace5e21
Correct comment
andy31415 f91ca92
Updated comment
andy31415 cc10a80
Make logic between clusters/attributes/endpoints the same regarding n…
andy31415 9447bfe
Restyle
andy31415 36e048e
Update logic for IsDescentantof
andy31415 f38661b
Help compiler generate efficient code as we keep reusing the same poi…
andy31415 1c19e1b
clearer logic that we handle all cases
andy31415 f0ce7c6
Fixes
andy31415 444baab
Use calloc
andy31415 72ca0d7
Update comment
andy31415 2ae576a
Fix include
andy31415 70319f3
Fix casting
andy31415 7eeff88
Make cluster count functions from ember public API since they seem re…
andy31415 3e0915e
Also fix dynamic dispatch
andy31415 2f4289b
Merge branch 'master' into list-metadata-prototype
andy31415 99d891f
update enumeration entry
andy31415 194e0e5
another comment update
andy31415 252c6ca
Undo submodule update
andy31415 b734cd0
Rename metadata search to metadta lookup
andy31415 ba47516
Update metadata list methods to be all uppercase
andy31415 12ad52c
Fix more renames
andy31415 a7de4f1
Fix invalid cast
andy31415 e7e02d7
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
andy31415 5e44d69
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
andy31415 ad1c7a7
Update src/data-model-providers/codegen/CodegenDataModelProvider.cpp
andy31415 64555ab
Update src/app/data-model-provider/MetadataList.h
andy31415 1c9d034
Address comments
andy31415 5730e6f
fix bug
andy31415 58ab136
Update src/app/AttributePathExpandIterator.cpp
andy31415 4ebdca1
Update src/app/WriteHandler.cpp
andy31415 e1a1414
Update src/app/AttributePathExpandIterator.cpp
andy31415 4b0b73a
Restyle and include update
andy31415 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.