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

Chime Cluster Definition and server code #35729

Closed
wants to merge 1 commit into from

Conversation

andyg-apple
Copy link
Contributor

Chime cluster definition and server code

Copy link

semanticdiff-com bot commented Sep 23, 2024

Review changes with SemanticDiff.

Analyzed 3 of 10 files.

Filename Status
src/controller/data_model/controller-clusters.zap Unsupported file format
✔️ src/app/zap_cluster_list.json Analyzed
✔️ src/app/zap-templates/zcl/zcl-with-test-extensions.json Analyzed
✔️ src/app/zap-templates/zcl/zcl.json Analyzed
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml Unsupported file format
src/app/common/templates/config-data.yaml Unsupported file format
src/app/clusters/chime-server/chime-server.cpp Unsupported file format
src/app/clusters/chime-server/chime-server.h Unsupported file format
scripts/rules.matterlint Unsupported file format
.github/workflows/tests.yaml Unsupported file format

@CLAassistant
Copy link

CLAassistant commented Sep 23, 2024

CLA assistant check
All committers have signed the CLA.

@andyg-apple
Copy link
Contributor Author

Will add generated code in second commit as soon as I get some feedback on this.

Copy link

github-actions bot commented Sep 23, 2024

PR #35729: Size comparison from 8750c55 to 4d9380a

Full report (33 builds for cc13x4_26x4, cyw30739, efr32, nxp, psoc6)
platform target config section 8750c55 4d9380a change % change
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 829380 829380 0 0.0
RAM 123300 123300 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 814352 814352 0 0.0
RAM 125172 125172 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 760428 760428 0 0.0
RAM 113664 113664 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 744664 744664 0 0.0
RAM 113856 113856 0 0.0
cyw30739 light CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 677765 677765 0 0.0
RAM 78516 78516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 697617 697617 0 0.0
RAM 81148 81148 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 697617 697617 0 0.0
RAM 81148 81148 0 0.0
CYW930739M2EVB-02 unknown 2040 2040 0 0.0
FLASH 654553 654553 0 0.0
RAM 73584 73584 0 0.0
light-switch CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 613837 613837 0 0.0
RAM 71468 71468 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 633473 633473 0 0.0
RAM 74020 74020 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 633473 633473 0 0.0
RAM 74020 74020 0 0.0
lock CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 633061 633061 0 0.0
RAM 74516 74516 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 652769 652769 0 0.0
RAM 77068 77068 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 652769 652769 0 0.0
RAM 77068 77068 0 0.0
thermostat CYW30739B2-P5-EVK-01 unknown 2040 2040 0 0.0
FLASH 608469 608469 0 0.0
RAM 68604 68604 0 0.0
CYW30739B2-P5-EVK-02 unknown 2040 2040 0 0.0
FLASH 628329 628329 0 0.0
RAM 71236 71236 0 0.0
CYW30739B2-P5-EVK-03 unknown 2040 2040 0 0.0
FLASH 628329 628329 0 0.0
RAM 71236 71236 0 0.0
efr32 lighting-app BRD4187C FLASH 933324 933324 0 0.0
RAM 135084 135084 0 0.0
lock-app BRD2605a FLASH 740728 740720 -8 -0.0
RAM 231220 231220 0 0.0
BRD4338a FLASH 741376 741368 -8 -0.0
RAM 231252 231252 0 0.0
window-app BRD4187C FLASH 1016376 1016368 -8 -0.0
RAM 127004 127004 0 0.0
nxp contact k32w0+release FLASH 581760 581760 0 0.0
RAM 70776 70776 0 0.0
k32w1+release FLASH 594376 594376 0 0.0
RAM 62944 62944 0 0.0
mcxw71+release FLASH 594128 594128 0 0.0
RAM 62944 62944 0 0.0
light k32w0+release FLASH 617812 617812 0 0.0
RAM 70248 70248 0 0.0
k32w1+release FLASH 681008 681008 0 0.0
RAM 48584 48584 0 0.0
mcxw71+release FLASH 681024 681024 0 0.0
RAM 48584 48584 0 0.0
lock k32w1+release FLASH 702984 702984 0 0.0
RAM 67084 67084 0 0.0
mcxw71+release FLASH 703008 703008 0 0.0
RAM 67084 67084 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1645332 1645332 0 0.0
RAM 210888 210888 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1551332 1551332 0 0.0
RAM 207688 207688 0 0.0
light cy8ckit_062s2_43012 FLASH 1467148 1467148 0 0.0
RAM 200696 200696 0 0.0
lock cy8ckit_062s2_43012 FLASH 1463764 1463764 0 0.0
RAM 225048 225048 0 0.0

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, the implementation would be a separate PR from adding the XML.

return aEncoder.Encode(mDelegate.GetInstalledChimeSounds());

case ActiveChimeSoundId::Id:
return aEncoder.Encode(mDelegate.GetActiveChimeSoundId());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if the simple things that can be stored in the cluster were stored there, so we can mark things dirty properly on changes.

return CHIP_NO_ERROR;
}

CHIP_ERROR ChimeServer::SetEnabled(bool enabled)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, but the write path is not calling this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that's an error

virtual ~ChimeDelegate() = default;

// Get Attribute Methods
virtual DataModel::List<const Chime::Structs::ChimeSoundStruct::Type>& GetInstalledChimeSounds() = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the lifetime of the buffer backing that list? How does the delegate know to not deallocate it?

Also, it it intentional that this implementation does not allow chunking the list?

<item name="Name" type="char_string" max="48"/>
</struct>

<cluster apiMaturity="provisional">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is the spec for this? I don't see it in the Matter appclusters spec on "master"....

It's impossible to review this XML without the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's in the Cameras branch

@gmarcosb
Copy link
Contributor

gmarcosb commented Oct 2, 2024

FYI chime cluster PR went in @ #35806

Apologies did not realize you were working on this as well or would've reached out - started a chat on slack so we can coordinate

@mergify mergify bot added the conflict label Oct 2, 2024
@andyg-apple andyg-apple closed this Oct 3, 2024
@mergify mergify bot removed the conflict label Oct 3, 2024
@bzbarsky-apple bzbarsky-apple mentioned this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants