diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index 2737de15bd9bac..4a7f1ef868a564 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -57,7 +57,7 @@ jobs: - name: Build Android CHIPTool and CHIPTest run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64,x64,x86}-chip-*' build" + "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64}-chip-*' build" # - name: Build Android Studio build (arm64 only) # run: | # ./scripts/run_in_build_env.sh \ diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 356c268b426e2c..346b957eef0915 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -1993,7 +1993,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } @@ -2084,8 +2084,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -2093,6 +2099,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 94a3240c27969d..90ddac7d87f30d 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -4355,6 +4355,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, @@ -7204,9 +7219,9 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-onofflight", + "deviceTypeName": "MA-onofflight", + "deviceTypeCode": 256, "deviceTypeProfileId": 259, "clusters": [ { @@ -17119,9 +17134,9 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-onofflight", + "deviceTypeName": "MA-onofflight", + "deviceTypeCode": 256, "deviceTypeProfileId": 259, "clusters": [ { @@ -20121,22 +20136,22 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 256 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-onofflight", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 256 } ] } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 6abc2132aef81d..ddd6e5aa774c0b 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -536,8 +536,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -545,6 +551,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 074fef3c6e5c3b..ceab47a82bb9be 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -2918,6 +2918,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 7592969a5c1ad0..a7f619a272e723 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -531,9 +531,7 @@ void registerCluster{{asUpperCamelCase name}}(Commands & commands) {{/unless}} {{/if}} {{#if isReportableAttribute}} - {{#unless isList}} make_unique(), // - {{/unless}} {{/if}} {{/unless}} {{/chip_server_cluster_attributes}} diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter index a17375273c3804..bf9cf949b58598 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -764,8 +764,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -773,6 +779,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.zap b/examples/door-lock-app/door-lock-common/door-lock-app.zap index e0811fbe202f99..1a7e40362e00b4 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.zap +++ b/examples/door-lock-app/door-lock-common/door-lock-app.zap @@ -3885,6 +3885,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index f3d50e818d6539..171e7e5a007b80 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -905,7 +905,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } @@ -1021,8 +1021,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1030,6 +1036,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 5c63eaa227ffbb..fb1e68cb44bec1 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4143,6 +4143,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 84d262705aecd7..7532bacd2ec4cd 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -460,8 +460,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -469,6 +475,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index 0365ec7275c95e..08b8f6614b3cbb 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -3885,6 +3885,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 26b27cec7ec189..14cc12df34dd4f 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -235,7 +235,7 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 8eb9a8c353ca5e..ddbfa409249eac 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -272,8 +272,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -281,6 +287,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index f806fa5a73f4f7..c447385b451e87 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -1721,6 +1721,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 4485b6a62fb446..54297ead8c3081 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -337,7 +337,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } @@ -372,8 +372,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -381,6 +387,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index 364b27439619af..9f9ca70a12c219 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -1820,6 +1820,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 9e6d4c76de6595..7b98010fc6b7e8 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -507,7 +507,7 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 9e6d4c76de6595..7b98010fc6b7e8 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -507,7 +507,7 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 4eacd54a554f8e..b2b32538b778d0 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -511,8 +511,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -520,6 +526,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 547b2575f3240a..27899b8e60278c 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -3661,6 +3661,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index db119720311342..ec61c1d6707e04 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -531,8 +531,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -540,6 +546,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index dac6c8c62b9387..a3f8134ecae07f 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -3661,6 +3661,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 5f8211282cb81b..529df2e7ecdc0e 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -425,8 +425,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -434,6 +440,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap index 34c598b17e0028..018ede5303867b 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.zap @@ -2274,6 +2274,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, @@ -2471,10 +2486,10 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", + "name": "MA-tempsensor", + "deviceTypeName": "MA-tempsensor", "deviceTypeCode": 22, - "deviceTypeProfileId": 259, + "deviceTypeProfileId": 770, "clusters": [ { "name": "Power Configuration", @@ -3400,13 +3415,13 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-tempsensor", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 770 } ] -} \ No newline at end of file +} diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 08eca0ca4cf9bc..d2f5fbc5f200df 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -684,8 +684,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -693,6 +699,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index c4f33595c982f9..705464718d4a8c 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -3991,6 +3991,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 2fe7cdb1b20283..d3d7be4a065728 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1330,8 +1330,14 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1339,6 +1345,7 @@ client cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; @@ -1421,8 +1428,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1430,6 +1443,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 819488c416eb25..437564af70bcc5 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -4006,6 +4006,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 9eaa57e2469a8c..97cf3ae2725405 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1852,8 +1852,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -1861,6 +1867,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index 18c2a7b5f589a4..e9050524569460 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -3991,6 +3991,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, @@ -6536,9 +6551,9 @@ ] }, { - "name": "MA-rootdevice", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-videoplayer", + "deviceTypeName": "MA-videoplayer", + "deviceTypeCode": 35, "deviceTypeProfileId": 259, "clusters": [ { @@ -13559,9 +13574,9 @@ ] }, { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, + "name": "MA-occupancysensor", + "deviceTypeName": "MA-occupancysensor", + "deviceTypeCode": 263, "deviceTypeProfileId": 259, "clusters": [ { @@ -16486,22 +16501,22 @@ "deviceIdentifier": 22 }, { - "endpointTypeName": "MA-rootdevice", + "endpointTypeName": "MA-videoplayer", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 35 }, { - "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeName": "MA-occupancysensor", "endpointTypeIndex": 2, "profileId": 259, "endpointId": 2, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 22 + "deviceIdentifier": 263 } ] -} +} \ No newline at end of file diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 27bcf329edef5f..c507b646f7d70f 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -453,8 +453,14 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -462,6 +468,7 @@ server cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 847536871850f5..11b170b5edaf53 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -3666,6 +3666,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index aa4f268b21604c..3842fbd4eb0d47 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -70,12 +70,40 @@ class OperationalCredentialsAttrAccess : public AttributeAccessInterface CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; private: + CHIP_ERROR ReadNOCs(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadSupportedFabrics(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadCommissionedFabrics(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadFabricsList(EndpointId endpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR ReadRootCertificates(EndpointId endpoint, AttributeValueEncoder & aEncoder); }; +CHIP_ERROR OperationalCredentialsAttrAccess::ReadNOCs(EndpointId endpoint, AttributeValueEncoder & aEncoder) +{ + auto accessingFabricIndex = aEncoder.AccessingFabricIndex(); + + return aEncoder.EncodeList([accessingFabricIndex](const auto & encoder) -> CHIP_ERROR { + for (auto & fabricInfo : Server::GetInstance().GetFabricTable()) + { + Clusters::OperationalCredentials::Structs::NOCStruct::Type noc; + + if (!fabricInfo.IsInitialized()) + continue; + + noc.fabricIndex = fabricInfo.GetFabricIndex(); + + if (accessingFabricIndex == fabricInfo.GetFabricIndex()) + { + ReturnErrorOnFailure(fabricInfo.GetNOCCert(noc.noc)); + ReturnErrorOnFailure(fabricInfo.GetICACert(noc.icac)); + } + + ReturnErrorOnFailure(encoder.Encode(noc)); + } + + return CHIP_NO_ERROR; + }); +} + CHIP_ERROR OperationalCredentialsAttrAccess::ReadSupportedFabrics(EndpointId endpoint, AttributeValueEncoder & aEncoder) { uint8_t fabricCount = CHIP_CONFIG_MAX_DEVICE_ADMINS; @@ -142,6 +170,9 @@ CHIP_ERROR OperationalCredentialsAttrAccess::Read(const ConcreteReadAttributePat switch (aPath.mAttributeId) { + case Attributes::NOCs::Id: { + return ReadNOCs(aPath.mEndpointId, aEncoder); + } case Attributes::SupportedFabrics::Id: { return ReadSupportedFabrics(aPath.mEndpointId, aEncoder); } @@ -453,6 +484,9 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co err = Server::GetInstance().GetFabricTable().Store(fabricIndex); VerifyOrExit(err == CHIP_NO_ERROR, nocResponse = ConvertToNOCResponseStatus(err)); + // Notify the secure session of the new fabric. + commandObj->GetExchangeContext()->GetSessionHandle()->AsSecureSession()->NewFabric(fabricIndex); + // We might have a new operational identity, so we should start advertising it right away. app::DnssdServer::Instance().AdvertiseOperational(); diff --git a/src/app/clusters/ota-requestor/BDXDownloader.cpp b/src/app/clusters/ota-requestor/BDXDownloader.cpp index 69297107afdf17..31a77fdfef2c55 100644 --- a/src/app/clusters/ota-requestor/BDXDownloader.cpp +++ b/src/app/clusters/ota-requestor/BDXDownloader.cpp @@ -18,6 +18,7 @@ #include "BDXDownloader.h" +#include #include #include #include @@ -28,6 +29,8 @@ #include using chip::OTADownloader; +using chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum; +using chip::app::DataModel::Nullable; using chip::bdx::TransferSession; namespace chip { @@ -68,7 +71,7 @@ CHIP_ERROR BDXDownloader::BeginPrepareDownload() VerifyOrReturnError(mImageProcessor != nullptr, CHIP_ERROR_INCORRECT_STATE); ReturnErrorOnFailure(mImageProcessor->PrepareDownload()); - SetState(State::kPreparing); + SetState(State::kPreparing, OTAChangeReasonEnum::kSuccess); return CHIP_NO_ERROR; } @@ -79,7 +82,7 @@ CHIP_ERROR BDXDownloader::OnPreparedForDownload(CHIP_ERROR status) if (status == CHIP_NO_ERROR) { - SetState(State::kInProgress); + SetState(State::kInProgress, OTAChangeReasonEnum::kSuccess); // Must call here because StartTransfer() should have prepared a ReceiveInit message, and now we should send it. PollTransferSession(); @@ -88,7 +91,7 @@ CHIP_ERROR BDXDownloader::OnPreparedForDownload(CHIP_ERROR status) { ChipLogError(BDX, "failed to prepare download: %" CHIP_ERROR_FORMAT, status.Format()); mBdxTransfer.Reset(); - SetState(State::kIdle); + SetState(State::kIdle, OTAChangeReasonEnum::kFailure); } return CHIP_NO_ERROR; @@ -113,7 +116,7 @@ void BDXDownloader::OnDownloadTimeout() { mImageProcessor->Abort(); } - SetState(State::kIdle); + SetState(State::kIdle, OTAChangeReasonEnum::kTimeOut); } else { @@ -131,7 +134,7 @@ void BDXDownloader::EndDownload(CHIP_ERROR reason) { mImageProcessor->Abort(); } - SetState(State::kIdle); + SetState(State::kIdle, OTAChangeReasonEnum::kSuccess); // Because AbortTransfer() will generate a StatusReport to send. PollTransferSession(); @@ -174,14 +177,16 @@ CHIP_ERROR BDXDownloader::HandleBdxEvent(const chip::bdx::TransferSession::Outpu if (outEvent.msgTypeData.HasMessageType(chip::bdx::MessageType::BlockAckEOF)) { // BDX transfer is not complete until BlockAckEOF has been sent - SetState(State::kComplete); + SetState(State::kComplete, OTAChangeReasonEnum::kSuccess); } break; } case TransferSession::OutputEventType::kBlockReceived: { chip::ByteSpan blockData(outEvent.blockdata.Data, outEvent.blockdata.Length); ReturnErrorOnFailure(mImageProcessor->ProcessBlock(blockData)); - mStateDelegate->OnUpdateProgressChanged(mImageProcessor->GetPercentComplete()); + Nullable percent; + mImageProcessor->GetPercentComplete(percent); + mStateDelegate->OnUpdateProgressChanged(percent); // TODO: this will cause problems if Finalize() is not guaranteed to do its work after ProcessBlock(). if (outEvent.blockdata.IsEof) @@ -219,13 +224,13 @@ CHIP_ERROR BDXDownloader::HandleBdxEvent(const chip::bdx::TransferSession::Outpu return CHIP_NO_ERROR; } -void BDXDownloader::SetState(State state) +void BDXDownloader::SetState(State state, OTAChangeReasonEnum reason) { mState = state; if (mStateDelegate) { - mStateDelegate->OnDownloadStateChanged(state); + mStateDelegate->OnDownloadStateChanged(state, reason); } } diff --git a/src/app/clusters/ota-requestor/BDXDownloader.h b/src/app/clusters/ota-requestor/BDXDownloader.h index d783662c5a38fc..96c63d941d9180 100644 --- a/src/app/clusters/ota-requestor/BDXDownloader.h +++ b/src/app/clusters/ota-requestor/BDXDownloader.h @@ -26,6 +26,7 @@ #include "OTADownloader.h" +#include #include #include #include @@ -49,10 +50,10 @@ class BDXDownloader : public chip::OTADownloader { public: // Handle download state change - virtual void OnDownloadStateChanged(State state) = 0; + virtual void OnDownloadStateChanged(State state, app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason) = 0; // Handle update progress change - virtual void OnUpdateProgressChanged(uint8_t percent) = 0; - virtual ~StateDelegate() = default; + virtual void OnUpdateProgressChanged(app::DataModel::Nullable percent) = 0; + virtual ~StateDelegate() = default; }; // To be called when there is an incoming message to handle (of any protocol type) @@ -77,7 +78,7 @@ class BDXDownloader : public chip::OTADownloader private: void PollTransferSession(); CHIP_ERROR HandleBdxEvent(const chip::bdx::TransferSession::OutputEvent & outEvent); - void SetState(State state); + void SetState(State state, app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason); chip::bdx::TransferSession mBdxTransfer; MessagingDelegate * mMsgDelegate = nullptr; diff --git a/src/app/clusters/ota-requestor/OTADownloader.h b/src/app/clusters/ota-requestor/OTADownloader.h index b77514c35b53b2..fa12bbce77a07e 100644 --- a/src/app/clusters/ota-requestor/OTADownloader.h +++ b/src/app/clusters/ota-requestor/OTADownloader.h @@ -75,7 +75,7 @@ class OTADownloader virtual ~OTADownloader() = default; protected: - OTAImageProcessorInterface * mImageProcessor; + OTAImageProcessorInterface * mImageProcessor = nullptr; State mState; }; diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 616e259069ecfc..c44d8a1754fb61 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -36,6 +36,7 @@ using namespace app::Clusters::OtaSoftwareUpdateProvider; using namespace app::Clusters::OtaSoftwareUpdateProvider::Commands; using namespace app::Clusters::OtaSoftwareUpdateRequestor; using namespace app::Clusters::OtaSoftwareUpdateRequestor::Commands; +using app::DataModel::Nullable; using bdx::TransferSession; // Global instance of the OTARequestorInterface. @@ -87,17 +88,6 @@ static void LogApplyUpdateResponse(const ApplyUpdateResponse::DecodableType & re ChipLogDetail(SoftwareUpdate, " delayedActionTime: %" PRIu32 " seconds", response.delayedActionTime); } -static void SetUpdateStateAttribute(OTAUpdateStateEnum state) -{ - OtaRequestorServerSetUpdateState(state); - - // The UpdateStateProgress attribute only applies to the querying state - if (state != OTAUpdateStateEnum::kQuerying) - { - OtaRequestorServerSetUpdateStateProgress(0); - } -} - void StartDelayTimerHandler(System::Layer * systemLayer, void * appState) { VerifyOrReturn(appState != nullptr); @@ -129,13 +119,13 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse if (err != CHIP_NO_ERROR) { - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, err); return; } MutableByteSpan updateToken(requestorCore->mUpdateTokenBuffer); CopySpanToMutableSpan(update.updateToken, updateToken); - requestorCore->mUpdateVersion = update.softwareVersion; + requestorCore->mTargetVersion = update.softwareVersion; requestorCore->mUpdateToken = updateToken; requestorCore->mOtaRequestorDriver->UpdateAvailable(update, @@ -145,16 +135,15 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse case OTAQueryStatus::kBusy: requestorCore->mOtaRequestorDriver->UpdateNotFound(UpdateNotFoundReason::Busy, System::Clock::Seconds32(response.delayedActionTime.ValueOr(0))); - SetUpdateStateAttribute(OTAUpdateStateEnum::kDelayedOnQuery); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kDelayedOnQuery, OTAChangeReasonEnum::kDelayByProvider); break; case OTAQueryStatus::kNotAvailable: requestorCore->mOtaRequestorDriver->UpdateNotFound(UpdateNotFoundReason::NotAvailable, System::Clock::Seconds32(response.delayedActionTime.ValueOr(0))); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); break; default: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); break; } } @@ -165,8 +154,7 @@ void OTARequestor::OnQueryImageFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); } void OTARequestor::OnApplyUpdateResponse(void * context, const ApplyUpdateResponse::DecodableType & response) @@ -183,11 +171,11 @@ void OTARequestor::OnApplyUpdateResponse(void * context, const ApplyUpdateRespon break; case OTAApplyUpdateAction::kAwaitNextAction: requestorCore->mOtaRequestorDriver->UpdateSuspended(System::Clock::Seconds32(response.delayedActionTime)); - SetUpdateStateAttribute(OTAUpdateStateEnum::kDelayedOnApply); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kDelayedOnApply, OTAChangeReasonEnum::kDelayByProvider); break; case OTAApplyUpdateAction::kDiscontinue: requestorCore->mOtaRequestorDriver->UpdateDiscontinued(); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); break; } } @@ -198,8 +186,7 @@ void OTARequestor::OnApplyUpdateFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "ApplyUpdate failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kApplying, CHIP_ERROR_BAD_REQUEST); } void OTARequestor::OnNotifyUpdateAppliedResponse(void * context, const app::DataModel::NullObjectType & response) {} @@ -210,8 +197,7 @@ void OTARequestor::OnNotifyUpdateAppliedFailure(void * context, EmberAfStatus st VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "NotifyUpdateApplied failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, CHIP_ERROR_BAD_REQUEST); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kNotifying, CHIP_ERROR_BAD_REQUEST); } EmberAfStatus OTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * commandObj, @@ -299,11 +285,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send QueryImage command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kQuerying); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kQuerying, OTAChangeReasonEnum::kSuccess); break; } case kStartBDX: { @@ -312,12 +298,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to start download: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, err); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kDownloading, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kDownloading); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kDownloading, OTAChangeReasonEnum::kSuccess); break; } case kApplyUpdate: { @@ -326,12 +311,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send ApplyUpdate command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, err); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kApplying, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kApplying); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kApplying, OTAChangeReasonEnum::kSuccess); break; } case kNotifyUpdateApplied: { @@ -340,12 +324,11 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send NotifyUpdateApplied command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, err); - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kNotifying, err); return; } - SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); break; } default: @@ -365,13 +348,13 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR switch (requestorCore->mOnConnectedAction) { case kQueryImage: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, error); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, error); break; case kStartBDX: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, error); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kDownloading, error); break; case kApplyUpdate: - requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, error); + requestorCore->RecordErrorUpdateState(UpdateFailureState::kApplying, error); break; default: break; @@ -402,12 +385,21 @@ void OTARequestor::ApplyUpdate() ConnectToProvider(kApplyUpdate); } -void OTARequestor::NotifyUpdateApplied() +void OTARequestor::NotifyUpdateApplied(uint32_t version) { + // New version is executing so update where applicable + VerifyOrReturn(Basic::Attributes::SoftwareVersion::Set(kRootEndpointId, version) == EMBER_ZCL_STATUS_SUCCESS); + mCurrentVersion = version; + + // Log the VersionApplied event + uint16_t productId; + VerifyOrReturn(Basic::Attributes::ProductID::Get(kRootEndpointId, &productId) == EMBER_ZCL_STATUS_SUCCESS); + OtaRequestorServerOnVersionApplied(version, productId); + ConnectToProvider(kNotifyUpdateApplied); } -void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) +void OTARequestor::OnDownloadStateChanged(OTADownloader::State state, OTAChangeReasonEnum reason) { VerifyOrReturn(mOtaRequestorDriver != nullptr); @@ -417,18 +409,66 @@ void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) mOtaRequestorDriver->UpdateDownloaded(); break; case OTADownloader::State::kIdle: - mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, CHIP_ERROR_CONNECTION_ABORTED); + if (reason != OTAChangeReasonEnum::kSuccess) + { + RecordErrorUpdateState(UpdateFailureState::kDownloading, CHIP_ERROR_CONNECTION_ABORTED, reason); + } + break; default: break; } } -void OTARequestor::OnUpdateProgressChanged(uint8_t percent) +void OTARequestor::OnUpdateProgressChanged(Nullable percent) { OtaRequestorServerSetUpdateStateProgress(percent); } +void OTARequestor::RecordNewUpdateState(OTAUpdateStateEnum newState, OTAChangeReasonEnum reason) +{ + // Set server UpdateState attribute + OtaRequestorServerSetUpdateState(newState); + + // The UpdateStateProgress attribute only applies to the downloading state + if (newState != OTAUpdateStateEnum::kDownloading) + { + app::DataModel::Nullable percent; + percent.SetNull(); + OtaRequestorServerSetUpdateStateProgress(percent); + } + + // Log the StateTransition event + Nullable previousState; + previousState.SetNonNull(mCurrentUpdateState); + Nullable targetSoftwareVersion; + if ((newState == OTAUpdateStateEnum::kDownloading) || (newState == OTAUpdateStateEnum::kApplying) || + (newState == OTAUpdateStateEnum::kRollingBack)) + { + targetSoftwareVersion.SetNonNull(mTargetVersion); + } + OtaRequestorServerOnStateTransition(previousState, newState, reason, targetSoftwareVersion); + + mCurrentUpdateState = newState; +} + +void OTARequestor::RecordErrorUpdateState(UpdateFailureState failureState, CHIP_ERROR error, OTAChangeReasonEnum reason) +{ + // Inform driver of the error + mOtaRequestorDriver->HandleError(failureState, error); + + // Log the DownloadError event + OTAImageProcessorInterface * imageProcessor = mBdxDownloader->GetImageProcessorDelegate(); + VerifyOrReturn(imageProcessor != nullptr); + Nullable progressPercent; + imageProcessor->GetPercentComplete(progressPercent); + Nullable platformCode; + OtaRequestorServerOnDownloadError(mTargetVersion, imageProcessor->GetBytesDownloaded(), progressPercent, platformCode); + + // Whenever an error occurs, always reset to Idle state + RecordNewUpdateState(OTAUpdateStateEnum::kIdle, reason); +} + CHIP_ERROR OTARequestor::GenerateUpdateToken() { if (mUpdateToken.empty()) @@ -540,7 +580,7 @@ CHIP_ERROR OTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & deviceP ApplyUpdateRequest::Type args; args.updateToken = mUpdateToken; - args.newVersion = mUpdateVersion; + args.newVersion = mTargetVersion; Controller::OtaSoftwareUpdateProviderCluster cluster; cluster.Associate(&deviceProxy, mProviderEndpointId); @@ -554,7 +594,7 @@ CHIP_ERROR OTARequestor::SendNotifyUpdateAppliedRequest(OperationalDeviceProxy & NotifyUpdateApplied::Type args; args.updateToken = mUpdateToken; - args.softwareVersion = mUpdateVersion; + args.softwareVersion = mCurrentVersion; Controller::OtaSoftwareUpdateProviderCluster cluster; cluster.Associate(&deviceProxy, mProviderEndpointId); diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index fc70e83fab975c..0f650f78ddd618 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -63,12 +63,13 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe // Send ApplyImage void ApplyUpdate() override; - // Send NotifyUpdateApplied - void NotifyUpdateApplied() override; + // Send NotifyUpdateApplied, update Basic cluster SoftwareVersion attribute, log the VersionApplied event + void NotifyUpdateApplied(uint32_t version) override; //////////// BDXDownloader::StateDelegate Implementation /////////////// - void OnDownloadStateChanged(OTADownloader::State state) override; - void OnUpdateProgressChanged(uint8_t percent) override; + void OnDownloadStateChanged(OTADownloader::State state, + app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason) override; + void OnUpdateProgressChanged(app::DataModel::Nullable percent) override; /** * Called to perform some initialization including: @@ -84,8 +85,14 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe mOtaRequestorDriver = driver; mBdxDownloader = downloader; - OtaRequestorServerSetUpdateState(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum::kIdle); - OtaRequestorServerSetUpdateStateProgress(0); + uint32_t version; + VerifyOrDie(app::Clusters::Basic::Attributes::SoftwareVersion::Get(kRootEndpointId, &version) == EMBER_ZCL_STATUS_SUCCESS); + mCurrentVersion = version; + + OtaRequestorServerSetUpdateState(mCurrentUpdateState); + app::DataModel::Nullable percent; + percent.SetNull(); + OtaRequestorServerSetUpdateStateProgress(percent); } /** @@ -122,6 +129,8 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe private: using QueryImageResponseDecodableType = app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; using ApplyUpdateResponseDecodableType = app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; + using OTAUpdateStateEnum = app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum; + using OTAChangeReasonEnum = app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum; static constexpr size_t kMaxUpdateTokenLen = 32; @@ -192,6 +201,17 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe chip::BDXDownloader * mDownloader; }; + /** + * Record the new update state by updating the corresponding server attribute and logging a StateTransition event + */ + void RecordNewUpdateState(OTAUpdateStateEnum newState, OTAChangeReasonEnum reason); + + /** + * Record the error update state by informing the driver of the error and calling `RecordNewUpdateState` + */ + void RecordErrorUpdateState(UpdateFailureState failureState, CHIP_ERROR error, + OTAChangeReasonEnum reason = OTAChangeReasonEnum::kFailure); + /** * Generate an update token using the operational node ID in case of token lost, received in QueryImageResponse */ @@ -260,8 +280,10 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe BDXMessenger mBdxMessenger; // TODO: ideally this is held by the application uint8_t mUpdateTokenBuffer[kMaxUpdateTokenLen]; ByteSpan mUpdateToken; - uint32_t mUpdateVersion = 0; - Server * mServer = nullptr; + uint32_t mCurrentVersion = 0; + uint32_t mTargetVersion = 0; + OTAUpdateStateEnum mCurrentUpdateState = OTAUpdateStateEnum::kIdle; + Server * mServer = nullptr; }; } // namespace chip diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index 0fc2bffba7ce45..e87339bfe040ed 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include #include @@ -85,7 +86,7 @@ EmberAfStatus OtaRequestorServerSetUpdateState(OTAUpdateStateEnum value) { EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - // Find all endpoints that has OtaSoftwareUpdateRequestor implemented + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) { OTAUpdateStateEnum currentValue; @@ -102,17 +103,18 @@ EmberAfStatus OtaRequestorServerSetUpdateState(OTAUpdateStateEnum value) return status; } -EmberAfStatus OtaRequestorServerSetUpdateStateProgress(uint8_t value) +EmberAfStatus OtaRequestorServerSetUpdateStateProgress(app::DataModel::Nullable value) { EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; - // Find all endpoints that has OtaSoftwareUpdateRequestor implemented + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) { app::DataModel::Nullable currentValue; status = Attributes::UpdateStateProgress::Get(endpoint, currentValue); VerifyOrDie(EMBER_ZCL_STATUS_SUCCESS == status); - if (currentValue.IsNull() || currentValue.Value() != value) + + if (currentValue != value) { status = Attributes::UpdateStateProgress::Set(endpoint, value); VerifyOrDie(EMBER_ZCL_STATUS_SUCCESS == status); @@ -122,6 +124,62 @@ EmberAfStatus OtaRequestorServerSetUpdateStateProgress(uint8_t value) return status; } +void OtaRequestorServerOnStateTransition(DataModel::Nullable previousState, OTAUpdateStateEnum newState, + OTAChangeReasonEnum reason, DataModel::Nullable const & targetSoftwareVersion) +{ + if (!previousState.IsNull() && previousState.Value() == newState) + { + ChipLogError(Zcl, "Previous state and new state are the same, no event to log"); + return; + } + + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented + for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) + { + Events::StateTransition::Type event{ previousState, newState, reason, targetSoftwareVersion }; + EventNumber eventNumber; + + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record StateTransition event: %" CHIP_ERROR_FORMAT, err.Format()); + } + } +} + +void OtaRequestorServerOnVersionApplied(uint32_t softwareVersion, uint16_t productId) +{ + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented + for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) + { + Events::VersionApplied::Type event{ softwareVersion, productId }; + EventNumber eventNumber; + + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record VersionApplied event: %" CHIP_ERROR_FORMAT, err.Format()); + } + } +} + +void OtaRequestorServerOnDownloadError(uint32_t softwareVersion, uint64_t bytesDownloaded, + DataModel::Nullable progressPercent, DataModel::Nullable platformCode) +{ + // Find all endpoints that have OtaSoftwareUpdateRequestor implemented + for (auto endpoint : EnabledEndpointsWithServerCluster(OtaSoftwareUpdateRequestor::Id)) + { + Events::DownloadError::Type event{ softwareVersion, bytesDownloaded, progressPercent, platformCode }; + EventNumber eventNumber; + + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record DownloadError event: %" CHIP_ERROR_FORMAT, err.Format()); + } + } +} + // ----------------------------------------------------------------------------- // Callbacks implementation diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.h b/src/app/clusters/ota-requestor/ota-requestor-server.h index 9a5afcfc193979..ad0ecdd94e41b9 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.h +++ b/src/app/clusters/ota-requestor/ota-requestor-server.h @@ -21,4 +21,14 @@ #include EmberAfStatus OtaRequestorServerSetUpdateState(chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum value); -EmberAfStatus OtaRequestorServerSetUpdateStateProgress(uint8_t value); +EmberAfStatus OtaRequestorServerSetUpdateStateProgress(chip::app::DataModel::Nullable value); + +void OtaRequestorServerOnStateTransition( + chip::app::DataModel::Nullable previousState, + chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum newState, + chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason, + chip::app::DataModel::Nullable const & targetSoftwareVersion); +void OtaRequestorServerOnVersionApplied(uint32_t softwareVersion, uint16_t productId); +void OtaRequestorServerOnDownloadError(uint32_t softwareVersion, uint64_t bytesDownloaded, + chip::app::DataModel::Nullable progressPercent, + chip::app::DataModel::Nullable platformCode); diff --git a/src/app/data-model/Nullable.h b/src/app/data-model/Nullable.h index e8bf8c5ae2d1a1..c6d279b0e0310e 100644 --- a/src/app/data-model/Nullable.h +++ b/src/app/data-model/Nullable.h @@ -73,6 +73,9 @@ struct Nullable : protected Optional { return true; } + + bool operator==(const Nullable & other) const { return Optional::operator==(other); } + bool operator!=(const Nullable & other) const { return !(*this == other); } }; } // namespace DataModel diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index d5d519581d568a..91a92c4dafd758 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -270,6 +270,11 @@ void CommissioningWindowManager::CloseCommissioningWindow() CHIP_ERROR CommissioningWindowManager::StartAdvertisement() { +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + // notify device layer that advertisement is beginning (to do work such as increment rotating id) + DeviceLayer::ConfigurationMgr().NotifyOfAdvertisementStart(); +#endif + if (mIsBLE) { ReturnErrorOnFailure(chip::DeviceLayer::ConnectivityMgr().SetBLEAdvertisingEnabled(true)); diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml index 906c0c5cd4786c..c83bff37b74dbc 100644 --- a/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml +++ b/src/app/zap-templates/zcl/data-model/chip/chip-ota.xml @@ -150,7 +150,7 @@ limitations under the License. This event SHALL be generated whenever an error occurs during OTA Requestor download operation. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index a6e0012cd14dec..f24ff35b33539a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -19,7 +19,7 @@ limitations under the License. - + @@ -43,8 +43,9 @@ limitations under the License. - + + @@ -54,6 +55,7 @@ limitations under the License. OPERATIONAL_CREDENTIALS_CLUSTER This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. + NOCs fabrics list SupportedFabrics CommissionedFabrics diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 87e5b883640cef..eb06996b0dc121 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2209,7 +2209,7 @@ client cluster OtaSoftwareUpdateRequestor = 42 { info event DownloadError = 2 { INT32U softwareVersion = 0; INT64U bytesDownloaded = 1; - INT8U progressPercent = 2; + nullable INT8U progressPercent = 2; nullable INT64S platformCode = 3; } @@ -2304,8 +2304,14 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } + struct NOCStruct { + fabric_idx fabricIndex = 0; + OCTET_STRING noc = 1; + OCTET_STRING icac = 2; + } + struct FabricDescriptor { - INT8U fabricIndex = 0; + fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; @@ -2313,6 +2319,7 @@ client cluster OperationalCredentials = 62 { CHAR_STRING<32> label = 5; } + readonly nosubscribe attribute NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabricsList[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 482e0223506022..f0bf6fbcaa7517 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -6139,6 +6139,21 @@ } ], "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "fabrics list", "code": 1, @@ -6229,6 +6244,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index d295e248dbbdf5..1d80c1906e923a 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -733,6 +733,8 @@ typedef void (*CHIPOperationalCredentialsClusterNOCResponseCallbackType)( typedef void (*CHIPOperationalCredentialsClusterOpCSRResponseCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Commands::OpCSRResponse::DecodableType &); +typedef void (*CHIPOperationalCredentialsClusterNOCsAttributeCallbackType)( + void *, const chip::app::Clusters::OperationalCredentials::Attributes::NOCs::TypeInfo::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterFabricsListAttributeCallbackType)( void *, const chip::app::Clusters::OperationalCredentials::Attributes::FabricsList::TypeInfo::DecodableType &); typedef void (*CHIPOperationalCredentialsClusterSupportedFabricsAttributeCallbackType)( diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 6a33054bc7d72e..c616359d6a1b60 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -10800,6 +10800,42 @@ JNI_METHOD(void, OnOffSwitchConfigurationCluster, readClusterRevisionAttribute) onFailure.release(); } +JNI_METHOD(void, OperationalCredentialsCluster, readNOCsAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::OperationalCredentials::Attributes::NOCs::TypeInfo; + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::OperationalCredentialsCluster * cppCluster = + reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, OperationalCredentialsCluster, readFabricsListAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index ddf7dfa5ba8e37..95e39a8076ad99 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -8174,6 +8174,137 @@ void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPOperationalCredentialsNOCsAttributeCallback::CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOperationalCredentialsNOCsAttributeCallback::~CHIPOperationalCredentialsNOCsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOperationalCredentialsNOCsAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jclass arrayListClass; + err = chip::JniReferences::GetInstance().GetClassRef(env, "java/util/ArrayList", arrayListClass); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error using Java ArrayList")); + chip::JniClass arrayListJniClass(arrayListClass); + jmethodID arrayListCtor = env->GetMethodID(arrayListClass, "", "()V"); + jmethodID arrayListAddMethod = env->GetMethodID(arrayListClass, "add", "(Ljava/lang/Object;)Z"); + VerifyOrReturn(arrayListCtor != nullptr && arrayListAddMethod != nullptr, + ChipLogError(Zcl, "Error finding Java ArrayList methods")); + jobject arrayListObj = env->NewObject(arrayListClass, arrayListCtor); + VerifyOrReturn(arrayListObj != nullptr, ChipLogError(Zcl, "Error creating Java ArrayList")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/List;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jclass attributeClass; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$NOCsAttribute", attributeClass); + VerifyOrReturn( + err == CHIP_NO_ERROR, + ChipLogError(Zcl, "Could not find class chip/devicecontroller/ChipClusters$OperationalCredentialsCluster$NOCsAttribute")); + chip::JniClass attributeJniClass(attributeClass); + jmethodID attributeCtor = env->GetMethodID(attributeClass, "", "(Ljava/lang/Integer;[B[B)V"); + VerifyOrReturn(attributeCtor != nullptr, ChipLogError(Zcl, "Could not find NOCsAttribute constructor")); + + auto iter = list.begin(); + while (iter.Next()) + { + auto & entry = iter.GetValue(); + (void) entry; + bool fabricIndexNull = false; + bool fabricIndexHasValue = true; + + chip::FabricIndex fabricIndexValue = entry.fabricIndex; + + jobject fabricIndex = nullptr; + if (!fabricIndexNull && fabricIndexHasValue) + { + jclass fabricIndexEntryCls; + chip::JniReferences::GetInstance().GetClassRef(env, "java/lang/Integer", fabricIndexEntryCls); + chip::JniClass fabricIndexJniClass(fabricIndexEntryCls); + jmethodID fabricIndexEntryTypeCtor = env->GetMethodID(fabricIndexEntryCls, "", "(I)V"); + fabricIndex = env->NewObject(fabricIndexEntryCls, fabricIndexEntryTypeCtor, fabricIndexValue); + } + + bool nocNull = false; + bool nocHasValue = true; + + chip::ByteSpan nocValue = entry.noc; + + jbyteArray noc = nullptr; + if (!nocNull && nocHasValue) + { + noc = env->NewByteArray(nocValue.size()); + env->SetByteArrayRegion(noc, 0, nocValue.size(), reinterpret_cast(nocValue.data())); + } + + bool icacNull = false; + bool icacHasValue = true; + + chip::ByteSpan icacValue = entry.icac; + + jbyteArray icac = nullptr; + if (!icacNull && icacHasValue) + { + icac = env->NewByteArray(icacValue.size()); + env->SetByteArrayRegion(icac, 0, icacValue.size(), reinterpret_cast(icacValue.data())); + } + + jobject attributeObj = env->NewObject(attributeClass, attributeCtor, fabricIndex, noc, icac); + VerifyOrReturn(attributeObj != nullptr, ChipLogError(Zcl, "Could not create NOCsAttribute object")); + + env->CallBooleanMethod(arrayListObj, arrayListAddMethod, attributeObj); + } + VerifyOrReturn(iter.GetStatus() == CHIP_NO_ERROR, + ChipLogError(Zcl, "Error decoding NOCsAttribute value: %" CHIP_ERROR_FORMAT, iter.GetStatus().Format())); + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + CHIPOperationalCredentialsFabricsListAttributeCallback::CHIPOperationalCredentialsFabricsListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -8259,7 +8390,7 @@ void CHIPOperationalCredentialsFabricsListAttributeCallback::CallbackFn( bool fabricIndexNull = false; bool fabricIndexHasValue = true; - uint8_t fabricIndexValue = entry.fabricIndex; + chip::FabricIndex fabricIndexValue = entry.fabricIndex; jobject fabricIndex = nullptr; if (!fabricIndexNull && fabricIndexHasValue) diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 11baa808a14808..9cbc0f40ac76e0 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2825,6 +2825,39 @@ class CHIPOnOffSwitchConfigurationAttributeListAttributeCallback bool keepAlive; }; +class CHIPOperationalCredentialsNOCsAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPOperationalCredentialsNOCsAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPOperationalCredentialsNOCsAttributeCallback(); + + static void maybeDestroy(CHIPOperationalCredentialsNOCsAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn( + void * context, + const chip::app::DataModel::DecodableList & + list); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPOperationalCredentialsFabricsListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 0c0a20087a6019..3ccf41825d1d7c 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -9838,6 +9838,44 @@ public interface OpCSRResponseCallback { void onError(Exception error); } + public static class NOCsAttribute { + public Integer fabricIndex; + public byte[] noc; + public byte[] icac; + + public NOCsAttribute(Integer fabricIndex, byte[] noc, byte[] icac) { + this.fabricIndex = fabricIndex; + this.noc = noc; + this.icac = icac; + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(""); + output.append("int fabricIndex: "); + output.append(this.fabricIndex); + output.append("\n"); + + output.append("byte[] "); + output.append(Arrays.toString(noc)); + output.append("\n"); + + output.append("byte[] "); + output.append(Arrays.toString(icac)); + output.append("\n"); + + return output.toString(); + } + } + + public interface NOCsAttributeCallback { + void onSuccess(List valueList); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public static class FabricsListAttribute { public Integer fabricIndex; public byte[] rootPublicKey; @@ -9924,6 +9962,10 @@ public interface AttributeListAttributeCallback { default void onSubscriptionEstablished() {} } + public void readNOCsAttribute(NOCsAttributeCallback callback) { + readNOCsAttribute(chipClusterPtr, callback); + } + public void readFabricsListAttribute(FabricsListAttributeCallback callback) { readFabricsListAttribute(chipClusterPtr, callback); } @@ -9973,6 +10015,8 @@ public void subscribeClusterRevisionAttribute( subscribeClusterRevisionAttribute(chipClusterPtr, callback, minInterval, maxInterval); } + private native void readNOCsAttribute(long chipClusterPtr, NOCsAttributeCallback callback); + private native void readFabricsListAttribute( long chipClusterPtr, FabricsListAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 0d7e27d584b738..200d72746744e9 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -2767,6 +2767,34 @@ public void onError(Exception error) { } } + public static class DelegatedOperationalCredentialsClusterNOCsAttributeCallback + implements ChipClusters.OperationalCredentialsCluster.NOCsAttributeCallback, + DelegatedClusterCallback { + private ClusterCommandCallback callback; + + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess( + List valueList) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = + new CommandResponseInfo( + "valueList", "List"); + + responseValues.put(commandResponseInfo, valueList); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + public static class DelegatedOperationalCredentialsClusterFabricsListAttributeCallback implements ChipClusters.OperationalCredentialsCluster.FabricsListAttributeCallback, DelegatedClusterCallback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 5ff4ce3b2470aa..1485c805c5f3b2 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -4147,6 +4147,21 @@ public Map> getReadAttributeMap() { readOnOffSwitchConfigurationClusterRevisionAttributeInteractionInfo); readAttributeMap.put("onOffSwitchConfiguration", readOnOffSwitchConfigurationInteractionInfo); Map readOperationalCredentialsInteractionInfo = new LinkedHashMap<>(); + Map readOperationalCredentialsNOCsCommandParams = + new LinkedHashMap(); + InteractionInfo readOperationalCredentialsNOCsAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.OperationalCredentialsCluster) cluster) + .readNOCsAttribute( + (ChipClusters.OperationalCredentialsCluster.NOCsAttributeCallback) callback); + }, + () -> + new ClusterInfoMapping + .DelegatedOperationalCredentialsClusterNOCsAttributeCallback(), + readOperationalCredentialsNOCsCommandParams); + readOperationalCredentialsInteractionInfo.put( + "readNOCsAttribute", readOperationalCredentialsNOCsAttributeInteractionInfo); Map readOperationalCredentialsFabricsListCommandParams = new LinkedHashMap(); InteractionInfo readOperationalCredentialsFabricsListAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 37d158c20d8c85..0677aec9022146 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3317,6 +3317,11 @@ class ChipClusters: }, }, "attributes": { + 0x00000000: { + "attributeName": "NOCs", + "attributeId": 0x00000000, + "type": "", + }, 0x00000001: { "attributeName": "FabricsList", "attributeId": 0x00000001, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e1dfcb274b8e43..51247828185d9f 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -7031,13 +7031,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="softwareVersion", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="bytesDownloaded", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="progressPercent", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="progressPercent", Tag=2, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="platformCode", Tag=3, Type=typing.Union[Nullable, int]), ]) softwareVersion: 'uint' = 0 bytesDownloaded: 'uint' = 0 - progressPercent: 'uint' = 0 + progressPercent: 'typing.Union[Nullable, uint]' = NullValue platformCode: 'typing.Union[Nullable, int]' = NullValue @@ -12419,6 +12419,7 @@ class OperationalCredentials(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ + ClusterObjectFieldDescriptor(Label="NOCs", Tag=0x00000000, Type=typing.List[OperationalCredentials.Structs.NOCStruct]), ClusterObjectFieldDescriptor(Label="fabricsList", Tag=0x00000001, Type=typing.List[OperationalCredentials.Structs.FabricDescriptor]), ClusterObjectFieldDescriptor(Label="supportedFabrics", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="commissionedFabrics", Tag=0x00000003, Type=uint), @@ -12429,6 +12430,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) + NOCs: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = None fabricsList: 'typing.List[OperationalCredentials.Structs.FabricDescriptor]' = None supportedFabrics: 'uint' = None commissionedFabrics: 'uint' = None @@ -12482,10 +12484,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields = [ ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="noc", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="icac", Tag=2, Type=bytes), ]) fabricIndex: 'uint' = 0 noc: 'bytes' = b"" + icac: 'bytes' = b"" @@ -12705,6 +12709,22 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Attributes: + @dataclass + class NOCs(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x003E + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.List[OperationalCredentials.Structs.NOCStruct]) + + value: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = field(default_factory=lambda: []) + @dataclass class FabricsList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 7457b2f4b28e55..02f984666f8914 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -200,13 +200,13 @@ class DLL_EXPORT FabricInfo return CHIP_NO_ERROR; } - CHIP_ERROR GetICACert(ByteSpan & cert) + CHIP_ERROR GetICACert(ByteSpan & cert) const { cert = mICACert; return CHIP_NO_ERROR; } - CHIP_ERROR GetNOCCert(ByteSpan & cert) + CHIP_ERROR GetNOCCert(ByteSpan & cert) const { ReturnErrorCodeIf(mNOCCert.empty(), CHIP_ERROR_INCORRECT_STATE); cert = mNOCCert; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index de0f93cb807d52..6569d7296e278e 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -4977,6 +4977,35 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader case Clusters::OperationalCredentials::Id: { using namespace Clusters::OperationalCredentials; switch (aPath.mAttributeId) { + case Attributes::NOCs::Id: { + using TypeInfo = Attributes::NOCs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterNOCStruct new]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.data() length:entry_0.icac.size()]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + } + value = array_0; + return value; + } case Attributes::FabricsList::Id: { using TypeInfo = Attributes::FabricsList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index a7ea7adbf96324..8532c3a5483e9d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -3480,6 +3480,49 @@ } } +void CHIPOperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) +{ + NSArray * _Nonnull objCValue; + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + CHIPOperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [CHIPOperationalCredentialsClusterNOCStruct new]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.data() length:entry_0.icac.size()]; + [array_0 addObject:newElement_0]; + } + { // Scope for the error so we will know what it's named + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, EMBER_ZCL_STATUS_INVALID_VALUE); + return; + } + } + objCValue = array_0; + DispatchSuccess(context, objCValue); +}; + +void CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value) diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 620ea3a3457f9d..45d5978b975e86 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -3113,6 +3113,37 @@ class CHIPOnOffSwitchConfigurationAttributeListListAttributeCallbackSubscription SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPOperationalCredentialsNOCsListAttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPOperationalCredentialsNOCsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & + value); +}; + +class CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge + : public CHIPOperationalCredentialsNOCsListAttributeCallbackBridge +{ +public: + CHIPOperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPOperationalCredentialsNOCsListAttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPOperationalCredentialsFabricsListListAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index 7b2994d30fbcb4..64cfc7056c090f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -3103,6 +3103,8 @@ NS_ASSUME_NONNULL_BEGIN completionHandler:(void (^)(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler; +- (void)readAttributeNOCsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeFabricsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeFabricsListWithMinInterval:(uint16_t)minInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index badc4ce2bd589c..9eaee739ff51d5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -12958,6 +12958,17 @@ new CHIPOperationalCredentialsClusterNOCResponseCallbackBridge( }); } +- (void)readAttributeNOCsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPOperationalCredentialsNOCsListAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeFabricsListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h index 77d89dd91468fd..fae3b526054ef3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.h @@ -234,6 +234,7 @@ NS_ASSUME_NONNULL_BEGIN @interface CHIPOperationalCredentialsClusterNOCStruct : NSObject @property (strong, nonatomic) NSNumber * _Nonnull fabricIndex; @property (strong, nonatomic) NSData * _Nonnull noc; +@property (strong, nonatomic) NSData * _Nonnull icac; - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm index de4f4843d9b2d4..5ce12df0edc4d6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPStructsObjc.mm @@ -466,6 +466,8 @@ - (instancetype)init _fabricIndex = @(0); _noc = [NSData data]; + + _icac = [NSData data]; } return self; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index 971945764cfe7b..245028aea67762 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -686,6 +686,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface CHIPTestOperationalCredentials : CHIPOperationalCredentials +- (void)writeAttributeNOCsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeFabricsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeSupportedFabricsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeCommissionedFabricsWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 228f1b8ecd1b12..b4d1325d837cec 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -6715,6 +6715,47 @@ @implementation CHIPTestOperationalCredentials return &_cppCluster; } +- (void)writeAttributeNOCsWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[CHIPOperationalCredentialsClusterNOCStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (CHIPOperationalCredentialsClusterNOCStruct *) value[i_0]; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + listHolder_0->mList[i_0].noc = [self asByteSpan:element_0.noc]; + listHolder_0->mList[i_0].icac = [self asByteSpan:element_0.icac]; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeFabricsListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 3ff04e01a59ac0..0ac11afb64aa39 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -48937,6 +48937,31 @@ - (void)testSendClusterOnOffSwitchConfigurationReadAttributeClusterRevisionWithC [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterOperationalCredentialsReadAttributeNOCsWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPOperationalCredentials * cluster = [[CHIPOperationalCredentials alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = + [self expectationWithDescription:@"OperationalCredentialsReadAttributeNOCsWithCompletionHandler"]; + + [cluster readAttributeNOCsWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"OperationalCredentials NOCs Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterOperationalCredentialsReadAttributeFabricsListWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/src/include/platform/ConfigurationManager.h b/src/include/platform/ConfigurationManager.h index 28b044ee896e9b..a8977307b14aee 100644 --- a/src/include/platform/ConfigurationManager.h +++ b/src/include/platform/ConfigurationManager.h @@ -136,6 +136,13 @@ class ConfigurationManager virtual bool IsFullyProvisioned() = 0; virtual void InitiateFactoryReset() = 0; + // Gets called when starting BLE/DNS-SD advertisement +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + virtual void NotifyOfAdvertisementStart() {} +#else + void NotifyOfAdvertisementStart() {} +#endif + virtual void LogDeviceConfig() = 0; virtual bool IsCommissionableDeviceTypeEnabled() = 0; diff --git a/src/include/platform/OTAImageProcessor.h b/src/include/platform/OTAImageProcessor.h index b5954394add880..95815230bc3136 100644 --- a/src/include/platform/OTAImageProcessor.h +++ b/src/include/platform/OTAImageProcessor.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include #include @@ -32,6 +33,21 @@ struct OTAImageProcessorParams uint64_t totalFileBytes = 0; }; +// TODO: Parse the header when the image is received +struct OTAImageProcessorHeader +{ + uint16_t vendorId; + uint16_t productId; + uint32_t softwareVersion; + CharSpan softwareVersionString; + uint64_t payloadSize; + uint16_t minApplicableSoftwareVersion; + uint16_t maxApplicableSoftwareVersion; + CharSpan releaseNotesUrl; + uint8_t imageDigestType; + ByteSpan imageDigest; +}; + /** * @class OTAImageProcessorInterface * @@ -83,20 +99,26 @@ class DLL_EXPORT OTAImageProcessorInterface /** * Called to check the current download status of the OTA image download. */ - virtual uint8_t GetPercentComplete() + virtual void GetPercentComplete(app::DataModel::Nullable & percent) { if (mParams.totalFileBytes == 0) { - return 0; + percent.SetNull(); } else { - return static_cast((mParams.downloadedBytes * 100) / mParams.totalFileBytes); + percent.SetNonNull(static_cast((mParams.downloadedBytes * 100) / mParams.totalFileBytes)); } } + /** + * Called to check the current number of bytes that have been downloaded of the OTA image + */ + virtual uint64_t GetBytesDownloaded() { return mParams.downloadedBytes; } + protected: OTAImageProcessorParams mParams; + OTAImageProcessorHeader mHeader; }; } // namespace chip diff --git a/src/include/platform/OTARequestorInterface.h b/src/include/platform/OTARequestorInterface.h index 7825eb1fde35c8..28febbfac64afe 100644 --- a/src/include/platform/OTARequestorInterface.h +++ b/src/include/platform/OTARequestorInterface.h @@ -65,7 +65,7 @@ class OTARequestorInterface virtual void ApplyUpdate() = 0; // Send NotifyUpdateApplied command - virtual void NotifyUpdateApplied() = 0; + virtual void NotifyUpdateApplied(uint32_t version) = 0; // Manually set OTA Provider parameters virtual void TestModeSetProviderParameters(NodeId nodeId, FabricIndex fabIndex, EndpointId endpointId) = 0; diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp index 72d5875abbe21e..e327da4cfd38d3 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.cpp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.cpp @@ -248,11 +248,16 @@ CHIP_ERROR GenericConfigurationManagerImpl::StoreManufacturingDate( template void GenericConfigurationManagerImpl::InitiateFactoryReset() +{} + +template +void GenericConfigurationManagerImpl::NotifyOfAdvertisementStart() { #if CHIP_ENABLE_ROTATING_DEVICE_ID + // Increment life time counter to protect against long-term tracking of rotating device ID. IncrementLifetimeCounter(); -#endif // Inheriting classes should call this method so the lifetime counter is updated if necessary. +#endif } template diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.h b/src/include/platform/internal/GenericConfigurationManagerImpl.h index 7fb9554ae0737c..e498eb0e60854e 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.h +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.h @@ -113,6 +113,11 @@ class GenericConfigurationManagerImpl : public ConfigurationManager CHIP_ERROR RunUnitTests(void) override; bool IsFullyProvisioned() override; void InitiateFactoryReset() override; +#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING + void NotifyOfAdvertisementStart() override; +#else + void NotifyOfAdvertisementStart(); +#endif void LogDeviceConfig() override; virtual ~GenericConfigurationManagerImpl() = default; diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 5c2fa16486ff8c..afcff9f326cfc1 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -125,10 +125,16 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) void OTAImageProcessorImpl::HandleApply(intptr_t context) { + auto * imageProcessor = reinterpret_cast(context); + if (imageProcessor == nullptr) + { + return; + } + OTARequestorInterface * requestor = chip::GetRequestorInstance(); if (requestor != nullptr) { - requestor->NotifyUpdateApplied(); + requestor->NotifyUpdateApplied(imageProcessor->mHeader.softwareVersion); } } diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index f6f392ee1ceca7..c21134e33e5b83 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -359,11 +359,6 @@ CHIP_ERROR BLEManagerImpl::StopAdvertising(void) ChipLogProgress(DeviceLayer, "CHIPoBLE advertising stopped"); -#if CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING - // Increment life time counter to protect against long-term tracking of rotating device ID. - ReturnErrorOnFailure(ConfigurationMgr().IncrementLifetimeCounter()); -#endif - // Post a CHIPoBLEAdvertisingChange(Stopped) event. { ChipDeviceEvent advChange; diff --git a/src/transport/SecureSession.cpp b/src/transport/SecureSession.cpp index 3a9be04d8912e6..67e4378ba4e0e0 100644 --- a/src/transport/SecureSession.cpp +++ b/src/transport/SecureSession.cpp @@ -32,9 +32,9 @@ Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const } else if (IsPAKEKeyId(mPeerNodeId)) { - subjectDescriptor.authMode = Access::AuthMode::kPase; - subjectDescriptor.subject = mPeerNodeId; - // TODO(#10242): PASE *can* have fabric in some situations + subjectDescriptor.authMode = Access::AuthMode::kPase; + subjectDescriptor.subject = mPeerNodeId; + subjectDescriptor.fabricIndex = mFabric; } else { diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index 05efecc190ae32..5edcac726f96d2 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -114,6 +114,23 @@ class SecureSession : public Session uint16_t GetPeerSessionId() const { return mPeerSessionId; } FabricIndex GetFabricIndex() const { return mFabric; } + // Should only be called for PASE sessions, which start with undefined fabric, + // to migrate to a newly commissioned fabric after successful + // OperationalCredentialsCluster::AddNOC + CHIP_ERROR NewFabric(FabricIndex fabricIndex) + { +#if 0 + // TODO(#13711): this check won't work until the issue is addressed + if (mSecureSessionType == Type::kPASE) + { + mFabric = fabricIndex; + } +#else + mFabric = fabricIndex; +#endif + return CHIP_NO_ERROR; + } + System::Clock::Timestamp GetLastActivityTime() const { return mLastActivityTime; } void MarkActive() { mLastActivityTime = System::SystemClock().GetMonotonicTimestamp(); } @@ -139,7 +156,10 @@ class SecureSession : public Session const CATValues mPeerCATs; const uint16_t mLocalSessionId; const uint16_t mPeerSessionId; - const FabricIndex mFabric; + + // PASE sessions start with undefined fabric, but are migrated to a newly + // commissioned fabric after successful OperationalCredentialsCluster::AddNOC + FabricIndex mFabric; PeerAddress mPeerAddress; System::Clock::Timestamp mLastActivityTime; diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 7a87e98863a0e6..570907f9c84f7b 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -1484,7 +1484,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 615 +#define GENERATED_ATTRIBUTE_COUNT 616 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1713,6 +1713,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -2508,220 +2509,220 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(166), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(170), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(170), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(176), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(177), 5, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(181), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(182), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(183), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(184), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(185), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(186), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(189), \ + ZAP_ATTRIBUTE_INDEX(190), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(192), \ + ZAP_ATTRIBUTE_INDEX(193), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x00000005, \ - ZAP_ATTRIBUTE_INDEX(194), \ + ZAP_ATTRIBUTE_INDEX(195), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(200), \ + ZAP_ATTRIBUTE_INDEX(201), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x00000007, ZAP_ATTRIBUTE_INDEX(207), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(208), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(210), \ + ZAP_ATTRIBUTE_INDEX(211), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(227), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(231), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(236), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x00000025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000025, ZAP_ATTRIBUTE_INDEX(237), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x0000002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002B, ZAP_ATTRIBUTE_INDEX(241), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(243), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x00000031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000031, ZAP_ATTRIBUTE_INDEX(254), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x00000039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(264), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x0000003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(265), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(270), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(272), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x00000045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000045, ZAP_ATTRIBUTE_INDEX(274), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x00000050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000050, ZAP_ATTRIBUTE_INDEX(276), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x00000101, \ - ZAP_ATTRIBUTE_INDEX(281), \ + ZAP_ATTRIBUTE_INDEX(282), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(310), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x00000103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(330), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x00000200, \ - ZAP_ATTRIBUTE_INDEX(334), \ + ZAP_ATTRIBUTE_INDEX(335), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x00000201, \ - ZAP_ATTRIBUTE_INDEX(360), \ + ZAP_ATTRIBUTE_INDEX(361), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x00000204, \ - ZAP_ATTRIBUTE_INDEX(379), \ + ZAP_ATTRIBUTE_INDEX(380), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x00000300, \ - ZAP_ATTRIBUTE_INDEX(383), \ + ZAP_ATTRIBUTE_INDEX(384), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x00000400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000400, ZAP_ATTRIBUTE_INDEX(437), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(443), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(448), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(452), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(457), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(461), \ + ZAP_ATTRIBUTE_INDEX(462), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x00000500, \ - ZAP_ATTRIBUTE_INDEX(465), \ + ZAP_ATTRIBUTE_INDEX(466), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x00000503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(472), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(474), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(476), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x00000506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(479), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(486), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x00000508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x00000509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(490), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(491), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(494), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(497), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(499), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x0000050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(507), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x0000050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(508), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x00000B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000B04, ZAP_ATTRIBUTE_INDEX(586), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(597), \ + ZAP_ATTRIBUTE_INDEX(598), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(599), \ + ZAP_ATTRIBUTE_INDEX(600), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(607), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(611), \ + ZAP_ATTRIBUTE_INDEX(612), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2764,7 +2765,7 @@ // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 22, 22, 22 \ + 22, 256, 256 \ } // Array of device versions diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index 0631b180ff8857..171a2b2391d09b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -245,7 +245,7 @@ typedef struct _ExtensionEntry // Struct for FabricDescriptor typedef struct _FabricDescriptor { - uint8_t FabricIndex; + chip::FabricIndex FabricIndex; chip::ByteSpan RootPublicKey; uint16_t VendorId; chip::FabricId FabricId; @@ -326,8 +326,9 @@ typedef struct _ModeOptionStruct // Struct for NOCStruct typedef struct _NOCStruct { - uint8_t FabricIndex; + chip::FabricIndex FabricIndex; chip::ByteSpan NOC; + chip::ByteSpan ICAC; } NOCStruct; // Struct for NeighborTable diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h index aea2d23d566967..905dc465a1e454 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-id.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-id.h @@ -590,6 +590,7 @@ // Client attributes // Server attributes +#define ZCL_NOCS_ATTRIBUTE_ID (0x0000) #define ZCL_FABRICS_ATTRIBUTE_ID (0x0001) #define ZCL_SUPPORTED_FABRICS_ATTRIBUTE_ID (0x0002) #define ZCL_COMMISSIONED_FABRICS_ATTRIBUTE_ID (0x0003) diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 4afd56afd3ff67..67403a7b9719f1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -9785,6 +9785,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricIndex)), fabricIndex)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNoc)), noc)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIcac)), icac)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9807,6 +9808,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kNoc): ReturnErrorOnFailure(DataModel::Decode(reader, noc)); break; + case to_underlying(Fields::kIcac): + ReturnErrorOnFailure(DataModel::Decode(reader, icac)); + break; default: break; } @@ -10309,6 +10313,9 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { + case Attributes::NOCs::TypeInfo::GetAttributeId(): + ReturnErrorOnFailure(DataModel::Decode(reader, NOCs)); + break; case Attributes::FabricsList::TypeInfo::GetAttributeId(): ReturnErrorOnFailure(DataModel::Decode(reader, fabricsList)); break; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index c504ead4c10204..e1c1702ff69d82 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -8919,7 +8919,7 @@ struct Type uint32_t softwareVersion = static_cast(0); uint64_t bytesDownloaded = static_cast(0); - uint8_t progressPercent = static_cast(0); + DataModel::Nullable progressPercent; DataModel::Nullable platformCode; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -8934,7 +8934,7 @@ struct DecodableType uint32_t softwareVersion = static_cast(0); uint64_t bytesDownloaded = static_cast(0); - uint8_t progressPercent = static_cast(0); + DataModel::Nullable progressPercent; DataModel::Nullable platformCode; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -14410,7 +14410,7 @@ enum class Fields struct Type { public: - uint8_t fabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); chip::ByteSpan rootPublicKey; uint16_t vendorId = static_cast(0); chip::FabricId fabricId = static_cast(0); @@ -14419,6 +14419,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); + bool MatchesFabricIndex(FabricIndex fabricIndex_) const { return fabricIndex == fabricIndex_; } }; using DecodableType = Type; @@ -14429,16 +14430,19 @@ enum class Fields { kFabricIndex = 0, kNoc = 1, + kIcac = 2, }; struct Type { public: - uint8_t fabricIndex = static_cast(0); + chip::FabricIndex fabricIndex = static_cast(0); chip::ByteSpan noc; + chip::ByteSpan icac; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; CHIP_ERROR Decode(TLV::TLVReader & reader); + bool MatchesFabricIndex(FabricIndex fabricIndex_) const { return fabricIndex == fabricIndex_; } }; using DecodableType = Type; @@ -14964,6 +14968,20 @@ struct DecodableType namespace Attributes { +namespace NOCs { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; + + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NOCs::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NOCs namespace FabricsList { struct TypeInfo { @@ -15071,6 +15089,7 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Attributes::NOCs::TypeInfo::DecodableType NOCs; Attributes::FabricsList::TypeInfo::DecodableType fabricsList; Attributes::SupportedFabrics::TypeInfo::DecodableType supportedFabrics = static_cast(0); Attributes::CommissionedFabrics::TypeInfo::DecodableType commissionedFabrics = static_cast(0); diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index b852d6334c9776..863167478b4ac1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -2050,6 +2050,10 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace OperationalCredentials { namespace Attributes { +namespace NOCs { +static constexpr AttributeId Id = 0x00000000; +} // namespace NOCs + namespace FabricsList { static constexpr AttributeId Id = 0x00000001; } // namespace FabricsList diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index eb70159b55a413..cd1593d2b6d88a 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -614,7 +614,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 185 +#define GENERATED_ATTRIBUTE_COUNT 186 #define GENERATED_ATTRIBUTES \ { \ \ @@ -796,6 +796,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -923,34 +924,34 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(141), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(145), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(145), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(151), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(155), \ + ZAP_ATTRIBUTE_INDEX(156), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(157), \ + ZAP_ATTRIBUTE_INDEX(158), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(174), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(179), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(184), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index cc180ac9db53c4..7cf3c6f4105a1e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1514,6 +1514,14 @@ CHIP_ERROR LogValue(const char * label, size_t indent, return err; } } + { + CHIP_ERROR err = LogValue("Icac", indent + 1, value.icac); + if (err != CHIP_NO_ERROR) + { + ChipLogProgress(chipTool, "%sStruct truncated due to invalid value for 'Icac'", IndentStr(indent + 1).c_str()); + return err; + } + } ChipLogProgress(chipTool, "%s}", IndentStr(indent).c_str()); return CHIP_NO_ERROR; } @@ -32513,6 +32521,7 @@ class ReportOnOffSwitchConfigurationClusterRevision : public ModelCommand | * UpdateNOC | 0x07 | |------------------------------------------------------------------------------| | Attributes: | | +| * NOCs | 0x0000 | | * FabricsList | 0x0001 | | * SupportedFabrics | 0x0002 | | * CommissionedFabrics | 0x0003 | @@ -32745,6 +32754,39 @@ class OperationalCredentialsUpdateNOC : public ModelCommand chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; +/* + * Attribute NOCs + */ +class ReadOperationalCredentialsNOCs : public ModelCommand +{ +public: + ReadOperationalCredentialsNOCs() : ModelCommand("read") + { + AddArgument("attr-name", "nocs"); + ModelCommand::AddArguments(); + } + + ~ReadOperationalCredentialsNOCs() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x003E) ReadAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::OperationalCredentialsCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute( + this, OnAttributeResponse, OnDefaultFailure); + } + + static void OnAttributeResponse( + void * context, + const chip::app::DataModel::DecodableList & + value) + { + OnGeneralAttributeEventResponse(context, "OperationalCredentials.NOCs response", value); + } +}; + /* * Attribute FabricsList */ @@ -60144,8 +60186,11 @@ void registerClusterAccessControl(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60165,6 +60210,7 @@ void registerClusterAccountLogin(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60186,6 +60232,7 @@ void registerClusterAdministratorCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60210,7 +60257,9 @@ void registerClusterApplicationBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60222,13 +60271,15 @@ void registerClusterApplicationLauncher(Commands & commands) const char * clusterName = "ApplicationLauncher"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -60241,9 +60292,11 @@ void registerClusterAudioOutput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60266,6 +60319,7 @@ void registerClusterBarrierControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60320,6 +60374,7 @@ void registerClusterBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60348,6 +60403,7 @@ void registerClusterBinaryInputBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60362,6 +60418,7 @@ void registerClusterBinding(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60376,6 +60433,7 @@ void registerClusterBooleanState(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60402,10 +60460,13 @@ void registerClusterBridgedActions(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60422,6 +60483,7 @@ void registerClusterBridgedDeviceBasic(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60437,7 +60499,9 @@ void registerClusterChannel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60586,6 +60650,7 @@ void registerClusterColorControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60600,10 +60665,12 @@ void registerClusterContentLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60616,10 +60683,15 @@ void registerClusterDescriptor(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60633,6 +60705,7 @@ void registerClusterDiagnosticLogs(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -60690,6 +60763,7 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60734,6 +60808,7 @@ void registerClusterElectricalMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60765,6 +60840,7 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60779,7 +60855,9 @@ void registerClusterFixedLabel(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60800,6 +60878,7 @@ void registerClusterFlowMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60811,20 +60890,22 @@ void registerClusterGeneralCommissioning(Commands & commands) const char * clusterName = "GeneralCommissioning"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -60835,6 +60916,7 @@ void registerClusterGeneralDiagnostics(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60844,9 +60926,13 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -60871,12 +60957,15 @@ void registerClusterGroupKeyManagement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60897,6 +60986,7 @@ void registerClusterGroups(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60917,6 +61007,7 @@ void registerClusterIdentify(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60939,6 +61030,7 @@ void registerClusterIlluminanceMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -60952,6 +61044,7 @@ void registerClusterKeypadInput(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61007,6 +61100,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61020,10 +61114,11 @@ void registerClusterLocalizationConfiguration(Commands & commands) const char * clusterName = "LocalizationConfiguration"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -61035,6 +61130,7 @@ void registerClusterLowPower(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61051,9 +61147,11 @@ void registerClusterMediaInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61089,6 +61187,7 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61104,6 +61203,7 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61112,6 +61212,7 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61132,6 +61233,7 @@ void registerClusterNetworkCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61162,6 +61264,7 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61175,6 +61278,7 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61182,6 +61286,7 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61206,6 +61311,7 @@ void registerClusterOccupancySensing(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61237,6 +61343,7 @@ void registerClusterOnOff(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61256,6 +61363,7 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61267,26 +61375,30 @@ void registerClusterOperationalCredentials(Commands & commands) const char * clusterName = "OperationalCredentials"; commands_list clusterCommands = { - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // }; commands.Register(clusterName, clusterCommands); @@ -61311,9 +61423,11 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61328,7 +61442,9 @@ void registerClusterPowerSourceConfiguration(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61347,6 +61463,7 @@ void registerClusterPressureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61411,6 +61528,7 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61467,6 +61585,7 @@ void registerClusterRelativeHumidityMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61496,6 +61615,7 @@ void registerClusterScenes(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61509,6 +61629,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61516,6 +61637,7 @@ void registerClusterSoftwareDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61538,6 +61660,7 @@ void registerClusterSwitch(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61567,9 +61690,11 @@ void registerClusterTargetNavigator(Commands & commands) commands_list clusterCommands = { make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61590,6 +61715,7 @@ void registerClusterTemperatureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61698,8 +61824,11 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61719,6 +61848,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61735,6 +61865,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61838,6 +61969,7 @@ void registerClusterTestCluster(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61900,6 +62032,7 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -61923,6 +62056,7 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -61950,7 +62084,9 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -62052,11 +62188,15 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -62073,6 +62213,7 @@ void registerClusterUserLabel(Commands & commands) commands_list clusterCommands = { make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -62087,6 +62228,7 @@ void registerClusterWakeOnLan(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; @@ -62126,6 +62268,7 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -62190,6 +62333,7 @@ void registerClusterWindowCovering(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index fecc36d4c81cda..170715059f035b 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -1535,6 +1535,27 @@ void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(TLV::TLVRea cb->mCall(cb->mContext, list); } +void OperationalCredentialsClusterNOCsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h index ec54dfcb20c4bd..5d65cea0bd2746 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -443,6 +443,13 @@ void OnOffSwitchConfigurationClusterAttributeListListAttributeFilter(chip::TLV:: chip::Callback::Cancelable * onFailureCallback); typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void OperationalCredentialsClusterNOCsListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OperationalCredentialsNOCsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); void OperationalCredentialsClusterFabricsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h index b2ed6f1aae5f7d..7a0994d8865813 100644 --- a/zzz_generated/door-lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/door-lock-app/zap-generated/endpoint_config.h @@ -615,7 +615,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 196 +#define GENERATED_ATTRIBUTE_COUNT 197 #define GENERATED_ATTRIBUTES \ { \ \ @@ -809,6 +809,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -937,22 +938,22 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(160), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(162), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(163), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(164), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(168), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(169), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { 0x00000101, \ - ZAP_ATTRIBUTE_INDEX(177), \ + ZAP_ATTRIBUTE_INDEX(178), \ 19, \ 29, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index e4d89535e5a70c..5e86e95c68f629 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -587,7 +587,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 230 +#define GENERATED_ATTRIBUTE_COUNT 231 #define GENERATED_ATTRIBUTES \ { \ \ @@ -789,6 +789,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -977,52 +978,52 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(155), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(169), \ + ZAP_ATTRIBUTE_INDEX(170), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(173), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(179), \ + ZAP_ATTRIBUTE_INDEX(180), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(196), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x00000300, \ - ZAP_ATTRIBUTE_INDEX(200), \ + ZAP_ATTRIBUTE_INDEX(201), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(222), \ + ZAP_ATTRIBUTE_INDEX(223), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x00000006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(227), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x00000007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000007, ZAP_ATTRIBUTE_INDEX(228), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } diff --git a/zzz_generated/lock-app/zap-generated/endpoint_config.h b/zzz_generated/lock-app/zap-generated/endpoint_config.h index 940cd4d5f04bc2..cff3acdf5af1ee 100644 --- a/zzz_generated/lock-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lock-app/zap-generated/endpoint_config.h @@ -601,7 +601,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 184 +#define GENERATED_ATTRIBUTE_COUNT 185 #define GENERATED_ATTRIBUTES \ { \ \ @@ -795,6 +795,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -904,25 +905,25 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(149), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(153), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(159), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(160), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(161), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(162), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(163), \ + ZAP_ATTRIBUTE_INDEX(164), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(170), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(171), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000002F, ZAP_ATTRIBUTE_INDEX(175), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000002F, ZAP_ATTRIBUTE_INDEX(176), 9, 133, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ } diff --git a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h index 0f0dec8d2fdaed..54f0aa2703303d 100644 --- a/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-provider-app/zap-generated/endpoint_config.h @@ -133,7 +133,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 29 +#define GENERATED_ATTRIBUTE_COUNT 30 #define GENERATED_ATTRIBUTES \ { \ \ @@ -166,6 +166,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -208,13 +209,13 @@ 0x00000031, ZAP_ATTRIBUTE_INDEX(9), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(19), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(19), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(25), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(26), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(27), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(28), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } diff --git a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h index b6ff7cb435d086..beb34abee0e70f 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h +++ b/zzz_generated/ota-requestor-app/zap-generated/endpoint_config.h @@ -143,7 +143,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 46 +#define GENERATED_ATTRIBUTE_COUNT 47 #define GENERATED_ATTRIBUTES \ { \ \ @@ -202,6 +202,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -256,13 +257,13 @@ 0x00000031, ZAP_ATTRIBUTE_INDEX(26), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(36), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(36), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(42), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(43), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(44), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(45), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ } diff --git a/zzz_generated/pump-app/zap-generated/endpoint_config.h b/zzz_generated/pump-app/zap-generated/endpoint_config.h index 104762c2e4798d..26c3e57ce4d65c 100644 --- a/zzz_generated/pump-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-app/zap-generated/endpoint_config.h @@ -483,7 +483,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 179 +#define GENERATED_ATTRIBUTE_COUNT 180 #define GENERATED_ATTRIBUTES \ { \ \ @@ -635,6 +635,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -786,54 +787,54 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(115), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(119), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(119), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(125), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(126), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(127), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(128), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(129), \ + ZAP_ATTRIBUTE_INDEX(130), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(131), \ + ZAP_ATTRIBUTE_INDEX(132), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(133), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(134), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ 0x00000200, \ - ZAP_ATTRIBUTE_INDEX(138), \ + ZAP_ATTRIBUTE_INDEX(139), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(166), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(169), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(170), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(171), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(174), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(175), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(175), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(176), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ } diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index afa75ebd00f201..ca3bd1b79a8d1f 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -553,7 +553,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 166 +#define GENERATED_ATTRIBUTE_COUNT 167 #define GENERATED_ATTRIBUTES \ { \ \ @@ -738,6 +738,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -836,31 +837,31 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(142), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(146), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(146), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(152), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(153), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(154), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(155), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000006, ZAP_ATTRIBUTE_INDEX(156), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000006, ZAP_ATTRIBUTE_INDEX(157), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/Off (client) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(157), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(158), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000200, ZAP_ATTRIBUTE_INDEX(162), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000200, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(163), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(164), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(165), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(166), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h index 4ecaf943a36fda..a7f70cecbdeab3 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h +++ b/zzz_generated/temperature-measurement-app/zap-generated/endpoint_config.h @@ -279,7 +279,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 96 +#define GENERATED_ATTRIBUTE_COUNT 97 #define GENERATED_ATTRIBUTES \ { \ \ @@ -389,6 +389,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -472,19 +473,19 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(73), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(77), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(77), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(83), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(84), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(85), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(86), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(87), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(88), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(92), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(93), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ } @@ -524,7 +525,7 @@ // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 22, 22 \ + 22, 770 \ } // Array of device versions diff --git a/zzz_generated/thermostat/zap-generated/endpoint_config.h b/zzz_generated/thermostat/zap-generated/endpoint_config.h index e2cb98a185e315..a8389277489a12 100644 --- a/zzz_generated/thermostat/zap-generated/endpoint_config.h +++ b/zzz_generated/thermostat/zap-generated/endpoint_config.h @@ -664,7 +664,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 213 +#define GENERATED_ATTRIBUTE_COUNT 214 #define GENERATED_ATTRIBUTES \ { \ \ @@ -868,6 +868,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -1040,46 +1041,46 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(153), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(157), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(157), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(163), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(164), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000003, ZAP_ATTRIBUTE_INDEX(170), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000003, ZAP_ATTRIBUTE_INDEX(171), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Identify (client) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(171), \ + ZAP_ATTRIBUTE_INDEX(172), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(175), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x00000005, \ - ZAP_ATTRIBUTE_INDEX(176), \ + ZAP_ATTRIBUTE_INDEX(177), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x00000028, \ - ZAP_ATTRIBUTE_INDEX(182), \ + ZAP_ATTRIBUTE_INDEX(183), \ 12, \ 246, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayBasicServer }, /* Endpoint: 1, Cluster: Basic (server) */ \ { 0x00000201, \ - ZAP_ATTRIBUTE_INDEX(194), \ + ZAP_ATTRIBUTE_INDEX(195), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp index 364d524c96cbaf..72365cba8d105e 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp @@ -176,6 +176,27 @@ void NetworkCommissioningClusterNetworksListAttributeFilter(TLV::TLVReader * tlv cb->mCall(cb->mContext, list); } +void OperationalCredentialsClusterNOCsListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) +{ + chip::app::DataModel::DecodableList list; + CHIP_ERROR err = Decode(*tlvData, list); + if (err != CHIP_NO_ERROR) + { + if (onFailureCallback != nullptr) + { + Callback::Callback * cb = + Callback::Callback::FromCancelable(onFailureCallback); + cb->mCall(cb->mContext, EMBER_ZCL_STATUS_INVALID_VALUE); + } + return; + } + + Callback::Callback * cb = + Callback::Callback::FromCancelable(onSuccessCallback); + cb->mCall(cb->mContext, list); +} + void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader * tlvData, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h index 56c4b1679dbc74..2506041e81c1fc 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.h @@ -71,6 +71,13 @@ typedef void (*NetworkCommissioningNetworksListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void OperationalCredentialsClusterNOCsListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*OperationalCredentialsNOCsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); void OperationalCredentialsClusterFabricsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 0cdf900844b192..c89f89f8827223 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -1010,7 +1010,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 285 +#define GENERATED_ATTRIBUTE_COUNT 286 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1219,6 +1219,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -1506,100 +1507,100 @@ 0x0000003E, ZAP_ATTRIBUTE_INDEX(158), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(159), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(165), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(166), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(168), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(172), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(173), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(176), \ + ZAP_ATTRIBUTE_INDEX(177), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(178), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(179), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000503, ZAP_ATTRIBUTE_INDEX(183), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(184), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(185), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(186), 4, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(189), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(190), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(192), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(193), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x00000508, ZAP_ATTRIBUTE_INDEX(195), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000508, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x00000509, ZAP_ATTRIBUTE_INDEX(196), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(197), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(197), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(198), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(200), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(201), 3, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(203), \ + ZAP_ATTRIBUTE_INDEX(204), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(205), \ + ZAP_ATTRIBUTE_INDEX(206), \ 16, \ 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(222), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(227), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x00000506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(235), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(243), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(246), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x0000050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(255), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(256), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(261), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(264), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(273), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(278), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 40e6a557093dd6..d3430300c1c3dd 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -876,7 +876,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 413 +#define GENERATED_ATTRIBUTE_COUNT 414 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1075,6 +1075,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -1562,159 +1563,159 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(151), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(155), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(155), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x0000003F, ZAP_ATTRIBUTE_INDEX(161), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003F, ZAP_ATTRIBUTE_INDEX(162), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Group Key Management (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(164), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(165), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(166), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(167), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(168), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(169), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(172), \ + ZAP_ATTRIBUTE_INDEX(173), \ 2, \ 4, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000004, \ - ZAP_ATTRIBUTE_INDEX(174), \ + ZAP_ATTRIBUTE_INDEX(175), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 1, Cluster: Groups (server) */ \ { 0x00000005, \ - ZAP_ATTRIBUTE_INDEX(176), \ + ZAP_ATTRIBUTE_INDEX(177), \ 6, \ 8, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayScenesServer }, /* Endpoint: 1, Cluster: Scenes (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(182), \ + ZAP_ATTRIBUTE_INDEX(183), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x00000008, \ - ZAP_ATTRIBUTE_INDEX(189), \ + ZAP_ATTRIBUTE_INDEX(190), \ 15, \ 23, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x0000000F, ZAP_ATTRIBUTE_INDEX(204), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000000F, ZAP_ATTRIBUTE_INDEX(205), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(208), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(209), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x0000001E, ZAP_ATTRIBUTE_INDEX(213), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001E, ZAP_ATTRIBUTE_INDEX(214), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x00000039, ZAP_ATTRIBUTE_INDEX(214), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000039, ZAP_ATTRIBUTE_INDEX(215), 15, 646, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x0000003B, ZAP_ATTRIBUTE_INDEX(229), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003B, ZAP_ATTRIBUTE_INDEX(230), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(232), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(233), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { 0x00000101, \ - ZAP_ATTRIBUTE_INDEX(234), \ + ZAP_ATTRIBUTE_INDEX(235), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(262), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(263), 19, 31, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x00000103, ZAP_ATTRIBUTE_INDEX(281), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000103, ZAP_ATTRIBUTE_INDEX(282), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { 0x00000201, \ - ZAP_ATTRIBUTE_INDEX(286), \ + ZAP_ATTRIBUTE_INDEX(287), \ 10, \ 17, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { 0x00000300, \ - ZAP_ATTRIBUTE_INDEX(296), \ + ZAP_ATTRIBUTE_INDEX(297), \ 51, \ 337, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x00000402, ZAP_ATTRIBUTE_INDEX(347), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000402, ZAP_ATTRIBUTE_INDEX(348), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x00000403, ZAP_ATTRIBUTE_INDEX(351), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000403, ZAP_ATTRIBUTE_INDEX(352), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x00000404, ZAP_ATTRIBUTE_INDEX(355), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000404, ZAP_ATTRIBUTE_INDEX(356), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x00000405, ZAP_ATTRIBUTE_INDEX(359), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000405, ZAP_ATTRIBUTE_INDEX(360), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x00000500, \ - ZAP_ATTRIBUTE_INDEX(363), \ + ZAP_ATTRIBUTE_INDEX(364), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x00000503, ZAP_ATTRIBUTE_INDEX(369), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000503, ZAP_ATTRIBUTE_INDEX(370), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x00000504, ZAP_ATTRIBUTE_INDEX(371), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000504, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x00000505, ZAP_ATTRIBUTE_INDEX(372), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000505, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x00000506, ZAP_ATTRIBUTE_INDEX(373), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000506, ZAP_ATTRIBUTE_INDEX(374), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x00000507, ZAP_ATTRIBUTE_INDEX(374), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000507, ZAP_ATTRIBUTE_INDEX(375), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x00000509, ZAP_ATTRIBUTE_INDEX(375), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x00000509, ZAP_ATTRIBUTE_INDEX(376), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x0000050A, ZAP_ATTRIBUTE_INDEX(376), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050A, ZAP_ATTRIBUTE_INDEX(377), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x0000050B, ZAP_ATTRIBUTE_INDEX(377), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050B, ZAP_ATTRIBUTE_INDEX(378), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x0000050C, ZAP_ATTRIBUTE_INDEX(378), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050C, ZAP_ATTRIBUTE_INDEX(379), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x0000050D, ZAP_ATTRIBUTE_INDEX(379), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050D, ZAP_ATTRIBUTE_INDEX(380), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x0000050E, ZAP_ATTRIBUTE_INDEX(380), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0000050E, ZAP_ATTRIBUTE_INDEX(381), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x0000050F, ZAP_ATTRIBUTE_INDEX(381), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000050F, ZAP_ATTRIBUTE_INDEX(382), 21, 1582, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { 0x00000006, \ - ZAP_ATTRIBUTE_INDEX(402), \ + ZAP_ATTRIBUTE_INDEX(403), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(404), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(405), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x00000406, \ - ZAP_ATTRIBUTE_INDEX(409), \ + ZAP_ATTRIBUTE_INDEX(410), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1757,7 +1758,7 @@ // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 22, 22, 22 \ + 22, 35, 263 \ } // Array of device versions diff --git a/zzz_generated/window-app/zap-generated/endpoint_config.h b/zzz_generated/window-app/zap-generated/endpoint_config.h index 02a0ad09110f03..516a745035ddbb 100644 --- a/zzz_generated/window-app/zap-generated/endpoint_config.h +++ b/zzz_generated/window-app/zap-generated/endpoint_config.h @@ -609,7 +609,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 226 +#define GENERATED_ATTRIBUTE_COUNT 227 #define GENERATED_ATTRIBUTES \ { \ \ @@ -812,6 +812,7 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NOCs */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* fabrics list */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ { 0x00000003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* CommissionedFabrics */ \ @@ -972,31 +973,31 @@ 0x0000003C, ZAP_ATTRIBUTE_INDEX(159), 4, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { \ - 0x0000003E, ZAP_ATTRIBUTE_INDEX(163), 6, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000003E, ZAP_ATTRIBUTE_INDEX(163), 7, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { \ - 0x00000040, ZAP_ATTRIBUTE_INDEX(169), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000040, ZAP_ATTRIBUTE_INDEX(170), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { \ - 0x00000041, ZAP_ATTRIBUTE_INDEX(171), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000041, ZAP_ATTRIBUTE_INDEX(172), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 0, Cluster: User Label (server) */ \ { 0x00000003, \ - ZAP_ATTRIBUTE_INDEX(173), \ + ZAP_ATTRIBUTE_INDEX(174), \ 3, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayIdentifyServer }, /* Endpoint: 1, Cluster: Identify (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(176), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(177), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(181), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(182), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0000001D, ZAP_ATTRIBUTE_INDEX(201), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0000001D, ZAP_ATTRIBUTE_INDEX(202), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x00000102, ZAP_ATTRIBUTE_INDEX(206), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x00000102, ZAP_ATTRIBUTE_INDEX(207), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Window Covering (server) */ \ }