Skip to content

Commit 522a0d6

Browse files
doublemis1ArekBalysNordic
authored andcommitted
samples: matter: fix data model
Fix data model for contact and temperature sensor. Signed-off-by: Michał Szablowski <[email protected]>
1 parent 7cf8578 commit 522a0d6

16 files changed

+90
-556
lines changed

samples/matter/contact_sensor/src/default_zap/contact_sensor.matter

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -802,22 +802,6 @@ cluster OtaSoftwareUpdateRequestor = 42 {
802802
command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0;
803803
}
804804

805-
/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
806-
may have differing common languages, units of measurements, and numerical formatting
807-
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
808-
they can be configured to use a user’s preferred language, units, etc */
809-
cluster LocalizationConfiguration = 43 {
810-
revision 1;
811-
812-
attribute access(write: manage) char_string<35> activeLocale = 0;
813-
readonly attribute char_string supportedLocales[] = 1;
814-
readonly attribute command_id generatedCommandList[] = 65528;
815-
readonly attribute command_id acceptedCommandList[] = 65529;
816-
readonly attribute attrib_id attributeList[] = 65531;
817-
readonly attribute bitmap32 featureMap = 65532;
818-
readonly attribute int16u clusterRevision = 65533;
819-
}
820-
821805
/** This cluster is used to manage global aspects of the Commissioning flow. */
822806
cluster GeneralCommissioning = 48 {
823807
revision 2;
@@ -1915,7 +1899,6 @@ endpoint 0 {
19151899
callback attribute capabilityMinima;
19161900
callback attribute specificationVersion;
19171901
callback attribute maxPathsPerInvoke;
1918-
ram attribute configurationVersion default = 1;
19191902
callback attribute generatedCommandList;
19201903
callback attribute acceptedCommandList;
19211904
callback attribute attributeList;
@@ -1940,16 +1923,6 @@ endpoint 0 {
19401923
handle command AnnounceOTAProvider;
19411924
}
19421925

1943-
server cluster LocalizationConfiguration {
1944-
ram attribute activeLocale;
1945-
callback attribute supportedLocales;
1946-
callback attribute generatedCommandList;
1947-
callback attribute acceptedCommandList;
1948-
callback attribute attributeList;
1949-
ram attribute featureMap default = 0;
1950-
ram attribute clusterRevision default = 1;
1951-
}
1952-
19531926
server cluster GeneralCommissioning {
19541927
ram attribute breadcrumb default = 0x0000000000000000;
19551928
callback attribute basicCommissioningInfo;
@@ -2212,7 +2185,6 @@ endpoint 1 {
22122185
ram attribute clusterRevision default = 6;
22132186

22142187
handle command Identify;
2215-
handle command TriggerEffect;
22162188
}
22172189

22182190
server cluster Descriptor {

samples/matter/contact_sensor/src/default_zap/contact_sensor.zap

Lines changed: 17 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
"singleton": 0,
108108
"bounded": 0,
109109
"defaultValue": null,
110-
"reportable": 0,
110+
"reportable": 1,
111111
"minInterval": 1,
112112
"maxInterval": 65534,
113113
"reportableChange": 0
@@ -123,7 +123,7 @@
123123
"singleton": 0,
124124
"bounded": 0,
125125
"defaultValue": null,
126-
"reportable": 0,
126+
"reportable": 1,
127127
"minInterval": 1,
128128
"maxInterval": 65534,
129129
"reportableChange": 0
@@ -139,7 +139,7 @@
139139
"singleton": 0,
140140
"bounded": 0,
141141
"defaultValue": null,
142-
"reportable": 0,
142+
"reportable": 1,
143143
"minInterval": 1,
144144
"maxInterval": 65534,
145145
"reportableChange": 0
@@ -245,7 +245,7 @@
245245
"singleton": 0,
246246
"bounded": 0,
247247
"defaultValue": null,
248-
"reportable": 0,
248+
"reportable": 1,
249249
"minInterval": 1,
250250
"maxInterval": 65534,
251251
"reportableChange": 0
@@ -415,7 +415,7 @@
415415
"singleton": 1,
416416
"bounded": 0,
417417
"defaultValue": null,
418-
"reportable": 0,
418+
"reportable": 1,
419419
"minInterval": 0,
420420
"maxInterval": 65344,
421421
"reportableChange": 0
@@ -431,7 +431,7 @@
431431
"singleton": 1,
432432
"bounded": 0,
433433
"defaultValue": null,
434-
"reportable": 0,
434+
"reportable": 1,
435435
"minInterval": 0,
436436
"maxInterval": 65344,
437437
"reportableChange": 0
@@ -447,7 +447,7 @@
447447
"singleton": 1,
448448
"bounded": 0,
449449
"defaultValue": null,
450-
"reportable": 0,
450+
"reportable": 1,
451451
"minInterval": 0,
452452
"maxInterval": 65344,
453453
"reportableChange": 0
@@ -463,7 +463,7 @@
463463
"singleton": 1,
464464
"bounded": 0,
465465
"defaultValue": null,
466-
"reportable": 0,
466+
"reportable": 1,
467467
"minInterval": 0,
468468
"maxInterval": 65344,
469469
"reportableChange": 0
@@ -479,7 +479,7 @@
479479
"singleton": 1,
480480
"bounded": 0,
481481
"defaultValue": null,
482-
"reportable": 0,
482+
"reportable": 1,
483483
"minInterval": 0,
484484
"maxInterval": 65344,
485485
"reportableChange": 0
@@ -495,7 +495,7 @@
495495
"singleton": 1,
496496
"bounded": 0,
497497
"defaultValue": "",
498-
"reportable": 0,
498+
"reportable": 1,
499499
"minInterval": 0,
500500
"maxInterval": 65344,
501501
"reportableChange": 0
@@ -511,7 +511,7 @@
511511
"singleton": 1,
512512
"bounded": 0,
513513
"defaultValue": null,
514-
"reportable": 0,
514+
"reportable": 1,
515515
"minInterval": 0,
516516
"maxInterval": 65344,
517517
"reportableChange": 0
@@ -527,7 +527,7 @@
527527
"singleton": 1,
528528
"bounded": 0,
529529
"defaultValue": null,
530-
"reportable": 0,
530+
"reportable": 1,
531531
"minInterval": 0,
532532
"maxInterval": 65344,
533533
"reportableChange": 0
@@ -543,7 +543,7 @@
543543
"singleton": 1,
544544
"bounded": 0,
545545
"defaultValue": null,
546-
"reportable": 0,
546+
"reportable": 1,
547547
"minInterval": 0,
548548
"maxInterval": 65344,
549549
"reportableChange": 0
@@ -559,7 +559,7 @@
559559
"singleton": 1,
560560
"bounded": 0,
561561
"defaultValue": null,
562-
"reportable": 0,
562+
"reportable": 1,
563563
"minInterval": 0,
564564
"maxInterval": 65344,
565565
"reportableChange": 0
@@ -575,7 +575,7 @@
575575
"singleton": 1,
576576
"bounded": 0,
577577
"defaultValue": null,
578-
"reportable": 0,
578+
"reportable": 1,
579579
"minInterval": 0,
580580
"maxInterval": 65344,
581581
"reportableChange": 0
@@ -676,22 +676,6 @@
676676
"maxInterval": 65534,
677677
"reportableChange": 0
678678
},
679-
{
680-
"name": "ConfigurationVersion",
681-
"code": 24,
682-
"mfgCode": null,
683-
"side": "server",
684-
"type": "int32u",
685-
"included": 1,
686-
"storageOption": "RAM",
687-
"singleton": 1,
688-
"bounded": 0,
689-
"defaultValue": "1",
690-
"reportable": 1,
691-
"minInterval": 1,
692-
"maxInterval": 65534,
693-
"reportableChange": 0
694-
},
695679
{
696680
"name": "GeneratedCommandList",
697681
"code": 65528,
@@ -1034,128 +1018,6 @@
10341018
}
10351019
]
10361020
},
1037-
{
1038-
"name": "Localization Configuration",
1039-
"code": 43,
1040-
"mfgCode": null,
1041-
"define": "LOCALIZATION_CONFIGURATION_CLUSTER",
1042-
"side": "server",
1043-
"enabled": 1,
1044-
"attributes": [
1045-
{
1046-
"name": "ActiveLocale",
1047-
"code": 0,
1048-
"mfgCode": null,
1049-
"side": "server",
1050-
"type": "char_string",
1051-
"included": 1,
1052-
"storageOption": "RAM",
1053-
"singleton": 0,
1054-
"bounded": 0,
1055-
"defaultValue": "",
1056-
"reportable": 1,
1057-
"minInterval": 1,
1058-
"maxInterval": 65534,
1059-
"reportableChange": 0
1060-
},
1061-
{
1062-
"name": "SupportedLocales",
1063-
"code": 1,
1064-
"mfgCode": null,
1065-
"side": "server",
1066-
"type": "array",
1067-
"included": 1,
1068-
"storageOption": "External",
1069-
"singleton": 0,
1070-
"bounded": 0,
1071-
"defaultValue": "",
1072-
"reportable": 1,
1073-
"minInterval": 1,
1074-
"maxInterval": 65534,
1075-
"reportableChange": 0
1076-
},
1077-
{
1078-
"name": "GeneratedCommandList",
1079-
"code": 65528,
1080-
"mfgCode": null,
1081-
"side": "server",
1082-
"type": "array",
1083-
"included": 1,
1084-
"storageOption": "External",
1085-
"singleton": 0,
1086-
"bounded": 0,
1087-
"defaultValue": "",
1088-
"reportable": 1,
1089-
"minInterval": 1,
1090-
"maxInterval": 65534,
1091-
"reportableChange": 0
1092-
},
1093-
{
1094-
"name": "AcceptedCommandList",
1095-
"code": 65529,
1096-
"mfgCode": null,
1097-
"side": "server",
1098-
"type": "array",
1099-
"included": 1,
1100-
"storageOption": "External",
1101-
"singleton": 0,
1102-
"bounded": 0,
1103-
"defaultValue": "",
1104-
"reportable": 1,
1105-
"minInterval": 1,
1106-
"maxInterval": 65534,
1107-
"reportableChange": 0
1108-
},
1109-
{
1110-
"name": "AttributeList",
1111-
"code": 65531,
1112-
"mfgCode": null,
1113-
"side": "server",
1114-
"type": "array",
1115-
"included": 1,
1116-
"storageOption": "External",
1117-
"singleton": 0,
1118-
"bounded": 0,
1119-
"defaultValue": "",
1120-
"reportable": 1,
1121-
"minInterval": 1,
1122-
"maxInterval": 65534,
1123-
"reportableChange": 0
1124-
},
1125-
{
1126-
"name": "FeatureMap",
1127-
"code": 65532,
1128-
"mfgCode": null,
1129-
"side": "server",
1130-
"type": "bitmap32",
1131-
"included": 1,
1132-
"storageOption": "RAM",
1133-
"singleton": 0,
1134-
"bounded": 0,
1135-
"defaultValue": "0",
1136-
"reportable": 1,
1137-
"minInterval": 1,
1138-
"maxInterval": 65534,
1139-
"reportableChange": 0
1140-
},
1141-
{
1142-
"name": "ClusterRevision",
1143-
"code": 65533,
1144-
"mfgCode": null,
1145-
"side": "server",
1146-
"type": "int16u",
1147-
"included": 1,
1148-
"storageOption": "RAM",
1149-
"singleton": 0,
1150-
"bounded": 0,
1151-
"defaultValue": "1",
1152-
"reportable": 1,
1153-
"minInterval": 1,
1154-
"maxInterval": 65534,
1155-
"reportableChange": 0
1156-
}
1157-
]
1158-
},
11591021
{
11601022
"name": "General Commissioning",
11611023
"code": 48,
@@ -1901,7 +1763,7 @@
19011763
"singleton": 0,
19021764
"bounded": 0,
19031765
"defaultValue": null,
1904-
"reportable": 0,
1766+
"reportable": 1,
19051767
"minInterval": 1,
19061768
"maxInterval": 65534,
19071769
"reportableChange": 0
@@ -4264,14 +4126,6 @@
42644126
"source": "client",
42654127
"isIncoming": 1,
42664128
"isEnabled": 1
4267-
},
4268-
{
4269-
"name": "TriggerEffect",
4270-
"code": 64,
4271-
"mfgCode": null,
4272-
"source": "client",
4273-
"isIncoming": 1,
4274-
"isEnabled": 1
42754129
}
42764130
],
42774131
"attributes": [
@@ -4670,4 +4524,4 @@
46704524
"parentEndpointIdentifier": null
46714525
}
46724526
]
4673-
}
4527+
}

samples/matter/contact_sensor/src/default_zap/zap-generated/IMClusterCommandHandler.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,6 @@ namespace app
252252
}
253253
break;
254254
}
255-
case Commands::TriggerEffect::Id: {
256-
Commands::TriggerEffect::DecodableType commandData;
257-
TLVError = DataModel::Decode(aDataTlv, commandData);
258-
if (TLVError == CHIP_NO_ERROR) {
259-
wasHandled = emberAfIdentifyClusterTriggerEffectCallback(
260-
apCommandObj, aCommandPath, commandData);
261-
}
262-
break;
263-
}
264255
default: {
265256
// Unrecognized command ID, error status will apply.
266257
ChipLogError(Zcl,

0 commit comments

Comments
 (0)