-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Added new source files for the commodity metering cluster server #39688
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
base: master
Are you sure you want to change the base?
Added new source files for the commodity metering cluster server #39688
Conversation
Warning Gemini encountered an error creating the review. You can try again by commenting |
PR #39688: Size comparison from fc8791b to 7c30ae4 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
7c30ae4
to
acae1bf
Compare
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This PR introduces the source files for the commodity metering cluster server. The changes include defining the cluster in .matter
and .zap
files, implementing the server logic in C++, and adding necessary build configurations. The review focuses on documentation accuracy, code clarity, and verifying the correctness of storage option changes.
src/app/clusters/commodity-metering-server/CommodityMeteringTestEventTriggerHandler.h
Show resolved
Hide resolved
examples/energy-gateway-app/energy-gateway-common/energy-gateway-app.matter
Show resolved
Hide resolved
PR #39688: Size comparison from 230883d to af7daea Increases above 0.2%:
Full report (12 builds for cc13x4_26x4, cc32xx, nrfconnect, qpg, stm32)
|
PR #39688: Size comparison from 89257e3 to b54be9f Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
template <typename T> | ||
struct SpanCopier | ||
{ | ||
static bool Copy(const chip::Span<const T> & source, DataModel::List<const T> & destination, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static bool Copy(const chip::Span<const T> & source, DataModel::List<const T> & destination, | |
static bool Copy(const Span<const T> & source, DataModel::List<const T> & destination, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been marked as resolved? Change hasn't been applied?
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.h
Outdated
Show resolved
Hide resolved
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
examples/energy-gateway-app/energy-gateway-common/energy-gateway-app.matter
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
…server.cpp Co-authored-by: jamesharrow <93921463+jamesharrow@users.noreply.github.com>
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces the server-side implementation for the Commodity Metering cluster. The review identified a critical correctness issue: there is a discrepancy between the cluster attribute defined in the .matter
file (tariffUnit
) and the attribute implemented in the C++ source files (measurementType
). This affects the header, implementation, and ZCL JSON configuration files.
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/app_config_dependent_sources.cmake
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
…server.cpp Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
PR #39688: Size comparison from 00aa48e to 7f59d06 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces the server-side implementation for the Commodity Metering cluster, including source files, build configurations, and cluster definitions. The implementation uses C++ with an AttributeAccessInterface
for custom attribute handling. A potential issue regarding state consistency when setting MeteredQuantity has been identified.
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces the server-side implementation for the Commodity Metering cluster. The changes include adding the cluster definition, C++ implementation files for the server logic, and necessary build file updates. The new code is well-structured and follows the existing patterns for cluster implementation in the project. I have one suggestion to improve code conciseness by using an STL algorithm.
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All necessary corrections have been made.
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/commodity-metering-server/commodity-metering-server.cpp
Outdated
Show resolved
Hide resolved
PR #39688: Size comparison from 00aa48e to eb60713 Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please file an issue to track the issue around change to the MeasurementType / TariffUnitType.
examples/energy-gateway-app/energy-gateway-common/energy-gateway-app.matter
Show resolved
Hide resolved
template <typename T> | ||
struct SpanCopier | ||
{ | ||
static bool Copy(const chip::Span<const T> & source, DataModel::List<const T> & destination, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has this been marked as resolved? Change hasn't been applied?
Summary
This PR includes source files necessary to implement the server side of commodity metering cluster
Testing