Skip to content

Commit 1bf3b39

Browse files
committed
Add chime cluster to tests
1 parent 2b42761 commit 1bf3b39

File tree

5 files changed

+520
-783
lines changed

5 files changed

+520
-783
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+35
Original file line numberDiff line numberDiff line change
@@ -7014,6 +7014,28 @@ cluster LowPower = 1288 {
70147014
command Sleep(): DefaultSuccess = 0;
70157015
}
70167016

7017+
/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
7018+
provisional cluster Chime = 1366 {
7019+
revision 1;
7020+
7021+
struct ChimeSoundStruct {
7022+
int8u chimeID = 0;
7023+
char_string<48> name = 1;
7024+
}
7025+
7026+
readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
7027+
attribute int8u selectedChime = 1;
7028+
attribute boolean enabled = 2;
7029+
readonly attribute command_id generatedCommandList[] = 65528;
7030+
readonly attribute command_id acceptedCommandList[] = 65529;
7031+
readonly attribute event_id eventList[] = 65530;
7032+
readonly attribute attrib_id attributeList[] = 65531;
7033+
readonly attribute bitmap32 featureMap = 65532;
7034+
readonly attribute int16u clusterRevision = 65533;
7035+
7036+
command PlayChimeSound(): DefaultSuccess = 0;
7037+
}
7038+
70177039
/** The Test Cluster is meant to validate the generated code */
70187040
internal cluster UnitTesting = 4294048773 {
70197041
revision 1; // NOTE: Default/not specifically set
@@ -9278,6 +9300,19 @@ endpoint 1 {
92789300
handle command Sleep;
92799301
}
92809302

9303+
server cluster Chime {
9304+
callback attribute installedChimeSounds;
9305+
callback attribute selectedChime;
9306+
callback attribute enabled;
9307+
callback attribute generatedCommandList;
9308+
callback attribute acceptedCommandList;
9309+
callback attribute attributeList;
9310+
ram attribute featureMap default = 0;
9311+
ram attribute clusterRevision default = 1;
9312+
9313+
handle command PlayChimeSound;
9314+
}
9315+
92819316
server cluster UnitTesting {
92829317
emits event TestEvent;
92839318
emits event TestFabricScopedEvent;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+154-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"fileFormat": 2,
3-
"featureLevel": 104,
3+
"featureLevel": 106,
44
"creator": "zap",
55
"keyValuePairs": [
66
{
@@ -18047,10 +18047,10 @@
1804718047
"side": "server",
1804818048
"type": "int16u",
1804918049
"included": 1,
18050-
"storageOption": "RAM",
18050+
"storageOption": "External",
1805118051
"singleton": 0,
1805218052
"bounded": 0,
18053-
"defaultValue": "10",
18053+
"defaultValue": null,
1805418054
"reportable": 1,
1805518055
"minInterval": 1,
1805618056
"maxInterval": 65534,
@@ -20860,6 +20860,155 @@
2086020860
}
2086120861
]
2086220862
},
20863+
{
20864+
"name": "Chime",
20865+
"code": 1366,
20866+
"mfgCode": null,
20867+
"define": "CHIME_CLUSTER",
20868+
"side": "server",
20869+
"enabled": 1,
20870+
"apiMaturity": "provisional",
20871+
"commands": [
20872+
{
20873+
"name": "PlayChimeSound",
20874+
"code": 0,
20875+
"mfgCode": null,
20876+
"source": "client",
20877+
"isIncoming": 1,
20878+
"isEnabled": 1
20879+
}
20880+
],
20881+
"attributes": [
20882+
{
20883+
"name": "InstalledChimeSounds",
20884+
"code": 0,
20885+
"mfgCode": null,
20886+
"side": "server",
20887+
"type": "array",
20888+
"included": 1,
20889+
"storageOption": "External",
20890+
"singleton": 0,
20891+
"bounded": 0,
20892+
"defaultValue": null,
20893+
"reportable": 1,
20894+
"minInterval": 1,
20895+
"maxInterval": 65534,
20896+
"reportableChange": 0
20897+
},
20898+
{
20899+
"name": "SelectedChime",
20900+
"code": 1,
20901+
"mfgCode": null,
20902+
"side": "server",
20903+
"type": "int8u",
20904+
"included": 1,
20905+
"storageOption": "External",
20906+
"singleton": 0,
20907+
"bounded": 0,
20908+
"defaultValue": null,
20909+
"reportable": 1,
20910+
"minInterval": 1,
20911+
"maxInterval": 65534,
20912+
"reportableChange": 0
20913+
},
20914+
{
20915+
"name": "Enabled",
20916+
"code": 2,
20917+
"mfgCode": null,
20918+
"side": "server",
20919+
"type": "boolean",
20920+
"included": 1,
20921+
"storageOption": "External",
20922+
"singleton": 0,
20923+
"bounded": 0,
20924+
"defaultValue": null,
20925+
"reportable": 1,
20926+
"minInterval": 1,
20927+
"maxInterval": 65534,
20928+
"reportableChange": 0
20929+
},
20930+
{
20931+
"name": "GeneratedCommandList",
20932+
"code": 65528,
20933+
"mfgCode": null,
20934+
"side": "server",
20935+
"type": "array",
20936+
"included": 1,
20937+
"storageOption": "External",
20938+
"singleton": 0,
20939+
"bounded": 0,
20940+
"defaultValue": null,
20941+
"reportable": 1,
20942+
"minInterval": 1,
20943+
"maxInterval": 65534,
20944+
"reportableChange": 0
20945+
},
20946+
{
20947+
"name": "AcceptedCommandList",
20948+
"code": 65529,
20949+
"mfgCode": null,
20950+
"side": "server",
20951+
"type": "array",
20952+
"included": 1,
20953+
"storageOption": "External",
20954+
"singleton": 0,
20955+
"bounded": 0,
20956+
"defaultValue": null,
20957+
"reportable": 1,
20958+
"minInterval": 1,
20959+
"maxInterval": 65534,
20960+
"reportableChange": 0
20961+
},
20962+
{
20963+
"name": "AttributeList",
20964+
"code": 65531,
20965+
"mfgCode": null,
20966+
"side": "server",
20967+
"type": "array",
20968+
"included": 1,
20969+
"storageOption": "External",
20970+
"singleton": 0,
20971+
"bounded": 0,
20972+
"defaultValue": null,
20973+
"reportable": 1,
20974+
"minInterval": 1,
20975+
"maxInterval": 65534,
20976+
"reportableChange": 0
20977+
},
20978+
{
20979+
"name": "FeatureMap",
20980+
"code": 65532,
20981+
"mfgCode": null,
20982+
"side": "server",
20983+
"type": "bitmap32",
20984+
"included": 1,
20985+
"storageOption": "RAM",
20986+
"singleton": 0,
20987+
"bounded": 0,
20988+
"defaultValue": "0",
20989+
"reportable": 1,
20990+
"minInterval": 1,
20991+
"maxInterval": 65534,
20992+
"reportableChange": 0
20993+
},
20994+
{
20995+
"name": "ClusterRevision",
20996+
"code": 65533,
20997+
"mfgCode": null,
20998+
"side": "server",
20999+
"type": "int16u",
21000+
"included": 1,
21001+
"storageOption": "RAM",
21002+
"singleton": 0,
21003+
"bounded": 0,
21004+
"defaultValue": "1",
21005+
"reportable": 1,
21006+
"minInterval": 1,
21007+
"maxInterval": 65534,
21008+
"reportableChange": 0
21009+
}
21010+
]
21011+
},
2086321012
{
2086421013
"name": "Unit Testing",
2086521014
"code": 4294048773,
@@ -23924,10 +24073,10 @@
2392424073
"side": "server",
2392524074
"type": "int16u",
2392624075
"included": 1,
23927-
"storageOption": "RAM",
24076+
"storageOption": "External",
2392824077
"singleton": 0,
2392924078
"bounded": 0,
23930-
"defaultValue": "10",
24079+
"defaultValue": null,
2393124080
"reportable": 1,
2393224081
"minInterval": 1,
2393324082
"maxInterval": 65534,

0 commit comments

Comments
 (0)