Skip to content

Commit 6336713

Browse files
committed
Removing the Switch Cluster from the app
1 parent 9c82394 commit 6336713

File tree

4 files changed

+8
-361
lines changed

4 files changed

+8
-361
lines changed

examples/lighting-app/lighting-common/lighting-app.matter

-66
Original file line numberDiff line numberDiff line change
@@ -1668,62 +1668,6 @@ cluster EthernetNetworkDiagnostics = 55 {
16681668
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
16691669
}
16701670

1671-
/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
1672-
Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags.
1673-
Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */
1674-
cluster Switch = 59 {
1675-
revision 2;
1676-
1677-
bitmap Feature : bitmap32 {
1678-
kLatchingSwitch = 0x1;
1679-
kMomentarySwitch = 0x2;
1680-
kMomentarySwitchRelease = 0x4;
1681-
kMomentarySwitchLongPress = 0x8;
1682-
kMomentarySwitchMultiPress = 0x10;
1683-
kActionSwitch = 0x20;
1684-
}
1685-
1686-
info event SwitchLatched = 0 {
1687-
int8u newPosition = 0;
1688-
}
1689-
1690-
info event InitialPress = 1 {
1691-
int8u newPosition = 0;
1692-
}
1693-
1694-
info event LongPress = 2 {
1695-
int8u newPosition = 0;
1696-
}
1697-
1698-
info event ShortRelease = 3 {
1699-
int8u previousPosition = 0;
1700-
}
1701-
1702-
info event LongRelease = 4 {
1703-
int8u previousPosition = 0;
1704-
}
1705-
1706-
info event MultiPressOngoing = 5 {
1707-
int8u newPosition = 0;
1708-
int8u currentNumberOfPressesCounted = 1;
1709-
}
1710-
1711-
info event MultiPressComplete = 6 {
1712-
int8u previousPosition = 0;
1713-
int8u totalNumberOfPressesCounted = 1;
1714-
}
1715-
1716-
readonly attribute int8u numberOfPositions = 0;
1717-
readonly attribute int8u currentPosition = 1;
1718-
readonly attribute optional int8u multiPressMax = 2;
1719-
readonly attribute command_id generatedCommandList[] = 65528;
1720-
readonly attribute command_id acceptedCommandList[] = 65529;
1721-
readonly attribute event_id eventList[] = 65530;
1722-
readonly attribute attrib_id attributeList[] = 65531;
1723-
readonly attribute bitmap32 featureMap = 65532;
1724-
readonly attribute int16u clusterRevision = 65533;
1725-
}
1726-
17271671
/** Commands to trigger a Node to allow a new Administrator to commission it. */
17281672
cluster AdministratorCommissioning = 60 {
17291673
revision 1; // NOTE: Default/not specifically set
@@ -2257,16 +2201,6 @@ endpoint 0 {
22572201
handle command ResetCounts;
22582202
}
22592203

2260-
server cluster Switch {
2261-
ram attribute numberOfPositions default = 2;
2262-
ram attribute currentPosition;
2263-
callback attribute generatedCommandList;
2264-
callback attribute acceptedCommandList;
2265-
callback attribute attributeList;
2266-
ram attribute featureMap default = 0;
2267-
ram attribute clusterRevision default = 2;
2268-
}
2269-
22702204
server cluster AdministratorCommissioning {
22712205
callback attribute windowStatus;
22722206
callback attribute adminFabricIndex;

examples/lighting-app/lighting-common/lighting-app.zap

+8-130
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
"storageOption": "External",
188188
"singleton": 0,
189189
"bounded": 0,
190-
"defaultValue": "",
190+
"defaultValue": null,
191191
"reportable": 1,
192192
"minInterval": 1,
193193
"maxInterval": 65534,
@@ -203,7 +203,7 @@
203203
"storageOption": "External",
204204
"singleton": 0,
205205
"bounded": 0,
206-
"defaultValue": "",
206+
"defaultValue": null,
207207
"reportable": 1,
208208
"minInterval": 1,
209209
"maxInterval": 65534,
@@ -219,7 +219,7 @@
219219
"storageOption": "External",
220220
"singleton": 0,
221221
"bounded": 0,
222-
"defaultValue": "",
222+
"defaultValue": null,
223223
"reportable": 1,
224224
"minInterval": 1,
225225
"maxInterval": 65534,
@@ -235,7 +235,7 @@
235235
"storageOption": "External",
236236
"singleton": 0,
237237
"bounded": 0,
238-
"defaultValue": "",
238+
"defaultValue": null,
239239
"reportable": 1,
240240
"minInterval": 1,
241241
"maxInterval": 65534,
@@ -251,7 +251,7 @@
251251
"storageOption": "External",
252252
"singleton": 0,
253253
"bounded": 0,
254-
"defaultValue": "",
254+
"defaultValue": null,
255255
"reportable": 1,
256256
"minInterval": 1,
257257
"maxInterval": 65534,
@@ -267,7 +267,7 @@
267267
"storageOption": "External",
268268
"singleton": 0,
269269
"bounded": 0,
270-
"defaultValue": "",
270+
"defaultValue": null,
271271
"reportable": 1,
272272
"minInterval": 1,
273273
"maxInterval": 65534,
@@ -283,7 +283,7 @@
283283
"storageOption": "External",
284284
"singleton": 0,
285285
"bounded": 0,
286-
"defaultValue": "",
286+
"defaultValue": null,
287287
"reportable": 1,
288288
"minInterval": 1,
289289
"maxInterval": 65534,
@@ -315,7 +315,7 @@
315315
"storageOption": "External",
316316
"singleton": 0,
317317
"bounded": 0,
318-
"defaultValue": "",
318+
"defaultValue": null,
319319
"reportable": 1,
320320
"minInterval": 1,
321321
"maxInterval": 65534,
@@ -3107,128 +3107,6 @@
31073107
}
31083108
]
31093109
},
3110-
{
3111-
"name": "Switch",
3112-
"code": 59,
3113-
"mfgCode": null,
3114-
"define": "SWITCH_CLUSTER",
3115-
"side": "server",
3116-
"enabled": 1,
3117-
"attributes": [
3118-
{
3119-
"name": "NumberOfPositions",
3120-
"code": 0,
3121-
"mfgCode": null,
3122-
"side": "server",
3123-
"type": "int8u",
3124-
"included": 1,
3125-
"storageOption": "RAM",
3126-
"singleton": 0,
3127-
"bounded": 0,
3128-
"defaultValue": "2",
3129-
"reportable": 1,
3130-
"minInterval": 1,
3131-
"maxInterval": 65534,
3132-
"reportableChange": 0
3133-
},
3134-
{
3135-
"name": "CurrentPosition",
3136-
"code": 1,
3137-
"mfgCode": null,
3138-
"side": "server",
3139-
"type": "int8u",
3140-
"included": 1,
3141-
"storageOption": "RAM",
3142-
"singleton": 0,
3143-
"bounded": 0,
3144-
"defaultValue": "",
3145-
"reportable": 1,
3146-
"minInterval": 1,
3147-
"maxInterval": 65534,
3148-
"reportableChange": 0
3149-
},
3150-
{
3151-
"name": "GeneratedCommandList",
3152-
"code": 65528,
3153-
"mfgCode": null,
3154-
"side": "server",
3155-
"type": "array",
3156-
"included": 1,
3157-
"storageOption": "External",
3158-
"singleton": 0,
3159-
"bounded": 0,
3160-
"defaultValue": null,
3161-
"reportable": 1,
3162-
"minInterval": 1,
3163-
"maxInterval": 65534,
3164-
"reportableChange": 0
3165-
},
3166-
{
3167-
"name": "AcceptedCommandList",
3168-
"code": 65529,
3169-
"mfgCode": null,
3170-
"side": "server",
3171-
"type": "array",
3172-
"included": 1,
3173-
"storageOption": "External",
3174-
"singleton": 0,
3175-
"bounded": 0,
3176-
"defaultValue": null,
3177-
"reportable": 1,
3178-
"minInterval": 1,
3179-
"maxInterval": 65534,
3180-
"reportableChange": 0
3181-
},
3182-
{
3183-
"name": "AttributeList",
3184-
"code": 65531,
3185-
"mfgCode": null,
3186-
"side": "server",
3187-
"type": "array",
3188-
"included": 1,
3189-
"storageOption": "External",
3190-
"singleton": 0,
3191-
"bounded": 0,
3192-
"defaultValue": null,
3193-
"reportable": 1,
3194-
"minInterval": 1,
3195-
"maxInterval": 65534,
3196-
"reportableChange": 0
3197-
},
3198-
{
3199-
"name": "FeatureMap",
3200-
"code": 65532,
3201-
"mfgCode": null,
3202-
"side": "server",
3203-
"type": "bitmap32",
3204-
"included": 1,
3205-
"storageOption": "RAM",
3206-
"singleton": 0,
3207-
"bounded": 0,
3208-
"defaultValue": "0",
3209-
"reportable": 1,
3210-
"minInterval": 1,
3211-
"maxInterval": 65534,
3212-
"reportableChange": 0
3213-
},
3214-
{
3215-
"name": "ClusterRevision",
3216-
"code": 65533,
3217-
"mfgCode": null,
3218-
"side": "server",
3219-
"type": "int16u",
3220-
"included": 1,
3221-
"storageOption": "RAM",
3222-
"singleton": 0,
3223-
"bounded": 0,
3224-
"defaultValue": "2",
3225-
"reportable": 1,
3226-
"minInterval": 1,
3227-
"maxInterval": 65534,
3228-
"reportableChange": 0
3229-
}
3230-
]
3231-
},
32323110
{
32333111
"name": "Administrator Commissioning",
32343112
"code": 60,

0 commit comments

Comments
 (0)