[Basic Information] add support for the DeviceLocation attribute#71442
[Basic Information] add support for the DeviceLocation attribute#71442plauric wants to merge 31 commits intoproject-chip:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements the DeviceLocation attribute for the Basic Information cluster, including support for persistence and comprehensive unit tests. A syntax error was identified in RootNodeDevice.cpp where an attribute set method chain is incorrectly terminated with a comma and double semicolon, which will lead to compilation failure.
examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp
Outdated
Show resolved
Hide resolved
examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp
Outdated
Show resolved
Hide resolved
examples/all-devices-app/all-devices-common/devices/root-node/RootNodeDevice.cpp
Outdated
Show resolved
Hide resolved
|
PR #71442: Size comparison from 2cdb900 to 14e0a62 Increases above 0.2%:
Full report (5 builds for cc32xx, realtek, stm32)
|
…m:plauric/connectedhomeip into basic_info_device_location_implementation
|
PR #71442: Size comparison from 2cdb900 to 9b6b87c Increases above 0.2%:
Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #71442 +/- ##
==========================================
+ Coverage 54.32% 54.35% +0.03%
==========================================
Files 1577 1577
Lines 108257 108368 +111
Branches 13401 13401
==========================================
+ Hits 58806 58902 +96
- Misses 49451 49466 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
PR #71442: Size comparison from 2cdb900 to 6cd334e Increases above 0.2%:
Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from 2cdb900 to a553f57 Increases above 0.2%:
Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
| { | ||
| return encoder.Encode(*location); | ||
| } | ||
| return Protocols::InteractionModel::Status::UnsupportedAttribute; |
There was a problem hiding this comment.
Read/Write/Invoke is guaranteed by API contract to be called for existent attributes - so if ::Attributes constructs the list correctly, we generally do not need to have UnsupportedAttribute.
Maybe we could have our API not provide optional if the attribute is required.
| // from the BridgedDeviceBasicInformation cluster. Try to keep the two in sync, | ||
| // if any changes are required. | ||
| // | ||
| struct OwnedDeviceLocation |
There was a problem hiding this comment.
flash overhead seems very high here. I wonder if we could maybe make it policy-optional in some way with constexpr expressions.
We try to expose a IsAttributeEnabledOnSomeEndpoint in our static config, so codegen integration can also use constexpr for that: https://github.com/project-chip/connectedhomeip/blob/master/scripts/py_matter_idl/matter/idl/tests/outputs/large_all_clusters_app/cpp-app/static-cluster-config/BasicInformation.h#L64
we may need to resort to templates here or have some other way to make this code actually optional at compile time. 3K extra flash for a feature you do not use seems costly.
|
PR #71442: Size comparison from 2cdb900 to 102657e Increases above 0.2%:
Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
…c_info_device_location_implementation
|
PR #71442: Size comparison from 15b505f to 3ea89ea Full report (19 builds for cc13x4_26x4, cc32xx, efr32, nxp, psoc6, qpg, realtek, stm32)
|
…c_info_device_location_implementation
|
PR #71442: Size comparison from cdb458b to f2a9139 Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to cbab1ee Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to 1692ee0 Full report (29 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to 91874bd Full report (20 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, psoc6, qpg, realtek, stm32)
|
|
PR #71442: Size comparison from cdb458b to 33dc5dc Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
…he all clusters app zap file.
|
PR #71442: Size comparison from cdb458b to 3430d97 Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to 8a2b6ec Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to dcfb6a9 Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to 727e335 Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to f057b69 Increases above 0.2%:
Full report (15 builds for cc13x4_26x4, cc32xx, psoc6, qpg, realtek, stm32)
|
|
PR #71442: Size comparison from cdb458b to b682f94 Increases above 0.2%:
Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
|
PR #71442: Size comparison from cdb458b to 9eaccb3 Full report (33 builds for bl602, bl616, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
Implement the support for the DeviceLocation optional attribute, in the Basic Information cluster.
Related issues
The equivalent changes for the Bridged Device Basic Information cluster: #43409
The refactoring of the Basic Information cluster: #43511
The Basic Information cluster XML changes: #43342
Testing
Added the related CI tests and successfully ran them locally.
Also ran the all-clusters app locally and successfully used chip-tool to read, write, and check the persistence of the DeviceLocation attribute.