Skip to content

Commit 2490a24

Browse files
committed
Add chime cluster to tests
1 parent 4242e6a commit 2490a24

File tree

4 files changed

+78
-4
lines changed

4 files changed

+78
-4
lines changed

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

+23
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
@@ -8063,6 +8085,7 @@ endpoint 1 {
80638085
device type ma_onofflight = 256, version 1;
80648086

80658087
binding cluster OnOff;
8088+
binding cluster Chime;
80668089

80678090
server cluster Identify {
80688091
ram attribute identifyTime default = 0x0000;

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

+19
Original file line numberDiff line numberDiff line change
@@ -20860,6 +20860,25 @@
2086020860
}
2086120861
]
2086220862
},
20863+
{
20864+
"name": "Chime",
20865+
"code": 1366,
20866+
"mfgCode": null,
20867+
"define": "CHIME_CLUSTER",
20868+
"side": "client",
20869+
"enabled": 1,
20870+
"apiMaturity": "provisional",
20871+
"commands": [
20872+
{
20873+
"name": "PlayChimeSound",
20874+
"code": 0,
20875+
"mfgCode": null,
20876+
"source": "client",
20877+
"isIncoming": 0,
20878+
"isEnabled": 1
20879+
}
20880+
]
20881+
},
2086320882
{
2086420883
"name": "Unit Testing",
2086520884
"code": 4294048773,

scripts/tools/zap/tests/inputs/all-clusters-app.zap

+19
Original file line numberDiff line numberDiff line change
@@ -21069,6 +21069,25 @@
2106921069
}
2107021070
]
2107121071
},
21072+
{
21073+
"name": "Chime",
21074+
"code": 1366,
21075+
"mfgCode": null,
21076+
"define": "CHIME_CLUSTER",
21077+
"side": "client",
21078+
"enabled": 1,
21079+
"apiMaturity": "provisional",
21080+
"commands": [
21081+
{
21082+
"name": "PlayChimeSound",
21083+
"code": 0,
21084+
"mfgCode": null,
21085+
"source": "client",
21086+
"isIncoming": 0,
21087+
"isEnabled": 1
21088+
}
21089+
]
21090+
},
2107221091
{
2107321092
"name": "Unit Testing",
2107421093
"code": 4294048773,

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h

+17-4
Original file line numberDiff line numberDiff line change
@@ -2960,7 +2960,7 @@
29602960
// clang-format on
29612961

29622962
// This is an array of EmberAfCluster structures.
2963-
#define GENERATED_CLUSTER_COUNT 107
2963+
#define GENERATED_CLUSTER_COUNT 108
29642964
// clang-format off
29652965
#define GENERATED_CLUSTERS { \
29662966
{ \
@@ -4224,6 +4224,19 @@
42244224
.eventList = nullptr, \
42254225
.eventCount = 0, \
42264226
},\
4227+
{ \
4228+
/* Endpoint: 1, Cluster: Chime (client) */ \
4229+
.clusterId = 0x00000556, \
4230+
.attributes = ZAP_ATTRIBUTE_INDEX(882), \
4231+
.attributeCount = 0, \
4232+
.clusterSize = 0, \
4233+
.mask = ZAP_CLUSTER_MASK(CLIENT), \
4234+
.functions = NULL, \
4235+
.acceptedCommandList = nullptr, \
4236+
.generatedCommandList = nullptr, \
4237+
.eventList = nullptr, \
4238+
.eventCount = 0, \
4239+
},\
42274240
{ \
42284241
/* Endpoint: 1, Cluster: Unit Testing (server) */ \
42294242
.clusterId = 0xFFF1FC05, \
@@ -4364,9 +4377,9 @@
43644377
#define GENERATED_ENDPOINT_TYPES \
43654378
{ \
43664379
{ ZAP_CLUSTER_INDEX(0), 28, 340 }, \
4367-
{ ZAP_CLUSTER_INDEX(28), 70, 3457 }, \
4368-
{ ZAP_CLUSTER_INDEX(98), 7, 122 }, \
4369-
{ ZAP_CLUSTER_INDEX(105), 2, 0 }, \
4380+
{ ZAP_CLUSTER_INDEX(28), 71, 3457 }, \
4381+
{ ZAP_CLUSTER_INDEX(99), 7, 122 }, \
4382+
{ ZAP_CLUSTER_INDEX(106), 2, 0 }, \
43704383
}
43714384

43724385
// Largest attribute size is needed for various buffers

0 commit comments

Comments
 (0)