Skip to content

Commit

Permalink
Add chime server to build
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarcosb committed Feb 3, 2025
1 parent fdae1ae commit ba5a771
Show file tree
Hide file tree
Showing 6 changed files with 452 additions and 823 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6991,6 +6991,28 @@ cluster LowPower = 1288 {
command Sleep(): DefaultSuccess = 0;
}

/** This cluster provides facilities to configure and play Chime sounds, such as those used in a doorbell. */
provisional cluster Chime = 1366 {
revision 1;

struct ChimeSoundStruct {
int8u chimeID = 0;
char_string<48> name = 1;
}

readonly attribute ChimeSoundStruct installedChimeSounds[] = 0;
attribute int8u activeChimeID = 1;
attribute boolean enabled = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command PlayChimeSound(): DefaultSuccess = 0;
}

/** The Test Cluster is meant to validate the generated code */
internal cluster UnitTesting = 4294048773 {
revision 1; // NOTE: Default/not specifically set
Expand Down Expand Up @@ -9255,6 +9277,19 @@ endpoint 1 {
handle command Sleep;
}

server cluster Chime {
callback attribute installedChimeSounds;
callback attribute activeChimeID;
callback attribute enabled;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;

handle command PlayChimeSound;
}

server cluster UnitTesting {
emits event TestEvent;
emits event TestFabricScopedEvent;
Expand Down
159 changes: 154 additions & 5 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"fileFormat": 2,
"featureLevel": 104,
"featureLevel": 106,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -18047,10 +18047,10 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "10",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -20860,6 +20860,155 @@
}
]
},
{
"name": "Chime",
"code": 1366,
"mfgCode": null,
"define": "CHIME_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "PlayChimeSound",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "InstalledChimeSounds",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ActiveChimeID",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "Enabled",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Unit Testing",
"code": 4294048773,
Expand Down Expand Up @@ -23924,10 +24073,10 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "10",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Loading

0 comments on commit ba5a771

Please sign in to comment.