Skip to content
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

cluster model decoupling - declare the codegen (ember) version and implement iteration #33345

Merged
merged 90 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 86 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
30812a9
Initial copy with a clean history
andreilitvin May 7, 2024
53891f3
make linter happy
andreilitvin May 7, 2024
0947dd6
Restyle
andreilitvin May 7, 2024
5a2a108
Fix typo
andreilitvin May 7, 2024
223f275
Merge branch 'master' into imdm/2-ember-iterate
andreilitvin May 7, 2024
72a6146
Merge branch 'master' into imdm/2-ember-iterate
andy31415 May 8, 2024
26bb33b
Add nolint: assert will return before we use the underlying value
andy31415 May 8, 2024
4b55a20
2 more fixes regarding unchecked access
andy31415 May 8, 2024
d8b8433
Switch some asserts to expects, for better test logic
andy31415 May 8, 2024
27e106a
Model renames
andreilitvin May 14, 2024
5b73a1d
Add renamed files
andreilitvin May 14, 2024
9bf0f85
Add some attribute iteration hint
andreilitvin May 14, 2024
64f0db7
Make use of the attribute cache
andreilitvin May 14, 2024
777ee68
Restyle
andreilitvin May 14, 2024
851e0a4
Add a cluster iteration hint
andreilitvin May 14, 2024
5009d8e
Add a few more hints. Ember code still contains loops though, so this…
andreilitvin May 14, 2024
88e5bbc
Add some TODO items for using faster iterations for data. Ember index…
andreilitvin May 14, 2024
7672d22
Add a cluster type cache as well. This relies on ember being reasonab…
andreilitvin May 14, 2024
23a988d
Add global attribute handling
andreilitvin May 14, 2024
f4651fc
Fix typing u16 vs unsigned
andreilitvin May 14, 2024
c1fc803
Merge branch 'master' into imdm/2-ember-iterate
andreilitvin May 17, 2024
eba45ae
Fix auto-added include names
andreilitvin May 17, 2024
c34e10f
Merge branch 'master' into imdm/2-ember-iterate
andreilitvin May 21, 2024
22e9df0
Remove back the initialization and make the comment more obvious
andreilitvin May 21, 2024
63a7685
Merge branch 'master' into imdm/2-ember-iterate
andy31415 May 22, 2024
34066a6
Update src/app/codegen-interaction-model/model.gni
andy31415 May 29, 2024
3623056
Merge branch 'master' into imdm/2-ember-iterate
andy31415 May 29, 2024
b2e057a
Code review feedback: added comments
andy31415 May 29, 2024
b98b88b
Update src/app/codegen-interaction-model/CodegenDataModel.h
andy31415 Jun 4, 2024
b3d53aa
Update src/app/codegen-interaction-model/CodegenDataModel.cpp
andy31415 Jun 4, 2024
c292e9e
Update src/app/codegen-interaction-model/BUILD.gn
andy31415 Jun 4, 2024
2b914ed
Some cleanup logic for event generation - naming and return values as…
andreilitvin Jun 4, 2024
4d66cd1
Comment fix
andreilitvin Jun 4, 2024
0ae3b5c
More naming updates
andreilitvin Jun 4, 2024
9cbabe1
Several comment updates and renamed RequestContext to ActionContext
andreilitvin Jun 4, 2024
b40bf0a
Restyle
andreilitvin Jun 4, 2024
4648b3c
Rename to InteractionModelContext
andreilitvin Jun 4, 2024
9ec35cf
one more rename
andreilitvin Jun 4, 2024
292c1c9
Fix typo
andreilitvin Jun 4, 2024
55c715d
Fix tests to compile
andreilitvin Jun 4, 2024
d34e51d
More renames of actions to context
andreilitvin Jun 4, 2024
5332c0b
One more comment added
andreilitvin Jun 4, 2024
b95086c
Restyle
andreilitvin Jun 4, 2024
8ea6206
Address review comments
andreilitvin Jun 4, 2024
66589f5
Restyle
andreilitvin Jun 4, 2024
81e268d
make clang-tidy happy
andreilitvin Jun 4, 2024
2f548a6
Operator== exists on optional ... make use of that directly
andreilitvin Jun 4, 2024
aee7c2e
Merge branch 'master' into imdm/2-ember-iterate
andy31415 Jun 5, 2024
17c9abc
Merge branch 'master' into imdm/2-ember-iterate
andy31415 Jun 6, 2024
7a284fb
Merge branch 'im_dm_decouple_post_review' into imdm/2-ember-iterate
andy31415 Jun 6, 2024
981b1a7
Started renaming things
andy31415 Jun 6, 2024
738e3c2
Use the right types in Model.h
andy31415 Jun 6, 2024
18185e0
Make things compile
andy31415 Jun 6, 2024
f0a4893
Skip global attribute handling, add TODOs for reading extra bits from…
andy31415 Jun 6, 2024
5427327
Typo fix
andy31415 Jun 6, 2024
543c456
Several flags and correct loading of privileges for attributes
andy31415 Jun 6, 2024
fc9ad52
Start implementing command iteration ... still feels awkward and cach…
andy31415 Jun 6, 2024
7d750da
We seem to also support fabric scoping detection
andy31415 Jun 6, 2024
848861c
implementation is in theory done, need unit tests
andy31415 Jun 6, 2024
c8e3191
Fix iterator name
andy31415 Jun 6, 2024
312d522
Mock support for accepted/generated commands, start having unit tests
andy31415 Jun 6, 2024
1e45ed0
Better iteration tests on accepted commands
andy31415 Jun 6, 2024
e62aa6e
More unit tests and fix bugs
andy31415 Jun 6, 2024
f116aae
Restyle
andy31415 Jun 6, 2024
bea8c16
More tests, one iteration bug fix
andy31415 Jun 6, 2024
20fc0de
Slight update again
andy31415 Jun 6, 2024
e17e516
Aiming for more test coverage
andy31415 Jun 6, 2024
1207126
More test coverage for edge cases in iteration
andy31415 Jun 6, 2024
b291056
Fix code review comment
andy31415 Jun 6, 2024
949302a
Restyle
andy31415 Jun 6, 2024
2b32cd4
Update src/app/interaction-model/Events.h
andy31415 Jun 7, 2024
a9f5680
Update src/app/interaction-model/IterationTypes.h
andy31415 Jun 7, 2024
b1f6beb
Update src/app/interaction-model/Paths.h
andy31415 Jun 7, 2024
e26503f
Fix comment about validity
andy31415 Jun 7, 2024
154d15d
Some kListBegin/End comment updates
andy31415 Jun 7, 2024
7ee3828
Drop kListBegin/End alltogether
andy31415 Jun 7, 2024
7fda3b6
Drop groupId
andy31415 Jun 7, 2024
1e03143
Comment update
andy31415 Jun 7, 2024
a513a12
Merge branch 'master' into im_dm_decouple_post_review
andy31415 Jun 10, 2024
2d4585a
Merge branch 'im_dm_decouple_post_review' into imdm/2-ember-iterate
andy31415 Jun 10, 2024
4e7019e
Update for data version to be mandatory, add more error reporting and…
andy31415 Jun 10, 2024
2c6a5ba
Update to use kInvalid instead of Invalid method
andy31415 Jun 10, 2024
d94cde3
Update flags.set
andy31415 Jun 10, 2024
8ff725d
Use IsServerMask on clusterr class
andy31415 Jun 10, 2024
b52b362
Use a struct instead of a typedef
andy31415 Jun 10, 2024
41012d9
Fix compile without error logging
andy31415 Jun 10, 2024
988d4d5
Restyle
andy31415 Jun 10, 2024
3acac04
Remove command quality that is not supported
andy31415 Jun 10, 2024
82a6824
Restyle
andy31415 Jun 10, 2024
10c48ca
Rename IsServerMask to IsServer
andy31415 Jun 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ if (chip_build_tests) {
chip_test_group("tests") {
deps = []
tests = [
"${chip_root}/src/app/codegen-interaction-model/tests",
"${chip_root}/src/app/interaction-model/tests",
"${chip_root}/src/access/tests",
"${chip_root}/src/crypto/tests",
Expand Down
2 changes: 1 addition & 1 deletion src/app/ConcreteClusterPath.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct ConcreteClusterPath
// to alignment requirements it's "free" in the sense of not needing more
// memory to put it here. But we don't initialize it, because that
andy31415 marked this conversation as resolved.
Show resolved Hide resolved
// increases codesize for the non-consumers.
bool mExpanded; // NOTE: in between larger members
bool mExpanded; // NOTE: in between larger members, NOT initialized (see above)
ClusterId mClusterId = 0;
};

Expand Down
27 changes: 27 additions & 0 deletions src/app/codegen-interaction-model/BUILD.gn
bzbarsky-apple marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build_overrides/chip.gni")
# This source set is TIGHLY coupled with code-generated data models
# as generally implemented by `src/app/util`
#
# Corresponding functions defined in attribute-storace.cpp/attribute-table.cpp must
# be available at link time for this model to use
#
# Use `model.gni` to get access to:
# CodegenDataModel.cpp
# CodegenDataModel.h
#
# The above list of files exists to satisfy the "dependency linter"
# since those files should technically be "visible to gn" even though we
# are supposed to go through model.gni constants
Loading
Loading