Energy Management autogen XML from Alchemy using 1.5 candidate spec (#37986)
* Add support for money and new electrical data types
* Update chip-types.xml with new energy types and money
* Revert changes to generated attribute-type.h file
* Revert reversion of generated attribute-type.h
* Update attribute-type.h
* Generated XML files from Alchemy for new clusters and refreshed older EM clusters with latest Alchemy.
* Added missing zap_cluster_list.json
* Added missing CurrencyStruct
* zap_regen_all
* Fix-up EEM/EPM and apps that use them because the Structs and Enums have moved to Globals:: namespace
* Fix CI issue - Re-did bootstrap to pick up new ZAP, and regen_all. Updated ChipStructs.java which was different in CI
* Reverted back to using existing measurement-and-sensing-.xml to avoid API backwards compatibility change.
* Regen_all to revert all .matter files back to remove global MeasurementType enum
* Another regen_all
* Manually added missing description to the clusters to hopefully fix the IDL parsing errors.
* Regen_all to include description tag from XML.
* Updated ChipStructs.java after previous regen_all
* Reverted existing cluster XMLs per review request to keep it out of this PR
* Regenerated with Alchemy 1.15.5 and latest spec and SuppliedAttributionData has gone again
* regen_all after removing SuppliedAttributionData and EEM cluster reverted
* Updated Alchemy and used --attribute="in-progress" this time
* Zap regen
* Restyle and zap regen
* Zap regen again
---------
Co-authored-by: Hasty Granbery <hasty@granbery.org>
Co-authored-by: Hasty Granbery <granbery@google.com>
Co-authored-by: Andrei Litvin <andy314@gmail.com>
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index 0b9e832..12f8391 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -96,9 +96,13 @@
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/closure-dimension-cluster.xml \
+ src/app/zap-templates/zcl/data-model/chip/commodity-metering-cluster.xml \
+ src/app/zap-templates/zcl/data-model/chip/commodity-price-cluster.xml \
+ src/app/zap-templates/zcl/data-model/chip/commodity-tariff-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
+ src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/push-av-stream-transport-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \
src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \
diff --git a/docs/ids_and_codes/zap_clusters.md b/docs/ids_and_codes/zap_clusters.md
index 822da48..50c8cfd 100644
--- a/docs/ids_and_codes/zap_clusters.md
+++ b/docs/ids_and_codes/zap_clusters.md
@@ -78,6 +78,7 @@
| 144 | 0x90 | ElectricalPowerMeasurement |
| 145 | 0x91 | ElectricalEnergyMeasurement |
| 148 | 0x94 | WaterHeaterManagement |
+| 149 | 0x95 | CommodityPrice |
| 150 | 0x96 | DemandResponseLoadControl |
| 151 | 0x97 | Messages |
| 152 | 0x98 | DeviceEnergyManagement |
@@ -138,10 +139,13 @@
| 1364 | 0x554 | WebRTCTransportRequestor |
| 1365 | 0x555 | PushAvStreamTransport |
| 1366 | 0x556 | Chime |
+| 1792 | 0x700 | CommodityTariff |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
| 2049 | 0x801 | TlsCertificateManagement |
| 2050 | 0x802 | TlsClientManagement |
+| 2822 | 0xB06 | MeterIdentification |
+| 2823 | 0xB07 | CommodityMetering |
| 4294048773 | 0xFFF1FC05 | UnitTesting |
| 4294048774 | 0xFFF1FC06 | FaultInjection |
| 4294048800 | 0xFFF1FC20 | SampleMei |
diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter
index 692f2c4..2d2d30a 100644
--- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter
+++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter
index c788f9e..f8d4d39 100644
--- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter
+++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
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 789d207..943f595 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
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
@@ -4281,6 +4316,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
enum PowerModeEnum : enum8 {
@@ -4386,6 +4423,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
bitmap Feature : bitmap32 {
diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
index 5fbd25b..311bd5c 100644
--- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
+++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter
index a9860a2..a513b8d 100644
--- a/examples/bridge-app/bridge-common/bridge-app.matter
+++ b/examples/bridge-app/bridge-common/bridge-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/camera-app/camera-common/camera-app.matter b/examples/camera-app/camera-common/camera-app.matter
index fafed94..aa024e8 100644
--- a/examples/camera-app/camera-common/camera-app.matter
+++ b/examples/camera-app/camera-common/camera-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/icd_rootnode_contactsensor_ed3b19ec55.matter b/examples/chef/devices/icd_rootnode_contactsensor_ed3b19ec55.matter
index 9cc62e5..423985b 100644
--- a/examples/chef/devices/icd_rootnode_contactsensor_ed3b19ec55.matter
+++ b/examples/chef/devices/icd_rootnode_contactsensor_ed3b19ec55.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
index f494aab..cfdd611 100644
--- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
+++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter
index b40160c..a095cb6 100644
--- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter
+++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter
index 416d45a..ebd8b4e 100644
--- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter
+++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter
index cd6081d..c2ca06e 100644
--- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter
+++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter
index b0cfc02..264bb3e 100644
--- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter
+++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter
index 9c08c3a..d592b0a 100644
--- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter
+++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter
index 0c82c34..bc23ff3 100644
--- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter
+++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter
index 35cf35d..df88761 100644
--- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter
+++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter b/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter
index 6613c88..2c8b0cf 100644
--- a/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter
+++ b/examples/chef/devices/rootnode_contactsensor_lightsensor_occupancysensor_temperaturesensor_pressuresensor_flowsensor_humiditysensor_airqualitysensor_powersource_367e7cea91.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
index 81ab6e7..86fdbe4 100644
--- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
+++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
index 7da02c9..6c79c93 100644
--- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
+++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter
index 5947d8c..52d2c7e 100644
--- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter
+++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
index 018c9bc..98b0d3f 100644
--- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
+++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
index 6610bee..761b88b 100644
--- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
+++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
index 78c9595..ed277f3 100644
--- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
+++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter
index fee069e..2ff1d1b 100644
--- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter
+++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter
index 5c7a003..13d897e 100644
--- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter
+++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter
index c6b3353..aab48a0 100644
--- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter
+++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter
index cdcd56a..bdda674 100644
--- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter
+++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter
index 1ec32ed..16a7fbf 100644
--- a/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter
+++ b/examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
@@ -1569,6 +1604,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
enum PowerModeEnum : enum8 {
@@ -1674,6 +1711,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
bitmap Feature : bitmap32 {
diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter
index 9fb887b..bbc4bdb 100644
--- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter
+++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter
index fe12a73..9b597b2 100644
--- a/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter
+++ b/examples/chef/devices/rootnode_laundrydryer_01796fe396.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter
index 969ec35..8b9578b 100644
--- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter
+++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter
index 86de372..f12bb35 100644
--- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter
+++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_mounteddimmableloadcontrol_a9a1a87f2d.matter b/examples/chef/devices/rootnode_mounteddimmableloadcontrol_a9a1a87f2d.matter
index f92dbb9..845ef32 100644
--- a/examples/chef/devices/rootnode_mounteddimmableloadcontrol_a9a1a87f2d.matter
+++ b/examples/chef/devices/rootnode_mounteddimmableloadcontrol_a9a1a87f2d.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_mountedonoffcontrol_ec30c757a6.matter b/examples/chef/devices/rootnode_mountedonoffcontrol_ec30c757a6.matter
index c80df1f..97d38db 100644
--- a/examples/chef/devices/rootnode_mountedonoffcontrol_ec30c757a6.matter
+++ b/examples/chef/devices/rootnode_mountedonoffcontrol_ec30c757a6.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
index 1ce3d41..e0997a7 100644
--- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
+++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter
index 1edf9ce..8087992 100644
--- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter
+++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter
index 9c0e558..c08de97 100644
--- a/examples/chef/devices/rootnode_onofflight_samplemei.matter
+++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter
index 8ba9da0..e0d81b1 100644
--- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter
+++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter
index e2c9568..a380c60 100644
--- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter
+++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter
index 80c15bc..d631adf 100644
--- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter
+++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter
index b6efb2e..3ad75f7 100644
--- a/examples/chef/devices/rootnode_pump_5f904818cc.matter
+++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter
index 52dabb7..954afec 100644
--- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter
+++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter b/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter
index d11a263..65f5154 100644
--- a/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter
+++ b/examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter
index 746dc40..7d887d8 100644
--- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter
+++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter
index d922143..0f59ad9 100644
--- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter
+++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter
index fe4e455..6ce8e88 100644
--- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter
+++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter
index df0a5d9..d3276c8 100644
--- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter
+++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter
index 22b392a..bbd8682 100644
--- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter
+++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter
index 0b481ef..6766da6 100644
--- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter
+++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
index e2539ae..262a889 100644
--- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
+++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter b/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter
index aae12a4..d1c8142 100644
--- a/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter
+++ b/examples/chef/devices/rootnode_waterfreezedetector_dd94a13a16.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter
index f148c43..fe711b7 100644
--- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter
+++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter
index d733db9..a8c855d 100644
--- a/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter
+++ b/examples/chef/devices/rootnode_watervalve_6bb39f1f67.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter
index ff8e6ad..ec73d0d 100644
--- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter
+++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/closure-app/closure-common/closure-app.matter b/examples/closure-app/closure-common/closure-app.matter
index f844dd9..edd3c80 100644
--- a/examples/closure-app/closure-common/closure-app.matter
+++ b/examples/closure-app/closure-common/closure-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter b/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter
index 4e310b1..72e2086 100644
--- a/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter
+++ b/examples/contact-sensor-app/bouffalolab/data_model/contact-sensor-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter
index 10e236a..7fc4d4d 100644
--- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter
+++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter
index c199b2a..444579b 100644
--- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter
+++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter
index 4f3fa5c..0ff433f 100644
--- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter
+++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter
index e596f79..dcddf43 100644
--- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter
+++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter
index 388d077..1b26fa0 100644
--- a/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter
+++ b/examples/dishwasher-app/silabs/data_model/dishwasher-thread-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
@@ -1861,6 +1896,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
enum PowerModeEnum : enum8 {
@@ -1966,6 +2003,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
bitmap Feature : bitmap32 {
diff --git a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter
index 7729377..fc1e73f 100644
--- a/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter
+++ b/examples/dishwasher-app/silabs/data_model/dishwasher-wifi-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
@@ -1772,6 +1807,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
enum PowerModeEnum : enum8 {
@@ -1877,6 +1914,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
bitmap Feature : bitmap32 {
diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter
index cca45eb..081c94a 100644
--- a/examples/energy-management-app/energy-management-common/energy-management-app.matter
+++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
@@ -1746,6 +1781,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
enum PowerModeEnum : enum8 {
@@ -1851,6 +1888,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
bitmap Feature : bitmap32 {
diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap
index 4038910..b483385 100644
--- a/examples/energy-management-app/energy-management-common/energy-management-app.zap
+++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap
@@ -3270,7 +3270,7 @@
"code": 9,
"mfgCode": null,
"side": "server",
- "type": "power_mw",
+ "type": "power_mvar",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -3286,7 +3286,7 @@
"code": 10,
"mfgCode": null,
"side": "server",
- "type": "power_mw",
+ "type": "power_mva",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -5359,7 +5359,7 @@
"code": 9,
"mfgCode": null,
"side": "server",
- "type": "power_mw",
+ "type": "power_mvar",
"included": 1,
"storageOption": "External",
"singleton": 0,
@@ -5375,7 +5375,7 @@
"code": 10,
"mfgCode": null,
"side": "server",
- "type": "power_mw",
+ "type": "power_mva",
"included": 1,
"storageOption": "External",
"singleton": 0,
diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter
index 2f4a999..edb3759 100644
--- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter
+++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/fabric-sync/bridge/fabric-bridge.matter b/examples/fabric-sync/bridge/fabric-bridge.matter
index 2f4a999..edb3759 100644
--- a/examples/fabric-sync/bridge/fabric-bridge.matter
+++ b/examples/fabric-sync/bridge/fabric-bridge.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter
index f777125..fa9988d 100644
--- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter
+++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter
index 1bd3367..6a6fa27 100644
--- a/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter
+++ b/examples/light-switch-app/light-switch-common/icd-lit-light-switch-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter
index 704948b..4fdb824 100644
--- a/examples/light-switch-app/light-switch-common/light-switch-app.matter
+++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter
index 654db94..8a5b2d7 100644
--- a/examples/light-switch-app/qpg/zap/switch.matter
+++ b/examples/light-switch-app/qpg/zap/switch.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_11.matter b/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_11.matter
index 15bc4c2..d4b8632 100644
--- a/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_11.matter
+++ b/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_11.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_2.matter b/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_2.matter
index 56d43e8..8b68f7f 100644
--- a/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_2.matter
+++ b/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_2.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_8.matter b/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_8.matter
index 7e4d123..e0e1e22 100644
--- a/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_8.matter
+++ b/examples/light-switch-app/realtek_bee/data_model/light-switch-app-1_to_8.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter
index 5010c74..03907d7 100644
--- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter
+++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter
index 2423a90..b510f26 100644
--- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter
+++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter
index 59d1212..39bc666 100644
--- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter
+++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter
index f5793c6..b93138a 100644
--- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter
+++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter
index 9249293..3587fb5 100644
--- a/examples/lighting-app/lighting-common/lighting-app.matter
+++ b/examples/lighting-app/lighting-common/lighting-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter
index 0bd0d49..93b6520 100644
--- a/examples/lighting-app/nxp/zap/lighting-on-off.matter
+++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter
index f7be37b..fef4bd2 100644
--- a/examples/lighting-app/qpg/zap/light.matter
+++ b/examples/lighting-app/qpg/zap/light.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/realtek_bee/data_model/lighting-app.matter b/examples/lighting-app/realtek_bee/data_model/lighting-app.matter
index 27d508d..3ee0c6f 100644
--- a/examples/lighting-app/realtek_bee/data_model/lighting-app.matter
+++ b/examples/lighting-app/realtek_bee/data_model/lighting-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter
index e6ee9b4..043d7a2 100644
--- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter
+++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter
index 720f3cf..4e13dcd 100644
--- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter
+++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter
index e7c43c2..b18863c 100644
--- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter
+++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter
index 0647154..e674368 100644
--- a/examples/lock-app/lock-common/lock-app.matter
+++ b/examples/lock-app/lock-common/lock-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter
index e45533b..d6c89cf 100644
--- a/examples/lock-app/nxp/zap/lock-app.matter
+++ b/examples/lock-app/nxp/zap/lock-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter
index b93f1a5..caa963f 100644
--- a/examples/lock-app/qpg/zap/lock.matter
+++ b/examples/lock-app/qpg/zap/lock.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/lock-app/silabs/data_model/lock-app.matter b/examples/lock-app/silabs/data_model/lock-app.matter
index cb72147..d806f10 100644
--- a/examples/lock-app/silabs/data_model/lock-app.matter
+++ b/examples/lock-app/silabs/data_model/lock-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 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 2cd60c1..e661744 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
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter
index 2d8f6c4..7c11b79 100644
--- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter
+++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter
index 1d225fc..a2fdb88 100644
--- a/examples/network-manager-app/network-manager-common/network-manager-app.matter
+++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
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 a783610..37ae0be 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
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 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 bffa081..7621c6f 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
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter
index 45ac050..19cb957 100644
--- a/examples/placeholder/linux/apps/app1/config.matter
+++ b/examples/placeholder/linux/apps/app1/config.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter
index 48321db..60f1d65 100644
--- a/examples/placeholder/linux/apps/app2/config.matter
+++ b/examples/placeholder/linux/apps/app2/config.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter
index a77a093..0b8343c 100644
--- a/examples/pump-app/pump-common/pump-app.matter
+++ b/examples/pump-app/pump-common/pump-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter
index 15699e9..9df8781 100644
--- a/examples/pump-app/silabs/data_model/pump-thread-app.matter
+++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter
index 15699e9..9df8781 100644
--- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter
+++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 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 460b291..284a710 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
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter
index bae48e8..3257b0b 100644
--- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter
+++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter
index 03d1ffd..2e4d5ce 100644
--- a/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter
+++ b/examples/refrigerator-app/silabs/data_model/refrigerator-thread-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter
index fa4918d..980ff7a 100644
--- a/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter
+++ b/examples/refrigerator-app/silabs/data_model/refrigerator-wifi-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter
index 453db3a..0b059a6 100644
--- a/examples/rvc-app/rvc-common/rvc-app.matter
+++ b/examples/rvc-app/rvc-common/rvc-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter
index 9cfbd34..4e94134 100644
--- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter
+++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter
index a8f2cae..abb0fa7 100644
--- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter
+++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter b/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter
index 1dd1d51..a6c0077 100644
--- a/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter
+++ b/examples/terms-and-conditions-app/terms-and-conditions-common/terms-and-conditions-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/thermostat/nxp/zap/thermostat_matter_br.matter b/examples/thermostat/nxp/zap/thermostat_matter_br.matter
index 041c052..b025447 100644
--- a/examples/thermostat/nxp/zap/thermostat_matter_br.matter
+++ b/examples/thermostat/nxp/zap/thermostat_matter_br.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter
index 33bae44..cd6c058 100644
--- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter
+++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter
index 14df574..327d0fe 100644
--- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter
+++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter
index b8b2722..7e6fcba 100644
--- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter
+++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter
index 82b9d5b..a5c7a33 100644
--- a/examples/thermostat/thermostat-common/thermostat.matter
+++ b/examples/thermostat/thermostat-common/thermostat.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/thread-br-app/thread-br-common/thread-br-app.matter b/examples/thread-br-app/thread-br-common/thread-br-app.matter
index ea426d6..4ffe28f 100644
--- a/examples/thread-br-app/thread-br-common/thread-br-app.matter
+++ b/examples/thread-br-app/thread-br-common/thread-br-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter
index 32cac21..402942f 100644
--- a/examples/tv-app/tv-common/tv-app.matter
+++ b/examples/tv-app/tv-common/tv-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 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 de25cde..08c5249 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
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter
index d514ce6..b2ea542 100644
--- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter
+++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter
index 2368f2d..ec7213c 100644
--- a/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter
+++ b/examples/water-leak-detector-app/water-leak-detector-common/water-leak-detector-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter
index 548d9d9..0505db3 100644
--- a/examples/window-app/common/window-app.matter
+++ b/examples/window-app/common/window-app.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
diff --git a/scripts/py_matter_idl/matter/idl/data_model_xml/handlers/parsing.py b/scripts/py_matter_idl/matter/idl/data_model_xml/handlers/parsing.py
index 86b9f0b..603bb13 100644
--- a/scripts/py_matter_idl/matter/idl/data_model_xml/handlers/parsing.py
+++ b/scripts/py_matter_idl/matter/idl/data_model_xml/handlers/parsing.py
@@ -104,8 +104,14 @@
# Handle odd casing and naming
_CASE_RENAMES_MAPPING = {
+ "amperage_mA": "amperage_ma",
"power_mW": "power_mw",
- "energy_mWh": "energy_mwh"
+ "power_mVA": "power_mva",
+ "power_mVAR": "power_mvar",
+ "energy_mWh": "energy_mwh",
+ "energy_mVAh": "energy_mvah",
+ "energy_mVARh": "energy_mvarh",
+ "voltage_mV": "voltage_mv",
}
diff --git a/scripts/py_matter_idl/matter/idl/generators/type_definitions.py b/scripts/py_matter_idl/matter/idl/generators/type_definitions.py
index 620b7dc..9327320 100644
--- a/scripts/py_matter_idl/matter/idl/generators/type_definitions.py
+++ b/scripts/py_matter_idl/matter/idl/generators/type_definitions.py
@@ -198,6 +198,8 @@
"elapsed_s": BasicInteger(idl_name="elapsed_s", byte_count=4, is_signed=False),
"endpoint_no": BasicInteger(idl_name="endpoint_no", byte_count=2, is_signed=False),
"energy_mwh": BasicInteger(idl_name="energy_mwh", byte_count=8, is_signed=True),
+ "energy_mvah": BasicInteger(idl_name="energy_mvah", byte_count=8, is_signed=True),
+ "energy_mvarh": BasicInteger(idl_name="energy_mvarh", byte_count=8, is_signed=True),
"entry_idx": BasicInteger(idl_name="entry_idx", byte_count=2, is_signed=False),
"epoch_s": BasicInteger(idl_name="epoch_s", byte_count=4, is_signed=False),
"epoch_us": BasicInteger(idl_name="epoch_us", byte_count=8, is_signed=False),
@@ -207,12 +209,15 @@
"fabric_idx": BasicInteger(idl_name="fabric_idx", byte_count=1, is_signed=False),
"field_id": BasicInteger(idl_name="field_id", byte_count=4, is_signed=False),
"group_id": BasicInteger(idl_name="group_id", byte_count=2, is_signed=False),
+ "money": BasicInteger(idl_name="money", byte_count=8, is_signed=True),
"namespace": BasicInteger(idl_name="namespace", byte_count=1, is_signed=False),
"node_id": BasicInteger(idl_name="node_id", byte_count=8, is_signed=False),
"percent": BasicInteger(idl_name="percent", byte_count=1, is_signed=False),
"percent100ths": BasicInteger(idl_name="percent100ths", byte_count=2, is_signed=False),
"posix_ms": BasicInteger(idl_name="posix_ms", byte_count=8, is_signed=False),
"power_mw": BasicInteger(idl_name="power_mw", byte_count=8, is_signed=True),
+ "power_mva": BasicInteger(idl_name="power_mva", byte_count=8, is_signed=True),
+ "power_mvar": BasicInteger(idl_name="power_mvar", byte_count=8, is_signed=True),
"priority": BasicInteger(idl_name="priority", byte_count=1, is_signed=False),
"semtag": BasicInteger(idl_name="semtag", byte_count=4, is_signed=False),
"status": BasicInteger(idl_name="status", byte_count=1, is_signed=False),
diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint
index e8e6367..48ba4f6 100644
--- a/scripts/rules.matterlint
+++ b/scripts/rules.matterlint
@@ -25,6 +25,9 @@
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/commodity-metering-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/commodity-price-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/commodity-tariff-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/content-app-observer-cluster.xml";
@@ -36,6 +39,7 @@
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-alarm-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/door-lock-cluster.xml";
diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h
index a9d44d5..ee620da 100644
--- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h
+++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h
@@ -87,6 +87,7 @@
#define MATTER_DM_ELECTRICAL_POWER_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_WATER_HEATER_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_PRICE_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
@@ -147,10 +148,13 @@
#define MATTER_DM_WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_PUSH_AV_STREAM_TRANSPORT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_CHIME_CLUSTER_SERVER_ENDPOINT_COUNT (1)
+#define MATTER_DM_COMMODITY_TARIFF_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_METERING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -221,6 +225,7 @@
#define MATTER_DM_ELECTRICAL_POWER_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_WATER_HEATER_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_PRICE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_MESSAGES_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
@@ -281,10 +286,13 @@
#define MATTER_DM_WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_PUSH_AV_STREAM_TRANSPORT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_CHIME_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_TARIFF_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_METERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h
index 9035093..7f5de91 100644
--- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h
+++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h
@@ -87,6 +87,7 @@
#define MATTER_DM_ELECTRICAL_POWER_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_WATER_HEATER_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_PRICE_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_MESSAGES_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -147,10 +148,13 @@
#define MATTER_DM_WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_PUSH_AV_STREAM_TRANSPORT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_CHIME_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_TARIFF_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_METERING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -221,6 +225,7 @@
#define MATTER_DM_ELECTRICAL_POWER_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_WATER_HEATER_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_PRICE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_MESSAGES_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
@@ -281,10 +286,13 @@
#define MATTER_DM_WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_PUSH_AV_STREAM_TRANSPORT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_CHIME_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_TARIFF_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_METER_IDENTIFICATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
+#define MATTER_DM_COMMODITY_METERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
diff --git a/src/app/util/basic-types.h b/src/app/util/basic-types.h
index 449756f..870a9fb 100644
--- a/src/app/util/basic-types.h
+++ b/src/app/util/basic-types.h
@@ -33,8 +33,13 @@
typedef uint8_t Percent;
typedef uint16_t Percent100ths;
typedef int64_t Energy_mWh;
+typedef int64_t Energy_mVAh;
+typedef int64_t Energy_mVARh;
typedef int64_t Amperage_mA;
typedef int64_t Power_mW;
+typedef int64_t Power_mVA;
+typedef int64_t Power_mVAR;
typedef int64_t Voltage_mV;
+typedef int64_t Money;
} // namespace chip
diff --git a/src/app/util/ember-io-storage.cpp b/src/app/util/ember-io-storage.cpp
index cc5eacf..c83288a 100644
--- a/src/app/util/ember-io-storage.cpp
+++ b/src/app/util/ember-io-storage.cpp
@@ -90,10 +90,15 @@
"chip::DataVersion is expected to be uint32_t, change this when necessary");
return ZCL_INT32U_ATTRIBUTE_TYPE;
- case ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE: // Amperage milliamps
- case ZCL_ENERGY_MWH_ATTRIBUTE_TYPE: // Energy milliwatt-hours
- case ZCL_POWER_MW_ATTRIBUTE_TYPE: // Power milliwatts
- case ZCL_VOLTAGE_MV_ATTRIBUTE_TYPE: // Voltage millivolts
+ case ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE: // Amperage milliamps
+ case ZCL_ENERGY_MWH_ATTRIBUTE_TYPE: // Energy milliwatt-hours
+ case ZCL_ENERGY_MVAH_ATTRIBUTE_TYPE: // Energy millivolt-amp-hours
+ case ZCL_ENERGY_MVARH_ATTRIBUTE_TYPE: // Energy millivolt-amp-hours reactive
+ case ZCL_POWER_MW_ATTRIBUTE_TYPE: // Power milliwatts
+ case ZCL_POWER_MVA_ATTRIBUTE_TYPE: // Power millivolt-amps
+ case ZCL_POWER_MVAR_ATTRIBUTE_TYPE: // Power millivolt-amps reactive
+ case ZCL_VOLTAGE_MV_ATTRIBUTE_TYPE: // Voltage millivolts
+ case ZCL_MONEY_ATTRIBUTE_TYPE: // Money
return ZCL_INT64S_ATTRIBUTE_TYPE;
case ZCL_EVENT_NO_ATTRIBUTE_TYPE: // Event Number
diff --git a/src/app/zap-templates/common/override.js b/src/app/zap-templates/common/override.js
index 6930a04..20e8150 100644
--- a/src/app/zap-templates/common/override.js
+++ b/src/app/zap-templates/common/override.js
@@ -75,9 +75,14 @@
case 'percent100ths':
return 'chip::Percent100ths';
case 'power_mw':
+ case 'power_mva':
+ case 'power_mvar':
case 'amperage_ma':
case 'voltage_mv':
case 'energy_mwh':
+ case 'energy_mvah':
+ case 'energy_mvarh':
+ case 'money':
return 'int64_t';
case 'epoch_us':
case 'systime_us':
diff --git a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml
index 77fcb4d..a3fd80c 100644
--- a/src/app/zap-templates/zcl/data-model/chip/chip-types.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/chip-types.xml
@@ -55,10 +55,16 @@
<type id="0x42" description="Character String" name="char_string" composite="true"/>
<type id="0x44" description="Long Character String" name="long_char_string" composite="true"/>
+ <type id="0xD6" description="Power millivolt-amps" name="power_mva" size="8" analog="true" signed="true"/>
+ <type id="0xD7" description="Power millivolt-amps reactive" name="power_mvar" size="8" analog="true" signed="true"/>
<type id="0xD9" description="Power milliwatts" name="power_mw" size="8" analog="true" signed="true"/>
+
<type id="0xDA" description="Amperage milliamps" name="amperage_ma" size="8" analog="true" signed="true"/>
<type id="0xDB" description="Voltage millivolts" name="voltage_mv" size="8" analog="true" signed="true"/>
+
<type id="0xDC" description="Energy milliwatt-hours" name="energy_mwh" size="8" analog="true" signed="true"/>
+ <type id="0xDD" description="Energy millivolt-amp-hours" name="energy_mvah" size="8" analog="true" signed="true"/>
+ <type id="0xDE" description="Energy millivolt-amp-hours reactive" name="energy_mvarh" size="8" analog="true" signed="true"/>
<type id="0xE6" description="Percentage units 1%" name="percent" size="1" analog="true" />
<type id="0xE7" description="Percentage units 0.01%" name="percent100ths" size="2" analog="true" />
@@ -74,6 +80,7 @@
<type id="0xD2" description="Elapsed Time Seconds" name="elapsed_s" size="4" analog="true" />
<type id="0xD8" description="Temperature" name="temperature" size="2" analog="true" signed="true" />
+ <type id="0xF7" description="Money" name="money" size="8" analog="true" signed="true"/>
<type id="0x30" description="8-bit enumeration" name="enum8" size="1" discrete="true" />
<type id="0x31" description="16-bit enumeration" name="enum16" size="2" discrete="true" />
diff --git a/src/app/zap-templates/zcl/data-model/chip/commodity-metering-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commodity-metering-cluster.xml
new file mode 100644
index 0000000..eb04139
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/commodity-metering-cluster.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2025 Project CHIP Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+XML generated by Alchemy; DO NOT EDIT.
+Source: src/app_clusters/CommodityMetering.adoc
+Parameters: in-progress
+Git: 0.7-summer-2025-606-g329573d34
+-->
+<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
+ <domain name="Energy Management"/>
+ <struct name="MeteredQuantityStruct" apiMaturity="provisional">
+ <cluster code="0x0B07"/>
+ <item fieldId="0" name="TariffComponentIDs" array="true" type="int32u"/>
+ <item fieldId="1" name="Quantity" type="int64s"/>
+ </struct>
+
+ <cluster>
+ <domain>Energy Management</domain>
+ <name>Commodity Metering</name>
+ <code>0x0B07</code>
+ <define>COMMODITY_METERING_CLUSTER</define>
+ <description>The Commodity Metering Cluster provides the mechanism for communicating commodity consumption information within a premises.</description>
+ <client init="false" tick="false">true</client>
+ <server init="false" tick="false">true</server>
+ <globalAttribute code="0xFFFD" side="either" value="1"/>
+ <attribute code="0x0000" side="server" name="MeteredQuantity" define="METERED_QUANTITY" type="array" entryType="MeteredQuantityStruct" isNullable="true"/>
+ <attribute code="0x0001" side="server" name="MeteredQuantityTimestamp" define="METERED_QUANTITY_TIMESTAMP" type="epoch_s" isNullable="true"/>
+ <attribute code="0x0002" side="server" name="MeasurementType" define="MEASUREMENT_TYPE" type="MeasurementTypeEnum" isNullable="true" min="0x0000" max="0x0010"/>
+ </cluster>
+</configurator>
diff --git a/src/app/zap-templates/zcl/data-model/chip/commodity-price-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commodity-price-cluster.xml
new file mode 100644
index 0000000..5e8efc5
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/commodity-price-cluster.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2025 Project CHIP Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+XML generated by Alchemy; DO NOT EDIT.
+Source: src/app_clusters/CommodityPrice.adoc
+Parameters: in-progress
+Git: 0.7-summer-2025-606-g329573d34
+-->
+<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
+ <domain name="Energy Management"/>
+ <bitmap name="CommodityPriceDetailBitmap" type="bitmap16">
+ <cluster code="0x0095"/>
+ <field name="Description" mask="0x0001"/>
+ <field name="Components" mask="0x0002"/>
+ </bitmap>
+
+ <struct name="CommodityPriceComponentStruct" apiMaturity="provisional">
+ <cluster code="0x0095"/>
+ <item fieldId="0" name="Price" type="money"/>
+ <item fieldId="1" name="Source" type="TariffPriceTypeEnum" min="0x00" max="0x04"/>
+ <item fieldId="2" name="Description" type="char_string" optional="true" length="32"/>
+ <item fieldId="3" name="TariffComponentID" type="int32u" optional="true"/>
+ </struct>
+
+ <struct name="CommodityPriceStruct" apiMaturity="provisional">
+ <cluster code="0x0095"/>
+ <item fieldId="0" name="PeriodStart" type="epoch_s"/>
+ <item fieldId="1" name="PeriodEnd" type="epoch_s" isNullable="true"/>
+ <item fieldId="2" name="Price" type="PriceStruct"/>
+ <item fieldId="3" name="Description" type="char_string" optional="true" length="32"/>
+ <item fieldId="4" name="Components" array="true" type="CommodityPriceComponentStruct" optional="true" length="10"/>
+ </struct>
+
+ <cluster apiMaturity="provisional">
+ <domain>Energy Management</domain>
+ <name>Commodity Price</name>
+ <code>0x0095</code>
+ <define>COMMODITY_PRICE_CLUSTER</define>
+ <description>The Commodity Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises.</description>
+ <client init="false" tick="false">true</client>
+ <server init="false" tick="false">true</server>
+ <globalAttribute code="0xFFFD" side="either" value="4"/>
+ <attribute code="0x0000" side="server" name="TariffUnit" define="TARIFF_UNIT" type="TariffUnitEnum" min="0x00" max="0x01"/>
+ <attribute code="0x0001" side="server" name="Currency" define="CURRENCY" type="CurrencyStruct" isNullable="true"/>
+ <attribute code="0x0002" side="server" name="CurrentPrice" define="CURRENT_PRICE" type="CommodityPriceStruct" isNullable="true"/>
+ <attribute code="0x0003" side="server" name="PriceForecast" define="PRICE_FORECAST" type="array" entryType="CommodityPriceStruct" optional="true">
+ <mandatoryConform>
+ <feature name="FORE"/>
+ </mandatoryConform>
+ </attribute>
+ <command code="0x00" source="client" name="GetDetailedPriceRequest" optional="true" response="GetDetailedPriceResponse">
+ <description>Upon receipt, this SHALL generate a GetDetailedPrice Response command.</description>
+ <arg id="0" name="Details" type="CommodityPriceDetailBitmap" min="0x0000" max="0x0003"/>
+ <optionalConform/>
+ </command>
+
+ <command code="0x01" source="server" name="GetDetailedPriceResponse" optional="true" disableDefaultResponse="true">
+ <description>This command SHALL be generated in response to a GetDetailedPrice Request command.</description>
+ <arg id="0" name="CurrentPrice" type="CommodityPriceStruct" isNullable="true"/>
+ <mandatoryConform>
+ <command name="GetDetailedPriceRequest"/>
+ </mandatoryConform>
+ </command>
+
+ <command code="0x02" source="client" name="GetDetailedForecastRequest" optional="true" response="GetDetailedForecastResponse">
+ <description>Upon receipt, this SHALL generate a GetDetailedForecast Response command.</description>
+ <arg id="0" name="Details" type="CommodityPriceDetailBitmap" min="0x0000" max="0x0003"/>
+ <optionalConform>
+ <feature name="FORE"/>
+ </optionalConform>
+ </command>
+
+ <command code="0x03" source="server" name="GetDetailedForecastResponse" optional="true" disableDefaultResponse="true">
+ <description>This command SHALL be generated in response to a GetDetailedForecast Request command.</description>
+ <arg id="0" name="PriceForecast" array="true" type="CommodityPriceStruct"/>
+ <mandatoryConform>
+ <command name="GetDetailedForecastRequest"/>
+ </mandatoryConform>
+ </command>
+
+ <event code="0x0000" name="PriceChange" priority="info" side="server" optional="true">
+ <field id="0" name="CurrentPrice" type="CommodityPriceStruct"/>
+ <description>This event SHALL be generated when the vale of the CurrentPrice attribute changes.</description>
+ <optionalConform/>
+ </event>
+
+ <event code="0x0001" name="ForecastChange" priority="info" side="server" optional="true">
+ <field id="0" name="PriceForecast" array="true" type="CommodityPriceStruct"/>
+ <description>This event SHALL be generated when the vale of the PriceForecast attribute changes.</description>
+ <optionalConform/>
+ </event>
+
+ <features>
+ <feature bit="0" code="FORE" name="Forecasting" summary="Forecasts upcoming pricing">
+ <optionalConform/>
+ </feature>
+ </features>
+ </cluster>
+</configurator>
diff --git a/src/app/zap-templates/zcl/data-model/chip/commodity-tariff-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commodity-tariff-cluster.xml
new file mode 100644
index 0000000..edeae29
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/commodity-tariff-cluster.xml
@@ -0,0 +1,230 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2025 Project CHIP Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+XML generated by Alchemy; DO NOT EDIT.
+Source: src/app_clusters/CommodityTariff.adoc
+Parameters: in-progress
+Git: 0.7-summer-2025-606-g329573d34
+-->
+<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
+ <domain name="Energy Management"/>
+ <bitmap name="DayPatternDayOfWeekBitmap" type="bitmap8">
+ <cluster code="0x0700"/>
+ <field name="Sunday" mask="0x01"/>
+ <field name="Monday" mask="0x02"/>
+ <field name="Tuesday" mask="0x04"/>
+ <field name="Wednesday" mask="0x08"/>
+ <field name="Thursday" mask="0x10"/>
+ <field name="Friday" mask="0x20"/>
+ <field name="Saturday" mask="0x40"/>
+ </bitmap>
+
+ <enum name="AuxiliaryLoadSettingEnum" type="enum8">
+ <cluster code="0x0700"/>
+ <item name="Off" value="0x00"/>
+ <item name="On" value="0x01"/>
+ <item name="None" value="0x02"/>
+ </enum>
+
+ <enum name="BlockModeEnum" type="enum8">
+ <cluster code="0x0700"/>
+ <item name="NoBlock" value="0x00"/>
+ <item name="Combined" value="0x01"/>
+ <item name="Individual" value="0x02"/>
+ </enum>
+
+ <enum name="DayEntryRandomizationTypeEnum" type="enum8">
+ <cluster code="0x0700"/>
+ <item name="None" value="0x00"/>
+ <item name="Fixed" value="0x01"/>
+ <item name="Random" value="0x02"/>
+ <item name="RandomPositive" value="0x03"/>
+ <item name="RandomNegative" value="0x04"/>
+ </enum>
+
+ <enum name="DayTypeEnum" type="enum8">
+ <cluster code="0x0700"/>
+ <item name="Standard" value="0x00"/>
+ <item name="Holiday" value="0x01"/>
+ <item name="Dynamic" value="0x02"/>
+ <item name="Event" value="0x03"/>
+ </enum>
+
+ <enum name="PeakPeriodSeverityEnum" type="enum8">
+ <cluster code="0x0700"/>
+ <item name="Unused" value="0x00"/>
+ <item name="Low" value="0x01"/>
+ <item name="Medium" value="0x02"/>
+ <item name="High" value="0x03"/>
+ </enum>
+
+ <struct name="AuxiliaryLoadSwitchSettingsStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="Number" type="int8u"/>
+ <item fieldId="1" name="RequiredState" type="AuxiliaryLoadSettingEnum" min="0x00" max="0x02"/>
+ </struct>
+
+ <struct name="CalendarPeriodStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="StartDate" type="epoch_s" isNullable="true" max="0xFFFFFFFE"/>
+ <item fieldId="1" name="DayPatternIDs" array="true" type="int32u" length="7" minLength="1"/>
+ </struct>
+
+ <struct name="DayEntryStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="DayEntryID" type="int32u"/>
+ <item fieldId="1" name="StartTime" type="int16u" max="1499"/>
+ <item fieldId="2" name="Duration" type="int16u" optional="true" max="1"/>
+ <item fieldId="3" name="RandomizationOffset" type="int16s" optional="true"/>
+ <item fieldId="4" name="RandomizationType" type="DayEntryRandomizationTypeEnum" optional="true" default="0x00" min="0x00" max="0x04"/>
+ </struct>
+
+ <struct name="DayPatternStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="DayPatternID" type="int32u"/>
+ <item fieldId="1" name="DaysOfWeek" type="DayPatternDayOfWeekBitmap" min="0x00" max="0x7F"/>
+ <item fieldId="2" name="DayEntryIDs" array="true" type="int32u" length="96" minLength="1"/>
+ </struct>
+
+ <struct name="DayStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="Date" type="epoch_s"/>
+ <item fieldId="1" name="DayType" type="DayTypeEnum" min="0x00" max="0x03"/>
+ <item fieldId="2" name="DayEntryIDs" array="true" type="int32u" length="96" minLength="1"/>
+ </struct>
+
+ <struct name="PeakPeriodStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="Severity" type="PeakPeriodSeverityEnum" min="0x00" max="0x03"/>
+ <item fieldId="1" name="PeakPeriod" type="int16u" min="1"/>
+ </struct>
+
+ <struct name="TariffComponentStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="TariffComponentID" type="int32u"/>
+ <item fieldId="1" name="Price" type="TariffPriceStruct" isNullable="true" optional="true"/>
+ <item fieldId="2" name="FriendlyCredit" type="boolean" optional="true"/>
+ <item fieldId="3" name="AuxiliaryLoad" type="AuxiliaryLoadSwitchSettingsStruct" optional="true"/>
+ <item fieldId="4" name="PeakPeriod" type="PeakPeriodStruct" optional="true" default="0"/>
+ <item fieldId="5" name="PowerThreshold" type="PowerThresholdStruct" optional="true" default="0"/>
+ <item fieldId="6" name="Threshold" type="int32u" isNullable="true"/>
+ <item fieldId="7" name="Label" type="char_string" isNullable="true" optional="true" length="128"/>
+ <item fieldId="8" name="Predicted" type="boolean" optional="true"/>
+ </struct>
+
+ <struct name="TariffInformationStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="TariffLabel" type="char_string" isNullable="true" length="128"/>
+ <item fieldId="1" name="ProviderName" type="char_string" isNullable="true" length="128"/>
+ <item fieldId="2" name="Currency" type="CurrencyStruct" isNullable="true" optional="true"/>
+ <item fieldId="3" name="BlockMode" type="BlockModeEnum" isNullable="true" min="0x00" max="0x02"/>
+ </struct>
+
+ <struct name="TariffPeriodStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="Label" type="char_string" isNullable="true" length="128"/>
+ <item fieldId="1" name="DayEntryIDs" array="true" type="int32u" length="20" minLength="1"/>
+ <item fieldId="2" name="TariffComponentIDs" array="true" type="int32u" length="20" minLength="1"/>
+ </struct>
+
+ <struct name="TariffPriceStruct" apiMaturity="provisional">
+ <cluster code="0x0700"/>
+ <item fieldId="0" name="PriceType" type="TariffPriceTypeEnum" min="0x00" max="0x04"/>
+ <item fieldId="1" name="Price" type="money" optional="true"/>
+ <item fieldId="2" name="PriceLevel" type="int16s" optional="true"/>
+ </struct>
+
+ <cluster>
+ <domain>Energy Management</domain>
+ <name>Commodity Tariff</name>
+ <code>0x0700</code>
+ <define>COMMODITY_TARIFF_CLUSTER</define>
+ <description>The CommodityTariffCluster provides the mechanism for communicating Commodity Tariff information within the premises.</description>
+ <client init="false" tick="false">true</client>
+ <server init="false" tick="false">true</server>
+ <globalAttribute code="0xFFFD" side="either" value="1"/>
+ <attribute code="0x0000" side="server" name="TariffInfo" define="TARIFF_INFO" type="TariffInformationStruct" isNullable="true"/>
+ <attribute code="0x0001" side="server" name="TariffUnit" define="TARIFF_UNIT" type="TariffUnitEnum" isNullable="true" min="0x00" max="0x01"/>
+ <attribute code="0x0002" side="server" name="StartDate" define="START_DATE" type="epoch_s" isNullable="true"/>
+ <attribute code="0x0003" side="server" name="DayEntries" define="DAY_ENTRIES" type="array" entryType="DayEntryStruct" isNullable="true"/>
+ <attribute code="0x0004" side="server" name="DayPatterns" define="DAY_PATTERNS" type="array" entryType="DayPatternStruct" isNullable="true"/>
+ <attribute code="0x0005" side="server" name="CalendarPeriods" define="CALENDAR_PERIODS" type="array" entryType="CalendarPeriodStruct" isNullable="true" length="4" minLength="1"/>
+ <attribute code="0x0006" side="server" name="IndividualDays" define="INDIVIDUAL_DAYS" type="array" entryType="DayStruct" isNullable="true" length="50"/>
+ <attribute code="0x0007" side="server" name="CurrentDay" define="CURRENT_DAY" type="DayStruct" isNullable="true"/>
+ <attribute code="0x0008" side="server" name="NextDay" define="NEXT_DAY" type="DayStruct" isNullable="true"/>
+ <attribute code="0x0009" side="server" name="CurrentDayEntry" define="CURRENT_DAY_ENTRY" type="DayEntryStruct" isNullable="true"/>
+ <attribute code="0x000A" side="server" name="CurrentDayEntryDate" define="CURRENT_DAY_ENTRY_DATE" type="epoch_s" isNullable="true"/>
+ <attribute code="0x000B" side="server" name="NextDayEntry" define="NEXT_DAY_ENTRY" type="DayEntryStruct" isNullable="true"/>
+ <attribute code="0x000C" side="server" name="NextDayEntryDate" define="NEXT_DAY_ENTRY_DATE" type="epoch_s" isNullable="true"/>
+ <attribute code="0x000D" side="server" name="TariffComponents" define="TARIFF_COMPONENTS" type="array" entryType="TariffComponentStruct" isNullable="true" minLength="1"/>
+ <attribute code="0x000E" side="server" name="TariffPeriods" define="TARIFF_PERIODS" type="array" entryType="TariffPeriodStruct" isNullable="true" minLength="1"/>
+ <attribute code="0x000F" side="server" name="CurrentTariffComponents" define="CURRENT_TARIFF_COMPONENTS" type="array" entryType="TariffComponentStruct" isNullable="true"/>
+ <attribute code="0x0010" side="server" name="NextTariffComponents" define="NEXT_TARIFF_COMPONENTS" type="array" entryType="TariffComponentStruct" isNullable="true"/>
+ <attribute code="0x0011" side="server" name="DefaultRandomizationOffset" define="DEFAULT_RANDOMIZATION_OFFSET" type="int16s" isNullable="true" optional="true">
+ <mandatoryConform>
+ <feature name="RNDM"/>
+ </mandatoryConform>
+ </attribute>
+ <attribute code="0x0012" side="server" name="DefaultRandomizationType" define="DEFAULT_RANDOMIZATION_TYPE" type="DayEntryRandomizationTypeEnum" isNullable="true" min="0x00" max="0x04" optional="true">
+ <mandatoryConform>
+ <feature name="RNDM"/>
+ </mandatoryConform>
+ </attribute>
+ <command code="0x00" source="client" name="GetTariffComponent" optional="false" response="GetTariffComponentResponse">
+ <description>The GetTariffComponent command allows a client to request information for a tariff component identifier that may no longer be available in the TariffPeriods attributes.</description>
+ <arg id="0" name="TariffComponentID" type="int32u"/>
+ </command>
+
+ <command code="0x00" source="server" name="GetTariffComponentResponse" optional="false" disableDefaultResponse="true">
+ <description>The GetTariffComponentResponse command is sent in response to a GetTariffComponent command.</description>
+ <arg id="0" name="Label" type="char_string" isNullable="true" length="128"/>
+ <arg id="1" name="DayEntryIDs" array="true" type="int32u" minLength="1"/>
+ <arg id="2" name="TariffComponent" type="TariffComponentStruct"/>
+ </command>
+
+ <command code="0x01" source="client" name="GetDayEntry" optional="false" response="GetDayEntryResponse">
+ <description>The GetDayEntry command allows a client to request information for a calendar day entry identifier that may no longer be available in the CalendarPeriods or IndividualDays attributes.</description>
+ <arg id="0" name="DayEntryID" type="int32u"/>
+ </command>
+
+ <command code="0x01" source="server" name="GetDayEntryResponse" optional="false" disableDefaultResponse="true">
+ <description>The GetDayEntryResponse command is sent in response to a GetDayEntry command.</description>
+ <arg id="0" name="DayEntry" type="DayEntryStruct"/>
+ </command>
+
+ <features>
+ <feature bit="0" code="PRICE" name="Pricing" summary="Supports information about commodity pricing">
+ <optionalConform choice="a" more="true" min="1"/>
+ </feature>
+ <feature bit="1" code="FCRED" name="FriendlyCredit" summary="Supports information about when friendly credit periods begin and end">
+ <optionalConform choice="a" more="true" min="1"/>
+ </feature>
+ <feature bit="2" code="AUXLD" name="AuxiliaryLoad" summary="Supports information about when auxiliary loads should be enabled or disabled">
+ <optionalConform choice="a" more="true" min="1"/>
+ </feature>
+ <feature bit="3" code="PEAKP" name="PeakPeriod" summary="Supports information about peak periods">
+ <optionalConform/>
+ </feature>
+ <feature bit="4" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
+ <optionalConform/>
+ </feature>
+ <feature bit="5" code="RNDM" name="Randomization" summary="Supports information about randomization of calendar day entries">
+ <optionalConform/>
+ </feature>
+ </features>
+ </cluster>
+</configurator>
diff --git a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml
index 4d1a0c8..fcd1bb3 100644
--- a/src/app/zap-templates/zcl/data-model/chip/global-enums.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/global-enums.xml
@@ -18,7 +18,7 @@
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/energy_management.adoc src/app_clusters/meas_and_sense.adoc src/data_model/Data-Model.adoc src/service_device_management/DistributedComplianceLedger.adoc
Parameters: in-progress
-Git: 0.7-summer-2025
+Git: 0.7-summer-2025-511-g2b8c413df
-->
<!--
TODO: Make these structures global rather than defining them for each cluster.
@@ -33,6 +33,26 @@
<item name="RollbackWrite" value="0x02"/>
</enum>
+
+ <enum name="PowerThresholdSourceEnum" type="enum8">
+ <item name="Contract" value="0x00"/>
+ <item name="Regulator" value="0x01"/>
+ <item name="Equipment" value="0x02"/>
+ </enum>
+
+
+ <enum name="TariffPriceTypeEnum" type="enum8">
+ <item name="Standard" value="0x00"/>
+ <item name="Critical" value="0x01"/>
+ <item name="Virtual" value="0x02"/>
+ <item name="Incentive" value="0x03"/>
+ <item name="IncentiveSignal" value="0x04"/>
+ </enum>
+
+ <enum name="TariffUnitEnum" type="enum8">
+ <item name="kWh" value="0x00"/>
+ <item name="kVAh" value="0x01"/>
+ </enum>
<enum name="ThreeLevelAutoEnum" type="enum8">
<item name="Auto" value="0x00"/>
<item name="Low" value="0x01"/>
diff --git a/src/app/zap-templates/zcl/data-model/chip/global-structs.xml b/src/app/zap-templates/zcl/data-model/chip/global-structs.xml
index 743fdf3..97e7f6f 100644
--- a/src/app/zap-templates/zcl/data-model/chip/global-structs.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/global-structs.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
-Copyright (c) 2024 Project CHIP Authors
+Copyright (c) 2024-2025 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -14,8 +14,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<configurator>
+<!--
+XML generated by Alchemy; DO NOT EDIT.
+Source: src/app_clusters/energy_management.adoc src/app_clusters/meas_and_sense.adoc src/data_model/Data-Model.adoc
+Parameters: in-progress
+Git: 0.7-summer-2025-511-g2b8c413df
+-->
+<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="CHIP"/>
<struct name="AtomicAttributeStatusStruct">
@@ -23,6 +28,10 @@
<item fieldId="1" name="StatusCode" type="status"/>
</struct>
+ <struct name="CurrencyStruct" apiMaturity="provisional">
+ <item fieldId="0" name="Currency" type="int16u" max="999"/>
+ <item fieldId="1" name="DecimalPoints" type="int8u"/>
+ </struct>
<struct name="LocationDescriptorStruct">
<item fieldId="0" name="LocationName" type="char_string" length="128" isNullable="false" optional="false"/>
<item fieldId="1" name="FloorNumber" type="int16s" isNullable="true" optional="false"/>
@@ -34,6 +43,18 @@
Their usage is defined for UnitTestCluster only.
-->
+
+ <struct name="PowerThresholdStruct" apiMaturity="provisional">
+ <item fieldId="0" name="PowerThreshold" type="power_mw" optional="true"/>
+ <item fieldId="1" name="ApparentPowerThreshold" type="power_mva" optional="true"/>
+ <item fieldId="2" name="PowerThresholdSource" type="PowerThresholdSourceEnum" isNullable="true" min="0x00" max="0x02"/>
+ </struct>
+
+ <struct name="PriceStruct" apiMaturity="provisional">
+ <item fieldId="0" name="Amount" type="money"/>
+ <item fieldId="1" name="Currency" type="CurrencyStruct"/>
+ </struct>
+
<struct name="TestGlobalStruct">
<item fieldId="0" name="Name" type="char_string" length="128" isNullable="false" optional="false"/>
<item fieldId="1" name="MyBitmap" type="TestGlobalBitmap" isNullable="true" optional="false"/>
diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
index 0f092fa..2d55890 100644
--- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml
@@ -1480,7 +1480,66 @@
</clusters>
</deviceType>
<deviceType>
- <name>MA-controlbridge</name>
+ <name>MA-electrical-utility-meter</name>
+ <domain>CHIP</domain>
+ <typeName>Electrical Utility Meter</typeName>
+ <profileId editable="false">0x0103</profileId>
+ <deviceId editable="false">0x0511</deviceId>
+ <class>Simple</class>
+ <scope>Endpoint</scope>
+ <clusters>
+ <include cluster="Meter Identification" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ <include cluster="Time Synchronization" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ </clusters>
+ </deviceType>
+ <deviceType>
+ <name>MA-meter-reference-point</name>
+ <domain>CHIP</domain>
+ <typeName>Meter Reference Point</typeName>
+ <profileId editable="false">0x0103</profileId>
+ <deviceId editable="false">0x0512</deviceId>
+ <class>Simple</class>
+ <scope>Endpoint</scope>
+ <clusters>
+ <include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ <include cluster="Identify" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ <include cluster="Time Synchronization" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ </clusters>
+ </deviceType>
+ <deviceType>
+ <name>MA-electrical-energy-tariff</name>
+ <domain>CHIP</domain>
+ <typeName>Electrical Energy Tariff</typeName>
+ <profileId editable="false">0x0103</profileId>
+ <deviceId editable="false">0x0513</deviceId>
+ <class>Simple</class>
+ <scope>Endpoint</scope>
+ <clusters>
+ <include cluster="Commodity Price" client="false" server="false" clientLocked="true" serverLocked="false"></include>
+ <include cluster="Commodity Tariff" client="false" server="false" clientLocked="true" serverLocked="false"></include>
+ <include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true">
+ <requireAttribute>TAG_LIST</requireAttribute>
+ <features>
+ <feature code="TAGLIST" name="TagList"></feature>
+ </features>
+ </include>
+ </clusters>
+ </deviceType>
+ <deviceType>
+ <name>MA-electrical-meter</name>
+ <domain>CHIP</domain>
+ <typeName>Electrical Meter</typeName>
+ <profileId editable="false">0x0103</profileId>
+ <deviceId editable="false">0x0514</deviceId>
+ <class>Simple</class>
+ <scope>Endpoint</scope>
+ <clusters>
+ <include cluster="Commodity Metering" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ <include cluster="Descriptor" client="false" server="true" clientLocked="true" serverLocked="true"></include>
+ </clusters>
+ </deviceType>
+ <deviceType>
+ <name>MA-control-bridge</name>
<domain>CHIP</domain>
<typeName>Control Bridge</typeName>
<profileId editable="false">0x0103</profileId>
diff --git a/src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml b/src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml
index bef6dd8..ee62e7f 100644
--- a/src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/measurement-and-sensing.xml
@@ -19,6 +19,7 @@
<enum name="MeasurementTypeEnum" type="enum16">
<cluster code="0x0090"/>
<cluster code="0x0091"/>
+ <cluster code="0x0B07"/>
<item name="Unspecified" value="0x0000"/>
<item name="Voltage" value="0x0001"/>
<item name="ActiveCurrent" value="0x0002"/>
@@ -34,6 +35,8 @@
<item name="PowerFactor" value="0x000C"/>
<item name="NeutralCurrent" value="0x000D"/>
<item name="ElectricalEnergy" value="0x000E"/>
+ <item name="ReactiveEnergy" value="0x000F"/>
+ <item name="ApparentEnergy" value="0x0010"/>
</enum>
<struct name="MeasurementAccuracyRangeStruct" apiMaturity="provisional">
<cluster code="0x0090"/>
diff --git a/src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml
new file mode 100644
index 0000000..475cd93
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!--
+Copyright (c) 2025 Project CHIP Authors
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
+XML generated by Alchemy; DO NOT EDIT.
+Source: src/app_clusters/MeterIdentification.adoc
+Parameters: in-progress
+Git: 0.7-summer-2025-606-g329573d34
+-->
+<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
+ <domain name="Energy Management"/>
+ <enum name="MeterTypeEnum" type="enum8">
+ <cluster code="0x0B06"/>
+ <item name="Utility" value="0x00"/>
+ <item name="Private" value="0x01"/>
+ <item name="Generic" value="0x02"/>
+ </enum>
+
+ <cluster apiMaturity="provisional">
+ <domain>Energy Management</domain>
+ <name>Meter Identification</name>
+ <code>0x0B06</code>
+ <define>METER_IDENTIFICATION_CLUSTER</define>
+ <description>This Meter Identification Cluster provides attributes for determining advanced information about utility metering device.</description>
+ <client init="false" tick="false">true</client>
+ <server init="false" tick="false">true</server>
+ <globalAttribute code="0xFFFD" side="either" value="1"/>
+ <attribute code="0x0000" side="server" name="MeterType" define="METER_TYPE" type="MeterTypeEnum" isNullable="true" min="0x00" max="0x02"/>
+ <attribute code="0x0001" side="server" name="PointOfDelivery" define="POINT_OF_DELIVERY" type="char_string" isNullable="true" length="64"/>
+ <attribute code="0x0002" side="server" name="MeterSerialNumber" define="METER_SERIAL_NUMBER" type="char_string" isNullable="true" length="64"/>
+ <attribute code="0x0003" side="server" name="ProtocolVersion" define="PROTOCOL_VERSION" type="char_string" isNullable="true" length="64" optional="true">
+ <optionalConform/>
+ </attribute>
+ <attribute code="0x0004" side="server" name="PowerThreshold" define="POWER_THRESHOLD" type="PowerThresholdStruct" isNullable="true" optional="true">
+ <mandatoryConform>
+ <feature name="PWRTHLD"/>
+ </mandatoryConform>
+ </attribute>
+ <features>
+ <feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
+ <optionalConform/>
+ </feature>
+ </features>
+ </cluster>
+</configurator>
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index 27f5955..bac9056 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -37,6 +37,9 @@
"clusters-extensions.xml",
"color-control-cluster.xml",
"commissioner-control-cluster.xml",
+ "commodity-metering-cluster.xml",
+ "commodity-price-cluster.xml",
+ "commodity-tariff-cluster.xml",
"concentration-measurement-cluster.xml",
"content-launch-cluster.xml",
"content-app-observer-cluster.xml",
@@ -50,6 +53,7 @@
"drlc-cluster.xml",
"microwave-oven-mode-cluster.xml",
"microwave-oven-control-cluster.xml",
+ "meter-identification-cluster.xml",
"door-lock-cluster.xml",
"ecosystem-information-cluster.xml",
"energy-preference-cluster.xml",
@@ -205,6 +209,14 @@
"Chime": ["SelectedChime", "Enabled"],
"Closure Control": ["OverallState", "OverallTarget"],
"Closure Dimension": ["Current", "Target", "UnitRange", "LimitRange"],
+ "Commodity Price": ["Currency", "CurrentPrice"],
+ "Commodity Tariff": [
+ "TariffInfo",
+ "CurrentDay",
+ "NextDay",
+ "CurrentDayEntry",
+ "NextDayEntry"
+ ],
"Descriptor": ["ClusterRevision", "FeatureMap"],
"Device Energy Management": [
"ESAType",
@@ -304,6 +316,7 @@
"OperatingMode",
"FeatureMap"
],
+ "Meter Identification": ["PowerThreshold"],
"Occupancy Sensing": [
"HoldTimeLimits",
"HoldTime",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 4ea35d6..8791af5 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -32,6 +32,9 @@
"clusters-extensions.xml",
"color-control-cluster.xml",
"commissioner-control-cluster.xml",
+ "commodity-metering-cluster.xml",
+ "commodity-price-cluster.xml",
+ "commodity-tariff-cluster.xml",
"concentration-measurement-cluster.xml",
"content-launch-cluster.xml",
"content-app-observer-cluster.xml",
@@ -43,6 +46,7 @@
"dishwasher-alarm-cluster.xml",
"dishwasher-mode-cluster.xml",
"microwave-oven-mode-cluster.xml",
+ "meter-identification-cluster.xml",
"door-lock-cluster.xml",
"drlc-cluster.xml",
"ecosystem-information-cluster.xml",
@@ -199,6 +203,14 @@
"Chime": ["SelectedChime", "Enabled"],
"Closure Control": ["OverallState", "OverallTarget"],
"Closure Dimension": ["Current", "Target", "UnitRange", "LimitRange"],
+ "Commodity Price": ["Currency", "CurrentPrice"],
+ "Commodity Tariff": [
+ "TariffInfo",
+ "CurrentDay",
+ "NextDay",
+ "CurrentDayEntry",
+ "NextDayEntry"
+ ],
"Descriptor": ["ClusterRevision", "FeatureMap"],
"Device Energy Management": [
"ESAType",
@@ -298,6 +310,7 @@
"OperatingMode",
"FeatureMap"
],
+ "Meter Identification": ["PowerThreshold"],
"Occupancy Sensing": [
"HoldTimeLimits",
"HoldTime",
diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json
index b0405ab..848e86b 100644
--- a/src/app/zap_cluster_list.json
+++ b/src/app/zap_cluster_list.json
@@ -28,6 +28,9 @@
"COLOR_CONTROL_CLUSTER": [],
"COMMISSIONER_CONTROL_CLUSTER": [],
"COMMISSIONING_CLUSTER": [],
+ "COMMODITY_METERING_CLUSTER": [],
+ "COMMODITY_PRICE_CLUSTER": [],
+ "COMMODITY_TARIFF_CLUSTER": [],
"CONTENT_LAUNCHER_CLUSTER": [],
"CONTENT_CONTROL_CLUSTER": [],
"CONTENT_APP_OBSERVER_CLUSTER": [],
@@ -38,6 +41,7 @@
"DIAGNOSTIC_LOGS_CLUSTER": [],
"DISHWASHER_ALARM_CLUSTER": [],
"DISHWASHER_MODE_CLUSTER": [],
+ "METER_IDENTIFICATION_CLUSTER": [],
"MICROWAVE_OVEN_MODE_CLUSTER": [],
"DOOR_LOCK_CLUSTER": [],
"ECOSYSTEM_INFORMATION_CLUSTER": [],
@@ -186,6 +190,9 @@
"COLOR_CONTROL_CLUSTER": ["color-control-server"],
"COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"],
"COMMISSIONING_CLUSTER": [],
+ "COMMODITY_METERING_CLUSTER": [],
+ "COMMODITY_PRICE_CLUSTER": [],
+ "COMMODITY_TARIFF_CLUSTER": [],
"CONTENT_LAUNCHER_CLUSTER": ["content-launch-server"],
"CONTENT_CONTROL_CLUSTER": ["content-control-server"],
"CONTENT_APP_OBSERVER_CLUSTER": ["content-app-observer"],
@@ -196,6 +203,7 @@
"DIAGNOSTIC_LOGS_CLUSTER": ["diagnostic-logs-server"],
"DISHWASHER_ALARM_CLUSTER": ["dishwasher-alarm-server"],
"DISHWASHER_MODE_CLUSTER": ["mode-base-server"],
+ "METER_IDENTIFICATION_CLUSTER": [],
"MICROWAVE_OVEN_MODE_CLUSTER": ["mode-base-server"],
"DOOR_LOCK_CLUSTER": ["door-lock-server"],
"ECOSYSTEM_INFORMATION_CLUSTER": ["ecosystem-information-server"],
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index fb57dff..840ef11 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -196,6 +196,12 @@
kColumn = 6;
}
+enum PowerThresholdSourceEnum : enum8 {
+ kContract = 0;
+ kRegulator = 1;
+ kEquipment = 2;
+}
+
enum RelativePositionTag : enum8 {
kUnder = 0;
kNextTo = 1;
@@ -206,6 +212,19 @@
kBehind = 6;
}
+enum TariffPriceTypeEnum : enum8 {
+ kStandard = 0;
+ kCritical = 1;
+ kVirtual = 2;
+ kIncentive = 3;
+ kIncentiveSignal = 4;
+}
+
+enum TariffUnitEnum : enum8 {
+ kKWh = 0;
+ kKVAh = 1;
+}
+
enum TestGlobalEnum : enum8 {
kSomeValue = 0;
kSomeOtherValue = 1;
@@ -224,6 +243,17 @@
kSecondBit = 0x2;
}
+struct CurrencyStruct {
+ int16u currency = 0;
+ int8u decimalPoints = 1;
+}
+
+struct PowerThresholdStruct {
+ optional power_mw powerThreshold = 0;
+ optional power_mva apparentPowerThreshold = 1;
+ nullable PowerThresholdSourceEnum powerThresholdSource = 2;
+}
+
struct TestGlobalStruct {
char_string<128> name = 0;
nullable TestGlobalBitmap myBitmap = 1;
@@ -236,6 +266,11 @@
nullable AreaTypeTag areaType = 2;
}
+struct PriceStruct {
+ money amount = 0;
+ CurrencyStruct currency = 1;
+}
+
struct AtomicAttributeStatusStruct {
attrib_id attributeID = 0;
status statusCode = 1;
@@ -4543,6 +4578,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
enum PowerModeEnum : enum8 {
@@ -4648,6 +4685,8 @@
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
}
bitmap Feature : bitmap32 {
@@ -4776,6 +4815,75 @@
command access(invoke: manage) CancelBoost(): DefaultSuccess = 1;
}
+/** The Commodity Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises. */
+provisional cluster CommodityPrice = 149 {
+ revision 4;
+
+ bitmap CommodityPriceDetailBitmap : bitmap16 {
+ kDescription = 0x1;
+ kComponents = 0x2;
+ }
+
+ bitmap Feature : bitmap32 {
+ kForecasting = 0x1;
+ }
+
+ struct CommodityPriceComponentStruct {
+ money price = 0;
+ TariffPriceTypeEnum source = 1;
+ optional char_string<32> description = 2;
+ optional int32u tariffComponentID = 3;
+ }
+
+ struct CommodityPriceStruct {
+ epoch_s periodStart = 0;
+ nullable epoch_s periodEnd = 1;
+ PriceStruct price = 2;
+ optional char_string<32> description = 3;
+ optional CommodityPriceComponentStruct components[] = 4;
+ }
+
+ info event PriceChange = 0 {
+ CommodityPriceStruct currentPrice = 0;
+ }
+
+ info event ForecastChange = 1 {
+ CommodityPriceStruct priceForecast[] = 0;
+ }
+
+ readonly attribute TariffUnitEnum tariffUnit = 0;
+ readonly attribute nullable CurrencyStruct currency = 1;
+ readonly attribute nullable CommodityPriceStruct currentPrice = 2;
+ readonly attribute optional CommodityPriceStruct priceForecast[] = 3;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct GetDetailedPriceRequestRequest {
+ CommodityPriceDetailBitmap details = 0;
+ }
+
+ response struct GetDetailedPriceResponse = 1 {
+ nullable CommodityPriceStruct currentPrice = 0;
+ }
+
+ request struct GetDetailedForecastRequestRequest {
+ CommodityPriceDetailBitmap details = 0;
+ }
+
+ response struct GetDetailedForecastResponse = 3 {
+ CommodityPriceStruct priceForecast[] = 0;
+ }
+
+ /** Upon receipt, this SHALL generate a GetDetailedPrice Response command. */
+ command GetDetailedPriceRequest(GetDetailedPriceRequestRequest): GetDetailedPriceResponse = 0;
+ /** Upon receipt, this SHALL generate a GetDetailedForecast Response command. */
+ command GetDetailedForecastRequest(GetDetailedForecastRequestRequest): GetDetailedForecastResponse = 2;
+}
+
/** This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control. */
provisional cluster DemandResponseLoadControl = 150 {
revision 4;
@@ -10647,6 +10755,179 @@
command PlayChimeSound(): DefaultSuccess = 0;
}
+/** The CommodityTariffCluster provides the mechanism for communicating Commodity Tariff information within the premises. */
+cluster CommodityTariff = 1792 {
+ revision 1;
+
+ enum AuxiliaryLoadSettingEnum : enum8 {
+ kOff = 0;
+ kOn = 1;
+ kNone = 2;
+ }
+
+ enum BlockModeEnum : enum8 {
+ kNoBlock = 0;
+ kCombined = 1;
+ kIndividual = 2;
+ }
+
+ enum DayEntryRandomizationTypeEnum : enum8 {
+ kNone = 0;
+ kFixed = 1;
+ kRandom = 2;
+ kRandomPositive = 3;
+ kRandomNegative = 4;
+ }
+
+ enum DayTypeEnum : enum8 {
+ kStandard = 0;
+ kHoliday = 1;
+ kDynamic = 2;
+ kEvent = 3;
+ }
+
+ enum PeakPeriodSeverityEnum : enum8 {
+ kUnused = 0;
+ kLow = 1;
+ kMedium = 2;
+ kHigh = 3;
+ }
+
+ bitmap DayPatternDayOfWeekBitmap : bitmap8 {
+ kSunday = 0x1;
+ kMonday = 0x2;
+ kTuesday = 0x4;
+ kWednesday = 0x8;
+ kThursday = 0x10;
+ kFriday = 0x20;
+ kSaturday = 0x40;
+ }
+
+ bitmap Feature : bitmap32 {
+ kPricing = 0x1;
+ kFriendlyCredit = 0x2;
+ kAuxiliaryLoad = 0x4;
+ kPeakPeriod = 0x8;
+ kPowerThreshold = 0x10;
+ kRandomization = 0x20;
+ }
+
+ struct PeakPeriodStruct {
+ PeakPeriodSeverityEnum severity = 0;
+ int16u peakPeriod = 1;
+ }
+
+ struct AuxiliaryLoadSwitchSettingsStruct {
+ int8u number = 0;
+ AuxiliaryLoadSettingEnum requiredState = 1;
+ }
+
+ struct TariffPriceStruct {
+ TariffPriceTypeEnum priceType = 0;
+ optional money price = 1;
+ optional int16s priceLevel = 2;
+ }
+
+ struct TariffComponentStruct {
+ int32u tariffComponentID = 0;
+ optional nullable TariffPriceStruct price = 1;
+ optional boolean friendlyCredit = 2;
+ optional AuxiliaryLoadSwitchSettingsStruct auxiliaryLoad = 3;
+ optional PeakPeriodStruct peakPeriod = 4;
+ optional PowerThresholdStruct powerThreshold = 5;
+ nullable int32u threshold = 6;
+ optional nullable char_string<128> label = 7;
+ optional boolean predicted = 8;
+ }
+
+ struct CalendarPeriodStruct {
+ nullable epoch_s startDate = 0;
+ int32u dayPatternIDs[] = 1;
+ }
+
+ struct DayEntryStruct {
+ int32u dayEntryID = 0;
+ int16u startTime = 1;
+ optional int16u duration = 2;
+ optional int16s randomizationOffset = 3;
+ optional DayEntryRandomizationTypeEnum randomizationType = 4;
+ }
+
+ struct DayPatternStruct {
+ int32u dayPatternID = 0;
+ DayPatternDayOfWeekBitmap daysOfWeek = 1;
+ int32u dayEntryIDs[] = 2;
+ }
+
+ struct DayStruct {
+ epoch_s date = 0;
+ DayTypeEnum dayType = 1;
+ int32u dayEntryIDs[] = 2;
+ }
+
+ struct TariffInformationStruct {
+ nullable char_string<128> tariffLabel = 0;
+ nullable char_string<128> providerName = 1;
+ optional nullable CurrencyStruct currency = 2;
+ nullable BlockModeEnum blockMode = 3;
+ }
+
+ struct TariffPeriodStruct {
+ nullable char_string<128> label = 0;
+ int32u dayEntryIDs[] = 1;
+ int32u tariffComponentIDs[] = 2;
+ }
+
+ readonly attribute nullable TariffInformationStruct tariffInfo = 0;
+ readonly attribute nullable TariffUnitEnum tariffUnit = 1;
+ readonly attribute nullable epoch_s startDate = 2;
+ readonly attribute nullable DayEntryStruct dayEntries[] = 3;
+ readonly attribute nullable DayPatternStruct dayPatterns[] = 4;
+ readonly attribute nullable CalendarPeriodStruct calendarPeriods[] = 5;
+ readonly attribute nullable DayStruct individualDays[] = 6;
+ readonly attribute nullable DayStruct currentDay = 7;
+ readonly attribute nullable DayStruct nextDay = 8;
+ readonly attribute nullable DayEntryStruct currentDayEntry = 9;
+ readonly attribute nullable epoch_s currentDayEntryDate = 10;
+ readonly attribute nullable DayEntryStruct nextDayEntry = 11;
+ readonly attribute nullable epoch_s nextDayEntryDate = 12;
+ readonly attribute nullable TariffComponentStruct tariffComponents[] = 13;
+ readonly attribute nullable TariffPeriodStruct tariffPeriods[] = 14;
+ readonly attribute nullable TariffComponentStruct currentTariffComponents[] = 15;
+ readonly attribute nullable TariffComponentStruct nextTariffComponents[] = 16;
+ readonly attribute optional nullable int16s defaultRandomizationOffset = 17;
+ readonly attribute optional nullable DayEntryRandomizationTypeEnum defaultRandomizationType = 18;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct GetTariffComponentRequest {
+ int32u tariffComponentID = 0;
+ }
+
+ response struct GetTariffComponentResponse = 0 {
+ nullable char_string<128> label = 0;
+ int32u dayEntryIDs[] = 1;
+ TariffComponentStruct tariffComponent = 2;
+ }
+
+ request struct GetDayEntryRequest {
+ int32u dayEntryID = 0;
+ }
+
+ response struct GetDayEntryResponse = 1 {
+ DayEntryStruct dayEntry = 0;
+ }
+
+ /** The GetTariffComponent command allows a client to request information for a tariff component identifier that may no longer be available in the TariffPeriods attributes. */
+ command GetTariffComponent(GetTariffComponentRequest): GetTariffComponentResponse = 0;
+ /** The GetDayEntry command allows a client to request information for a calendar day entry identifier that may no longer be available in the CalendarPeriods or IndividualDays attributes. */
+ command GetDayEntry(GetDayEntryRequest): GetDayEntryResponse = 1;
+}
+
/** Provides extended device information for all the logical devices represented by a Bridged Node. */
provisional cluster EcosystemInformation = 1872 {
revision 1;
@@ -10903,6 +11184,73 @@
fabric command access(invoke: administer) RemoveEndpoint(RemoveEndpointRequest): DefaultSuccess = 4;
}
+/** This Meter Identification Cluster provides attributes for determining advanced information about utility metering device. */
+provisional cluster MeterIdentification = 2822 {
+ revision 1;
+
+ enum MeterTypeEnum : enum8 {
+ kUtility = 0;
+ kPrivate = 1;
+ kGeneric = 2;
+ }
+
+ bitmap Feature : bitmap32 {
+ kPowerThreshold = 0x1;
+ }
+
+ readonly attribute nullable MeterTypeEnum meterType = 0;
+ readonly attribute nullable char_string<64> pointOfDelivery = 1;
+ readonly attribute nullable char_string<64> meterSerialNumber = 2;
+ readonly attribute optional nullable char_string<64> protocolVersion = 3;
+ readonly attribute optional nullable PowerThresholdStruct powerThreshold = 4;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+}
+
+/** The Commodity Metering Cluster provides the mechanism for communicating commodity consumption information within a premises. */
+cluster CommodityMetering = 2823 {
+ revision 1;
+
+ enum MeasurementTypeEnum : enum16 {
+ kUnspecified = 0;
+ kVoltage = 1;
+ kActiveCurrent = 2;
+ kReactiveCurrent = 3;
+ kApparentCurrent = 4;
+ kActivePower = 5;
+ kReactivePower = 6;
+ kApparentPower = 7;
+ kRMSVoltage = 8;
+ kRMSCurrent = 9;
+ kRMSPower = 10;
+ kFrequency = 11;
+ kPowerFactor = 12;
+ kNeutralCurrent = 13;
+ kElectricalEnergy = 14;
+ kReactiveEnergy = 15;
+ kApparentEnergy = 16;
+ }
+
+ struct MeteredQuantityStruct {
+ int32u tariffComponentIDs[] = 0;
+ int64s quantity = 1;
+ }
+
+ readonly attribute nullable MeteredQuantityStruct meteredQuantity[] = 0;
+ readonly attribute nullable epoch_s meteredQuantityTimestamp = 1;
+ readonly attribute nullable MeasurementTypeEnum measurementType = 2;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+}
+
/** The Test Cluster is meant to validate the generated code */
internal cluster UnitTesting = 4294048773 {
revision 1; // NOTE: Default/not specifically set
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index 7207f1c..7bffb1a 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -30258,6 +30258,387 @@
}
}
+ public static class CommodityPriceCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 149L;
+
+ private static final long TARIFF_UNIT_ATTRIBUTE_ID = 0L;
+ private static final long CURRENCY_ATTRIBUTE_ID = 1L;
+ private static final long CURRENT_PRICE_ATTRIBUTE_ID = 2L;
+ private static final long PRICE_FORECAST_ATTRIBUTE_ID = 3L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public CommodityPriceCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void getDetailedPriceRequest(GetDetailedPriceResponseCallback callback, Integer details) {
+ getDetailedPriceRequest(callback, details, 0);
+ }
+
+ public void getDetailedPriceRequest(GetDetailedPriceResponseCallback callback, Integer details, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList<StructElement> elements = new ArrayList<>();
+ final long detailsFieldID = 0L;
+ BaseTLVType detailstlvValue = new UIntType(details);
+ elements.add(new StructElement(detailsFieldID, detailstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long currentPriceFieldID = 0L;
+ @Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct currentPrice = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == currentPriceFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ currentPrice = ChipStructs.CommodityPriceClusterCommodityPriceStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ callback.onSuccess(currentPrice);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void getDetailedForecastRequest(GetDetailedForecastResponseCallback callback, Integer details) {
+ getDetailedForecastRequest(callback, details, 0);
+ }
+
+ public void getDetailedForecastRequest(GetDetailedForecastResponseCallback callback, Integer details, int timedInvokeTimeoutMs) {
+ final long commandId = 2L;
+
+ ArrayList<StructElement> elements = new ArrayList<>();
+ final long detailsFieldID = 0L;
+ BaseTLVType detailstlvValue = new UIntType(details);
+ elements.add(new StructElement(detailsFieldID, detailstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long priceForecastFieldID = 0L;
+ ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceStruct> priceForecast = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == priceForecastFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ priceForecast = castingValue.map((elementcastingValue) -> ChipStructs.CommodityPriceClusterCommodityPriceStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ callback.onSuccess(priceForecast);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface GetDetailedPriceResponseCallback extends BaseClusterCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct currentPrice);
+ }
+
+ public interface GetDetailedForecastResponseCallback extends BaseClusterCallback {
+ void onSuccess(ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceStruct> priceForecast);
+ }
+
+ public interface CurrencyAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityPriceClusterCurrencyStruct value);
+ }
+
+ public interface CurrentPriceAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct value);
+ }
+
+ public interface PriceForecastAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<ChipStructs.CommodityPriceClusterCommodityPriceStruct> value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public void readTariffUnitAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_UNIT_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_UNIT_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeTariffUnitAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_UNIT_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_UNIT_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrencyAttribute(
+ CurrencyAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENCY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityPriceClusterCurrencyStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENCY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrencyAttribute(
+ CurrencyAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENCY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityPriceClusterCurrencyStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENCY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentPriceAttribute(
+ CurrentPriceAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PRICE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_PRICE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentPriceAttribute(
+ CurrentPriceAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_PRICE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_PRICE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readPriceForecastAttribute(
+ PriceForecastAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRICE_FORECAST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<ChipStructs.CommodityPriceClusterCommodityPriceStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, PRICE_FORECAST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribePriceForecastAttribute(
+ PriceForecastAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRICE_FORECAST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<ChipStructs.CommodityPriceClusterCommodityPriceStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, PRICE_FORECAST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class DemandResponseLoadControlCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 150L;
@@ -65000,6 +65381,870 @@
}
}
+ public static class CommodityTariffCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 1792L;
+
+ private static final long TARIFF_INFO_ATTRIBUTE_ID = 0L;
+ private static final long TARIFF_UNIT_ATTRIBUTE_ID = 1L;
+ private static final long START_DATE_ATTRIBUTE_ID = 2L;
+ private static final long DAY_ENTRIES_ATTRIBUTE_ID = 3L;
+ private static final long DAY_PATTERNS_ATTRIBUTE_ID = 4L;
+ private static final long CALENDAR_PERIODS_ATTRIBUTE_ID = 5L;
+ private static final long INDIVIDUAL_DAYS_ATTRIBUTE_ID = 6L;
+ private static final long CURRENT_DAY_ATTRIBUTE_ID = 7L;
+ private static final long NEXT_DAY_ATTRIBUTE_ID = 8L;
+ private static final long CURRENT_DAY_ENTRY_ATTRIBUTE_ID = 9L;
+ private static final long CURRENT_DAY_ENTRY_DATE_ATTRIBUTE_ID = 10L;
+ private static final long NEXT_DAY_ENTRY_ATTRIBUTE_ID = 11L;
+ private static final long NEXT_DAY_ENTRY_DATE_ATTRIBUTE_ID = 12L;
+ private static final long TARIFF_COMPONENTS_ATTRIBUTE_ID = 13L;
+ private static final long TARIFF_PERIODS_ATTRIBUTE_ID = 14L;
+ private static final long CURRENT_TARIFF_COMPONENTS_ATTRIBUTE_ID = 15L;
+ private static final long NEXT_TARIFF_COMPONENTS_ATTRIBUTE_ID = 16L;
+ private static final long DEFAULT_RANDOMIZATION_OFFSET_ATTRIBUTE_ID = 17L;
+ private static final long DEFAULT_RANDOMIZATION_TYPE_ATTRIBUTE_ID = 18L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public CommodityTariffCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void getTariffComponent(GetTariffComponentResponseCallback callback, Long tariffComponentID) {
+ getTariffComponent(callback, tariffComponentID, 0);
+ }
+
+ public void getTariffComponent(GetTariffComponentResponseCallback callback, Long tariffComponentID, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList<StructElement> elements = new ArrayList<>();
+ final long tariffComponentIDFieldID = 0L;
+ BaseTLVType tariffComponentIDtlvValue = new UIntType(tariffComponentID);
+ elements.add(new StructElement(tariffComponentIDFieldID, tariffComponentIDtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long labelFieldID = 0L;
+ @Nullable String label = null;
+ final long dayEntryIDsFieldID = 1L;
+ ArrayList<Long> dayEntryIDs = null;
+ final long tariffComponentFieldID = 2L;
+ ChipStructs.CommodityTariffClusterTariffComponentStruct tariffComponent = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == labelFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ label = castingValue.value(String.class);
+ }
+ } else if (element.contextTagNum() == dayEntryIDsFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ dayEntryIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == tariffComponentFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ tariffComponent = ChipStructs.CommodityTariffClusterTariffComponentStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ callback.onSuccess(label, dayEntryIDs, tariffComponent);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void getDayEntry(GetDayEntryResponseCallback callback, Long dayEntryID) {
+ getDayEntry(callback, dayEntryID, 0);
+ }
+
+ public void getDayEntry(GetDayEntryResponseCallback callback, Long dayEntryID, int timedInvokeTimeoutMs) {
+ final long commandId = 1L;
+
+ ArrayList<StructElement> elements = new ArrayList<>();
+ final long dayEntryIDFieldID = 0L;
+ BaseTLVType dayEntryIDtlvValue = new UIntType(dayEntryID);
+ elements.add(new StructElement(dayEntryIDFieldID, dayEntryIDtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long dayEntryFieldID = 0L;
+ ChipStructs.CommodityTariffClusterDayEntryStruct dayEntry = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == dayEntryFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ dayEntry = ChipStructs.CommodityTariffClusterDayEntryStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ callback.onSuccess(dayEntry);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface GetTariffComponentResponseCallback extends BaseClusterCallback {
+ void onSuccess(@Nullable String label, ArrayList<Long> dayEntryIDs, ChipStructs.CommodityTariffClusterTariffComponentStruct tariffComponent);
+ }
+
+ public interface GetDayEntryResponseCallback extends BaseClusterCallback {
+ void onSuccess(ChipStructs.CommodityTariffClusterDayEntryStruct dayEntry);
+ }
+
+ public interface TariffInfoAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityTariffClusterTariffInformationStruct value);
+ }
+
+ public interface TariffUnitAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Integer value);
+ }
+
+ public interface StartDateAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Long value);
+ }
+
+ public interface DayEntriesAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterDayEntryStruct> value);
+ }
+
+ public interface DayPatternsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterDayPatternStruct> value);
+ }
+
+ public interface CalendarPeriodsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterCalendarPeriodStruct> value);
+ }
+
+ public interface IndividualDaysAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterDayStruct> value);
+ }
+
+ public interface CurrentDayAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayStruct value);
+ }
+
+ public interface NextDayAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayStruct value);
+ }
+
+ public interface CurrentDayEntryAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value);
+ }
+
+ public interface CurrentDayEntryDateAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Long value);
+ }
+
+ public interface NextDayEntryAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value);
+ }
+
+ public interface NextDayEntryDateAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Long value);
+ }
+
+ public interface TariffComponentsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value);
+ }
+
+ public interface TariffPeriodsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffPeriodStruct> value);
+ }
+
+ public interface CurrentTariffComponentsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value);
+ }
+
+ public interface NextTariffComponentsAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value);
+ }
+
+ public interface DefaultRandomizationOffsetAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Integer value);
+ }
+
+ public interface DefaultRandomizationTypeAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Integer value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public void readTariffInfoAttribute(
+ TariffInfoAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_INFO_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterTariffInformationStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_INFO_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeTariffInfoAttribute(
+ TariffInfoAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_INFO_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterTariffInformationStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_INFO_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readTariffUnitAttribute(
+ TariffUnitAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_UNIT_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_UNIT_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeTariffUnitAttribute(
+ TariffUnitAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_UNIT_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_UNIT_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readStartDateAttribute(
+ StartDateAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_DATE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, START_DATE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeStartDateAttribute(
+ StartDateAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, START_DATE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, START_DATE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readDayEntriesAttribute(
+ DayEntriesAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DAY_ENTRIES_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterDayEntryStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DAY_ENTRIES_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeDayEntriesAttribute(
+ DayEntriesAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DAY_ENTRIES_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterDayEntryStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DAY_ENTRIES_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readDayPatternsAttribute(
+ DayPatternsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DAY_PATTERNS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterDayPatternStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DAY_PATTERNS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeDayPatternsAttribute(
+ DayPatternsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DAY_PATTERNS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterDayPatternStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DAY_PATTERNS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCalendarPeriodsAttribute(
+ CalendarPeriodsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CALENDAR_PERIODS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterCalendarPeriodStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CALENDAR_PERIODS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCalendarPeriodsAttribute(
+ CalendarPeriodsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CALENDAR_PERIODS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterCalendarPeriodStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CALENDAR_PERIODS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readIndividualDaysAttribute(
+ IndividualDaysAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INDIVIDUAL_DAYS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterDayStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, INDIVIDUAL_DAYS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeIndividualDaysAttribute(
+ IndividualDaysAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INDIVIDUAL_DAYS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterDayStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, INDIVIDUAL_DAYS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentDayAttribute(
+ CurrentDayAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_DAY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_DAY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentDayAttribute(
+ CurrentDayAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_DAY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_DAY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNextDayAttribute(
+ NextDayAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_DAY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_DAY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNextDayAttribute(
+ NextDayAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_DAY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_DAY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentDayEntryAttribute(
+ CurrentDayEntryAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_DAY_ENTRY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_DAY_ENTRY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentDayEntryAttribute(
+ CurrentDayEntryAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_DAY_ENTRY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_DAY_ENTRY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentDayEntryDateAttribute(
+ CurrentDayEntryDateAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_DAY_ENTRY_DATE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_DAY_ENTRY_DATE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentDayEntryDateAttribute(
+ CurrentDayEntryDateAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_DAY_ENTRY_DATE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_DAY_ENTRY_DATE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNextDayEntryAttribute(
+ NextDayEntryAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_DAY_ENTRY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_DAY_ENTRY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNextDayEntryAttribute(
+ NextDayEntryAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_DAY_ENTRY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_DAY_ENTRY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNextDayEntryDateAttribute(
+ NextDayEntryDateAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_DAY_ENTRY_DATE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_DAY_ENTRY_DATE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNextDayEntryDateAttribute(
+ NextDayEntryDateAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_DAY_ENTRY_DATE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_DAY_ENTRY_DATE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readTariffComponentsAttribute(
+ TariffComponentsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_COMPONENTS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_COMPONENTS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeTariffComponentsAttribute(
+ TariffComponentsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_COMPONENTS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_COMPONENTS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readTariffPeriodsAttribute(
+ TariffPeriodsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_PERIODS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffPeriodStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_PERIODS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeTariffPeriodsAttribute(
+ TariffPeriodsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TARIFF_PERIODS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffPeriodStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, TARIFF_PERIODS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentTariffComponentsAttribute(
+ CurrentTariffComponentsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_TARIFF_COMPONENTS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_TARIFF_COMPONENTS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentTariffComponentsAttribute(
+ CurrentTariffComponentsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_TARIFF_COMPONENTS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_TARIFF_COMPONENTS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readNextTariffComponentsAttribute(
+ NextTariffComponentsAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_TARIFF_COMPONENTS_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_TARIFF_COMPONENTS_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeNextTariffComponentsAttribute(
+ NextTariffComponentsAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_TARIFF_COMPONENTS_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, NEXT_TARIFF_COMPONENTS_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readDefaultRandomizationOffsetAttribute(
+ DefaultRandomizationOffsetAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOMIZATION_OFFSET_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEFAULT_RANDOMIZATION_OFFSET_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeDefaultRandomizationOffsetAttribute(
+ DefaultRandomizationOffsetAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOMIZATION_OFFSET_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEFAULT_RANDOMIZATION_OFFSET_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readDefaultRandomizationTypeAttribute(
+ DefaultRandomizationTypeAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOMIZATION_TYPE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEFAULT_RANDOMIZATION_TYPE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeDefaultRandomizationTypeAttribute(
+ DefaultRandomizationTypeAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DEFAULT_RANDOMIZATION_TYPE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, DEFAULT_RANDOMIZATION_TYPE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class EcosystemInformationCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 1872L;
@@ -66533,6 +67778,640 @@
}
}
+ public static class MeterIdentificationCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 2822L;
+
+ private static final long METER_TYPE_ATTRIBUTE_ID = 0L;
+ private static final long POINT_OF_DELIVERY_ATTRIBUTE_ID = 1L;
+ private static final long METER_SERIAL_NUMBER_ATTRIBUTE_ID = 2L;
+ private static final long PROTOCOL_VERSION_ATTRIBUTE_ID = 3L;
+ private static final long POWER_THRESHOLD_ATTRIBUTE_ID = 4L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public MeterIdentificationCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public interface MeterTypeAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Integer value);
+ }
+
+ public interface PointOfDeliveryAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable String value);
+ }
+
+ public interface MeterSerialNumberAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable String value);
+ }
+
+ public interface ProtocolVersionAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable String value);
+ }
+
+ public interface PowerThresholdAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable ChipStructs.MeterIdentificationClusterPowerThresholdStruct value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public void readMeterTypeAttribute(
+ MeterTypeAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METER_TYPE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METER_TYPE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMeterTypeAttribute(
+ MeterTypeAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METER_TYPE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METER_TYPE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readPointOfDeliveryAttribute(
+ PointOfDeliveryAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POINT_OF_DELIVERY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, POINT_OF_DELIVERY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribePointOfDeliveryAttribute(
+ PointOfDeliveryAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POINT_OF_DELIVERY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, POINT_OF_DELIVERY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readMeterSerialNumberAttribute(
+ MeterSerialNumberAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METER_SERIAL_NUMBER_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METER_SERIAL_NUMBER_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMeterSerialNumberAttribute(
+ MeterSerialNumberAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METER_SERIAL_NUMBER_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METER_SERIAL_NUMBER_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readProtocolVersionAttribute(
+ ProtocolVersionAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROTOCOL_VERSION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, PROTOCOL_VERSION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeProtocolVersionAttribute(
+ ProtocolVersionAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROTOCOL_VERSION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, PROTOCOL_VERSION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readPowerThresholdAttribute(
+ PowerThresholdAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_THRESHOLD_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.MeterIdentificationClusterPowerThresholdStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, POWER_THRESHOLD_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribePowerThresholdAttribute(
+ PowerThresholdAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_THRESHOLD_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable ChipStructs.MeterIdentificationClusterPowerThresholdStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, POWER_THRESHOLD_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
+ public static class CommodityMeteringCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 2823L;
+
+ private static final long METERED_QUANTITY_ATTRIBUTE_ID = 0L;
+ private static final long METERED_QUANTITY_TIMESTAMP_ATTRIBUTE_ID = 1L;
+ private static final long MEASUREMENT_TYPE_ATTRIBUTE_ID = 2L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public CommodityMeteringCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public interface MeteredQuantityAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable List<ChipStructs.CommodityMeteringClusterMeteredQuantityStruct> value);
+ }
+
+ public interface MeteredQuantityTimestampAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Long value);
+ }
+
+ public interface MeasurementTypeAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(@Nullable Integer value);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List<Long> value);
+ }
+
+ public void readMeteredQuantityAttribute(
+ MeteredQuantityAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METERED_QUANTITY_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityMeteringClusterMeteredQuantityStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METERED_QUANTITY_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMeteredQuantityAttribute(
+ MeteredQuantityAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METERED_QUANTITY_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable List<ChipStructs.CommodityMeteringClusterMeteredQuantityStruct> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METERED_QUANTITY_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readMeteredQuantityTimestampAttribute(
+ MeteredQuantityTimestampAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METERED_QUANTITY_TIMESTAMP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METERED_QUANTITY_TIMESTAMP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMeteredQuantityTimestampAttribute(
+ MeteredQuantityTimestampAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, METERED_QUANTITY_TIMESTAMP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, METERED_QUANTITY_TIMESTAMP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readMeasurementTypeAttribute(
+ MeasurementTypeAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_TYPE_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, MEASUREMENT_TYPE_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMeasurementTypeAttribute(
+ MeasurementTypeAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_TYPE_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, MEASUREMENT_TYPE_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List<Long> value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class UnitTestingCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 4294048773L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
index 04af0f6..6d90d35 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java
@@ -3836,6 +3836,98 @@
return output.toString();
}
}
+public static class CommodityPriceClusterPriceChangeEvent {
+ public ChipStructs.CommodityPriceClusterCommodityPriceStruct currentPrice;
+ private static final long CURRENT_PRICE_ID = 0L;
+
+ public CommodityPriceClusterPriceChangeEvent(
+ ChipStructs.CommodityPriceClusterCommodityPriceStruct currentPrice
+ ) {
+ this.currentPrice = currentPrice;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(CURRENT_PRICE_ID, currentPrice.encodeTlv()));
+
+ return new StructType(values);
+ }
+
+ public static CommodityPriceClusterPriceChangeEvent decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ ChipStructs.CommodityPriceClusterCommodityPriceStruct currentPrice = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CURRENT_PRICE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ currentPrice = ChipStructs.CommodityPriceClusterCommodityPriceStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ return new CommodityPriceClusterPriceChangeEvent(
+ currentPrice
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityPriceClusterPriceChangeEvent {\n");
+ output.append("\tcurrentPrice: ");
+ output.append(currentPrice);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityPriceClusterForecastChangeEvent {
+ public ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceStruct> priceForecast;
+ private static final long PRICE_FORECAST_ID = 0L;
+
+ public CommodityPriceClusterForecastChangeEvent(
+ ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceStruct> priceForecast
+ ) {
+ this.priceForecast = priceForecast;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(PRICE_FORECAST_ID, ArrayType.generateArrayType(priceForecast, (elementpriceForecast) -> elementpriceForecast.encodeTlv())));
+
+ return new StructType(values);
+ }
+
+ public static CommodityPriceClusterForecastChangeEvent decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceStruct> priceForecast = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == PRICE_FORECAST_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ priceForecast = castingValue.map((elementcastingValue) -> ChipStructs.CommodityPriceClusterCommodityPriceStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ return new CommodityPriceClusterForecastChangeEvent(
+ priceForecast
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityPriceClusterForecastChangeEvent {\n");
+ output.append("\tpriceForecast: ");
+ output.append(priceForecast);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent {
public byte[] eventID;
public @Nullable Integer transitionIndex;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 9ffdbba..423e6fb 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -6895,6 +6895,325 @@
return output.toString();
}
}
+public static class CommodityPriceClusterCommodityPriceComponentStruct {
+ public Long price;
+ public Integer source;
+ public Optional<String> description;
+ public Optional<Long> tariffComponentID;
+ private static final long PRICE_ID = 0L;
+ private static final long SOURCE_ID = 1L;
+ private static final long DESCRIPTION_ID = 2L;
+ private static final long TARIFF_COMPONENT_ID_ID = 3L;
+
+ public CommodityPriceClusterCommodityPriceComponentStruct(
+ Long price,
+ Integer source,
+ Optional<String> description,
+ Optional<Long> tariffComponentID
+ ) {
+ this.price = price;
+ this.source = source;
+ this.description = description;
+ this.tariffComponentID = tariffComponentID;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(PRICE_ID, new IntType(price)));
+ values.add(new StructElement(SOURCE_ID, new UIntType(source)));
+ values.add(new StructElement(DESCRIPTION_ID, description.<BaseTLVType>map((nonOptionaldescription) -> new StringType(nonOptionaldescription)).orElse(new EmptyType())));
+ values.add(new StructElement(TARIFF_COMPONENT_ID_ID, tariffComponentID.<BaseTLVType>map((nonOptionaltariffComponentID) -> new UIntType(nonOptionaltariffComponentID)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static CommodityPriceClusterCommodityPriceComponentStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long price = null;
+ Integer source = null;
+ Optional<String> description = Optional.empty();
+ Optional<Long> tariffComponentID = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == PRICE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ price = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == SOURCE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ source = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DESCRIPTION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ description = Optional.of(castingValue.value(String.class));
+ }
+ } else if (element.contextTagNum() == TARIFF_COMPONENT_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ tariffComponentID = Optional.of(castingValue.value(Long.class));
+ }
+ }
+ }
+ return new CommodityPriceClusterCommodityPriceComponentStruct(
+ price,
+ source,
+ description,
+ tariffComponentID
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityPriceClusterCommodityPriceComponentStruct {\n");
+ output.append("\tprice: ");
+ output.append(price);
+ output.append("\n");
+ output.append("\tsource: ");
+ output.append(source);
+ output.append("\n");
+ output.append("\tdescription: ");
+ output.append(description);
+ output.append("\n");
+ output.append("\ttariffComponentID: ");
+ output.append(tariffComponentID);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityPriceClusterCommodityPriceStruct {
+ public Long periodStart;
+ public @Nullable Long periodEnd;
+ public ChipStructs.CommodityPriceClusterPriceStruct price;
+ public Optional<String> description;
+ public Optional<ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceComponentStruct>> components;
+ private static final long PERIOD_START_ID = 0L;
+ private static final long PERIOD_END_ID = 1L;
+ private static final long PRICE_ID = 2L;
+ private static final long DESCRIPTION_ID = 3L;
+ private static final long COMPONENTS_ID = 4L;
+
+ public CommodityPriceClusterCommodityPriceStruct(
+ Long periodStart,
+ @Nullable Long periodEnd,
+ ChipStructs.CommodityPriceClusterPriceStruct price,
+ Optional<String> description,
+ Optional<ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceComponentStruct>> components
+ ) {
+ this.periodStart = periodStart;
+ this.periodEnd = periodEnd;
+ this.price = price;
+ this.description = description;
+ this.components = components;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(PERIOD_START_ID, new UIntType(periodStart)));
+ values.add(new StructElement(PERIOD_END_ID, periodEnd != null ? new UIntType(periodEnd) : new NullType()));
+ values.add(new StructElement(PRICE_ID, price.encodeTlv()));
+ values.add(new StructElement(DESCRIPTION_ID, description.<BaseTLVType>map((nonOptionaldescription) -> new StringType(nonOptionaldescription)).orElse(new EmptyType())));
+ values.add(new StructElement(COMPONENTS_ID, components.<BaseTLVType>map((nonOptionalcomponents) -> ArrayType.generateArrayType(nonOptionalcomponents, (elementnonOptionalcomponents) -> elementnonOptionalcomponents.encodeTlv())).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static CommodityPriceClusterCommodityPriceStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long periodStart = null;
+ @Nullable Long periodEnd = null;
+ ChipStructs.CommodityPriceClusterPriceStruct price = null;
+ Optional<String> description = Optional.empty();
+ Optional<ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceComponentStruct>> components = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == PERIOD_START_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ periodStart = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == PERIOD_END_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ periodEnd = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == PRICE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ price = ChipStructs.CommodityPriceClusterPriceStruct.decodeTlv(castingValue);
+ }
+ } else if (element.contextTagNum() == DESCRIPTION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ description = Optional.of(castingValue.value(String.class));
+ }
+ } else if (element.contextTagNum() == COMPONENTS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ components = Optional.of(castingValue.map((elementcastingValue) -> ChipStructs.CommodityPriceClusterCommodityPriceComponentStruct.decodeTlv(elementcastingValue)));
+ }
+ }
+ }
+ return new CommodityPriceClusterCommodityPriceStruct(
+ periodStart,
+ periodEnd,
+ price,
+ description,
+ components
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityPriceClusterCommodityPriceStruct {\n");
+ output.append("\tperiodStart: ");
+ output.append(periodStart);
+ output.append("\n");
+ output.append("\tperiodEnd: ");
+ output.append(periodEnd);
+ output.append("\n");
+ output.append("\tprice: ");
+ output.append(price);
+ output.append("\n");
+ output.append("\tdescription: ");
+ output.append(description);
+ output.append("\n");
+ output.append("\tcomponents: ");
+ output.append(components);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityPriceClusterPriceStruct {
+ public Long amount;
+ public ChipStructs.CommodityPriceClusterCurrencyStruct currency;
+ private static final long AMOUNT_ID = 0L;
+ private static final long CURRENCY_ID = 1L;
+
+ public CommodityPriceClusterPriceStruct(
+ Long amount,
+ ChipStructs.CommodityPriceClusterCurrencyStruct currency
+ ) {
+ this.amount = amount;
+ this.currency = currency;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(AMOUNT_ID, new IntType(amount)));
+ values.add(new StructElement(CURRENCY_ID, currency.encodeTlv()));
+
+ return new StructType(values);
+ }
+
+ public static CommodityPriceClusterPriceStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long amount = null;
+ ChipStructs.CommodityPriceClusterCurrencyStruct currency = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == AMOUNT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ amount = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == CURRENCY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ currency = ChipStructs.CommodityPriceClusterCurrencyStruct.decodeTlv(castingValue);
+ }
+ }
+ }
+ return new CommodityPriceClusterPriceStruct(
+ amount,
+ currency
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityPriceClusterPriceStruct {\n");
+ output.append("\tamount: ");
+ output.append(amount);
+ output.append("\n");
+ output.append("\tcurrency: ");
+ output.append(currency);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityPriceClusterCurrencyStruct {
+ public Integer currency;
+ public Integer decimalPoints;
+ private static final long CURRENCY_ID = 0L;
+ private static final long DECIMAL_POINTS_ID = 1L;
+
+ public CommodityPriceClusterCurrencyStruct(
+ Integer currency,
+ Integer decimalPoints
+ ) {
+ this.currency = currency;
+ this.decimalPoints = decimalPoints;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(CURRENCY_ID, new UIntType(currency)));
+ values.add(new StructElement(DECIMAL_POINTS_ID, new UIntType(decimalPoints)));
+
+ return new StructType(values);
+ }
+
+ public static CommodityPriceClusterCurrencyStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer currency = null;
+ Integer decimalPoints = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CURRENCY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ currency = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DECIMAL_POINTS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ decimalPoints = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new CommodityPriceClusterCurrencyStruct(
+ currency,
+ decimalPoints
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityPriceClusterCurrencyStruct {\n");
+ output.append("\tcurrency: ");
+ output.append(currency);
+ output.append("\n");
+ output.append("\tdecimalPoints: ");
+ output.append(decimalPoints);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class DemandResponseLoadControlClusterHeatingSourceControlStruct {
public Integer heatingSource;
private static final long HEATING_SOURCE_ID = 0L;
@@ -16074,6 +16393,993 @@
return output.toString();
}
}
+public static class CommodityTariffClusterPeakPeriodStruct {
+ public Integer severity;
+ public Integer peakPeriod;
+ private static final long SEVERITY_ID = 0L;
+ private static final long PEAK_PERIOD_ID = 1L;
+
+ public CommodityTariffClusterPeakPeriodStruct(
+ Integer severity,
+ Integer peakPeriod
+ ) {
+ this.severity = severity;
+ this.peakPeriod = peakPeriod;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(SEVERITY_ID, new UIntType(severity)));
+ values.add(new StructElement(PEAK_PERIOD_ID, new UIntType(peakPeriod)));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterPeakPeriodStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer severity = null;
+ Integer peakPeriod = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == SEVERITY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ severity = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == PEAK_PERIOD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ peakPeriod = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new CommodityTariffClusterPeakPeriodStruct(
+ severity,
+ peakPeriod
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterPeakPeriodStruct {\n");
+ output.append("\tseverity: ");
+ output.append(severity);
+ output.append("\n");
+ output.append("\tpeakPeriod: ");
+ output.append(peakPeriod);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct {
+ public Integer number;
+ public Integer requiredState;
+ private static final long NUMBER_ID = 0L;
+ private static final long REQUIRED_STATE_ID = 1L;
+
+ public CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct(
+ Integer number,
+ Integer requiredState
+ ) {
+ this.number = number;
+ this.requiredState = requiredState;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(NUMBER_ID, new UIntType(number)));
+ values.add(new StructElement(REQUIRED_STATE_ID, new UIntType(requiredState)));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer number = null;
+ Integer requiredState = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == NUMBER_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ number = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == REQUIRED_STATE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ requiredState = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct(
+ number,
+ requiredState
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct {\n");
+ output.append("\tnumber: ");
+ output.append(number);
+ output.append("\n");
+ output.append("\trequiredState: ");
+ output.append(requiredState);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterTariffPriceStruct {
+ public Integer priceType;
+ public Optional<Long> price;
+ public Optional<Integer> priceLevel;
+ private static final long PRICE_TYPE_ID = 0L;
+ private static final long PRICE_ID = 1L;
+ private static final long PRICE_LEVEL_ID = 2L;
+
+ public CommodityTariffClusterTariffPriceStruct(
+ Integer priceType,
+ Optional<Long> price,
+ Optional<Integer> priceLevel
+ ) {
+ this.priceType = priceType;
+ this.price = price;
+ this.priceLevel = priceLevel;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(PRICE_TYPE_ID, new UIntType(priceType)));
+ values.add(new StructElement(PRICE_ID, price.<BaseTLVType>map((nonOptionalprice) -> new IntType(nonOptionalprice)).orElse(new EmptyType())));
+ values.add(new StructElement(PRICE_LEVEL_ID, priceLevel.<BaseTLVType>map((nonOptionalpriceLevel) -> new IntType(nonOptionalpriceLevel)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterTariffPriceStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer priceType = null;
+ Optional<Long> price = Optional.empty();
+ Optional<Integer> priceLevel = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == PRICE_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ priceType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == PRICE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ price = Optional.of(castingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == PRICE_LEVEL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ priceLevel = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterTariffPriceStruct(
+ priceType,
+ price,
+ priceLevel
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterTariffPriceStruct {\n");
+ output.append("\tpriceType: ");
+ output.append(priceType);
+ output.append("\n");
+ output.append("\tprice: ");
+ output.append(price);
+ output.append("\n");
+ output.append("\tpriceLevel: ");
+ output.append(priceLevel);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterTariffComponentStruct {
+ public Long tariffComponentID;
+ public @Nullable Optional<ChipStructs.CommodityTariffClusterTariffPriceStruct> price;
+ public Optional<Boolean> friendlyCredit;
+ public Optional<ChipStructs.CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct> auxiliaryLoad;
+ public Optional<ChipStructs.CommodityTariffClusterPeakPeriodStruct> peakPeriod;
+ public Optional<ChipStructs.CommodityTariffClusterPowerThresholdStruct> powerThreshold;
+ public @Nullable Long threshold;
+ public @Nullable Optional<String> label;
+ public Optional<Boolean> predicted;
+ private static final long TARIFF_COMPONENT_ID_ID = 0L;
+ private static final long PRICE_ID = 1L;
+ private static final long FRIENDLY_CREDIT_ID = 2L;
+ private static final long AUXILIARY_LOAD_ID = 3L;
+ private static final long PEAK_PERIOD_ID = 4L;
+ private static final long POWER_THRESHOLD_ID = 5L;
+ private static final long THRESHOLD_ID = 6L;
+ private static final long LABEL_ID = 7L;
+ private static final long PREDICTED_ID = 8L;
+
+ public CommodityTariffClusterTariffComponentStruct(
+ Long tariffComponentID,
+ @Nullable Optional<ChipStructs.CommodityTariffClusterTariffPriceStruct> price,
+ Optional<Boolean> friendlyCredit,
+ Optional<ChipStructs.CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct> auxiliaryLoad,
+ Optional<ChipStructs.CommodityTariffClusterPeakPeriodStruct> peakPeriod,
+ Optional<ChipStructs.CommodityTariffClusterPowerThresholdStruct> powerThreshold,
+ @Nullable Long threshold,
+ @Nullable Optional<String> label,
+ Optional<Boolean> predicted
+ ) {
+ this.tariffComponentID = tariffComponentID;
+ this.price = price;
+ this.friendlyCredit = friendlyCredit;
+ this.auxiliaryLoad = auxiliaryLoad;
+ this.peakPeriod = peakPeriod;
+ this.powerThreshold = powerThreshold;
+ this.threshold = threshold;
+ this.label = label;
+ this.predicted = predicted;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(TARIFF_COMPONENT_ID_ID, new UIntType(tariffComponentID)));
+ values.add(new StructElement(PRICE_ID, price != null ? price.<BaseTLVType>map((nonOptionalprice) -> nonOptionalprice.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(FRIENDLY_CREDIT_ID, friendlyCredit.<BaseTLVType>map((nonOptionalfriendlyCredit) -> new BooleanType(nonOptionalfriendlyCredit)).orElse(new EmptyType())));
+ values.add(new StructElement(AUXILIARY_LOAD_ID, auxiliaryLoad.<BaseTLVType>map((nonOptionalauxiliaryLoad) -> nonOptionalauxiliaryLoad.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(PEAK_PERIOD_ID, peakPeriod.<BaseTLVType>map((nonOptionalpeakPeriod) -> nonOptionalpeakPeriod.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(POWER_THRESHOLD_ID, powerThreshold.<BaseTLVType>map((nonOptionalpowerThreshold) -> nonOptionalpowerThreshold.encodeTlv()).orElse(new EmptyType())));
+ values.add(new StructElement(THRESHOLD_ID, threshold != null ? new UIntType(threshold) : new NullType()));
+ values.add(new StructElement(LABEL_ID, label != null ? label.<BaseTLVType>map((nonOptionallabel) -> new StringType(nonOptionallabel)).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(PREDICTED_ID, predicted.<BaseTLVType>map((nonOptionalpredicted) -> new BooleanType(nonOptionalpredicted)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterTariffComponentStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long tariffComponentID = null;
+ @Nullable Optional<ChipStructs.CommodityTariffClusterTariffPriceStruct> price = null;
+ Optional<Boolean> friendlyCredit = Optional.empty();
+ Optional<ChipStructs.CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct> auxiliaryLoad = Optional.empty();
+ Optional<ChipStructs.CommodityTariffClusterPeakPeriodStruct> peakPeriod = Optional.empty();
+ Optional<ChipStructs.CommodityTariffClusterPowerThresholdStruct> powerThreshold = Optional.empty();
+ @Nullable Long threshold = null;
+ @Nullable Optional<String> label = null;
+ Optional<Boolean> predicted = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == TARIFF_COMPONENT_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ tariffComponentID = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == PRICE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ price = Optional.of(ChipStructs.CommodityTariffClusterTariffPriceStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == FRIENDLY_CREDIT_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Boolean) {
+ BooleanType castingValue = element.value(BooleanType.class);
+ friendlyCredit = Optional.of(castingValue.value(Boolean.class));
+ }
+ } else if (element.contextTagNum() == AUXILIARY_LOAD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ auxiliaryLoad = Optional.of(ChipStructs.CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == PEAK_PERIOD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ peakPeriod = Optional.of(ChipStructs.CommodityTariffClusterPeakPeriodStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == POWER_THRESHOLD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ powerThreshold = Optional.of(ChipStructs.CommodityTariffClusterPowerThresholdStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == THRESHOLD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ threshold = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == LABEL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ label = Optional.of(castingValue.value(String.class));
+ }
+ } else if (element.contextTagNum() == PREDICTED_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Boolean) {
+ BooleanType castingValue = element.value(BooleanType.class);
+ predicted = Optional.of(castingValue.value(Boolean.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterTariffComponentStruct(
+ tariffComponentID,
+ price,
+ friendlyCredit,
+ auxiliaryLoad,
+ peakPeriod,
+ powerThreshold,
+ threshold,
+ label,
+ predicted
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterTariffComponentStruct {\n");
+ output.append("\ttariffComponentID: ");
+ output.append(tariffComponentID);
+ output.append("\n");
+ output.append("\tprice: ");
+ output.append(price);
+ output.append("\n");
+ output.append("\tfriendlyCredit: ");
+ output.append(friendlyCredit);
+ output.append("\n");
+ output.append("\tauxiliaryLoad: ");
+ output.append(auxiliaryLoad);
+ output.append("\n");
+ output.append("\tpeakPeriod: ");
+ output.append(peakPeriod);
+ output.append("\n");
+ output.append("\tpowerThreshold: ");
+ output.append(powerThreshold);
+ output.append("\n");
+ output.append("\tthreshold: ");
+ output.append(threshold);
+ output.append("\n");
+ output.append("\tlabel: ");
+ output.append(label);
+ output.append("\n");
+ output.append("\tpredicted: ");
+ output.append(predicted);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterCalendarPeriodStruct {
+ public @Nullable Long startDate;
+ public ArrayList<Long> dayPatternIDs;
+ private static final long START_DATE_ID = 0L;
+ private static final long DAY_PATTERN_I_DS_ID = 1L;
+
+ public CommodityTariffClusterCalendarPeriodStruct(
+ @Nullable Long startDate,
+ ArrayList<Long> dayPatternIDs
+ ) {
+ this.startDate = startDate;
+ this.dayPatternIDs = dayPatternIDs;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(START_DATE_ID, startDate != null ? new UIntType(startDate) : new NullType()));
+ values.add(new StructElement(DAY_PATTERN_I_DS_ID, ArrayType.generateArrayType(dayPatternIDs, (elementdayPatternIDs) -> new UIntType(elementdayPatternIDs))));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterCalendarPeriodStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ @Nullable Long startDate = null;
+ ArrayList<Long> dayPatternIDs = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == START_DATE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ startDate = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == DAY_PATTERN_I_DS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ dayPatternIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterCalendarPeriodStruct(
+ startDate,
+ dayPatternIDs
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterCalendarPeriodStruct {\n");
+ output.append("\tstartDate: ");
+ output.append(startDate);
+ output.append("\n");
+ output.append("\tdayPatternIDs: ");
+ output.append(dayPatternIDs);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterDayEntryStruct {
+ public Long dayEntryID;
+ public Integer startTime;
+ public Optional<Integer> duration;
+ public Optional<Integer> randomizationOffset;
+ public Optional<Integer> randomizationType;
+ private static final long DAY_ENTRY_ID_ID = 0L;
+ private static final long START_TIME_ID = 1L;
+ private static final long DURATION_ID = 2L;
+ private static final long RANDOMIZATION_OFFSET_ID = 3L;
+ private static final long RANDOMIZATION_TYPE_ID = 4L;
+
+ public CommodityTariffClusterDayEntryStruct(
+ Long dayEntryID,
+ Integer startTime,
+ Optional<Integer> duration,
+ Optional<Integer> randomizationOffset,
+ Optional<Integer> randomizationType
+ ) {
+ this.dayEntryID = dayEntryID;
+ this.startTime = startTime;
+ this.duration = duration;
+ this.randomizationOffset = randomizationOffset;
+ this.randomizationType = randomizationType;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(DAY_ENTRY_ID_ID, new UIntType(dayEntryID)));
+ values.add(new StructElement(START_TIME_ID, new UIntType(startTime)));
+ values.add(new StructElement(DURATION_ID, duration.<BaseTLVType>map((nonOptionalduration) -> new UIntType(nonOptionalduration)).orElse(new EmptyType())));
+ values.add(new StructElement(RANDOMIZATION_OFFSET_ID, randomizationOffset.<BaseTLVType>map((nonOptionalrandomizationOffset) -> new IntType(nonOptionalrandomizationOffset)).orElse(new EmptyType())));
+ values.add(new StructElement(RANDOMIZATION_TYPE_ID, randomizationType.<BaseTLVType>map((nonOptionalrandomizationType) -> new UIntType(nonOptionalrandomizationType)).orElse(new EmptyType())));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterDayEntryStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long dayEntryID = null;
+ Integer startTime = null;
+ Optional<Integer> duration = Optional.empty();
+ Optional<Integer> randomizationOffset = Optional.empty();
+ Optional<Integer> randomizationType = Optional.empty();
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == DAY_ENTRY_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ dayEntryID = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == START_TIME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ startTime = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DURATION_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ duration = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == RANDOMIZATION_OFFSET_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ randomizationOffset = Optional.of(castingValue.value(Integer.class));
+ }
+ } else if (element.contextTagNum() == RANDOMIZATION_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ randomizationType = Optional.of(castingValue.value(Integer.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterDayEntryStruct(
+ dayEntryID,
+ startTime,
+ duration,
+ randomizationOffset,
+ randomizationType
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterDayEntryStruct {\n");
+ output.append("\tdayEntryID: ");
+ output.append(dayEntryID);
+ output.append("\n");
+ output.append("\tstartTime: ");
+ output.append(startTime);
+ output.append("\n");
+ output.append("\tduration: ");
+ output.append(duration);
+ output.append("\n");
+ output.append("\trandomizationOffset: ");
+ output.append(randomizationOffset);
+ output.append("\n");
+ output.append("\trandomizationType: ");
+ output.append(randomizationType);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterDayPatternStruct {
+ public Long dayPatternID;
+ public Integer daysOfWeek;
+ public ArrayList<Long> dayEntryIDs;
+ private static final long DAY_PATTERN_ID_ID = 0L;
+ private static final long DAYS_OF_WEEK_ID = 1L;
+ private static final long DAY_ENTRY_I_DS_ID = 2L;
+
+ public CommodityTariffClusterDayPatternStruct(
+ Long dayPatternID,
+ Integer daysOfWeek,
+ ArrayList<Long> dayEntryIDs
+ ) {
+ this.dayPatternID = dayPatternID;
+ this.daysOfWeek = daysOfWeek;
+ this.dayEntryIDs = dayEntryIDs;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(DAY_PATTERN_ID_ID, new UIntType(dayPatternID)));
+ values.add(new StructElement(DAYS_OF_WEEK_ID, new UIntType(daysOfWeek)));
+ values.add(new StructElement(DAY_ENTRY_I_DS_ID, ArrayType.generateArrayType(dayEntryIDs, (elementdayEntryIDs) -> new UIntType(elementdayEntryIDs))));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterDayPatternStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long dayPatternID = null;
+ Integer daysOfWeek = null;
+ ArrayList<Long> dayEntryIDs = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == DAY_PATTERN_ID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ dayPatternID = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == DAYS_OF_WEEK_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ daysOfWeek = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DAY_ENTRY_I_DS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ dayEntryIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterDayPatternStruct(
+ dayPatternID,
+ daysOfWeek,
+ dayEntryIDs
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterDayPatternStruct {\n");
+ output.append("\tdayPatternID: ");
+ output.append(dayPatternID);
+ output.append("\n");
+ output.append("\tdaysOfWeek: ");
+ output.append(daysOfWeek);
+ output.append("\n");
+ output.append("\tdayEntryIDs: ");
+ output.append(dayEntryIDs);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterDayStruct {
+ public Long date;
+ public Integer dayType;
+ public ArrayList<Long> dayEntryIDs;
+ private static final long DATE_ID = 0L;
+ private static final long DAY_TYPE_ID = 1L;
+ private static final long DAY_ENTRY_I_DS_ID = 2L;
+
+ public CommodityTariffClusterDayStruct(
+ Long date,
+ Integer dayType,
+ ArrayList<Long> dayEntryIDs
+ ) {
+ this.date = date;
+ this.dayType = dayType;
+ this.dayEntryIDs = dayEntryIDs;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(DATE_ID, new UIntType(date)));
+ values.add(new StructElement(DAY_TYPE_ID, new UIntType(dayType)));
+ values.add(new StructElement(DAY_ENTRY_I_DS_ID, ArrayType.generateArrayType(dayEntryIDs, (elementdayEntryIDs) -> new UIntType(elementdayEntryIDs))));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterDayStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Long date = null;
+ Integer dayType = null;
+ ArrayList<Long> dayEntryIDs = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == DATE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ date = castingValue.value(Long.class);
+ }
+ } else if (element.contextTagNum() == DAY_TYPE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ dayType = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DAY_ENTRY_I_DS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ dayEntryIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterDayStruct(
+ date,
+ dayType,
+ dayEntryIDs
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterDayStruct {\n");
+ output.append("\tdate: ");
+ output.append(date);
+ output.append("\n");
+ output.append("\tdayType: ");
+ output.append(dayType);
+ output.append("\n");
+ output.append("\tdayEntryIDs: ");
+ output.append(dayEntryIDs);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterTariffInformationStruct {
+ public @Nullable String tariffLabel;
+ public @Nullable String providerName;
+ public @Nullable Optional<ChipStructs.CommodityTariffClusterCurrencyStruct> currency;
+ public @Nullable Integer blockMode;
+ private static final long TARIFF_LABEL_ID = 0L;
+ private static final long PROVIDER_NAME_ID = 1L;
+ private static final long CURRENCY_ID = 2L;
+ private static final long BLOCK_MODE_ID = 3L;
+
+ public CommodityTariffClusterTariffInformationStruct(
+ @Nullable String tariffLabel,
+ @Nullable String providerName,
+ @Nullable Optional<ChipStructs.CommodityTariffClusterCurrencyStruct> currency,
+ @Nullable Integer blockMode
+ ) {
+ this.tariffLabel = tariffLabel;
+ this.providerName = providerName;
+ this.currency = currency;
+ this.blockMode = blockMode;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(TARIFF_LABEL_ID, tariffLabel != null ? new StringType(tariffLabel) : new NullType()));
+ values.add(new StructElement(PROVIDER_NAME_ID, providerName != null ? new StringType(providerName) : new NullType()));
+ values.add(new StructElement(CURRENCY_ID, currency != null ? currency.<BaseTLVType>map((nonOptionalcurrency) -> nonOptionalcurrency.encodeTlv()).orElse(new EmptyType()) : new NullType()));
+ values.add(new StructElement(BLOCK_MODE_ID, blockMode != null ? new UIntType(blockMode) : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterTariffInformationStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ @Nullable String tariffLabel = null;
+ @Nullable String providerName = null;
+ @Nullable Optional<ChipStructs.CommodityTariffClusterCurrencyStruct> currency = null;
+ @Nullable Integer blockMode = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == TARIFF_LABEL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ tariffLabel = castingValue.value(String.class);
+ }
+ } else if (element.contextTagNum() == PROVIDER_NAME_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ providerName = castingValue.value(String.class);
+ }
+ } else if (element.contextTagNum() == CURRENCY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ currency = Optional.of(ChipStructs.CommodityTariffClusterCurrencyStruct.decodeTlv(castingValue));
+ }
+ } else if (element.contextTagNum() == BLOCK_MODE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ blockMode = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new CommodityTariffClusterTariffInformationStruct(
+ tariffLabel,
+ providerName,
+ currency,
+ blockMode
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterTariffInformationStruct {\n");
+ output.append("\ttariffLabel: ");
+ output.append(tariffLabel);
+ output.append("\n");
+ output.append("\tproviderName: ");
+ output.append(providerName);
+ output.append("\n");
+ output.append("\tcurrency: ");
+ output.append(currency);
+ output.append("\n");
+ output.append("\tblockMode: ");
+ output.append(blockMode);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterTariffPeriodStruct {
+ public @Nullable String label;
+ public ArrayList<Long> dayEntryIDs;
+ public ArrayList<Long> tariffComponentIDs;
+ private static final long LABEL_ID = 0L;
+ private static final long DAY_ENTRY_I_DS_ID = 1L;
+ private static final long TARIFF_COMPONENT_I_DS_ID = 2L;
+
+ public CommodityTariffClusterTariffPeriodStruct(
+ @Nullable String label,
+ ArrayList<Long> dayEntryIDs,
+ ArrayList<Long> tariffComponentIDs
+ ) {
+ this.label = label;
+ this.dayEntryIDs = dayEntryIDs;
+ this.tariffComponentIDs = tariffComponentIDs;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(LABEL_ID, label != null ? new StringType(label) : new NullType()));
+ values.add(new StructElement(DAY_ENTRY_I_DS_ID, ArrayType.generateArrayType(dayEntryIDs, (elementdayEntryIDs) -> new UIntType(elementdayEntryIDs))));
+ values.add(new StructElement(TARIFF_COMPONENT_I_DS_ID, ArrayType.generateArrayType(tariffComponentIDs, (elementtariffComponentIDs) -> new UIntType(elementtariffComponentIDs))));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterTariffPeriodStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ @Nullable String label = null;
+ ArrayList<Long> dayEntryIDs = null;
+ ArrayList<Long> tariffComponentIDs = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == LABEL_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.String) {
+ StringType castingValue = element.value(StringType.class);
+ label = castingValue.value(String.class);
+ }
+ } else if (element.contextTagNum() == DAY_ENTRY_I_DS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ dayEntryIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == TARIFF_COMPONENT_I_DS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ tariffComponentIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ }
+ }
+ return new CommodityTariffClusterTariffPeriodStruct(
+ label,
+ dayEntryIDs,
+ tariffComponentIDs
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterTariffPeriodStruct {\n");
+ output.append("\tlabel: ");
+ output.append(label);
+ output.append("\n");
+ output.append("\tdayEntryIDs: ");
+ output.append(dayEntryIDs);
+ output.append("\n");
+ output.append("\ttariffComponentIDs: ");
+ output.append(tariffComponentIDs);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterPowerThresholdStruct {
+ public Optional<Long> powerThreshold;
+ public Optional<Long> apparentPowerThreshold;
+ public @Nullable Integer powerThresholdSource;
+ private static final long POWER_THRESHOLD_ID = 0L;
+ private static final long APPARENT_POWER_THRESHOLD_ID = 1L;
+ private static final long POWER_THRESHOLD_SOURCE_ID = 2L;
+
+ public CommodityTariffClusterPowerThresholdStruct(
+ Optional<Long> powerThreshold,
+ Optional<Long> apparentPowerThreshold,
+ @Nullable Integer powerThresholdSource
+ ) {
+ this.powerThreshold = powerThreshold;
+ this.apparentPowerThreshold = apparentPowerThreshold;
+ this.powerThresholdSource = powerThresholdSource;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(POWER_THRESHOLD_ID, powerThreshold.<BaseTLVType>map((nonOptionalpowerThreshold) -> new IntType(nonOptionalpowerThreshold)).orElse(new EmptyType())));
+ values.add(new StructElement(APPARENT_POWER_THRESHOLD_ID, apparentPowerThreshold.<BaseTLVType>map((nonOptionalapparentPowerThreshold) -> new IntType(nonOptionalapparentPowerThreshold)).orElse(new EmptyType())));
+ values.add(new StructElement(POWER_THRESHOLD_SOURCE_ID, powerThresholdSource != null ? new UIntType(powerThresholdSource) : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterPowerThresholdStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Optional<Long> powerThreshold = Optional.empty();
+ Optional<Long> apparentPowerThreshold = Optional.empty();
+ @Nullable Integer powerThresholdSource = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == POWER_THRESHOLD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ powerThreshold = Optional.of(castingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == APPARENT_POWER_THRESHOLD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ apparentPowerThreshold = Optional.of(castingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == POWER_THRESHOLD_SOURCE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ powerThresholdSource = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new CommodityTariffClusterPowerThresholdStruct(
+ powerThreshold,
+ apparentPowerThreshold,
+ powerThresholdSource
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterPowerThresholdStruct {\n");
+ output.append("\tpowerThreshold: ");
+ output.append(powerThreshold);
+ output.append("\n");
+ output.append("\tapparentPowerThreshold: ");
+ output.append(apparentPowerThreshold);
+ output.append("\n");
+ output.append("\tpowerThresholdSource: ");
+ output.append(powerThresholdSource);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityTariffClusterCurrencyStruct {
+ public Integer currency;
+ public Integer decimalPoints;
+ private static final long CURRENCY_ID = 0L;
+ private static final long DECIMAL_POINTS_ID = 1L;
+
+ public CommodityTariffClusterCurrencyStruct(
+ Integer currency,
+ Integer decimalPoints
+ ) {
+ this.currency = currency;
+ this.decimalPoints = decimalPoints;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(CURRENCY_ID, new UIntType(currency)));
+ values.add(new StructElement(DECIMAL_POINTS_ID, new UIntType(decimalPoints)));
+
+ return new StructType(values);
+ }
+
+ public static CommodityTariffClusterCurrencyStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer currency = null;
+ Integer decimalPoints = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CURRENCY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ currency = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == DECIMAL_POINTS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ decimalPoints = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new CommodityTariffClusterCurrencyStruct(
+ currency,
+ decimalPoints
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityTariffClusterCurrencyStruct {\n");
+ output.append("\tcurrency: ");
+ output.append(currency);
+ output.append("\n");
+ output.append("\tdecimalPoints: ");
+ output.append(decimalPoints);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class EcosystemInformationClusterDeviceTypeStruct {
public Long deviceType;
public Integer revision;
@@ -16711,6 +18017,143 @@
return output.toString();
}
}
+public static class MeterIdentificationClusterPowerThresholdStruct {
+ public Optional<Long> powerThreshold;
+ public Optional<Long> apparentPowerThreshold;
+ public @Nullable Integer powerThresholdSource;
+ private static final long POWER_THRESHOLD_ID = 0L;
+ private static final long APPARENT_POWER_THRESHOLD_ID = 1L;
+ private static final long POWER_THRESHOLD_SOURCE_ID = 2L;
+
+ public MeterIdentificationClusterPowerThresholdStruct(
+ Optional<Long> powerThreshold,
+ Optional<Long> apparentPowerThreshold,
+ @Nullable Integer powerThresholdSource
+ ) {
+ this.powerThreshold = powerThreshold;
+ this.apparentPowerThreshold = apparentPowerThreshold;
+ this.powerThresholdSource = powerThresholdSource;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(POWER_THRESHOLD_ID, powerThreshold.<BaseTLVType>map((nonOptionalpowerThreshold) -> new IntType(nonOptionalpowerThreshold)).orElse(new EmptyType())));
+ values.add(new StructElement(APPARENT_POWER_THRESHOLD_ID, apparentPowerThreshold.<BaseTLVType>map((nonOptionalapparentPowerThreshold) -> new IntType(nonOptionalapparentPowerThreshold)).orElse(new EmptyType())));
+ values.add(new StructElement(POWER_THRESHOLD_SOURCE_ID, powerThresholdSource != null ? new UIntType(powerThresholdSource) : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static MeterIdentificationClusterPowerThresholdStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Optional<Long> powerThreshold = Optional.empty();
+ Optional<Long> apparentPowerThreshold = Optional.empty();
+ @Nullable Integer powerThresholdSource = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == POWER_THRESHOLD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ powerThreshold = Optional.of(castingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == APPARENT_POWER_THRESHOLD_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ apparentPowerThreshold = Optional.of(castingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == POWER_THRESHOLD_SOURCE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ powerThresholdSource = castingValue.value(Integer.class);
+ }
+ }
+ }
+ return new MeterIdentificationClusterPowerThresholdStruct(
+ powerThreshold,
+ apparentPowerThreshold,
+ powerThresholdSource
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("MeterIdentificationClusterPowerThresholdStruct {\n");
+ output.append("\tpowerThreshold: ");
+ output.append(powerThreshold);
+ output.append("\n");
+ output.append("\tapparentPowerThreshold: ");
+ output.append(apparentPowerThreshold);
+ output.append("\n");
+ output.append("\tpowerThresholdSource: ");
+ output.append(powerThresholdSource);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class CommodityMeteringClusterMeteredQuantityStruct {
+ public ArrayList<Long> tariffComponentIDs;
+ public Long quantity;
+ private static final long TARIFF_COMPONENT_I_DS_ID = 0L;
+ private static final long QUANTITY_ID = 1L;
+
+ public CommodityMeteringClusterMeteredQuantityStruct(
+ ArrayList<Long> tariffComponentIDs,
+ Long quantity
+ ) {
+ this.tariffComponentIDs = tariffComponentIDs;
+ this.quantity = quantity;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(TARIFF_COMPONENT_I_DS_ID, ArrayType.generateArrayType(tariffComponentIDs, (elementtariffComponentIDs) -> new UIntType(elementtariffComponentIDs))));
+ values.add(new StructElement(QUANTITY_ID, new IntType(quantity)));
+
+ return new StructType(values);
+ }
+
+ public static CommodityMeteringClusterMeteredQuantityStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ ArrayList<Long> tariffComponentIDs = null;
+ Long quantity = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == TARIFF_COMPONENT_I_DS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ tariffComponentIDs = castingValue.map((elementcastingValue) -> elementcastingValue.value(Long.class));
+ }
+ } else if (element.contextTagNum() == QUANTITY_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Int) {
+ IntType castingValue = element.value(IntType.class);
+ quantity = castingValue.value(Long.class);
+ }
+ }
+ }
+ return new CommodityMeteringClusterMeteredQuantityStruct(
+ tariffComponentIDs,
+ quantity
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("CommodityMeteringClusterMeteredQuantityStruct {\n");
+ output.append("\ttariffComponentIDs: ");
+ output.append(tariffComponentIDs);
+ output.append("\n");
+ output.append("\tquantity: ");
+ output.append(quantity);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class UnitTestingClusterSimpleStruct {
public Integer a;
public Boolean b;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index cecbf2c..49843f7 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -226,6 +226,9 @@
if (clusterId == WaterHeaterManagement.ID) {
return new WaterHeaterManagement();
}
+ if (clusterId == CommodityPrice.ID) {
+ return new CommodityPrice();
+ }
if (clusterId == DemandResponseLoadControl.ID) {
return new DemandResponseLoadControl();
}
@@ -406,6 +409,9 @@
if (clusterId == Chime.ID) {
return new Chime();
}
+ if (clusterId == CommodityTariff.ID) {
+ return new CommodityTariff();
+ }
if (clusterId == EcosystemInformation.ID) {
return new EcosystemInformation();
}
@@ -418,6 +424,12 @@
if (clusterId == TlsClientManagement.ID) {
return new TlsClientManagement();
}
+ if (clusterId == MeterIdentification.ID) {
+ return new MeterIdentification();
+ }
+ if (clusterId == CommodityMetering.ID) {
+ return new CommodityMetering();
+ }
if (clusterId == UnitTesting.ID) {
return new UnitTesting();
}
@@ -9349,6 +9361,148 @@
return Command.valueOf(name).getID();
}
}
+ public static class CommodityPrice implements BaseCluster {
+ public static final long ID = 149L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ TariffUnit(0L),
+ Currency(1L),
+ CurrentPrice(2L),
+ PriceForecast(3L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {
+ PriceChange(0L),
+ ForecastChange(1L),;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ GetDetailedPriceRequest(0L),
+ GetDetailedForecastRequest(2L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum GetDetailedPriceRequestCommandField {Details(0),;
+ private final int id;
+ GetDetailedPriceRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static GetDetailedPriceRequestCommandField value(int id) throws NoSuchFieldError {
+ for (GetDetailedPriceRequestCommandField field : GetDetailedPriceRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum GetDetailedForecastRequestCommandField {Details(0),;
+ private final int id;
+ GetDetailedForecastRequestCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static GetDetailedForecastRequestCommandField value(int id) throws NoSuchFieldError {
+ for (GetDetailedForecastRequestCommandField field : GetDetailedForecastRequestCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class DemandResponseLoadControl implements BaseCluster {
public static final long ID = 150L;
public long getID() {
@@ -18652,6 +18806,161 @@
return Command.valueOf(name).getID();
}
}
+ public static class CommodityTariff implements BaseCluster {
+ public static final long ID = 1792L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ TariffInfo(0L),
+ TariffUnit(1L),
+ StartDate(2L),
+ DayEntries(3L),
+ DayPatterns(4L),
+ CalendarPeriods(5L),
+ IndividualDays(6L),
+ CurrentDay(7L),
+ NextDay(8L),
+ CurrentDayEntry(9L),
+ CurrentDayEntryDate(10L),
+ NextDayEntry(11L),
+ NextDayEntryDate(12L),
+ TariffComponents(13L),
+ TariffPeriods(14L),
+ CurrentTariffComponents(15L),
+ NextTariffComponents(16L),
+ DefaultRandomizationOffset(17L),
+ DefaultRandomizationType(18L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ GetTariffComponent(0L),
+ GetDayEntry(1L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum GetTariffComponentCommandField {TariffComponentID(0),;
+ private final int id;
+ GetTariffComponentCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static GetTariffComponentCommandField value(int id) throws NoSuchFieldError {
+ for (GetTariffComponentCommandField field : GetTariffComponentCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum GetDayEntryCommandField {DayEntryID(0),;
+ private final int id;
+ GetDayEntryCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static GetDayEntryCommandField value(int id) throws NoSuchFieldError {
+ for (GetDayEntryCommandField field : GetDayEntryCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class EcosystemInformation implements BaseCluster {
public static final long ID = 1872L;
public long getID() {
@@ -19314,6 +19623,214 @@
return Command.valueOf(name).getID();
}
}
+ public static class MeterIdentification implements BaseCluster {
+ public static final long ID = 2822L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ MeterType(0L),
+ PointOfDelivery(1L),
+ MeterSerialNumber(2L),
+ ProtocolVersion(3L),
+ PowerThreshold(4L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
+ public static class CommodityMetering implements BaseCluster {
+ public static final long ID = 2823L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ MeteredQuantity(0L),
+ MeteredQuantityTimestamp(1L),
+ MeasurementType(2L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class UnitTesting implements BaseCluster {
public static final long ID = 4294048773L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index e157cc7..1e5a930 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -10629,6 +10629,198 @@
}
}
+
+ public static class DelegatedCommodityPriceClusterGetDetailedPriceResponseCallback implements ChipClusters.CommodityPriceCluster.GetDetailedPriceResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct currentPrice) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+
+ // currentPrice: Struct CommodityPriceStruct
+ // Conversion from this type to Java is not properly implemented yet
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterGetDetailedForecastResponseCallback implements ChipClusters.CommodityPriceCluster.GetDetailedForecastResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(ArrayList<ChipStructs.CommodityPriceClusterCommodityPriceStruct> priceForecast) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+
+ // priceForecast: CommodityPriceStruct
+ // Conversion from this type to Java is not properly implemented yet
+
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+ public static class DelegatedCommodityPriceClusterCurrencyAttributeCallback implements ChipClusters.CommodityPriceCluster.CurrencyAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityPriceClusterCurrencyStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityPriceClusterCurrencyStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterCurrentPriceAttributeCallback implements ChipClusters.CommodityPriceCluster.CurrentPriceAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityPriceClusterCommodityPriceStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityPriceClusterCommodityPriceStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterPriceForecastAttributeCallback implements ChipClusters.CommodityPriceCluster.PriceForecastAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<ChipStructs.CommodityPriceClusterCommodityPriceStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityPriceClusterCommodityPriceStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterGeneratedCommandListAttributeCallback implements ChipClusters.CommodityPriceCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterAcceptedCommandListAttributeCallback implements ChipClusters.CommodityPriceCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterEventListAttributeCallback implements ChipClusters.CommodityPriceCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityPriceClusterAttributeListAttributeCallback implements ChipClusters.CommodityPriceCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedDemandResponseLoadControlClusterLoadControlProgramsAttributeCallback implements ChipClusters.DemandResponseLoadControlCluster.LoadControlProgramsAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -21520,6 +21712,538 @@
}
}
+
+ public static class DelegatedCommodityTariffClusterGetTariffComponentResponseCallback implements ChipClusters.CommodityTariffCluster.GetTariffComponentResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable String label, ArrayList<Long> dayEntryIDs, ChipStructs.CommodityTariffClusterTariffComponentStruct tariffComponent) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo labelResponseValue = new CommandResponseInfo("label", "String");
+ responseValues.put(labelResponseValue, label);
+ // dayEntryIDs: int32u
+ // Conversion from this type to Java is not properly implemented yet
+
+ // tariffComponent: Struct TariffComponentStruct
+ // Conversion from this type to Java is not properly implemented yet
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterGetDayEntryResponseCallback implements ChipClusters.CommodityTariffCluster.GetDayEntryResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(ChipStructs.CommodityTariffClusterDayEntryStruct dayEntry) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+
+ // dayEntry: Struct DayEntryStruct
+ // Conversion from this type to Java is not properly implemented yet
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+ public static class DelegatedCommodityTariffClusterTariffInfoAttributeCallback implements ChipClusters.CommodityTariffCluster.TariffInfoAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityTariffClusterTariffInformationStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityTariffClusterTariffInformationStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterTariffUnitAttributeCallback implements ChipClusters.CommodityTariffCluster.TariffUnitAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Integer value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterStartDateAttributeCallback implements ChipClusters.CommodityTariffCluster.StartDateAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Long value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterDayEntriesAttributeCallback implements ChipClusters.CommodityTariffCluster.DayEntriesAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterDayEntryStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterDayEntryStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterDayPatternsAttributeCallback implements ChipClusters.CommodityTariffCluster.DayPatternsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterDayPatternStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterDayPatternStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterCalendarPeriodsAttributeCallback implements ChipClusters.CommodityTariffCluster.CalendarPeriodsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterCalendarPeriodStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterCalendarPeriodStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterIndividualDaysAttributeCallback implements ChipClusters.CommodityTariffCluster.IndividualDaysAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterDayStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterDayStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterCurrentDayAttributeCallback implements ChipClusters.CommodityTariffCluster.CurrentDayAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityTariffClusterDayStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterNextDayAttributeCallback implements ChipClusters.CommodityTariffCluster.NextDayAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityTariffClusterDayStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterCurrentDayEntryAttributeCallback implements ChipClusters.CommodityTariffCluster.CurrentDayEntryAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityTariffClusterDayEntryStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterCurrentDayEntryDateAttributeCallback implements ChipClusters.CommodityTariffCluster.CurrentDayEntryDateAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Long value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterNextDayEntryAttributeCallback implements ChipClusters.CommodityTariffCluster.NextDayEntryAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.CommodityTariffClusterDayEntryStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.CommodityTariffClusterDayEntryStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterNextDayEntryDateAttributeCallback implements ChipClusters.CommodityTariffCluster.NextDayEntryDateAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Long value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterTariffComponentsAttributeCallback implements ChipClusters.CommodityTariffCluster.TariffComponentsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterTariffComponentStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterTariffPeriodsAttributeCallback implements ChipClusters.CommodityTariffCluster.TariffPeriodsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffPeriodStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterTariffPeriodStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterCurrentTariffComponentsAttributeCallback implements ChipClusters.CommodityTariffCluster.CurrentTariffComponentsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterTariffComponentStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterNextTariffComponentsAttributeCallback implements ChipClusters.CommodityTariffCluster.NextTariffComponentsAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityTariffClusterTariffComponentStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityTariffClusterTariffComponentStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterDefaultRandomizationOffsetAttributeCallback implements ChipClusters.CommodityTariffCluster.DefaultRandomizationOffsetAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Integer value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterDefaultRandomizationTypeAttributeCallback implements ChipClusters.CommodityTariffCluster.DefaultRandomizationTypeAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Integer value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterGeneratedCommandListAttributeCallback implements ChipClusters.CommodityTariffCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterAcceptedCommandListAttributeCallback implements ChipClusters.CommodityTariffCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterEventListAttributeCallback implements ChipClusters.CommodityTariffCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityTariffClusterAttributeListAttributeCallback implements ChipClusters.CommodityTariffCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedEcosystemInformationClusterDeviceDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.DeviceDirectoryAttributeCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -22174,6 +22898,342 @@
}
}
+ public static class DelegatedMeterIdentificationClusterMeterTypeAttributeCallback implements ChipClusters.MeterIdentificationCluster.MeterTypeAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Integer value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterPointOfDeliveryAttributeCallback implements ChipClusters.MeterIdentificationCluster.PointOfDeliveryAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable String value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterMeterSerialNumberAttributeCallback implements ChipClusters.MeterIdentificationCluster.MeterSerialNumberAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable String value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterProtocolVersionAttributeCallback implements ChipClusters.MeterIdentificationCluster.ProtocolVersionAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable String value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "String");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterPowerThresholdAttributeCallback implements ChipClusters.MeterIdentificationCluster.PowerThresholdAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable ChipStructs.MeterIdentificationClusterPowerThresholdStruct value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.MeterIdentificationClusterPowerThresholdStruct");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterGeneratedCommandListAttributeCallback implements ChipClusters.MeterIdentificationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterAcceptedCommandListAttributeCallback implements ChipClusters.MeterIdentificationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterEventListAttributeCallback implements ChipClusters.MeterIdentificationCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedMeterIdentificationClusterAttributeListAttributeCallback implements ChipClusters.MeterIdentificationCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterMeteredQuantityAttributeCallback implements ChipClusters.CommodityMeteringCluster.MeteredQuantityAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable List<ChipStructs.CommodityMeteringClusterMeteredQuantityStruct> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<ChipStructs.CommodityMeteringClusterMeteredQuantityStruct>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterMeteredQuantityTimestampAttributeCallback implements ChipClusters.CommodityMeteringCluster.MeteredQuantityTimestampAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Long value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterMeasurementTypeAttributeCallback implements ChipClusters.CommodityMeteringCluster.MeasurementTypeAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(@Nullable Integer value) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer");
+ responseValues.put(commandResponseInfo, value);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterGeneratedCommandListAttributeCallback implements ChipClusters.CommodityMeteringCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterAcceptedCommandListAttributeCallback implements ChipClusters.CommodityMeteringCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterEventListAttributeCallback implements ChipClusters.CommodityMeteringCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedCommodityMeteringClusterAttributeListAttributeCallback implements ChipClusters.CommodityMeteringCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List<Long> valueList) {
+ Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List<Long>");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@@ -24066,6 +25126,10 @@
(ptr, endpointId) -> new ChipClusters.WaterHeaterManagementCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("waterHeaterManagement", waterHeaterManagementClusterInfo);
+ ClusterInfo commodityPriceClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.CommodityPriceCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("commodityPrice", commodityPriceClusterInfo);
+
ClusterInfo demandResponseLoadControlClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.DemandResponseLoadControlCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("demandResponseLoadControl", demandResponseLoadControlClusterInfo);
@@ -24306,6 +25370,10 @@
(ptr, endpointId) -> new ChipClusters.ChimeCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("chime", chimeClusterInfo);
+ ClusterInfo commodityTariffClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.CommodityTariffCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("commodityTariff", commodityTariffClusterInfo);
+
ClusterInfo ecosystemInformationClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.EcosystemInformationCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("ecosystemInformation", ecosystemInformationClusterInfo);
@@ -24322,6 +25390,14 @@
(ptr, endpointId) -> new ChipClusters.TlsClientManagementCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("tlsClientManagement", tlsClientManagementClusterInfo);
+ ClusterInfo meterIdentificationClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.MeterIdentificationCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("meterIdentification", meterIdentificationClusterInfo);
+
+ ClusterInfo commodityMeteringClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.CommodityMeteringCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("commodityMetering", commodityMeteringClusterInfo);
+
ClusterInfo unitTestingClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.UnitTestingCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("unitTesting", unitTestingClusterInfo);
@@ -24404,6 +25480,7 @@
destination.get("electricalPowerMeasurement").combineCommands(source.get("electricalPowerMeasurement"));
destination.get("electricalEnergyMeasurement").combineCommands(source.get("electricalEnergyMeasurement"));
destination.get("waterHeaterManagement").combineCommands(source.get("waterHeaterManagement"));
+ destination.get("commodityPrice").combineCommands(source.get("commodityPrice"));
destination.get("demandResponseLoadControl").combineCommands(source.get("demandResponseLoadControl"));
destination.get("messages").combineCommands(source.get("messages"));
destination.get("deviceEnergyManagement").combineCommands(source.get("deviceEnergyManagement"));
@@ -24464,10 +25541,13 @@
destination.get("webRTCTransportRequestor").combineCommands(source.get("webRTCTransportRequestor"));
destination.get("pushAvStreamTransport").combineCommands(source.get("pushAvStreamTransport"));
destination.get("chime").combineCommands(source.get("chime"));
+ destination.get("commodityTariff").combineCommands(source.get("commodityTariff"));
destination.get("ecosystemInformation").combineCommands(source.get("ecosystemInformation"));
destination.get("commissionerControl").combineCommands(source.get("commissionerControl"));
destination.get("tlsCertificateManagement").combineCommands(source.get("tlsCertificateManagement"));
destination.get("tlsClientManagement").combineCommands(source.get("tlsClientManagement"));
+ destination.get("meterIdentification").combineCommands(source.get("meterIdentification"));
+ destination.get("commodityMetering").combineCommands(source.get("commodityMetering"));
destination.get("unitTesting").combineCommands(source.get("unitTesting"));
destination.get("faultInjection").combineCommands(source.get("faultInjection"));
destination.get("sampleMei").combineCommands(source.get("sampleMei"));
@@ -27472,6 +28552,46 @@
commandMap.put("waterHeaterManagement", waterHeaterManagementClusterInteractionInfoMap);
+ Map<String, InteractionInfo> commodityPriceClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map<String, CommandParameterInfo> commodityPricegetDetailedPriceRequestCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+
+ CommandParameterInfo commodityPricegetDetailedPriceRequestdetailsCommandParameterInfo = new CommandParameterInfo("details", Integer.class, Integer.class);
+ commodityPricegetDetailedPriceRequestCommandParams.put("details",commodityPricegetDetailedPriceRequestdetailsCommandParameterInfo);
+ InteractionInfo commodityPricegetDetailedPriceRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster)
+ .getDetailedPriceRequest((ChipClusters.CommodityPriceCluster.GetDetailedPriceResponseCallback) callback
+ , (Integer)
+ commandArguments.get("details")
+
+ );
+ },
+ () -> new DelegatedCommodityPriceClusterGetDetailedPriceResponseCallback(),
+ commodityPricegetDetailedPriceRequestCommandParams
+ );
+ commodityPriceClusterInteractionInfoMap.put("getDetailedPriceRequest", commodityPricegetDetailedPriceRequestInteractionInfo);
+
+ Map<String, CommandParameterInfo> commodityPricegetDetailedForecastRequestCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+
+ CommandParameterInfo commodityPricegetDetailedForecastRequestdetailsCommandParameterInfo = new CommandParameterInfo("details", Integer.class, Integer.class);
+ commodityPricegetDetailedForecastRequestCommandParams.put("details",commodityPricegetDetailedForecastRequestdetailsCommandParameterInfo);
+ InteractionInfo commodityPricegetDetailedForecastRequestInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster)
+ .getDetailedForecastRequest((ChipClusters.CommodityPriceCluster.GetDetailedForecastResponseCallback) callback
+ , (Integer)
+ commandArguments.get("details")
+
+ );
+ },
+ () -> new DelegatedCommodityPriceClusterGetDetailedForecastResponseCallback(),
+ commodityPricegetDetailedForecastRequestCommandParams
+ );
+ commodityPriceClusterInteractionInfoMap.put("getDetailedForecastRequest", commodityPricegetDetailedForecastRequestInteractionInfo);
+
+ commandMap.put("commodityPrice", commodityPriceClusterInteractionInfoMap);
+
Map<String, InteractionInfo> demandResponseLoadControlClusterInteractionInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> demandResponseLoadControlregisterLoadControlProgramRequestCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
@@ -31829,6 +32949,46 @@
commandMap.put("chime", chimeClusterInteractionInfoMap);
+ Map<String, InteractionInfo> commodityTariffClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map<String, CommandParameterInfo> commodityTariffgetTariffComponentCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+
+ CommandParameterInfo commodityTariffgetTariffComponenttariffComponentIDCommandParameterInfo = new CommandParameterInfo("tariffComponentID", Long.class, Long.class);
+ commodityTariffgetTariffComponentCommandParams.put("tariffComponentID",commodityTariffgetTariffComponenttariffComponentIDCommandParameterInfo);
+ InteractionInfo commodityTariffgetTariffComponentInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster)
+ .getTariffComponent((ChipClusters.CommodityTariffCluster.GetTariffComponentResponseCallback) callback
+ , (Long)
+ commandArguments.get("tariffComponentID")
+
+ );
+ },
+ () -> new DelegatedCommodityTariffClusterGetTariffComponentResponseCallback(),
+ commodityTariffgetTariffComponentCommandParams
+ );
+ commodityTariffClusterInteractionInfoMap.put("getTariffComponent", commodityTariffgetTariffComponentInteractionInfo);
+
+ Map<String, CommandParameterInfo> commodityTariffgetDayEntryCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+
+ CommandParameterInfo commodityTariffgetDayEntrydayEntryIDCommandParameterInfo = new CommandParameterInfo("dayEntryID", Long.class, Long.class);
+ commodityTariffgetDayEntryCommandParams.put("dayEntryID",commodityTariffgetDayEntrydayEntryIDCommandParameterInfo);
+ InteractionInfo commodityTariffgetDayEntryInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster)
+ .getDayEntry((ChipClusters.CommodityTariffCluster.GetDayEntryResponseCallback) callback
+ , (Long)
+ commandArguments.get("dayEntryID")
+
+ );
+ },
+ () -> new DelegatedCommodityTariffClusterGetDayEntryResponseCallback(),
+ commodityTariffgetDayEntryCommandParams
+ );
+ commodityTariffClusterInteractionInfoMap.put("getDayEntry", commodityTariffgetDayEntryInteractionInfo);
+
+ commandMap.put("commodityTariff", commodityTariffClusterInteractionInfoMap);
+
Map<String, InteractionInfo> ecosystemInformationClusterInteractionInfoMap = new LinkedHashMap<>();
commandMap.put("ecosystemInformation", ecosystemInformationClusterInteractionInfoMap);
@@ -32146,6 +33306,14 @@
commandMap.put("tlsClientManagement", tlsClientManagementClusterInteractionInfoMap);
+ Map<String, InteractionInfo> meterIdentificationClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ commandMap.put("meterIdentification", meterIdentificationClusterInteractionInfoMap);
+
+ Map<String, InteractionInfo> commodityMeteringClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ commandMap.put("commodityMetering", commodityMeteringClusterInteractionInfoMap);
+
Map<String, InteractionInfo> unitTestingClusterInteractionInfoMap = new LinkedHashMap<>();
Map<String, CommandParameterInfo> unitTestingtestCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index c13be1d..b0129ab 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -9276,6 +9276,98 @@
return result;
}
+ private static Map<String, InteractionInfo> readCommodityPriceInteractionInfo() {
+ Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readCommodityPriceTariffUnitCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceTariffUnitAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readTariffUnitAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readCommodityPriceTariffUnitCommandParams
+ );
+ result.put("readTariffUnitAttribute", readCommodityPriceTariffUnitAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPricePriceForecastCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPricePriceForecastAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readPriceForecastAttribute(
+ (ChipClusters.CommodityPriceCluster.PriceForecastAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityPriceClusterPriceForecastAttributeCallback(),
+ readCommodityPricePriceForecastCommandParams
+ );
+ result.put("readPriceForecastAttribute", readCommodityPricePriceForecastAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPriceGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.CommodityPriceCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityPriceClusterGeneratedCommandListAttributeCallback(),
+ readCommodityPriceGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readCommodityPriceGeneratedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPriceAcceptedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.CommodityPriceCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityPriceClusterAcceptedCommandListAttributeCallback(),
+ readCommodityPriceAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readCommodityPriceAcceptedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPriceEventListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readEventListAttribute(
+ (ChipClusters.CommodityPriceCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityPriceClusterEventListAttributeCallback(),
+ readCommodityPriceEventListCommandParams
+ );
+ result.put("readEventListAttribute", readCommodityPriceEventListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPriceAttributeListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.CommodityPriceCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityPriceClusterAttributeListAttributeCallback(),
+ readCommodityPriceAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readCommodityPriceAttributeListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPriceFeatureMapCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readCommodityPriceFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readCommodityPriceFeatureMapAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityPriceClusterRevisionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityPriceClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityPriceCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readCommodityPriceClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readCommodityPriceClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map<String, InteractionInfo> readDemandResponseLoadControlInteractionInfo() {
Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readDemandResponseLoadControlLoadControlProgramsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readDemandResponseLoadControlLoadControlProgramsAttributeInteractionInfo = new InteractionInfo(
@@ -19581,6 +19673,230 @@
return result;
}
+ private static Map<String, InteractionInfo> readCommodityTariffInteractionInfo() {
+ Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readCommodityTariffTariffUnitCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffTariffUnitAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readTariffUnitAttribute(
+ (ChipClusters.CommodityTariffCluster.TariffUnitAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterTariffUnitAttributeCallback(),
+ readCommodityTariffTariffUnitCommandParams
+ );
+ result.put("readTariffUnitAttribute", readCommodityTariffTariffUnitAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffStartDateCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffStartDateAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readStartDateAttribute(
+ (ChipClusters.CommodityTariffCluster.StartDateAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterStartDateAttributeCallback(),
+ readCommodityTariffStartDateCommandParams
+ );
+ result.put("readStartDateAttribute", readCommodityTariffStartDateAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffDayEntriesCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffDayEntriesAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readDayEntriesAttribute(
+ (ChipClusters.CommodityTariffCluster.DayEntriesAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterDayEntriesAttributeCallback(),
+ readCommodityTariffDayEntriesCommandParams
+ );
+ result.put("readDayEntriesAttribute", readCommodityTariffDayEntriesAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffDayPatternsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffDayPatternsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readDayPatternsAttribute(
+ (ChipClusters.CommodityTariffCluster.DayPatternsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterDayPatternsAttributeCallback(),
+ readCommodityTariffDayPatternsCommandParams
+ );
+ result.put("readDayPatternsAttribute", readCommodityTariffDayPatternsAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffCalendarPeriodsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffCalendarPeriodsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readCalendarPeriodsAttribute(
+ (ChipClusters.CommodityTariffCluster.CalendarPeriodsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterCalendarPeriodsAttributeCallback(),
+ readCommodityTariffCalendarPeriodsCommandParams
+ );
+ result.put("readCalendarPeriodsAttribute", readCommodityTariffCalendarPeriodsAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffIndividualDaysCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffIndividualDaysAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readIndividualDaysAttribute(
+ (ChipClusters.CommodityTariffCluster.IndividualDaysAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterIndividualDaysAttributeCallback(),
+ readCommodityTariffIndividualDaysCommandParams
+ );
+ result.put("readIndividualDaysAttribute", readCommodityTariffIndividualDaysAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffCurrentDayEntryDateCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffCurrentDayEntryDateAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readCurrentDayEntryDateAttribute(
+ (ChipClusters.CommodityTariffCluster.CurrentDayEntryDateAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterCurrentDayEntryDateAttributeCallback(),
+ readCommodityTariffCurrentDayEntryDateCommandParams
+ );
+ result.put("readCurrentDayEntryDateAttribute", readCommodityTariffCurrentDayEntryDateAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffNextDayEntryDateCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffNextDayEntryDateAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readNextDayEntryDateAttribute(
+ (ChipClusters.CommodityTariffCluster.NextDayEntryDateAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterNextDayEntryDateAttributeCallback(),
+ readCommodityTariffNextDayEntryDateCommandParams
+ );
+ result.put("readNextDayEntryDateAttribute", readCommodityTariffNextDayEntryDateAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffTariffComponentsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffTariffComponentsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readTariffComponentsAttribute(
+ (ChipClusters.CommodityTariffCluster.TariffComponentsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterTariffComponentsAttributeCallback(),
+ readCommodityTariffTariffComponentsCommandParams
+ );
+ result.put("readTariffComponentsAttribute", readCommodityTariffTariffComponentsAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffTariffPeriodsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffTariffPeriodsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readTariffPeriodsAttribute(
+ (ChipClusters.CommodityTariffCluster.TariffPeriodsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterTariffPeriodsAttributeCallback(),
+ readCommodityTariffTariffPeriodsCommandParams
+ );
+ result.put("readTariffPeriodsAttribute", readCommodityTariffTariffPeriodsAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffCurrentTariffComponentsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffCurrentTariffComponentsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readCurrentTariffComponentsAttribute(
+ (ChipClusters.CommodityTariffCluster.CurrentTariffComponentsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterCurrentTariffComponentsAttributeCallback(),
+ readCommodityTariffCurrentTariffComponentsCommandParams
+ );
+ result.put("readCurrentTariffComponentsAttribute", readCommodityTariffCurrentTariffComponentsAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffNextTariffComponentsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffNextTariffComponentsAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readNextTariffComponentsAttribute(
+ (ChipClusters.CommodityTariffCluster.NextTariffComponentsAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterNextTariffComponentsAttributeCallback(),
+ readCommodityTariffNextTariffComponentsCommandParams
+ );
+ result.put("readNextTariffComponentsAttribute", readCommodityTariffNextTariffComponentsAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffDefaultRandomizationOffsetCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffDefaultRandomizationOffsetAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readDefaultRandomizationOffsetAttribute(
+ (ChipClusters.CommodityTariffCluster.DefaultRandomizationOffsetAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterDefaultRandomizationOffsetAttributeCallback(),
+ readCommodityTariffDefaultRandomizationOffsetCommandParams
+ );
+ result.put("readDefaultRandomizationOffsetAttribute", readCommodityTariffDefaultRandomizationOffsetAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffDefaultRandomizationTypeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffDefaultRandomizationTypeAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readDefaultRandomizationTypeAttribute(
+ (ChipClusters.CommodityTariffCluster.DefaultRandomizationTypeAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterDefaultRandomizationTypeAttributeCallback(),
+ readCommodityTariffDefaultRandomizationTypeCommandParams
+ );
+ result.put("readDefaultRandomizationTypeAttribute", readCommodityTariffDefaultRandomizationTypeAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.CommodityTariffCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterGeneratedCommandListAttributeCallback(),
+ readCommodityTariffGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readCommodityTariffGeneratedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffAcceptedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.CommodityTariffCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterAcceptedCommandListAttributeCallback(),
+ readCommodityTariffAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readCommodityTariffAcceptedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffEventListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readEventListAttribute(
+ (ChipClusters.CommodityTariffCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterEventListAttributeCallback(),
+ readCommodityTariffEventListCommandParams
+ );
+ result.put("readEventListAttribute", readCommodityTariffEventListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffAttributeListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.CommodityTariffCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityTariffClusterAttributeListAttributeCallback(),
+ readCommodityTariffAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readCommodityTariffAttributeListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffFeatureMapCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readCommodityTariffFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readCommodityTariffFeatureMapAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityTariffClusterRevisionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityTariffClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityTariffCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readCommodityTariffClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readCommodityTariffClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map<String, InteractionInfo> readEcosystemInformationInteractionInfo() {
Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readEcosystemInformationDeviceDirectoryCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readEcosystemInformationDeviceDirectoryAttributeInteractionInfo = new InteractionInfo(
@@ -19960,6 +20276,223 @@
return result;
}
+ private static Map<String, InteractionInfo> readMeterIdentificationInteractionInfo() {
+ Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readMeterIdentificationMeterTypeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationMeterTypeAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readMeterTypeAttribute(
+ (ChipClusters.MeterIdentificationCluster.MeterTypeAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterMeterTypeAttributeCallback(),
+ readMeterIdentificationMeterTypeCommandParams
+ );
+ result.put("readMeterTypeAttribute", readMeterIdentificationMeterTypeAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationPointOfDeliveryCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationPointOfDeliveryAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readPointOfDeliveryAttribute(
+ (ChipClusters.MeterIdentificationCluster.PointOfDeliveryAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterPointOfDeliveryAttributeCallback(),
+ readMeterIdentificationPointOfDeliveryCommandParams
+ );
+ result.put("readPointOfDeliveryAttribute", readMeterIdentificationPointOfDeliveryAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationMeterSerialNumberCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationMeterSerialNumberAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readMeterSerialNumberAttribute(
+ (ChipClusters.MeterIdentificationCluster.MeterSerialNumberAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterMeterSerialNumberAttributeCallback(),
+ readMeterIdentificationMeterSerialNumberCommandParams
+ );
+ result.put("readMeterSerialNumberAttribute", readMeterIdentificationMeterSerialNumberAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationProtocolVersionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationProtocolVersionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readProtocolVersionAttribute(
+ (ChipClusters.MeterIdentificationCluster.ProtocolVersionAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterProtocolVersionAttributeCallback(),
+ readMeterIdentificationProtocolVersionCommandParams
+ );
+ result.put("readProtocolVersionAttribute", readMeterIdentificationProtocolVersionAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.MeterIdentificationCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterGeneratedCommandListAttributeCallback(),
+ readMeterIdentificationGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readMeterIdentificationGeneratedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationAcceptedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.MeterIdentificationCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterAcceptedCommandListAttributeCallback(),
+ readMeterIdentificationAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readMeterIdentificationAcceptedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationEventListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readEventListAttribute(
+ (ChipClusters.MeterIdentificationCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterEventListAttributeCallback(),
+ readMeterIdentificationEventListCommandParams
+ );
+ result.put("readEventListAttribute", readMeterIdentificationEventListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationAttributeListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.MeterIdentificationCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedMeterIdentificationClusterAttributeListAttributeCallback(),
+ readMeterIdentificationAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readMeterIdentificationAttributeListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationFeatureMapCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readMeterIdentificationFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readMeterIdentificationFeatureMapAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readMeterIdentificationClusterRevisionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readMeterIdentificationClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.MeterIdentificationCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readMeterIdentificationClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readMeterIdentificationClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
+ private static Map<String, InteractionInfo> readCommodityMeteringInteractionInfo() {
+ Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readCommodityMeteringMeteredQuantityCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringMeteredQuantityAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readMeteredQuantityAttribute(
+ (ChipClusters.CommodityMeteringCluster.MeteredQuantityAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterMeteredQuantityAttributeCallback(),
+ readCommodityMeteringMeteredQuantityCommandParams
+ );
+ result.put("readMeteredQuantityAttribute", readCommodityMeteringMeteredQuantityAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringMeteredQuantityTimestampCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringMeteredQuantityTimestampAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readMeteredQuantityTimestampAttribute(
+ (ChipClusters.CommodityMeteringCluster.MeteredQuantityTimestampAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterMeteredQuantityTimestampAttributeCallback(),
+ readCommodityMeteringMeteredQuantityTimestampCommandParams
+ );
+ result.put("readMeteredQuantityTimestampAttribute", readCommodityMeteringMeteredQuantityTimestampAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringMeasurementTypeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringMeasurementTypeAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readMeasurementTypeAttribute(
+ (ChipClusters.CommodityMeteringCluster.MeasurementTypeAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterMeasurementTypeAttributeCallback(),
+ readCommodityMeteringMeasurementTypeCommandParams
+ );
+ result.put("readMeasurementTypeAttribute", readCommodityMeteringMeasurementTypeAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.CommodityMeteringCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterGeneratedCommandListAttributeCallback(),
+ readCommodityMeteringGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readCommodityMeteringGeneratedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringAcceptedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.CommodityMeteringCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterAcceptedCommandListAttributeCallback(),
+ readCommodityMeteringAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readCommodityMeteringAcceptedCommandListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringEventListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readEventListAttribute(
+ (ChipClusters.CommodityMeteringCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterEventListAttributeCallback(),
+ readCommodityMeteringEventListCommandParams
+ );
+ result.put("readEventListAttribute", readCommodityMeteringEventListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringAttributeListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.CommodityMeteringCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedCommodityMeteringClusterAttributeListAttributeCallback(),
+ readCommodityMeteringAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readCommodityMeteringAttributeListAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringFeatureMapCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readCommodityMeteringFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readCommodityMeteringFeatureMapAttributeInteractionInfo);
+ Map<String, CommandParameterInfo> readCommodityMeteringClusterRevisionCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+ InteractionInfo readCommodityMeteringClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.CommodityMeteringCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readCommodityMeteringClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readCommodityMeteringClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map<String, InteractionInfo> readUnitTestingInteractionInfo() {
Map<String, InteractionInfo> result = new LinkedHashMap<>();Map<String, CommandParameterInfo> readUnitTestingBooleanCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readUnitTestingBooleanAttributeInteractionInfo = new InteractionInfo(
@@ -21186,6 +21719,7 @@
put("electricalPowerMeasurement", readElectricalPowerMeasurementInteractionInfo());
put("electricalEnergyMeasurement", readElectricalEnergyMeasurementInteractionInfo());
put("waterHeaterManagement", readWaterHeaterManagementInteractionInfo());
+ put("commodityPrice", readCommodityPriceInteractionInfo());
put("demandResponseLoadControl", readDemandResponseLoadControlInteractionInfo());
put("messages", readMessagesInteractionInfo());
put("deviceEnergyManagement", readDeviceEnergyManagementInteractionInfo());
@@ -21246,10 +21780,13 @@
put("webRTCTransportRequestor", readWebRTCTransportRequestorInteractionInfo());
put("pushAvStreamTransport", readPushAvStreamTransportInteractionInfo());
put("chime", readChimeInteractionInfo());
+ put("commodityTariff", readCommodityTariffInteractionInfo());
put("ecosystemInformation", readEcosystemInformationInteractionInfo());
put("commissionerControl", readCommissionerControlInteractionInfo());
put("tlsCertificateManagement", readTlsCertificateManagementInteractionInfo());
put("tlsClientManagement", readTlsClientManagementInteractionInfo());
+ put("meterIdentification", readMeterIdentificationInteractionInfo());
+ put("commodityMetering", readCommodityMeteringInteractionInfo());
put("unitTesting", readUnitTestingInteractionInfo());
put("faultInjection", readFaultInjectionInteractionInfo());
put("sampleMei", readSampleMeiInteractionInfo());}};
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index 206287f..e6f65ae 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -1038,6 +1038,8 @@
writeAttributeMap.put("electricalEnergyMeasurement", writeElectricalEnergyMeasurementInteractionInfo);
Map<String, InteractionInfo> writeWaterHeaterManagementInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("waterHeaterManagement", writeWaterHeaterManagementInteractionInfo);
+ Map<String, InteractionInfo> writeCommodityPriceInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("commodityPrice", writeCommodityPriceInteractionInfo);
Map<String, InteractionInfo> writeDemandResponseLoadControlInteractionInfo = new LinkedHashMap<>();
Map<String, CommandParameterInfo> writeDemandResponseLoadControlDefaultRandomStartCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo demandResponseLoadControldefaultRandomStartCommandParameterInfo =
@@ -3798,6 +3800,8 @@
);
writeChimeInteractionInfo.put("writeEnabledAttribute", writeChimeEnabledAttributeInteractionInfo);
writeAttributeMap.put("chime", writeChimeInteractionInfo);
+ Map<String, InteractionInfo> writeCommodityTariffInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("commodityTariff", writeCommodityTariffInteractionInfo);
Map<String, InteractionInfo> writeEcosystemInformationInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("ecosystemInformation", writeEcosystemInformationInteractionInfo);
Map<String, InteractionInfo> writeCommissionerControlInteractionInfo = new LinkedHashMap<>();
@@ -3806,6 +3810,10 @@
writeAttributeMap.put("tlsCertificateManagement", writeTlsCertificateManagementInteractionInfo);
Map<String, InteractionInfo> writeTlsClientManagementInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("tlsClientManagement", writeTlsClientManagementInteractionInfo);
+ Map<String, InteractionInfo> writeMeterIdentificationInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("meterIdentification", writeMeterIdentificationInteractionInfo);
+ Map<String, InteractionInfo> writeCommodityMeteringInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("commodityMetering", writeCommodityMeteringInteractionInfo);
Map<String, InteractionInfo> writeUnitTestingInteractionInfo = new LinkedHashMap<>();
Map<String, CommandParameterInfo> writeUnitTestingBooleanCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
CommandParameterInfo unitTestingbooleanCommandParameterInfo =
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt
new file mode 100644
index 0000000..05f6c4d
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt
@@ -0,0 +1,70 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.eventstructs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterForecastChangeEvent(
+ val priceForecast:
+ List<chip.devicecontroller.cluster.structs.CommodityPriceClusterCommodityPriceStruct>
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterForecastChangeEvent {\n")
+ append("\tpriceForecast : $priceForecast\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ startArray(ContextSpecificTag(TAG_PRICE_FORECAST))
+ for (item in priceForecast.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PRICE_FORECAST = 0
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterForecastChangeEvent {
+ tlvReader.enterStructure(tlvTag)
+ val priceForecast =
+ buildList<chip.devicecontroller.cluster.structs.CommodityPriceClusterCommodityPriceStruct> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_PRICE_FORECAST))
+ while (!tlvReader.isEndOfContainer()) {
+ this.add(
+ chip.devicecontroller.cluster.structs.CommodityPriceClusterCommodityPriceStruct
+ .fromTlv(AnonymousTag, tlvReader)
+ )
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterForecastChangeEvent(priceForecast)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt
new file mode 100644
index 0000000..5dbbf9e
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.eventstructs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterPriceChangeEvent(
+ val currentPrice: chip.devicecontroller.cluster.structs.CommodityPriceClusterCommodityPriceStruct
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterPriceChangeEvent {\n")
+ append("\tcurrentPrice : $currentPrice\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ currentPrice.toTlv(ContextSpecificTag(TAG_CURRENT_PRICE), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CURRENT_PRICE = 0
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterPriceChangeEvent {
+ tlvReader.enterStructure(tlvTag)
+ val currentPrice =
+ chip.devicecontroller.cluster.structs.CommodityPriceClusterCommodityPriceStruct.fromTlv(
+ ContextSpecificTag(TAG_CURRENT_PRICE),
+ tlvReader,
+ )
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterPriceChangeEvent(currentPrice)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index 76ccfdf..15f8e0d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -47,6 +47,23 @@
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureDimensionClusterRangePercent100thsStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureDimensionClusterTargetStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ClosureDimensionClusterUnitRangeStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterPriceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentControlClusterRatingNameStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt",
@@ -111,6 +128,7 @@
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MediaPlaybackClusterTrackStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageResponseOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MessagesClusterMessageStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ModeSelectClusterModeOptionStruct.kt",
@@ -216,6 +234,8 @@
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt
new file mode 100644
index 0000000..1430c06
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityMeteringClusterMeteredQuantityStruct(
+ val tariffComponentIDs: List<ULong>,
+ val quantity: Long,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityMeteringClusterMeteredQuantityStruct {\n")
+ append("\ttariffComponentIDs : $tariffComponentIDs\n")
+ append("\tquantity : $quantity\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ startArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ for (item in tariffComponentIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ put(ContextSpecificTag(TAG_QUANTITY), quantity)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TARIFF_COMPONENT_I_DS = 0
+ private const val TAG_QUANTITY = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityMeteringClusterMeteredQuantityStruct {
+ tlvReader.enterStructure(tlvTag)
+ val tariffComponentIDs =
+ buildList<ULong> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getULong(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ val quantity = tlvReader.getLong(ContextSpecificTag(TAG_QUANTITY))
+
+ tlvReader.exitContainer()
+
+ return CommodityMeteringClusterMeteredQuantityStruct(tariffComponentIDs, quantity)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt
new file mode 100644
index 0000000..920e6b6
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt
@@ -0,0 +1,94 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterCommodityPriceComponentStruct(
+ val price: Long,
+ val source: UInt,
+ val description: Optional<String>,
+ val tariffComponentID: Optional<ULong>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterCommodityPriceComponentStruct {\n")
+ append("\tprice : $price\n")
+ append("\tsource : $source\n")
+ append("\tdescription : $description\n")
+ append("\ttariffComponentID : $tariffComponentID\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PRICE), price)
+ put(ContextSpecificTag(TAG_SOURCE), source)
+ if (description.isPresent) {
+ val optdescription = description.get()
+ put(ContextSpecificTag(TAG_DESCRIPTION), optdescription)
+ }
+ if (tariffComponentID.isPresent) {
+ val opttariffComponentID = tariffComponentID.get()
+ put(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID), opttariffComponentID)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PRICE = 0
+ private const val TAG_SOURCE = 1
+ private const val TAG_DESCRIPTION = 2
+ private const val TAG_TARIFF_COMPONENT_ID = 3
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): CommodityPriceClusterCommodityPriceComponentStruct {
+ tlvReader.enterStructure(tlvTag)
+ val price = tlvReader.getLong(ContextSpecificTag(TAG_PRICE))
+ val source = tlvReader.getUInt(ContextSpecificTag(TAG_SOURCE))
+ val description =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DESCRIPTION))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)))
+ } else {
+ Optional.empty()
+ }
+ val tariffComponentID =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID))) {
+ Optional.of(tlvReader.getULong(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterCommodityPriceComponentStruct(
+ price,
+ source,
+ description,
+ tariffComponentID,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt
new file mode 100644
index 0000000..14d19c6
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt
@@ -0,0 +1,125 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterCommodityPriceStruct(
+ val periodStart: ULong,
+ val periodEnd: ULong?,
+ val price: CommodityPriceClusterPriceStruct,
+ val description: Optional<String>,
+ val components: Optional<List<CommodityPriceClusterCommodityPriceComponentStruct>>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterCommodityPriceStruct {\n")
+ append("\tperiodStart : $periodStart\n")
+ append("\tperiodEnd : $periodEnd\n")
+ append("\tprice : $price\n")
+ append("\tdescription : $description\n")
+ append("\tcomponents : $components\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PERIOD_START), periodStart)
+ if (periodEnd != null) {
+ put(ContextSpecificTag(TAG_PERIOD_END), periodEnd)
+ } else {
+ putNull(ContextSpecificTag(TAG_PERIOD_END))
+ }
+ price.toTlv(ContextSpecificTag(TAG_PRICE), this)
+ if (description.isPresent) {
+ val optdescription = description.get()
+ put(ContextSpecificTag(TAG_DESCRIPTION), optdescription)
+ }
+ if (components.isPresent) {
+ val optcomponents = components.get()
+ startArray(ContextSpecificTag(TAG_COMPONENTS))
+ for (item in optcomponents.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PERIOD_START = 0
+ private const val TAG_PERIOD_END = 1
+ private const val TAG_PRICE = 2
+ private const val TAG_DESCRIPTION = 3
+ private const val TAG_COMPONENTS = 4
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterCommodityPriceStruct {
+ tlvReader.enterStructure(tlvTag)
+ val periodStart = tlvReader.getULong(ContextSpecificTag(TAG_PERIOD_START))
+ val periodEnd =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(ContextSpecificTag(TAG_PERIOD_END))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PERIOD_END))
+ null
+ }
+ val price = CommodityPriceClusterPriceStruct.fromTlv(ContextSpecificTag(TAG_PRICE), tlvReader)
+ val description =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DESCRIPTION))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)))
+ } else {
+ Optional.empty()
+ }
+ val components =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_COMPONENTS))) {
+ Optional.of(
+ buildList<CommodityPriceClusterCommodityPriceComponentStruct> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_COMPONENTS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ CommodityPriceClusterCommodityPriceComponentStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ )
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterCommodityPriceStruct(
+ periodStart,
+ periodEnd,
+ price,
+ description,
+ components,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt
new file mode 100644
index 0000000..9882dff
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterCurrencyStruct(val currency: UInt, val decimalPoints: UInt) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterCurrencyStruct {\n")
+ append("\tcurrency : $currency\n")
+ append("\tdecimalPoints : $decimalPoints\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CURRENCY), currency)
+ put(ContextSpecificTag(TAG_DECIMAL_POINTS), decimalPoints)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CURRENCY = 0
+ private const val TAG_DECIMAL_POINTS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterCurrencyStruct {
+ tlvReader.enterStructure(tlvTag)
+ val currency = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENCY))
+ val decimalPoints = tlvReader.getUInt(ContextSpecificTag(TAG_DECIMAL_POINTS))
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterCurrencyStruct(currency, decimalPoints)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterPriceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterPriceStruct.kt
new file mode 100644
index 0000000..6f18d28
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityPriceClusterPriceStruct.kt
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterPriceStruct(
+ val amount: Long,
+ val currency: CommodityPriceClusterCurrencyStruct,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterPriceStruct {\n")
+ append("\tamount : $amount\n")
+ append("\tcurrency : $currency\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_AMOUNT), amount)
+ currency.toTlv(ContextSpecificTag(TAG_CURRENCY), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_AMOUNT = 0
+ private const val TAG_CURRENCY = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterPriceStruct {
+ tlvReader.enterStructure(tlvTag)
+ val amount = tlvReader.getLong(ContextSpecificTag(TAG_AMOUNT))
+ val currency =
+ CommodityPriceClusterCurrencyStruct.fromTlv(ContextSpecificTag(TAG_CURRENCY), tlvReader)
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterPriceStruct(amount, currency)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt
new file mode 100644
index 0000000..1dfc4d8
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt
@@ -0,0 +1,62 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct(
+ val number: UInt,
+ val requiredState: UInt,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct {\n")
+ append("\tnumber : $number\n")
+ append("\trequiredState : $requiredState\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_NUMBER), number)
+ put(ContextSpecificTag(TAG_REQUIRED_STATE), requiredState)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_NUMBER = 0
+ private const val TAG_REQUIRED_STATE = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val number = tlvReader.getUInt(ContextSpecificTag(TAG_NUMBER))
+ val requiredState = tlvReader.getUInt(ContextSpecificTag(TAG_REQUIRED_STATE))
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct(number, requiredState)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt
new file mode 100644
index 0000000..22f26a0
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterCalendarPeriodStruct(
+ val startDate: ULong?,
+ val dayPatternIDs: List<ULong>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterCalendarPeriodStruct {\n")
+ append("\tstartDate : $startDate\n")
+ append("\tdayPatternIDs : $dayPatternIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (startDate != null) {
+ put(ContextSpecificTag(TAG_START_DATE), startDate)
+ } else {
+ putNull(ContextSpecificTag(TAG_START_DATE))
+ }
+ startArray(ContextSpecificTag(TAG_DAY_PATTERN_I_DS))
+ for (item in dayPatternIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_START_DATE = 0
+ private const val TAG_DAY_PATTERN_I_DS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterCalendarPeriodStruct {
+ tlvReader.enterStructure(tlvTag)
+ val startDate =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(ContextSpecificTag(TAG_START_DATE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_START_DATE))
+ null
+ }
+ val dayPatternIDs =
+ buildList<ULong> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_PATTERN_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getULong(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterCalendarPeriodStruct(startDate, dayPatternIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt
new file mode 100644
index 0000000..a6d8c90
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterCurrencyStruct(val currency: UInt, val decimalPoints: UInt) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterCurrencyStruct {\n")
+ append("\tcurrency : $currency\n")
+ append("\tdecimalPoints : $decimalPoints\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CURRENCY), currency)
+ put(ContextSpecificTag(TAG_DECIMAL_POINTS), decimalPoints)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CURRENCY = 0
+ private const val TAG_DECIMAL_POINTS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterCurrencyStruct {
+ tlvReader.enterStructure(tlvTag)
+ val currency = tlvReader.getUInt(ContextSpecificTag(TAG_CURRENCY))
+ val decimalPoints = tlvReader.getUInt(ContextSpecificTag(TAG_DECIMAL_POINTS))
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterCurrencyStruct(currency, decimalPoints)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt
new file mode 100644
index 0000000..b14da84
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt
@@ -0,0 +1,105 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterDayEntryStruct(
+ val dayEntryID: ULong,
+ val startTime: UInt,
+ val duration: Optional<UInt>,
+ val randomizationOffset: Optional<Int>,
+ val randomizationType: Optional<UInt>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterDayEntryStruct {\n")
+ append("\tdayEntryID : $dayEntryID\n")
+ append("\tstartTime : $startTime\n")
+ append("\tduration : $duration\n")
+ append("\trandomizationOffset : $randomizationOffset\n")
+ append("\trandomizationType : $randomizationType\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DAY_ENTRY_ID), dayEntryID)
+ put(ContextSpecificTag(TAG_START_TIME), startTime)
+ if (duration.isPresent) {
+ val optduration = duration.get()
+ put(ContextSpecificTag(TAG_DURATION), optduration)
+ }
+ if (randomizationOffset.isPresent) {
+ val optrandomizationOffset = randomizationOffset.get()
+ put(ContextSpecificTag(TAG_RANDOMIZATION_OFFSET), optrandomizationOffset)
+ }
+ if (randomizationType.isPresent) {
+ val optrandomizationType = randomizationType.get()
+ put(ContextSpecificTag(TAG_RANDOMIZATION_TYPE), optrandomizationType)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DAY_ENTRY_ID = 0
+ private const val TAG_START_TIME = 1
+ private const val TAG_DURATION = 2
+ private const val TAG_RANDOMIZATION_OFFSET = 3
+ private const val TAG_RANDOMIZATION_TYPE = 4
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterDayEntryStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dayEntryID = tlvReader.getULong(ContextSpecificTag(TAG_DAY_ENTRY_ID))
+ val startTime = tlvReader.getUInt(ContextSpecificTag(TAG_START_TIME))
+ val duration =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DURATION))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_DURATION)))
+ } else {
+ Optional.empty()
+ }
+ val randomizationOffset =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_RANDOMIZATION_OFFSET))) {
+ Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_RANDOMIZATION_OFFSET)))
+ } else {
+ Optional.empty()
+ }
+ val randomizationType =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_RANDOMIZATION_TYPE))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_RANDOMIZATION_TYPE)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterDayEntryStruct(
+ dayEntryID,
+ startTime,
+ duration,
+ randomizationOffset,
+ randomizationType,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt
new file mode 100644
index 0000000..3d87313
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterDayPatternStruct(
+ val dayPatternID: ULong,
+ val daysOfWeek: UInt,
+ val dayEntryIDs: List<ULong>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterDayPatternStruct {\n")
+ append("\tdayPatternID : $dayPatternID\n")
+ append("\tdaysOfWeek : $daysOfWeek\n")
+ append("\tdayEntryIDs : $dayEntryIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DAY_PATTERN_ID), dayPatternID)
+ put(ContextSpecificTag(TAG_DAYS_OF_WEEK), daysOfWeek)
+ startArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ for (item in dayEntryIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DAY_PATTERN_ID = 0
+ private const val TAG_DAYS_OF_WEEK = 1
+ private const val TAG_DAY_ENTRY_I_DS = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterDayPatternStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dayPatternID = tlvReader.getULong(ContextSpecificTag(TAG_DAY_PATTERN_ID))
+ val daysOfWeek = tlvReader.getUInt(ContextSpecificTag(TAG_DAYS_OF_WEEK))
+ val dayEntryIDs =
+ buildList<ULong> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getULong(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterDayPatternStruct(dayPatternID, daysOfWeek, dayEntryIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayStruct.kt
new file mode 100644
index 0000000..6a68ca4
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterDayStruct.kt
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterDayStruct(
+ val date: ULong,
+ val dayType: UInt,
+ val dayEntryIDs: List<ULong>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterDayStruct {\n")
+ append("\tdate : $date\n")
+ append("\tdayType : $dayType\n")
+ append("\tdayEntryIDs : $dayEntryIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DATE), date)
+ put(ContextSpecificTag(TAG_DAY_TYPE), dayType)
+ startArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ for (item in dayEntryIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DATE = 0
+ private const val TAG_DAY_TYPE = 1
+ private const val TAG_DAY_ENTRY_I_DS = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterDayStruct {
+ tlvReader.enterStructure(tlvTag)
+ val date = tlvReader.getULong(ContextSpecificTag(TAG_DATE))
+ val dayType = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_TYPE))
+ val dayEntryIDs =
+ buildList<ULong> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getULong(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterDayStruct(date, dayType, dayEntryIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt
new file mode 100644
index 0000000..bb4a013
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterPeakPeriodStruct(val severity: UInt, val peakPeriod: UInt) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterPeakPeriodStruct {\n")
+ append("\tseverity : $severity\n")
+ append("\tpeakPeriod : $peakPeriod\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_SEVERITY), severity)
+ put(ContextSpecificTag(TAG_PEAK_PERIOD), peakPeriod)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_SEVERITY = 0
+ private const val TAG_PEAK_PERIOD = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterPeakPeriodStruct {
+ tlvReader.enterStructure(tlvTag)
+ val severity = tlvReader.getUInt(ContextSpecificTag(TAG_SEVERITY))
+ val peakPeriod = tlvReader.getUInt(ContextSpecificTag(TAG_PEAK_PERIOD))
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterPeakPeriodStruct(severity, peakPeriod)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt
new file mode 100644
index 0000000..e27854f
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt
@@ -0,0 +1,95 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterPowerThresholdStruct(
+ val powerThreshold: Optional<Long>,
+ val apparentPowerThreshold: Optional<Long>,
+ val powerThresholdSource: UInt?,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterPowerThresholdStruct {\n")
+ append("\tpowerThreshold : $powerThreshold\n")
+ append("\tapparentPowerThreshold : $apparentPowerThreshold\n")
+ append("\tpowerThresholdSource : $powerThresholdSource\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (powerThreshold.isPresent) {
+ val optpowerThreshold = powerThreshold.get()
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD), optpowerThreshold)
+ }
+ if (apparentPowerThreshold.isPresent) {
+ val optapparentPowerThreshold = apparentPowerThreshold.get()
+ put(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD), optapparentPowerThreshold)
+ }
+ if (powerThresholdSource != null) {
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE), powerThresholdSource)
+ } else {
+ putNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_POWER_THRESHOLD = 0
+ private const val TAG_APPARENT_POWER_THRESHOLD = 1
+ private const val TAG_POWER_THRESHOLD_SOURCE = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterPowerThresholdStruct {
+ tlvReader.enterStructure(tlvTag)
+ val powerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val apparentPowerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val powerThresholdSource =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterPowerThresholdStruct(
+ powerThreshold,
+ apparentPowerThreshold,
+ powerThresholdSource,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt
new file mode 100644
index 0000000..b1e25ba
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt
@@ -0,0 +1,209 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffComponentStruct(
+ val tariffComponentID: ULong,
+ val price: Optional<CommodityTariffClusterTariffPriceStruct>?,
+ val friendlyCredit: Optional<Boolean>,
+ val auxiliaryLoad: Optional<CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct>,
+ val peakPeriod: Optional<CommodityTariffClusterPeakPeriodStruct>,
+ val powerThreshold: Optional<CommodityTariffClusterPowerThresholdStruct>,
+ val threshold: ULong?,
+ val label: Optional<String>?,
+ val predicted: Optional<Boolean>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffComponentStruct {\n")
+ append("\ttariffComponentID : $tariffComponentID\n")
+ append("\tprice : $price\n")
+ append("\tfriendlyCredit : $friendlyCredit\n")
+ append("\tauxiliaryLoad : $auxiliaryLoad\n")
+ append("\tpeakPeriod : $peakPeriod\n")
+ append("\tpowerThreshold : $powerThreshold\n")
+ append("\tthreshold : $threshold\n")
+ append("\tlabel : $label\n")
+ append("\tpredicted : $predicted\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID), tariffComponentID)
+ if (price != null) {
+ if (price.isPresent) {
+ val optprice = price.get()
+ optprice.toTlv(ContextSpecificTag(TAG_PRICE), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_PRICE))
+ }
+ if (friendlyCredit.isPresent) {
+ val optfriendlyCredit = friendlyCredit.get()
+ put(ContextSpecificTag(TAG_FRIENDLY_CREDIT), optfriendlyCredit)
+ }
+ if (auxiliaryLoad.isPresent) {
+ val optauxiliaryLoad = auxiliaryLoad.get()
+ optauxiliaryLoad.toTlv(ContextSpecificTag(TAG_AUXILIARY_LOAD), this)
+ }
+ if (peakPeriod.isPresent) {
+ val optpeakPeriod = peakPeriod.get()
+ optpeakPeriod.toTlv(ContextSpecificTag(TAG_PEAK_PERIOD), this)
+ }
+ if (powerThreshold.isPresent) {
+ val optpowerThreshold = powerThreshold.get()
+ optpowerThreshold.toTlv(ContextSpecificTag(TAG_POWER_THRESHOLD), this)
+ }
+ if (threshold != null) {
+ put(ContextSpecificTag(TAG_THRESHOLD), threshold)
+ } else {
+ putNull(ContextSpecificTag(TAG_THRESHOLD))
+ }
+ if (label != null) {
+ if (label.isPresent) {
+ val optlabel = label.get()
+ put(ContextSpecificTag(TAG_LABEL), optlabel)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_LABEL))
+ }
+ if (predicted.isPresent) {
+ val optpredicted = predicted.get()
+ put(ContextSpecificTag(TAG_PREDICTED), optpredicted)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TARIFF_COMPONENT_ID = 0
+ private const val TAG_PRICE = 1
+ private const val TAG_FRIENDLY_CREDIT = 2
+ private const val TAG_AUXILIARY_LOAD = 3
+ private const val TAG_PEAK_PERIOD = 4
+ private const val TAG_POWER_THRESHOLD = 5
+ private const val TAG_THRESHOLD = 6
+ private const val TAG_LABEL = 7
+ private const val TAG_PREDICTED = 8
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffComponentStruct {
+ tlvReader.enterStructure(tlvTag)
+ val tariffComponentID = tlvReader.getULong(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID))
+ val price =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRICE))) {
+ Optional.of(
+ CommodityTariffClusterTariffPriceStruct.fromTlv(
+ ContextSpecificTag(TAG_PRICE),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PRICE))
+ null
+ }
+ val friendlyCredit =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_FRIENDLY_CREDIT))) {
+ Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_FRIENDLY_CREDIT)))
+ } else {
+ Optional.empty()
+ }
+ val auxiliaryLoad =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUXILIARY_LOAD))) {
+ Optional.of(
+ CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.fromTlv(
+ ContextSpecificTag(TAG_AUXILIARY_LOAD),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val peakPeriod =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PEAK_PERIOD))) {
+ Optional.of(
+ CommodityTariffClusterPeakPeriodStruct.fromTlv(
+ ContextSpecificTag(TAG_PEAK_PERIOD),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val powerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_THRESHOLD))) {
+ Optional.of(
+ CommodityTariffClusterPowerThresholdStruct.fromTlv(
+ ContextSpecificTag(TAG_POWER_THRESHOLD),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val threshold =
+ if (!tlvReader.isNull()) {
+ tlvReader.getULong(ContextSpecificTag(TAG_THRESHOLD))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_THRESHOLD))
+ null
+ }
+ val label =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_LABEL))
+ null
+ }
+ val predicted =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PREDICTED))) {
+ Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_PREDICTED)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffComponentStruct(
+ tariffComponentID,
+ price,
+ friendlyCredit,
+ auxiliaryLoad,
+ peakPeriod,
+ powerThreshold,
+ threshold,
+ label,
+ predicted,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt
new file mode 100644
index 0000000..df9e2c8
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt
@@ -0,0 +1,127 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffInformationStruct(
+ val tariffLabel: String?,
+ val providerName: String?,
+ val currency: Optional<CommodityTariffClusterCurrencyStruct>?,
+ val blockMode: UInt?,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffInformationStruct {\n")
+ append("\ttariffLabel : $tariffLabel\n")
+ append("\tproviderName : $providerName\n")
+ append("\tcurrency : $currency\n")
+ append("\tblockMode : $blockMode\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (tariffLabel != null) {
+ put(ContextSpecificTag(TAG_TARIFF_LABEL), tariffLabel)
+ } else {
+ putNull(ContextSpecificTag(TAG_TARIFF_LABEL))
+ }
+ if (providerName != null) {
+ put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName)
+ } else {
+ putNull(ContextSpecificTag(TAG_PROVIDER_NAME))
+ }
+ if (currency != null) {
+ if (currency.isPresent) {
+ val optcurrency = currency.get()
+ optcurrency.toTlv(ContextSpecificTag(TAG_CURRENCY), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_CURRENCY))
+ }
+ if (blockMode != null) {
+ put(ContextSpecificTag(TAG_BLOCK_MODE), blockMode)
+ } else {
+ putNull(ContextSpecificTag(TAG_BLOCK_MODE))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TARIFF_LABEL = 0
+ private const val TAG_PROVIDER_NAME = 1
+ private const val TAG_CURRENCY = 2
+ private const val TAG_BLOCK_MODE = 3
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffInformationStruct {
+ tlvReader.enterStructure(tlvTag)
+ val tariffLabel =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(ContextSpecificTag(TAG_TARIFF_LABEL))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_TARIFF_LABEL))
+ null
+ }
+ val providerName =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PROVIDER_NAME))
+ null
+ }
+ val currency =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CURRENCY))) {
+ Optional.of(
+ CommodityTariffClusterCurrencyStruct.fromTlv(
+ ContextSpecificTag(TAG_CURRENCY),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_CURRENCY))
+ null
+ }
+ val blockMode =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_BLOCK_MODE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_BLOCK_MODE))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffInformationStruct(
+ tariffLabel,
+ providerName,
+ currency,
+ blockMode,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt
new file mode 100644
index 0000000..6050808
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt
@@ -0,0 +1,97 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffPeriodStruct(
+ val label: String?,
+ val dayEntryIDs: List<ULong>,
+ val tariffComponentIDs: List<ULong>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffPeriodStruct {\n")
+ append("\tlabel : $label\n")
+ append("\tdayEntryIDs : $dayEntryIDs\n")
+ append("\ttariffComponentIDs : $tariffComponentIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (label != null) {
+ put(ContextSpecificTag(TAG_LABEL), label)
+ } else {
+ putNull(ContextSpecificTag(TAG_LABEL))
+ }
+ startArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ for (item in dayEntryIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ startArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ for (item in tariffComponentIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_LABEL = 0
+ private const val TAG_DAY_ENTRY_I_DS = 1
+ private const val TAG_TARIFF_COMPONENT_I_DS = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffPeriodStruct {
+ tlvReader.enterStructure(tlvTag)
+ val label =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(ContextSpecificTag(TAG_LABEL))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_LABEL))
+ null
+ }
+ val dayEntryIDs =
+ buildList<ULong> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getULong(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ val tariffComponentIDs =
+ buildList<ULong> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getULong(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffPeriodStruct(label, dayEntryIDs, tariffComponentIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt
new file mode 100644
index 0000000..96b9466
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffPriceStruct(
+ val priceType: UInt,
+ val price: Optional<Long>,
+ val priceLevel: Optional<Int>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffPriceStruct {\n")
+ append("\tpriceType : $priceType\n")
+ append("\tprice : $price\n")
+ append("\tpriceLevel : $priceLevel\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PRICE_TYPE), priceType)
+ if (price.isPresent) {
+ val optprice = price.get()
+ put(ContextSpecificTag(TAG_PRICE), optprice)
+ }
+ if (priceLevel.isPresent) {
+ val optpriceLevel = priceLevel.get()
+ put(ContextSpecificTag(TAG_PRICE_LEVEL), optpriceLevel)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PRICE_TYPE = 0
+ private const val TAG_PRICE = 1
+ private const val TAG_PRICE_LEVEL = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffPriceStruct {
+ tlvReader.enterStructure(tlvTag)
+ val priceType = tlvReader.getUInt(ContextSpecificTag(TAG_PRICE_TYPE))
+ val price =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRICE))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PRICE)))
+ } else {
+ Optional.empty()
+ }
+ val priceLevel =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRICE_LEVEL))) {
+ Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_PRICE_LEVEL)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffPriceStruct(priceType, price, priceLevel)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt
new file mode 100644
index 0000000..ebbd955
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt
@@ -0,0 +1,95 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import java.util.Optional
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class MeterIdentificationClusterPowerThresholdStruct(
+ val powerThreshold: Optional<Long>,
+ val apparentPowerThreshold: Optional<Long>,
+ val powerThresholdSource: UInt?,
+) {
+ override fun toString(): String = buildString {
+ append("MeterIdentificationClusterPowerThresholdStruct {\n")
+ append("\tpowerThreshold : $powerThreshold\n")
+ append("\tapparentPowerThreshold : $apparentPowerThreshold\n")
+ append("\tpowerThresholdSource : $powerThresholdSource\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (powerThreshold.isPresent) {
+ val optpowerThreshold = powerThreshold.get()
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD), optpowerThreshold)
+ }
+ if (apparentPowerThreshold.isPresent) {
+ val optapparentPowerThreshold = apparentPowerThreshold.get()
+ put(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD), optapparentPowerThreshold)
+ }
+ if (powerThresholdSource != null) {
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE), powerThresholdSource)
+ } else {
+ putNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_POWER_THRESHOLD = 0
+ private const val TAG_APPARENT_POWER_THRESHOLD = 1
+ private const val TAG_POWER_THRESHOLD_SOURCE = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MeterIdentificationClusterPowerThresholdStruct {
+ tlvReader.enterStructure(tlvTag)
+ val powerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val apparentPowerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val powerThresholdSource =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return MeterIdentificationClusterPowerThresholdStruct(
+ powerThreshold,
+ apparentPowerThreshold,
+ powerThresholdSource,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityMeteringCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityMeteringCluster.kt
new file mode 100644
index 0000000..ecd1716
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityMeteringCluster.kt
@@ -0,0 +1,964 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.tlv.AnonymousTag
+import matter.tlv.TlvReader
+
+class CommodityMeteringCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class MeteredQuantityAttribute(val value: List<CommodityMeteringClusterMeteredQuantityStruct>?)
+
+ sealed class MeteredQuantityAttributeSubscriptionState {
+ data class Success(val value: List<CommodityMeteringClusterMeteredQuantityStruct>?) :
+ MeteredQuantityAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : MeteredQuantityAttributeSubscriptionState()
+
+ object SubscriptionEstablished : MeteredQuantityAttributeSubscriptionState()
+ }
+
+ class MeteredQuantityTimestampAttribute(val value: UInt?)
+
+ sealed class MeteredQuantityTimestampAttributeSubscriptionState {
+ data class Success(val value: UInt?) : MeteredQuantityTimestampAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) :
+ MeteredQuantityTimestampAttributeSubscriptionState()
+
+ object SubscriptionEstablished : MeteredQuantityTimestampAttributeSubscriptionState()
+ }
+
+ class MeasurementTypeAttribute(val value: UShort?)
+
+ sealed class MeasurementTypeAttributeSubscriptionState {
+ data class Success(val value: UShort?) : MeasurementTypeAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : MeasurementTypeAttributeSubscriptionState()
+
+ object SubscriptionEstablished : MeasurementTypeAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List<UInt>)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List<UInt>)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List<UInt>)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List<UInt>)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun readMeteredQuantityAttribute(): MeteredQuantityAttribute {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Meteredquantity attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityMeteringClusterMeteredQuantityStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityMeteringClusterMeteredQuantityStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityMeteringClusterMeteredQuantityStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return MeteredQuantityAttribute(decodedValue)
+ }
+
+ suspend fun subscribeMeteredQuantityAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<MeteredQuantityAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ MeteredQuantityAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Meteredquantity attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityMeteringClusterMeteredQuantityStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityMeteringClusterMeteredQuantityStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ CommodityMeteringClusterMeteredQuantityStruct.fromTlv(AnonymousTag, tlvReader)
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(MeteredQuantityAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(MeteredQuantityAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readMeteredQuantityTimestampAttribute(): MeteredQuantityTimestampAttribute {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Meteredquantitytimestamp attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return MeteredQuantityTimestampAttribute(decodedValue)
+ }
+
+ suspend fun subscribeMeteredQuantityTimestampAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<MeteredQuantityTimestampAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ MeteredQuantityTimestampAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Meteredquantitytimestamp attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(MeteredQuantityTimestampAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(MeteredQuantityTimestampAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readMeasurementTypeAttribute(): MeasurementTypeAttribute {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Measurementtype attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUShort(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return MeasurementTypeAttribute(decodedValue)
+ }
+
+ suspend fun subscribeMeasurementTypeAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<MeasurementTypeAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ MeasurementTypeAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Measurementtype attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUShort(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(MeasurementTypeAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(MeasurementTypeAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<GeneratedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AcceptedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<EventListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AttributeListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UIntSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UShortSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(CommodityMeteringCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 2823u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityPriceCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityPriceCluster.kt
new file mode 100644
index 0000000..41e96f5
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityPriceCluster.kt
@@ -0,0 +1,1156 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UByteSubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class GetDetailedPriceResponse(val currentPrice: CommodityPriceClusterCommodityPriceStruct?)
+
+ class GetDetailedForecastResponse(
+ val priceForecast: List<CommodityPriceClusterCommodityPriceStruct>
+ )
+
+ class CurrencyAttribute(val value: CommodityPriceClusterCurrencyStruct?)
+
+ sealed class CurrencyAttributeSubscriptionState {
+ data class Success(val value: CommodityPriceClusterCurrencyStruct?) :
+ CurrencyAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrencyAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrencyAttributeSubscriptionState()
+ }
+
+ class CurrentPriceAttribute(val value: CommodityPriceClusterCommodityPriceStruct?)
+
+ sealed class CurrentPriceAttributeSubscriptionState {
+ data class Success(val value: CommodityPriceClusterCommodityPriceStruct?) :
+ CurrentPriceAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrentPriceAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentPriceAttributeSubscriptionState()
+ }
+
+ class PriceForecastAttribute(val value: List<CommodityPriceClusterCommodityPriceStruct>?)
+
+ sealed class PriceForecastAttributeSubscriptionState {
+ data class Success(val value: List<CommodityPriceClusterCommodityPriceStruct>?) :
+ PriceForecastAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : PriceForecastAttributeSubscriptionState()
+
+ object SubscriptionEstablished : PriceForecastAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List<UInt>)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List<UInt>)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List<UInt>)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List<UInt>)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun getDetailedPriceRequest(
+ details: UShort,
+ timedInvokeTimeout: Duration? = null,
+ ): GetDetailedPriceResponse {
+ val commandId: UInt = 0u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_DETAILS_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_DETAILS_REQ), details)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CURRENT_PRICE: Int = 0
+ var currentPrice_decoded: CommodityPriceClusterCommodityPriceStruct? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CURRENT_PRICE)) {
+ currentPrice_decoded =
+ if (tlvReader.isNull()) {
+ tlvReader.getNull(tag)
+ null
+ } else {
+ if (!tlvReader.isNull()) {
+ CommodityPriceClusterCommodityPriceStruct.fromTlv(tag, tlvReader)
+ } else {
+ tlvReader.getNull(tag)
+ null
+ }
+ }
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ tlvReader.exitContainer()
+
+ return GetDetailedPriceResponse(currentPrice_decoded)
+ }
+
+ suspend fun getDetailedForecastRequest(
+ details: UShort,
+ timedInvokeTimeout: Duration? = null,
+ ): GetDetailedForecastResponse {
+ val commandId: UInt = 2u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_DETAILS_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_DETAILS_REQ), details)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_PRICE_FORECAST: Int = 0
+ var priceForecast_decoded: List<CommodityPriceClusterCommodityPriceStruct>? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_PRICE_FORECAST)) {
+ priceForecast_decoded =
+ buildList<CommodityPriceClusterCommodityPriceStruct> {
+ tlvReader.enterArray(tag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityPriceClusterCommodityPriceStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (priceForecast_decoded == null) {
+ throw IllegalStateException("priceForecast not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return GetDetailedForecastResponse(priceForecast_decoded)
+ }
+
+ suspend fun readTariffUnitAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Tariffunit attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeTariffUnitAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UByteSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Tariffunit attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrencyAttribute(): CurrencyAttribute {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currency attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityPriceClusterCurrencyStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityPriceClusterCurrencyStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CurrencyAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrencyAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CurrencyAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrencyAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Currency attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityPriceClusterCurrencyStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityPriceClusterCurrencyStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CurrencyAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrencyAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentPriceAttribute(): CurrentPriceAttribute {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentprice attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityPriceClusterCommodityPriceStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityPriceClusterCommodityPriceStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CurrentPriceAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentPriceAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CurrentPriceAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrentPriceAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Currentprice attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityPriceClusterCommodityPriceStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityPriceClusterCommodityPriceStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CurrentPriceAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentPriceAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readPriceForecastAttribute(): PriceForecastAttribute {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Priceforecast attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityPriceClusterCommodityPriceStruct>? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ buildList<CommodityPriceClusterCommodityPriceStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityPriceClusterCommodityPriceStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ null
+ }
+
+ return PriceForecastAttribute(decodedValue)
+ }
+
+ suspend fun subscribePriceForecastAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<PriceForecastAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ PriceForecastAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Priceforecast attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityPriceClusterCommodityPriceStruct>? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ buildList<CommodityPriceClusterCommodityPriceStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityPriceClusterCommodityPriceStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ null
+ }
+
+ decodedValue?.let { emit(PriceForecastAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(PriceForecastAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<GeneratedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AcceptedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<EventListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AttributeListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UIntSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UShortSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(CommodityPriceCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 149u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityTariffCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityTariffCluster.kt
new file mode 100644
index 0000000..747f78d
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityTariffCluster.kt
@@ -0,0 +1,2888 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class GetTariffComponentResponse(
+ val label: String?,
+ val dayEntryIDs: List<UInt>,
+ val tariffComponent: CommodityTariffClusterTariffComponentStruct,
+ )
+
+ class GetDayEntryResponse(val dayEntry: CommodityTariffClusterDayEntryStruct)
+
+ class TariffInfoAttribute(val value: CommodityTariffClusterTariffInformationStruct?)
+
+ sealed class TariffInfoAttributeSubscriptionState {
+ data class Success(val value: CommodityTariffClusterTariffInformationStruct?) :
+ TariffInfoAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : TariffInfoAttributeSubscriptionState()
+
+ object SubscriptionEstablished : TariffInfoAttributeSubscriptionState()
+ }
+
+ class TariffUnitAttribute(val value: UByte?)
+
+ sealed class TariffUnitAttributeSubscriptionState {
+ data class Success(val value: UByte?) : TariffUnitAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : TariffUnitAttributeSubscriptionState()
+
+ object SubscriptionEstablished : TariffUnitAttributeSubscriptionState()
+ }
+
+ class StartDateAttribute(val value: UInt?)
+
+ sealed class StartDateAttributeSubscriptionState {
+ data class Success(val value: UInt?) : StartDateAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : StartDateAttributeSubscriptionState()
+
+ object SubscriptionEstablished : StartDateAttributeSubscriptionState()
+ }
+
+ class DayEntriesAttribute(val value: List<CommodityTariffClusterDayEntryStruct>?)
+
+ sealed class DayEntriesAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterDayEntryStruct>?) :
+ DayEntriesAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : DayEntriesAttributeSubscriptionState()
+
+ object SubscriptionEstablished : DayEntriesAttributeSubscriptionState()
+ }
+
+ class DayPatternsAttribute(val value: List<CommodityTariffClusterDayPatternStruct>?)
+
+ sealed class DayPatternsAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterDayPatternStruct>?) :
+ DayPatternsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : DayPatternsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : DayPatternsAttributeSubscriptionState()
+ }
+
+ class CalendarPeriodsAttribute(val value: List<CommodityTariffClusterCalendarPeriodStruct>?)
+
+ sealed class CalendarPeriodsAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterCalendarPeriodStruct>?) :
+ CalendarPeriodsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CalendarPeriodsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CalendarPeriodsAttributeSubscriptionState()
+ }
+
+ class IndividualDaysAttribute(val value: List<CommodityTariffClusterDayStruct>?)
+
+ sealed class IndividualDaysAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterDayStruct>?) :
+ IndividualDaysAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : IndividualDaysAttributeSubscriptionState()
+
+ object SubscriptionEstablished : IndividualDaysAttributeSubscriptionState()
+ }
+
+ class CurrentDayAttribute(val value: CommodityTariffClusterDayStruct?)
+
+ sealed class CurrentDayAttributeSubscriptionState {
+ data class Success(val value: CommodityTariffClusterDayStruct?) :
+ CurrentDayAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrentDayAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentDayAttributeSubscriptionState()
+ }
+
+ class NextDayAttribute(val value: CommodityTariffClusterDayStruct?)
+
+ sealed class NextDayAttributeSubscriptionState {
+ data class Success(val value: CommodityTariffClusterDayStruct?) :
+ NextDayAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : NextDayAttributeSubscriptionState()
+
+ object SubscriptionEstablished : NextDayAttributeSubscriptionState()
+ }
+
+ class CurrentDayEntryAttribute(val value: CommodityTariffClusterDayEntryStruct?)
+
+ sealed class CurrentDayEntryAttributeSubscriptionState {
+ data class Success(val value: CommodityTariffClusterDayEntryStruct?) :
+ CurrentDayEntryAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrentDayEntryAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentDayEntryAttributeSubscriptionState()
+ }
+
+ class CurrentDayEntryDateAttribute(val value: UInt?)
+
+ sealed class CurrentDayEntryDateAttributeSubscriptionState {
+ data class Success(val value: UInt?) : CurrentDayEntryDateAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : CurrentDayEntryDateAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentDayEntryDateAttributeSubscriptionState()
+ }
+
+ class NextDayEntryAttribute(val value: CommodityTariffClusterDayEntryStruct?)
+
+ sealed class NextDayEntryAttributeSubscriptionState {
+ data class Success(val value: CommodityTariffClusterDayEntryStruct?) :
+ NextDayEntryAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : NextDayEntryAttributeSubscriptionState()
+
+ object SubscriptionEstablished : NextDayEntryAttributeSubscriptionState()
+ }
+
+ class NextDayEntryDateAttribute(val value: UInt?)
+
+ sealed class NextDayEntryDateAttributeSubscriptionState {
+ data class Success(val value: UInt?) : NextDayEntryDateAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : NextDayEntryDateAttributeSubscriptionState()
+
+ object SubscriptionEstablished : NextDayEntryDateAttributeSubscriptionState()
+ }
+
+ class TariffComponentsAttribute(val value: List<CommodityTariffClusterTariffComponentStruct>?)
+
+ sealed class TariffComponentsAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterTariffComponentStruct>?) :
+ TariffComponentsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : TariffComponentsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : TariffComponentsAttributeSubscriptionState()
+ }
+
+ class TariffPeriodsAttribute(val value: List<CommodityTariffClusterTariffPeriodStruct>?)
+
+ sealed class TariffPeriodsAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterTariffPeriodStruct>?) :
+ TariffPeriodsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : TariffPeriodsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : TariffPeriodsAttributeSubscriptionState()
+ }
+
+ class CurrentTariffComponentsAttribute(
+ val value: List<CommodityTariffClusterTariffComponentStruct>?
+ )
+
+ sealed class CurrentTariffComponentsAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterTariffComponentStruct>?) :
+ CurrentTariffComponentsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) :
+ CurrentTariffComponentsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : CurrentTariffComponentsAttributeSubscriptionState()
+ }
+
+ class NextTariffComponentsAttribute(
+ val value: List<CommodityTariffClusterTariffComponentStruct>?
+ )
+
+ sealed class NextTariffComponentsAttributeSubscriptionState {
+ data class Success(val value: List<CommodityTariffClusterTariffComponentStruct>?) :
+ NextTariffComponentsAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : NextTariffComponentsAttributeSubscriptionState()
+
+ object SubscriptionEstablished : NextTariffComponentsAttributeSubscriptionState()
+ }
+
+ class DefaultRandomizationOffsetAttribute(val value: Short?)
+
+ sealed class DefaultRandomizationOffsetAttributeSubscriptionState {
+ data class Success(val value: Short?) : DefaultRandomizationOffsetAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) :
+ DefaultRandomizationOffsetAttributeSubscriptionState()
+
+ object SubscriptionEstablished : DefaultRandomizationOffsetAttributeSubscriptionState()
+ }
+
+ class DefaultRandomizationTypeAttribute(val value: UByte?)
+
+ sealed class DefaultRandomizationTypeAttributeSubscriptionState {
+ data class Success(val value: UByte?) : DefaultRandomizationTypeAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) :
+ DefaultRandomizationTypeAttributeSubscriptionState()
+
+ object SubscriptionEstablished : DefaultRandomizationTypeAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List<UInt>)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List<UInt>)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List<UInt>)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List<UInt>)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun getTariffComponent(
+ tariffComponentID: UInt,
+ timedInvokeTimeout: Duration? = null,
+ ): GetTariffComponentResponse {
+ val commandId: UInt = 0u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_TARIFF_COMPONENT_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID_REQ), tariffComponentID)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_LABEL: Int = 0
+ var label_decoded: String? = null
+
+ val TAG_DAY_ENTRY_I_DS: Int = 1
+ var dayEntryIDs_decoded: List<UInt>? = null
+
+ val TAG_TARIFF_COMPONENT: Int = 2
+ var tariffComponent_decoded: CommodityTariffClusterTariffComponentStruct? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_LABEL)) {
+ label_decoded =
+ if (tlvReader.isNull()) {
+ tlvReader.getNull(tag)
+ null
+ } else {
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(tag)
+ } else {
+ tlvReader.getNull(tag)
+ null
+ }
+ }
+ }
+
+ if (tag == ContextSpecificTag(TAG_DAY_ENTRY_I_DS)) {
+ dayEntryIDs_decoded =
+ buildList<UInt> {
+ tlvReader.enterArray(tag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ }
+
+ if (tag == ContextSpecificTag(TAG_TARIFF_COMPONENT)) {
+ tariffComponent_decoded =
+ CommodityTariffClusterTariffComponentStruct.fromTlv(tag, tlvReader)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (dayEntryIDs_decoded == null) {
+ throw IllegalStateException("dayEntryIDs not found in TLV")
+ }
+
+ if (tariffComponent_decoded == null) {
+ throw IllegalStateException("tariffComponent not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return GetTariffComponentResponse(label_decoded, dayEntryIDs_decoded, tariffComponent_decoded)
+ }
+
+ suspend fun getDayEntry(
+ dayEntryID: UInt,
+ timedInvokeTimeout: Duration? = null,
+ ): GetDayEntryResponse {
+ val commandId: UInt = 1u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_DAY_ENTRY_ID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_DAY_ENTRY_ID_REQ), dayEntryID)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_DAY_ENTRY: Int = 0
+ var dayEntry_decoded: CommodityTariffClusterDayEntryStruct? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_DAY_ENTRY)) {
+ dayEntry_decoded = CommodityTariffClusterDayEntryStruct.fromTlv(tag, tlvReader)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (dayEntry_decoded == null) {
+ throw IllegalStateException("dayEntry not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return GetDayEntryResponse(dayEntry_decoded)
+ }
+
+ suspend fun readTariffInfoAttribute(): TariffInfoAttribute {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Tariffinfo attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterTariffInformationStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterTariffInformationStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return TariffInfoAttribute(decodedValue)
+ }
+
+ suspend fun subscribeTariffInfoAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<TariffInfoAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ TariffInfoAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Tariffinfo attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterTariffInformationStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterTariffInformationStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(TariffInfoAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(TariffInfoAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readTariffUnitAttribute(): TariffUnitAttribute {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Tariffunit attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return TariffUnitAttribute(decodedValue)
+ }
+
+ suspend fun subscribeTariffUnitAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<TariffUnitAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ TariffUnitAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Tariffunit attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(TariffUnitAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(TariffUnitAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readStartDateAttribute(): StartDateAttribute {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Startdate attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return StartDateAttribute(decodedValue)
+ }
+
+ suspend fun subscribeStartDateAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<StartDateAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ StartDateAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Startdate attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(StartDateAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(StartDateAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readDayEntriesAttribute(): DayEntriesAttribute {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Dayentries attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterDayEntryStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterDayEntryStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterDayEntryStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return DayEntriesAttribute(decodedValue)
+ }
+
+ suspend fun subscribeDayEntriesAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<DayEntriesAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ DayEntriesAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Dayentries attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterDayEntryStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterDayEntryStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterDayEntryStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(DayEntriesAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(DayEntriesAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readDayPatternsAttribute(): DayPatternsAttribute {
+ val ATTRIBUTE_ID: UInt = 4u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Daypatterns attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterDayPatternStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterDayPatternStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterDayPatternStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return DayPatternsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeDayPatternsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<DayPatternsAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 4u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ DayPatternsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Daypatterns attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterDayPatternStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterDayPatternStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterDayPatternStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(DayPatternsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(DayPatternsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCalendarPeriodsAttribute(): CalendarPeriodsAttribute {
+ val ATTRIBUTE_ID: UInt = 5u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Calendarperiods attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterCalendarPeriodStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterCalendarPeriodStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterCalendarPeriodStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CalendarPeriodsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCalendarPeriodsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CalendarPeriodsAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 5u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CalendarPeriodsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Calendarperiods attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterCalendarPeriodStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterCalendarPeriodStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterCalendarPeriodStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CalendarPeriodsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CalendarPeriodsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readIndividualDaysAttribute(): IndividualDaysAttribute {
+ val ATTRIBUTE_ID: UInt = 6u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Individualdays attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterDayStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterDayStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterDayStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return IndividualDaysAttribute(decodedValue)
+ }
+
+ suspend fun subscribeIndividualDaysAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<IndividualDaysAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 6u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ IndividualDaysAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Individualdays attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterDayStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterDayStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterDayStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(IndividualDaysAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(IndividualDaysAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentDayAttribute(): CurrentDayAttribute {
+ val ATTRIBUTE_ID: UInt = 7u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentday attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CurrentDayAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentDayAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CurrentDayAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 7u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrentDayAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Currentday attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CurrentDayAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentDayAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readNextDayAttribute(): NextDayAttribute {
+ val ATTRIBUTE_ID: UInt = 8u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Nextday attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return NextDayAttribute(decodedValue)
+ }
+
+ suspend fun subscribeNextDayAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<NextDayAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 8u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ NextDayAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Nextday attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(NextDayAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(NextDayAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentDayEntryAttribute(): CurrentDayEntryAttribute {
+ val ATTRIBUTE_ID: UInt = 9u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentdayentry attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayEntryStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayEntryStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CurrentDayEntryAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentDayEntryAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CurrentDayEntryAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 9u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrentDayEntryAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Currentdayentry attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayEntryStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayEntryStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CurrentDayEntryAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentDayEntryAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentDayEntryDateAttribute(): CurrentDayEntryDateAttribute {
+ val ATTRIBUTE_ID: UInt = 10u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentdayentrydate attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CurrentDayEntryDateAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentDayEntryDateAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CurrentDayEntryDateAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 10u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrentDayEntryDateAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Currentdayentrydate attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CurrentDayEntryDateAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentDayEntryDateAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readNextDayEntryAttribute(): NextDayEntryAttribute {
+ val ATTRIBUTE_ID: UInt = 11u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Nextdayentry attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayEntryStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayEntryStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return NextDayEntryAttribute(decodedValue)
+ }
+
+ suspend fun subscribeNextDayEntryAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<NextDayEntryAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 11u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ NextDayEntryAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Nextdayentry attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: CommodityTariffClusterDayEntryStruct? =
+ if (!tlvReader.isNull()) {
+ CommodityTariffClusterDayEntryStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(NextDayEntryAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(NextDayEntryAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readNextDayEntryDateAttribute(): NextDayEntryDateAttribute {
+ val ATTRIBUTE_ID: UInt = 12u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Nextdayentrydate attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return NextDayEntryDateAttribute(decodedValue)
+ }
+
+ suspend fun subscribeNextDayEntryDateAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<NextDayEntryDateAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 12u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ NextDayEntryDateAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Nextdayentrydate attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(NextDayEntryDateAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(NextDayEntryDateAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readTariffComponentsAttribute(): TariffComponentsAttribute {
+ val ATTRIBUTE_ID: UInt = 13u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Tariffcomponents attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffComponentStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffComponentStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffComponentStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return TariffComponentsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeTariffComponentsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<TariffComponentsAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 13u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ TariffComponentsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Tariffcomponents attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffComponentStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffComponentStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffComponentStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(TariffComponentsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(TariffComponentsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readTariffPeriodsAttribute(): TariffPeriodsAttribute {
+ val ATTRIBUTE_ID: UInt = 14u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Tariffperiods attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffPeriodStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffPeriodStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffPeriodStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return TariffPeriodsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeTariffPeriodsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<TariffPeriodsAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 14u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ TariffPeriodsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Tariffperiods attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffPeriodStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffPeriodStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffPeriodStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(TariffPeriodsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(TariffPeriodsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentTariffComponentsAttribute(): CurrentTariffComponentsAttribute {
+ val ATTRIBUTE_ID: UInt = 15u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currenttariffcomponents attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffComponentStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffComponentStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffComponentStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return CurrentTariffComponentsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeCurrentTariffComponentsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<CurrentTariffComponentsAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 15u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ CurrentTariffComponentsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Currenttariffcomponents attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffComponentStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffComponentStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffComponentStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(CurrentTariffComponentsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(CurrentTariffComponentsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readNextTariffComponentsAttribute(): NextTariffComponentsAttribute {
+ val ATTRIBUTE_ID: UInt = 16u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Nexttariffcomponents attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffComponentStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffComponentStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffComponentStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return NextTariffComponentsAttribute(decodedValue)
+ }
+
+ suspend fun subscribeNextTariffComponentsAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<NextTariffComponentsAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 16u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ NextTariffComponentsAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Nexttariffcomponents attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<CommodityTariffClusterTariffComponentStruct>? =
+ if (!tlvReader.isNull()) {
+ buildList<CommodityTariffClusterTariffComponentStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(CommodityTariffClusterTariffComponentStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(NextTariffComponentsAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(NextTariffComponentsAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readDefaultRandomizationOffsetAttribute(): DefaultRandomizationOffsetAttribute {
+ val ATTRIBUTE_ID: UInt = 17u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Defaultrandomizationoffset attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: Short? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getShort(AnonymousTag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return DefaultRandomizationOffsetAttribute(decodedValue)
+ }
+
+ suspend fun subscribeDefaultRandomizationOffsetAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<DefaultRandomizationOffsetAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 17u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ DefaultRandomizationOffsetAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Defaultrandomizationoffset attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: Short? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getShort(AnonymousTag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let {
+ emit(DefaultRandomizationOffsetAttributeSubscriptionState.Success(it))
+ }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(DefaultRandomizationOffsetAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readDefaultRandomizationTypeAttribute(): DefaultRandomizationTypeAttribute {
+ val ATTRIBUTE_ID: UInt = 18u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Defaultrandomizationtype attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getUByte(AnonymousTag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return DefaultRandomizationTypeAttribute(decodedValue)
+ }
+
+ suspend fun subscribeDefaultRandomizationTypeAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<DefaultRandomizationTypeAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 18u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ DefaultRandomizationTypeAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Defaultrandomizationtype attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getUByte(AnonymousTag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(DefaultRandomizationTypeAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(DefaultRandomizationTypeAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<GeneratedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AcceptedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<EventListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AttributeListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UIntSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UShortSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(CommodityTariffCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 1792u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/MeterIdentificationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/MeterIdentificationCluster.kt
new file mode 100644
index 0000000..c0a0c58
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/MeterIdentificationCluster.kt
@@ -0,0 +1,1173 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.tlv.AnonymousTag
+import matter.tlv.TlvReader
+
+class MeterIdentificationCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class MeterTypeAttribute(val value: UByte?)
+
+ sealed class MeterTypeAttributeSubscriptionState {
+ data class Success(val value: UByte?) : MeterTypeAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : MeterTypeAttributeSubscriptionState()
+
+ object SubscriptionEstablished : MeterTypeAttributeSubscriptionState()
+ }
+
+ class PointOfDeliveryAttribute(val value: String?)
+
+ sealed class PointOfDeliveryAttributeSubscriptionState {
+ data class Success(val value: String?) : PointOfDeliveryAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : PointOfDeliveryAttributeSubscriptionState()
+
+ object SubscriptionEstablished : PointOfDeliveryAttributeSubscriptionState()
+ }
+
+ class MeterSerialNumberAttribute(val value: String?)
+
+ sealed class MeterSerialNumberAttributeSubscriptionState {
+ data class Success(val value: String?) : MeterSerialNumberAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : MeterSerialNumberAttributeSubscriptionState()
+
+ object SubscriptionEstablished : MeterSerialNumberAttributeSubscriptionState()
+ }
+
+ class ProtocolVersionAttribute(val value: String?)
+
+ sealed class ProtocolVersionAttributeSubscriptionState {
+ data class Success(val value: String?) : ProtocolVersionAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : ProtocolVersionAttributeSubscriptionState()
+
+ object SubscriptionEstablished : ProtocolVersionAttributeSubscriptionState()
+ }
+
+ class PowerThresholdAttribute(val value: MeterIdentificationClusterPowerThresholdStruct?)
+
+ sealed class PowerThresholdAttributeSubscriptionState {
+ data class Success(val value: MeterIdentificationClusterPowerThresholdStruct?) :
+ PowerThresholdAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : PowerThresholdAttributeSubscriptionState()
+
+ object SubscriptionEstablished : PowerThresholdAttributeSubscriptionState()
+ }
+
+ class GeneratedCommandListAttribute(val value: List<UInt>)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List<UInt>)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List<UInt>)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List<UInt>)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List<UInt>) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun readMeterTypeAttribute(): MeterTypeAttribute {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Metertype attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return MeterTypeAttribute(decodedValue)
+ }
+
+ suspend fun subscribeMeterTypeAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<MeterTypeAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ MeterTypeAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Metertype attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(MeterTypeAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(MeterTypeAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readPointOfDeliveryAttribute(): PointOfDeliveryAttribute {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Pointofdelivery attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return PointOfDeliveryAttribute(decodedValue)
+ }
+
+ suspend fun subscribePointOfDeliveryAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<PointOfDeliveryAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ PointOfDeliveryAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Pointofdelivery attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(PointOfDeliveryAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(PointOfDeliveryAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readMeterSerialNumberAttribute(): MeterSerialNumberAttribute {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Meterserialnumber attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return MeterSerialNumberAttribute(decodedValue)
+ }
+
+ suspend fun subscribeMeterSerialNumberAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<MeterSerialNumberAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ MeterSerialNumberAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Meterserialnumber attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String? =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(MeterSerialNumberAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(MeterSerialNumberAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readProtocolVersionAttribute(): ProtocolVersionAttribute {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Protocolversion attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return ProtocolVersionAttribute(decodedValue)
+ }
+
+ suspend fun subscribeProtocolVersionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<ProtocolVersionAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ ProtocolVersionAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Protocolversion attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: String? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ tlvReader.getString(AnonymousTag)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(ProtocolVersionAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(ProtocolVersionAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readPowerThresholdAttribute(): PowerThresholdAttribute {
+ val ATTRIBUTE_ID: UInt = 4u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Powerthreshold attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: MeterIdentificationClusterPowerThresholdStruct? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ MeterIdentificationClusterPowerThresholdStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ return PowerThresholdAttribute(decodedValue)
+ }
+
+ suspend fun subscribePowerThresholdAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<PowerThresholdAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 4u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ PowerThresholdAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Powerthreshold attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: MeterIdentificationClusterPowerThresholdStruct? =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ MeterIdentificationClusterPowerThresholdStruct.fromTlv(AnonymousTag, tlvReader)
+ } else {
+ null
+ }
+ } else {
+ tlvReader.getNull(AnonymousTag)
+ null
+ }
+
+ decodedValue?.let { emit(PowerThresholdAttributeSubscriptionState.Success(it)) }
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(PowerThresholdAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<GeneratedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AcceptedCommandListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<EventListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<AttributeListAttributeSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List<UInt> =
+ buildList<UInt> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UIntSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow<UShortSubscriptionState> {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance<ReadData.Attribute>()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(MeterIdentificationCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 2822u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt
new file mode 100644
index 0000000..623089d
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt
@@ -0,0 +1,72 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.eventstructs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterForecastChangeEvent(
+ val priceForecast:
+ List<matter.controller.cluster.structs.CommodityPriceClusterCommodityPriceStruct>
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterForecastChangeEvent {\n")
+ append("\tpriceForecast : $priceForecast\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ startArray(ContextSpecificTag(TAG_PRICE_FORECAST))
+ for (item in priceForecast.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PRICE_FORECAST = 0
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterForecastChangeEvent {
+ tlvReader.enterStructure(tlvTag)
+ val priceForecast =
+ buildList<matter.controller.cluster.structs.CommodityPriceClusterCommodityPriceStruct> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_PRICE_FORECAST))
+ while (!tlvReader.isEndOfContainer()) {
+ this.add(
+ matter.controller.cluster.structs.CommodityPriceClusterCommodityPriceStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterForecastChangeEvent(priceForecast)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt
new file mode 100644
index 0000000..52afcf0
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt
@@ -0,0 +1,58 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.eventstructs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterPriceChangeEvent(
+ val currentPrice: matter.controller.cluster.structs.CommodityPriceClusterCommodityPriceStruct
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterPriceChangeEvent {\n")
+ append("\tcurrentPrice : $currentPrice\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ currentPrice.toTlv(ContextSpecificTag(TAG_CURRENT_PRICE), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CURRENT_PRICE = 0
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterPriceChangeEvent {
+ tlvReader.enterStructure(tlvTag)
+ val currentPrice =
+ matter.controller.cluster.structs.CommodityPriceClusterCommodityPriceStruct.fromTlv(
+ ContextSpecificTag(TAG_CURRENT_PRICE),
+ tlvReader,
+ )
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterPriceChangeEvent(currentPrice)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index cbb9ef2..578a211 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -47,6 +47,23 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureDimensionClusterRangePercent100thsStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureDimensionClusterTargetStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ClosureDimensionClusterUnitRangeStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterPriceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentControlClusterRatingNameStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterAdditionalInfoStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ContentLauncherClusterBrandingInformationStruct.kt",
@@ -111,6 +128,7 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/MediaPlaybackClusterTrackStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/MessagesClusterMessageResponseOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/MessagesClusterMessageStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/MicrowaveOvenModeClusterModeOptionStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/MicrowaveOvenModeClusterModeTagStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ModeSelectClusterModeOptionStruct.kt",
@@ -216,6 +234,8 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterReachableChangedEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/BridgedDeviceBasicInformationClusterStartUpEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterForecastChangeEvent.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommodityPriceClusterPriceChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DemandResponseLoadControlClusterLoadControlEventStatusChangeEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterPowerAdjustEndEvent.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/DeviceEnergyManagementClusterResumedEvent.kt",
@@ -316,6 +336,9 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ClosureDimensionCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ColorControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityMeteringCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityPriceCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/CommodityTariffCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentAppObserverCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ContentLauncherCluster.kt",
@@ -357,6 +380,7 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/MediaInputCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/MediaPlaybackCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/MessagesCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/MeterIdentificationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/MicrowaveOvenControlCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/MicrowaveOvenModeCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ModeSelectCluster.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt
new file mode 100644
index 0000000..81cb674
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityMeteringClusterMeteredQuantityStruct.kt
@@ -0,0 +1,71 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityMeteringClusterMeteredQuantityStruct(
+ val tariffComponentIDs: List<UInt>,
+ val quantity: Long,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityMeteringClusterMeteredQuantityStruct {\n")
+ append("\ttariffComponentIDs : $tariffComponentIDs\n")
+ append("\tquantity : $quantity\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ startArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ for (item in tariffComponentIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ put(ContextSpecificTag(TAG_QUANTITY), quantity)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TARIFF_COMPONENT_I_DS = 0
+ private const val TAG_QUANTITY = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityMeteringClusterMeteredQuantityStruct {
+ tlvReader.enterStructure(tlvTag)
+ val tariffComponentIDs =
+ buildList<UInt> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ val quantity = tlvReader.getLong(ContextSpecificTag(TAG_QUANTITY))
+
+ tlvReader.exitContainer()
+
+ return CommodityMeteringClusterMeteredQuantityStruct(tariffComponentIDs, quantity)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt
new file mode 100644
index 0000000..b9c6b27
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceComponentStruct.kt
@@ -0,0 +1,94 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterCommodityPriceComponentStruct(
+ val price: Long,
+ val source: UByte,
+ val description: Optional<String>,
+ val tariffComponentID: Optional<UInt>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterCommodityPriceComponentStruct {\n")
+ append("\tprice : $price\n")
+ append("\tsource : $source\n")
+ append("\tdescription : $description\n")
+ append("\ttariffComponentID : $tariffComponentID\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PRICE), price)
+ put(ContextSpecificTag(TAG_SOURCE), source)
+ if (description.isPresent) {
+ val optdescription = description.get()
+ put(ContextSpecificTag(TAG_DESCRIPTION), optdescription)
+ }
+ if (tariffComponentID.isPresent) {
+ val opttariffComponentID = tariffComponentID.get()
+ put(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID), opttariffComponentID)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PRICE = 0
+ private const val TAG_SOURCE = 1
+ private const val TAG_DESCRIPTION = 2
+ private const val TAG_TARIFF_COMPONENT_ID = 3
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): CommodityPriceClusterCommodityPriceComponentStruct {
+ tlvReader.enterStructure(tlvTag)
+ val price = tlvReader.getLong(ContextSpecificTag(TAG_PRICE))
+ val source = tlvReader.getUByte(ContextSpecificTag(TAG_SOURCE))
+ val description =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DESCRIPTION))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)))
+ } else {
+ Optional.empty()
+ }
+ val tariffComponentID =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID))) {
+ Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterCommodityPriceComponentStruct(
+ price,
+ source,
+ description,
+ tariffComponentID,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt
new file mode 100644
index 0000000..b265140
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCommodityPriceStruct.kt
@@ -0,0 +1,125 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterCommodityPriceStruct(
+ val periodStart: UInt,
+ val periodEnd: UInt?,
+ val price: CommodityPriceClusterPriceStruct,
+ val description: Optional<String>,
+ val components: Optional<List<CommodityPriceClusterCommodityPriceComponentStruct>>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterCommodityPriceStruct {\n")
+ append("\tperiodStart : $periodStart\n")
+ append("\tperiodEnd : $periodEnd\n")
+ append("\tprice : $price\n")
+ append("\tdescription : $description\n")
+ append("\tcomponents : $components\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PERIOD_START), periodStart)
+ if (periodEnd != null) {
+ put(ContextSpecificTag(TAG_PERIOD_END), periodEnd)
+ } else {
+ putNull(ContextSpecificTag(TAG_PERIOD_END))
+ }
+ price.toTlv(ContextSpecificTag(TAG_PRICE), this)
+ if (description.isPresent) {
+ val optdescription = description.get()
+ put(ContextSpecificTag(TAG_DESCRIPTION), optdescription)
+ }
+ if (components.isPresent) {
+ val optcomponents = components.get()
+ startArray(ContextSpecificTag(TAG_COMPONENTS))
+ for (item in optcomponents.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PERIOD_START = 0
+ private const val TAG_PERIOD_END = 1
+ private const val TAG_PRICE = 2
+ private const val TAG_DESCRIPTION = 3
+ private const val TAG_COMPONENTS = 4
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterCommodityPriceStruct {
+ tlvReader.enterStructure(tlvTag)
+ val periodStart = tlvReader.getUInt(ContextSpecificTag(TAG_PERIOD_START))
+ val periodEnd =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_PERIOD_END))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PERIOD_END))
+ null
+ }
+ val price = CommodityPriceClusterPriceStruct.fromTlv(ContextSpecificTag(TAG_PRICE), tlvReader)
+ val description =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DESCRIPTION))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_DESCRIPTION)))
+ } else {
+ Optional.empty()
+ }
+ val components =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_COMPONENTS))) {
+ Optional.of(
+ buildList<CommodityPriceClusterCommodityPriceComponentStruct> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_COMPONENTS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ CommodityPriceClusterCommodityPriceComponentStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ )
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterCommodityPriceStruct(
+ periodStart,
+ periodEnd,
+ price,
+ description,
+ components,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt
new file mode 100644
index 0000000..f46e0e3
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterCurrencyStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterCurrencyStruct(val currency: UShort, val decimalPoints: UByte) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterCurrencyStruct {\n")
+ append("\tcurrency : $currency\n")
+ append("\tdecimalPoints : $decimalPoints\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CURRENCY), currency)
+ put(ContextSpecificTag(TAG_DECIMAL_POINTS), decimalPoints)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CURRENCY = 0
+ private const val TAG_DECIMAL_POINTS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterCurrencyStruct {
+ tlvReader.enterStructure(tlvTag)
+ val currency = tlvReader.getUShort(ContextSpecificTag(TAG_CURRENCY))
+ val decimalPoints = tlvReader.getUByte(ContextSpecificTag(TAG_DECIMAL_POINTS))
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterCurrencyStruct(currency, decimalPoints)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterPriceStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterPriceStruct.kt
new file mode 100644
index 0000000..5332fcf
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityPriceClusterPriceStruct.kt
@@ -0,0 +1,60 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityPriceClusterPriceStruct(
+ val amount: Long,
+ val currency: CommodityPriceClusterCurrencyStruct,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityPriceClusterPriceStruct {\n")
+ append("\tamount : $amount\n")
+ append("\tcurrency : $currency\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_AMOUNT), amount)
+ currency.toTlv(ContextSpecificTag(TAG_CURRENCY), this)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_AMOUNT = 0
+ private const val TAG_CURRENCY = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityPriceClusterPriceStruct {
+ tlvReader.enterStructure(tlvTag)
+ val amount = tlvReader.getLong(ContextSpecificTag(TAG_AMOUNT))
+ val currency =
+ CommodityPriceClusterCurrencyStruct.fromTlv(ContextSpecificTag(TAG_CURRENCY), tlvReader)
+
+ tlvReader.exitContainer()
+
+ return CommodityPriceClusterPriceStruct(amount, currency)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt
new file mode 100644
index 0000000..fab1ba5
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.kt
@@ -0,0 +1,62 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct(
+ val number: UByte,
+ val requiredState: UByte,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct {\n")
+ append("\tnumber : $number\n")
+ append("\trequiredState : $requiredState\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_NUMBER), number)
+ put(ContextSpecificTag(TAG_REQUIRED_STATE), requiredState)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_NUMBER = 0
+ private const val TAG_REQUIRED_STATE = 1
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct {
+ tlvReader.enterStructure(tlvTag)
+ val number = tlvReader.getUByte(ContextSpecificTag(TAG_NUMBER))
+ val requiredState = tlvReader.getUByte(ContextSpecificTag(TAG_REQUIRED_STATE))
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct(number, requiredState)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt
new file mode 100644
index 0000000..4bd2b75
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCalendarPeriodStruct.kt
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterCalendarPeriodStruct(
+ val startDate: UInt?,
+ val dayPatternIDs: List<UInt>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterCalendarPeriodStruct {\n")
+ append("\tstartDate : $startDate\n")
+ append("\tdayPatternIDs : $dayPatternIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (startDate != null) {
+ put(ContextSpecificTag(TAG_START_DATE), startDate)
+ } else {
+ putNull(ContextSpecificTag(TAG_START_DATE))
+ }
+ startArray(ContextSpecificTag(TAG_DAY_PATTERN_I_DS))
+ for (item in dayPatternIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_START_DATE = 0
+ private const val TAG_DAY_PATTERN_I_DS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterCalendarPeriodStruct {
+ tlvReader.enterStructure(tlvTag)
+ val startDate =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_START_DATE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_START_DATE))
+ null
+ }
+ val dayPatternIDs =
+ buildList<UInt> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_PATTERN_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterCalendarPeriodStruct(startDate, dayPatternIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt
new file mode 100644
index 0000000..6f582c4
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterCurrencyStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterCurrencyStruct(val currency: UShort, val decimalPoints: UByte) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterCurrencyStruct {\n")
+ append("\tcurrency : $currency\n")
+ append("\tdecimalPoints : $decimalPoints\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CURRENCY), currency)
+ put(ContextSpecificTag(TAG_DECIMAL_POINTS), decimalPoints)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CURRENCY = 0
+ private const val TAG_DECIMAL_POINTS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterCurrencyStruct {
+ tlvReader.enterStructure(tlvTag)
+ val currency = tlvReader.getUShort(ContextSpecificTag(TAG_CURRENCY))
+ val decimalPoints = tlvReader.getUByte(ContextSpecificTag(TAG_DECIMAL_POINTS))
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterCurrencyStruct(currency, decimalPoints)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt
new file mode 100644
index 0000000..6d871ff
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayEntryStruct.kt
@@ -0,0 +1,105 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterDayEntryStruct(
+ val dayEntryID: UInt,
+ val startTime: UShort,
+ val duration: Optional<UShort>,
+ val randomizationOffset: Optional<Short>,
+ val randomizationType: Optional<UByte>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterDayEntryStruct {\n")
+ append("\tdayEntryID : $dayEntryID\n")
+ append("\tstartTime : $startTime\n")
+ append("\tduration : $duration\n")
+ append("\trandomizationOffset : $randomizationOffset\n")
+ append("\trandomizationType : $randomizationType\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DAY_ENTRY_ID), dayEntryID)
+ put(ContextSpecificTag(TAG_START_TIME), startTime)
+ if (duration.isPresent) {
+ val optduration = duration.get()
+ put(ContextSpecificTag(TAG_DURATION), optduration)
+ }
+ if (randomizationOffset.isPresent) {
+ val optrandomizationOffset = randomizationOffset.get()
+ put(ContextSpecificTag(TAG_RANDOMIZATION_OFFSET), optrandomizationOffset)
+ }
+ if (randomizationType.isPresent) {
+ val optrandomizationType = randomizationType.get()
+ put(ContextSpecificTag(TAG_RANDOMIZATION_TYPE), optrandomizationType)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DAY_ENTRY_ID = 0
+ private const val TAG_START_TIME = 1
+ private const val TAG_DURATION = 2
+ private const val TAG_RANDOMIZATION_OFFSET = 3
+ private const val TAG_RANDOMIZATION_TYPE = 4
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterDayEntryStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dayEntryID = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_ENTRY_ID))
+ val startTime = tlvReader.getUShort(ContextSpecificTag(TAG_START_TIME))
+ val duration =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_DURATION))) {
+ Optional.of(tlvReader.getUShort(ContextSpecificTag(TAG_DURATION)))
+ } else {
+ Optional.empty()
+ }
+ val randomizationOffset =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_RANDOMIZATION_OFFSET))) {
+ Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_RANDOMIZATION_OFFSET)))
+ } else {
+ Optional.empty()
+ }
+ val randomizationType =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_RANDOMIZATION_TYPE))) {
+ Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_RANDOMIZATION_TYPE)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterDayEntryStruct(
+ dayEntryID,
+ startTime,
+ duration,
+ randomizationOffset,
+ randomizationType,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt
new file mode 100644
index 0000000..2b26c23
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayPatternStruct.kt
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterDayPatternStruct(
+ val dayPatternID: UInt,
+ val daysOfWeek: UByte,
+ val dayEntryIDs: List<UInt>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterDayPatternStruct {\n")
+ append("\tdayPatternID : $dayPatternID\n")
+ append("\tdaysOfWeek : $daysOfWeek\n")
+ append("\tdayEntryIDs : $dayEntryIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DAY_PATTERN_ID), dayPatternID)
+ put(ContextSpecificTag(TAG_DAYS_OF_WEEK), daysOfWeek)
+ startArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ for (item in dayEntryIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DAY_PATTERN_ID = 0
+ private const val TAG_DAYS_OF_WEEK = 1
+ private const val TAG_DAY_ENTRY_I_DS = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterDayPatternStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dayPatternID = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_PATTERN_ID))
+ val daysOfWeek = tlvReader.getUByte(ContextSpecificTag(TAG_DAYS_OF_WEEK))
+ val dayEntryIDs =
+ buildList<UInt> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterDayPatternStruct(dayPatternID, daysOfWeek, dayEntryIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayStruct.kt
new file mode 100644
index 0000000..e490b3c
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterDayStruct.kt
@@ -0,0 +1,76 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterDayStruct(
+ val date: UInt,
+ val dayType: UByte,
+ val dayEntryIDs: List<UInt>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterDayStruct {\n")
+ append("\tdate : $date\n")
+ append("\tdayType : $dayType\n")
+ append("\tdayEntryIDs : $dayEntryIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DATE), date)
+ put(ContextSpecificTag(TAG_DAY_TYPE), dayType)
+ startArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ for (item in dayEntryIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DATE = 0
+ private const val TAG_DAY_TYPE = 1
+ private const val TAG_DAY_ENTRY_I_DS = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterDayStruct {
+ tlvReader.enterStructure(tlvTag)
+ val date = tlvReader.getUInt(ContextSpecificTag(TAG_DATE))
+ val dayType = tlvReader.getUByte(ContextSpecificTag(TAG_DAY_TYPE))
+ val dayEntryIDs =
+ buildList<UInt> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterDayStruct(date, dayType, dayEntryIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt
new file mode 100644
index 0000000..3a8c193
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPeakPeriodStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterPeakPeriodStruct(val severity: UByte, val peakPeriod: UShort) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterPeakPeriodStruct {\n")
+ append("\tseverity : $severity\n")
+ append("\tpeakPeriod : $peakPeriod\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_SEVERITY), severity)
+ put(ContextSpecificTag(TAG_PEAK_PERIOD), peakPeriod)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_SEVERITY = 0
+ private const val TAG_PEAK_PERIOD = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterPeakPeriodStruct {
+ tlvReader.enterStructure(tlvTag)
+ val severity = tlvReader.getUByte(ContextSpecificTag(TAG_SEVERITY))
+ val peakPeriod = tlvReader.getUShort(ContextSpecificTag(TAG_PEAK_PERIOD))
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterPeakPeriodStruct(severity, peakPeriod)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt
new file mode 100644
index 0000000..3c49308
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterPowerThresholdStruct.kt
@@ -0,0 +1,95 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterPowerThresholdStruct(
+ val powerThreshold: Optional<Long>,
+ val apparentPowerThreshold: Optional<Long>,
+ val powerThresholdSource: UByte?,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterPowerThresholdStruct {\n")
+ append("\tpowerThreshold : $powerThreshold\n")
+ append("\tapparentPowerThreshold : $apparentPowerThreshold\n")
+ append("\tpowerThresholdSource : $powerThresholdSource\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (powerThreshold.isPresent) {
+ val optpowerThreshold = powerThreshold.get()
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD), optpowerThreshold)
+ }
+ if (apparentPowerThreshold.isPresent) {
+ val optapparentPowerThreshold = apparentPowerThreshold.get()
+ put(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD), optapparentPowerThreshold)
+ }
+ if (powerThresholdSource != null) {
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE), powerThresholdSource)
+ } else {
+ putNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_POWER_THRESHOLD = 0
+ private const val TAG_APPARENT_POWER_THRESHOLD = 1
+ private const val TAG_POWER_THRESHOLD_SOURCE = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterPowerThresholdStruct {
+ tlvReader.enterStructure(tlvTag)
+ val powerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val apparentPowerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val powerThresholdSource =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterPowerThresholdStruct(
+ powerThreshold,
+ apparentPowerThreshold,
+ powerThresholdSource,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt
new file mode 100644
index 0000000..bd91b1a
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffComponentStruct.kt
@@ -0,0 +1,209 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffComponentStruct(
+ val tariffComponentID: UInt,
+ val price: Optional<CommodityTariffClusterTariffPriceStruct>?,
+ val friendlyCredit: Optional<Boolean>,
+ val auxiliaryLoad: Optional<CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct>,
+ val peakPeriod: Optional<CommodityTariffClusterPeakPeriodStruct>,
+ val powerThreshold: Optional<CommodityTariffClusterPowerThresholdStruct>,
+ val threshold: UInt?,
+ val label: Optional<String>?,
+ val predicted: Optional<Boolean>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffComponentStruct {\n")
+ append("\ttariffComponentID : $tariffComponentID\n")
+ append("\tprice : $price\n")
+ append("\tfriendlyCredit : $friendlyCredit\n")
+ append("\tauxiliaryLoad : $auxiliaryLoad\n")
+ append("\tpeakPeriod : $peakPeriod\n")
+ append("\tpowerThreshold : $powerThreshold\n")
+ append("\tthreshold : $threshold\n")
+ append("\tlabel : $label\n")
+ append("\tpredicted : $predicted\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID), tariffComponentID)
+ if (price != null) {
+ if (price.isPresent) {
+ val optprice = price.get()
+ optprice.toTlv(ContextSpecificTag(TAG_PRICE), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_PRICE))
+ }
+ if (friendlyCredit.isPresent) {
+ val optfriendlyCredit = friendlyCredit.get()
+ put(ContextSpecificTag(TAG_FRIENDLY_CREDIT), optfriendlyCredit)
+ }
+ if (auxiliaryLoad.isPresent) {
+ val optauxiliaryLoad = auxiliaryLoad.get()
+ optauxiliaryLoad.toTlv(ContextSpecificTag(TAG_AUXILIARY_LOAD), this)
+ }
+ if (peakPeriod.isPresent) {
+ val optpeakPeriod = peakPeriod.get()
+ optpeakPeriod.toTlv(ContextSpecificTag(TAG_PEAK_PERIOD), this)
+ }
+ if (powerThreshold.isPresent) {
+ val optpowerThreshold = powerThreshold.get()
+ optpowerThreshold.toTlv(ContextSpecificTag(TAG_POWER_THRESHOLD), this)
+ }
+ if (threshold != null) {
+ put(ContextSpecificTag(TAG_THRESHOLD), threshold)
+ } else {
+ putNull(ContextSpecificTag(TAG_THRESHOLD))
+ }
+ if (label != null) {
+ if (label.isPresent) {
+ val optlabel = label.get()
+ put(ContextSpecificTag(TAG_LABEL), optlabel)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_LABEL))
+ }
+ if (predicted.isPresent) {
+ val optpredicted = predicted.get()
+ put(ContextSpecificTag(TAG_PREDICTED), optpredicted)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TARIFF_COMPONENT_ID = 0
+ private const val TAG_PRICE = 1
+ private const val TAG_FRIENDLY_CREDIT = 2
+ private const val TAG_AUXILIARY_LOAD = 3
+ private const val TAG_PEAK_PERIOD = 4
+ private const val TAG_POWER_THRESHOLD = 5
+ private const val TAG_THRESHOLD = 6
+ private const val TAG_LABEL = 7
+ private const val TAG_PREDICTED = 8
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffComponentStruct {
+ tlvReader.enterStructure(tlvTag)
+ val tariffComponentID = tlvReader.getUInt(ContextSpecificTag(TAG_TARIFF_COMPONENT_ID))
+ val price =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRICE))) {
+ Optional.of(
+ CommodityTariffClusterTariffPriceStruct.fromTlv(
+ ContextSpecificTag(TAG_PRICE),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PRICE))
+ null
+ }
+ val friendlyCredit =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_FRIENDLY_CREDIT))) {
+ Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_FRIENDLY_CREDIT)))
+ } else {
+ Optional.empty()
+ }
+ val auxiliaryLoad =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_AUXILIARY_LOAD))) {
+ Optional.of(
+ CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct.fromTlv(
+ ContextSpecificTag(TAG_AUXILIARY_LOAD),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val peakPeriod =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PEAK_PERIOD))) {
+ Optional.of(
+ CommodityTariffClusterPeakPeriodStruct.fromTlv(
+ ContextSpecificTag(TAG_PEAK_PERIOD),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val powerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_THRESHOLD))) {
+ Optional.of(
+ CommodityTariffClusterPowerThresholdStruct.fromTlv(
+ ContextSpecificTag(TAG_POWER_THRESHOLD),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ val threshold =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_THRESHOLD))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_THRESHOLD))
+ null
+ }
+ val label =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_LABEL))) {
+ Optional.of(tlvReader.getString(ContextSpecificTag(TAG_LABEL)))
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_LABEL))
+ null
+ }
+ val predicted =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PREDICTED))) {
+ Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_PREDICTED)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffComponentStruct(
+ tariffComponentID,
+ price,
+ friendlyCredit,
+ auxiliaryLoad,
+ peakPeriod,
+ powerThreshold,
+ threshold,
+ label,
+ predicted,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt
new file mode 100644
index 0000000..1649474
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffInformationStruct.kt
@@ -0,0 +1,127 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffInformationStruct(
+ val tariffLabel: String?,
+ val providerName: String?,
+ val currency: Optional<CommodityTariffClusterCurrencyStruct>?,
+ val blockMode: UByte?,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffInformationStruct {\n")
+ append("\ttariffLabel : $tariffLabel\n")
+ append("\tproviderName : $providerName\n")
+ append("\tcurrency : $currency\n")
+ append("\tblockMode : $blockMode\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (tariffLabel != null) {
+ put(ContextSpecificTag(TAG_TARIFF_LABEL), tariffLabel)
+ } else {
+ putNull(ContextSpecificTag(TAG_TARIFF_LABEL))
+ }
+ if (providerName != null) {
+ put(ContextSpecificTag(TAG_PROVIDER_NAME), providerName)
+ } else {
+ putNull(ContextSpecificTag(TAG_PROVIDER_NAME))
+ }
+ if (currency != null) {
+ if (currency.isPresent) {
+ val optcurrency = currency.get()
+ optcurrency.toTlv(ContextSpecificTag(TAG_CURRENCY), this)
+ }
+ } else {
+ putNull(ContextSpecificTag(TAG_CURRENCY))
+ }
+ if (blockMode != null) {
+ put(ContextSpecificTag(TAG_BLOCK_MODE), blockMode)
+ } else {
+ putNull(ContextSpecificTag(TAG_BLOCK_MODE))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_TARIFF_LABEL = 0
+ private const val TAG_PROVIDER_NAME = 1
+ private const val TAG_CURRENCY = 2
+ private const val TAG_BLOCK_MODE = 3
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffInformationStruct {
+ tlvReader.enterStructure(tlvTag)
+ val tariffLabel =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(ContextSpecificTag(TAG_TARIFF_LABEL))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_TARIFF_LABEL))
+ null
+ }
+ val providerName =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(ContextSpecificTag(TAG_PROVIDER_NAME))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_PROVIDER_NAME))
+ null
+ }
+ val currency =
+ if (!tlvReader.isNull()) {
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_CURRENCY))) {
+ Optional.of(
+ CommodityTariffClusterCurrencyStruct.fromTlv(
+ ContextSpecificTag(TAG_CURRENCY),
+ tlvReader,
+ )
+ )
+ } else {
+ Optional.empty()
+ }
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_CURRENCY))
+ null
+ }
+ val blockMode =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_BLOCK_MODE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_BLOCK_MODE))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffInformationStruct(
+ tariffLabel,
+ providerName,
+ currency,
+ blockMode,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt
new file mode 100644
index 0000000..5769ca7
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPeriodStruct.kt
@@ -0,0 +1,97 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffPeriodStruct(
+ val label: String?,
+ val dayEntryIDs: List<UInt>,
+ val tariffComponentIDs: List<UInt>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffPeriodStruct {\n")
+ append("\tlabel : $label\n")
+ append("\tdayEntryIDs : $dayEntryIDs\n")
+ append("\ttariffComponentIDs : $tariffComponentIDs\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (label != null) {
+ put(ContextSpecificTag(TAG_LABEL), label)
+ } else {
+ putNull(ContextSpecificTag(TAG_LABEL))
+ }
+ startArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ for (item in dayEntryIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ startArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ for (item in tariffComponentIDs.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_LABEL = 0
+ private const val TAG_DAY_ENTRY_I_DS = 1
+ private const val TAG_TARIFF_COMPONENT_I_DS = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffPeriodStruct {
+ tlvReader.enterStructure(tlvTag)
+ val label =
+ if (!tlvReader.isNull()) {
+ tlvReader.getString(ContextSpecificTag(TAG_LABEL))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_LABEL))
+ null
+ }
+ val dayEntryIDs =
+ buildList<UInt> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_DAY_ENTRY_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+ val tariffComponentIDs =
+ buildList<UInt> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_TARIFF_COMPONENT_I_DS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffPeriodStruct(label, dayEntryIDs, tariffComponentIDs)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt
new file mode 100644
index 0000000..a39f2dd
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/CommodityTariffClusterTariffPriceStruct.kt
@@ -0,0 +1,81 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class CommodityTariffClusterTariffPriceStruct(
+ val priceType: UByte,
+ val price: Optional<Long>,
+ val priceLevel: Optional<Short>,
+) {
+ override fun toString(): String = buildString {
+ append("CommodityTariffClusterTariffPriceStruct {\n")
+ append("\tpriceType : $priceType\n")
+ append("\tprice : $price\n")
+ append("\tpriceLevel : $priceLevel\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_PRICE_TYPE), priceType)
+ if (price.isPresent) {
+ val optprice = price.get()
+ put(ContextSpecificTag(TAG_PRICE), optprice)
+ }
+ if (priceLevel.isPresent) {
+ val optpriceLevel = priceLevel.get()
+ put(ContextSpecificTag(TAG_PRICE_LEVEL), optpriceLevel)
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_PRICE_TYPE = 0
+ private const val TAG_PRICE = 1
+ private const val TAG_PRICE_LEVEL = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): CommodityTariffClusterTariffPriceStruct {
+ tlvReader.enterStructure(tlvTag)
+ val priceType = tlvReader.getUByte(ContextSpecificTag(TAG_PRICE_TYPE))
+ val price =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRICE))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_PRICE)))
+ } else {
+ Optional.empty()
+ }
+ val priceLevel =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRICE_LEVEL))) {
+ Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_PRICE_LEVEL)))
+ } else {
+ Optional.empty()
+ }
+
+ tlvReader.exitContainer()
+
+ return CommodityTariffClusterTariffPriceStruct(priceType, price, priceLevel)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt
new file mode 100644
index 0000000..9e06183
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/MeterIdentificationClusterPowerThresholdStruct.kt
@@ -0,0 +1,95 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import java.util.Optional
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class MeterIdentificationClusterPowerThresholdStruct(
+ val powerThreshold: Optional<Long>,
+ val apparentPowerThreshold: Optional<Long>,
+ val powerThresholdSource: UByte?,
+) {
+ override fun toString(): String = buildString {
+ append("MeterIdentificationClusterPowerThresholdStruct {\n")
+ append("\tpowerThreshold : $powerThreshold\n")
+ append("\tapparentPowerThreshold : $apparentPowerThreshold\n")
+ append("\tpowerThresholdSource : $powerThresholdSource\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ if (powerThreshold.isPresent) {
+ val optpowerThreshold = powerThreshold.get()
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD), optpowerThreshold)
+ }
+ if (apparentPowerThreshold.isPresent) {
+ val optapparentPowerThreshold = apparentPowerThreshold.get()
+ put(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD), optapparentPowerThreshold)
+ }
+ if (powerThresholdSource != null) {
+ put(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE), powerThresholdSource)
+ } else {
+ putNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_POWER_THRESHOLD = 0
+ private const val TAG_APPARENT_POWER_THRESHOLD = 1
+ private const val TAG_POWER_THRESHOLD_SOURCE = 2
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): MeterIdentificationClusterPowerThresholdStruct {
+ tlvReader.enterStructure(tlvTag)
+ val powerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val apparentPowerThreshold =
+ if (tlvReader.isNextTag(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD))) {
+ Optional.of(tlvReader.getLong(ContextSpecificTag(TAG_APPARENT_POWER_THRESHOLD)))
+ } else {
+ Optional.empty()
+ }
+ val powerThresholdSource =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POWER_THRESHOLD_SOURCE))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return MeterIdentificationClusterPowerThresholdStruct(
+ powerThreshold,
+ apparentPowerThreshold,
+ powerThresholdSource,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index b2d2718..6d90a16 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -20304,6 +20304,692 @@
}
break;
}
+ case app::Clusters::CommodityPrice::Id: {
+ using namespace app::Clusters::CommodityPrice;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::TariffUnit::Id: {
+ using TypeInfo = Attributes::TariffUnit::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::Currency::Id: {
+ using TypeInfo = Attributes::Currency::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_currency;
+ std::string value_currencyClassName = "java/lang/Integer";
+ std::string value_currencyCtorSignature = "(I)V";
+ jint jnivalue_currency = static_cast<jint>(cppValue.Value().currency);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_currencyClassName.c_str(), value_currencyCtorSignature.c_str(), jnivalue_currency, value_currency);
+ jobject value_decimalPoints;
+ std::string value_decimalPointsClassName = "java/lang/Integer";
+ std::string value_decimalPointsCtorSignature = "(I)V";
+ jint jnivalue_decimalPoints = static_cast<jint>(cppValue.Value().decimalPoints);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_decimalPointsClassName.c_str(),
+ value_decimalPointsCtorSignature.c_str(),
+ jnivalue_decimalPoints, value_decimalPoints);
+
+ {
+ jclass currencyStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct", currencyStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCurrencyStruct");
+ return nullptr;
+ }
+
+ jmethodID currencyStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(env, currencyStructStructClass_1, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ ¤cyStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || currencyStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCurrencyStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(currencyStructStructClass_1, currencyStructStructCtor_1, value_currency,
+ value_decimalPoints);
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentPrice::Id: {
+ using TypeInfo = Attributes::CurrentPrice::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_periodStart;
+ std::string value_periodStartClassName = "java/lang/Long";
+ std::string value_periodStartCtorSignature = "(J)V";
+ jlong jnivalue_periodStart = static_cast<jlong>(cppValue.Value().periodStart);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(value_periodStartClassName.c_str(),
+ value_periodStartCtorSignature.c_str(),
+ jnivalue_periodStart, value_periodStart);
+ jobject value_periodEnd;
+ if (cppValue.Value().periodEnd.IsNull())
+ {
+ value_periodEnd = nullptr;
+ }
+ else
+ {
+ std::string value_periodEndClassName = "java/lang/Long";
+ std::string value_periodEndCtorSignature = "(J)V";
+ jlong jnivalue_periodEnd = static_cast<jlong>(cppValue.Value().periodEnd.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(value_periodEndClassName.c_str(),
+ value_periodEndCtorSignature.c_str(),
+ jnivalue_periodEnd, value_periodEnd);
+ }
+ jobject value_price;
+ jobject value_price_amount;
+ std::string value_price_amountClassName = "java/lang/Long";
+ std::string value_price_amountCtorSignature = "(J)V";
+ jlong jnivalue_price_amount = static_cast<jlong>(cppValue.Value().price.amount);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(value_price_amountClassName.c_str(),
+ value_price_amountCtorSignature.c_str(),
+ jnivalue_price_amount, value_price_amount);
+ jobject value_price_currency;
+ jobject value_price_currency_currency;
+ std::string value_price_currency_currencyClassName = "java/lang/Integer";
+ std::string value_price_currency_currencyCtorSignature = "(I)V";
+ jint jnivalue_price_currency_currency = static_cast<jint>(cppValue.Value().price.currency.currency);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_price_currency_currencyClassName.c_str(), value_price_currency_currencyCtorSignature.c_str(),
+ jnivalue_price_currency_currency, value_price_currency_currency);
+ jobject value_price_currency_decimalPoints;
+ std::string value_price_currency_decimalPointsClassName = "java/lang/Integer";
+ std::string value_price_currency_decimalPointsCtorSignature = "(I)V";
+ jint jnivalue_price_currency_decimalPoints = static_cast<jint>(cppValue.Value().price.currency.decimalPoints);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_price_currency_decimalPointsClassName.c_str(), value_price_currency_decimalPointsCtorSignature.c_str(),
+ jnivalue_price_currency_decimalPoints, value_price_currency_decimalPoints);
+
+ {
+ jclass currencyStructStructClass_3;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct", currencyStructStructClass_3);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCurrencyStruct");
+ return nullptr;
+ }
+
+ jmethodID currencyStructStructCtor_3;
+ err = chip::JniReferences::GetInstance().FindMethod(env, currencyStructStructClass_3, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ ¤cyStructStructCtor_3);
+ if (err != CHIP_NO_ERROR || currencyStructStructCtor_3 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCurrencyStruct constructor");
+ return nullptr;
+ }
+
+ value_price_currency = env->NewObject(currencyStructStructClass_3, currencyStructStructCtor_3,
+ value_price_currency_currency, value_price_currency_decimalPoints);
+ }
+
+ {
+ jclass priceStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterPriceStruct", priceStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID priceStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, priceStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct;)V",
+ &priceStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || priceStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterPriceStruct constructor");
+ return nullptr;
+ }
+
+ value_price =
+ env->NewObject(priceStructStructClass_2, priceStructStructCtor_2, value_price_amount, value_price_currency);
+ }
+ jobject value_description;
+ if (!cppValue.Value().description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_description);
+ }
+ else
+ {
+ jobject value_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().description.Value(),
+ value_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(value_descriptionInsideOptional, value_description);
+ }
+ jobject value_components;
+ if (!cppValue.Value().components.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_components);
+ }
+ else
+ {
+ jobject value_componentsInsideOptional;
+ chip::JniReferences::GetInstance().CreateArrayList(value_componentsInsideOptional);
+
+ auto iter_value_componentsInsideOptional_3 = cppValue.Value().components.Value().begin();
+ while (iter_value_componentsInsideOptional_3.Next())
+ {
+ auto & entry_3 = iter_value_componentsInsideOptional_3.GetValue();
+ jobject newElement_3;
+ jobject newElement_3_price;
+ std::string newElement_3_priceClassName = "java/lang/Long";
+ std::string newElement_3_priceCtorSignature = "(J)V";
+ jlong jninewElement_3_price = static_cast<jlong>(entry_3.price);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_3_priceClassName.c_str(),
+ newElement_3_priceCtorSignature.c_str(),
+ jninewElement_3_price, newElement_3_price);
+ jobject newElement_3_source;
+ std::string newElement_3_sourceClassName = "java/lang/Integer";
+ std::string newElement_3_sourceCtorSignature = "(I)V";
+ jint jninewElement_3_source = static_cast<jint>(entry_3.source);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_3_sourceClassName.c_str(),
+ newElement_3_sourceCtorSignature.c_str(),
+ jninewElement_3_source, newElement_3_source);
+ jobject newElement_3_description;
+ if (!entry_3.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_description);
+ }
+ else
+ {
+ jobject newElement_3_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(
+ entry_3.description.Value(), newElement_3_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(newElement_3_descriptionInsideOptional,
+ newElement_3_description);
+ }
+ jobject newElement_3_tariffComponentID;
+ if (!entry_3.tariffComponentID.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_tariffComponentID);
+ }
+ else
+ {
+ jobject newElement_3_tariffComponentIDInsideOptional;
+ std::string newElement_3_tariffComponentIDInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_3_tariffComponentIDInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_3_tariffComponentIDInsideOptional =
+ static_cast<jlong>(entry_3.tariffComponentID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3_tariffComponentIDInsideOptionalClassName.c_str(),
+ newElement_3_tariffComponentIDInsideOptionalCtorSignature.c_str(),
+ jninewElement_3_tariffComponentIDInsideOptional, newElement_3_tariffComponentIDInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_3_tariffComponentIDInsideOptional,
+ newElement_3_tariffComponentID);
+ }
+
+ {
+ jclass commodityPriceComponentStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct",
+ commodityPriceComponentStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl,
+ "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceComponentStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceComponentStructStructClass_4, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceComponentStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || commodityPriceComponentStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(
+ Zcl,
+ "Could not find ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_3 = env->NewObject(
+ commodityPriceComponentStructStructClass_4, commodityPriceComponentStructStructCtor_4,
+ newElement_3_price, newElement_3_source, newElement_3_description, newElement_3_tariffComponentID);
+ }
+ chip::JniReferences::GetInstance().AddToList(value_componentsInsideOptional, newElement_3);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(value_componentsInsideOptional, value_components);
+ }
+
+ {
+ jclass commodityPriceStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceStruct",
+ commodityPriceStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceStructStructClass_1, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/"
+ "ChipStructs$CommodityPriceClusterPriceStruct;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || commodityPriceStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCommodityPriceStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(commodityPriceStructStructClass_1, commodityPriceStructStructCtor_1, value_periodStart,
+ value_periodEnd, value_price, value_description, value_components);
+ }
+ }
+ return value;
+ }
+ case Attributes::PriceForecast::Id: {
+ using TypeInfo = Attributes::PriceForecast::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ jobject newElement_0_periodStart;
+ std::string newElement_0_periodStartClassName = "java/lang/Long";
+ std::string newElement_0_periodStartCtorSignature = "(J)V";
+ jlong jninewElement_0_periodStart = static_cast<jlong>(entry_0.periodStart);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_periodStartClassName.c_str(),
+ newElement_0_periodStartCtorSignature.c_str(),
+ jninewElement_0_periodStart, newElement_0_periodStart);
+ jobject newElement_0_periodEnd;
+ if (entry_0.periodEnd.IsNull())
+ {
+ newElement_0_periodEnd = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_periodEndClassName = "java/lang/Long";
+ std::string newElement_0_periodEndCtorSignature = "(J)V";
+ jlong jninewElement_0_periodEnd = static_cast<jlong>(entry_0.periodEnd.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_periodEndClassName.c_str(),
+ newElement_0_periodEndCtorSignature.c_str(),
+ jninewElement_0_periodEnd, newElement_0_periodEnd);
+ }
+ jobject newElement_0_price;
+ jobject newElement_0_price_amount;
+ std::string newElement_0_price_amountClassName = "java/lang/Long";
+ std::string newElement_0_price_amountCtorSignature = "(J)V";
+ jlong jninewElement_0_price_amount = static_cast<jlong>(entry_0.price.amount);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0_price_amountClassName.c_str(), newElement_0_price_amountCtorSignature.c_str(),
+ jninewElement_0_price_amount, newElement_0_price_amount);
+ jobject newElement_0_price_currency;
+ jobject newElement_0_price_currency_currency;
+ std::string newElement_0_price_currency_currencyClassName = "java/lang/Integer";
+ std::string newElement_0_price_currency_currencyCtorSignature = "(I)V";
+ jint jninewElement_0_price_currency_currency = static_cast<jint>(entry_0.price.currency.currency);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_0_price_currency_currencyClassName.c_str(),
+ newElement_0_price_currency_currencyCtorSignature.c_str(), jninewElement_0_price_currency_currency,
+ newElement_0_price_currency_currency);
+ jobject newElement_0_price_currency_decimalPoints;
+ std::string newElement_0_price_currency_decimalPointsClassName = "java/lang/Integer";
+ std::string newElement_0_price_currency_decimalPointsCtorSignature = "(I)V";
+ jint jninewElement_0_price_currency_decimalPoints = static_cast<jint>(entry_0.price.currency.decimalPoints);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_0_price_currency_decimalPointsClassName.c_str(),
+ newElement_0_price_currency_decimalPointsCtorSignature.c_str(), jninewElement_0_price_currency_decimalPoints,
+ newElement_0_price_currency_decimalPoints);
+
+ {
+ jclass currencyStructStructClass_3;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct", currencyStructStructClass_3);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCurrencyStruct");
+ return nullptr;
+ }
+
+ jmethodID currencyStructStructCtor_3;
+ err = chip::JniReferences::GetInstance().FindMethod(env, currencyStructStructClass_3, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ ¤cyStructStructCtor_3);
+ if (err != CHIP_NO_ERROR || currencyStructStructCtor_3 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCurrencyStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0_price_currency =
+ env->NewObject(currencyStructStructClass_3, currencyStructStructCtor_3,
+ newElement_0_price_currency_currency, newElement_0_price_currency_decimalPoints);
+ }
+
+ {
+ jclass priceStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterPriceStruct", priceStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID priceStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, priceStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct;)V",
+ &priceStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || priceStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0_price = env->NewObject(priceStructStructClass_2, priceStructStructCtor_2,
+ newElement_0_price_amount, newElement_0_price_currency);
+ }
+ jobject newElement_0_description;
+ if (!entry_0.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_description);
+ }
+ else
+ {
+ jobject newElement_0_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description.Value(),
+ newElement_0_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(newElement_0_descriptionInsideOptional,
+ newElement_0_description);
+ }
+ jobject newElement_0_components;
+ if (!entry_0.components.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_components);
+ }
+ else
+ {
+ jobject newElement_0_componentsInsideOptional;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_0_componentsInsideOptional);
+
+ auto iter_newElement_0_componentsInsideOptional_3 = entry_0.components.Value().begin();
+ while (iter_newElement_0_componentsInsideOptional_3.Next())
+ {
+ auto & entry_3 = iter_newElement_0_componentsInsideOptional_3.GetValue();
+ jobject newElement_3;
+ jobject newElement_3_price;
+ std::string newElement_3_priceClassName = "java/lang/Long";
+ std::string newElement_3_priceCtorSignature = "(J)V";
+ jlong jninewElement_3_price = static_cast<jlong>(entry_3.price);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_3_priceClassName.c_str(),
+ newElement_3_priceCtorSignature.c_str(),
+ jninewElement_3_price, newElement_3_price);
+ jobject newElement_3_source;
+ std::string newElement_3_sourceClassName = "java/lang/Integer";
+ std::string newElement_3_sourceCtorSignature = "(I)V";
+ jint jninewElement_3_source = static_cast<jint>(entry_3.source);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_3_sourceClassName.c_str(),
+ newElement_3_sourceCtorSignature.c_str(),
+ jninewElement_3_source, newElement_3_source);
+ jobject newElement_3_description;
+ if (!entry_3.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_description);
+ }
+ else
+ {
+ jobject newElement_3_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(
+ entry_3.description.Value(), newElement_3_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(newElement_3_descriptionInsideOptional,
+ newElement_3_description);
+ }
+ jobject newElement_3_tariffComponentID;
+ if (!entry_3.tariffComponentID.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_tariffComponentID);
+ }
+ else
+ {
+ jobject newElement_3_tariffComponentIDInsideOptional;
+ std::string newElement_3_tariffComponentIDInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_3_tariffComponentIDInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_3_tariffComponentIDInsideOptional =
+ static_cast<jlong>(entry_3.tariffComponentID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3_tariffComponentIDInsideOptionalClassName.c_str(),
+ newElement_3_tariffComponentIDInsideOptionalCtorSignature.c_str(),
+ jninewElement_3_tariffComponentIDInsideOptional, newElement_3_tariffComponentIDInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_3_tariffComponentIDInsideOptional,
+ newElement_3_tariffComponentID);
+ }
+
+ {
+ jclass commodityPriceComponentStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct",
+ commodityPriceComponentStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl,
+ "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceComponentStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceComponentStructStructClass_4, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceComponentStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || commodityPriceComponentStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(
+ Zcl,
+ "Could not find ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_3 = env->NewObject(
+ commodityPriceComponentStructStructClass_4, commodityPriceComponentStructStructCtor_4,
+ newElement_3_price, newElement_3_source, newElement_3_description, newElement_3_tariffComponentID);
+ }
+ chip::JniReferences::GetInstance().AddToList(newElement_0_componentsInsideOptional, newElement_3);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_0_componentsInsideOptional,
+ newElement_0_components);
+ }
+
+ {
+ jclass commodityPriceStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceStruct",
+ commodityPriceStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceStructStructClass_1, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/"
+ "ChipStructs$CommodityPriceClusterPriceStruct;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || commodityPriceStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCommodityPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0 = env->NewObject(commodityPriceStructStructClass_1, commodityPriceStructStructCtor_1,
+ newElement_0_periodStart, newElement_0_periodEnd, newElement_0_price,
+ newElement_0_description, newElement_0_components);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::DemandResponseLoadControl::Id: {
using namespace app::Clusters::DemandResponseLoadControl;
switch (aPath.mAttributeId)
@@ -43887,6 +44573,2579 @@
}
break;
}
+ case app::Clusters::CommodityTariff::Id: {
+ using namespace app::Clusters::CommodityTariff;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::TariffInfo::Id: {
+ using TypeInfo = Attributes::TariffInfo::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_tariffLabel;
+ if (cppValue.Value().tariffLabel.IsNull())
+ {
+ value_tariffLabel = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().tariffLabel.Value(),
+ value_tariffLabel));
+ }
+ jobject value_providerName;
+ if (cppValue.Value().providerName.IsNull())
+ {
+ value_providerName = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value().providerName.Value(),
+ value_providerName));
+ }
+ jobject value_currency;
+ if (!cppValue.Value().currency.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_currency);
+ }
+ else
+ {
+ jobject value_currencyInsideOptional;
+ if (cppValue.Value().currency.Value().IsNull())
+ {
+ value_currencyInsideOptional = nullptr;
+ }
+ else
+ {
+ jobject value_currencyInsideOptional_currency;
+ std::string value_currencyInsideOptional_currencyClassName = "java/lang/Integer";
+ std::string value_currencyInsideOptional_currencyCtorSignature = "(I)V";
+ jint jnivalue_currencyInsideOptional_currency =
+ static_cast<jint>(cppValue.Value().currency.Value().Value().currency);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_currencyInsideOptional_currencyClassName.c_str(),
+ value_currencyInsideOptional_currencyCtorSignature.c_str(), jnivalue_currencyInsideOptional_currency,
+ value_currencyInsideOptional_currency);
+ jobject value_currencyInsideOptional_decimalPoints;
+ std::string value_currencyInsideOptional_decimalPointsClassName = "java/lang/Integer";
+ std::string value_currencyInsideOptional_decimalPointsCtorSignature = "(I)V";
+ jint jnivalue_currencyInsideOptional_decimalPoints =
+ static_cast<jint>(cppValue.Value().currency.Value().Value().decimalPoints);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_currencyInsideOptional_decimalPointsClassName.c_str(),
+ value_currencyInsideOptional_decimalPointsCtorSignature.c_str(),
+ jnivalue_currencyInsideOptional_decimalPoints, value_currencyInsideOptional_decimalPoints);
+
+ {
+ jclass currencyStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterCurrencyStruct",
+ currencyStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterCurrencyStruct");
+ return nullptr;
+ }
+
+ jmethodID currencyStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(env, currencyStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ ¤cyStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || currencyStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterCurrencyStruct constructor");
+ return nullptr;
+ }
+
+ value_currencyInsideOptional =
+ env->NewObject(currencyStructStructClass_4, currencyStructStructCtor_4,
+ value_currencyInsideOptional_currency, value_currencyInsideOptional_decimalPoints);
+ }
+ }
+ chip::JniReferences::GetInstance().CreateOptional(value_currencyInsideOptional, value_currency);
+ }
+ jobject value_blockMode;
+ if (cppValue.Value().blockMode.IsNull())
+ {
+ value_blockMode = nullptr;
+ }
+ else
+ {
+ std::string value_blockModeClassName = "java/lang/Integer";
+ std::string value_blockModeCtorSignature = "(I)V";
+ jint jnivalue_blockMode = static_cast<jint>(cppValue.Value().blockMode.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(value_blockModeClassName.c_str(),
+ value_blockModeCtorSignature.c_str(),
+ jnivalue_blockMode, value_blockMode);
+ }
+
+ {
+ jclass tariffInformationStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffInformationStruct",
+ tariffInformationStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffInformationStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffInformationStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffInformationStructStructClass_1, "<init>",
+ "(Ljava/lang/String;Ljava/lang/String;Ljava/util/Optional;Ljava/lang/Integer;)V",
+ &tariffInformationStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || tariffInformationStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterTariffInformationStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(tariffInformationStructStructClass_1, tariffInformationStructStructCtor_1,
+ value_tariffLabel, value_providerName, value_currency, value_blockMode);
+ }
+ }
+ return value;
+ }
+ case Attributes::TariffUnit::Id: {
+ using TypeInfo = Attributes::TariffUnit::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::StartDate::Id: {
+ using TypeInfo = Attributes::StartDate::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::DayEntries::Id: {
+ using TypeInfo = Attributes::DayEntries::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_dayEntryID;
+ std::string newElement_1_dayEntryIDClassName = "java/lang/Long";
+ std::string newElement_1_dayEntryIDCtorSignature = "(J)V";
+ jlong jninewElement_1_dayEntryID = static_cast<jlong>(entry_1.dayEntryID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_dayEntryIDClassName.c_str(), newElement_1_dayEntryIDCtorSignature.c_str(),
+ jninewElement_1_dayEntryID, newElement_1_dayEntryID);
+ jobject newElement_1_startTime;
+ std::string newElement_1_startTimeClassName = "java/lang/Integer";
+ std::string newElement_1_startTimeCtorSignature = "(I)V";
+ jint jninewElement_1_startTime = static_cast<jint>(entry_1.startTime);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_1_startTimeClassName.c_str(),
+ newElement_1_startTimeCtorSignature.c_str(),
+ jninewElement_1_startTime, newElement_1_startTime);
+ jobject newElement_1_duration;
+ if (!entry_1.duration.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_duration);
+ }
+ else
+ {
+ jobject newElement_1_durationInsideOptional;
+ std::string newElement_1_durationInsideOptionalClassName = "java/lang/Integer";
+ std::string newElement_1_durationInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_1_durationInsideOptional = static_cast<jint>(entry_1.duration.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_durationInsideOptionalClassName.c_str(),
+ newElement_1_durationInsideOptionalCtorSignature.c_str(), jninewElement_1_durationInsideOptional,
+ newElement_1_durationInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_durationInsideOptional,
+ newElement_1_duration);
+ }
+ jobject newElement_1_randomizationOffset;
+ if (!entry_1.randomizationOffset.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_randomizationOffset);
+ }
+ else
+ {
+ jobject newElement_1_randomizationOffsetInsideOptional;
+ std::string newElement_1_randomizationOffsetInsideOptionalClassName = "java/lang/Integer";
+ std::string newElement_1_randomizationOffsetInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_1_randomizationOffsetInsideOptional =
+ static_cast<jint>(entry_1.randomizationOffset.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_randomizationOffsetInsideOptionalClassName.c_str(),
+ newElement_1_randomizationOffsetInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_randomizationOffsetInsideOptional, newElement_1_randomizationOffsetInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_randomizationOffsetInsideOptional,
+ newElement_1_randomizationOffset);
+ }
+ jobject newElement_1_randomizationType;
+ if (!entry_1.randomizationType.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_randomizationType);
+ }
+ else
+ {
+ jobject newElement_1_randomizationTypeInsideOptional;
+ std::string newElement_1_randomizationTypeInsideOptionalClassName = "java/lang/Integer";
+ std::string newElement_1_randomizationTypeInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_1_randomizationTypeInsideOptional = static_cast<jint>(entry_1.randomizationType.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_randomizationTypeInsideOptionalClassName.c_str(),
+ newElement_1_randomizationTypeInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_randomizationTypeInsideOptional, newElement_1_randomizationTypeInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_randomizationTypeInsideOptional,
+ newElement_1_randomizationType);
+ }
+
+ {
+ jclass dayEntryStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayEntryStruct",
+ dayEntryStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayEntryStruct");
+ return nullptr;
+ }
+
+ jmethodID dayEntryStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayEntryStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &dayEntryStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || dayEntryStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayEntryStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(dayEntryStructStructClass_2, dayEntryStructStructCtor_2,
+ newElement_1_dayEntryID, newElement_1_startTime, newElement_1_duration,
+ newElement_1_randomizationOffset, newElement_1_randomizationType);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::DayPatterns::Id: {
+ using TypeInfo = Attributes::DayPatterns::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_dayPatternID;
+ std::string newElement_1_dayPatternIDClassName = "java/lang/Long";
+ std::string newElement_1_dayPatternIDCtorSignature = "(J)V";
+ jlong jninewElement_1_dayPatternID = static_cast<jlong>(entry_1.dayPatternID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_dayPatternIDClassName.c_str(), newElement_1_dayPatternIDCtorSignature.c_str(),
+ jninewElement_1_dayPatternID, newElement_1_dayPatternID);
+ jobject newElement_1_daysOfWeek;
+ std::string newElement_1_daysOfWeekClassName = "java/lang/Integer";
+ std::string newElement_1_daysOfWeekCtorSignature = "(I)V";
+ jint jninewElement_1_daysOfWeek = static_cast<jint>(entry_1.daysOfWeek.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_1_daysOfWeekClassName.c_str(),
+ newElement_1_daysOfWeekCtorSignature.c_str(),
+ jninewElement_1_daysOfWeek, newElement_1_daysOfWeek);
+ jobject newElement_1_dayEntryIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_1_dayEntryIDs);
+
+ auto iter_newElement_1_dayEntryIDs_3 = entry_1.dayEntryIDs.begin();
+ while (iter_newElement_1_dayEntryIDs_3.Next())
+ {
+ auto & entry_3 = iter_newElement_1_dayEntryIDs_3.GetValue();
+ jobject newElement_3;
+ std::string newElement_3ClassName = "java/lang/Long";
+ std::string newElement_3CtorSignature = "(J)V";
+ jlong jninewElement_3 = static_cast<jlong>(entry_3);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3);
+ chip::JniReferences::GetInstance().AddToList(newElement_1_dayEntryIDs, newElement_3);
+ }
+
+ {
+ jclass dayPatternStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayPatternStruct",
+ dayPatternStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayPatternStruct");
+ return nullptr;
+ }
+
+ jmethodID dayPatternStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayPatternStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/ArrayList;)V", &dayPatternStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || dayPatternStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayPatternStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(dayPatternStructStructClass_2, dayPatternStructStructCtor_2,
+ newElement_1_dayPatternID, newElement_1_daysOfWeek, newElement_1_dayEntryIDs);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::CalendarPeriods::Id: {
+ using TypeInfo = Attributes::CalendarPeriods::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_startDate;
+ if (entry_1.startDate.IsNull())
+ {
+ newElement_1_startDate = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_startDateClassName = "java/lang/Long";
+ std::string newElement_1_startDateCtorSignature = "(J)V";
+ jlong jninewElement_1_startDate = static_cast<jlong>(entry_1.startDate.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_startDateClassName.c_str(), newElement_1_startDateCtorSignature.c_str(),
+ jninewElement_1_startDate, newElement_1_startDate);
+ }
+ jobject newElement_1_dayPatternIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_1_dayPatternIDs);
+
+ auto iter_newElement_1_dayPatternIDs_3 = entry_1.dayPatternIDs.begin();
+ while (iter_newElement_1_dayPatternIDs_3.Next())
+ {
+ auto & entry_3 = iter_newElement_1_dayPatternIDs_3.GetValue();
+ jobject newElement_3;
+ std::string newElement_3ClassName = "java/lang/Long";
+ std::string newElement_3CtorSignature = "(J)V";
+ jlong jninewElement_3 = static_cast<jlong>(entry_3);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3);
+ chip::JniReferences::GetInstance().AddToList(newElement_1_dayPatternIDs, newElement_3);
+ }
+
+ {
+ jclass calendarPeriodStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterCalendarPeriodStruct",
+ calendarPeriodStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterCalendarPeriodStruct");
+ return nullptr;
+ }
+
+ jmethodID calendarPeriodStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(env, calendarPeriodStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Ljava/util/ArrayList;)V",
+ &calendarPeriodStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || calendarPeriodStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterCalendarPeriodStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(calendarPeriodStructStructClass_2, calendarPeriodStructStructCtor_2,
+ newElement_1_startDate, newElement_1_dayPatternIDs);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::IndividualDays::Id: {
+ using TypeInfo = Attributes::IndividualDays::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_date;
+ std::string newElement_1_dateClassName = "java/lang/Long";
+ std::string newElement_1_dateCtorSignature = "(J)V";
+ jlong jninewElement_1_date = static_cast<jlong>(entry_1.date);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_1_dateClassName.c_str(),
+ newElement_1_dateCtorSignature.c_str(),
+ jninewElement_1_date, newElement_1_date);
+ jobject newElement_1_dayType;
+ std::string newElement_1_dayTypeClassName = "java/lang/Integer";
+ std::string newElement_1_dayTypeCtorSignature = "(I)V";
+ jint jninewElement_1_dayType = static_cast<jint>(entry_1.dayType);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_1_dayTypeClassName.c_str(),
+ newElement_1_dayTypeCtorSignature.c_str(),
+ jninewElement_1_dayType, newElement_1_dayType);
+ jobject newElement_1_dayEntryIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_1_dayEntryIDs);
+
+ auto iter_newElement_1_dayEntryIDs_3 = entry_1.dayEntryIDs.begin();
+ while (iter_newElement_1_dayEntryIDs_3.Next())
+ {
+ auto & entry_3 = iter_newElement_1_dayEntryIDs_3.GetValue();
+ jobject newElement_3;
+ std::string newElement_3ClassName = "java/lang/Long";
+ std::string newElement_3CtorSignature = "(J)V";
+ jlong jninewElement_3 = static_cast<jlong>(entry_3);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3);
+ chip::JniReferences::GetInstance().AddToList(newElement_1_dayEntryIDs, newElement_3);
+ }
+
+ {
+ jclass dayStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayStruct", dayStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayStruct");
+ return nullptr;
+ }
+
+ jmethodID dayStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayStructStructClass_2, "<init>", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/ArrayList;)V",
+ &dayStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || dayStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(dayStructStructClass_2, dayStructStructCtor_2, newElement_1_date,
+ newElement_1_dayType, newElement_1_dayEntryIDs);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentDay::Id: {
+ using TypeInfo = Attributes::CurrentDay::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_date;
+ std::string value_dateClassName = "java/lang/Long";
+ std::string value_dateCtorSignature = "(J)V";
+ jlong jnivalue_date = static_cast<jlong>(cppValue.Value().date);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_dateClassName.c_str(), value_dateCtorSignature.c_str(), jnivalue_date, value_date);
+ jobject value_dayType;
+ std::string value_dayTypeClassName = "java/lang/Integer";
+ std::string value_dayTypeCtorSignature = "(I)V";
+ jint jnivalue_dayType = static_cast<jint>(cppValue.Value().dayType);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_dayTypeClassName.c_str(), value_dayTypeCtorSignature.c_str(), jnivalue_dayType, value_dayType);
+ jobject value_dayEntryIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(value_dayEntryIDs);
+
+ auto iter_value_dayEntryIDs_2 = cppValue.Value().dayEntryIDs.begin();
+ while (iter_value_dayEntryIDs_2.Next())
+ {
+ auto & entry_2 = iter_value_dayEntryIDs_2.GetValue();
+ jobject newElement_2;
+ std::string newElement_2ClassName = "java/lang/Long";
+ std::string newElement_2CtorSignature = "(J)V";
+ jlong jninewElement_2 = static_cast<jlong>(entry_2);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2);
+ chip::JniReferences::GetInstance().AddToList(value_dayEntryIDs, newElement_2);
+ }
+
+ {
+ jclass dayStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayStruct", dayStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayStruct");
+ return nullptr;
+ }
+
+ jmethodID dayStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/ArrayList;)V",
+ &dayStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || dayStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayStruct constructor");
+ return nullptr;
+ }
+
+ value =
+ env->NewObject(dayStructStructClass_1, dayStructStructCtor_1, value_date, value_dayType, value_dayEntryIDs);
+ }
+ }
+ return value;
+ }
+ case Attributes::NextDay::Id: {
+ using TypeInfo = Attributes::NextDay::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_date;
+ std::string value_dateClassName = "java/lang/Long";
+ std::string value_dateCtorSignature = "(J)V";
+ jlong jnivalue_date = static_cast<jlong>(cppValue.Value().date);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_dateClassName.c_str(), value_dateCtorSignature.c_str(), jnivalue_date, value_date);
+ jobject value_dayType;
+ std::string value_dayTypeClassName = "java/lang/Integer";
+ std::string value_dayTypeCtorSignature = "(I)V";
+ jint jnivalue_dayType = static_cast<jint>(cppValue.Value().dayType);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_dayTypeClassName.c_str(), value_dayTypeCtorSignature.c_str(), jnivalue_dayType, value_dayType);
+ jobject value_dayEntryIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(value_dayEntryIDs);
+
+ auto iter_value_dayEntryIDs_2 = cppValue.Value().dayEntryIDs.begin();
+ while (iter_value_dayEntryIDs_2.Next())
+ {
+ auto & entry_2 = iter_value_dayEntryIDs_2.GetValue();
+ jobject newElement_2;
+ std::string newElement_2ClassName = "java/lang/Long";
+ std::string newElement_2CtorSignature = "(J)V";
+ jlong jninewElement_2 = static_cast<jlong>(entry_2);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_2ClassName.c_str(), newElement_2CtorSignature.c_str(), jninewElement_2, newElement_2);
+ chip::JniReferences::GetInstance().AddToList(value_dayEntryIDs, newElement_2);
+ }
+
+ {
+ jclass dayStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayStruct", dayStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayStruct");
+ return nullptr;
+ }
+
+ jmethodID dayStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/ArrayList;)V",
+ &dayStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || dayStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayStruct constructor");
+ return nullptr;
+ }
+
+ value =
+ env->NewObject(dayStructStructClass_1, dayStructStructCtor_1, value_date, value_dayType, value_dayEntryIDs);
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentDayEntry::Id: {
+ using TypeInfo = Attributes::CurrentDayEntry::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_dayEntryID;
+ std::string value_dayEntryIDClassName = "java/lang/Long";
+ std::string value_dayEntryIDCtorSignature = "(J)V";
+ jlong jnivalue_dayEntryID = static_cast<jlong>(cppValue.Value().dayEntryID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(value_dayEntryIDClassName.c_str(),
+ value_dayEntryIDCtorSignature.c_str(),
+ jnivalue_dayEntryID, value_dayEntryID);
+ jobject value_startTime;
+ std::string value_startTimeClassName = "java/lang/Integer";
+ std::string value_startTimeCtorSignature = "(I)V";
+ jint jnivalue_startTime = static_cast<jint>(cppValue.Value().startTime);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_startTimeClassName.c_str(), value_startTimeCtorSignature.c_str(), jnivalue_startTime, value_startTime);
+ jobject value_duration;
+ if (!cppValue.Value().duration.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_duration);
+ }
+ else
+ {
+ jobject value_durationInsideOptional;
+ std::string value_durationInsideOptionalClassName = "java/lang/Integer";
+ std::string value_durationInsideOptionalCtorSignature = "(I)V";
+ jint jnivalue_durationInsideOptional = static_cast<jint>(cppValue.Value().duration.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_durationInsideOptionalClassName.c_str(), value_durationInsideOptionalCtorSignature.c_str(),
+ jnivalue_durationInsideOptional, value_durationInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_durationInsideOptional, value_duration);
+ }
+ jobject value_randomizationOffset;
+ if (!cppValue.Value().randomizationOffset.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_randomizationOffset);
+ }
+ else
+ {
+ jobject value_randomizationOffsetInsideOptional;
+ std::string value_randomizationOffsetInsideOptionalClassName = "java/lang/Integer";
+ std::string value_randomizationOffsetInsideOptionalCtorSignature = "(I)V";
+ jint jnivalue_randomizationOffsetInsideOptional =
+ static_cast<jint>(cppValue.Value().randomizationOffset.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_randomizationOffsetInsideOptionalClassName.c_str(),
+ value_randomizationOffsetInsideOptionalCtorSignature.c_str(), jnivalue_randomizationOffsetInsideOptional,
+ value_randomizationOffsetInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_randomizationOffsetInsideOptional,
+ value_randomizationOffset);
+ }
+ jobject value_randomizationType;
+ if (!cppValue.Value().randomizationType.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_randomizationType);
+ }
+ else
+ {
+ jobject value_randomizationTypeInsideOptional;
+ std::string value_randomizationTypeInsideOptionalClassName = "java/lang/Integer";
+ std::string value_randomizationTypeInsideOptionalCtorSignature = "(I)V";
+ jint jnivalue_randomizationTypeInsideOptional = static_cast<jint>(cppValue.Value().randomizationType.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_randomizationTypeInsideOptionalClassName.c_str(),
+ value_randomizationTypeInsideOptionalCtorSignature.c_str(), jnivalue_randomizationTypeInsideOptional,
+ value_randomizationTypeInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_randomizationTypeInsideOptional,
+ value_randomizationType);
+ }
+
+ {
+ jclass dayEntryStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayEntryStruct", dayEntryStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayEntryStruct");
+ return nullptr;
+ }
+
+ jmethodID dayEntryStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayEntryStructStructClass_1, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &dayEntryStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || dayEntryStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayEntryStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(dayEntryStructStructClass_1, dayEntryStructStructCtor_1, value_dayEntryID,
+ value_startTime, value_duration, value_randomizationOffset, value_randomizationType);
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentDayEntryDate::Id: {
+ using TypeInfo = Attributes::CurrentDayEntryDate::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::NextDayEntry::Id: {
+ using TypeInfo = Attributes::NextDayEntry::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_dayEntryID;
+ std::string value_dayEntryIDClassName = "java/lang/Long";
+ std::string value_dayEntryIDCtorSignature = "(J)V";
+ jlong jnivalue_dayEntryID = static_cast<jlong>(cppValue.Value().dayEntryID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(value_dayEntryIDClassName.c_str(),
+ value_dayEntryIDCtorSignature.c_str(),
+ jnivalue_dayEntryID, value_dayEntryID);
+ jobject value_startTime;
+ std::string value_startTimeClassName = "java/lang/Integer";
+ std::string value_startTimeCtorSignature = "(I)V";
+ jint jnivalue_startTime = static_cast<jint>(cppValue.Value().startTime);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_startTimeClassName.c_str(), value_startTimeCtorSignature.c_str(), jnivalue_startTime, value_startTime);
+ jobject value_duration;
+ if (!cppValue.Value().duration.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_duration);
+ }
+ else
+ {
+ jobject value_durationInsideOptional;
+ std::string value_durationInsideOptionalClassName = "java/lang/Integer";
+ std::string value_durationInsideOptionalCtorSignature = "(I)V";
+ jint jnivalue_durationInsideOptional = static_cast<jint>(cppValue.Value().duration.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_durationInsideOptionalClassName.c_str(), value_durationInsideOptionalCtorSignature.c_str(),
+ jnivalue_durationInsideOptional, value_durationInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_durationInsideOptional, value_duration);
+ }
+ jobject value_randomizationOffset;
+ if (!cppValue.Value().randomizationOffset.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_randomizationOffset);
+ }
+ else
+ {
+ jobject value_randomizationOffsetInsideOptional;
+ std::string value_randomizationOffsetInsideOptionalClassName = "java/lang/Integer";
+ std::string value_randomizationOffsetInsideOptionalCtorSignature = "(I)V";
+ jint jnivalue_randomizationOffsetInsideOptional =
+ static_cast<jint>(cppValue.Value().randomizationOffset.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_randomizationOffsetInsideOptionalClassName.c_str(),
+ value_randomizationOffsetInsideOptionalCtorSignature.c_str(), jnivalue_randomizationOffsetInsideOptional,
+ value_randomizationOffsetInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_randomizationOffsetInsideOptional,
+ value_randomizationOffset);
+ }
+ jobject value_randomizationType;
+ if (!cppValue.Value().randomizationType.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_randomizationType);
+ }
+ else
+ {
+ jobject value_randomizationTypeInsideOptional;
+ std::string value_randomizationTypeInsideOptionalClassName = "java/lang/Integer";
+ std::string value_randomizationTypeInsideOptionalCtorSignature = "(I)V";
+ jint jnivalue_randomizationTypeInsideOptional = static_cast<jint>(cppValue.Value().randomizationType.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_randomizationTypeInsideOptionalClassName.c_str(),
+ value_randomizationTypeInsideOptionalCtorSignature.c_str(), jnivalue_randomizationTypeInsideOptional,
+ value_randomizationTypeInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_randomizationTypeInsideOptional,
+ value_randomizationType);
+ }
+
+ {
+ jclass dayEntryStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterDayEntryStruct", dayEntryStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterDayEntryStruct");
+ return nullptr;
+ }
+
+ jmethodID dayEntryStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, dayEntryStructStructClass_1, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &dayEntryStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || dayEntryStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterDayEntryStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(dayEntryStructStructClass_1, dayEntryStructStructCtor_1, value_dayEntryID,
+ value_startTime, value_duration, value_randomizationOffset, value_randomizationType);
+ }
+ }
+ return value;
+ }
+ case Attributes::NextDayEntryDate::Id: {
+ using TypeInfo = Attributes::NextDayEntryDate::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::TariffComponents::Id: {
+ using TypeInfo = Attributes::TariffComponents::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_tariffComponentID;
+ std::string newElement_1_tariffComponentIDClassName = "java/lang/Long";
+ std::string newElement_1_tariffComponentIDCtorSignature = "(J)V";
+ jlong jninewElement_1_tariffComponentID = static_cast<jlong>(entry_1.tariffComponentID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_tariffComponentIDClassName.c_str(), newElement_1_tariffComponentIDCtorSignature.c_str(),
+ jninewElement_1_tariffComponentID, newElement_1_tariffComponentID);
+ jobject newElement_1_price;
+ if (!entry_1.price.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_price);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional;
+ if (entry_1.price.Value().IsNull())
+ {
+ newElement_1_priceInsideOptional = nullptr;
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceType;
+ std::string newElement_1_priceInsideOptional_priceTypeClassName = "java/lang/Integer";
+ std::string newElement_1_priceInsideOptional_priceTypeCtorSignature = "(I)V";
+ jint jninewElement_1_priceInsideOptional_priceType =
+ static_cast<jint>(entry_1.price.Value().Value().priceType);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_priceInsideOptional_priceTypeClassName.c_str(),
+ newElement_1_priceInsideOptional_priceTypeCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceType, newElement_1_priceInsideOptional_priceType);
+ jobject newElement_1_priceInsideOptional_price;
+ if (!entry_1.price.Value().Value().price.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_priceInsideOptional_price);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceInsideOptional;
+ std::string newElement_1_priceInsideOptional_priceInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_1_priceInsideOptional_priceInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_1_priceInsideOptional_priceInsideOptional =
+ static_cast<jlong>(entry_1.price.Value().Value().price.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_priceInsideOptional_priceInsideOptionalClassName.c_str(),
+ newElement_1_priceInsideOptional_priceInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceInsideOptional,
+ newElement_1_priceInsideOptional_priceInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_priceInsideOptional_priceInsideOptional, newElement_1_priceInsideOptional_price);
+ }
+ jobject newElement_1_priceInsideOptional_priceLevel;
+ if (!entry_1.price.Value().Value().priceLevel.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceLevelInsideOptional;
+ std::string newElement_1_priceInsideOptional_priceLevelInsideOptionalClassName =
+ "java/lang/Integer";
+ std::string newElement_1_priceInsideOptional_priceLevelInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_1_priceInsideOptional_priceLevelInsideOptional =
+ static_cast<jint>(entry_1.price.Value().Value().priceLevel.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_priceInsideOptional_priceLevelInsideOptionalClassName.c_str(),
+ newElement_1_priceInsideOptional_priceLevelInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceLevelInsideOptional,
+ newElement_1_priceInsideOptional_priceLevelInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_priceInsideOptional_priceLevelInsideOptional,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+
+ {
+ jclass tariffPriceStructStructClass_5;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffPriceStruct",
+ tariffPriceStructStructClass_5);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffPriceStructStructCtor_5;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffPriceStructStructClass_5, "<init>",
+ "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &tariffPriceStructStructCtor_5);
+ if (err != CHIP_NO_ERROR || tariffPriceStructStructCtor_5 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterTariffPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_priceInsideOptional = env->NewObject(
+ tariffPriceStructStructClass_5, tariffPriceStructStructCtor_5,
+ newElement_1_priceInsideOptional_priceType, newElement_1_priceInsideOptional_price,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_priceInsideOptional, newElement_1_price);
+ }
+ jobject newElement_1_friendlyCredit;
+ if (!entry_1.friendlyCredit.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_friendlyCredit);
+ }
+ else
+ {
+ jobject newElement_1_friendlyCreditInsideOptional;
+ std::string newElement_1_friendlyCreditInsideOptionalClassName = "java/lang/Boolean";
+ std::string newElement_1_friendlyCreditInsideOptionalCtorSignature = "(Z)V";
+ jboolean jninewElement_1_friendlyCreditInsideOptional =
+ static_cast<jboolean>(entry_1.friendlyCredit.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(
+ newElement_1_friendlyCreditInsideOptionalClassName.c_str(),
+ newElement_1_friendlyCreditInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_friendlyCreditInsideOptional, newElement_1_friendlyCreditInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_friendlyCreditInsideOptional,
+ newElement_1_friendlyCredit);
+ }
+ jobject newElement_1_auxiliaryLoad;
+ if (!entry_1.auxiliaryLoad.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_auxiliaryLoad);
+ }
+ else
+ {
+ jobject newElement_1_auxiliaryLoadInsideOptional;
+ jobject newElement_1_auxiliaryLoadInsideOptional_number;
+ std::string newElement_1_auxiliaryLoadInsideOptional_numberClassName = "java/lang/Integer";
+ std::string newElement_1_auxiliaryLoadInsideOptional_numberCtorSignature = "(I)V";
+ jint jninewElement_1_auxiliaryLoadInsideOptional_number =
+ static_cast<jint>(entry_1.auxiliaryLoad.Value().number);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_auxiliaryLoadInsideOptional_numberClassName.c_str(),
+ newElement_1_auxiliaryLoadInsideOptional_numberCtorSignature.c_str(),
+ jninewElement_1_auxiliaryLoadInsideOptional_number, newElement_1_auxiliaryLoadInsideOptional_number);
+ jobject newElement_1_auxiliaryLoadInsideOptional_requiredState;
+ std::string newElement_1_auxiliaryLoadInsideOptional_requiredStateClassName = "java/lang/Integer";
+ std::string newElement_1_auxiliaryLoadInsideOptional_requiredStateCtorSignature = "(I)V";
+ jint jninewElement_1_auxiliaryLoadInsideOptional_requiredState =
+ static_cast<jint>(entry_1.auxiliaryLoad.Value().requiredState);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_auxiliaryLoadInsideOptional_requiredStateClassName.c_str(),
+ newElement_1_auxiliaryLoadInsideOptional_requiredStateCtorSignature.c_str(),
+ jninewElement_1_auxiliaryLoadInsideOptional_requiredState,
+ newElement_1_auxiliaryLoadInsideOptional_requiredState);
+
+ {
+ jclass auxiliaryLoadSwitchSettingsStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct",
+ auxiliaryLoadSwitchSettingsStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(
+ Zcl,
+ "Could not find class ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct");
+ return nullptr;
+ }
+
+ jmethodID auxiliaryLoadSwitchSettingsStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, auxiliaryLoadSwitchSettingsStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &auxiliaryLoadSwitchSettingsStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || auxiliaryLoadSwitchSettingsStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct "
+ "constructor");
+ return nullptr;
+ }
+
+ newElement_1_auxiliaryLoadInsideOptional = env->NewObject(
+ auxiliaryLoadSwitchSettingsStructStructClass_4, auxiliaryLoadSwitchSettingsStructStructCtor_4,
+ newElement_1_auxiliaryLoadInsideOptional_number,
+ newElement_1_auxiliaryLoadInsideOptional_requiredState);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_auxiliaryLoadInsideOptional,
+ newElement_1_auxiliaryLoad);
+ }
+ jobject newElement_1_peakPeriod;
+ if (!entry_1.peakPeriod.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_peakPeriod);
+ }
+ else
+ {
+ jobject newElement_1_peakPeriodInsideOptional;
+ jobject newElement_1_peakPeriodInsideOptional_severity;
+ std::string newElement_1_peakPeriodInsideOptional_severityClassName = "java/lang/Integer";
+ std::string newElement_1_peakPeriodInsideOptional_severityCtorSignature = "(I)V";
+ jint jninewElement_1_peakPeriodInsideOptional_severity =
+ static_cast<jint>(entry_1.peakPeriod.Value().severity);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_peakPeriodInsideOptional_severityClassName.c_str(),
+ newElement_1_peakPeriodInsideOptional_severityCtorSignature.c_str(),
+ jninewElement_1_peakPeriodInsideOptional_severity, newElement_1_peakPeriodInsideOptional_severity);
+ jobject newElement_1_peakPeriodInsideOptional_peakPeriod;
+ std::string newElement_1_peakPeriodInsideOptional_peakPeriodClassName = "java/lang/Integer";
+ std::string newElement_1_peakPeriodInsideOptional_peakPeriodCtorSignature = "(I)V";
+ jint jninewElement_1_peakPeriodInsideOptional_peakPeriod =
+ static_cast<jint>(entry_1.peakPeriod.Value().peakPeriod);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_peakPeriodInsideOptional_peakPeriodClassName.c_str(),
+ newElement_1_peakPeriodInsideOptional_peakPeriodCtorSignature.c_str(),
+ jninewElement_1_peakPeriodInsideOptional_peakPeriod, newElement_1_peakPeriodInsideOptional_peakPeriod);
+
+ {
+ jclass peakPeriodStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterPeakPeriodStruct",
+ peakPeriodStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterPeakPeriodStruct");
+ return nullptr;
+ }
+
+ jmethodID peakPeriodStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(env, peakPeriodStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ &peakPeriodStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || peakPeriodStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterPeakPeriodStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_peakPeriodInsideOptional = env->NewObject(
+ peakPeriodStructStructClass_4, peakPeriodStructStructCtor_4,
+ newElement_1_peakPeriodInsideOptional_severity, newElement_1_peakPeriodInsideOptional_peakPeriod);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_peakPeriodInsideOptional,
+ newElement_1_peakPeriod);
+ }
+ jobject newElement_1_powerThreshold;
+ if (!entry_1.powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_powerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional;
+ jobject newElement_1_powerThresholdInsideOptional_powerThreshold;
+ if (!entry_1.powerThreshold.Value().powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_1_powerThresholdInsideOptional_powerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional;
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalClassName =
+ "java/lang/Long";
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalCtorSignature =
+ "(J)V";
+ jlong jninewElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional =
+ static_cast<jlong>(entry_1.powerThreshold.Value().powerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_powerThreshold);
+ }
+ jobject newElement_1_powerThresholdInsideOptional_apparentPowerThreshold;
+ if (!entry_1.powerThreshold.Value().apparentPowerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_1_powerThresholdInsideOptional_apparentPowerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional;
+ std::string newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalClassName =
+ "java/lang/Long";
+ std::string
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalCtorSignature =
+ "(J)V";
+ jlong jninewElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional =
+ static_cast<jlong>(entry_1.powerThreshold.Value().apparentPowerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThreshold);
+ }
+ jobject newElement_1_powerThresholdInsideOptional_powerThresholdSource;
+ if (entry_1.powerThreshold.Value().powerThresholdSource.IsNull())
+ {
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdSourceClassName =
+ "java/lang/Integer";
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdSourceCtorSignature = "(I)V";
+ jint jninewElement_1_powerThresholdInsideOptional_powerThresholdSource =
+ static_cast<jint>(entry_1.powerThreshold.Value().powerThresholdSource.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_powerThresholdInsideOptional_powerThresholdSourceClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_powerThresholdSourceCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_powerThresholdSource,
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource);
+ }
+
+ {
+ jclass powerThresholdStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterPowerThresholdStruct",
+ powerThresholdStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterPowerThresholdStruct");
+ return nullptr;
+ }
+
+ jmethodID powerThresholdStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, powerThresholdStructStructClass_4, "<init>",
+ "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V",
+ &powerThresholdStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || powerThresholdStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterPowerThresholdStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_powerThresholdInsideOptional =
+ env->NewObject(powerThresholdStructStructClass_4, powerThresholdStructStructCtor_4,
+ newElement_1_powerThresholdInsideOptional_powerThreshold,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThreshold,
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_powerThresholdInsideOptional,
+ newElement_1_powerThreshold);
+ }
+ jobject newElement_1_threshold;
+ if (entry_1.threshold.IsNull())
+ {
+ newElement_1_threshold = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_thresholdClassName = "java/lang/Long";
+ std::string newElement_1_thresholdCtorSignature = "(J)V";
+ jlong jninewElement_1_threshold = static_cast<jlong>(entry_1.threshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_thresholdClassName.c_str(), newElement_1_thresholdCtorSignature.c_str(),
+ jninewElement_1_threshold, newElement_1_threshold);
+ }
+ jobject newElement_1_label;
+ if (!entry_1.label.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_label);
+ }
+ else
+ {
+ jobject newElement_1_labelInsideOptional;
+ if (entry_1.label.Value().IsNull())
+ {
+ newElement_1_labelInsideOptional = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.label.Value().Value(),
+ newElement_1_labelInsideOptional));
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_labelInsideOptional, newElement_1_label);
+ }
+ jobject newElement_1_predicted;
+ if (!entry_1.predicted.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_predicted);
+ }
+ else
+ {
+ jobject newElement_1_predictedInsideOptional;
+ std::string newElement_1_predictedInsideOptionalClassName = "java/lang/Boolean";
+ std::string newElement_1_predictedInsideOptionalCtorSignature = "(Z)V";
+ jboolean jninewElement_1_predictedInsideOptional = static_cast<jboolean>(entry_1.predicted.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(
+ newElement_1_predictedInsideOptionalClassName.c_str(),
+ newElement_1_predictedInsideOptionalCtorSignature.c_str(), jninewElement_1_predictedInsideOptional,
+ newElement_1_predictedInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_predictedInsideOptional,
+ newElement_1_predicted);
+ }
+
+ {
+ jclass tariffComponentStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffComponentStruct",
+ tariffComponentStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffComponentStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffComponentStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/"
+ "Optional;Ljava/util/Optional;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &tariffComponentStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || tariffComponentStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterTariffComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(
+ tariffComponentStructStructClass_2, tariffComponentStructStructCtor_2, newElement_1_tariffComponentID,
+ newElement_1_price, newElement_1_friendlyCredit, newElement_1_auxiliaryLoad, newElement_1_peakPeriod,
+ newElement_1_powerThreshold, newElement_1_threshold, newElement_1_label, newElement_1_predicted);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::TariffPeriods::Id: {
+ using TypeInfo = Attributes::TariffPeriods::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_label;
+ if (entry_1.label.IsNull())
+ {
+ newElement_1_label = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(
+ chip::JniReferences::GetInstance().CharToStringUTF(entry_1.label.Value(), newElement_1_label));
+ }
+ jobject newElement_1_dayEntryIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_1_dayEntryIDs);
+
+ auto iter_newElement_1_dayEntryIDs_3 = entry_1.dayEntryIDs.begin();
+ while (iter_newElement_1_dayEntryIDs_3.Next())
+ {
+ auto & entry_3 = iter_newElement_1_dayEntryIDs_3.GetValue();
+ jobject newElement_3;
+ std::string newElement_3ClassName = "java/lang/Long";
+ std::string newElement_3CtorSignature = "(J)V";
+ jlong jninewElement_3 = static_cast<jlong>(entry_3);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3);
+ chip::JniReferences::GetInstance().AddToList(newElement_1_dayEntryIDs, newElement_3);
+ }
+ jobject newElement_1_tariffComponentIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_1_tariffComponentIDs);
+
+ auto iter_newElement_1_tariffComponentIDs_3 = entry_1.tariffComponentIDs.begin();
+ while (iter_newElement_1_tariffComponentIDs_3.Next())
+ {
+ auto & entry_3 = iter_newElement_1_tariffComponentIDs_3.GetValue();
+ jobject newElement_3;
+ std::string newElement_3ClassName = "java/lang/Long";
+ std::string newElement_3CtorSignature = "(J)V";
+ jlong jninewElement_3 = static_cast<jlong>(entry_3);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3);
+ chip::JniReferences::GetInstance().AddToList(newElement_1_tariffComponentIDs, newElement_3);
+ }
+
+ {
+ jclass tariffPeriodStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffPeriodStruct",
+ tariffPeriodStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffPeriodStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffPeriodStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffPeriodStructStructClass_2, "<init>",
+ "(Ljava/lang/String;Ljava/util/ArrayList;Ljava/util/ArrayList;)V", &tariffPeriodStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || tariffPeriodStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterTariffPeriodStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 =
+ env->NewObject(tariffPeriodStructStructClass_2, tariffPeriodStructStructCtor_2, newElement_1_label,
+ newElement_1_dayEntryIDs, newElement_1_tariffComponentIDs);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentTariffComponents::Id: {
+ using TypeInfo = Attributes::CurrentTariffComponents::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_tariffComponentID;
+ std::string newElement_1_tariffComponentIDClassName = "java/lang/Long";
+ std::string newElement_1_tariffComponentIDCtorSignature = "(J)V";
+ jlong jninewElement_1_tariffComponentID = static_cast<jlong>(entry_1.tariffComponentID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_tariffComponentIDClassName.c_str(), newElement_1_tariffComponentIDCtorSignature.c_str(),
+ jninewElement_1_tariffComponentID, newElement_1_tariffComponentID);
+ jobject newElement_1_price;
+ if (!entry_1.price.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_price);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional;
+ if (entry_1.price.Value().IsNull())
+ {
+ newElement_1_priceInsideOptional = nullptr;
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceType;
+ std::string newElement_1_priceInsideOptional_priceTypeClassName = "java/lang/Integer";
+ std::string newElement_1_priceInsideOptional_priceTypeCtorSignature = "(I)V";
+ jint jninewElement_1_priceInsideOptional_priceType =
+ static_cast<jint>(entry_1.price.Value().Value().priceType);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_priceInsideOptional_priceTypeClassName.c_str(),
+ newElement_1_priceInsideOptional_priceTypeCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceType, newElement_1_priceInsideOptional_priceType);
+ jobject newElement_1_priceInsideOptional_price;
+ if (!entry_1.price.Value().Value().price.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_priceInsideOptional_price);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceInsideOptional;
+ std::string newElement_1_priceInsideOptional_priceInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_1_priceInsideOptional_priceInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_1_priceInsideOptional_priceInsideOptional =
+ static_cast<jlong>(entry_1.price.Value().Value().price.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_priceInsideOptional_priceInsideOptionalClassName.c_str(),
+ newElement_1_priceInsideOptional_priceInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceInsideOptional,
+ newElement_1_priceInsideOptional_priceInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_priceInsideOptional_priceInsideOptional, newElement_1_priceInsideOptional_price);
+ }
+ jobject newElement_1_priceInsideOptional_priceLevel;
+ if (!entry_1.price.Value().Value().priceLevel.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceLevelInsideOptional;
+ std::string newElement_1_priceInsideOptional_priceLevelInsideOptionalClassName =
+ "java/lang/Integer";
+ std::string newElement_1_priceInsideOptional_priceLevelInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_1_priceInsideOptional_priceLevelInsideOptional =
+ static_cast<jint>(entry_1.price.Value().Value().priceLevel.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_priceInsideOptional_priceLevelInsideOptionalClassName.c_str(),
+ newElement_1_priceInsideOptional_priceLevelInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceLevelInsideOptional,
+ newElement_1_priceInsideOptional_priceLevelInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_priceInsideOptional_priceLevelInsideOptional,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+
+ {
+ jclass tariffPriceStructStructClass_5;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffPriceStruct",
+ tariffPriceStructStructClass_5);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffPriceStructStructCtor_5;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffPriceStructStructClass_5, "<init>",
+ "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &tariffPriceStructStructCtor_5);
+ if (err != CHIP_NO_ERROR || tariffPriceStructStructCtor_5 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterTariffPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_priceInsideOptional = env->NewObject(
+ tariffPriceStructStructClass_5, tariffPriceStructStructCtor_5,
+ newElement_1_priceInsideOptional_priceType, newElement_1_priceInsideOptional_price,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_priceInsideOptional, newElement_1_price);
+ }
+ jobject newElement_1_friendlyCredit;
+ if (!entry_1.friendlyCredit.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_friendlyCredit);
+ }
+ else
+ {
+ jobject newElement_1_friendlyCreditInsideOptional;
+ std::string newElement_1_friendlyCreditInsideOptionalClassName = "java/lang/Boolean";
+ std::string newElement_1_friendlyCreditInsideOptionalCtorSignature = "(Z)V";
+ jboolean jninewElement_1_friendlyCreditInsideOptional =
+ static_cast<jboolean>(entry_1.friendlyCredit.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(
+ newElement_1_friendlyCreditInsideOptionalClassName.c_str(),
+ newElement_1_friendlyCreditInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_friendlyCreditInsideOptional, newElement_1_friendlyCreditInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_friendlyCreditInsideOptional,
+ newElement_1_friendlyCredit);
+ }
+ jobject newElement_1_auxiliaryLoad;
+ if (!entry_1.auxiliaryLoad.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_auxiliaryLoad);
+ }
+ else
+ {
+ jobject newElement_1_auxiliaryLoadInsideOptional;
+ jobject newElement_1_auxiliaryLoadInsideOptional_number;
+ std::string newElement_1_auxiliaryLoadInsideOptional_numberClassName = "java/lang/Integer";
+ std::string newElement_1_auxiliaryLoadInsideOptional_numberCtorSignature = "(I)V";
+ jint jninewElement_1_auxiliaryLoadInsideOptional_number =
+ static_cast<jint>(entry_1.auxiliaryLoad.Value().number);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_auxiliaryLoadInsideOptional_numberClassName.c_str(),
+ newElement_1_auxiliaryLoadInsideOptional_numberCtorSignature.c_str(),
+ jninewElement_1_auxiliaryLoadInsideOptional_number, newElement_1_auxiliaryLoadInsideOptional_number);
+ jobject newElement_1_auxiliaryLoadInsideOptional_requiredState;
+ std::string newElement_1_auxiliaryLoadInsideOptional_requiredStateClassName = "java/lang/Integer";
+ std::string newElement_1_auxiliaryLoadInsideOptional_requiredStateCtorSignature = "(I)V";
+ jint jninewElement_1_auxiliaryLoadInsideOptional_requiredState =
+ static_cast<jint>(entry_1.auxiliaryLoad.Value().requiredState);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_auxiliaryLoadInsideOptional_requiredStateClassName.c_str(),
+ newElement_1_auxiliaryLoadInsideOptional_requiredStateCtorSignature.c_str(),
+ jninewElement_1_auxiliaryLoadInsideOptional_requiredState,
+ newElement_1_auxiliaryLoadInsideOptional_requiredState);
+
+ {
+ jclass auxiliaryLoadSwitchSettingsStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct",
+ auxiliaryLoadSwitchSettingsStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(
+ Zcl,
+ "Could not find class ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct");
+ return nullptr;
+ }
+
+ jmethodID auxiliaryLoadSwitchSettingsStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, auxiliaryLoadSwitchSettingsStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &auxiliaryLoadSwitchSettingsStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || auxiliaryLoadSwitchSettingsStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct "
+ "constructor");
+ return nullptr;
+ }
+
+ newElement_1_auxiliaryLoadInsideOptional = env->NewObject(
+ auxiliaryLoadSwitchSettingsStructStructClass_4, auxiliaryLoadSwitchSettingsStructStructCtor_4,
+ newElement_1_auxiliaryLoadInsideOptional_number,
+ newElement_1_auxiliaryLoadInsideOptional_requiredState);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_auxiliaryLoadInsideOptional,
+ newElement_1_auxiliaryLoad);
+ }
+ jobject newElement_1_peakPeriod;
+ if (!entry_1.peakPeriod.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_peakPeriod);
+ }
+ else
+ {
+ jobject newElement_1_peakPeriodInsideOptional;
+ jobject newElement_1_peakPeriodInsideOptional_severity;
+ std::string newElement_1_peakPeriodInsideOptional_severityClassName = "java/lang/Integer";
+ std::string newElement_1_peakPeriodInsideOptional_severityCtorSignature = "(I)V";
+ jint jninewElement_1_peakPeriodInsideOptional_severity =
+ static_cast<jint>(entry_1.peakPeriod.Value().severity);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_peakPeriodInsideOptional_severityClassName.c_str(),
+ newElement_1_peakPeriodInsideOptional_severityCtorSignature.c_str(),
+ jninewElement_1_peakPeriodInsideOptional_severity, newElement_1_peakPeriodInsideOptional_severity);
+ jobject newElement_1_peakPeriodInsideOptional_peakPeriod;
+ std::string newElement_1_peakPeriodInsideOptional_peakPeriodClassName = "java/lang/Integer";
+ std::string newElement_1_peakPeriodInsideOptional_peakPeriodCtorSignature = "(I)V";
+ jint jninewElement_1_peakPeriodInsideOptional_peakPeriod =
+ static_cast<jint>(entry_1.peakPeriod.Value().peakPeriod);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_peakPeriodInsideOptional_peakPeriodClassName.c_str(),
+ newElement_1_peakPeriodInsideOptional_peakPeriodCtorSignature.c_str(),
+ jninewElement_1_peakPeriodInsideOptional_peakPeriod, newElement_1_peakPeriodInsideOptional_peakPeriod);
+
+ {
+ jclass peakPeriodStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterPeakPeriodStruct",
+ peakPeriodStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterPeakPeriodStruct");
+ return nullptr;
+ }
+
+ jmethodID peakPeriodStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(env, peakPeriodStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ &peakPeriodStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || peakPeriodStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterPeakPeriodStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_peakPeriodInsideOptional = env->NewObject(
+ peakPeriodStructStructClass_4, peakPeriodStructStructCtor_4,
+ newElement_1_peakPeriodInsideOptional_severity, newElement_1_peakPeriodInsideOptional_peakPeriod);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_peakPeriodInsideOptional,
+ newElement_1_peakPeriod);
+ }
+ jobject newElement_1_powerThreshold;
+ if (!entry_1.powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_powerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional;
+ jobject newElement_1_powerThresholdInsideOptional_powerThreshold;
+ if (!entry_1.powerThreshold.Value().powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_1_powerThresholdInsideOptional_powerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional;
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalClassName =
+ "java/lang/Long";
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalCtorSignature =
+ "(J)V";
+ jlong jninewElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional =
+ static_cast<jlong>(entry_1.powerThreshold.Value().powerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_powerThreshold);
+ }
+ jobject newElement_1_powerThresholdInsideOptional_apparentPowerThreshold;
+ if (!entry_1.powerThreshold.Value().apparentPowerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_1_powerThresholdInsideOptional_apparentPowerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional;
+ std::string newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalClassName =
+ "java/lang/Long";
+ std::string
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalCtorSignature =
+ "(J)V";
+ jlong jninewElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional =
+ static_cast<jlong>(entry_1.powerThreshold.Value().apparentPowerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThreshold);
+ }
+ jobject newElement_1_powerThresholdInsideOptional_powerThresholdSource;
+ if (entry_1.powerThreshold.Value().powerThresholdSource.IsNull())
+ {
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdSourceClassName =
+ "java/lang/Integer";
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdSourceCtorSignature = "(I)V";
+ jint jninewElement_1_powerThresholdInsideOptional_powerThresholdSource =
+ static_cast<jint>(entry_1.powerThreshold.Value().powerThresholdSource.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_powerThresholdInsideOptional_powerThresholdSourceClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_powerThresholdSourceCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_powerThresholdSource,
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource);
+ }
+
+ {
+ jclass powerThresholdStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterPowerThresholdStruct",
+ powerThresholdStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterPowerThresholdStruct");
+ return nullptr;
+ }
+
+ jmethodID powerThresholdStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, powerThresholdStructStructClass_4, "<init>",
+ "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V",
+ &powerThresholdStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || powerThresholdStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterPowerThresholdStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_powerThresholdInsideOptional =
+ env->NewObject(powerThresholdStructStructClass_4, powerThresholdStructStructCtor_4,
+ newElement_1_powerThresholdInsideOptional_powerThreshold,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThreshold,
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_powerThresholdInsideOptional,
+ newElement_1_powerThreshold);
+ }
+ jobject newElement_1_threshold;
+ if (entry_1.threshold.IsNull())
+ {
+ newElement_1_threshold = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_thresholdClassName = "java/lang/Long";
+ std::string newElement_1_thresholdCtorSignature = "(J)V";
+ jlong jninewElement_1_threshold = static_cast<jlong>(entry_1.threshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_thresholdClassName.c_str(), newElement_1_thresholdCtorSignature.c_str(),
+ jninewElement_1_threshold, newElement_1_threshold);
+ }
+ jobject newElement_1_label;
+ if (!entry_1.label.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_label);
+ }
+ else
+ {
+ jobject newElement_1_labelInsideOptional;
+ if (entry_1.label.Value().IsNull())
+ {
+ newElement_1_labelInsideOptional = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.label.Value().Value(),
+ newElement_1_labelInsideOptional));
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_labelInsideOptional, newElement_1_label);
+ }
+ jobject newElement_1_predicted;
+ if (!entry_1.predicted.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_predicted);
+ }
+ else
+ {
+ jobject newElement_1_predictedInsideOptional;
+ std::string newElement_1_predictedInsideOptionalClassName = "java/lang/Boolean";
+ std::string newElement_1_predictedInsideOptionalCtorSignature = "(Z)V";
+ jboolean jninewElement_1_predictedInsideOptional = static_cast<jboolean>(entry_1.predicted.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(
+ newElement_1_predictedInsideOptionalClassName.c_str(),
+ newElement_1_predictedInsideOptionalCtorSignature.c_str(), jninewElement_1_predictedInsideOptional,
+ newElement_1_predictedInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_predictedInsideOptional,
+ newElement_1_predicted);
+ }
+
+ {
+ jclass tariffComponentStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffComponentStruct",
+ tariffComponentStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffComponentStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffComponentStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/"
+ "Optional;Ljava/util/Optional;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &tariffComponentStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || tariffComponentStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterTariffComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(
+ tariffComponentStructStructClass_2, tariffComponentStructStructCtor_2, newElement_1_tariffComponentID,
+ newElement_1_price, newElement_1_friendlyCredit, newElement_1_auxiliaryLoad, newElement_1_peakPeriod,
+ newElement_1_powerThreshold, newElement_1_threshold, newElement_1_label, newElement_1_predicted);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::NextTariffComponents::Id: {
+ using TypeInfo = Attributes::NextTariffComponents::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_tariffComponentID;
+ std::string newElement_1_tariffComponentIDClassName = "java/lang/Long";
+ std::string newElement_1_tariffComponentIDCtorSignature = "(J)V";
+ jlong jninewElement_1_tariffComponentID = static_cast<jlong>(entry_1.tariffComponentID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_tariffComponentIDClassName.c_str(), newElement_1_tariffComponentIDCtorSignature.c_str(),
+ jninewElement_1_tariffComponentID, newElement_1_tariffComponentID);
+ jobject newElement_1_price;
+ if (!entry_1.price.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_price);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional;
+ if (entry_1.price.Value().IsNull())
+ {
+ newElement_1_priceInsideOptional = nullptr;
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceType;
+ std::string newElement_1_priceInsideOptional_priceTypeClassName = "java/lang/Integer";
+ std::string newElement_1_priceInsideOptional_priceTypeCtorSignature = "(I)V";
+ jint jninewElement_1_priceInsideOptional_priceType =
+ static_cast<jint>(entry_1.price.Value().Value().priceType);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_priceInsideOptional_priceTypeClassName.c_str(),
+ newElement_1_priceInsideOptional_priceTypeCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceType, newElement_1_priceInsideOptional_priceType);
+ jobject newElement_1_priceInsideOptional_price;
+ if (!entry_1.price.Value().Value().price.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_priceInsideOptional_price);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceInsideOptional;
+ std::string newElement_1_priceInsideOptional_priceInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_1_priceInsideOptional_priceInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_1_priceInsideOptional_priceInsideOptional =
+ static_cast<jlong>(entry_1.price.Value().Value().price.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_priceInsideOptional_priceInsideOptionalClassName.c_str(),
+ newElement_1_priceInsideOptional_priceInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceInsideOptional,
+ newElement_1_priceInsideOptional_priceInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_priceInsideOptional_priceInsideOptional, newElement_1_priceInsideOptional_price);
+ }
+ jobject newElement_1_priceInsideOptional_priceLevel;
+ if (!entry_1.price.Value().Value().priceLevel.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+ else
+ {
+ jobject newElement_1_priceInsideOptional_priceLevelInsideOptional;
+ std::string newElement_1_priceInsideOptional_priceLevelInsideOptionalClassName =
+ "java/lang/Integer";
+ std::string newElement_1_priceInsideOptional_priceLevelInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_1_priceInsideOptional_priceLevelInsideOptional =
+ static_cast<jint>(entry_1.price.Value().Value().priceLevel.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_priceInsideOptional_priceLevelInsideOptionalClassName.c_str(),
+ newElement_1_priceInsideOptional_priceLevelInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_priceInsideOptional_priceLevelInsideOptional,
+ newElement_1_priceInsideOptional_priceLevelInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_priceInsideOptional_priceLevelInsideOptional,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+
+ {
+ jclass tariffPriceStructStructClass_5;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffPriceStruct",
+ tariffPriceStructStructClass_5);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffPriceStructStructCtor_5;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffPriceStructStructClass_5, "<init>",
+ "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &tariffPriceStructStructCtor_5);
+ if (err != CHIP_NO_ERROR || tariffPriceStructStructCtor_5 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterTariffPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_priceInsideOptional = env->NewObject(
+ tariffPriceStructStructClass_5, tariffPriceStructStructCtor_5,
+ newElement_1_priceInsideOptional_priceType, newElement_1_priceInsideOptional_price,
+ newElement_1_priceInsideOptional_priceLevel);
+ }
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_priceInsideOptional, newElement_1_price);
+ }
+ jobject newElement_1_friendlyCredit;
+ if (!entry_1.friendlyCredit.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_friendlyCredit);
+ }
+ else
+ {
+ jobject newElement_1_friendlyCreditInsideOptional;
+ std::string newElement_1_friendlyCreditInsideOptionalClassName = "java/lang/Boolean";
+ std::string newElement_1_friendlyCreditInsideOptionalCtorSignature = "(Z)V";
+ jboolean jninewElement_1_friendlyCreditInsideOptional =
+ static_cast<jboolean>(entry_1.friendlyCredit.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(
+ newElement_1_friendlyCreditInsideOptionalClassName.c_str(),
+ newElement_1_friendlyCreditInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_friendlyCreditInsideOptional, newElement_1_friendlyCreditInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_friendlyCreditInsideOptional,
+ newElement_1_friendlyCredit);
+ }
+ jobject newElement_1_auxiliaryLoad;
+ if (!entry_1.auxiliaryLoad.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_auxiliaryLoad);
+ }
+ else
+ {
+ jobject newElement_1_auxiliaryLoadInsideOptional;
+ jobject newElement_1_auxiliaryLoadInsideOptional_number;
+ std::string newElement_1_auxiliaryLoadInsideOptional_numberClassName = "java/lang/Integer";
+ std::string newElement_1_auxiliaryLoadInsideOptional_numberCtorSignature = "(I)V";
+ jint jninewElement_1_auxiliaryLoadInsideOptional_number =
+ static_cast<jint>(entry_1.auxiliaryLoad.Value().number);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_auxiliaryLoadInsideOptional_numberClassName.c_str(),
+ newElement_1_auxiliaryLoadInsideOptional_numberCtorSignature.c_str(),
+ jninewElement_1_auxiliaryLoadInsideOptional_number, newElement_1_auxiliaryLoadInsideOptional_number);
+ jobject newElement_1_auxiliaryLoadInsideOptional_requiredState;
+ std::string newElement_1_auxiliaryLoadInsideOptional_requiredStateClassName = "java/lang/Integer";
+ std::string newElement_1_auxiliaryLoadInsideOptional_requiredStateCtorSignature = "(I)V";
+ jint jninewElement_1_auxiliaryLoadInsideOptional_requiredState =
+ static_cast<jint>(entry_1.auxiliaryLoad.Value().requiredState);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_auxiliaryLoadInsideOptional_requiredStateClassName.c_str(),
+ newElement_1_auxiliaryLoadInsideOptional_requiredStateCtorSignature.c_str(),
+ jninewElement_1_auxiliaryLoadInsideOptional_requiredState,
+ newElement_1_auxiliaryLoadInsideOptional_requiredState);
+
+ {
+ jclass auxiliaryLoadSwitchSettingsStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct",
+ auxiliaryLoadSwitchSettingsStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(
+ Zcl,
+ "Could not find class ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct");
+ return nullptr;
+ }
+
+ jmethodID auxiliaryLoadSwitchSettingsStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, auxiliaryLoadSwitchSettingsStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V", &auxiliaryLoadSwitchSettingsStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || auxiliaryLoadSwitchSettingsStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct "
+ "constructor");
+ return nullptr;
+ }
+
+ newElement_1_auxiliaryLoadInsideOptional = env->NewObject(
+ auxiliaryLoadSwitchSettingsStructStructClass_4, auxiliaryLoadSwitchSettingsStructStructCtor_4,
+ newElement_1_auxiliaryLoadInsideOptional_number,
+ newElement_1_auxiliaryLoadInsideOptional_requiredState);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_auxiliaryLoadInsideOptional,
+ newElement_1_auxiliaryLoad);
+ }
+ jobject newElement_1_peakPeriod;
+ if (!entry_1.peakPeriod.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_peakPeriod);
+ }
+ else
+ {
+ jobject newElement_1_peakPeriodInsideOptional;
+ jobject newElement_1_peakPeriodInsideOptional_severity;
+ std::string newElement_1_peakPeriodInsideOptional_severityClassName = "java/lang/Integer";
+ std::string newElement_1_peakPeriodInsideOptional_severityCtorSignature = "(I)V";
+ jint jninewElement_1_peakPeriodInsideOptional_severity =
+ static_cast<jint>(entry_1.peakPeriod.Value().severity);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_peakPeriodInsideOptional_severityClassName.c_str(),
+ newElement_1_peakPeriodInsideOptional_severityCtorSignature.c_str(),
+ jninewElement_1_peakPeriodInsideOptional_severity, newElement_1_peakPeriodInsideOptional_severity);
+ jobject newElement_1_peakPeriodInsideOptional_peakPeriod;
+ std::string newElement_1_peakPeriodInsideOptional_peakPeriodClassName = "java/lang/Integer";
+ std::string newElement_1_peakPeriodInsideOptional_peakPeriodCtorSignature = "(I)V";
+ jint jninewElement_1_peakPeriodInsideOptional_peakPeriod =
+ static_cast<jint>(entry_1.peakPeriod.Value().peakPeriod);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_peakPeriodInsideOptional_peakPeriodClassName.c_str(),
+ newElement_1_peakPeriodInsideOptional_peakPeriodCtorSignature.c_str(),
+ jninewElement_1_peakPeriodInsideOptional_peakPeriod, newElement_1_peakPeriodInsideOptional_peakPeriod);
+
+ {
+ jclass peakPeriodStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterPeakPeriodStruct",
+ peakPeriodStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterPeakPeriodStruct");
+ return nullptr;
+ }
+
+ jmethodID peakPeriodStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(env, peakPeriodStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ &peakPeriodStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || peakPeriodStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterPeakPeriodStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_peakPeriodInsideOptional = env->NewObject(
+ peakPeriodStructStructClass_4, peakPeriodStructStructCtor_4,
+ newElement_1_peakPeriodInsideOptional_severity, newElement_1_peakPeriodInsideOptional_peakPeriod);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_peakPeriodInsideOptional,
+ newElement_1_peakPeriod);
+ }
+ jobject newElement_1_powerThreshold;
+ if (!entry_1.powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_powerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional;
+ jobject newElement_1_powerThresholdInsideOptional_powerThreshold;
+ if (!entry_1.powerThreshold.Value().powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_1_powerThresholdInsideOptional_powerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional;
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalClassName =
+ "java/lang/Long";
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalCtorSignature =
+ "(J)V";
+ jlong jninewElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional =
+ static_cast<jlong>(entry_1.powerThreshold.Value().powerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_powerThresholdInsideOptional_powerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_powerThreshold);
+ }
+ jobject newElement_1_powerThresholdInsideOptional_apparentPowerThreshold;
+ if (!entry_1.powerThreshold.Value().apparentPowerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(
+ nullptr, newElement_1_powerThresholdInsideOptional_apparentPowerThreshold);
+ }
+ else
+ {
+ jobject newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional;
+ std::string newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalClassName =
+ "java/lang/Long";
+ std::string
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalCtorSignature =
+ "(J)V";
+ jlong jninewElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional =
+ static_cast<jlong>(entry_1.powerThreshold.Value().apparentPowerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptionalCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(
+ newElement_1_powerThresholdInsideOptional_apparentPowerThresholdInsideOptional,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThreshold);
+ }
+ jobject newElement_1_powerThresholdInsideOptional_powerThresholdSource;
+ if (entry_1.powerThreshold.Value().powerThresholdSource.IsNull())
+ {
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdSourceClassName =
+ "java/lang/Integer";
+ std::string newElement_1_powerThresholdInsideOptional_powerThresholdSourceCtorSignature = "(I)V";
+ jint jninewElement_1_powerThresholdInsideOptional_powerThresholdSource =
+ static_cast<jint>(entry_1.powerThreshold.Value().powerThresholdSource.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_1_powerThresholdInsideOptional_powerThresholdSourceClassName.c_str(),
+ newElement_1_powerThresholdInsideOptional_powerThresholdSourceCtorSignature.c_str(),
+ jninewElement_1_powerThresholdInsideOptional_powerThresholdSource,
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource);
+ }
+
+ {
+ jclass powerThresholdStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterPowerThresholdStruct",
+ powerThresholdStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterPowerThresholdStruct");
+ return nullptr;
+ }
+
+ jmethodID powerThresholdStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, powerThresholdStructStructClass_4, "<init>",
+ "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V",
+ &powerThresholdStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || powerThresholdStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityTariffClusterPowerThresholdStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1_powerThresholdInsideOptional =
+ env->NewObject(powerThresholdStructStructClass_4, powerThresholdStructStructCtor_4,
+ newElement_1_powerThresholdInsideOptional_powerThreshold,
+ newElement_1_powerThresholdInsideOptional_apparentPowerThreshold,
+ newElement_1_powerThresholdInsideOptional_powerThresholdSource);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_powerThresholdInsideOptional,
+ newElement_1_powerThreshold);
+ }
+ jobject newElement_1_threshold;
+ if (entry_1.threshold.IsNull())
+ {
+ newElement_1_threshold = nullptr;
+ }
+ else
+ {
+ std::string newElement_1_thresholdClassName = "java/lang/Long";
+ std::string newElement_1_thresholdCtorSignature = "(J)V";
+ jlong jninewElement_1_threshold = static_cast<jlong>(entry_1.threshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_1_thresholdClassName.c_str(), newElement_1_thresholdCtorSignature.c_str(),
+ jninewElement_1_threshold, newElement_1_threshold);
+ }
+ jobject newElement_1_label;
+ if (!entry_1.label.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_label);
+ }
+ else
+ {
+ jobject newElement_1_labelInsideOptional;
+ if (entry_1.label.Value().IsNull())
+ {
+ newElement_1_labelInsideOptional = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_1.label.Value().Value(),
+ newElement_1_labelInsideOptional));
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_labelInsideOptional, newElement_1_label);
+ }
+ jobject newElement_1_predicted;
+ if (!entry_1.predicted.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_predicted);
+ }
+ else
+ {
+ jobject newElement_1_predictedInsideOptional;
+ std::string newElement_1_predictedInsideOptionalClassName = "java/lang/Boolean";
+ std::string newElement_1_predictedInsideOptionalCtorSignature = "(Z)V";
+ jboolean jninewElement_1_predictedInsideOptional = static_cast<jboolean>(entry_1.predicted.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jboolean>(
+ newElement_1_predictedInsideOptionalClassName.c_str(),
+ newElement_1_predictedInsideOptionalCtorSignature.c_str(), jninewElement_1_predictedInsideOptional,
+ newElement_1_predictedInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_1_predictedInsideOptional,
+ newElement_1_predicted);
+ }
+
+ {
+ jclass tariffComponentStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityTariffClusterTariffComponentStruct",
+ tariffComponentStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityTariffClusterTariffComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID tariffComponentStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, tariffComponentStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/"
+ "Optional;Ljava/util/Optional;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &tariffComponentStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || tariffComponentStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityTariffClusterTariffComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(
+ tariffComponentStructStructClass_2, tariffComponentStructStructCtor_2, newElement_1_tariffComponentID,
+ newElement_1_price, newElement_1_friendlyCredit, newElement_1_auxiliaryLoad, newElement_1_peakPeriod,
+ newElement_1_powerThreshold, newElement_1_threshold, newElement_1_label, newElement_1_predicted);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::DefaultRandomizationOffset::Id: {
+ using TypeInfo = Attributes::DefaultRandomizationOffset::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::DefaultRandomizationType::Id: {
+ using TypeInfo = Attributes::DefaultRandomizationType::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::EcosystemInformation::Id: {
using namespace app::Clusters::EcosystemInformation;
switch (aPath.mAttributeId)
@@ -44985,6 +48244,534 @@
}
break;
}
+ case app::Clusters::MeterIdentification::Id: {
+ using namespace app::Clusters::MeterIdentification;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::MeterType::Id: {
+ using TypeInfo = Attributes::MeterType::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::PointOfDelivery::Id: {
+ using TypeInfo = Attributes::PointOfDelivery::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value));
+ }
+ return value;
+ }
+ case Attributes::MeterSerialNumber::Id: {
+ using TypeInfo = Attributes::MeterSerialNumber::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value));
+ }
+ return value;
+ }
+ case Attributes::ProtocolVersion::Id: {
+ using TypeInfo = Attributes::ProtocolVersion::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.Value(), value));
+ }
+ return value;
+ }
+ case Attributes::PowerThreshold::Id: {
+ using TypeInfo = Attributes::PowerThreshold::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ jobject value_powerThreshold;
+ if (!cppValue.Value().powerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_powerThreshold);
+ }
+ else
+ {
+ jobject value_powerThresholdInsideOptional;
+ std::string value_powerThresholdInsideOptionalClassName = "java/lang/Long";
+ std::string value_powerThresholdInsideOptionalCtorSignature = "(J)V";
+ jlong jnivalue_powerThresholdInsideOptional = static_cast<jlong>(cppValue.Value().powerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_powerThresholdInsideOptionalClassName.c_str(),
+ value_powerThresholdInsideOptionalCtorSignature.c_str(), jnivalue_powerThresholdInsideOptional,
+ value_powerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_powerThresholdInsideOptional, value_powerThreshold);
+ }
+ jobject value_apparentPowerThreshold;
+ if (!cppValue.Value().apparentPowerThreshold.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_apparentPowerThreshold);
+ }
+ else
+ {
+ jobject value_apparentPowerThresholdInsideOptional;
+ std::string value_apparentPowerThresholdInsideOptionalClassName = "java/lang/Long";
+ std::string value_apparentPowerThresholdInsideOptionalCtorSignature = "(J)V";
+ jlong jnivalue_apparentPowerThresholdInsideOptional =
+ static_cast<jlong>(cppValue.Value().apparentPowerThreshold.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_apparentPowerThresholdInsideOptionalClassName.c_str(),
+ value_apparentPowerThresholdInsideOptionalCtorSignature.c_str(),
+ jnivalue_apparentPowerThresholdInsideOptional, value_apparentPowerThresholdInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(value_apparentPowerThresholdInsideOptional,
+ value_apparentPowerThreshold);
+ }
+ jobject value_powerThresholdSource;
+ if (cppValue.Value().powerThresholdSource.IsNull())
+ {
+ value_powerThresholdSource = nullptr;
+ }
+ else
+ {
+ std::string value_powerThresholdSourceClassName = "java/lang/Integer";
+ std::string value_powerThresholdSourceCtorSignature = "(I)V";
+ jint jnivalue_powerThresholdSource = static_cast<jint>(cppValue.Value().powerThresholdSource.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_powerThresholdSourceClassName.c_str(), value_powerThresholdSourceCtorSignature.c_str(),
+ jnivalue_powerThresholdSource, value_powerThresholdSource);
+ }
+
+ {
+ jclass powerThresholdStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$MeterIdentificationClusterPowerThresholdStruct",
+ powerThresholdStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$MeterIdentificationClusterPowerThresholdStruct");
+ return nullptr;
+ }
+
+ jmethodID powerThresholdStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, powerThresholdStructStructClass_1, "<init>",
+ "(Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", &powerThresholdStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || powerThresholdStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$MeterIdentificationClusterPowerThresholdStruct constructor");
+ return nullptr;
+ }
+
+ value = env->NewObject(powerThresholdStructStructClass_1, powerThresholdStructStructCtor_1,
+ value_powerThreshold, value_apparentPowerThreshold, value_powerThresholdSource);
+ }
+ }
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
+ case app::Clusters::CommodityMetering::Id: {
+ using namespace app::Clusters::CommodityMetering;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::MeteredQuantity::Id: {
+ using TypeInfo = Attributes::MeteredQuantity::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_1 = cppValue.Value().begin();
+ while (iter_value_1.Next())
+ {
+ auto & entry_1 = iter_value_1.GetValue();
+ jobject newElement_1;
+ jobject newElement_1_tariffComponentIDs;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_1_tariffComponentIDs);
+
+ auto iter_newElement_1_tariffComponentIDs_3 = entry_1.tariffComponentIDs.begin();
+ while (iter_newElement_1_tariffComponentIDs_3.Next())
+ {
+ auto & entry_3 = iter_newElement_1_tariffComponentIDs_3.GetValue();
+ jobject newElement_3;
+ std::string newElement_3ClassName = "java/lang/Long";
+ std::string newElement_3CtorSignature = "(J)V";
+ jlong jninewElement_3 = static_cast<jlong>(entry_3);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3ClassName.c_str(), newElement_3CtorSignature.c_str(), jninewElement_3, newElement_3);
+ chip::JniReferences::GetInstance().AddToList(newElement_1_tariffComponentIDs, newElement_3);
+ }
+ jobject newElement_1_quantity;
+ std::string newElement_1_quantityClassName = "java/lang/Long";
+ std::string newElement_1_quantityCtorSignature = "(J)V";
+ jlong jninewElement_1_quantity = static_cast<jlong>(entry_1.quantity);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_1_quantityClassName.c_str(),
+ newElement_1_quantityCtorSignature.c_str(),
+ jninewElement_1_quantity, newElement_1_quantity);
+
+ {
+ jclass meteredQuantityStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityMeteringClusterMeteredQuantityStruct",
+ meteredQuantityStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityMeteringClusterMeteredQuantityStruct");
+ return nullptr;
+ }
+
+ jmethodID meteredQuantityStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(env, meteredQuantityStructStructClass_2, "<init>",
+ "(Ljava/util/ArrayList;Ljava/lang/Long;)V",
+ &meteredQuantityStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || meteredQuantityStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl,
+ "Could not find ChipStructs$CommodityMeteringClusterMeteredQuantityStruct constructor");
+ return nullptr;
+ }
+
+ newElement_1 = env->NewObject(meteredQuantityStructStructClass_2, meteredQuantityStructStructCtor_2,
+ newElement_1_tariffComponentIDs, newElement_1_quantity);
+ }
+ chip::JniReferences::GetInstance().AddToList(value, newElement_1);
+ }
+ }
+ return value;
+ }
+ case Attributes::MeteredQuantityTimestamp::Id: {
+ using TypeInfo = Attributes::MeteredQuantityTimestamp::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::MeasurementType::Id: {
+ using TypeInfo = Attributes::MeasurementType::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ if (cppValue.IsNull())
+ {
+ value = nullptr;
+ }
+ else
+ {
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ }
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast<jlong>(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast<jlong>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast<jint>(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::UnitTesting::Id: {
using namespace app::Clusters::UnitTesting;
switch (aPath.mAttributeId)
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index c4cd81d..a31e961 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -5226,6 +5226,555 @@
}
break;
}
+ case app::Clusters::CommodityPrice::Id: {
+ using namespace app::Clusters::CommodityPrice;
+ switch (aPath.mEventId)
+ {
+ case Events::PriceChange::Id: {
+ Events::PriceChange::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value_currentPrice;
+ jobject value_currentPrice_periodStart;
+ std::string value_currentPrice_periodStartClassName = "java/lang/Long";
+ std::string value_currentPrice_periodStartCtorSignature = "(J)V";
+ jlong jnivalue_currentPrice_periodStart = static_cast<jlong>(cppValue.currentPrice.periodStart);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_currentPrice_periodStartClassName.c_str(), value_currentPrice_periodStartCtorSignature.c_str(),
+ jnivalue_currentPrice_periodStart, value_currentPrice_periodStart);
+ jobject value_currentPrice_periodEnd;
+ if (cppValue.currentPrice.periodEnd.IsNull())
+ {
+ value_currentPrice_periodEnd = nullptr;
+ }
+ else
+ {
+ std::string value_currentPrice_periodEndClassName = "java/lang/Long";
+ std::string value_currentPrice_periodEndCtorSignature = "(J)V";
+ jlong jnivalue_currentPrice_periodEnd = static_cast<jlong>(cppValue.currentPrice.periodEnd.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_currentPrice_periodEndClassName.c_str(), value_currentPrice_periodEndCtorSignature.c_str(),
+ jnivalue_currentPrice_periodEnd, value_currentPrice_periodEnd);
+ }
+ jobject value_currentPrice_price;
+ jobject value_currentPrice_price_amount;
+ std::string value_currentPrice_price_amountClassName = "java/lang/Long";
+ std::string value_currentPrice_price_amountCtorSignature = "(J)V";
+ jlong jnivalue_currentPrice_price_amount = static_cast<jlong>(cppValue.currentPrice.price.amount);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ value_currentPrice_price_amountClassName.c_str(), value_currentPrice_price_amountCtorSignature.c_str(),
+ jnivalue_currentPrice_price_amount, value_currentPrice_price_amount);
+ jobject value_currentPrice_price_currency;
+ jobject value_currentPrice_price_currency_currency;
+ std::string value_currentPrice_price_currency_currencyClassName = "java/lang/Integer";
+ std::string value_currentPrice_price_currency_currencyCtorSignature = "(I)V";
+ jint jnivalue_currentPrice_price_currency_currency = static_cast<jint>(cppValue.currentPrice.price.currency.currency);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_currentPrice_price_currency_currencyClassName.c_str(),
+ value_currentPrice_price_currency_currencyCtorSignature.c_str(), jnivalue_currentPrice_price_currency_currency,
+ value_currentPrice_price_currency_currency);
+ jobject value_currentPrice_price_currency_decimalPoints;
+ std::string value_currentPrice_price_currency_decimalPointsClassName = "java/lang/Integer";
+ std::string value_currentPrice_price_currency_decimalPointsCtorSignature = "(I)V";
+ jint jnivalue_currentPrice_price_currency_decimalPoints =
+ static_cast<jint>(cppValue.currentPrice.price.currency.decimalPoints);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ value_currentPrice_price_currency_decimalPointsClassName.c_str(),
+ value_currentPrice_price_currency_decimalPointsCtorSignature.c_str(),
+ jnivalue_currentPrice_price_currency_decimalPoints, value_currentPrice_price_currency_decimalPoints);
+
+ {
+ jclass currencyStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct", currencyStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCurrencyStruct");
+ return nullptr;
+ }
+
+ jmethodID currencyStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(env, currencyStructStructClass_2, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ ¤cyStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || currencyStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCurrencyStruct constructor");
+ return nullptr;
+ }
+
+ value_currentPrice_price_currency =
+ env->NewObject(currencyStructStructClass_2, currencyStructStructCtor_2,
+ value_currentPrice_price_currency_currency, value_currentPrice_price_currency_decimalPoints);
+ }
+
+ {
+ jclass priceStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterPriceStruct", priceStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID priceStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, priceStructStructClass_1, "<init>",
+ "(Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct;)V",
+ &priceStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || priceStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterPriceStruct constructor");
+ return nullptr;
+ }
+
+ value_currentPrice_price = env->NewObject(priceStructStructClass_1, priceStructStructCtor_1,
+ value_currentPrice_price_amount, value_currentPrice_price_currency);
+ }
+ jobject value_currentPrice_description;
+ if (!cppValue.currentPrice.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_currentPrice_description);
+ }
+ else
+ {
+ jobject value_currentPrice_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.currentPrice.description.Value(),
+ value_currentPrice_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(value_currentPrice_descriptionInsideOptional,
+ value_currentPrice_description);
+ }
+ jobject value_currentPrice_components;
+ if (!cppValue.currentPrice.components.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, value_currentPrice_components);
+ }
+ else
+ {
+ jobject value_currentPrice_componentsInsideOptional;
+ chip::JniReferences::GetInstance().CreateArrayList(value_currentPrice_componentsInsideOptional);
+
+ auto iter_value_currentPrice_componentsInsideOptional_2 = cppValue.currentPrice.components.Value().begin();
+ while (iter_value_currentPrice_componentsInsideOptional_2.Next())
+ {
+ auto & entry_2 = iter_value_currentPrice_componentsInsideOptional_2.GetValue();
+ jobject newElement_2;
+ jobject newElement_2_price;
+ std::string newElement_2_priceClassName = "java/lang/Long";
+ std::string newElement_2_priceCtorSignature = "(J)V";
+ jlong jninewElement_2_price = static_cast<jlong>(entry_2.price);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_2_priceClassName.c_str(),
+ newElement_2_priceCtorSignature.c_str(),
+ jninewElement_2_price, newElement_2_price);
+ jobject newElement_2_source;
+ std::string newElement_2_sourceClassName = "java/lang/Integer";
+ std::string newElement_2_sourceCtorSignature = "(I)V";
+ jint jninewElement_2_source = static_cast<jint>(entry_2.source);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_2_sourceClassName.c_str(),
+ newElement_2_sourceCtorSignature.c_str(),
+ jninewElement_2_source, newElement_2_source);
+ jobject newElement_2_description;
+ if (!entry_2.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_description);
+ }
+ else
+ {
+ jobject newElement_2_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(
+ entry_2.description.Value(), newElement_2_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(newElement_2_descriptionInsideOptional,
+ newElement_2_description);
+ }
+ jobject newElement_2_tariffComponentID;
+ if (!entry_2.tariffComponentID.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_tariffComponentID);
+ }
+ else
+ {
+ jobject newElement_2_tariffComponentIDInsideOptional;
+ std::string newElement_2_tariffComponentIDInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_2_tariffComponentIDInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_2_tariffComponentIDInsideOptional =
+ static_cast<jlong>(entry_2.tariffComponentID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_2_tariffComponentIDInsideOptionalClassName.c_str(),
+ newElement_2_tariffComponentIDInsideOptionalCtorSignature.c_str(),
+ jninewElement_2_tariffComponentIDInsideOptional, newElement_2_tariffComponentIDInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_2_tariffComponentIDInsideOptional,
+ newElement_2_tariffComponentID);
+ }
+
+ {
+ jclass commodityPriceComponentStructStructClass_3;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct",
+ commodityPriceComponentStructStructClass_3);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl,
+ "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceComponentStructStructCtor_3;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceComponentStructStructClass_3, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceComponentStructStructCtor_3);
+ if (err != CHIP_NO_ERROR || commodityPriceComponentStructStructCtor_3 == nullptr)
+ {
+ ChipLogError(
+ Zcl, "Could not find ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_2 = env->NewObject(
+ commodityPriceComponentStructStructClass_3, commodityPriceComponentStructStructCtor_3,
+ newElement_2_price, newElement_2_source, newElement_2_description, newElement_2_tariffComponentID);
+ }
+ chip::JniReferences::GetInstance().AddToList(value_currentPrice_componentsInsideOptional, newElement_2);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(value_currentPrice_componentsInsideOptional,
+ value_currentPrice_components);
+ }
+
+ {
+ jclass commodityPriceStructStructClass_0;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceStruct",
+ commodityPriceStructStructClass_0);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceStructStructCtor_0;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceStructStructClass_0, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$CommodityPriceClusterPriceStruct;Ljava/"
+ "util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceStructStructCtor_0);
+ if (err != CHIP_NO_ERROR || commodityPriceStructStructCtor_0 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCommodityPriceStruct constructor");
+ return nullptr;
+ }
+
+ value_currentPrice =
+ env->NewObject(commodityPriceStructStructClass_0, commodityPriceStructStructCtor_0,
+ value_currentPrice_periodStart, value_currentPrice_periodEnd, value_currentPrice_price,
+ value_currentPrice_description, value_currentPrice_components);
+ }
+
+ jclass priceChangeStructClass;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipEventStructs$CommodityPriceClusterPriceChangeEvent", priceChangeStructClass);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipEventStructs$CommodityPriceClusterPriceChangeEvent");
+ return nullptr;
+ }
+
+ jmethodID priceChangeStructCtor;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, priceChangeStructClass, "<init>",
+ "(Lchip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceStruct;)V", &priceChangeStructCtor);
+ if (err != CHIP_NO_ERROR || priceChangeStructCtor == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipEventStructs$CommodityPriceClusterPriceChangeEvent constructor");
+ return nullptr;
+ }
+
+ jobject value = env->NewObject(priceChangeStructClass, priceChangeStructCtor, value_currentPrice);
+
+ return value;
+ }
+ case Events::ForecastChange::Id: {
+ Events::ForecastChange::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value_priceForecast;
+ chip::JniReferences::GetInstance().CreateArrayList(value_priceForecast);
+
+ auto iter_value_priceForecast_0 = cppValue.priceForecast.begin();
+ while (iter_value_priceForecast_0.Next())
+ {
+ auto & entry_0 = iter_value_priceForecast_0.GetValue();
+ jobject newElement_0;
+ jobject newElement_0_periodStart;
+ std::string newElement_0_periodStartClassName = "java/lang/Long";
+ std::string newElement_0_periodStartCtorSignature = "(J)V";
+ jlong jninewElement_0_periodStart = static_cast<jlong>(entry_0.periodStart);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_periodStartClassName.c_str(),
+ newElement_0_periodStartCtorSignature.c_str(),
+ jninewElement_0_periodStart, newElement_0_periodStart);
+ jobject newElement_0_periodEnd;
+ if (entry_0.periodEnd.IsNull())
+ {
+ newElement_0_periodEnd = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_periodEndClassName = "java/lang/Long";
+ std::string newElement_0_periodEndCtorSignature = "(J)V";
+ jlong jninewElement_0_periodEnd = static_cast<jlong>(entry_0.periodEnd.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_periodEndClassName.c_str(),
+ newElement_0_periodEndCtorSignature.c_str(),
+ jninewElement_0_periodEnd, newElement_0_periodEnd);
+ }
+ jobject newElement_0_price;
+ jobject newElement_0_price_amount;
+ std::string newElement_0_price_amountClassName = "java/lang/Long";
+ std::string newElement_0_price_amountCtorSignature = "(J)V";
+ jlong jninewElement_0_price_amount = static_cast<jlong>(entry_0.price.amount);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_0_price_amountClassName.c_str(), newElement_0_price_amountCtorSignature.c_str(),
+ jninewElement_0_price_amount, newElement_0_price_amount);
+ jobject newElement_0_price_currency;
+ jobject newElement_0_price_currency_currency;
+ std::string newElement_0_price_currency_currencyClassName = "java/lang/Integer";
+ std::string newElement_0_price_currency_currencyCtorSignature = "(I)V";
+ jint jninewElement_0_price_currency_currency = static_cast<jint>(entry_0.price.currency.currency);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_0_price_currency_currencyClassName.c_str(),
+ newElement_0_price_currency_currencyCtorSignature.c_str(), jninewElement_0_price_currency_currency,
+ newElement_0_price_currency_currency);
+ jobject newElement_0_price_currency_decimalPoints;
+ std::string newElement_0_price_currency_decimalPointsClassName = "java/lang/Integer";
+ std::string newElement_0_price_currency_decimalPointsCtorSignature = "(I)V";
+ jint jninewElement_0_price_currency_decimalPoints = static_cast<jint>(entry_0.price.currency.decimalPoints);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_0_price_currency_decimalPointsClassName.c_str(),
+ newElement_0_price_currency_decimalPointsCtorSignature.c_str(), jninewElement_0_price_currency_decimalPoints,
+ newElement_0_price_currency_decimalPoints);
+
+ {
+ jclass currencyStructStructClass_3;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct", currencyStructStructClass_3);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCurrencyStruct");
+ return nullptr;
+ }
+
+ jmethodID currencyStructStructCtor_3;
+ err = chip::JniReferences::GetInstance().FindMethod(env, currencyStructStructClass_3, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ ¤cyStructStructCtor_3);
+ if (err != CHIP_NO_ERROR || currencyStructStructCtor_3 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCurrencyStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0_price_currency =
+ env->NewObject(currencyStructStructClass_3, currencyStructStructCtor_3,
+ newElement_0_price_currency_currency, newElement_0_price_currency_decimalPoints);
+ }
+
+ {
+ jclass priceStructStructClass_2;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterPriceStruct", priceStructStructClass_2);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID priceStructStructCtor_2;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, priceStructStructClass_2, "<init>",
+ "(Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$CommodityPriceClusterCurrencyStruct;)V",
+ &priceStructStructCtor_2);
+ if (err != CHIP_NO_ERROR || priceStructStructCtor_2 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0_price = env->NewObject(priceStructStructClass_2, priceStructStructCtor_2,
+ newElement_0_price_amount, newElement_0_price_currency);
+ }
+ jobject newElement_0_description;
+ if (!entry_0.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_description);
+ }
+ else
+ {
+ jobject newElement_0_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.description.Value(),
+ newElement_0_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(newElement_0_descriptionInsideOptional,
+ newElement_0_description);
+ }
+ jobject newElement_0_components;
+ if (!entry_0.components.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_components);
+ }
+ else
+ {
+ jobject newElement_0_componentsInsideOptional;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_0_componentsInsideOptional);
+
+ auto iter_newElement_0_componentsInsideOptional_3 = entry_0.components.Value().begin();
+ while (iter_newElement_0_componentsInsideOptional_3.Next())
+ {
+ auto & entry_3 = iter_newElement_0_componentsInsideOptional_3.GetValue();
+ jobject newElement_3;
+ jobject newElement_3_price;
+ std::string newElement_3_priceClassName = "java/lang/Long";
+ std::string newElement_3_priceCtorSignature = "(J)V";
+ jlong jninewElement_3_price = static_cast<jlong>(entry_3.price);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_3_priceClassName.c_str(),
+ newElement_3_priceCtorSignature.c_str(),
+ jninewElement_3_price, newElement_3_price);
+ jobject newElement_3_source;
+ std::string newElement_3_sourceClassName = "java/lang/Integer";
+ std::string newElement_3_sourceCtorSignature = "(I)V";
+ jint jninewElement_3_source = static_cast<jint>(entry_3.source);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_3_sourceClassName.c_str(),
+ newElement_3_sourceCtorSignature.c_str(),
+ jninewElement_3_source, newElement_3_source);
+ jobject newElement_3_description;
+ if (!entry_3.description.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_description);
+ }
+ else
+ {
+ jobject newElement_3_descriptionInsideOptional;
+ LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(
+ entry_3.description.Value(), newElement_3_descriptionInsideOptional));
+ chip::JniReferences::GetInstance().CreateOptional(newElement_3_descriptionInsideOptional,
+ newElement_3_description);
+ }
+ jobject newElement_3_tariffComponentID;
+ if (!entry_3.tariffComponentID.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_tariffComponentID);
+ }
+ else
+ {
+ jobject newElement_3_tariffComponentIDInsideOptional;
+ std::string newElement_3_tariffComponentIDInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_3_tariffComponentIDInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_3_tariffComponentIDInsideOptional =
+ static_cast<jlong>(entry_3.tariffComponentID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_3_tariffComponentIDInsideOptionalClassName.c_str(),
+ newElement_3_tariffComponentIDInsideOptionalCtorSignature.c_str(),
+ jninewElement_3_tariffComponentIDInsideOptional, newElement_3_tariffComponentIDInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_3_tariffComponentIDInsideOptional,
+ newElement_3_tariffComponentID);
+ }
+
+ {
+ jclass commodityPriceComponentStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct",
+ commodityPriceComponentStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl,
+ "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceComponentStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceComponentStructStructClass_4, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceComponentStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || commodityPriceComponentStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(
+ Zcl,
+ "Could not find ChipStructs$CommodityPriceClusterCommodityPriceComponentStruct constructor");
+ return nullptr;
+ }
+
+ newElement_3 = env->NewObject(
+ commodityPriceComponentStructStructClass_4, commodityPriceComponentStructStructCtor_4,
+ newElement_3_price, newElement_3_source, newElement_3_description, newElement_3_tariffComponentID);
+ }
+ chip::JniReferences::GetInstance().AddToList(newElement_0_componentsInsideOptional, newElement_3);
+ }
+ chip::JniReferences::GetInstance().CreateOptional(newElement_0_componentsInsideOptional,
+ newElement_0_components);
+ }
+
+ {
+ jclass commodityPriceStructStructClass_1;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$CommodityPriceClusterCommodityPriceStruct",
+ commodityPriceStructStructClass_1);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$CommodityPriceClusterCommodityPriceStruct");
+ return nullptr;
+ }
+
+ jmethodID commodityPriceStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(
+ env, commodityPriceStructStructClass_1, "<init>",
+ "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/"
+ "ChipStructs$CommodityPriceClusterPriceStruct;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &commodityPriceStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || commodityPriceStructStructCtor_1 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$CommodityPriceClusterCommodityPriceStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0 = env->NewObject(commodityPriceStructStructClass_1, commodityPriceStructStructCtor_1,
+ newElement_0_periodStart, newElement_0_periodEnd, newElement_0_price,
+ newElement_0_description, newElement_0_components);
+ }
+ chip::JniReferences::GetInstance().AddToList(value_priceForecast, newElement_0);
+ }
+
+ jclass forecastChangeStructClass;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipEventStructs$CommodityPriceClusterForecastChangeEvent", forecastChangeStructClass);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipEventStructs$CommodityPriceClusterForecastChangeEvent");
+ return nullptr;
+ }
+
+ jmethodID forecastChangeStructCtor;
+ err = chip::JniReferences::GetInstance().FindMethod(env, forecastChangeStructClass, "<init>",
+ "(Ljava/util/ArrayList;)V", &forecastChangeStructCtor);
+ if (err != CHIP_NO_ERROR || forecastChangeStructCtor == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipEventStructs$CommodityPriceClusterForecastChangeEvent constructor");
+ return nullptr;
+ }
+
+ jobject value = env->NewObject(forecastChangeStructClass, forecastChangeStructCtor, value_priceForecast);
+
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::DemandResponseLoadControl::Id: {
using namespace app::Clusters::DemandResponseLoadControl;
switch (aPath.mEventId)
@@ -8636,6 +9185,16 @@
}
break;
}
+ case app::Clusters::CommodityTariff::Id: {
+ using namespace app::Clusters::CommodityTariff;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::EcosystemInformation::Id: {
using namespace app::Clusters::EcosystemInformation;
switch (aPath.mEventId)
@@ -8740,6 +9299,26 @@
}
break;
}
+ case app::Clusters::MeterIdentification::Id: {
+ using namespace app::Clusters::MeterIdentification;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
+ case app::Clusters::CommodityMetering::Id: {
+ using namespace app::Clusters::CommodityMetering;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::UnitTesting::Id: {
using namespace app::Clusters::UnitTesting;
switch (aPath.mEventId)
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index f4c8a92..8e4cfac 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -6204,6 +6204,82 @@
},
},
}
+ _COMMODITY_PRICE_CLUSTER_INFO = {
+ "clusterName": "CommodityPrice",
+ "clusterId": 0x00000095,
+ "commands": {
+ 0x00000000: {
+ "commandId": 0x00000000,
+ "commandName": "GetDetailedPriceRequest",
+ "args": {
+ "details": "int",
+ },
+ },
+ 0x00000002: {
+ "commandId": 0x00000002,
+ "commandName": "GetDetailedForecastRequest",
+ "args": {
+ "details": "int",
+ },
+ },
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "TariffUnit",
+ "attributeId": 0x00000000,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "Currency",
+ "attributeId": 0x00000001,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000002: {
+ "attributeName": "CurrentPrice",
+ "attributeId": 0x00000002,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000003: {
+ "attributeName": "PriceForecast",
+ "attributeId": 0x00000003,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO = {
"clusterName": "DemandResponseLoadControl",
"clusterId": 0x00000096,
@@ -13542,6 +13618,172 @@
},
},
}
+ _COMMODITY_TARIFF_CLUSTER_INFO = {
+ "clusterName": "CommodityTariff",
+ "clusterId": 0x00000700,
+ "commands": {
+ 0x00000000: {
+ "commandId": 0x00000000,
+ "commandName": "GetTariffComponent",
+ "args": {
+ "tariffComponentID": "int",
+ },
+ },
+ 0x00000001: {
+ "commandId": 0x00000001,
+ "commandName": "GetDayEntry",
+ "args": {
+ "dayEntryID": "int",
+ },
+ },
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "TariffInfo",
+ "attributeId": 0x00000000,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "TariffUnit",
+ "attributeId": 0x00000001,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000002: {
+ "attributeName": "StartDate",
+ "attributeId": 0x00000002,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000003: {
+ "attributeName": "DayEntries",
+ "attributeId": 0x00000003,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000004: {
+ "attributeName": "DayPatterns",
+ "attributeId": 0x00000004,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000005: {
+ "attributeName": "CalendarPeriods",
+ "attributeId": 0x00000005,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000006: {
+ "attributeName": "IndividualDays",
+ "attributeId": 0x00000006,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000007: {
+ "attributeName": "CurrentDay",
+ "attributeId": 0x00000007,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000008: {
+ "attributeName": "NextDay",
+ "attributeId": 0x00000008,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000009: {
+ "attributeName": "CurrentDayEntry",
+ "attributeId": 0x00000009,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000000A: {
+ "attributeName": "CurrentDayEntryDate",
+ "attributeId": 0x0000000A,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000000B: {
+ "attributeName": "NextDayEntry",
+ "attributeId": 0x0000000B,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000000C: {
+ "attributeName": "NextDayEntryDate",
+ "attributeId": 0x0000000C,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000000D: {
+ "attributeName": "TariffComponents",
+ "attributeId": 0x0000000D,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000000E: {
+ "attributeName": "TariffPeriods",
+ "attributeId": 0x0000000E,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000000F: {
+ "attributeName": "CurrentTariffComponents",
+ "attributeId": 0x0000000F,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000010: {
+ "attributeName": "NextTariffComponents",
+ "attributeId": 0x00000010,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000011: {
+ "attributeName": "DefaultRandomizationOffset",
+ "attributeId": 0x00000011,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000012: {
+ "attributeName": "DefaultRandomizationType",
+ "attributeId": 0x00000012,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_ECOSYSTEM_INFORMATION_CLUSTER_INFO = {
"clusterName": "EcosystemInformation",
"clusterId": 0x00000750,
@@ -13856,6 +14098,130 @@
},
},
}
+ _METER_IDENTIFICATION_CLUSTER_INFO = {
+ "clusterName": "MeterIdentification",
+ "clusterId": 0x00000B06,
+ "commands": {
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "MeterType",
+ "attributeId": 0x00000000,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "PointOfDelivery",
+ "attributeId": 0x00000001,
+ "type": "str",
+ "reportable": True,
+ },
+ 0x00000002: {
+ "attributeName": "MeterSerialNumber",
+ "attributeId": 0x00000002,
+ "type": "str",
+ "reportable": True,
+ },
+ 0x00000003: {
+ "attributeName": "ProtocolVersion",
+ "attributeId": 0x00000003,
+ "type": "str",
+ "reportable": True,
+ },
+ 0x00000004: {
+ "attributeName": "PowerThreshold",
+ "attributeId": 0x00000004,
+ "type": "",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
+ _COMMODITY_METERING_CLUSTER_INFO = {
+ "clusterName": "CommodityMetering",
+ "clusterId": 0x00000B07,
+ "commands": {
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "MeteredQuantity",
+ "attributeId": 0x00000000,
+ "type": "",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "MeteredQuantityTimestamp",
+ "attributeId": 0x00000001,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000002: {
+ "attributeName": "MeasurementType",
+ "attributeId": 0x00000002,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_UNIT_TESTING_CLUSTER_INFO = {
"clusterName": "UnitTesting",
"clusterId": 0xFFF1FC05,
@@ -14911,6 +15277,7 @@
0x00000090: _ELECTRICAL_POWER_MEASUREMENT_CLUSTER_INFO,
0x00000091: _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO,
0x00000094: _WATER_HEATER_MANAGEMENT_CLUSTER_INFO,
+ 0x00000095: _COMMODITY_PRICE_CLUSTER_INFO,
0x00000096: _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO,
0x00000097: _MESSAGES_CLUSTER_INFO,
0x00000098: _DEVICE_ENERGY_MANAGEMENT_CLUSTER_INFO,
@@ -14971,10 +15338,13 @@
0x00000554: _WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_INFO,
0x00000555: _PUSH_AV_STREAM_TRANSPORT_CLUSTER_INFO,
0x00000556: _CHIME_CLUSTER_INFO,
+ 0x00000700: _COMMODITY_TARIFF_CLUSTER_INFO,
0x00000750: _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
0x00000751: _COMMISSIONER_CONTROL_CLUSTER_INFO,
0x00000801: _TLS_CERTIFICATE_MANAGEMENT_CLUSTER_INFO,
0x00000802: _TLS_CLIENT_MANAGEMENT_CLUSTER_INFO,
+ 0x00000B06: _METER_IDENTIFICATION_CLUSTER_INFO,
+ 0x00000B07: _COMMODITY_METERING_CLUSTER_INFO,
0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO,
0xFFF1FC06: _FAULT_INJECTION_CLUSTER_INFO,
0xFFF1FC20: _SAMPLE_MEI_CLUSTER_INFO,
@@ -15047,6 +15417,7 @@
"ElectricalPowerMeasurement": _ELECTRICAL_POWER_MEASUREMENT_CLUSTER_INFO,
"ElectricalEnergyMeasurement": _ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER_INFO,
"WaterHeaterManagement": _WATER_HEATER_MANAGEMENT_CLUSTER_INFO,
+ "CommodityPrice": _COMMODITY_PRICE_CLUSTER_INFO,
"DemandResponseLoadControl": _DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER_INFO,
"Messages": _MESSAGES_CLUSTER_INFO,
"DeviceEnergyManagement": _DEVICE_ENERGY_MANAGEMENT_CLUSTER_INFO,
@@ -15107,10 +15478,13 @@
"WebRTCTransportRequestor": _WEB_RTC_TRANSPORT_REQUESTOR_CLUSTER_INFO,
"PushAvStreamTransport": _PUSH_AV_STREAM_TRANSPORT_CLUSTER_INFO,
"Chime": _CHIME_CLUSTER_INFO,
+ "CommodityTariff": _COMMODITY_TARIFF_CLUSTER_INFO,
"EcosystemInformation": _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
"CommissionerControl": _COMMISSIONER_CONTROL_CLUSTER_INFO,
"TlsCertificateManagement": _TLS_CERTIFICATE_MANAGEMENT_CLUSTER_INFO,
"TlsClientManagement": _TLS_CLIENT_MANAGEMENT_CLUSTER_INFO,
+ "MeterIdentification": _METER_IDENTIFICATION_CLUSTER_INFO,
+ "CommodityMetering": _COMMODITY_METERING_CLUSTER_INFO,
"UnitTesting": _UNIT_TESTING_CLUSTER_INFO,
"FaultInjection": _FAULT_INJECTION_CLUSTER_INFO,
"SampleMei": _SAMPLE_MEI_CLUSTER_INFO,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 7594dae..4d8b680 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -104,6 +104,7 @@
"ElectricalPowerMeasurement",
"ElectricalEnergyMeasurement",
"WaterHeaterManagement",
+ "CommodityPrice",
"DemandResponseLoadControl",
"Messages",
"DeviceEnergyManagement",
@@ -164,10 +165,13 @@
"WebRTCTransportRequestor",
"PushAvStreamTransport",
"Chime",
+ "CommodityTariff",
"EcosystemInformation",
"CommissionerControl",
"TlsCertificateManagement",
"TlsClientManagement",
+ "MeterIdentification",
+ "CommodityMetering",
"UnitTesting",
"FaultInjection",
"SampleMei",
@@ -391,6 +395,16 @@
# enum value. This specific value should never be transmitted.
kUnknownEnumValue = 7
+ class PowerThresholdSourceEnum(MatterIntEnum):
+ kContract = 0x00
+ kRegulator = 0x01
+ kEquipment = 0x02
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 3
+
class RelativePositionTag(MatterIntEnum):
kUnder = 0x00
kNextTo = 0x01
@@ -405,6 +419,27 @@
# enum value. This specific value should never be transmitted.
kUnknownEnumValue = 7
+ class TariffPriceTypeEnum(MatterIntEnum):
+ kStandard = 0x00
+ kCritical = 0x01
+ kVirtual = 0x02
+ kIncentive = 0x03
+ kIncentiveSignal = 0x04
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 5
+
+ class TariffUnitEnum(MatterIntEnum):
+ kKWh = 0x00
+ kKVAh = 0x01
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 2
+
class TestGlobalEnum(MatterIntEnum):
kSomeValue = 0x00
kSomeOtherValue = 0x01
@@ -433,6 +468,34 @@
class Structs:
@dataclass
+ class CurrencyStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="currency", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="decimalPoints", Tag=1, Type=uint),
+ ])
+
+ currency: 'uint' = 0
+ decimalPoints: 'uint' = 0
+
+ @dataclass
+ class PowerThresholdStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="powerThreshold", Tag=0, Type=typing.Optional[int]),
+ ClusterObjectFieldDescriptor(Label="apparentPowerThreshold", Tag=1, Type=typing.Optional[int]),
+ ClusterObjectFieldDescriptor(Label="powerThresholdSource", Tag=2, Type=typing.Union[Nullable, Globals.Enums.PowerThresholdSourceEnum]),
+ ])
+
+ powerThreshold: 'typing.Optional[int]' = None
+ apparentPowerThreshold: 'typing.Optional[int]' = None
+ powerThresholdSource: 'typing.Union[Nullable, Globals.Enums.PowerThresholdSourceEnum]' = NullValue
+
+ @dataclass
class TestGlobalStruct(ClusterObject):
@ChipUtility.classproperty
def descriptor(cls) -> ClusterObjectDescriptor:
@@ -463,6 +526,19 @@
areaType: 'typing.Union[Nullable, Globals.Enums.AreaTypeTag]' = NullValue
@dataclass
+ class PriceStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="amount", Tag=0, Type=int),
+ ClusterObjectFieldDescriptor(Label="currency", Tag=1, Type=Globals.Structs.CurrencyStruct),
+ ])
+
+ amount: 'int' = 0
+ currency: 'Globals.Structs.CurrencyStruct' = field(default_factory=lambda: Globals.Structs.CurrencyStruct())
+
+ @dataclass
class AtomicAttributeStatusStruct(ClusterObject):
@ChipUtility.classproperty
def descriptor(cls) -> ClusterObjectDescriptor:
@@ -21637,11 +21713,13 @@
kPowerFactor = 0x0C
kNeutralCurrent = 0x0D
kElectricalEnergy = 0x0E
+ kReactiveEnergy = 0x0F
+ kApparentEnergy = 0x10
# All received enum values that are not listed above will be mapped
# to kUnknownEnumValue. This is a helper enum value that should only
# be used by code to process how it handles receiving an unknown
# enum value. This specific value should never be transmitted.
- kUnknownEnumValue = 15
+ kUnknownEnumValue = 17
class PowerModeEnum(MatterIntEnum):
kUnknown = 0x00
@@ -22206,11 +22284,13 @@
kPowerFactor = 0x0C
kNeutralCurrent = 0x0D
kElectricalEnergy = 0x0E
+ kReactiveEnergy = 0x0F
+ kApparentEnergy = 0x10
# All received enum values that are not listed above will be mapped
# to kUnknownEnumValue. This is a helper enum value that should only
# be used by code to process how it handles receiving an unknown
# enum value. This specific value should never be transmitted.
- kUnknownEnumValue = 15
+ kUnknownEnumValue = 17
class Bitmaps:
class Feature(IntFlag):
@@ -22843,6 +22923,330 @@
@dataclass
+class CommodityPrice(Cluster):
+ id: typing.ClassVar[int] = 0x00000095
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="tariffUnit", Tag=0x00000000, Type=Globals.Enums.TariffUnitEnum),
+ ClusterObjectFieldDescriptor(Label="currency", Tag=0x00000001, Type=typing.Union[Nullable, Globals.Structs.CurrencyStruct]),
+ ClusterObjectFieldDescriptor(Label="currentPrice", Tag=0x00000002, Type=typing.Union[Nullable, CommodityPrice.Structs.CommodityPriceStruct]),
+ ClusterObjectFieldDescriptor(Label="priceForecast", Tag=0x00000003, Type=typing.Optional[typing.List[CommodityPrice.Structs.CommodityPriceStruct]]),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ tariffUnit: Globals.Enums.TariffUnitEnum = 0
+ currency: typing.Union[Nullable, Globals.Structs.CurrencyStruct] = NullValue
+ currentPrice: typing.Union[Nullable, CommodityPrice.Structs.CommodityPriceStruct] = NullValue
+ priceForecast: typing.Optional[typing.List[CommodityPrice.Structs.CommodityPriceStruct]] = None
+ generatedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ acceptedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ attributeList: typing.List[uint] = field(default_factory=lambda: [])
+ featureMap: uint = 0
+ clusterRevision: uint = 0
+
+ class Bitmaps:
+ class CommodityPriceDetailBitmap(IntFlag):
+ kDescription = 0x1
+ kComponents = 0x2
+
+ class Feature(IntFlag):
+ kForecasting = 0x1
+
+ class Structs:
+ @dataclass
+ class CommodityPriceComponentStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="price", Tag=0, Type=int),
+ ClusterObjectFieldDescriptor(Label="source", Tag=1, Type=Globals.Enums.TariffPriceTypeEnum),
+ ClusterObjectFieldDescriptor(Label="description", Tag=2, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="tariffComponentID", Tag=3, Type=typing.Optional[uint]),
+ ])
+
+ price: 'int' = 0
+ source: 'Globals.Enums.TariffPriceTypeEnum' = 0
+ description: 'typing.Optional[str]' = None
+ tariffComponentID: 'typing.Optional[uint]' = None
+
+ @dataclass
+ class CommodityPriceStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="periodStart", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="periodEnd", Tag=1, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="price", Tag=2, Type=Globals.Structs.PriceStruct),
+ ClusterObjectFieldDescriptor(Label="description", Tag=3, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="components", Tag=4, Type=typing.Optional[typing.List[CommodityPrice.Structs.CommodityPriceComponentStruct]]),
+ ])
+
+ periodStart: 'uint' = 0
+ periodEnd: 'typing.Union[Nullable, uint]' = NullValue
+ price: 'Globals.Structs.PriceStruct' = field(default_factory=lambda: Globals.Structs.PriceStruct())
+ description: 'typing.Optional[str]' = None
+ components: 'typing.Optional[typing.List[CommodityPrice.Structs.CommodityPriceComponentStruct]]' = None
+
+ class Commands:
+ @dataclass
+ class GetDetailedPriceRequest(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000095
+ command_id: typing.ClassVar[int] = 0x00000000
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'GetDetailedPriceResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="details", Tag=0, Type=uint),
+ ])
+
+ details: uint = 0
+
+ @dataclass
+ class GetDetailedPriceResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000095
+ command_id: typing.ClassVar[int] = 0x00000001
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="currentPrice", Tag=0, Type=typing.Union[Nullable, CommodityPrice.Structs.CommodityPriceStruct]),
+ ])
+
+ currentPrice: typing.Union[Nullable, CommodityPrice.Structs.CommodityPriceStruct] = NullValue
+
+ @dataclass
+ class GetDetailedForecastRequest(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000095
+ command_id: typing.ClassVar[int] = 0x00000002
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'GetDetailedForecastResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="details", Tag=0, Type=uint),
+ ])
+
+ details: uint = 0
+
+ @dataclass
+ class GetDetailedForecastResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000095
+ command_id: typing.ClassVar[int] = 0x00000003
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="priceForecast", Tag=0, Type=typing.List[CommodityPrice.Structs.CommodityPriceStruct]),
+ ])
+
+ priceForecast: typing.List[CommodityPrice.Structs.CommodityPriceStruct] = field(default_factory=lambda: [])
+
+ class Attributes:
+ @dataclass
+ class TariffUnit(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=Globals.Enums.TariffUnitEnum)
+
+ value: Globals.Enums.TariffUnitEnum = 0
+
+ @dataclass
+ class Currency(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, Globals.Structs.CurrencyStruct])
+
+ value: typing.Union[Nullable, Globals.Structs.CurrencyStruct] = NullValue
+
+ @dataclass
+ class CurrentPrice(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityPrice.Structs.CommodityPriceStruct])
+
+ value: typing.Union[Nullable, CommodityPrice.Structs.CommodityPriceStruct] = NullValue
+
+ @dataclass
+ class PriceForecast(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000003
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[CommodityPrice.Structs.CommodityPriceStruct]])
+
+ value: typing.Optional[typing.List[CommodityPrice.Structs.CommodityPriceStruct]] = None
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ class Events:
+ @dataclass
+ class PriceChange(ClusterEvent):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def event_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="currentPrice", Tag=0, Type=CommodityPrice.Structs.CommodityPriceStruct),
+ ])
+
+ currentPrice: CommodityPrice.Structs.CommodityPriceStruct = field(default_factory=lambda: CommodityPrice.Structs.CommodityPriceStruct())
+
+ @dataclass
+ class ForecastChange(ClusterEvent):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000095
+
+ @ChipUtility.classproperty
+ def event_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="priceForecast", Tag=0, Type=typing.List[CommodityPrice.Structs.CommodityPriceStruct]),
+ ])
+
+ priceForecast: typing.List[CommodityPrice.Structs.CommodityPriceStruct] = field(default_factory=lambda: [])
+
+
+@dataclass
class DemandResponseLoadControl(Cluster):
id: typing.ClassVar[int] = 0x00000096
@@ -49076,6 +49480,756 @@
@dataclass
+class CommodityTariff(Cluster):
+ id: typing.ClassVar[int] = 0x00000700
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="tariffInfo", Tag=0x00000000, Type=typing.Union[Nullable, CommodityTariff.Structs.TariffInformationStruct]),
+ ClusterObjectFieldDescriptor(Label="tariffUnit", Tag=0x00000001, Type=typing.Union[Nullable, Globals.Enums.TariffUnitEnum]),
+ ClusterObjectFieldDescriptor(Label="startDate", Tag=0x00000002, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="dayEntries", Tag=0x00000003, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayEntryStruct]]),
+ ClusterObjectFieldDescriptor(Label="dayPatterns", Tag=0x00000004, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayPatternStruct]]),
+ ClusterObjectFieldDescriptor(Label="calendarPeriods", Tag=0x00000005, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.CalendarPeriodStruct]]),
+ ClusterObjectFieldDescriptor(Label="individualDays", Tag=0x00000006, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayStruct]]),
+ ClusterObjectFieldDescriptor(Label="currentDay", Tag=0x00000007, Type=typing.Union[Nullable, CommodityTariff.Structs.DayStruct]),
+ ClusterObjectFieldDescriptor(Label="nextDay", Tag=0x00000008, Type=typing.Union[Nullable, CommodityTariff.Structs.DayStruct]),
+ ClusterObjectFieldDescriptor(Label="currentDayEntry", Tag=0x00000009, Type=typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct]),
+ ClusterObjectFieldDescriptor(Label="currentDayEntryDate", Tag=0x0000000A, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="nextDayEntry", Tag=0x0000000B, Type=typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct]),
+ ClusterObjectFieldDescriptor(Label="nextDayEntryDate", Tag=0x0000000C, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="tariffComponents", Tag=0x0000000D, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]]),
+ ClusterObjectFieldDescriptor(Label="tariffPeriods", Tag=0x0000000E, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffPeriodStruct]]),
+ ClusterObjectFieldDescriptor(Label="currentTariffComponents", Tag=0x0000000F, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]]),
+ ClusterObjectFieldDescriptor(Label="nextTariffComponents", Tag=0x00000010, Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]]),
+ ClusterObjectFieldDescriptor(Label="defaultRandomizationOffset", Tag=0x00000011, Type=typing.Union[None, Nullable, int]),
+ ClusterObjectFieldDescriptor(Label="defaultRandomizationType", Tag=0x00000012, Type=typing.Union[None, Nullable, CommodityTariff.Enums.DayEntryRandomizationTypeEnum]),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ tariffInfo: typing.Union[Nullable, CommodityTariff.Structs.TariffInformationStruct] = NullValue
+ tariffUnit: typing.Union[Nullable, Globals.Enums.TariffUnitEnum] = NullValue
+ startDate: typing.Union[Nullable, uint] = NullValue
+ dayEntries: typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayEntryStruct]] = NullValue
+ dayPatterns: typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayPatternStruct]] = NullValue
+ calendarPeriods: typing.Union[Nullable, typing.List[CommodityTariff.Structs.CalendarPeriodStruct]] = NullValue
+ individualDays: typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayStruct]] = NullValue
+ currentDay: typing.Union[Nullable, CommodityTariff.Structs.DayStruct] = NullValue
+ nextDay: typing.Union[Nullable, CommodityTariff.Structs.DayStruct] = NullValue
+ currentDayEntry: typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct] = NullValue
+ currentDayEntryDate: typing.Union[Nullable, uint] = NullValue
+ nextDayEntry: typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct] = NullValue
+ nextDayEntryDate: typing.Union[Nullable, uint] = NullValue
+ tariffComponents: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]] = NullValue
+ tariffPeriods: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffPeriodStruct]] = NullValue
+ currentTariffComponents: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]] = NullValue
+ nextTariffComponents: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]] = NullValue
+ defaultRandomizationOffset: typing.Union[None, Nullable, int] = None
+ defaultRandomizationType: typing.Union[None, Nullable, CommodityTariff.Enums.DayEntryRandomizationTypeEnum] = None
+ generatedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ acceptedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ attributeList: typing.List[uint] = field(default_factory=lambda: [])
+ featureMap: uint = 0
+ clusterRevision: uint = 0
+
+ class Enums:
+ class AuxiliaryLoadSettingEnum(MatterIntEnum):
+ kOff = 0x00
+ kOn = 0x01
+ kNone = 0x02
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 3
+
+ class BlockModeEnum(MatterIntEnum):
+ kNoBlock = 0x00
+ kCombined = 0x01
+ kIndividual = 0x02
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 3
+
+ class DayEntryRandomizationTypeEnum(MatterIntEnum):
+ kNone = 0x00
+ kFixed = 0x01
+ kRandom = 0x02
+ kRandomPositive = 0x03
+ kRandomNegative = 0x04
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 5
+
+ class DayTypeEnum(MatterIntEnum):
+ kStandard = 0x00
+ kHoliday = 0x01
+ kDynamic = 0x02
+ kEvent = 0x03
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 4
+
+ class PeakPeriodSeverityEnum(MatterIntEnum):
+ kUnused = 0x00
+ kLow = 0x01
+ kMedium = 0x02
+ kHigh = 0x03
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 4
+
+ class Bitmaps:
+ class DayPatternDayOfWeekBitmap(IntFlag):
+ kSunday = 0x1
+ kMonday = 0x2
+ kTuesday = 0x4
+ kWednesday = 0x8
+ kThursday = 0x10
+ kFriday = 0x20
+ kSaturday = 0x40
+
+ class Feature(IntFlag):
+ kPricing = 0x1
+ kFriendlyCredit = 0x2
+ kAuxiliaryLoad = 0x4
+ kPeakPeriod = 0x8
+ kPowerThreshold = 0x10
+ kRandomization = 0x20
+
+ class Structs:
+ @dataclass
+ class PeakPeriodStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="severity", Tag=0, Type=CommodityTariff.Enums.PeakPeriodSeverityEnum),
+ ClusterObjectFieldDescriptor(Label="peakPeriod", Tag=1, Type=uint),
+ ])
+
+ severity: 'CommodityTariff.Enums.PeakPeriodSeverityEnum' = 0
+ peakPeriod: 'uint' = 0
+
+ @dataclass
+ class AuxiliaryLoadSwitchSettingsStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="number", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="requiredState", Tag=1, Type=CommodityTariff.Enums.AuxiliaryLoadSettingEnum),
+ ])
+
+ number: 'uint' = 0
+ requiredState: 'CommodityTariff.Enums.AuxiliaryLoadSettingEnum' = 0
+
+ @dataclass
+ class TariffPriceStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="priceType", Tag=0, Type=Globals.Enums.TariffPriceTypeEnum),
+ ClusterObjectFieldDescriptor(Label="price", Tag=1, Type=typing.Optional[int]),
+ ClusterObjectFieldDescriptor(Label="priceLevel", Tag=2, Type=typing.Optional[int]),
+ ])
+
+ priceType: 'Globals.Enums.TariffPriceTypeEnum' = 0
+ price: 'typing.Optional[int]' = None
+ priceLevel: 'typing.Optional[int]' = None
+
+ @dataclass
+ class TariffComponentStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="tariffComponentID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="price", Tag=1, Type=typing.Union[None, Nullable, CommodityTariff.Structs.TariffPriceStruct]),
+ ClusterObjectFieldDescriptor(Label="friendlyCredit", Tag=2, Type=typing.Optional[bool]),
+ ClusterObjectFieldDescriptor(Label="auxiliaryLoad", Tag=3, Type=typing.Optional[CommodityTariff.Structs.AuxiliaryLoadSwitchSettingsStruct]),
+ ClusterObjectFieldDescriptor(Label="peakPeriod", Tag=4, Type=typing.Optional[CommodityTariff.Structs.PeakPeriodStruct]),
+ ClusterObjectFieldDescriptor(Label="powerThreshold", Tag=5, Type=typing.Optional[Globals.Structs.PowerThresholdStruct]),
+ ClusterObjectFieldDescriptor(Label="threshold", Tag=6, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="label", Tag=7, Type=typing.Union[None, Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="predicted", Tag=8, Type=typing.Optional[bool]),
+ ])
+
+ tariffComponentID: 'uint' = 0
+ price: 'typing.Union[None, Nullable, CommodityTariff.Structs.TariffPriceStruct]' = None
+ friendlyCredit: 'typing.Optional[bool]' = None
+ auxiliaryLoad: 'typing.Optional[CommodityTariff.Structs.AuxiliaryLoadSwitchSettingsStruct]' = None
+ peakPeriod: 'typing.Optional[CommodityTariff.Structs.PeakPeriodStruct]' = None
+ powerThreshold: 'typing.Optional[Globals.Structs.PowerThresholdStruct]' = None
+ threshold: 'typing.Union[Nullable, uint]' = NullValue
+ label: 'typing.Union[None, Nullable, str]' = None
+ predicted: 'typing.Optional[bool]' = None
+
+ @dataclass
+ class CalendarPeriodStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="startDate", Tag=0, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="dayPatternIDs", Tag=1, Type=typing.List[uint]),
+ ])
+
+ startDate: 'typing.Union[Nullable, uint]' = NullValue
+ dayPatternIDs: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class DayEntryStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="dayEntryID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="startTime", Tag=1, Type=uint),
+ ClusterObjectFieldDescriptor(Label="duration", Tag=2, Type=typing.Optional[uint]),
+ ClusterObjectFieldDescriptor(Label="randomizationOffset", Tag=3, Type=typing.Optional[int]),
+ ClusterObjectFieldDescriptor(Label="randomizationType", Tag=4, Type=typing.Optional[CommodityTariff.Enums.DayEntryRandomizationTypeEnum]),
+ ])
+
+ dayEntryID: 'uint' = 0
+ startTime: 'uint' = 0
+ duration: 'typing.Optional[uint]' = None
+ randomizationOffset: 'typing.Optional[int]' = None
+ randomizationType: 'typing.Optional[CommodityTariff.Enums.DayEntryRandomizationTypeEnum]' = None
+
+ @dataclass
+ class DayPatternStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="dayPatternID", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="daysOfWeek", Tag=1, Type=uint),
+ ClusterObjectFieldDescriptor(Label="dayEntryIDs", Tag=2, Type=typing.List[uint]),
+ ])
+
+ dayPatternID: 'uint' = 0
+ daysOfWeek: 'uint' = 0
+ dayEntryIDs: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class DayStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="date", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="dayType", Tag=1, Type=CommodityTariff.Enums.DayTypeEnum),
+ ClusterObjectFieldDescriptor(Label="dayEntryIDs", Tag=2, Type=typing.List[uint]),
+ ])
+
+ date: 'uint' = 0
+ dayType: 'CommodityTariff.Enums.DayTypeEnum' = 0
+ dayEntryIDs: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ @dataclass
+ class TariffInformationStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="tariffLabel", Tag=0, Type=typing.Union[Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="providerName", Tag=1, Type=typing.Union[Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="currency", Tag=2, Type=typing.Union[None, Nullable, Globals.Structs.CurrencyStruct]),
+ ClusterObjectFieldDescriptor(Label="blockMode", Tag=3, Type=typing.Union[Nullable, CommodityTariff.Enums.BlockModeEnum]),
+ ])
+
+ tariffLabel: 'typing.Union[Nullable, str]' = NullValue
+ providerName: 'typing.Union[Nullable, str]' = NullValue
+ currency: 'typing.Union[None, Nullable, Globals.Structs.CurrencyStruct]' = None
+ blockMode: 'typing.Union[Nullable, CommodityTariff.Enums.BlockModeEnum]' = NullValue
+
+ @dataclass
+ class TariffPeriodStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=typing.Union[Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="dayEntryIDs", Tag=1, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="tariffComponentIDs", Tag=2, Type=typing.List[uint]),
+ ])
+
+ label: 'typing.Union[Nullable, str]' = NullValue
+ dayEntryIDs: 'typing.List[uint]' = field(default_factory=lambda: [])
+ tariffComponentIDs: 'typing.List[uint]' = field(default_factory=lambda: [])
+
+ class Commands:
+ @dataclass
+ class GetTariffComponent(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000700
+ command_id: typing.ClassVar[int] = 0x00000000
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'GetTariffComponentResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="tariffComponentID", Tag=0, Type=uint),
+ ])
+
+ tariffComponentID: uint = 0
+
+ @dataclass
+ class GetTariffComponentResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000700
+ command_id: typing.ClassVar[int] = 0x00000000
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="label", Tag=0, Type=typing.Union[Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="dayEntryIDs", Tag=1, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="tariffComponent", Tag=2, Type=CommodityTariff.Structs.TariffComponentStruct),
+ ])
+
+ label: typing.Union[Nullable, str] = NullValue
+ dayEntryIDs: typing.List[uint] = field(default_factory=lambda: [])
+ tariffComponent: CommodityTariff.Structs.TariffComponentStruct = field(default_factory=lambda: CommodityTariff.Structs.TariffComponentStruct())
+
+ @dataclass
+ class GetDayEntry(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000700
+ command_id: typing.ClassVar[int] = 0x00000001
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'GetDayEntryResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="dayEntryID", Tag=0, Type=uint),
+ ])
+
+ dayEntryID: uint = 0
+
+ @dataclass
+ class GetDayEntryResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000700
+ command_id: typing.ClassVar[int] = 0x00000001
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="dayEntry", Tag=0, Type=CommodityTariff.Structs.DayEntryStruct),
+ ])
+
+ dayEntry: CommodityTariff.Structs.DayEntryStruct = field(default_factory=lambda: CommodityTariff.Structs.DayEntryStruct())
+
+ class Attributes:
+ @dataclass
+ class TariffInfo(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityTariff.Structs.TariffInformationStruct])
+
+ value: typing.Union[Nullable, CommodityTariff.Structs.TariffInformationStruct] = NullValue
+
+ @dataclass
+ class TariffUnit(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, Globals.Enums.TariffUnitEnum])
+
+ value: typing.Union[Nullable, Globals.Enums.TariffUnitEnum] = NullValue
+
+ @dataclass
+ class StartDate(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint])
+
+ value: typing.Union[Nullable, uint] = NullValue
+
+ @dataclass
+ class DayEntries(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000003
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayEntryStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayEntryStruct]] = NullValue
+
+ @dataclass
+ class DayPatterns(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000004
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayPatternStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayPatternStruct]] = NullValue
+
+ @dataclass
+ class CalendarPeriods(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000005
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.CalendarPeriodStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.CalendarPeriodStruct]] = NullValue
+
+ @dataclass
+ class IndividualDays(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000006
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.DayStruct]] = NullValue
+
+ @dataclass
+ class CurrentDay(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000007
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityTariff.Structs.DayStruct])
+
+ value: typing.Union[Nullable, CommodityTariff.Structs.DayStruct] = NullValue
+
+ @dataclass
+ class NextDay(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000008
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityTariff.Structs.DayStruct])
+
+ value: typing.Union[Nullable, CommodityTariff.Structs.DayStruct] = NullValue
+
+ @dataclass
+ class CurrentDayEntry(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000009
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct])
+
+ value: typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct] = NullValue
+
+ @dataclass
+ class CurrentDayEntryDate(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000000A
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint])
+
+ value: typing.Union[Nullable, uint] = NullValue
+
+ @dataclass
+ class NextDayEntry(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000000B
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct])
+
+ value: typing.Union[Nullable, CommodityTariff.Structs.DayEntryStruct] = NullValue
+
+ @dataclass
+ class NextDayEntryDate(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000000C
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint])
+
+ value: typing.Union[Nullable, uint] = NullValue
+
+ @dataclass
+ class TariffComponents(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000000D
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]] = NullValue
+
+ @dataclass
+ class TariffPeriods(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000000E
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffPeriodStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffPeriodStruct]] = NullValue
+
+ @dataclass
+ class CurrentTariffComponents(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000000F
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]] = NullValue
+
+ @dataclass
+ class NextTariffComponents(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000010
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityTariff.Structs.TariffComponentStruct]] = NullValue
+
+ @dataclass
+ class DefaultRandomizationOffset(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000011
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, int])
+
+ value: typing.Union[None, Nullable, int] = None
+
+ @dataclass
+ class DefaultRandomizationType(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000012
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, CommodityTariff.Enums.DayEntryRandomizationTypeEnum])
+
+ value: typing.Union[None, Nullable, CommodityTariff.Enums.DayEntryRandomizationTypeEnum] = None
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000700
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+
+@dataclass
class EcosystemInformation(Cluster):
id: typing.ClassVar[int] = 0x00000750
@@ -50200,6 +51354,410 @@
@dataclass
+class MeterIdentification(Cluster):
+ id: typing.ClassVar[int] = 0x00000B06
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="meterType", Tag=0x00000000, Type=typing.Union[Nullable, MeterIdentification.Enums.MeterTypeEnum]),
+ ClusterObjectFieldDescriptor(Label="pointOfDelivery", Tag=0x00000001, Type=typing.Union[Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="meterSerialNumber", Tag=0x00000002, Type=typing.Union[Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="protocolVersion", Tag=0x00000003, Type=typing.Union[None, Nullable, str]),
+ ClusterObjectFieldDescriptor(Label="powerThreshold", Tag=0x00000004, Type=typing.Union[None, Nullable, Globals.Structs.PowerThresholdStruct]),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ meterType: typing.Union[Nullable, MeterIdentification.Enums.MeterTypeEnum] = NullValue
+ pointOfDelivery: typing.Union[Nullable, str] = NullValue
+ meterSerialNumber: typing.Union[Nullable, str] = NullValue
+ protocolVersion: typing.Union[None, Nullable, str] = None
+ powerThreshold: typing.Union[None, Nullable, Globals.Structs.PowerThresholdStruct] = None
+ generatedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ acceptedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ attributeList: typing.List[uint] = field(default_factory=lambda: [])
+ featureMap: uint = 0
+ clusterRevision: uint = 0
+
+ class Enums:
+ class MeterTypeEnum(MatterIntEnum):
+ kUtility = 0x00
+ kPrivate = 0x01
+ kGeneric = 0x02
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 3
+
+ class Bitmaps:
+ class Feature(IntFlag):
+ kPowerThreshold = 0x1
+
+ class Attributes:
+ @dataclass
+ class MeterType(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, MeterIdentification.Enums.MeterTypeEnum])
+
+ value: typing.Union[Nullable, MeterIdentification.Enums.MeterTypeEnum] = NullValue
+
+ @dataclass
+ class PointOfDelivery(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, str])
+
+ value: typing.Union[Nullable, str] = NullValue
+
+ @dataclass
+ class MeterSerialNumber(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, str])
+
+ value: typing.Union[Nullable, str] = NullValue
+
+ @dataclass
+ class ProtocolVersion(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000003
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, str])
+
+ value: typing.Union[None, Nullable, str] = None
+
+ @dataclass
+ class PowerThreshold(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000004
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Globals.Structs.PowerThresholdStruct])
+
+ value: typing.Union[None, Nullable, Globals.Structs.PowerThresholdStruct] = None
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B06
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+
+@dataclass
+class CommodityMetering(Cluster):
+ id: typing.ClassVar[int] = 0x00000B07
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="meteredQuantity", Tag=0x00000000, Type=typing.Union[Nullable, typing.List[CommodityMetering.Structs.MeteredQuantityStruct]]),
+ ClusterObjectFieldDescriptor(Label="meteredQuantityTimestamp", Tag=0x00000001, Type=typing.Union[Nullable, uint]),
+ ClusterObjectFieldDescriptor(Label="measurementType", Tag=0x00000002, Type=typing.Union[Nullable, CommodityMetering.Enums.MeasurementTypeEnum]),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ meteredQuantity: typing.Union[Nullable, typing.List[CommodityMetering.Structs.MeteredQuantityStruct]] = NullValue
+ meteredQuantityTimestamp: typing.Union[Nullable, uint] = NullValue
+ measurementType: typing.Union[Nullable, CommodityMetering.Enums.MeasurementTypeEnum] = NullValue
+ generatedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ acceptedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ attributeList: typing.List[uint] = field(default_factory=lambda: [])
+ featureMap: uint = 0
+ clusterRevision: uint = 0
+
+ class Enums:
+ class MeasurementTypeEnum(MatterIntEnum):
+ kUnspecified = 0x00
+ kVoltage = 0x01
+ kActiveCurrent = 0x02
+ kReactiveCurrent = 0x03
+ kApparentCurrent = 0x04
+ kActivePower = 0x05
+ kReactivePower = 0x06
+ kApparentPower = 0x07
+ kRMSVoltage = 0x08
+ kRMSCurrent = 0x09
+ kRMSPower = 0x0A
+ kFrequency = 0x0B
+ kPowerFactor = 0x0C
+ kNeutralCurrent = 0x0D
+ kElectricalEnergy = 0x0E
+ kReactiveEnergy = 0x0F
+ kApparentEnergy = 0x10
+ # All received enum values that are not listed above will be mapped
+ # to kUnknownEnumValue. This is a helper enum value that should only
+ # be used by code to process how it handles receiving an unknown
+ # enum value. This specific value should never be transmitted.
+ kUnknownEnumValue = 17
+
+ class Structs:
+ @dataclass
+ class MeteredQuantityStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="tariffComponentIDs", Tag=0, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="quantity", Tag=1, Type=int),
+ ])
+
+ tariffComponentIDs: 'typing.List[uint]' = field(default_factory=lambda: [])
+ quantity: 'int' = 0
+
+ class Attributes:
+ @dataclass
+ class MeteredQuantity(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, typing.List[CommodityMetering.Structs.MeteredQuantityStruct]])
+
+ value: typing.Union[Nullable, typing.List[CommodityMetering.Structs.MeteredQuantityStruct]] = NullValue
+
+ @dataclass
+ class MeteredQuantityTimestamp(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, uint])
+
+ value: typing.Union[Nullable, uint] = NullValue
+
+ @dataclass
+ class MeasurementType(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.Union[Nullable, CommodityMetering.Enums.MeasurementTypeEnum])
+
+ value: typing.Union[Nullable, CommodityMetering.Enums.MeasurementTypeEnum] = NullValue
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000B07
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+
+@dataclass
class UnitTesting(Cluster):
id: typing.ClassVar[int] = 0xFFF1FC05
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 351f42e..7781f1a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -2822,6 +2822,42 @@
}
}
}
+static BOOL AttributeIsSpecifiedInCommodityPriceCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::CommodityPrice;
+ switch (aAttributeId) {
+ case Attributes::TariffUnit::Id: {
+ return YES;
+ }
+ case Attributes::Currency::Id: {
+ return YES;
+ }
+ case Attributes::CurrentPrice::Id: {
+ return YES;
+ }
+ case Attributes::PriceForecast::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInDemandResponseLoadControlCluster(AttributeId aAttributeId)
{
using namespace Clusters::DemandResponseLoadControl;
@@ -5993,6 +6029,87 @@
}
}
}
+static BOOL AttributeIsSpecifiedInCommodityTariffCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::CommodityTariff;
+ switch (aAttributeId) {
+ case Attributes::TariffInfo::Id: {
+ return YES;
+ }
+ case Attributes::TariffUnit::Id: {
+ return YES;
+ }
+ case Attributes::StartDate::Id: {
+ return YES;
+ }
+ case Attributes::DayEntries::Id: {
+ return YES;
+ }
+ case Attributes::DayPatterns::Id: {
+ return YES;
+ }
+ case Attributes::CalendarPeriods::Id: {
+ return YES;
+ }
+ case Attributes::IndividualDays::Id: {
+ return YES;
+ }
+ case Attributes::CurrentDay::Id: {
+ return YES;
+ }
+ case Attributes::NextDay::Id: {
+ return YES;
+ }
+ case Attributes::CurrentDayEntry::Id: {
+ return YES;
+ }
+ case Attributes::CurrentDayEntryDate::Id: {
+ return YES;
+ }
+ case Attributes::NextDayEntry::Id: {
+ return YES;
+ }
+ case Attributes::NextDayEntryDate::Id: {
+ return YES;
+ }
+ case Attributes::TariffComponents::Id: {
+ return YES;
+ }
+ case Attributes::TariffPeriods::Id: {
+ return YES;
+ }
+ case Attributes::CurrentTariffComponents::Id: {
+ return YES;
+ }
+ case Attributes::NextTariffComponents::Id: {
+ return YES;
+ }
+ case Attributes::DefaultRandomizationOffset::Id: {
+ return YES;
+ }
+ case Attributes::DefaultRandomizationType::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInEcosystemInformationCluster(AttributeId aAttributeId)
{
using namespace Clusters::EcosystemInformation;
@@ -6116,6 +6233,78 @@
}
}
}
+static BOOL AttributeIsSpecifiedInMeterIdentificationCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::MeterIdentification;
+ switch (aAttributeId) {
+ case Attributes::MeterType::Id: {
+ return YES;
+ }
+ case Attributes::PointOfDelivery::Id: {
+ return YES;
+ }
+ case Attributes::MeterSerialNumber::Id: {
+ return YES;
+ }
+ case Attributes::ProtocolVersion::Id: {
+ return YES;
+ }
+ case Attributes::PowerThreshold::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
+static BOOL AttributeIsSpecifiedInCommodityMeteringCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::CommodityMetering;
+ switch (aAttributeId) {
+ case Attributes::MeteredQuantity::Id: {
+ return YES;
+ }
+ case Attributes::MeteredQuantityTimestamp::Id: {
+ return YES;
+ }
+ case Attributes::MeasurementType::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId)
{
using namespace Clusters::UnitTesting;
@@ -6627,6 +6816,9 @@
case Clusters::WaterHeaterManagement::Id: {
return AttributeIsSpecifiedInWaterHeaterManagementCluster(aAttributeId);
}
+ case Clusters::CommodityPrice::Id: {
+ return AttributeIsSpecifiedInCommodityPriceCluster(aAttributeId);
+ }
case Clusters::DemandResponseLoadControl::Id: {
return AttributeIsSpecifiedInDemandResponseLoadControlCluster(aAttributeId);
}
@@ -6807,6 +6999,9 @@
case Clusters::Chime::Id: {
return AttributeIsSpecifiedInChimeCluster(aAttributeId);
}
+ case Clusters::CommodityTariff::Id: {
+ return AttributeIsSpecifiedInCommodityTariffCluster(aAttributeId);
+ }
case Clusters::EcosystemInformation::Id: {
return AttributeIsSpecifiedInEcosystemInformationCluster(aAttributeId);
}
@@ -6819,6 +7014,12 @@
case Clusters::TlsClientManagement::Id: {
return AttributeIsSpecifiedInTLSClientManagementCluster(aAttributeId);
}
+ case Clusters::MeterIdentification::Id: {
+ return AttributeIsSpecifiedInMeterIdentificationCluster(aAttributeId);
+ }
+ case Clusters::CommodityMetering::Id: {
+ return AttributeIsSpecifiedInCommodityMeteringCluster(aAttributeId);
+ }
case Clusters::UnitTesting::Id: {
return AttributeIsSpecifiedInUnitTestingCluster(aAttributeId);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index afc1125..a1f25ec 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -8299,6 +8299,203 @@
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForCommodityPriceCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::CommodityPrice;
+ switch (aAttributeId) {
+ case Attributes::TariffUnit::Id: {
+ using TypeInfo = Attributes::TariffUnit::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)];
+ return value;
+ }
+ case Attributes::Currency::Id: {
+ using TypeInfo = Attributes::Currency::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRDataTypeCurrencyStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRDataTypeCurrencyStruct new];
+ value.currency = [NSNumber numberWithUnsignedShort:cppValue.Value().currency];
+ value.decimalPoints = [NSNumber numberWithUnsignedChar:cppValue.Value().decimalPoints];
+ }
+ return value;
+ }
+ case Attributes::CurrentPrice::Id: {
+ using TypeInfo = Attributes::CurrentPrice::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ value.periodStart = [NSNumber numberWithUnsignedInt:cppValue.Value().periodStart];
+ if (cppValue.Value().periodEnd.IsNull()) {
+ value.periodEnd = nil;
+ } else {
+ value.periodEnd = [NSNumber numberWithUnsignedInt:cppValue.Value().periodEnd.Value()];
+ }
+ value.price = [MTRDataTypePriceStruct new];
+ value.price.amount = [NSNumber numberWithLongLong:cppValue.Value().price.amount];
+ value.price.currency = [MTRDataTypeCurrencyStruct new];
+ value.price.currency.currency = [NSNumber numberWithUnsignedShort:cppValue.Value().price.currency.currency];
+ value.price.currency.decimalPoints = [NSNumber numberWithUnsignedChar:cppValue.Value().price.currency.decimalPoints];
+ if (cppValue.Value().description.HasValue()) {
+ value.descriptionString = AsString(cppValue.Value().description.Value());
+ if (value.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ value.descriptionString = nil;
+ }
+ if (cppValue.Value().components.HasValue()) {
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = cppValue.Value().components.Value().begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ MTRCommodityPriceClusterCommodityPriceComponentStruct * newElement_3;
+ newElement_3 = [MTRCommodityPriceClusterCommodityPriceComponentStruct new];
+ newElement_3.price = [NSNumber numberWithLongLong:entry_3.price];
+ newElement_3.source = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3.source)];
+ if (entry_3.description.HasValue()) {
+ newElement_3.descriptionString = AsString(entry_3.description.Value());
+ if (newElement_3.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ newElement_3.descriptionString = nil;
+ }
+ if (entry_3.tariffComponentID.HasValue()) {
+ newElement_3.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_3.tariffComponentID.Value()];
+ } else {
+ newElement_3.tariffComponentID = nil;
+ }
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value.components = array_3;
+ }
+ } else {
+ value.components = nil;
+ }
+ }
+ return value;
+ }
+ case Attributes::PriceForecast::Id: {
+ using TypeInfo = Attributes::PriceForecast::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nonnull value;
+ { // Scope for our temporary variables
+ auto * array_0 = [NSMutableArray new];
+ auto iter_0 = cppValue.begin();
+ while (iter_0.Next()) {
+ auto & entry_0 = iter_0.GetValue();
+ MTRCommodityPriceClusterCommodityPriceStruct * newElement_0;
+ newElement_0 = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ newElement_0.periodStart = [NSNumber numberWithUnsignedInt:entry_0.periodStart];
+ if (entry_0.periodEnd.IsNull()) {
+ newElement_0.periodEnd = nil;
+ } else {
+ newElement_0.periodEnd = [NSNumber numberWithUnsignedInt:entry_0.periodEnd.Value()];
+ }
+ newElement_0.price = [MTRDataTypePriceStruct new];
+ newElement_0.price.amount = [NSNumber numberWithLongLong:entry_0.price.amount];
+ newElement_0.price.currency = [MTRDataTypeCurrencyStruct new];
+ newElement_0.price.currency.currency = [NSNumber numberWithUnsignedShort:entry_0.price.currency.currency];
+ newElement_0.price.currency.decimalPoints = [NSNumber numberWithUnsignedChar:entry_0.price.currency.decimalPoints];
+ if (entry_0.description.HasValue()) {
+ newElement_0.descriptionString = AsString(entry_0.description.Value());
+ if (newElement_0.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ newElement_0.descriptionString = nil;
+ }
+ if (entry_0.components.HasValue()) {
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_0.components.Value().begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ MTRCommodityPriceClusterCommodityPriceComponentStruct * newElement_3;
+ newElement_3 = [MTRCommodityPriceClusterCommodityPriceComponentStruct new];
+ newElement_3.price = [NSNumber numberWithLongLong:entry_3.price];
+ newElement_3.source = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3.source)];
+ if (entry_3.description.HasValue()) {
+ newElement_3.descriptionString = AsString(entry_3.description.Value());
+ if (newElement_3.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ newElement_3.descriptionString = nil;
+ }
+ if (entry_3.tariffComponentID.HasValue()) {
+ newElement_3.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_3.tariffComponentID.Value()];
+ } else {
+ newElement_3.tariffComponentID = nil;
+ }
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_0.components = array_3;
+ }
+ } else {
+ newElement_0.components = nil;
+ }
+ [array_0 addObject:newElement_0];
+ }
+ CHIP_ERROR err = iter_0.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_0;
+ }
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForDemandResponseLoadControlCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::DemandResponseLoadControl;
@@ -18299,6 +18496,897 @@
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForCommodityTariffCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::CommodityTariff;
+ switch (aAttributeId) {
+ case Attributes::TariffInfo::Id: {
+ using TypeInfo = Attributes::TariffInfo::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRCommodityTariffClusterTariffInformationStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRCommodityTariffClusterTariffInformationStruct new];
+ if (cppValue.Value().tariffLabel.IsNull()) {
+ value.tariffLabel = nil;
+ } else {
+ value.tariffLabel = AsString(cppValue.Value().tariffLabel.Value());
+ if (value.tariffLabel == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ if (cppValue.Value().providerName.IsNull()) {
+ value.providerName = nil;
+ } else {
+ value.providerName = AsString(cppValue.Value().providerName.Value());
+ if (value.providerName == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ if (cppValue.Value().currency.HasValue()) {
+ if (cppValue.Value().currency.Value().IsNull()) {
+ value.currency = nil;
+ } else {
+ value.currency = [MTRDataTypeCurrencyStruct new];
+ value.currency.currency = [NSNumber numberWithUnsignedShort:cppValue.Value().currency.Value().Value().currency];
+ value.currency.decimalPoints = [NSNumber numberWithUnsignedChar:cppValue.Value().currency.Value().Value().decimalPoints];
+ }
+ } else {
+ value.currency = nil;
+ }
+ if (cppValue.Value().blockMode.IsNull()) {
+ value.blockMode = nil;
+ } else {
+ value.blockMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().blockMode.Value())];
+ }
+ }
+ return value;
+ }
+ case Attributes::TariffUnit::Id: {
+ using TypeInfo = Attributes::TariffUnit::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())];
+ }
+ return value;
+ }
+ case Attributes::StartDate::Id: {
+ using TypeInfo = Attributes::StartDate::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedInt:cppValue.Value()];
+ }
+ return value;
+ }
+ case Attributes::DayEntries::Id: {
+ using TypeInfo = Attributes::DayEntries::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterDayEntryStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterDayEntryStruct new];
+ newElement_1.dayEntryID = [NSNumber numberWithUnsignedInt:entry_1.dayEntryID];
+ newElement_1.startTime = [NSNumber numberWithUnsignedShort:entry_1.startTime];
+ if (entry_1.duration.HasValue()) {
+ newElement_1.duration = [NSNumber numberWithUnsignedShort:entry_1.duration.Value()];
+ } else {
+ newElement_1.duration = nil;
+ }
+ if (entry_1.randomizationOffset.HasValue()) {
+ newElement_1.randomizationOffset = [NSNumber numberWithShort:entry_1.randomizationOffset.Value()];
+ } else {
+ newElement_1.randomizationOffset = nil;
+ }
+ if (entry_1.randomizationType.HasValue()) {
+ newElement_1.randomizationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.randomizationType.Value())];
+ } else {
+ newElement_1.randomizationType = nil;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::DayPatterns::Id: {
+ using TypeInfo = Attributes::DayPatterns::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterDayPatternStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterDayPatternStruct new];
+ newElement_1.dayPatternID = [NSNumber numberWithUnsignedInt:entry_1.dayPatternID];
+ newElement_1.daysOfWeek = [NSNumber numberWithUnsignedChar:entry_1.daysOfWeek.Raw()];
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_1.dayEntryIDs.begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ NSNumber * newElement_3;
+ newElement_3 = [NSNumber numberWithUnsignedInt:entry_3];
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_1.dayEntryIDs = array_3;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::CalendarPeriods::Id: {
+ using TypeInfo = Attributes::CalendarPeriods::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterCalendarPeriodStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterCalendarPeriodStruct new];
+ if (entry_1.startDate.IsNull()) {
+ newElement_1.startDate = nil;
+ } else {
+ newElement_1.startDate = [NSNumber numberWithUnsignedInt:entry_1.startDate.Value()];
+ }
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_1.dayPatternIDs.begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ NSNumber * newElement_3;
+ newElement_3 = [NSNumber numberWithUnsignedInt:entry_3];
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_1.dayPatternIDs = array_3;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::IndividualDays::Id: {
+ using TypeInfo = Attributes::IndividualDays::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterDayStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterDayStruct new];
+ newElement_1.date = [NSNumber numberWithUnsignedInt:entry_1.date];
+ newElement_1.dayType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.dayType)];
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_1.dayEntryIDs.begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ NSNumber * newElement_3;
+ newElement_3 = [NSNumber numberWithUnsignedInt:entry_3];
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_1.dayEntryIDs = array_3;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentDay::Id: {
+ using TypeInfo = Attributes::CurrentDay::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRCommodityTariffClusterDayStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRCommodityTariffClusterDayStruct new];
+ value.date = [NSNumber numberWithUnsignedInt:cppValue.Value().date];
+ value.dayType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().dayType)];
+ { // Scope for our temporary variables
+ auto * array_2 = [NSMutableArray new];
+ auto iter_2 = cppValue.Value().dayEntryIDs.begin();
+ while (iter_2.Next()) {
+ auto & entry_2 = iter_2.GetValue();
+ NSNumber * newElement_2;
+ newElement_2 = [NSNumber numberWithUnsignedInt:entry_2];
+ [array_2 addObject:newElement_2];
+ }
+ CHIP_ERROR err = iter_2.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value.dayEntryIDs = array_2;
+ }
+ }
+ return value;
+ }
+ case Attributes::NextDay::Id: {
+ using TypeInfo = Attributes::NextDay::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRCommodityTariffClusterDayStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRCommodityTariffClusterDayStruct new];
+ value.date = [NSNumber numberWithUnsignedInt:cppValue.Value().date];
+ value.dayType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().dayType)];
+ { // Scope for our temporary variables
+ auto * array_2 = [NSMutableArray new];
+ auto iter_2 = cppValue.Value().dayEntryIDs.begin();
+ while (iter_2.Next()) {
+ auto & entry_2 = iter_2.GetValue();
+ NSNumber * newElement_2;
+ newElement_2 = [NSNumber numberWithUnsignedInt:entry_2];
+ [array_2 addObject:newElement_2];
+ }
+ CHIP_ERROR err = iter_2.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value.dayEntryIDs = array_2;
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentDayEntry::Id: {
+ using TypeInfo = Attributes::CurrentDayEntry::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRCommodityTariffClusterDayEntryStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRCommodityTariffClusterDayEntryStruct new];
+ value.dayEntryID = [NSNumber numberWithUnsignedInt:cppValue.Value().dayEntryID];
+ value.startTime = [NSNumber numberWithUnsignedShort:cppValue.Value().startTime];
+ if (cppValue.Value().duration.HasValue()) {
+ value.duration = [NSNumber numberWithUnsignedShort:cppValue.Value().duration.Value()];
+ } else {
+ value.duration = nil;
+ }
+ if (cppValue.Value().randomizationOffset.HasValue()) {
+ value.randomizationOffset = [NSNumber numberWithShort:cppValue.Value().randomizationOffset.Value()];
+ } else {
+ value.randomizationOffset = nil;
+ }
+ if (cppValue.Value().randomizationType.HasValue()) {
+ value.randomizationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().randomizationType.Value())];
+ } else {
+ value.randomizationType = nil;
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentDayEntryDate::Id: {
+ using TypeInfo = Attributes::CurrentDayEntryDate::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedInt:cppValue.Value()];
+ }
+ return value;
+ }
+ case Attributes::NextDayEntry::Id: {
+ using TypeInfo = Attributes::NextDayEntry::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRCommodityTariffClusterDayEntryStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRCommodityTariffClusterDayEntryStruct new];
+ value.dayEntryID = [NSNumber numberWithUnsignedInt:cppValue.Value().dayEntryID];
+ value.startTime = [NSNumber numberWithUnsignedShort:cppValue.Value().startTime];
+ if (cppValue.Value().duration.HasValue()) {
+ value.duration = [NSNumber numberWithUnsignedShort:cppValue.Value().duration.Value()];
+ } else {
+ value.duration = nil;
+ }
+ if (cppValue.Value().randomizationOffset.HasValue()) {
+ value.randomizationOffset = [NSNumber numberWithShort:cppValue.Value().randomizationOffset.Value()];
+ } else {
+ value.randomizationOffset = nil;
+ }
+ if (cppValue.Value().randomizationType.HasValue()) {
+ value.randomizationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().randomizationType.Value())];
+ } else {
+ value.randomizationType = nil;
+ }
+ }
+ return value;
+ }
+ case Attributes::NextDayEntryDate::Id: {
+ using TypeInfo = Attributes::NextDayEntryDate::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedInt:cppValue.Value()];
+ }
+ return value;
+ }
+ case Attributes::TariffComponents::Id: {
+ using TypeInfo = Attributes::TariffComponents::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterTariffComponentStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterTariffComponentStruct new];
+ newElement_1.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_1.tariffComponentID];
+ if (entry_1.price.HasValue()) {
+ if (entry_1.price.Value().IsNull()) {
+ newElement_1.price = nil;
+ } else {
+ newElement_1.price = [MTRCommodityTariffClusterTariffPriceStruct new];
+ newElement_1.price.priceType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.price.Value().Value().priceType)];
+ if (entry_1.price.Value().Value().price.HasValue()) {
+ newElement_1.price.price = [NSNumber numberWithLongLong:entry_1.price.Value().Value().price.Value()];
+ } else {
+ newElement_1.price.price = nil;
+ }
+ if (entry_1.price.Value().Value().priceLevel.HasValue()) {
+ newElement_1.price.priceLevel = [NSNumber numberWithShort:entry_1.price.Value().Value().priceLevel.Value()];
+ } else {
+ newElement_1.price.priceLevel = nil;
+ }
+ }
+ } else {
+ newElement_1.price = nil;
+ }
+ if (entry_1.friendlyCredit.HasValue()) {
+ newElement_1.friendlyCredit = [NSNumber numberWithBool:entry_1.friendlyCredit.Value()];
+ } else {
+ newElement_1.friendlyCredit = nil;
+ }
+ if (entry_1.auxiliaryLoad.HasValue()) {
+ newElement_1.auxiliaryLoad = [MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct new];
+ newElement_1.auxiliaryLoad.number = [NSNumber numberWithUnsignedChar:entry_1.auxiliaryLoad.Value().number];
+ newElement_1.auxiliaryLoad.requiredState = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.auxiliaryLoad.Value().requiredState)];
+ } else {
+ newElement_1.auxiliaryLoad = nil;
+ }
+ if (entry_1.peakPeriod.HasValue()) {
+ newElement_1.peakPeriod = [MTRCommodityTariffClusterPeakPeriodStruct new];
+ newElement_1.peakPeriod.severity = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.peakPeriod.Value().severity)];
+ newElement_1.peakPeriod.peakPeriod = [NSNumber numberWithUnsignedShort:entry_1.peakPeriod.Value().peakPeriod];
+ } else {
+ newElement_1.peakPeriod = nil;
+ }
+ if (entry_1.powerThreshold.HasValue()) {
+ newElement_1.powerThreshold = [MTRDataTypePowerThresholdStruct new];
+ if (entry_1.powerThreshold.Value().powerThreshold.HasValue()) {
+ newElement_1.powerThreshold.powerThreshold = [NSNumber numberWithLongLong:entry_1.powerThreshold.Value().powerThreshold.Value()];
+ } else {
+ newElement_1.powerThreshold.powerThreshold = nil;
+ }
+ if (entry_1.powerThreshold.Value().apparentPowerThreshold.HasValue()) {
+ newElement_1.powerThreshold.apparentPowerThreshold = [NSNumber numberWithLongLong:entry_1.powerThreshold.Value().apparentPowerThreshold.Value()];
+ } else {
+ newElement_1.powerThreshold.apparentPowerThreshold = nil;
+ }
+ if (entry_1.powerThreshold.Value().powerThresholdSource.IsNull()) {
+ newElement_1.powerThreshold.powerThresholdSource = nil;
+ } else {
+ newElement_1.powerThreshold.powerThresholdSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.powerThreshold.Value().powerThresholdSource.Value())];
+ }
+ } else {
+ newElement_1.powerThreshold = nil;
+ }
+ if (entry_1.threshold.IsNull()) {
+ newElement_1.threshold = nil;
+ } else {
+ newElement_1.threshold = [NSNumber numberWithUnsignedInt:entry_1.threshold.Value()];
+ }
+ if (entry_1.label.HasValue()) {
+ if (entry_1.label.Value().IsNull()) {
+ newElement_1.label = nil;
+ } else {
+ newElement_1.label = AsString(entry_1.label.Value().Value());
+ if (newElement_1.label == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ } else {
+ newElement_1.label = nil;
+ }
+ if (entry_1.predicted.HasValue()) {
+ newElement_1.predicted = [NSNumber numberWithBool:entry_1.predicted.Value()];
+ } else {
+ newElement_1.predicted = nil;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::TariffPeriods::Id: {
+ using TypeInfo = Attributes::TariffPeriods::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterTariffPeriodStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterTariffPeriodStruct new];
+ if (entry_1.label.IsNull()) {
+ newElement_1.label = nil;
+ } else {
+ newElement_1.label = AsString(entry_1.label.Value());
+ if (newElement_1.label == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_1.dayEntryIDs.begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ NSNumber * newElement_3;
+ newElement_3 = [NSNumber numberWithUnsignedInt:entry_3];
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_1.dayEntryIDs = array_3;
+ }
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_1.tariffComponentIDs.begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ NSNumber * newElement_3;
+ newElement_3 = [NSNumber numberWithUnsignedInt:entry_3];
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_1.tariffComponentIDs = array_3;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::CurrentTariffComponents::Id: {
+ using TypeInfo = Attributes::CurrentTariffComponents::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterTariffComponentStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterTariffComponentStruct new];
+ newElement_1.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_1.tariffComponentID];
+ if (entry_1.price.HasValue()) {
+ if (entry_1.price.Value().IsNull()) {
+ newElement_1.price = nil;
+ } else {
+ newElement_1.price = [MTRCommodityTariffClusterTariffPriceStruct new];
+ newElement_1.price.priceType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.price.Value().Value().priceType)];
+ if (entry_1.price.Value().Value().price.HasValue()) {
+ newElement_1.price.price = [NSNumber numberWithLongLong:entry_1.price.Value().Value().price.Value()];
+ } else {
+ newElement_1.price.price = nil;
+ }
+ if (entry_1.price.Value().Value().priceLevel.HasValue()) {
+ newElement_1.price.priceLevel = [NSNumber numberWithShort:entry_1.price.Value().Value().priceLevel.Value()];
+ } else {
+ newElement_1.price.priceLevel = nil;
+ }
+ }
+ } else {
+ newElement_1.price = nil;
+ }
+ if (entry_1.friendlyCredit.HasValue()) {
+ newElement_1.friendlyCredit = [NSNumber numberWithBool:entry_1.friendlyCredit.Value()];
+ } else {
+ newElement_1.friendlyCredit = nil;
+ }
+ if (entry_1.auxiliaryLoad.HasValue()) {
+ newElement_1.auxiliaryLoad = [MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct new];
+ newElement_1.auxiliaryLoad.number = [NSNumber numberWithUnsignedChar:entry_1.auxiliaryLoad.Value().number];
+ newElement_1.auxiliaryLoad.requiredState = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.auxiliaryLoad.Value().requiredState)];
+ } else {
+ newElement_1.auxiliaryLoad = nil;
+ }
+ if (entry_1.peakPeriod.HasValue()) {
+ newElement_1.peakPeriod = [MTRCommodityTariffClusterPeakPeriodStruct new];
+ newElement_1.peakPeriod.severity = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.peakPeriod.Value().severity)];
+ newElement_1.peakPeriod.peakPeriod = [NSNumber numberWithUnsignedShort:entry_1.peakPeriod.Value().peakPeriod];
+ } else {
+ newElement_1.peakPeriod = nil;
+ }
+ if (entry_1.powerThreshold.HasValue()) {
+ newElement_1.powerThreshold = [MTRDataTypePowerThresholdStruct new];
+ if (entry_1.powerThreshold.Value().powerThreshold.HasValue()) {
+ newElement_1.powerThreshold.powerThreshold = [NSNumber numberWithLongLong:entry_1.powerThreshold.Value().powerThreshold.Value()];
+ } else {
+ newElement_1.powerThreshold.powerThreshold = nil;
+ }
+ if (entry_1.powerThreshold.Value().apparentPowerThreshold.HasValue()) {
+ newElement_1.powerThreshold.apparentPowerThreshold = [NSNumber numberWithLongLong:entry_1.powerThreshold.Value().apparentPowerThreshold.Value()];
+ } else {
+ newElement_1.powerThreshold.apparentPowerThreshold = nil;
+ }
+ if (entry_1.powerThreshold.Value().powerThresholdSource.IsNull()) {
+ newElement_1.powerThreshold.powerThresholdSource = nil;
+ } else {
+ newElement_1.powerThreshold.powerThresholdSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.powerThreshold.Value().powerThresholdSource.Value())];
+ }
+ } else {
+ newElement_1.powerThreshold = nil;
+ }
+ if (entry_1.threshold.IsNull()) {
+ newElement_1.threshold = nil;
+ } else {
+ newElement_1.threshold = [NSNumber numberWithUnsignedInt:entry_1.threshold.Value()];
+ }
+ if (entry_1.label.HasValue()) {
+ if (entry_1.label.Value().IsNull()) {
+ newElement_1.label = nil;
+ } else {
+ newElement_1.label = AsString(entry_1.label.Value().Value());
+ if (newElement_1.label == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ } else {
+ newElement_1.label = nil;
+ }
+ if (entry_1.predicted.HasValue()) {
+ newElement_1.predicted = [NSNumber numberWithBool:entry_1.predicted.Value()];
+ } else {
+ newElement_1.predicted = nil;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::NextTariffComponents::Id: {
+ using TypeInfo = Attributes::NextTariffComponents::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityTariffClusterTariffComponentStruct * newElement_1;
+ newElement_1 = [MTRCommodityTariffClusterTariffComponentStruct new];
+ newElement_1.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_1.tariffComponentID];
+ if (entry_1.price.HasValue()) {
+ if (entry_1.price.Value().IsNull()) {
+ newElement_1.price = nil;
+ } else {
+ newElement_1.price = [MTRCommodityTariffClusterTariffPriceStruct new];
+ newElement_1.price.priceType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.price.Value().Value().priceType)];
+ if (entry_1.price.Value().Value().price.HasValue()) {
+ newElement_1.price.price = [NSNumber numberWithLongLong:entry_1.price.Value().Value().price.Value()];
+ } else {
+ newElement_1.price.price = nil;
+ }
+ if (entry_1.price.Value().Value().priceLevel.HasValue()) {
+ newElement_1.price.priceLevel = [NSNumber numberWithShort:entry_1.price.Value().Value().priceLevel.Value()];
+ } else {
+ newElement_1.price.priceLevel = nil;
+ }
+ }
+ } else {
+ newElement_1.price = nil;
+ }
+ if (entry_1.friendlyCredit.HasValue()) {
+ newElement_1.friendlyCredit = [NSNumber numberWithBool:entry_1.friendlyCredit.Value()];
+ } else {
+ newElement_1.friendlyCredit = nil;
+ }
+ if (entry_1.auxiliaryLoad.HasValue()) {
+ newElement_1.auxiliaryLoad = [MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct new];
+ newElement_1.auxiliaryLoad.number = [NSNumber numberWithUnsignedChar:entry_1.auxiliaryLoad.Value().number];
+ newElement_1.auxiliaryLoad.requiredState = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.auxiliaryLoad.Value().requiredState)];
+ } else {
+ newElement_1.auxiliaryLoad = nil;
+ }
+ if (entry_1.peakPeriod.HasValue()) {
+ newElement_1.peakPeriod = [MTRCommodityTariffClusterPeakPeriodStruct new];
+ newElement_1.peakPeriod.severity = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.peakPeriod.Value().severity)];
+ newElement_1.peakPeriod.peakPeriod = [NSNumber numberWithUnsignedShort:entry_1.peakPeriod.Value().peakPeriod];
+ } else {
+ newElement_1.peakPeriod = nil;
+ }
+ if (entry_1.powerThreshold.HasValue()) {
+ newElement_1.powerThreshold = [MTRDataTypePowerThresholdStruct new];
+ if (entry_1.powerThreshold.Value().powerThreshold.HasValue()) {
+ newElement_1.powerThreshold.powerThreshold = [NSNumber numberWithLongLong:entry_1.powerThreshold.Value().powerThreshold.Value()];
+ } else {
+ newElement_1.powerThreshold.powerThreshold = nil;
+ }
+ if (entry_1.powerThreshold.Value().apparentPowerThreshold.HasValue()) {
+ newElement_1.powerThreshold.apparentPowerThreshold = [NSNumber numberWithLongLong:entry_1.powerThreshold.Value().apparentPowerThreshold.Value()];
+ } else {
+ newElement_1.powerThreshold.apparentPowerThreshold = nil;
+ }
+ if (entry_1.powerThreshold.Value().powerThresholdSource.IsNull()) {
+ newElement_1.powerThreshold.powerThresholdSource = nil;
+ } else {
+ newElement_1.powerThreshold.powerThresholdSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.powerThreshold.Value().powerThresholdSource.Value())];
+ }
+ } else {
+ newElement_1.powerThreshold = nil;
+ }
+ if (entry_1.threshold.IsNull()) {
+ newElement_1.threshold = nil;
+ } else {
+ newElement_1.threshold = [NSNumber numberWithUnsignedInt:entry_1.threshold.Value()];
+ }
+ if (entry_1.label.HasValue()) {
+ if (entry_1.label.Value().IsNull()) {
+ newElement_1.label = nil;
+ } else {
+ newElement_1.label = AsString(entry_1.label.Value().Value());
+ if (newElement_1.label == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ } else {
+ newElement_1.label = nil;
+ }
+ if (entry_1.predicted.HasValue()) {
+ newElement_1.predicted = [NSNumber numberWithBool:entry_1.predicted.Value()];
+ } else {
+ newElement_1.predicted = nil;
+ }
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::DefaultRandomizationOffset::Id: {
+ using TypeInfo = Attributes::DefaultRandomizationOffset::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithShort:cppValue.Value()];
+ }
+ return value;
+ }
+ case Attributes::DefaultRandomizationType::Id: {
+ using TypeInfo = Attributes::DefaultRandomizationType::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())];
+ }
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForEcosystemInformationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::EcosystemInformation;
@@ -18646,6 +19734,212 @@
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForMeterIdentificationCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::MeterIdentification;
+ switch (aAttributeId) {
+ case Attributes::MeterType::Id: {
+ using TypeInfo = Attributes::MeterType::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value())];
+ }
+ return value;
+ }
+ case Attributes::PointOfDelivery::Id: {
+ using TypeInfo = Attributes::PointOfDelivery::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSString * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = AsString(cppValue.Value());
+ if (value == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ return value;
+ }
+ case Attributes::MeterSerialNumber::Id: {
+ using TypeInfo = Attributes::MeterSerialNumber::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSString * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = AsString(cppValue.Value());
+ if (value == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ return value;
+ }
+ case Attributes::ProtocolVersion::Id: {
+ using TypeInfo = Attributes::ProtocolVersion::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSString * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = AsString(cppValue.Value());
+ if (value == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ }
+ return value;
+ }
+ case Attributes::PowerThreshold::Id: {
+ using TypeInfo = Attributes::PowerThreshold::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ MTRDataTypePowerThresholdStruct * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [MTRDataTypePowerThresholdStruct new];
+ if (cppValue.Value().powerThreshold.HasValue()) {
+ value.powerThreshold = [NSNumber numberWithLongLong:cppValue.Value().powerThreshold.Value()];
+ } else {
+ value.powerThreshold = nil;
+ }
+ if (cppValue.Value().apparentPowerThreshold.HasValue()) {
+ value.apparentPowerThreshold = [NSNumber numberWithLongLong:cppValue.Value().apparentPowerThreshold.Value()];
+ } else {
+ value.apparentPowerThreshold = nil;
+ }
+ if (cppValue.Value().powerThresholdSource.IsNull()) {
+ value.powerThresholdSource = nil;
+ } else {
+ value.powerThresholdSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue.Value().powerThresholdSource.Value())];
+ }
+ }
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
+static id _Nullable DecodeAttributeValueForCommodityMeteringCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::CommodityMetering;
+ switch (aAttributeId) {
+ case Attributes::MeteredQuantity::Id: {
+ using TypeInfo = Attributes::MeteredQuantity::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSArray * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ { // Scope for our temporary variables
+ auto * array_1 = [NSMutableArray new];
+ auto iter_1 = cppValue.Value().begin();
+ while (iter_1.Next()) {
+ auto & entry_1 = iter_1.GetValue();
+ MTRCommodityMeteringClusterMeteredQuantityStruct * newElement_1;
+ newElement_1 = [MTRCommodityMeteringClusterMeteredQuantityStruct new];
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_1.tariffComponentIDs.begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ NSNumber * newElement_3;
+ newElement_3 = [NSNumber numberWithUnsignedInt:entry_3];
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_1.tariffComponentIDs = array_3;
+ }
+ newElement_1.quantity = [NSNumber numberWithLongLong:entry_1.quantity];
+ [array_1 addObject:newElement_1];
+ }
+ CHIP_ERROR err = iter_1.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ value = array_1;
+ }
+ }
+ return value;
+ }
+ case Attributes::MeteredQuantityTimestamp::Id: {
+ using TypeInfo = Attributes::MeteredQuantityTimestamp::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedInt:cppValue.Value()];
+ }
+ return value;
+ }
+ case Attributes::MeasurementType::Id: {
+ using TypeInfo = Attributes::MeasurementType::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nullable value;
+ if (cppValue.IsNull()) {
+ value = nil;
+ } else {
+ value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue.Value())];
+ }
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForUnitTestingCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::UnitTesting;
@@ -20432,6 +21726,9 @@
case Clusters::WaterHeaterManagement::Id: {
return DecodeAttributeValueForWaterHeaterManagementCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::CommodityPrice::Id: {
+ return DecodeAttributeValueForCommodityPriceCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::DemandResponseLoadControl::Id: {
return DecodeAttributeValueForDemandResponseLoadControlCluster(aPath.mAttributeId, aReader, aError);
}
@@ -20612,6 +21909,9 @@
case Clusters::Chime::Id: {
return DecodeAttributeValueForChimeCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::CommodityTariff::Id: {
+ return DecodeAttributeValueForCommodityTariffCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::EcosystemInformation::Id: {
return DecodeAttributeValueForEcosystemInformationCluster(aPath.mAttributeId, aReader, aError);
}
@@ -20624,6 +21924,12 @@
case Clusters::TlsClientManagement::Id: {
return DecodeAttributeValueForTLSClientManagementCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::MeterIdentification::Id: {
+ return DecodeAttributeValueForMeterIdentificationCluster(aPath.mAttributeId, aReader, aError);
+ }
+ case Clusters::CommodityMetering::Id: {
+ return DecodeAttributeValueForCommodityMeteringCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::UnitTesting::Id: {
return DecodeAttributeValueForUnitTestingCluster(aPath.mAttributeId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 37ea632..4dbd919 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -7037,6 +7037,98 @@
@end
/**
+ * Cluster Commodity Price
+ *
+ * The Commodity Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterCommodityPrice : MTRGenericBaseCluster
+
+/**
+ * Command GetDetailedPriceRequest
+ *
+ * Upon receipt, this SHALL generate a GetDetailedPrice Response command.
+ */
+- (void)getDetailedPriceRequestWithParams:(MTRCommodityPriceClusterGetDetailedPriceRequestParams *)params completion:(void (^)(MTRCommodityPriceClusterGetDetailedPriceResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command GetDetailedForecastRequest
+ *
+ * Upon receipt, this SHALL generate a GetDetailedForecast Response command.
+ */
+- (void)getDetailedForecastRequestWithParams:(MTRCommodityPriceClusterGetDetailedForecastRequestParams *)params completion:(void (^)(MTRCommodityPriceClusterGetDetailedForecastResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeTariffUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeTariffUnitWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeTariffUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrencyWithCompletion:(void (^)(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrencyWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentPriceWithCompletion:(void (^)(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentPriceWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentPriceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributePriceForecastWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributePriceForecastWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributePriceForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterCommodityPrice (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
* Cluster Demand Response Load Control
*
* This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control.
@@ -15288,6 +15380,188 @@
@end
/**
+ * Cluster Commodity Tariff
+ *
+ * The CommodityTariffCluster provides the mechanism for communicating Commodity Tariff information within the premises.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterCommodityTariff : MTRGenericBaseCluster
+
+/**
+ * Command GetTariffComponent
+ *
+ * The GetTariffComponent command allows a client to request information for a tariff component identifier that may no longer be available in the TariffPeriods attributes.
+ */
+- (void)getTariffComponentWithParams:(MTRCommodityTariffClusterGetTariffComponentParams *)params completion:(void (^)(MTRCommodityTariffClusterGetTariffComponentResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command GetDayEntry
+ *
+ * The GetDayEntry command allows a client to request information for a calendar day entry identifier that may no longer be available in the CalendarPeriods or IndividualDays attributes.
+ */
+- (void)getDayEntryWithParams:(MTRCommodityTariffClusterGetDayEntryParams *)params completion:(void (^)(MTRCommodityTariffClusterGetDayEntryResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeTariffInfoWithCompletion:(void (^)(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeTariffInfoWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeTariffInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeTariffUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeTariffUnitWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeTariffUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeStartDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeStartDateWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeStartDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeDayEntriesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeDayEntriesWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeDayEntriesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeDayPatternsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeDayPatternsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeDayPatternsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCalendarPeriodsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCalendarPeriodsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCalendarPeriodsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeIndividualDaysWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeIndividualDaysWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeIndividualDaysWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentDayWithCompletion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentDayWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeNextDayWithCompletion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeNextDayWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeNextDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentDayEntryWithCompletion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentDayEntryWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentDayEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentDayEntryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentDayEntryDateWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentDayEntryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeNextDayEntryWithCompletion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeNextDayEntryWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeNextDayEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeNextDayEntryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeNextDayEntryDateWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeNextDayEntryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeTariffComponentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeTariffComponentsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeTariffComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeTariffPeriodsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeTariffPeriodsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeTariffPeriodsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentTariffComponentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentTariffComponentsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentTariffComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeNextTariffComponentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeNextTariffComponentsWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeNextTariffComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeDefaultRandomizationOffsetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeDefaultRandomizationOffsetWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeDefaultRandomizationOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeDefaultRandomizationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeDefaultRandomizationTypeWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeDefaultRandomizationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterCommodityTariff (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
* Cluster Ecosystem Information
*
* Provides extended device information for all the logical devices represented by a Bridged Node.
@@ -15650,6 +15924,164 @@
@end
/**
+ * Cluster Meter Identification
+ *
+ * This Meter Identification Cluster provides attributes for determining advanced information about utility metering device.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterMeterIdentification : MTRGenericBaseCluster
+
+- (void)readAttributeMeterTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMeterTypeWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMeterTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributePointOfDeliveryWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributePointOfDeliveryWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributePointOfDeliveryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeMeterSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMeterSerialNumberWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMeterSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeProtocolVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeProtocolVersionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeProtocolVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributePowerThresholdWithCompletion:(void (^)(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributePowerThresholdWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributePowerThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterMeterIdentification (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
+ * Cluster Commodity Metering
+ *
+ * The Commodity Metering Cluster provides the mechanism for communicating commodity consumption information within a premises.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterCommodityMetering : MTRGenericBaseCluster
+
+- (void)readAttributeMeteredQuantityWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMeteredQuantityWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMeteredQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeMeteredQuantityTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMeteredQuantityTimestampWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMeteredQuantityTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterCommodityMetering (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
* Cluster Unit Testing
*
* The Test Cluster is meant to validate the generated code
@@ -16915,6 +17347,12 @@
MTRDataTypePositionTagColumn MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06,
} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
+typedef NS_ENUM(uint8_t, MTRDataTypePowerThresholdSourceEnum) {
+ MTRDataTypePowerThresholdSourceEnumContract MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRDataTypePowerThresholdSourceEnumRegulator MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRDataTypePowerThresholdSourceEnumEquipment MTR_PROVISIONALLY_AVAILABLE = 0x02,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_ENUM(uint8_t, MTRDataTypeRelativePositionTag) {
MTRDataTypeRelativePositionTagUnder MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00,
MTRDataTypeRelativePositionTagNextTo MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x01,
@@ -16925,6 +17363,19 @@
MTRDataTypeRelativePositionTagBehind MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x06,
} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
+typedef NS_ENUM(uint8_t, MTRDataTypeTariffPriceTypeEnum) {
+ MTRDataTypeTariffPriceTypeEnumStandard MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRDataTypeTariffPriceTypeEnumCritical MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRDataTypeTariffPriceTypeEnumVirtual MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRDataTypeTariffPriceTypeEnumIncentive MTR_PROVISIONALLY_AVAILABLE = 0x03,
+ MTRDataTypeTariffPriceTypeEnumIncentiveSignal MTR_PROVISIONALLY_AVAILABLE = 0x04,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint8_t, MTRDataTypeTariffUnitEnum) {
+ MTRDataTypeTariffUnitEnumKWh MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRDataTypeTariffUnitEnumKVAh MTR_PROVISIONALLY_AVAILABLE = 0x01,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_ENUM(uint8_t, MTRDataTypeTestGlobalEnum) {
MTRDataTypeTestGlobalEnumSomeValue MTR_PROVISIONALLY_AVAILABLE = 0x00,
MTRDataTypeTestGlobalEnumSomeOtherValue MTR_PROVISIONALLY_AVAILABLE = 0x01,
@@ -18455,6 +18906,8 @@
MTRElectricalPowerMeasurementMeasurementTypePowerFactor MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0C,
MTRElectricalPowerMeasurementMeasurementTypeNeutralCurrent MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0D,
MTRElectricalPowerMeasurementMeasurementTypeElectricalEnergy MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x0E,
+ MTRElectricalPowerMeasurementMeasurementTypeReactiveEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0F,
+ MTRElectricalPowerMeasurementMeasurementTypeApparentEnergy MTR_PROVISIONALLY_AVAILABLE = 0x10,
} MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6));
typedef NS_ENUM(uint8_t, MTRElectricalPowerMeasurementPowerMode) {
@@ -18487,6 +18940,8 @@
MTRElectricalEnergyMeasurementMeasurementTypePowerFactor MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0C,
MTRElectricalEnergyMeasurementMeasurementTypeNeutralCurrent MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0D,
MTRElectricalEnergyMeasurementMeasurementTypeElectricalEnergy MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0E,
+ MTRElectricalEnergyMeasurementMeasurementTypeReactiveEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0F,
+ MTRElectricalEnergyMeasurementMeasurementTypeApparentEnergy MTR_PROVISIONALLY_AVAILABLE = 0x10,
} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
typedef NS_OPTIONS(uint32_t, MTRElectricalEnergyMeasurementFeature) {
@@ -18514,6 +18969,15 @@
MTRWaterHeaterManagementWaterHeaterHeatSourceBitmapOther MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x10,
} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
+typedef NS_OPTIONS(uint16_t, MTRCommodityPriceDetailBitmap) {
+ MTRCommodityPriceDetailBitmapDescription MTR_PROVISIONALLY_AVAILABLE = 0x1,
+ MTRCommodityPriceDetailBitmapComponents MTR_PROVISIONALLY_AVAILABLE = 0x2,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_OPTIONS(uint32_t, MTRCommodityPriceFeature) {
+ MTRCommodityPriceFeatureForecasting MTR_PROVISIONALLY_AVAILABLE = 0x1,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_ENUM(uint8_t, MTRDemandResponseLoadControlCriticalityLevel) {
MTRDemandResponseLoadControlCriticalityLevelUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00,
MTRDemandResponseLoadControlCriticalityLevelGreen MTR_PROVISIONALLY_AVAILABLE = 0x01,
@@ -21103,6 +21567,59 @@
MTRPushAVStreamTransportSupportedIngestMethodsBitmapCMAFIngest MTR_PROVISIONALLY_AVAILABLE = 0x1,
} MTR_PROVISIONALLY_AVAILABLE;
+typedef NS_ENUM(uint8_t, MTRCommodityTariffAuxiliaryLoadSetting) {
+ MTRCommodityTariffAuxiliaryLoadSettingOff MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRCommodityTariffAuxiliaryLoadSettingOn MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRCommodityTariffAuxiliaryLoadSettingNone MTR_PROVISIONALLY_AVAILABLE = 0x02,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint8_t, MTRCommodityTariffBlockMode) {
+ MTRCommodityTariffBlockModeNoBlock MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRCommodityTariffBlockModeCombined MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRCommodityTariffBlockModeIndividual MTR_PROVISIONALLY_AVAILABLE = 0x02,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint8_t, MTRCommodityTariffDayEntryRandomizationType) {
+ MTRCommodityTariffDayEntryRandomizationTypeNone MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRCommodityTariffDayEntryRandomizationTypeFixed MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRCommodityTariffDayEntryRandomizationTypeRandom MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRCommodityTariffDayEntryRandomizationTypeRandomPositive MTR_PROVISIONALLY_AVAILABLE = 0x03,
+ MTRCommodityTariffDayEntryRandomizationTypeRandomNegative MTR_PROVISIONALLY_AVAILABLE = 0x04,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint8_t, MTRCommodityTariffDayType) {
+ MTRCommodityTariffDayTypeStandard MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRCommodityTariffDayTypeHoliday MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRCommodityTariffDayTypeDynamic MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRCommodityTariffDayTypeEvent MTR_PROVISIONALLY_AVAILABLE = 0x03,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint8_t, MTRCommodityTariffPeakPeriodSeverity) {
+ MTRCommodityTariffPeakPeriodSeverityUnused MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRCommodityTariffPeakPeriodSeverityLow MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRCommodityTariffPeakPeriodSeverityMedium MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRCommodityTariffPeakPeriodSeverityHigh MTR_PROVISIONALLY_AVAILABLE = 0x03,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_OPTIONS(uint8_t, MTRCommodityTariffDayPatternDayOfWeekBitmap) {
+ MTRCommodityTariffDayPatternDayOfWeekBitmapSunday MTR_PROVISIONALLY_AVAILABLE = 0x1,
+ MTRCommodityTariffDayPatternDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2,
+ MTRCommodityTariffDayPatternDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4,
+ MTRCommodityTariffDayPatternDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8,
+ MTRCommodityTariffDayPatternDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10,
+ MTRCommodityTariffDayPatternDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20,
+ MTRCommodityTariffDayPatternDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_OPTIONS(uint32_t, MTRCommodityTariffFeature) {
+ MTRCommodityTariffFeaturePricing MTR_PROVISIONALLY_AVAILABLE = 0x1,
+ MTRCommodityTariffFeatureFriendlyCredit MTR_PROVISIONALLY_AVAILABLE = 0x2,
+ MTRCommodityTariffFeatureAuxiliaryLoad MTR_PROVISIONALLY_AVAILABLE = 0x4,
+ MTRCommodityTariffFeaturePeakPeriod MTR_PROVISIONALLY_AVAILABLE = 0x8,
+ MTRCommodityTariffFeaturePowerThreshold MTR_PROVISIONALLY_AVAILABLE = 0x10,
+ MTRCommodityTariffFeatureRandomization MTR_PROVISIONALLY_AVAILABLE = 0x20,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_OPTIONS(uint32_t, MTRCommissionerControlSupportedDeviceCategoryBitmap) {
MTRCommissionerControlSupportedDeviceCategoryBitmapFabricSynchronization MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x1,
} MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
@@ -21112,6 +21629,36 @@
MTRTLSClientManagementTLSEndpointStatusInUse MTR_PROVISIONALLY_AVAILABLE = 0x01,
} MTR_PROVISIONALLY_AVAILABLE;
+typedef NS_ENUM(uint8_t, MTRMeterIdentificationMeterType) {
+ MTRMeterIdentificationMeterTypeUtility MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRMeterIdentificationMeterTypePrivate MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRMeterIdentificationMeterTypeGeneric MTR_PROVISIONALLY_AVAILABLE = 0x02,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_OPTIONS(uint32_t, MTRMeterIdentificationFeature) {
+ MTRMeterIdentificationFeaturePowerThreshold MTR_PROVISIONALLY_AVAILABLE = 0x1,
+} MTR_PROVISIONALLY_AVAILABLE;
+
+typedef NS_ENUM(uint16_t, MTRCommodityMeteringMeasurementType) {
+ MTRCommodityMeteringMeasurementTypeUnspecified MTR_PROVISIONALLY_AVAILABLE = 0x00,
+ MTRCommodityMeteringMeasurementTypeVoltage MTR_PROVISIONALLY_AVAILABLE = 0x01,
+ MTRCommodityMeteringMeasurementTypeActiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRCommodityMeteringMeasurementTypeReactiveCurrent MTR_PROVISIONALLY_AVAILABLE = 0x03,
+ MTRCommodityMeteringMeasurementTypeApparentCurrent MTR_PROVISIONALLY_AVAILABLE = 0x04,
+ MTRCommodityMeteringMeasurementTypeActivePower MTR_PROVISIONALLY_AVAILABLE = 0x05,
+ MTRCommodityMeteringMeasurementTypeReactivePower MTR_PROVISIONALLY_AVAILABLE = 0x06,
+ MTRCommodityMeteringMeasurementTypeApparentPower MTR_PROVISIONALLY_AVAILABLE = 0x07,
+ MTRCommodityMeteringMeasurementTypeRMSVoltage MTR_PROVISIONALLY_AVAILABLE = 0x08,
+ MTRCommodityMeteringMeasurementTypeRMSCurrent MTR_PROVISIONALLY_AVAILABLE = 0x09,
+ MTRCommodityMeteringMeasurementTypeRMSPower MTR_PROVISIONALLY_AVAILABLE = 0x0A,
+ MTRCommodityMeteringMeasurementTypeFrequency MTR_PROVISIONALLY_AVAILABLE = 0x0B,
+ MTRCommodityMeteringMeasurementTypePowerFactor MTR_PROVISIONALLY_AVAILABLE = 0x0C,
+ MTRCommodityMeteringMeasurementTypeNeutralCurrent MTR_PROVISIONALLY_AVAILABLE = 0x0D,
+ MTRCommodityMeteringMeasurementTypeElectricalEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0E,
+ MTRCommodityMeteringMeasurementTypeReactiveEnergy MTR_PROVISIONALLY_AVAILABLE = 0x0F,
+ MTRCommodityMeteringMeasurementTypeApparentEnergy MTR_PROVISIONALLY_AVAILABLE = 0x10,
+} MTR_PROVISIONALLY_AVAILABLE;
+
typedef NS_ENUM(uint8_t, MTRUnitTestingSimple) {
MTRUnitTestingSimpleUnspecified MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00,
MTRUnitTestingSimpleValueA MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 9d06019..f22478b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -47276,6 +47276,383 @@
@end
+@implementation MTRBaseClusterCommodityPrice
+
+- (void)getDetailedPriceRequestWithParams:(MTRCommodityPriceClusterGetDetailedPriceRequestParams *)params completion:(void (^)(MTRCommodityPriceClusterGetDetailedPriceResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityPriceClusterGetDetailedPriceRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityPrice::Commands::GetDetailedPriceRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityPriceClusterGetDetailedPriceResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)getDetailedForecastRequestWithParams:(MTRCommodityPriceClusterGetDetailedForecastRequestParams *)params completion:(void (^)(MTRCommodityPriceClusterGetDetailedForecastResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityPriceClusterGetDetailedForecastRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityPrice::Commands::GetDetailedForecastRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityPriceClusterGetDetailedForecastResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)readAttributeTariffUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::TariffUnit::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeTariffUnitWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::TariffUnit::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeTariffUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::TariffUnit::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrencyWithCompletion:(void (^)(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::Currency::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrencyWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::Currency::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::Currency::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentPriceWithCompletion:(void (^)(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::CurrentPrice::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentPriceWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::CurrentPrice::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentPriceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::CurrentPrice::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributePriceForecastWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::PriceForecast::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributePriceForecastWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::PriceForecast::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributePriceForecastWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::PriceForecast::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityPrice::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityPrice::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterDemandResponseLoadControl
- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params completion:(MTRStatusCompletion)completion
@@ -103424,6 +103801,923 @@
@end
+@implementation MTRBaseClusterCommodityTariff
+
+- (void)getTariffComponentWithParams:(MTRCommodityTariffClusterGetTariffComponentParams *)params completion:(void (^)(MTRCommodityTariffClusterGetTariffComponentResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityTariffClusterGetTariffComponentParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityTariff::Commands::GetTariffComponent::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityTariffClusterGetTariffComponentResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)getDayEntryWithParams:(MTRCommodityTariffClusterGetDayEntryParams *)params completion:(void (^)(MTRCommodityTariffClusterGetDayEntryResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityTariffClusterGetDayEntryParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityTariff::Commands::GetDayEntry::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityTariffClusterGetDayEntryResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)readAttributeTariffInfoWithCompletion:(void (^)(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffInfo::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeTariffInfoWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffInfo::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeTariffInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffInfo::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeTariffUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffUnit::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeTariffUnitWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffUnit::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeTariffUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffUnit::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeStartDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::StartDate::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeStartDateWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::StartDate::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeStartDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::StartDate::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeDayEntriesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DayEntries::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeDayEntriesWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::DayEntries::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeDayEntriesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DayEntries::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeDayPatternsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DayPatterns::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeDayPatternsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::DayPatterns::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeDayPatternsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DayPatterns::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCalendarPeriodsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CalendarPeriods::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCalendarPeriodsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::CalendarPeriods::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCalendarPeriodsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CalendarPeriods::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeIndividualDaysWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::IndividualDays::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeIndividualDaysWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::IndividualDays::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeIndividualDaysWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::IndividualDays::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentDayWithCompletion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDay::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentDayWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDay::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDay::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeNextDayWithCompletion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDay::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeNextDayWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDay::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeNextDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDay::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentDayEntryWithCompletion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDayEntry::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentDayEntryWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDayEntry::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentDayEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDayEntry::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentDayEntryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDayEntryDate::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentDayEntryDateWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDayEntryDate::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentDayEntryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentDayEntryDate::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeNextDayEntryWithCompletion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDayEntry::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeNextDayEntryWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDayEntry::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeNextDayEntryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDayEntry::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeNextDayEntryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDayEntryDate::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeNextDayEntryDateWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDayEntryDate::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeNextDayEntryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextDayEntryDate::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeTariffComponentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffComponents::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeTariffComponentsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffComponents::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeTariffComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffComponents::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeTariffPeriodsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffPeriods::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeTariffPeriodsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffPeriods::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeTariffPeriodsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::TariffPeriods::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentTariffComponentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentTariffComponents::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentTariffComponentsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentTariffComponents::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentTariffComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::CurrentTariffComponents::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeNextTariffComponentsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextTariffComponents::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeNextTariffComponentsWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::NextTariffComponents::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeNextTariffComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::NextTariffComponents::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeDefaultRandomizationOffsetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DefaultRandomizationOffset::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeDefaultRandomizationOffsetWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::DefaultRandomizationOffset::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeDefaultRandomizationOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DefaultRandomizationOffset::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeDefaultRandomizationTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DefaultRandomizationType::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeDefaultRandomizationTypeWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::DefaultRandomizationType::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeDefaultRandomizationTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::DefaultRandomizationType::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityTariff::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityTariff::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterEcosystemInformation
- (void)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
@@ -104823,6 +106117,662 @@
@end
+@implementation MTRBaseClusterMeterIdentification
+
+- (void)readAttributeMeterTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::MeterType::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMeterTypeWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::MeterType::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMeterTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::MeterType::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributePointOfDeliveryWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::PointOfDelivery::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributePointOfDeliveryWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::PointOfDelivery::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributePointOfDeliveryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::PointOfDelivery::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeMeterSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::MeterSerialNumber::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMeterSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::MeterSerialNumber::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMeterSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::MeterSerialNumber::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeProtocolVersionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::ProtocolVersion::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeProtocolVersionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::ProtocolVersion::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeProtocolVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::ProtocolVersion::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributePowerThresholdWithCompletion:(void (^)(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::PowerThreshold::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributePowerThresholdWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::PowerThreshold::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributePowerThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::PowerThreshold::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = MeterIdentification::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = MeterIdentification::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
+@implementation MTRBaseClusterCommodityMetering
+
+- (void)readAttributeMeteredQuantityWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::MeteredQuantity::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMeteredQuantityWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::MeteredQuantity::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMeteredQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::MeteredQuantity::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeMeteredQuantityTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::MeteredQuantityTimestamp::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMeteredQuantityTimestampWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::MeteredQuantityTimestamp::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMeteredQuantityTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::MeteredQuantityTimestamp::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeMeasurementTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::MeasurementType::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMeasurementTypeWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::MeasurementType::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMeasurementTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::MeasurementType::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = CommodityMetering::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = CommodityMetering::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterUnitTesting
- (void)testWithCompletion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index adf71fa..9f95f3b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -146,6 +146,7 @@
MTRClusterIDTypeElectricalPowerMeasurementID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000090,
MTRClusterIDTypeElectricalEnergyMeasurementID MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) = 0x00000091,
MTRClusterIDTypeWaterHeaterManagementID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000094,
+ MTRClusterIDTypeCommodityPriceID MTR_PROVISIONALLY_AVAILABLE = 0x00000095,
MTRClusterIDTypeDemandResponseLoadControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000096,
MTRClusterIDTypeMessagesID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000097,
MTRClusterIDTypeDeviceEnergyManagementID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000098,
@@ -206,10 +207,13 @@
MTRClusterIDTypeWebRTCTransportRequestorID MTR_PROVISIONALLY_AVAILABLE = 0x00000554,
MTRClusterIDTypePushAVStreamTransportID MTR_PROVISIONALLY_AVAILABLE = 0x00000555,
MTRClusterIDTypeChimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000556,
+ MTRClusterIDTypeCommodityTariffID MTR_PROVISIONALLY_AVAILABLE = 0x00000700,
MTRClusterIDTypeEcosystemInformationID MTR_PROVISIONALLY_AVAILABLE = 0x00000750,
MTRClusterIDTypeCommissionerControlID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000751,
MTRClusterIDTypeTLSCertificateManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000801,
MTRClusterIDTypeTLSClientManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000802,
+ MTRClusterIDTypeMeterIdentificationID MTR_PROVISIONALLY_AVAILABLE = 0x00000B06,
+ MTRClusterIDTypeCommodityMeteringID MTR_PROVISIONALLY_AVAILABLE = 0x00000B07,
MTRClusterIDTypeUnitTestingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC05,
MTRClusterIDTypeSampleMEIID MTR_PROVISIONALLY_AVAILABLE = 0xFFF1FC20,
@@ -2496,6 +2500,17 @@
MTRAttributeIDTypeClusterWaterHeaterManagementAttributeFeatureMapID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterWaterHeaterManagementAttributeClusterRevisionID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster CommodityPrice attributes
+ MTRAttributeIDTypeClusterCommodityPriceAttributeTariffUnitID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeCurrencyID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeCurrentPriceID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterCommodityPriceAttributePriceForecastID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterCommodityPriceAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster DemandResponseLoadControl attributes
MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRAttributeIDTypeClusterDemandResponseLoadControlAttributeNumberOfLoadControlProgramsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
@@ -4766,6 +4781,32 @@
MTRAttributeIDTypeClusterChimeAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterChimeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster CommodityTariff attributes
+ MTRAttributeIDTypeClusterCommodityTariffAttributeTariffInfoID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeTariffUnitID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeStartDateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeDayEntriesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeDayPatternsID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeCalendarPeriodsID MTR_PROVISIONALLY_AVAILABLE = 0x00000005,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeIndividualDaysID MTR_PROVISIONALLY_AVAILABLE = 0x00000006,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayID MTR_PROVISIONALLY_AVAILABLE = 0x00000007,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayID MTR_PROVISIONALLY_AVAILABLE = 0x00000008,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayEntryID MTR_PROVISIONALLY_AVAILABLE = 0x00000009,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayEntryDateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayEntryID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayEntryDateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeTariffComponentsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeTariffPeriodsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentTariffComponentsID MTR_PROVISIONALLY_AVAILABLE = 0x0000000F,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeNextTariffComponentsID MTR_PROVISIONALLY_AVAILABLE = 0x00000010,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeDefaultRandomizationOffsetID MTR_PROVISIONALLY_AVAILABLE = 0x00000011,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeDefaultRandomizationTypeID MTR_PROVISIONALLY_AVAILABLE = 0x00000012,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterCommodityTariffAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster EcosystemInformation attributes
MTRAttributeIDTypeClusterEcosystemInformationAttributeDeviceDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRAttributeIDTypeClusterEcosystemInformationAttributeLocationDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
@@ -4803,6 +4844,28 @@
MTRAttributeIDTypeClusterTLSClientManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterTLSClientManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster MeterIdentification attributes
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeMeterTypeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributePointOfDeliveryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeMeterSerialNumberID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeProtocolVersionID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributePowerThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterMeterIdentificationAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
+ // Cluster CommodityMetering attributes
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeMeteredQuantityID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeMeteredQuantityTimestampID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeMeasurementTypeID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterCommodityMeteringAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster TestCluster deprecated attribute names
MTRClusterTestClusterAttributeBooleanID
MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
@@ -6446,6 +6509,12 @@
MTRCommandIDTypeClusterWaterHeaterManagementCommandBoostID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000,
MTRCommandIDTypeClusterWaterHeaterManagementCommandCancelBoostID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001,
+ // Cluster CommodityPrice commands
+ MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedPriceRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedPriceResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedForecastRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedForecastResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+
// Cluster DemandResponseLoadControl commands
MTRCommandIDTypeClusterDemandResponseLoadControlCommandRegisterLoadControlProgramRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
MTRCommandIDTypeClusterDemandResponseLoadControlCommandUnregisterLoadControlProgramRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
@@ -7048,6 +7117,12 @@
// Cluster Chime commands
MTRCommandIDTypeClusterChimeCommandPlayChimeSoundID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ // Cluster CommodityTariff commands
+ MTRCommandIDTypeClusterCommodityTariffCommandGetTariffComponentID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRCommandIDTypeClusterCommodityTariffCommandGetTariffComponentResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRCommandIDTypeClusterCommodityTariffCommandGetDayEntryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRCommandIDTypeClusterCommodityTariffCommandGetDayEntryResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+
// Cluster CommissionerControl commands
MTRCommandIDTypeClusterCommissionerControlCommandRequestCommissioningApprovalID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000,
MTRCommandIDTypeClusterCommissionerControlCommandCommissionNodeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001,
@@ -7512,6 +7587,10 @@
MTREventIDTypeClusterWaterHeaterManagementEventBoostStartedID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000000,
MTREventIDTypeClusterWaterHeaterManagementEventBoostEndedID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x00000001,
+ // Cluster CommodityPrice events
+ MTREventIDTypeClusterCommodityPriceEventPriceChangeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTREventIDTypeClusterCommodityPriceEventForecastChangeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+
// Cluster DemandResponseLoadControl events
MTREventIDTypeClusterDemandResponseLoadControlEventLoadControlEventStatusChangeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
@@ -7771,6 +7850,10 @@
MTRDeviceTypeIDTypeDeviceEnergyManagementID MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) = 0x0000050D,
MTRDeviceTypeIDTypeWaterHeaterID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4)) = 0x0000050F,
MTRDeviceTypeIDTypeElectricalSensorID MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) = 0x00000510,
+ MTRDeviceTypeIDTypeElectricalUtilityMeterID MTR_PROVISIONALLY_AVAILABLE = 0x00000511,
+ MTRDeviceTypeIDTypeMeterReferencePointID MTR_PROVISIONALLY_AVAILABLE = 0x00000512,
+ MTRDeviceTypeIDTypeElectricalEnergyTariffID MTR_PROVISIONALLY_AVAILABLE = 0x00000513,
+ MTRDeviceTypeIDTypeElectricalMeterID MTR_PROVISIONALLY_AVAILABLE = 0x00000514,
MTRDeviceTypeIDTypeControlBridgeID MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) = 0x00000840,
MTRDeviceTypeIDTypeOnOffSensorID MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2)) = 0x00000850,
} MTR_AVAILABLE(ios(18.2), macos(15.2), watchos(11.2), tvos(18.2));
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index 2f5cc8f..39414eb 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -216,6 +216,9 @@
case MTRClusterIDTypeWaterHeaterManagementID:
result = @"WaterHeaterManagement";
break;
+ case MTRClusterIDTypeCommodityPriceID:
+ result = @"CommodityPrice";
+ break;
case MTRClusterIDTypeDemandResponseLoadControlID:
result = @"DemandResponseLoadControl";
break;
@@ -396,6 +399,9 @@
case MTRClusterIDTypeChimeID:
result = @"Chime";
break;
+ case MTRClusterIDTypeCommodityTariffID:
+ result = @"CommodityTariff";
+ break;
case MTRClusterIDTypeEcosystemInformationID:
result = @"EcosystemInformation";
break;
@@ -408,6 +414,12 @@
case MTRClusterIDTypeTLSClientManagementID:
result = @"TLSClientManagement";
break;
+ case MTRClusterIDTypeMeterIdentificationID:
+ result = @"MeterIdentification";
+ break;
+ case MTRClusterIDTypeCommodityMeteringID:
+ result = @"CommodityMetering";
+ break;
case MTRClusterIDTypeUnitTestingID:
result = @"UnitTesting";
break;
@@ -4100,6 +4112,53 @@
}
break;
+ case MTRClusterIDTypeCommodityPriceID:
+
+ switch (attributeID) {
+
+ // Cluster CommodityPrice attributes
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeTariffUnitID:
+ result = @"TariffUnit";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeCurrencyID:
+ result = @"Currency";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeCurrentPriceID:
+ result = @"CurrentPrice";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributePriceForecastID:
+ result = @"PriceForecast";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityPriceAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown attributeID %u>", attributeID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeDemandResponseLoadControlID:
switch (attributeID) {
@@ -8268,6 +8327,113 @@
}
break;
+ case MTRClusterIDTypeCommodityTariffID:
+
+ switch (attributeID) {
+
+ // Cluster CommodityTariff attributes
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeTariffInfoID:
+ result = @"TariffInfo";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeTariffUnitID:
+ result = @"TariffUnit";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeStartDateID:
+ result = @"StartDate";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeDayEntriesID:
+ result = @"DayEntries";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeDayPatternsID:
+ result = @"DayPatterns";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeCalendarPeriodsID:
+ result = @"CalendarPeriods";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeIndividualDaysID:
+ result = @"IndividualDays";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayID:
+ result = @"CurrentDay";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayID:
+ result = @"NextDay";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayEntryID:
+ result = @"CurrentDayEntry";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayEntryDateID:
+ result = @"CurrentDayEntryDate";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayEntryID:
+ result = @"NextDayEntry";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayEntryDateID:
+ result = @"NextDayEntryDate";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeTariffComponentsID:
+ result = @"TariffComponents";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeTariffPeriodsID:
+ result = @"TariffPeriods";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentTariffComponentsID:
+ result = @"CurrentTariffComponents";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeNextTariffComponentsID:
+ result = @"NextTariffComponents";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeDefaultRandomizationOffsetID:
+ result = @"DefaultRandomizationOffset";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeDefaultRandomizationTypeID:
+ result = @"DefaultRandomizationType";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityTariffAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown attributeID %u>", attributeID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeEcosystemInformationID:
switch (attributeID) {
@@ -8428,6 +8594,100 @@
}
break;
+ case MTRClusterIDTypeMeterIdentificationID:
+
+ switch (attributeID) {
+
+ // Cluster MeterIdentification attributes
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeMeterTypeID:
+ result = @"MeterType";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributePointOfDeliveryID:
+ result = @"PointOfDelivery";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeMeterSerialNumberID:
+ result = @"MeterSerialNumber";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeProtocolVersionID:
+ result = @"ProtocolVersion";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributePowerThresholdID:
+ result = @"PowerThreshold";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterMeterIdentificationAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown attributeID %u>", attributeID];
+ break;
+ }
+ break;
+
+ case MTRClusterIDTypeCommodityMeteringID:
+
+ switch (attributeID) {
+
+ // Cluster CommodityMetering attributes
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeMeteredQuantityID:
+ result = @"MeteredQuantity";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeMeteredQuantityTimestampID:
+ result = @"MeteredQuantityTimestamp";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeMeasurementTypeID:
+ result = @"MeasurementType";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterCommodityMeteringAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown attributeID %u>", attributeID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (attributeID) {
@@ -10004,6 +10264,24 @@
}
break;
+ case MTRClusterIDTypeCommodityPriceID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedPriceRequestID:
+ result = @"GetDetailedPriceRequest";
+ break;
+
+ case MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedForecastRequestID:
+ result = @"GetDetailedForecastRequest";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeDemandResponseLoadControlID:
switch (commandID) {
@@ -11332,6 +11610,24 @@
}
break;
+ case MTRClusterIDTypeCommodityTariffID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterCommodityTariffCommandGetTariffComponentID:
+ result = @"GetTariffComponent";
+ break;
+
+ case MTRCommandIDTypeClusterCommodityTariffCommandGetDayEntryID:
+ result = @"GetDayEntry";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeEcosystemInformationID:
switch (commandID) {
@@ -11428,6 +11724,26 @@
}
break;
+ case MTRClusterIDTypeMeterIdentificationID:
+
+ switch (commandID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
+ case MTRClusterIDTypeCommodityMeteringID:
+
+ switch (commandID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (commandID) {
@@ -12384,6 +12700,24 @@
}
break;
+ case MTRClusterIDTypeCommodityPriceID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedPriceResponseID:
+ result = @"GetDetailedPriceResponse";
+ break;
+
+ case MTRCommandIDTypeClusterCommodityPriceCommandGetDetailedForecastResponseID:
+ result = @"GetDetailedForecastResponse";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeDemandResponseLoadControlID:
switch (commandID) {
@@ -13132,6 +13466,24 @@
}
break;
+ case MTRClusterIDTypeCommodityTariffID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterCommodityTariffCommandGetTariffComponentResponseID:
+ result = @"GetTariffComponentResponse";
+ break;
+
+ case MTRCommandIDTypeClusterCommodityTariffCommandGetDayEntryResponseID:
+ result = @"GetDayEntryResponse";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeEcosystemInformationID:
switch (commandID) {
@@ -13208,6 +13560,26 @@
}
break;
+ case MTRClusterIDTypeMeterIdentificationID:
+
+ switch (commandID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
+ case MTRClusterIDTypeCommodityMeteringID:
+
+ switch (commandID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown commandID %u>", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (commandID) {
@@ -14250,6 +14622,25 @@
}
break;
+ case MTRClusterIDTypeCommodityPriceID:
+
+ switch (eventID) {
+
+ // Cluster CommodityPrice events
+ case MTREventIDTypeClusterCommodityPriceEventPriceChangeID:
+ result = @"PriceChange";
+ break;
+
+ case MTREventIDTypeClusterCommodityPriceEventForecastChangeID:
+ result = @"ForecastChange";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown eventID %u>", eventID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeDemandResponseLoadControlID:
switch (eventID) {
@@ -15043,6 +15434,16 @@
}
break;
+ case MTRClusterIDTypeCommodityTariffID:
+
+ switch (eventID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown eventID %u>", eventID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeEcosystemInformationID:
switch (eventID) {
@@ -15088,6 +15489,26 @@
}
break;
+ case MTRClusterIDTypeMeterIdentificationID:
+
+ switch (eventID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown eventID %u>", eventID];
+ break;
+ }
+ break;
+
+ case MTRClusterIDTypeCommodityMeteringID:
+
+ switch (eventID) {
+
+ default:
+ result = [NSString stringWithFormat:@"<Unknown eventID %u>", eventID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (eventID) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 3217d71..9a0f6f6 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -3357,6 +3357,51 @@
@end
/**
+ * Cluster Commodity Price
+ * The Commodity Price Cluster provides the mechanism for communicating Gas, Energy, or Water pricing information within the premises.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterCommodityPrice : MTRGenericCluster
+
+- (void)getDetailedPriceRequestWithParams:(MTRCommodityPriceClusterGetDetailedPriceRequestParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityPriceClusterGetDetailedPriceResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getDetailedForecastRequestWithParams:(MTRCommodityPriceClusterGetDetailedForecastRequestParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityPriceClusterGetDetailedForecastResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffUnitWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrencyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentPriceWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributePriceForecastWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterCommodityPrice (Availability)
+
+/**
+ * For all instance methods that take a completion (i.e. command invocations),
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
* Cluster Demand Response Load Control
* This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control.
*/
@@ -7130,6 +7175,81 @@
@end
/**
+ * Cluster Commodity Tariff
+ * The CommodityTariffCluster provides the mechanism for communicating Commodity Tariff information within the premises.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterCommodityTariff : MTRGenericCluster
+
+- (void)getTariffComponentWithParams:(MTRCommodityTariffClusterGetTariffComponentParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityTariffClusterGetTariffComponentResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getDayEntryWithParams:(MTRCommodityTariffClusterGetDayEntryParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityTariffClusterGetDayEntryResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffInfoWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffUnitWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeStartDateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDayEntriesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDayPatternsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCalendarPeriodsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeIndividualDaysWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentDayWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextDayWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentDayEntryWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentDayEntryDateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextDayEntryWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextDayEntryDateWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffComponentsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffPeriodsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentTariffComponentsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextTariffComponentsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDefaultRandomizationOffsetWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDefaultRandomizationTypeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterCommodityTariff (Availability)
+
+/**
+ * For all instance methods that take a completion (i.e. command invocations),
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
* Cluster Ecosystem Information
* Provides extended device information for all the logical devices represented by a Bridged Node.
*/
@@ -7302,6 +7422,90 @@
@end
/**
+ * Cluster Meter Identification
+ * This Meter Identification Cluster provides attributes for determining advanced information about utility metering device.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterMeterIdentification : MTRGenericCluster
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeterTypeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributePointOfDeliveryWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeterSerialNumberWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeProtocolVersionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributePowerThresholdWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterMeterIdentification (Availability)
+
+/**
+ * The queue is currently unused, but may be used in the future for calling completions
+ * for command invocations if commands are added to this cluster.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
+ * Cluster Commodity Metering
+ * The Commodity Metering Cluster provides the mechanism for communicating commodity consumption information within a premises.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterCommodityMetering : MTRGenericCluster
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeteredQuantityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeteredQuantityTimestampWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterCommodityMetering (Availability)
+
+/**
+ * The queue is currently unused, but may be used in the future for calling completions
+ * for command invocations if commands are added to this cluster.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
+/**
* Cluster Unit Testing
* The Test Cluster is meant to validate the generated code
*/
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index d0481b9..9f0e061 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -8863,6 +8863,109 @@
@end
+@implementation MTRClusterCommodityPrice
+
+- (void)getDetailedPriceRequestWithParams:(MTRCommodityPriceClusterGetDetailedPriceRequestParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityPriceClusterGetDetailedPriceResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityPriceClusterGetDetailedPriceRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityPrice::Commands::GetDetailedPriceRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityPriceClusterGetDetailedPriceResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)getDetailedForecastRequestWithParams:(MTRCommodityPriceClusterGetDetailedForecastRequestParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityPriceClusterGetDetailedForecastResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityPriceClusterGetDetailedForecastRequestParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityPrice::Commands::GetDetailedForecastRequest::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityPriceClusterGetDetailedForecastResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffUnitWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeTariffUnitID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrencyWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeCurrencyID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentPriceWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeCurrentPriceID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributePriceForecastWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributePriceForecastID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityPriceID) attributeID:@(MTRAttributeIDTypeClusterCommodityPriceAttributeClusterRevisionID) params:params];
+}
+
+@end
+
@implementation MTRClusterDemandResponseLoadControl
- (void)registerLoadControlProgramRequestWithParams:(MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
@@ -20901,6 +21004,184 @@
@end
+@implementation MTRClusterCommodityTariff
+
+- (void)getTariffComponentWithParams:(MTRCommodityTariffClusterGetTariffComponentParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityTariffClusterGetTariffComponentResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityTariffClusterGetTariffComponentParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityTariff::Commands::GetTariffComponent::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityTariffClusterGetTariffComponentResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)getDayEntryWithParams:(MTRCommodityTariffClusterGetDayEntryParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRCommodityTariffClusterGetDayEntryResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRCommodityTariffClusterGetDayEntryParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = CommodityTariff::Commands::GetDayEntry::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRCommodityTariffClusterGetDayEntryResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffInfoWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeTariffInfoID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffUnitWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeTariffUnitID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeStartDateWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeStartDateID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDayEntriesWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeDayEntriesID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDayPatternsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeDayPatternsID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCalendarPeriodsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeCalendarPeriodsID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeIndividualDaysWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeIndividualDaysID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentDayWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextDayWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentDayEntryWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayEntryID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentDayEntryDateWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentDayEntryDateID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextDayEntryWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayEntryID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextDayEntryDateWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeNextDayEntryDateID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffComponentsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeTariffComponentsID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeTariffPeriodsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeTariffPeriodsID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeCurrentTariffComponentsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeCurrentTariffComponentsID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextTariffComponentsWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeNextTariffComponentsID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDefaultRandomizationOffsetWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeDefaultRandomizationOffsetID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeDefaultRandomizationTypeWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeDefaultRandomizationTypeID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityTariffID) attributeID:@(MTRAttributeIDTypeClusterCommodityTariffAttributeClusterRevisionID) params:params];
+}
+
+@end
+
@implementation MTRClusterEcosystemInformation
- (NSDictionary<NSString *, id> * _Nullable)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params
@@ -21440,6 +21721,104 @@
@end
+@implementation MTRClusterMeterIdentification
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeterTypeWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeMeterTypeID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributePointOfDeliveryWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributePointOfDeliveryID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeterSerialNumberWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeMeterSerialNumberID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeProtocolVersionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeProtocolVersionID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributePowerThresholdWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributePowerThresholdID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeMeterIdentificationID) attributeID:@(MTRAttributeIDTypeClusterMeterIdentificationAttributeClusterRevisionID) params:params];
+}
+
+@end
+
+@implementation MTRClusterCommodityMetering
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeteredQuantityWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeMeteredQuantityID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeteredQuantityTimestampWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeMeteredQuantityTimestampID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeMeasurementTypeWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeMeasurementTypeID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeCommodityMeteringID) attributeID:@(MTRAttributeIDTypeClusterCommodityMeteringAttributeClusterRevisionID) params:params];
+}
+
+@end
+
@implementation MTRClusterUnitTesting
- (void)testWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index c30b73a..a013225 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -5586,6 +5586,104 @@
@end
MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterGetDetailedPriceRequestParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSNumber * _Nonnull details MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterGetDetailedPriceResponseParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) MTRCommodityPriceClusterCommodityPriceStruct * _Nullable currentPrice MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRCommodityPriceClusterGetDetailedPriceResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterGetDetailedForecastRequestParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSNumber * _Nonnull details MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterGetDetailedForecastResponseParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSArray * _Nonnull priceForecast MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRCommodityPriceClusterGetDetailedForecastResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams : NSObject <NSCopying>
@property (nonatomic, copy) MTRDemandResponseLoadControlClusterLoadControlProgramStruct * _Nonnull loadControlProgram MTR_PROVISIONALLY_AVAILABLE;
@@ -12536,6 +12634,108 @@
@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterGetTariffComponentParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSNumber * _Nonnull tariffComponentID MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterGetTariffComponentResponseParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSString * _Nullable label MTR_PROVISIONALLY_AVAILABLE;
+
+@property (nonatomic, copy) NSArray * _Nonnull dayEntryIDs MTR_PROVISIONALLY_AVAILABLE;
+
+@property (nonatomic, copy) MTRCommodityTariffClusterTariffComponentStruct * _Nonnull tariffComponent MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRCommodityTariffClusterGetTariffComponentResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterGetDayEntryParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSNumber * _Nonnull dayEntryID MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterGetDayEntryResponseParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) MTRCommodityTariffClusterDayEntryStruct * _Nonnull dayEntry MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRCommodityTariffClusterGetDayEntryResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4))
@interface MTRCommissionerControlClusterRequestCommissioningApprovalParams : NSObject <NSCopying>
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index 5eb3a7a..04a1f7f 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -15778,6 +15778,450 @@
}
@end
+@implementation MTRCommodityPriceClusterGetDetailedPriceRequestParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _details = @(0);
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityPriceClusterGetDetailedPriceRequestParams alloc] init];
+
+ other.details = self.details;
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: details:%@; >", NSStringFromClass([self class]), _details];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedPriceRequestParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Type encodableStruct;
+ ListFreer listFreer;
+ {
+ encodableStruct.details = static_cast<std::remove_reference_t<decltype(encodableStruct.details)>>(self.details.unsignedShortValue);
+ }
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedPriceResponseParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _currentPrice = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityPriceClusterGetDetailedPriceResponseParams alloc] init];
+
+ other.currentPrice = self.currentPrice;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: currentPrice:%@; >", NSStringFromClass([self class]), _currentPrice];
+ return descriptionString;
+}
+
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error
+{
+ if (!(self = [super init])) {
+ return nil;
+ }
+
+ using DecodableType = chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType;
+ chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue
+ clusterID:DecodableType::GetClusterId()
+ commandID:DecodableType::GetCommandId()
+ error:error];
+ if (buffer.IsNull()) {
+ return nil;
+ }
+
+ chip::TLV::TLVReader reader;
+ reader.Init(buffer->Start(), buffer->DataLength());
+
+ CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag());
+ if (err == CHIP_NO_ERROR) {
+ DecodableType decodedStruct;
+ err = chip::app::DataModel::Decode(reader, decodedStruct);
+ if (err == CHIP_NO_ERROR) {
+ err = [self _setFieldsFromDecodableStruct:decodedStruct];
+ if (err == CHIP_NO_ERROR) {
+ return self;
+ }
+ }
+ }
+
+ NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()];
+ MTR_LOG_ERROR("%s", errorStr.UTF8String);
+ if (error != nil) {
+ NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) };
+ *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo];
+ }
+ return nil;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedPriceResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType &)decodableStruct
+{
+ {
+ if (decodableStruct.currentPrice.IsNull()) {
+ self.currentPrice = nil;
+ } else {
+ self.currentPrice = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ self.currentPrice.periodStart = [NSNumber numberWithUnsignedInt:decodableStruct.currentPrice.Value().periodStart];
+ if (decodableStruct.currentPrice.Value().periodEnd.IsNull()) {
+ self.currentPrice.periodEnd = nil;
+ } else {
+ self.currentPrice.periodEnd = [NSNumber numberWithUnsignedInt:decodableStruct.currentPrice.Value().periodEnd.Value()];
+ }
+ self.currentPrice.price = [MTRDataTypePriceStruct new];
+ self.currentPrice.price.amount = [NSNumber numberWithLongLong:decodableStruct.currentPrice.Value().price.amount];
+ self.currentPrice.price.currency = [MTRDataTypeCurrencyStruct new];
+ self.currentPrice.price.currency.currency = [NSNumber numberWithUnsignedShort:decodableStruct.currentPrice.Value().price.currency.currency];
+ self.currentPrice.price.currency.decimalPoints = [NSNumber numberWithUnsignedChar:decodableStruct.currentPrice.Value().price.currency.decimalPoints];
+ if (decodableStruct.currentPrice.Value().description.HasValue()) {
+ self.currentPrice.descriptionString = AsString(decodableStruct.currentPrice.Value().description.Value());
+ if (self.currentPrice.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
+ }
+ } else {
+ self.currentPrice.descriptionString = nil;
+ }
+ if (decodableStruct.currentPrice.Value().components.HasValue()) {
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = decodableStruct.currentPrice.Value().components.Value().begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ MTRCommodityPriceClusterCommodityPriceComponentStruct * newElement_3;
+ newElement_3 = [MTRCommodityPriceClusterCommodityPriceComponentStruct new];
+ newElement_3.price = [NSNumber numberWithLongLong:entry_3.price];
+ newElement_3.source = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3.source)];
+ if (entry_3.description.HasValue()) {
+ newElement_3.descriptionString = AsString(entry_3.description.Value());
+ if (newElement_3.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
+ }
+ } else {
+ newElement_3.descriptionString = nil;
+ }
+ if (entry_3.tariffComponentID.HasValue()) {
+ newElement_3.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_3.tariffComponentID.Value()];
+ } else {
+ newElement_3.tariffComponentID = nil;
+ }
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ return err;
+ }
+ self.currentPrice.components = array_3;
+ }
+ } else {
+ self.currentPrice.components = nil;
+ }
+ }
+ }
+ return CHIP_NO_ERROR;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedForecastRequestParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _details = @(0);
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityPriceClusterGetDetailedForecastRequestParams alloc] init];
+
+ other.details = self.details;
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: details:%@; >", NSStringFromClass([self class]), _details];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedForecastRequestParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Type encodableStruct;
+ ListFreer listFreer;
+ {
+ encodableStruct.details = static_cast<std::remove_reference_t<decltype(encodableStruct.details)>>(self.details.unsignedShortValue);
+ }
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedForecastResponseParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _priceForecast = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityPriceClusterGetDetailedForecastResponseParams alloc] init];
+
+ other.priceForecast = self.priceForecast;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: priceForecast:%@; >", NSStringFromClass([self class]), _priceForecast];
+ return descriptionString;
+}
+
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error
+{
+ if (!(self = [super init])) {
+ return nil;
+ }
+
+ using DecodableType = chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType;
+ chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue
+ clusterID:DecodableType::GetClusterId()
+ commandID:DecodableType::GetCommandId()
+ error:error];
+ if (buffer.IsNull()) {
+ return nil;
+ }
+
+ chip::TLV::TLVReader reader;
+ reader.Init(buffer->Start(), buffer->DataLength());
+
+ CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag());
+ if (err == CHIP_NO_ERROR) {
+ DecodableType decodedStruct;
+ err = chip::app::DataModel::Decode(reader, decodedStruct);
+ if (err == CHIP_NO_ERROR) {
+ err = [self _setFieldsFromDecodableStruct:decodedStruct];
+ if (err == CHIP_NO_ERROR) {
+ return self;
+ }
+ }
+ }
+
+ NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()];
+ MTR_LOG_ERROR("%s", errorStr.UTF8String);
+ if (error != nil) {
+ NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) };
+ *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo];
+ }
+ return nil;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterGetDetailedForecastResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType &)decodableStruct
+{
+ {
+ { // Scope for our temporary variables
+ auto * array_0 = [NSMutableArray new];
+ auto iter_0 = decodableStruct.priceForecast.begin();
+ while (iter_0.Next()) {
+ auto & entry_0 = iter_0.GetValue();
+ MTRCommodityPriceClusterCommodityPriceStruct * newElement_0;
+ newElement_0 = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ newElement_0.periodStart = [NSNumber numberWithUnsignedInt:entry_0.periodStart];
+ if (entry_0.periodEnd.IsNull()) {
+ newElement_0.periodEnd = nil;
+ } else {
+ newElement_0.periodEnd = [NSNumber numberWithUnsignedInt:entry_0.periodEnd.Value()];
+ }
+ newElement_0.price = [MTRDataTypePriceStruct new];
+ newElement_0.price.amount = [NSNumber numberWithLongLong:entry_0.price.amount];
+ newElement_0.price.currency = [MTRDataTypeCurrencyStruct new];
+ newElement_0.price.currency.currency = [NSNumber numberWithUnsignedShort:entry_0.price.currency.currency];
+ newElement_0.price.currency.decimalPoints = [NSNumber numberWithUnsignedChar:entry_0.price.currency.decimalPoints];
+ if (entry_0.description.HasValue()) {
+ newElement_0.descriptionString = AsString(entry_0.description.Value());
+ if (newElement_0.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
+ }
+ } else {
+ newElement_0.descriptionString = nil;
+ }
+ if (entry_0.components.HasValue()) {
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_0.components.Value().begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ MTRCommodityPriceClusterCommodityPriceComponentStruct * newElement_3;
+ newElement_3 = [MTRCommodityPriceClusterCommodityPriceComponentStruct new];
+ newElement_3.price = [NSNumber numberWithLongLong:entry_3.price];
+ newElement_3.source = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3.source)];
+ if (entry_3.description.HasValue()) {
+ newElement_3.descriptionString = AsString(entry_3.description.Value());
+ if (newElement_3.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
+ }
+ } else {
+ newElement_3.descriptionString = nil;
+ }
+ if (entry_3.tariffComponentID.HasValue()) {
+ newElement_3.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_3.tariffComponentID.Value()];
+ } else {
+ newElement_3.tariffComponentID = nil;
+ }
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ return err;
+ }
+ newElement_0.components = array_3;
+ }
+ } else {
+ newElement_0.components = nil;
+ }
+ [array_0 addObject:newElement_0];
+ }
+ CHIP_ERROR err = iter_0.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ return err;
+ }
+ self.priceForecast = array_0;
+ }
+ }
+ return CHIP_NO_ERROR;
+}
+
+@end
+
@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams
- (instancetype)init
{
@@ -37192,6 +37636,456 @@
}
@end
+@implementation MTRCommodityTariffClusterGetTariffComponentParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _tariffComponentID = @(0);
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityTariffClusterGetTariffComponentParams alloc] init];
+
+ other.tariffComponentID = self.tariffComponentID;
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: tariffComponentID:%@; >", NSStringFromClass([self class]), _tariffComponentID];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterGetTariffComponentParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Type encodableStruct;
+ ListFreer listFreer;
+ {
+ encodableStruct.tariffComponentID = self.tariffComponentID.unsignedIntValue;
+ }
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRCommodityTariffClusterGetTariffComponentResponseParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _label = nil;
+
+ _dayEntryIDs = [NSArray array];
+
+ _tariffComponent = [MTRCommodityTariffClusterTariffComponentStruct new];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityTariffClusterGetTariffComponentResponseParams alloc] init];
+
+ other.label = self.label;
+ other.dayEntryIDs = self.dayEntryIDs;
+ other.tariffComponent = self.tariffComponent;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; dayEntryIDs:%@; tariffComponent:%@; >", NSStringFromClass([self class]), _label, _dayEntryIDs, _tariffComponent];
+ return descriptionString;
+}
+
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error
+{
+ if (!(self = [super init])) {
+ return nil;
+ }
+
+ using DecodableType = chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::DecodableType;
+ chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue
+ clusterID:DecodableType::GetClusterId()
+ commandID:DecodableType::GetCommandId()
+ error:error];
+ if (buffer.IsNull()) {
+ return nil;
+ }
+
+ chip::TLV::TLVReader reader;
+ reader.Init(buffer->Start(), buffer->DataLength());
+
+ CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag());
+ if (err == CHIP_NO_ERROR) {
+ DecodableType decodedStruct;
+ err = chip::app::DataModel::Decode(reader, decodedStruct);
+ if (err == CHIP_NO_ERROR) {
+ err = [self _setFieldsFromDecodableStruct:decodedStruct];
+ if (err == CHIP_NO_ERROR) {
+ return self;
+ }
+ }
+ }
+
+ NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()];
+ MTR_LOG_ERROR("%s", errorStr.UTF8String);
+ if (error != nil) {
+ NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) };
+ *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo];
+ }
+ return nil;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterGetTariffComponentResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::DecodableType &)decodableStruct
+{
+ {
+ if (decodableStruct.label.IsNull()) {
+ self.label = nil;
+ } else {
+ self.label = AsString(decodableStruct.label.Value());
+ if (self.label == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
+ }
+ }
+ }
+ {
+ { // Scope for our temporary variables
+ auto * array_0 = [NSMutableArray new];
+ auto iter_0 = decodableStruct.dayEntryIDs.begin();
+ while (iter_0.Next()) {
+ auto & entry_0 = iter_0.GetValue();
+ NSNumber * newElement_0;
+ newElement_0 = [NSNumber numberWithUnsignedInt:entry_0];
+ [array_0 addObject:newElement_0];
+ }
+ CHIP_ERROR err = iter_0.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ return err;
+ }
+ self.dayEntryIDs = array_0;
+ }
+ }
+ {
+ self.tariffComponent = [MTRCommodityTariffClusterTariffComponentStruct new];
+ self.tariffComponent.tariffComponentID = [NSNumber numberWithUnsignedInt:decodableStruct.tariffComponent.tariffComponentID];
+ if (decodableStruct.tariffComponent.price.HasValue()) {
+ if (decodableStruct.tariffComponent.price.Value().IsNull()) {
+ self.tariffComponent.price = nil;
+ } else {
+ self.tariffComponent.price = [MTRCommodityTariffClusterTariffPriceStruct new];
+ self.tariffComponent.price.priceType = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.tariffComponent.price.Value().Value().priceType)];
+ if (decodableStruct.tariffComponent.price.Value().Value().price.HasValue()) {
+ self.tariffComponent.price.price = [NSNumber numberWithLongLong:decodableStruct.tariffComponent.price.Value().Value().price.Value()];
+ } else {
+ self.tariffComponent.price.price = nil;
+ }
+ if (decodableStruct.tariffComponent.price.Value().Value().priceLevel.HasValue()) {
+ self.tariffComponent.price.priceLevel = [NSNumber numberWithShort:decodableStruct.tariffComponent.price.Value().Value().priceLevel.Value()];
+ } else {
+ self.tariffComponent.price.priceLevel = nil;
+ }
+ }
+ } else {
+ self.tariffComponent.price = nil;
+ }
+ if (decodableStruct.tariffComponent.friendlyCredit.HasValue()) {
+ self.tariffComponent.friendlyCredit = [NSNumber numberWithBool:decodableStruct.tariffComponent.friendlyCredit.Value()];
+ } else {
+ self.tariffComponent.friendlyCredit = nil;
+ }
+ if (decodableStruct.tariffComponent.auxiliaryLoad.HasValue()) {
+ self.tariffComponent.auxiliaryLoad = [MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct new];
+ self.tariffComponent.auxiliaryLoad.number = [NSNumber numberWithUnsignedChar:decodableStruct.tariffComponent.auxiliaryLoad.Value().number];
+ self.tariffComponent.auxiliaryLoad.requiredState = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.tariffComponent.auxiliaryLoad.Value().requiredState)];
+ } else {
+ self.tariffComponent.auxiliaryLoad = nil;
+ }
+ if (decodableStruct.tariffComponent.peakPeriod.HasValue()) {
+ self.tariffComponent.peakPeriod = [MTRCommodityTariffClusterPeakPeriodStruct new];
+ self.tariffComponent.peakPeriod.severity = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.tariffComponent.peakPeriod.Value().severity)];
+ self.tariffComponent.peakPeriod.peakPeriod = [NSNumber numberWithUnsignedShort:decodableStruct.tariffComponent.peakPeriod.Value().peakPeriod];
+ } else {
+ self.tariffComponent.peakPeriod = nil;
+ }
+ if (decodableStruct.tariffComponent.powerThreshold.HasValue()) {
+ self.tariffComponent.powerThreshold = [MTRDataTypePowerThresholdStruct new];
+ if (decodableStruct.tariffComponent.powerThreshold.Value().powerThreshold.HasValue()) {
+ self.tariffComponent.powerThreshold.powerThreshold = [NSNumber numberWithLongLong:decodableStruct.tariffComponent.powerThreshold.Value().powerThreshold.Value()];
+ } else {
+ self.tariffComponent.powerThreshold.powerThreshold = nil;
+ }
+ if (decodableStruct.tariffComponent.powerThreshold.Value().apparentPowerThreshold.HasValue()) {
+ self.tariffComponent.powerThreshold.apparentPowerThreshold = [NSNumber numberWithLongLong:decodableStruct.tariffComponent.powerThreshold.Value().apparentPowerThreshold.Value()];
+ } else {
+ self.tariffComponent.powerThreshold.apparentPowerThreshold = nil;
+ }
+ if (decodableStruct.tariffComponent.powerThreshold.Value().powerThresholdSource.IsNull()) {
+ self.tariffComponent.powerThreshold.powerThresholdSource = nil;
+ } else {
+ self.tariffComponent.powerThreshold.powerThresholdSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.tariffComponent.powerThreshold.Value().powerThresholdSource.Value())];
+ }
+ } else {
+ self.tariffComponent.powerThreshold = nil;
+ }
+ if (decodableStruct.tariffComponent.threshold.IsNull()) {
+ self.tariffComponent.threshold = nil;
+ } else {
+ self.tariffComponent.threshold = [NSNumber numberWithUnsignedInt:decodableStruct.tariffComponent.threshold.Value()];
+ }
+ if (decodableStruct.tariffComponent.label.HasValue()) {
+ if (decodableStruct.tariffComponent.label.Value().IsNull()) {
+ self.tariffComponent.label = nil;
+ } else {
+ self.tariffComponent.label = AsString(decodableStruct.tariffComponent.label.Value().Value());
+ if (self.tariffComponent.label == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
+ }
+ }
+ } else {
+ self.tariffComponent.label = nil;
+ }
+ if (decodableStruct.tariffComponent.predicted.HasValue()) {
+ self.tariffComponent.predicted = [NSNumber numberWithBool:decodableStruct.tariffComponent.predicted.Value()];
+ } else {
+ self.tariffComponent.predicted = nil;
+ }
+ }
+ return CHIP_NO_ERROR;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterGetDayEntryParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _dayEntryID = @(0);
+ _timedInvokeTimeoutMs = nil;
+ _serverSideProcessingTimeout = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityTariffClusterGetDayEntryParams alloc] init];
+
+ other.dayEntryID = self.dayEntryID;
+ other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
+ other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayEntryID:%@; >", NSStringFromClass([self class]), _dayEntryID];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterGetDayEntryParams (InternalMethods)
+
+- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader
+{
+ chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Type encodableStruct;
+ ListFreer listFreer;
+ {
+ encodableStruct.dayEntryID = self.dayEntryID.unsignedIntValue;
+ }
+
+ auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
+ if (buffer.IsNull()) {
+ return CHIP_ERROR_NO_MEMORY;
+ }
+
+ chip::System::PacketBufferTLVWriter writer;
+ // Commands never need chained buffers, since they cannot be chunked.
+ writer.Init(std::move(buffer), /* useChainedBuffers = */ false);
+
+ ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct));
+
+ ReturnErrorOnFailure(writer.Finalize(&buffer));
+
+ reader.Init(std::move(buffer));
+ return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag());
+}
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error
+{
+ chip::System::PacketBufferTLVReader reader;
+ CHIP_ERROR err = [self _encodeToTLVReader:reader];
+ if (err != CHIP_NO_ERROR) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:err];
+ }
+ return nil;
+ }
+
+ auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader);
+ if (decodedObj == nil) {
+ if (error) {
+ *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE];
+ }
+ }
+ return decodedObj;
+}
+@end
+
+@implementation MTRCommodityTariffClusterGetDayEntryResponseParams
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _dayEntry = [MTRCommodityTariffClusterDayEntryStruct new];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone;
+{
+ auto other = [[MTRCommodityTariffClusterGetDayEntryResponseParams alloc] init];
+
+ other.dayEntry = self.dayEntry;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayEntry:%@; >", NSStringFromClass([self class]), _dayEntry];
+ return descriptionString;
+}
+
+- (nullable instancetype)initWithResponseValue:(NSDictionary<NSString *, id> *)responseValue
+ error:(NSError * __autoreleasing *)error
+{
+ if (!(self = [super init])) {
+ return nil;
+ }
+
+ using DecodableType = chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::DecodableType;
+ chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue
+ clusterID:DecodableType::GetClusterId()
+ commandID:DecodableType::GetCommandId()
+ error:error];
+ if (buffer.IsNull()) {
+ return nil;
+ }
+
+ chip::TLV::TLVReader reader;
+ reader.Init(buffer->Start(), buffer->DataLength());
+
+ CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag());
+ if (err == CHIP_NO_ERROR) {
+ DecodableType decodedStruct;
+ err = chip::app::DataModel::Decode(reader, decodedStruct);
+ if (err == CHIP_NO_ERROR) {
+ err = [self _setFieldsFromDecodableStruct:decodedStruct];
+ if (err == CHIP_NO_ERROR) {
+ return self;
+ }
+ }
+ }
+
+ NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()];
+ MTR_LOG_ERROR("%s", errorStr.UTF8String);
+ if (error != nil) {
+ NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) };
+ *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo];
+ }
+ return nil;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterGetDayEntryResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::DecodableType &)decodableStruct
+{
+ {
+ self.dayEntry = [MTRCommodityTariffClusterDayEntryStruct new];
+ self.dayEntry.dayEntryID = [NSNumber numberWithUnsignedInt:decodableStruct.dayEntry.dayEntryID];
+ self.dayEntry.startTime = [NSNumber numberWithUnsignedShort:decodableStruct.dayEntry.startTime];
+ if (decodableStruct.dayEntry.duration.HasValue()) {
+ self.dayEntry.duration = [NSNumber numberWithUnsignedShort:decodableStruct.dayEntry.duration.Value()];
+ } else {
+ self.dayEntry.duration = nil;
+ }
+ if (decodableStruct.dayEntry.randomizationOffset.HasValue()) {
+ self.dayEntry.randomizationOffset = [NSNumber numberWithShort:decodableStruct.dayEntry.randomizationOffset.Value()];
+ } else {
+ self.dayEntry.randomizationOffset = nil;
+ }
+ if (decodableStruct.dayEntry.randomizationType.HasValue()) {
+ self.dayEntry.randomizationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.dayEntry.randomizationType.Value())];
+ } else {
+ self.dayEntry.randomizationType = nil;
+ }
+ }
+ return CHIP_NO_ERROR;
+}
+
+@end
+
@implementation MTRCommissionerControlClusterRequestCommissioningApprovalParams
- (instancetype)init
{
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
index 181b3e0..ba849cf 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h
@@ -1048,6 +1048,30 @@
@end
+@interface MTRCommodityPriceClusterGetDetailedPriceRequestParams (InternalMethods)
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRCommodityPriceClusterGetDetailedPriceResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType &)decodableStruct;
+
+@end
+
+@interface MTRCommodityPriceClusterGetDetailedForecastRequestParams (InternalMethods)
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRCommodityPriceClusterGetDetailedForecastResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType &)decodableStruct;
+
+@end
+
@interface MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams (InternalMethods)
- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
@@ -2362,6 +2386,30 @@
@end
+@interface MTRCommodityTariffClusterGetTariffComponentParams (InternalMethods)
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRCommodityTariffClusterGetTariffComponentResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::DecodableType &)decodableStruct;
+
+@end
+
+@interface MTRCommodityTariffClusterGetDayEntryParams (InternalMethods)
+
+- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
+
+@end
+
+@interface MTRCommodityTariffClusterGetDayEntryResponseParams (InternalMethods)
+
+- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::DecodableType &)decodableStruct;
+
+@end
+
@interface MTRCommissionerControlClusterRequestCommissioningApprovalParams (InternalMethods)
- (NSDictionary<NSString *, id> * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
index 074eb9f..b3be1cb 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandTimedCheck.mm
@@ -599,6 +599,15 @@
}
}
}
+static BOOL CommandNeedsTimedInvokeInCommodityPriceCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::CommodityPrice;
+ switch (aAttributeId) {
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL CommandNeedsTimedInvokeInDemandResponseLoadControlCluster(AttributeId aAttributeId)
{
using namespace Clusters::DemandResponseLoadControl;
@@ -1205,6 +1214,15 @@
}
}
}
+static BOOL CommandNeedsTimedInvokeInCommodityTariffCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::CommodityTariff;
+ switch (aAttributeId) {
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL CommandNeedsTimedInvokeInEcosystemInformationCluster(AttributeId aAttributeId)
{
using namespace Clusters::EcosystemInformation;
@@ -1241,6 +1259,24 @@
}
}
}
+static BOOL CommandNeedsTimedInvokeInMeterIdentificationCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::MeterIdentification;
+ switch (aAttributeId) {
+ default: {
+ return NO;
+ }
+ }
+}
+static BOOL CommandNeedsTimedInvokeInCommodityMeteringCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::CommodityMetering;
+ switch (aAttributeId) {
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL CommandNeedsTimedInvokeInUnitTestingCluster(AttributeId aAttributeId)
{
using namespace Clusters::UnitTesting;
@@ -1458,6 +1494,9 @@
case Clusters::WaterHeaterManagement::Id: {
return CommandNeedsTimedInvokeInWaterHeaterManagementCluster(commandID);
}
+ case Clusters::CommodityPrice::Id: {
+ return CommandNeedsTimedInvokeInCommodityPriceCluster(commandID);
+ }
case Clusters::DemandResponseLoadControl::Id: {
return CommandNeedsTimedInvokeInDemandResponseLoadControlCluster(commandID);
}
@@ -1638,6 +1677,9 @@
case Clusters::Chime::Id: {
return CommandNeedsTimedInvokeInChimeCluster(commandID);
}
+ case Clusters::CommodityTariff::Id: {
+ return CommandNeedsTimedInvokeInCommodityTariffCluster(commandID);
+ }
case Clusters::EcosystemInformation::Id: {
return CommandNeedsTimedInvokeInEcosystemInformationCluster(commandID);
}
@@ -1650,6 +1692,12 @@
case Clusters::TlsClientManagement::Id: {
return CommandNeedsTimedInvokeInTLSClientManagementCluster(commandID);
}
+ case Clusters::MeterIdentification::Id: {
+ return CommandNeedsTimedInvokeInMeterIdentificationCluster(commandID);
+ }
+ case Clusters::CommodityMetering::Id: {
+ return CommandNeedsTimedInvokeInCommodityMeteringCluster(commandID);
+ }
case Clusters::UnitTesting::Id: {
return CommandNeedsTimedInvokeInUnitTestingCluster(commandID);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
index 279e77c..b7c6e82 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRDeviceTypeMetadata.mm
@@ -110,6 +110,10 @@
{ 0x0000050D, MTRDeviceTypeClass::Utility, @"Device Energy Management" },
{ 0x0000050F, MTRDeviceTypeClass::Simple, @"Water Heater" },
{ 0x00000510, MTRDeviceTypeClass::Utility, @"Electrical Sensor" },
+ { 0x00000511, MTRDeviceTypeClass::Simple, @"Electrical Utility Meter" },
+ { 0x00000512, MTRDeviceTypeClass::Simple, @"Meter Reference Point" },
+ { 0x00000513, MTRDeviceTypeClass::Simple, @"Electrical Energy Tariff" },
+ { 0x00000514, MTRDeviceTypeClass::Simple, @"Electrical Meter" },
{ 0x00000840, MTRDeviceTypeClass::Simple, @"Control Bridge" },
{ 0x00000850, MTRDeviceTypeClass::Simple, @"On/Off Sensor" },
};
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
index 033a64a..7cca5e4 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm
@@ -2828,6 +2828,183 @@
*aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
return nil;
}
+static id _Nullable DecodeEventPayloadForCommodityPriceCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::CommodityPrice;
+ switch (aEventId) {
+ case Events::PriceChange::Id: {
+ Events::PriceChange::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+
+ __auto_type * value = [MTRCommodityPriceClusterPriceChangeEvent new];
+
+ do {
+ MTRCommodityPriceClusterCommodityPriceStruct * _Nonnull memberValue;
+ memberValue = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ memberValue.periodStart = [NSNumber numberWithUnsignedInt:cppValue.currentPrice.periodStart];
+ if (cppValue.currentPrice.periodEnd.IsNull()) {
+ memberValue.periodEnd = nil;
+ } else {
+ memberValue.periodEnd = [NSNumber numberWithUnsignedInt:cppValue.currentPrice.periodEnd.Value()];
+ }
+ memberValue.price = [MTRDataTypePriceStruct new];
+ memberValue.price.amount = [NSNumber numberWithLongLong:cppValue.currentPrice.price.amount];
+ memberValue.price.currency = [MTRDataTypeCurrencyStruct new];
+ memberValue.price.currency.currency = [NSNumber numberWithUnsignedShort:cppValue.currentPrice.price.currency.currency];
+ memberValue.price.currency.decimalPoints = [NSNumber numberWithUnsignedChar:cppValue.currentPrice.price.currency.decimalPoints];
+ if (cppValue.currentPrice.description.HasValue()) {
+ memberValue.descriptionString = AsString(cppValue.currentPrice.description.Value());
+ if (memberValue.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ memberValue.descriptionString = nil;
+ }
+ if (cppValue.currentPrice.components.HasValue()) {
+ { // Scope for our temporary variables
+ auto * array_2 = [NSMutableArray new];
+ auto iter_2 = cppValue.currentPrice.components.Value().begin();
+ while (iter_2.Next()) {
+ auto & entry_2 = iter_2.GetValue();
+ MTRCommodityPriceClusterCommodityPriceComponentStruct * newElement_2;
+ newElement_2 = [MTRCommodityPriceClusterCommodityPriceComponentStruct new];
+ newElement_2.price = [NSNumber numberWithLongLong:entry_2.price];
+ newElement_2.source = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.source)];
+ if (entry_2.description.HasValue()) {
+ newElement_2.descriptionString = AsString(entry_2.description.Value());
+ if (newElement_2.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ newElement_2.descriptionString = nil;
+ }
+ if (entry_2.tariffComponentID.HasValue()) {
+ newElement_2.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_2.tariffComponentID.Value()];
+ } else {
+ newElement_2.tariffComponentID = nil;
+ }
+ [array_2 addObject:newElement_2];
+ }
+ CHIP_ERROR err = iter_2.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ memberValue.components = array_2;
+ }
+ } else {
+ memberValue.components = nil;
+ }
+ value.currentPrice = memberValue;
+ } while (0);
+
+ return value;
+ }
+ case Events::ForecastChange::Id: {
+ Events::ForecastChange::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+
+ __auto_type * value = [MTRCommodityPriceClusterForecastChangeEvent new];
+
+ do {
+ NSArray * _Nonnull memberValue;
+ { // Scope for our temporary variables
+ auto * array_0 = [NSMutableArray new];
+ auto iter_0 = cppValue.priceForecast.begin();
+ while (iter_0.Next()) {
+ auto & entry_0 = iter_0.GetValue();
+ MTRCommodityPriceClusterCommodityPriceStruct * newElement_0;
+ newElement_0 = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ newElement_0.periodStart = [NSNumber numberWithUnsignedInt:entry_0.periodStart];
+ if (entry_0.periodEnd.IsNull()) {
+ newElement_0.periodEnd = nil;
+ } else {
+ newElement_0.periodEnd = [NSNumber numberWithUnsignedInt:entry_0.periodEnd.Value()];
+ }
+ newElement_0.price = [MTRDataTypePriceStruct new];
+ newElement_0.price.amount = [NSNumber numberWithLongLong:entry_0.price.amount];
+ newElement_0.price.currency = [MTRDataTypeCurrencyStruct new];
+ newElement_0.price.currency.currency = [NSNumber numberWithUnsignedShort:entry_0.price.currency.currency];
+ newElement_0.price.currency.decimalPoints = [NSNumber numberWithUnsignedChar:entry_0.price.currency.decimalPoints];
+ if (entry_0.description.HasValue()) {
+ newElement_0.descriptionString = AsString(entry_0.description.Value());
+ if (newElement_0.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ newElement_0.descriptionString = nil;
+ }
+ if (entry_0.components.HasValue()) {
+ { // Scope for our temporary variables
+ auto * array_3 = [NSMutableArray new];
+ auto iter_3 = entry_0.components.Value().begin();
+ while (iter_3.Next()) {
+ auto & entry_3 = iter_3.GetValue();
+ MTRCommodityPriceClusterCommodityPriceComponentStruct * newElement_3;
+ newElement_3 = [MTRCommodityPriceClusterCommodityPriceComponentStruct new];
+ newElement_3.price = [NSNumber numberWithLongLong:entry_3.price];
+ newElement_3.source = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_3.source)];
+ if (entry_3.description.HasValue()) {
+ newElement_3.descriptionString = AsString(entry_3.description.Value());
+ if (newElement_3.descriptionString == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ *aError = err;
+ return nil;
+ }
+ } else {
+ newElement_3.descriptionString = nil;
+ }
+ if (entry_3.tariffComponentID.HasValue()) {
+ newElement_3.tariffComponentID = [NSNumber numberWithUnsignedInt:entry_3.tariffComponentID.Value()];
+ } else {
+ newElement_3.tariffComponentID = nil;
+ }
+ [array_3 addObject:newElement_3];
+ }
+ CHIP_ERROR err = iter_3.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ newElement_0.components = array_3;
+ }
+ } else {
+ newElement_0.components = nil;
+ }
+ [array_0 addObject:newElement_0];
+ }
+ CHIP_ERROR err = iter_0.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ *aError = err;
+ return nil;
+ }
+ memberValue = array_0;
+ }
+ value.priceForecast = memberValue;
+ } while (0);
+
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeEventPayloadForDemandResponseLoadControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::DemandResponseLoadControl;
@@ -4787,6 +4964,18 @@
*aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
return nil;
}
+static id _Nullable DecodeEventPayloadForCommodityTariffCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::CommodityTariff;
+ switch (aEventId) {
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeEventPayloadForEcosystemInformationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::EcosystemInformation;
@@ -4867,6 +5056,30 @@
*aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
return nil;
}
+static id _Nullable DecodeEventPayloadForMeterIdentificationCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::MeterIdentification;
+ switch (aEventId) {
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ return nil;
+}
+static id _Nullable DecodeEventPayloadForCommodityMeteringCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::CommodityMetering;
+ switch (aEventId) {
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeEventPayloadForUnitTestingCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::UnitTesting;
@@ -5248,6 +5461,9 @@
case Clusters::WaterHeaterManagement::Id: {
return DecodeEventPayloadForWaterHeaterManagementCluster(aPath.mEventId, aReader, aError);
}
+ case Clusters::CommodityPrice::Id: {
+ return DecodeEventPayloadForCommodityPriceCluster(aPath.mEventId, aReader, aError);
+ }
case Clusters::DemandResponseLoadControl::Id: {
return DecodeEventPayloadForDemandResponseLoadControlCluster(aPath.mEventId, aReader, aError);
}
@@ -5428,6 +5644,9 @@
case Clusters::Chime::Id: {
return DecodeEventPayloadForChimeCluster(aPath.mEventId, aReader, aError);
}
+ case Clusters::CommodityTariff::Id: {
+ return DecodeEventPayloadForCommodityTariffCluster(aPath.mEventId, aReader, aError);
+ }
case Clusters::EcosystemInformation::Id: {
return DecodeEventPayloadForEcosystemInformationCluster(aPath.mEventId, aReader, aError);
}
@@ -5440,6 +5659,12 @@
case Clusters::TlsClientManagement::Id: {
return DecodeEventPayloadForTLSClientManagementCluster(aPath.mEventId, aReader, aError);
}
+ case Clusters::MeterIdentification::Id: {
+ return DecodeEventPayloadForMeterIdentificationCluster(aPath.mEventId, aReader, aError);
+ }
+ case Clusters::CommodityMetering::Id: {
+ return DecodeEventPayloadForCommodityMeteringCluster(aPath.mEventId, aReader, aError);
+ }
case Clusters::UnitTesting::Id: {
return DecodeEventPayloadForUnitTestingCluster(aPath.mEventId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index c7598ab..d4b910c 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -20,6 +20,19 @@
NS_ASSUME_NONNULL_BEGIN
MTR_PROVISIONALLY_AVAILABLE
+@interface MTRDataTypeCurrencyStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull currency MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull decimalPoints MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRDataTypePowerThresholdStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nullable powerThreshold MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable apparentPowerThreshold MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable powerThresholdSource MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTRDataTypeTestGlobalStruct : NSObject <NSCopying>
@property (nonatomic, copy) NSString * _Nonnull name MTR_PROVISIONALLY_AVAILABLE;
@property (nonatomic, copy) NSNumber * _Nullable myBitmap MTR_PROVISIONALLY_AVAILABLE;
@@ -33,6 +46,12 @@
@property (nonatomic, copy) NSNumber * _Nullable areaType MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRDataTypePriceStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull amount MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRDataTypeCurrencyStruct * _Nonnull currency MTR_PROVISIONALLY_AVAILABLE;
+@end
+
MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4))
@interface MTRDataTypeAtomicAttributeStatusStruct : NSObject <NSCopying>
@property (nonatomic, copy) NSNumber * _Nonnull attributeID MTR_AVAILABLE(ios(18.4), macos(15.4), watchos(11.4), tvos(18.4));
@@ -1252,6 +1271,33 @@
@end
MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterCommodityPriceComponentStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull price MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull source MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nullable descriptionString MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable tariffComponentID MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterCommodityPriceStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull periodStart MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable periodEnd MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRDataTypePriceStruct * _Nonnull price MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nullable descriptionString MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nullable components MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterPriceChangeEvent : NSObject <NSCopying>
+@property (nonatomic, copy) MTRCommodityPriceClusterCommodityPriceStruct * _Nonnull currentPrice MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityPriceClusterForecastChangeEvent : NSObject <NSCopying>
+@property (nonatomic, copy) NSArray * _Nonnull priceForecast MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTRDemandResponseLoadControlClusterHeatingSourceControlStruct : NSObject <NSCopying>
@property (nonatomic, copy) NSNumber * _Nonnull heatingSource MTR_PROVISIONALLY_AVAILABLE;
@end
@@ -2435,6 +2481,82 @@
@end
MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterPeakPeriodStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull severity MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull peakPeriod MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull number MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull requiredState MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterTariffPriceStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull priceType MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable price MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable priceLevel MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterTariffComponentStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull tariffComponentID MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRCommodityTariffClusterTariffPriceStruct * _Nullable price MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable friendlyCredit MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct * _Nullable auxiliaryLoad MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRCommodityTariffClusterPeakPeriodStruct * _Nullable peakPeriod MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRDataTypePowerThresholdStruct * _Nullable powerThreshold MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable threshold MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nullable label MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable predicted MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterCalendarPeriodStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nullable startDate MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull dayPatternIDs MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterDayEntryStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull dayEntryID MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull startTime MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable duration MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable randomizationOffset MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable randomizationType MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterDayPatternStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull dayPatternID MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull daysOfWeek MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull dayEntryIDs MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterDayStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull date MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull dayType MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull dayEntryIDs MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterTariffInformationStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSString * _Nullable tariffLabel MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nullable providerName MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRDataTypeCurrencyStruct * _Nullable currency MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable blockMode MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityTariffClusterTariffPeriodStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSString * _Nullable label MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull dayEntryIDs MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull tariffComponentIDs MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTREcosystemInformationClusterDeviceTypeStruct : NSObject <NSCopying>
@property (nonatomic, copy) NSNumber * _Nonnull deviceType MTR_PROVISIONALLY_AVAILABLE;
@property (nonatomic, copy) NSNumber * _Nonnull revision MTR_PROVISIONALLY_AVAILABLE;
@@ -2491,6 +2613,12 @@
@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE;
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRCommodityMeteringClusterMeteredQuantityStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSArray * _Nonnull tariffComponentIDs MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nonnull quantity MTR_PROVISIONALLY_AVAILABLE;
+@end
+
MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
@interface MTRUnitTestingClusterSimpleStruct : NSObject <NSCopying>
@property (nonatomic, copy) NSNumber * _Nonnull a MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4));
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index 40073e5..c12c12b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -19,6 +19,69 @@
NS_ASSUME_NONNULL_BEGIN
+@implementation MTRDataTypeCurrencyStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _currency = @(0);
+
+ _decimalPoints = @(0);
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRDataTypeCurrencyStruct alloc] init];
+
+ other.currency = self.currency;
+ other.decimalPoints = self.decimalPoints;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: currency:%@; decimalPoints:%@; >", NSStringFromClass([self class]), _currency, _decimalPoints];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRDataTypePowerThresholdStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _powerThreshold = nil;
+
+ _apparentPowerThreshold = nil;
+
+ _powerThresholdSource = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRDataTypePowerThresholdStruct alloc] init];
+
+ other.powerThreshold = self.powerThreshold;
+ other.apparentPowerThreshold = self.apparentPowerThreshold;
+ other.powerThresholdSource = self.powerThresholdSource;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: powerThreshold:%@; apparentPowerThreshold:%@; powerThresholdSource:%@; >", NSStringFromClass([self class]), _powerThreshold, _apparentPowerThreshold, _powerThresholdSource];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRDataTypeTestGlobalStruct
- (instancetype)init
{
@@ -85,6 +148,36 @@
@end
+@implementation MTRDataTypePriceStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _amount = @(0);
+
+ _currency = [MTRDataTypeCurrencyStruct new];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRDataTypePriceStruct alloc] init];
+
+ other.amount = self.amount;
+ other.currency = self.currency;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: amount:%@; currency:%@; >", NSStringFromClass([self class]), _amount, _currency];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRDataTypeAtomicAttributeStatusStruct
- (instancetype)init
{
@@ -5100,6 +5193,135 @@
@end
+@implementation MTRCommodityPriceClusterCommodityPriceComponentStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _price = @(0);
+
+ _source = @(0);
+
+ _descriptionString = nil;
+
+ _tariffComponentID = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityPriceClusterCommodityPriceComponentStruct alloc] init];
+
+ other.price = self.price;
+ other.source = self.source;
+ other.descriptionString = self.descriptionString;
+ other.tariffComponentID = self.tariffComponentID;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: price:%@; source:%@; descriptionString:%@; tariffComponentID:%@; >", NSStringFromClass([self class]), _price, _source, _descriptionString, _tariffComponentID];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterCommodityPriceStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _periodStart = @(0);
+
+ _periodEnd = nil;
+
+ _price = [MTRDataTypePriceStruct new];
+
+ _descriptionString = nil;
+
+ _components = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityPriceClusterCommodityPriceStruct alloc] init];
+
+ other.periodStart = self.periodStart;
+ other.periodEnd = self.periodEnd;
+ other.price = self.price;
+ other.descriptionString = self.descriptionString;
+ other.components = self.components;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: periodStart:%@; periodEnd:%@; price:%@; descriptionString:%@; components:%@; >", NSStringFromClass([self class]), _periodStart, _periodEnd, _price, _descriptionString, _components];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterPriceChangeEvent
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _currentPrice = [MTRCommodityPriceClusterCommodityPriceStruct new];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityPriceClusterPriceChangeEvent alloc] init];
+
+ other.currentPrice = self.currentPrice;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: currentPrice:%@; >", NSStringFromClass([self class]), _currentPrice];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityPriceClusterForecastChangeEvent
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _priceForecast = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityPriceClusterForecastChangeEvent alloc] init];
+
+ other.priceForecast = self.priceForecast;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: priceForecast:%@; >", NSStringFromClass([self class]), _priceForecast];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRDemandResponseLoadControlClusterHeatingSourceControlStruct
- (instancetype)init
{
@@ -10187,6 +10409,354 @@
@end
+@implementation MTRCommodityTariffClusterPeakPeriodStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _severity = @(0);
+
+ _peakPeriod = @(0);
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterPeakPeriodStruct alloc] init];
+
+ other.severity = self.severity;
+ other.peakPeriod = self.peakPeriod;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: severity:%@; peakPeriod:%@; >", NSStringFromClass([self class]), _severity, _peakPeriod];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _number = @(0);
+
+ _requiredState = @(0);
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterAuxiliaryLoadSwitchSettingsStruct alloc] init];
+
+ other.number = self.number;
+ other.requiredState = self.requiredState;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: number:%@; requiredState:%@; >", NSStringFromClass([self class]), _number, _requiredState];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterTariffPriceStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _priceType = @(0);
+
+ _price = nil;
+
+ _priceLevel = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterTariffPriceStruct alloc] init];
+
+ other.priceType = self.priceType;
+ other.price = self.price;
+ other.priceLevel = self.priceLevel;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: priceType:%@; price:%@; priceLevel:%@; >", NSStringFromClass([self class]), _priceType, _price, _priceLevel];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterTariffComponentStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _tariffComponentID = @(0);
+
+ _price = nil;
+
+ _friendlyCredit = nil;
+
+ _auxiliaryLoad = nil;
+
+ _peakPeriod = nil;
+
+ _powerThreshold = nil;
+
+ _threshold = nil;
+
+ _label = nil;
+
+ _predicted = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterTariffComponentStruct alloc] init];
+
+ other.tariffComponentID = self.tariffComponentID;
+ other.price = self.price;
+ other.friendlyCredit = self.friendlyCredit;
+ other.auxiliaryLoad = self.auxiliaryLoad;
+ other.peakPeriod = self.peakPeriod;
+ other.powerThreshold = self.powerThreshold;
+ other.threshold = self.threshold;
+ other.label = self.label;
+ other.predicted = self.predicted;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: tariffComponentID:%@; price:%@; friendlyCredit:%@; auxiliaryLoad:%@; peakPeriod:%@; powerThreshold:%@; threshold:%@; label:%@; predicted:%@; >", NSStringFromClass([self class]), _tariffComponentID, _price, _friendlyCredit, _auxiliaryLoad, _peakPeriod, _powerThreshold, _threshold, _label, _predicted];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterCalendarPeriodStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _startDate = nil;
+
+ _dayPatternIDs = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterCalendarPeriodStruct alloc] init];
+
+ other.startDate = self.startDate;
+ other.dayPatternIDs = self.dayPatternIDs;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: startDate:%@; dayPatternIDs:%@; >", NSStringFromClass([self class]), _startDate, _dayPatternIDs];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterDayEntryStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _dayEntryID = @(0);
+
+ _startTime = @(0);
+
+ _duration = nil;
+
+ _randomizationOffset = nil;
+
+ _randomizationType = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterDayEntryStruct alloc] init];
+
+ other.dayEntryID = self.dayEntryID;
+ other.startTime = self.startTime;
+ other.duration = self.duration;
+ other.randomizationOffset = self.randomizationOffset;
+ other.randomizationType = self.randomizationType;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayEntryID:%@; startTime:%@; duration:%@; randomizationOffset:%@; randomizationType:%@; >", NSStringFromClass([self class]), _dayEntryID, _startTime, _duration, _randomizationOffset, _randomizationType];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterDayPatternStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _dayPatternID = @(0);
+
+ _daysOfWeek = @(0);
+
+ _dayEntryIDs = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterDayPatternStruct alloc] init];
+
+ other.dayPatternID = self.dayPatternID;
+ other.daysOfWeek = self.daysOfWeek;
+ other.dayEntryIDs = self.dayEntryIDs;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayPatternID:%@; daysOfWeek:%@; dayEntryIDs:%@; >", NSStringFromClass([self class]), _dayPatternID, _daysOfWeek, _dayEntryIDs];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterDayStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _date = @(0);
+
+ _dayType = @(0);
+
+ _dayEntryIDs = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterDayStruct alloc] init];
+
+ other.date = self.date;
+ other.dayType = self.dayType;
+ other.dayEntryIDs = self.dayEntryIDs;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: date:%@; dayType:%@; dayEntryIDs:%@; >", NSStringFromClass([self class]), _date, _dayType, _dayEntryIDs];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterTariffInformationStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _tariffLabel = nil;
+
+ _providerName = nil;
+
+ _currency = nil;
+
+ _blockMode = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterTariffInformationStruct alloc] init];
+
+ other.tariffLabel = self.tariffLabel;
+ other.providerName = self.providerName;
+ other.currency = self.currency;
+ other.blockMode = self.blockMode;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: tariffLabel:%@; providerName:%@; currency:%@; blockMode:%@; >", NSStringFromClass([self class]), _tariffLabel, _providerName, _currency, _blockMode];
+ return descriptionString;
+}
+
+@end
+
+@implementation MTRCommodityTariffClusterTariffPeriodStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _label = nil;
+
+ _dayEntryIDs = [NSArray array];
+
+ _tariffComponentIDs = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityTariffClusterTariffPeriodStruct alloc] init];
+
+ other.label = self.label;
+ other.dayEntryIDs = self.dayEntryIDs;
+ other.tariffComponentIDs = self.tariffComponentIDs;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; dayEntryIDs:%@; tariffComponentIDs:%@; >", NSStringFromClass([self class]), _label, _dayEntryIDs, _tariffComponentIDs];
+ return descriptionString;
+}
+
+@end
+
@implementation MTREcosystemInformationClusterDeviceTypeStruct
- (instancetype)init
{
@@ -10442,6 +11012,36 @@
@end
+@implementation MTRCommodityMeteringClusterMeteredQuantityStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _tariffComponentIDs = [NSArray array];
+
+ _quantity = @(0);
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRCommodityMeteringClusterMeteredQuantityStruct alloc] init];
+
+ other.tariffComponentIDs = self.tariffComponentIDs;
+ other.quantity = self.quantity;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: tariffComponentIDs:%@; quantity:%@; >", NSStringFromClass([self class]), _tariffComponentIDs, _quantity];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRUnitTestingClusterSimpleStruct
- (instancetype)init
{
diff --git a/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp b/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp
index dcf78b1..836b331 100644
--- a/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp
+++ b/src/data-model-providers/codegen/tests/TestCodegenModelViaMocks.cpp
@@ -542,9 +542,13 @@
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_ELAPSED_S_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_TEMPERATURE_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_POWER_MW_ATTRIBUTE_TYPE),
+ MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_POWER_MVA_ATTRIBUTE_TYPE),
+ MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_POWER_MVAR_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_VOLTAGE_MV_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_ENERGY_MWH_ATTRIBUTE_TYPE),
+ MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_ENERGY_MVAH_ATTRIBUTE_TYPE),
+ MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_ENERGY_MVARH_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_TOD_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_DATE_ATTRIBUTE_TYPE),
MOCK_ATTRIBUTE_CONFIG_NULLABLE(ZCL_EPOCH_US_ATTRIBUTE_TYPE),
diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h
index ae49367..2d62933 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h
@@ -74,11 +74,15 @@
ZCL_SYSTIME_US_ATTRIBUTE_TYPE = 0xD0, // System Time Microseconds
ZCL_SYSTIME_MS_ATTRIBUTE_TYPE = 0xD1, // System Time Milliseconds
ZCL_ELAPSED_S_ATTRIBUTE_TYPE = 0xD2, // Elapsed Time Seconds
+ ZCL_POWER_MVA_ATTRIBUTE_TYPE = 0xD6, // Power millivolt-amps
+ ZCL_POWER_MVAR_ATTRIBUTE_TYPE = 0xD7, // Power millivolt-amps reactive
ZCL_TEMPERATURE_ATTRIBUTE_TYPE = 0xD8, // Temperature
ZCL_POWER_MW_ATTRIBUTE_TYPE = 0xD9, // Power milliwatts
ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE = 0xDA, // Amperage milliamps
ZCL_VOLTAGE_MV_ATTRIBUTE_TYPE = 0xDB, // Voltage millivolts
ZCL_ENERGY_MWH_ATTRIBUTE_TYPE = 0xDC, // Energy milliwatt-hours
+ ZCL_ENERGY_MVAH_ATTRIBUTE_TYPE = 0xDD, // Energy millivolt-amp-hours
+ ZCL_ENERGY_MVARH_ATTRIBUTE_TYPE = 0xDE, // Energy millivolt-amp-hours reactive
ZCL_TOD_ATTRIBUTE_TYPE = 0xE0, // Time of day
ZCL_DATE_ATTRIBUTE_TYPE = 0xE1, // Date
ZCL_EPOCH_US_ATTRIBUTE_TYPE = 0xE3, // Epoch Microseconds
@@ -99,6 +103,7 @@
ZCL_IPV6ADR_ATTRIBUTE_TYPE = 0xF4, // IPv6 Address
ZCL_IPV6PRE_ATTRIBUTE_TYPE = 0xF5, // IPv6 Prefix
ZCL_HWADR_ATTRIBUTE_TYPE = 0xF6, // Hardware Address
+ ZCL_MONEY_ATTRIBUTE_TYPE = 0xF7, // Money
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown
};
@@ -124,6 +129,10 @@
return true;
case ZCL_INT64S_ATTRIBUTE_TYPE:
return true;
+ case ZCL_POWER_MVA_ATTRIBUTE_TYPE:
+ return true;
+ case ZCL_POWER_MVAR_ATTRIBUTE_TYPE:
+ return true;
case ZCL_TEMPERATURE_ATTRIBUTE_TYPE:
return true;
case ZCL_POWER_MW_ATTRIBUTE_TYPE:
@@ -134,6 +143,12 @@
return true;
case ZCL_ENERGY_MWH_ATTRIBUTE_TYPE:
return true;
+ case ZCL_ENERGY_MVAH_ATTRIBUTE_TYPE:
+ return true;
+ case ZCL_ENERGY_MVARH_ATTRIBUTE_TYPE:
+ return true;
+ case ZCL_MONEY_ATTRIBUTE_TYPE:
+ return true;
default:
return false;
}
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
index 74310f9..a402dad 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
@@ -15164,6 +15164,154 @@
namespace Attributes {} // namespace Attributes
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Attributes {
+
+namespace TariffUnit {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum * value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityPrice::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value,
+ MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityPrice::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityPrice::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+} // namespace TariffUnit
+
+namespace FeatureMap {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityPrice::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityPrice::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityPrice::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+}
+
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityPrice::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityPrice::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityPrice::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityPrice
+
namespace DemandResponseLoadControl {
namespace Attributes {
@@ -38440,6 +38588,657 @@
} // namespace Attributes
} // namespace Chime
+namespace CommodityTariff {
+namespace Attributes {
+
+namespace TariffUnit {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint,
+ DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> & value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value,
+ MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::Globals::TariffUnitEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace TariffUnit
+
+namespace StartDate {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace StartDate
+
+namespace CurrentDayEntryDate {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace CurrentDayEntryDate
+
+namespace NextDayEntryDate {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace NextDayEntryDate
+
+namespace DefaultRandomizationOffset {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<int16_t> & value)
+{
+ using Traits = NumericAttributeTraits<int16_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<int16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value)
+{
+ using Traits = NumericAttributeTraits<int16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<int16_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<int16_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<int16_t> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<int16_t> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace DefaultRandomizationOffset
+
+namespace DefaultRandomizationType {
+
+Protocols::InteractionModel::Status
+Get(EndpointId endpoint, DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> & value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint,
+ chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace DefaultRandomizationType
+
+namespace FeatureMap {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+}
+
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityTariff::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityTariff::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityTariff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityTariff
+
namespace EcosystemInformation {
namespace Attributes {
@@ -39032,6 +39831,751 @@
} // namespace Attributes
} // namespace TlsClientManagement
+namespace MeterIdentification {
+namespace Attributes {
+
+namespace MeterType {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint,
+ DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> & value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MeterIdentification::MeterTypeEnum value,
+ MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MeterIdentification::MeterTypeEnum value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace MeterType
+
+namespace PointOfDelivery {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value)
+{
+ if (value.IsNull())
+ {
+ ChipLogError(Zcl, "Null Nullable<Span> passed to MeterIdentification::PointOfDelivery::Get");
+ return Protocols::InteractionModel::Status::Failure;
+ }
+
+ uint8_t zclString[64 + 1];
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, sizeof(zclString));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ size_t length = emberAfStringLength(zclString);
+ if (length == NumericAttributeTraits<uint8_t>::kNullValue)
+ {
+ value.SetNull();
+ return Protocols::InteractionModel::Status::Success;
+ }
+ auto & span = value.Value();
+
+ VerifyOrReturnError(span.size() == 64, Protocols::InteractionModel::Status::InvalidDataType);
+ memcpy(span.data(), &zclString[1], 64);
+ span.reduce_size(length);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty)
+{
+
+ static_assert(64 < NumericAttributeTraits<uint8_t>::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[64 + 1];
+ auto length = static_cast<uint8_t>(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value)
+{
+
+ static_assert(64 < NumericAttributeTraits<uint8_t>::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[64 + 1];
+ auto length = static_cast<uint8_t>(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ uint8_t zclString[1] = { 0xFF };
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ uint8_t zclString[1] = { 0xFF };
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace PointOfDelivery
+
+namespace MeterSerialNumber {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value)
+{
+ if (value.IsNull())
+ {
+ ChipLogError(Zcl, "Null Nullable<Span> passed to MeterIdentification::MeterSerialNumber::Get");
+ return Protocols::InteractionModel::Status::Failure;
+ }
+
+ uint8_t zclString[64 + 1];
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, sizeof(zclString));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ size_t length = emberAfStringLength(zclString);
+ if (length == NumericAttributeTraits<uint8_t>::kNullValue)
+ {
+ value.SetNull();
+ return Protocols::InteractionModel::Status::Success;
+ }
+ auto & span = value.Value();
+
+ VerifyOrReturnError(span.size() == 64, Protocols::InteractionModel::Status::InvalidDataType);
+ memcpy(span.data(), &zclString[1], 64);
+ span.reduce_size(length);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty)
+{
+
+ static_assert(64 < NumericAttributeTraits<uint8_t>::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[64 + 1];
+ auto length = static_cast<uint8_t>(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value)
+{
+
+ static_assert(64 < NumericAttributeTraits<uint8_t>::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[64 + 1];
+ auto length = static_cast<uint8_t>(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ uint8_t zclString[1] = { 0xFF };
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ uint8_t zclString[1] = { 0xFF };
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace MeterSerialNumber
+
+namespace ProtocolVersion {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value)
+{
+ if (value.IsNull())
+ {
+ ChipLogError(Zcl, "Null Nullable<Span> passed to MeterIdentification::ProtocolVersion::Get");
+ return Protocols::InteractionModel::Status::Failure;
+ }
+
+ uint8_t zclString[64 + 1];
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, sizeof(zclString));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ size_t length = emberAfStringLength(zclString);
+ if (length == NumericAttributeTraits<uint8_t>::kNullValue)
+ {
+ value.SetNull();
+ return Protocols::InteractionModel::Status::Success;
+ }
+ auto & span = value.Value();
+
+ VerifyOrReturnError(span.size() == 64, Protocols::InteractionModel::Status::InvalidDataType);
+ memcpy(span.data(), &zclString[1], 64);
+ span.reduce_size(length);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty)
+{
+
+ static_assert(64 < NumericAttributeTraits<uint8_t>::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[64 + 1];
+ auto length = static_cast<uint8_t>(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value)
+{
+
+ static_assert(64 < NumericAttributeTraits<uint8_t>::kNullValue, "value.size() might be too big");
+ VerifyOrReturnError(value.size() <= 64, Protocols::InteractionModel::Status::ConstraintError);
+ uint8_t zclString[64 + 1];
+ auto length = static_cast<uint8_t>(value.size());
+ Encoding::Put8(zclString, length);
+ memcpy(&zclString[1], value.data(), value.size());
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ uint8_t zclString[1] = { 0xFF };
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ uint8_t zclString[1] = { 0xFF };
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace ProtocolVersion
+
+namespace FeatureMap {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+}
+
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::MeterIdentification::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MeterIdentification::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::MeterIdentification::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace MeterIdentification
+
+namespace CommodityMetering {
+namespace Attributes {
+
+namespace MeteredQuantityTimestamp {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityMetering::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityMetering::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityMetering::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityMetering::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityMetering::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace MeteredQuantityTimestamp
+
+namespace MeasurementType {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint,
+ DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> & value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityMetering::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (Traits::IsNullValue(temp))
+ {
+ value.SetNull();
+ }
+ else
+ {
+ value.SetNonNull() = Traits::StorageToWorking(temp);
+ }
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::CommodityMetering::MeasurementTypeEnum value,
+ MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityMetering::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::CommodityMetering::MeasurementTypeEnum value)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ true, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityMetering::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityMetering::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint)
+{
+ using Traits = NumericAttributeTraits<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ Traits::StorageType value;
+ Traits::SetNull(value);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(value);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityMetering::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE);
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> & value,
+ MarkAttributeDirty markDirty)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint, markDirty);
+ }
+
+ return Set(endpoint, value.Value(), markDirty);
+}
+
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> & value)
+{
+ if (value.IsNull())
+ {
+ return SetNull(endpoint);
+ }
+
+ return Set(endpoint, value.Value());
+}
+
+} // namespace MeasurementType
+
+namespace FeatureMap {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityMetering::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityMetering::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value)
+{
+ using Traits = NumericAttributeTraits<uint32_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityMetering::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE);
+}
+
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ Traits::StorageType temp;
+ uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
+ Protocols::InteractionModel::Status status =
+ emberAfReadAttribute(endpoint, Clusters::CommodityMetering::Id, Id, readable, sizeof(temp));
+ VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status);
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ *value = Traits::StorageToWorking(temp);
+ return status;
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommodityMetering::Id, Id),
+ EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty));
+}
+
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value)
+{
+ using Traits = NumericAttributeTraits<uint16_t>;
+ if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
+ {
+ return Protocols::InteractionModel::Status::ConstraintError;
+ }
+ Traits::StorageType storageValue;
+ Traits::WorkingToStorage(value, storageValue);
+ uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
+ return emberAfWriteAttribute(endpoint, Clusters::CommodityMetering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE);
+}
+
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityMetering
+
namespace UnitTesting {
namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index 51af714..21bdf9e 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -2424,6 +2424,32 @@
namespace Attributes {} // namespace Attributes
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Attributes {
+
+namespace TariffUnit {
+Protocols::InteractionModel::Status Get(EndpointId endpoint,
+ chip::app::Clusters::Globals::TariffUnitEnum * value); // TariffUnitEnum
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value,
+ MarkAttributeDirty markDirty);
+} // namespace TariffUnit
+
+namespace FeatureMap {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty);
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityPrice
+
namespace DemandResponseLoadControl {
namespace Attributes {
@@ -5857,6 +5883,102 @@
} // namespace Attributes
} // namespace Chime
+namespace CommodityTariff {
+namespace Attributes {
+
+namespace TariffUnit {
+Protocols::InteractionModel::Status
+Get(EndpointId endpoint, DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> & value); // TariffUnitEnum
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TariffUnitEnum value,
+ MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> & value,
+ MarkAttributeDirty markDirty);
+} // namespace TariffUnit
+
+namespace StartDate {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value); // epoch_s
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty);
+} // namespace StartDate
+
+namespace CurrentDayEntryDate {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value); // epoch_s
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty);
+} // namespace CurrentDayEntryDate
+
+namespace NextDayEntryDate {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value); // epoch_s
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty);
+} // namespace NextDayEntryDate
+
+namespace DefaultRandomizationOffset {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<int16_t> & value); // int16s
+Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<int16_t> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<int16_t> & value,
+ MarkAttributeDirty markDirty);
+} // namespace DefaultRandomizationOffset
+
+namespace DefaultRandomizationType {
+Protocols::InteractionModel::Status Get(EndpointId endpoint,
+ DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> &
+ value); // DayEntryRandomizationTypeEnum
+Protocols::InteractionModel::Status Set(EndpointId endpoint,
+ chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum value);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> & value);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint,
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> & value,
+ MarkAttributeDirty markDirty);
+} // namespace DefaultRandomizationType
+
+namespace FeatureMap {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty);
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityTariff
+
namespace EcosystemInformation {
namespace Attributes {
@@ -5958,6 +6080,117 @@
} // namespace Attributes
} // namespace TlsClientManagement
+namespace MeterIdentification {
+namespace Attributes {
+
+namespace MeterType {
+Protocols::InteractionModel::Status
+Get(EndpointId endpoint, DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> & value); // MeterTypeEnum
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MeterIdentification::MeterTypeEnum value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MeterIdentification::MeterTypeEnum value,
+ MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> & value);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> & value,
+ MarkAttributeDirty markDirty);
+} // namespace MeterType
+
+namespace PointOfDelivery {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value); // char_string
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value,
+ MarkAttributeDirty markDirty);
+} // namespace PointOfDelivery
+
+namespace MeterSerialNumber {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value); // char_string
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value,
+ MarkAttributeDirty markDirty);
+} // namespace MeterSerialNumber
+
+namespace ProtocolVersion {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<chip::MutableCharSpan> & value); // char_string
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::CharSpan> & value,
+ MarkAttributeDirty markDirty);
+} // namespace ProtocolVersion
+
+namespace FeatureMap {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty);
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace MeterIdentification
+
+namespace CommodityMetering {
+namespace Attributes {
+
+namespace MeteredQuantityTimestamp {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable<uint32_t> & value); // epoch_s
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable<uint32_t> & value,
+ MarkAttributeDirty markDirty);
+} // namespace MeteredQuantityTimestamp
+
+namespace MeasurementType {
+Protocols::InteractionModel::Status
+Get(EndpointId endpoint,
+ DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> & value); // MeasurementTypeEnum
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::CommodityMetering::MeasurementTypeEnum value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::CommodityMetering::MeasurementTypeEnum value,
+ MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint);
+Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> & value);
+Protocols::InteractionModel::Status
+Set(EndpointId endpoint, const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> & value,
+ MarkAttributeDirty markDirty);
+} // namespace MeasurementType
+
+namespace FeatureMap {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty);
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value);
+Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty);
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityMetering
+
namespace UnitTesting {
namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h
index 82d2d31..dc9ed22 100644
--- a/zzz_generated/app-common/app-common/zap-generated/callback.h
+++ b/zzz_generated/app-common/app-common/zap-generated/callback.h
@@ -696,6 +696,16 @@
/**
* @param endpoint Endpoint that is being initialized
*/
+void emberAfCommodityPriceClusterInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void emberAfCommodityPriceClusterShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
void emberAfDemandResponseLoadControlClusterInitCallback(chip::EndpointId endpoint);
/**
@@ -1296,6 +1306,16 @@
/**
* @param endpoint Endpoint that is being initialized
*/
+void emberAfCommodityTariffClusterInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void emberAfCommodityTariffClusterShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
void emberAfEcosystemInformationClusterInitCallback(chip::EndpointId endpoint);
/**
@@ -1336,6 +1356,26 @@
/**
* @param endpoint Endpoint that is being initialized
*/
+void emberAfMeterIdentificationClusterInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void emberAfMeterIdentificationClusterShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityMeteringClusterInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void emberAfCommodityMeteringClusterShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
void emberAfUnitTestingClusterInitCallback(chip::EndpointId endpoint);
/**
@@ -3912,6 +3952,45 @@
void emberAfWaterHeaterManagementClusterServerTickCallback(chip::EndpointId endpoint);
//
+// Commodity Price Cluster
+//
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityPriceClusterServerInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void MatterCommodityPriceClusterServerShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityPriceClusterClientInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param attributePath Concrete attribute path that changed
+ */
+void MatterCommodityPriceClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
+
+/**
+ * @param attributePath Concrete attribute path to be changed
+ * @param attributeType Attribute type
+ * @param size Attribute size
+ * @param value Attribute value
+ */
+chip::Protocols::InteractionModel::Status
+MatterCommodityPriceClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
+ EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
+
+/**
+ * @param endpoint Endpoint that is being served
+ */
+void emberAfCommodityPriceClusterServerTickCallback(chip::EndpointId endpoint);
+
+//
// Demand Response Load Control Cluster
//
@@ -6235,6 +6314,45 @@
void emberAfChimeClusterServerTickCallback(chip::EndpointId endpoint);
//
+// Commodity Tariff Cluster
+//
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityTariffClusterServerInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void MatterCommodityTariffClusterServerShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityTariffClusterClientInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param attributePath Concrete attribute path that changed
+ */
+void MatterCommodityTariffClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
+
+/**
+ * @param attributePath Concrete attribute path to be changed
+ * @param attributeType Attribute type
+ * @param size Attribute size
+ * @param value Attribute value
+ */
+chip::Protocols::InteractionModel::Status
+MatterCommodityTariffClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
+ EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
+
+/**
+ * @param endpoint Endpoint that is being served
+ */
+void emberAfCommodityTariffClusterServerTickCallback(chip::EndpointId endpoint);
+
+//
// Ecosystem Information Cluster
//
@@ -6387,6 +6505,83 @@
void emberAfTlsClientManagementClusterServerTickCallback(chip::EndpointId endpoint);
//
+// Meter Identification Cluster
+//
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfMeterIdentificationClusterServerInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void MatterMeterIdentificationClusterServerShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfMeterIdentificationClusterClientInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param attributePath Concrete attribute path that changed
+ */
+void MatterMeterIdentificationClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
+
+/**
+ * @param attributePath Concrete attribute path to be changed
+ * @param attributeType Attribute type
+ * @param size Attribute size
+ * @param value Attribute value
+ */
+chip::Protocols::InteractionModel::Status MatterMeterIdentificationClusterServerPreAttributeChangedCallback(
+ const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
+
+/**
+ * @param endpoint Endpoint that is being served
+ */
+void emberAfMeterIdentificationClusterServerTickCallback(chip::EndpointId endpoint);
+
+//
+// Commodity Metering Cluster
+//
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityMeteringClusterServerInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being shutdown
+ */
+void MatterCommodityMeteringClusterServerShutdownCallback(chip::EndpointId endpoint);
+
+/**
+ * @param endpoint Endpoint that is being initialized
+ */
+void emberAfCommodityMeteringClusterClientInitCallback(chip::EndpointId endpoint);
+
+/**
+ * @param attributePath Concrete attribute path that changed
+ */
+void MatterCommodityMeteringClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath);
+
+/**
+ * @param attributePath Concrete attribute path to be changed
+ * @param attributeType Attribute type
+ * @param size Attribute size
+ * @param value Attribute value
+ */
+chip::Protocols::InteractionModel::Status
+MatterCommodityMeteringClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath,
+ EmberAfAttributeType attributeType, uint16_t size, uint8_t * value);
+
+/**
+ * @param endpoint Endpoint that is being served
+ */
+void emberAfCommodityMeteringClusterServerTickCallback(chip::EndpointId endpoint);
+
+//
// Unit Testing Cluster
//
@@ -6909,6 +7104,18 @@
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
const chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::DecodableType & commandData);
/**
+ * @brief Commodity Price Cluster GetDetailedPriceRequest Command callback (from client)
+ */
+bool emberAfCommodityPriceClusterGetDetailedPriceRequestCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
+ const chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::DecodableType & commandData);
+/**
+ * @brief Commodity Price Cluster GetDetailedForecastRequest Command callback (from client)
+ */
+bool emberAfCommodityPriceClusterGetDetailedForecastRequestCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
+ const chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::DecodableType & commandData);
+/**
* @brief Demand Response Load Control Cluster RegisterLoadControlProgramRequest Command callback (from client)
*/
bool emberAfDemandResponseLoadControlClusterRegisterLoadControlProgramRequestCallback(
@@ -7683,6 +7890,18 @@
chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
const chip::app::Clusters::PushAvStreamTransport::Commands::FindTransport::DecodableType & commandData);
/**
+ * @brief Commodity Tariff Cluster GetTariffComponent Command callback (from client)
+ */
+bool emberAfCommodityTariffClusterGetTariffComponentCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
+ const chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::DecodableType & commandData);
+/**
+ * @brief Commodity Tariff Cluster GetDayEntry Command callback (from client)
+ */
+bool emberAfCommodityTariffClusterGetDayEntryCallback(
+ chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath,
+ const chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::DecodableType & commandData);
+/**
* @brief TLS Certificate Management Cluster ProvisionRootCertificate Command callback (from client)
*/
bool emberAfTlsCertificateManagementClusterProvisionRootCertificateCallback(
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h
index d05639c..822f38c 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h
@@ -314,6 +314,8 @@
case EnumType::kPowerFactor:
case EnumType::kNeutralCurrent:
case EnumType::kElectricalEnergy:
+ case EnumType::kReactiveEnergy:
+ case EnumType::kApparentEnergy:
return val;
default:
return EnumType::kUnknownEnumValue;
@@ -355,6 +357,20 @@
}
}
+static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::PowerThresholdSourceEnum val)
+{
+ using EnumType = Globals::PowerThresholdSourceEnum;
+ switch (val)
+ {
+ case EnumType::kContract:
+ case EnumType::kRegulator:
+ case EnumType::kEquipment:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+
static auto __attribute__((unused)) EnsureKnownEnumValue(detail::ProductIdentifierTypeEnum val)
{
using EnumType = detail::ProductIdentifierTypeEnum;
@@ -402,6 +418,35 @@
return EnumType::kUnknownEnumValue;
}
}
+static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::TariffPriceTypeEnum val)
+{
+ using EnumType = Globals::TariffPriceTypeEnum;
+ switch (val)
+ {
+ case EnumType::kStandard:
+ case EnumType::kCritical:
+ case EnumType::kVirtual:
+ case EnumType::kIncentive:
+ case EnumType::kIncentiveSignal:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+
+static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::TariffUnitEnum val)
+{
+ using EnumType = Globals::TariffUnitEnum;
+ switch (val)
+ {
+ case EnumType::kKWh:
+ case EnumType::kKVAh:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+
static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::TestGlobalEnum val)
{
using EnumType = Globals::TestGlobalEnum;
@@ -4061,6 +4106,76 @@
}
}
+static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::AuxiliaryLoadSettingEnum val)
+{
+ using EnumType = CommodityTariff::AuxiliaryLoadSettingEnum;
+ switch (val)
+ {
+ case EnumType::kOff:
+ case EnumType::kOn:
+ case EnumType::kNone:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::BlockModeEnum val)
+{
+ using EnumType = CommodityTariff::BlockModeEnum;
+ switch (val)
+ {
+ case EnumType::kNoBlock:
+ case EnumType::kCombined:
+ case EnumType::kIndividual:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::DayEntryRandomizationTypeEnum val)
+{
+ using EnumType = CommodityTariff::DayEntryRandomizationTypeEnum;
+ switch (val)
+ {
+ case EnumType::kNone:
+ case EnumType::kFixed:
+ case EnumType::kRandom:
+ case EnumType::kRandomPositive:
+ case EnumType::kRandomNegative:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::DayTypeEnum val)
+{
+ using EnumType = CommodityTariff::DayTypeEnum;
+ switch (val)
+ {
+ case EnumType::kStandard:
+ case EnumType::kHoliday:
+ case EnumType::kDynamic:
+ case EnumType::kEvent:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+static auto __attribute__((unused)) EnsureKnownEnumValue(CommodityTariff::PeakPeriodSeverityEnum val)
+{
+ using EnumType = CommodityTariff::PeakPeriodSeverityEnum;
+ switch (val)
+ {
+ case EnumType::kUnused:
+ case EnumType::kLow:
+ case EnumType::kMedium:
+ case EnumType::kHigh:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+
static auto __attribute__((unused)) EnsureKnownEnumValue(TlsClientManagement::TLSEndpointStatusEnum val)
{
using EnumType = TlsClientManagement::TLSEndpointStatusEnum;
@@ -4074,6 +4189,20 @@
}
}
+static auto __attribute__((unused)) EnsureKnownEnumValue(MeterIdentification::MeterTypeEnum val)
+{
+ using EnumType = MeterIdentification::MeterTypeEnum;
+ switch (val)
+ {
+ case EnumType::kUtility:
+ case EnumType::kPrivate:
+ case EnumType::kGeneric:
+ return val;
+ default:
+ return EnumType::kUnknownEnumValue;
+ }
+}
+
static auto __attribute__((unused)) EnsureKnownEnumValue(UnitTesting::SimpleEnum val)
{
using EnumType = UnitTesting::SimpleEnum;
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
index 4859b5b..05346e8 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h
@@ -99,11 +99,13 @@
kPowerFactor = 0x0C,
kNeutralCurrent = 0x0D,
kElectricalEnergy = 0x0E,
+ kReactiveEnergy = 0x0F,
+ kApparentEnergy = 0x10,
// All received enum values that are not listed above will be mapped
// to kUnknownEnumValue. This is a helper enum value that should only
// be used by code to process how it handles receiving and unknown
// enum value. This specific should never be transmitted.
- kUnknownEnumValue = 15,
+ kUnknownEnumValue = 17,
};
// Enum for MeasurementUnitEnum
@@ -418,6 +420,19 @@
kUnknownEnumValue = 7,
};
+// Enum for PowerThresholdSourceEnum
+enum class PowerThresholdSourceEnum : uint8_t
+{
+ kContract = 0x00,
+ kRegulator = 0x01,
+ kEquipment = 0x02,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 3,
+};
+
// Enum for RelativePositionTag
enum class RelativePositionTag : uint8_t
{
@@ -435,6 +450,33 @@
kUnknownEnumValue = 7,
};
+// Enum for TariffPriceTypeEnum
+enum class TariffPriceTypeEnum : uint8_t
+{
+ kStandard = 0x00,
+ kCritical = 0x01,
+ kVirtual = 0x02,
+ kIncentive = 0x03,
+ kIncentiveSignal = 0x04,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 5,
+};
+
+// Enum for TariffUnitEnum
+enum class TariffUnitEnum : uint8_t
+{
+ kKWh = 0x00,
+ kKVAh = 0x01,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 2,
+};
+
// Enum for TestGlobalEnum
enum class TestGlobalEnum : uint8_t
{
@@ -2792,6 +2834,22 @@
};
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+
+// Bitmap for CommodityPriceDetailBitmap
+enum class CommodityPriceDetailBitmap : uint16_t
+{
+ kDescription = 0x1,
+ kComponents = 0x2,
+};
+
+// Bitmap for Feature
+enum class Feature : uint32_t
+{
+ kForecasting = 0x1,
+};
+} // namespace CommodityPrice
+
namespace DemandResponseLoadControl {
// Enum for CriticalityLevelEnum
@@ -6057,6 +6115,101 @@
namespace Chime {} // namespace Chime
+namespace CommodityTariff {
+
+// Enum for AuxiliaryLoadSettingEnum
+enum class AuxiliaryLoadSettingEnum : uint8_t
+{
+ kOff = 0x00,
+ kOn = 0x01,
+ kNone = 0x02,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 3,
+};
+
+// Enum for BlockModeEnum
+enum class BlockModeEnum : uint8_t
+{
+ kNoBlock = 0x00,
+ kCombined = 0x01,
+ kIndividual = 0x02,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 3,
+};
+
+// Enum for DayEntryRandomizationTypeEnum
+enum class DayEntryRandomizationTypeEnum : uint8_t
+{
+ kNone = 0x00,
+ kFixed = 0x01,
+ kRandom = 0x02,
+ kRandomPositive = 0x03,
+ kRandomNegative = 0x04,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 5,
+};
+
+// Enum for DayTypeEnum
+enum class DayTypeEnum : uint8_t
+{
+ kStandard = 0x00,
+ kHoliday = 0x01,
+ kDynamic = 0x02,
+ kEvent = 0x03,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 4,
+};
+
+// Enum for PeakPeriodSeverityEnum
+enum class PeakPeriodSeverityEnum : uint8_t
+{
+ kUnused = 0x00,
+ kLow = 0x01,
+ kMedium = 0x02,
+ kHigh = 0x03,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 4,
+};
+
+// Bitmap for DayPatternDayOfWeekBitmap
+enum class DayPatternDayOfWeekBitmap : uint8_t
+{
+ kSunday = 0x1,
+ kMonday = 0x2,
+ kTuesday = 0x4,
+ kWednesday = 0x8,
+ kThursday = 0x10,
+ kFriday = 0x20,
+ kSaturday = 0x40,
+};
+
+// Bitmap for Feature
+enum class Feature : uint32_t
+{
+ kPricing = 0x1,
+ kFriendlyCredit = 0x2,
+ kAuxiliaryLoad = 0x4,
+ kPeakPeriod = 0x8,
+ kPowerThreshold = 0x10,
+ kRandomization = 0x20,
+};
+} // namespace CommodityTariff
+
namespace EcosystemInformation {} // namespace EcosystemInformation
namespace CommissionerControl {
@@ -6085,6 +6238,33 @@
};
} // namespace TlsClientManagement
+namespace MeterIdentification {
+
+// Enum for MeterTypeEnum
+enum class MeterTypeEnum : uint8_t
+{
+ kUtility = 0x00,
+ kPrivate = 0x01,
+ kGeneric = 0x02,
+ // All received enum values that are not listed above will be mapped
+ // to kUnknownEnumValue. This is a helper enum value that should only
+ // be used by code to process how it handles receiving and unknown
+ // enum value. This specific should never be transmitted.
+ kUnknownEnumValue = 3,
+};
+
+// Bitmap for Feature
+enum class Feature : uint32_t
+{
+ kPowerThreshold = 0x1,
+};
+} // namespace MeterIdentification
+
+namespace CommodityMetering {
+
+using MeasurementTypeEnum = Clusters::detail::MeasurementTypeEnum;
+} // namespace CommodityMetering
+
namespace UnitTesting {
// Enum for SimpleEnum
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 9f22d4c..6de9957 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
@@ -699,6 +699,93 @@
// Global structs
namespace Structs {
+namespace CurrencyStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kCurrency), currency);
+ encoder.Encode(to_underlying(Fields::kDecimalPoints), decimalPoints);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kCurrency))
+ {
+ err = DataModel::Decode(reader, currency);
+ }
+ else if (__context_tag == to_underlying(Fields::kDecimalPoints))
+ {
+ err = DataModel::Decode(reader, decimalPoints);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace CurrencyStruct
+
+namespace PowerThresholdStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kPowerThreshold), powerThreshold);
+ encoder.Encode(to_underlying(Fields::kApparentPowerThreshold), apparentPowerThreshold);
+ encoder.Encode(to_underlying(Fields::kPowerThresholdSource), powerThresholdSource);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kPowerThreshold))
+ {
+ err = DataModel::Decode(reader, powerThreshold);
+ }
+ else if (__context_tag == to_underlying(Fields::kApparentPowerThreshold))
+ {
+ err = DataModel::Decode(reader, apparentPowerThreshold);
+ }
+ else if (__context_tag == to_underlying(Fields::kPowerThresholdSource))
+ {
+ err = DataModel::Decode(reader, powerThresholdSource);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace PowerThresholdStruct
+
namespace TestGlobalStruct {
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
@@ -791,6 +878,47 @@
} // namespace LocationDescriptorStruct
+namespace PriceStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kAmount), amount);
+ encoder.Encode(to_underlying(Fields::kCurrency), currency);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kAmount))
+ {
+ err = DataModel::Decode(reader, amount);
+ }
+ else if (__context_tag == to_underlying(Fields::kCurrency))
+ {
+ err = DataModel::Decode(reader, currency);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace PriceStruct
+
namespace AtomicAttributeStatusStruct {
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
@@ -15459,6 +15587,359 @@
} // namespace Events
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Structs {
+
+namespace CommodityPriceComponentStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kPrice), price);
+ encoder.Encode(to_underlying(Fields::kSource), source);
+ encoder.Encode(to_underlying(Fields::kDescription), description);
+ encoder.Encode(to_underlying(Fields::kTariffComponentID), tariffComponentID);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kPrice))
+ {
+ err = DataModel::Decode(reader, price);
+ }
+ else if (__context_tag == to_underlying(Fields::kSource))
+ {
+ err = DataModel::Decode(reader, source);
+ }
+ else if (__context_tag == to_underlying(Fields::kDescription))
+ {
+ err = DataModel::Decode(reader, description);
+ }
+ else if (__context_tag == to_underlying(Fields::kTariffComponentID))
+ {
+ err = DataModel::Decode(reader, tariffComponentID);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace CommodityPriceComponentStruct
+
+namespace CommodityPriceStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kPeriodStart), periodStart);
+ encoder.Encode(to_underlying(Fields::kPeriodEnd), periodEnd);
+ encoder.Encode(to_underlying(Fields::kPrice), price);
+ encoder.Encode(to_underlying(Fields::kDescription), description);
+ encoder.Encode(to_underlying(Fields::kComponents), components);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kPeriodStart))
+ {
+ err = DataModel::Decode(reader, periodStart);
+ }
+ else if (__context_tag == to_underlying(Fields::kPeriodEnd))
+ {
+ err = DataModel::Decode(reader, periodEnd);
+ }
+ else if (__context_tag == to_underlying(Fields::kPrice))
+ {
+ err = DataModel::Decode(reader, price);
+ }
+ else if (__context_tag == to_underlying(Fields::kDescription))
+ {
+ err = DataModel::Decode(reader, description);
+ }
+ else if (__context_tag == to_underlying(Fields::kComponents))
+ {
+ err = DataModel::Decode(reader, components);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace CommodityPriceStruct
+} // namespace Structs
+
+namespace Commands {
+namespace GetDetailedPriceRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDetails), details);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDetails))
+ {
+ err = DataModel::Decode(reader, details);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetDetailedPriceRequest.
+namespace GetDetailedPriceResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kCurrentPrice), currentPrice);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kCurrentPrice))
+ {
+ err = DataModel::Decode(reader, currentPrice);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetDetailedPriceResponse.
+namespace GetDetailedForecastRequest {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDetails), details);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDetails))
+ {
+ err = DataModel::Decode(reader, details);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetDetailedForecastRequest.
+namespace GetDetailedForecastResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kPriceForecast), priceForecast);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kPriceForecast))
+ {
+ err = DataModel::Decode(reader, priceForecast);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetDetailedForecastResponse.
+} // namespace Commands
+
+namespace Attributes {
+CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path)
+{
+ switch (path.mAttributeId)
+ {
+ case Attributes::TariffUnit::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, tariffUnit);
+ case Attributes::Currency::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, currency);
+ case Attributes::CurrentPrice::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, currentPrice);
+ case Attributes::PriceForecast::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, priceForecast);
+ case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, generatedCommandList);
+ case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, acceptedCommandList);
+ case Attributes::AttributeList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, attributeList);
+ case Attributes::FeatureMap::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, featureMap);
+ case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, clusterRevision);
+ default:
+ return CHIP_NO_ERROR;
+ }
+}
+} // namespace Attributes
+
+namespace Events {
+namespace PriceChange {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentPrice), currentPrice));
+ return aWriter.EndContainer(outer);
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kCurrentPrice))
+ {
+ err = DataModel::Decode(reader, currentPrice);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace PriceChange.
+namespace ForecastChange {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ TLV::TLVType outer;
+ ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer));
+ ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPriceForecast), priceForecast));
+ return aWriter.EndContainer(outer);
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kPriceForecast))
+ {
+ err = DataModel::Decode(reader, priceForecast);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace ForecastChange.
+} // namespace Events
+
+} // namespace CommodityPrice
namespace DemandResponseLoadControl {
namespace Structs {
@@ -32843,6 +33324,711 @@
namespace Events {} // namespace Events
} // namespace Chime
+namespace CommodityTariff {
+namespace Structs {
+
+namespace PeakPeriodStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kSeverity), severity);
+ encoder.Encode(to_underlying(Fields::kPeakPeriod), peakPeriod);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kSeverity))
+ {
+ err = DataModel::Decode(reader, severity);
+ }
+ else if (__context_tag == to_underlying(Fields::kPeakPeriod))
+ {
+ err = DataModel::Decode(reader, peakPeriod);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace PeakPeriodStruct
+
+namespace AuxiliaryLoadSwitchSettingsStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kNumber), number);
+ encoder.Encode(to_underlying(Fields::kRequiredState), requiredState);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kNumber))
+ {
+ err = DataModel::Decode(reader, number);
+ }
+ else if (__context_tag == to_underlying(Fields::kRequiredState))
+ {
+ err = DataModel::Decode(reader, requiredState);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace AuxiliaryLoadSwitchSettingsStruct
+
+namespace TariffPriceStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kPriceType), priceType);
+ encoder.Encode(to_underlying(Fields::kPrice), price);
+ encoder.Encode(to_underlying(Fields::kPriceLevel), priceLevel);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kPriceType))
+ {
+ err = DataModel::Decode(reader, priceType);
+ }
+ else if (__context_tag == to_underlying(Fields::kPrice))
+ {
+ err = DataModel::Decode(reader, price);
+ }
+ else if (__context_tag == to_underlying(Fields::kPriceLevel))
+ {
+ err = DataModel::Decode(reader, priceLevel);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace TariffPriceStruct
+
+namespace TariffComponentStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kTariffComponentID), tariffComponentID);
+ encoder.Encode(to_underlying(Fields::kPrice), price);
+ encoder.Encode(to_underlying(Fields::kFriendlyCredit), friendlyCredit);
+ encoder.Encode(to_underlying(Fields::kAuxiliaryLoad), auxiliaryLoad);
+ encoder.Encode(to_underlying(Fields::kPeakPeriod), peakPeriod);
+ encoder.Encode(to_underlying(Fields::kPowerThreshold), powerThreshold);
+ encoder.Encode(to_underlying(Fields::kThreshold), threshold);
+ encoder.Encode(to_underlying(Fields::kLabel), label);
+ encoder.Encode(to_underlying(Fields::kPredicted), predicted);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kTariffComponentID))
+ {
+ err = DataModel::Decode(reader, tariffComponentID);
+ }
+ else if (__context_tag == to_underlying(Fields::kPrice))
+ {
+ err = DataModel::Decode(reader, price);
+ }
+ else if (__context_tag == to_underlying(Fields::kFriendlyCredit))
+ {
+ err = DataModel::Decode(reader, friendlyCredit);
+ }
+ else if (__context_tag == to_underlying(Fields::kAuxiliaryLoad))
+ {
+ err = DataModel::Decode(reader, auxiliaryLoad);
+ }
+ else if (__context_tag == to_underlying(Fields::kPeakPeriod))
+ {
+ err = DataModel::Decode(reader, peakPeriod);
+ }
+ else if (__context_tag == to_underlying(Fields::kPowerThreshold))
+ {
+ err = DataModel::Decode(reader, powerThreshold);
+ }
+ else if (__context_tag == to_underlying(Fields::kThreshold))
+ {
+ err = DataModel::Decode(reader, threshold);
+ }
+ else if (__context_tag == to_underlying(Fields::kLabel))
+ {
+ err = DataModel::Decode(reader, label);
+ }
+ else if (__context_tag == to_underlying(Fields::kPredicted))
+ {
+ err = DataModel::Decode(reader, predicted);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace TariffComponentStruct
+
+namespace CalendarPeriodStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kStartDate), startDate);
+ encoder.Encode(to_underlying(Fields::kDayPatternIDs), dayPatternIDs);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kStartDate))
+ {
+ err = DataModel::Decode(reader, startDate);
+ }
+ else if (__context_tag == to_underlying(Fields::kDayPatternIDs))
+ {
+ err = DataModel::Decode(reader, dayPatternIDs);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace CalendarPeriodStruct
+
+namespace DayEntryStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDayEntryID), dayEntryID);
+ encoder.Encode(to_underlying(Fields::kStartTime), startTime);
+ encoder.Encode(to_underlying(Fields::kDuration), duration);
+ encoder.Encode(to_underlying(Fields::kRandomizationOffset), randomizationOffset);
+ encoder.Encode(to_underlying(Fields::kRandomizationType), randomizationType);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDayEntryID))
+ {
+ err = DataModel::Decode(reader, dayEntryID);
+ }
+ else if (__context_tag == to_underlying(Fields::kStartTime))
+ {
+ err = DataModel::Decode(reader, startTime);
+ }
+ else if (__context_tag == to_underlying(Fields::kDuration))
+ {
+ err = DataModel::Decode(reader, duration);
+ }
+ else if (__context_tag == to_underlying(Fields::kRandomizationOffset))
+ {
+ err = DataModel::Decode(reader, randomizationOffset);
+ }
+ else if (__context_tag == to_underlying(Fields::kRandomizationType))
+ {
+ err = DataModel::Decode(reader, randomizationType);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace DayEntryStruct
+
+namespace DayPatternStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDayPatternID), dayPatternID);
+ encoder.Encode(to_underlying(Fields::kDaysOfWeek), daysOfWeek);
+ encoder.Encode(to_underlying(Fields::kDayEntryIDs), dayEntryIDs);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDayPatternID))
+ {
+ err = DataModel::Decode(reader, dayPatternID);
+ }
+ else if (__context_tag == to_underlying(Fields::kDaysOfWeek))
+ {
+ err = DataModel::Decode(reader, daysOfWeek);
+ }
+ else if (__context_tag == to_underlying(Fields::kDayEntryIDs))
+ {
+ err = DataModel::Decode(reader, dayEntryIDs);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace DayPatternStruct
+
+namespace DayStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDate), date);
+ encoder.Encode(to_underlying(Fields::kDayType), dayType);
+ encoder.Encode(to_underlying(Fields::kDayEntryIDs), dayEntryIDs);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDate))
+ {
+ err = DataModel::Decode(reader, date);
+ }
+ else if (__context_tag == to_underlying(Fields::kDayType))
+ {
+ err = DataModel::Decode(reader, dayType);
+ }
+ else if (__context_tag == to_underlying(Fields::kDayEntryIDs))
+ {
+ err = DataModel::Decode(reader, dayEntryIDs);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace DayStruct
+
+namespace TariffInformationStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kTariffLabel), tariffLabel);
+ encoder.Encode(to_underlying(Fields::kProviderName), providerName);
+ encoder.Encode(to_underlying(Fields::kCurrency), currency);
+ encoder.Encode(to_underlying(Fields::kBlockMode), blockMode);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kTariffLabel))
+ {
+ err = DataModel::Decode(reader, tariffLabel);
+ }
+ else if (__context_tag == to_underlying(Fields::kProviderName))
+ {
+ err = DataModel::Decode(reader, providerName);
+ }
+ else if (__context_tag == to_underlying(Fields::kCurrency))
+ {
+ err = DataModel::Decode(reader, currency);
+ }
+ else if (__context_tag == to_underlying(Fields::kBlockMode))
+ {
+ err = DataModel::Decode(reader, blockMode);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace TariffInformationStruct
+
+namespace TariffPeriodStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kLabel), label);
+ encoder.Encode(to_underlying(Fields::kDayEntryIDs), dayEntryIDs);
+ encoder.Encode(to_underlying(Fields::kTariffComponentIDs), tariffComponentIDs);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kLabel))
+ {
+ err = DataModel::Decode(reader, label);
+ }
+ else if (__context_tag == to_underlying(Fields::kDayEntryIDs))
+ {
+ err = DataModel::Decode(reader, dayEntryIDs);
+ }
+ else if (__context_tag == to_underlying(Fields::kTariffComponentIDs))
+ {
+ err = DataModel::Decode(reader, tariffComponentIDs);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace TariffPeriodStruct
+} // namespace Structs
+
+namespace Commands {
+namespace GetTariffComponent {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kTariffComponentID), tariffComponentID);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kTariffComponentID))
+ {
+ err = DataModel::Decode(reader, tariffComponentID);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetTariffComponent.
+namespace GetTariffComponentResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kLabel), label);
+ encoder.Encode(to_underlying(Fields::kDayEntryIDs), dayEntryIDs);
+ encoder.Encode(to_underlying(Fields::kTariffComponent), tariffComponent);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kLabel))
+ {
+ err = DataModel::Decode(reader, label);
+ }
+ else if (__context_tag == to_underlying(Fields::kDayEntryIDs))
+ {
+ err = DataModel::Decode(reader, dayEntryIDs);
+ }
+ else if (__context_tag == to_underlying(Fields::kTariffComponent))
+ {
+ err = DataModel::Decode(reader, tariffComponent);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetTariffComponentResponse.
+namespace GetDayEntry {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDayEntryID), dayEntryID);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDayEntryID))
+ {
+ err = DataModel::Decode(reader, dayEntryID);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetDayEntry.
+namespace GetDayEntryResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kDayEntry), dayEntry);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kDayEntry))
+ {
+ err = DataModel::Decode(reader, dayEntry);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+} // namespace GetDayEntryResponse.
+} // namespace Commands
+
+namespace Attributes {
+CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path)
+{
+ switch (path.mAttributeId)
+ {
+ case Attributes::TariffInfo::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, tariffInfo);
+ case Attributes::TariffUnit::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, tariffUnit);
+ case Attributes::StartDate::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, startDate);
+ case Attributes::DayEntries::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, dayEntries);
+ case Attributes::DayPatterns::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, dayPatterns);
+ case Attributes::CalendarPeriods::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, calendarPeriods);
+ case Attributes::IndividualDays::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, individualDays);
+ case Attributes::CurrentDay::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, currentDay);
+ case Attributes::NextDay::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, nextDay);
+ case Attributes::CurrentDayEntry::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, currentDayEntry);
+ case Attributes::CurrentDayEntryDate::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, currentDayEntryDate);
+ case Attributes::NextDayEntry::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, nextDayEntry);
+ case Attributes::NextDayEntryDate::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, nextDayEntryDate);
+ case Attributes::TariffComponents::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, tariffComponents);
+ case Attributes::TariffPeriods::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, tariffPeriods);
+ case Attributes::CurrentTariffComponents::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, currentTariffComponents);
+ case Attributes::NextTariffComponents::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, nextTariffComponents);
+ case Attributes::DefaultRandomizationOffset::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, defaultRandomizationOffset);
+ case Attributes::DefaultRandomizationType::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, defaultRandomizationType);
+ case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, generatedCommandList);
+ case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, acceptedCommandList);
+ case Attributes::AttributeList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, attributeList);
+ case Attributes::FeatureMap::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, featureMap);
+ case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, clusterRevision);
+ default:
+ return CHIP_NO_ERROR;
+ }
+}
+} // namespace Attributes
+
+namespace Events {} // namespace Events
+
+} // namespace CommodityTariff
namespace EcosystemInformation {
namespace Structs {
@@ -34229,6 +35415,121 @@
namespace Events {} // namespace Events
} // namespace TlsClientManagement
+namespace MeterIdentification {
+
+namespace Commands {} // namespace Commands
+
+namespace Attributes {
+CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path)
+{
+ switch (path.mAttributeId)
+ {
+ case Attributes::MeterType::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, meterType);
+ case Attributes::PointOfDelivery::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, pointOfDelivery);
+ case Attributes::MeterSerialNumber::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, meterSerialNumber);
+ case Attributes::ProtocolVersion::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, protocolVersion);
+ case Attributes::PowerThreshold::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, powerThreshold);
+ case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, generatedCommandList);
+ case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, acceptedCommandList);
+ case Attributes::AttributeList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, attributeList);
+ case Attributes::FeatureMap::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, featureMap);
+ case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, clusterRevision);
+ default:
+ return CHIP_NO_ERROR;
+ }
+}
+} // namespace Attributes
+
+namespace Events {} // namespace Events
+
+} // namespace MeterIdentification
+namespace CommodityMetering {
+namespace Structs {
+
+namespace MeteredQuantityStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kTariffComponentIDs), tariffComponentIDs);
+ encoder.Encode(to_underlying(Fields::kQuantity), quantity);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kTariffComponentIDs))
+ {
+ err = DataModel::Decode(reader, tariffComponentIDs);
+ }
+ else if (__context_tag == to_underlying(Fields::kQuantity))
+ {
+ err = DataModel::Decode(reader, quantity);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace MeteredQuantityStruct
+} // namespace Structs
+
+namespace Commands {} // namespace Commands
+
+namespace Attributes {
+CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path)
+{
+ switch (path.mAttributeId)
+ {
+ case Attributes::MeteredQuantity::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, meteredQuantity);
+ case Attributes::MeteredQuantityTimestamp::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, meteredQuantityTimestamp);
+ case Attributes::MeasurementType::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, measurementType);
+ case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, generatedCommandList);
+ case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, acceptedCommandList);
+ case Attributes::AttributeList::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, attributeList);
+ case Attributes::FeatureMap::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, featureMap);
+ case Attributes::ClusterRevision::TypeInfo::GetAttributeId():
+ return DataModel::Decode(reader, clusterRevision);
+ default:
+ return CHIP_NO_ERROR;
+ }
+}
+} // namespace Attributes
+
+namespace Events {} // namespace Events
+
+} // namespace CommodityMetering
namespace UnitTesting {
namespace Structs {
@@ -37494,6 +38795,13 @@
return false;
}
}
+ case Clusters::CommodityPrice::Id: {
+ switch (aCommand)
+ {
+ default:
+ return false;
+ }
+ }
case Clusters::DemandResponseLoadControl::Id: {
switch (aCommand)
{
@@ -37773,6 +39081,13 @@
return false;
}
}
+ case Clusters::CommodityTariff::Id: {
+ switch (aCommand)
+ {
+ default:
+ return false;
+ }
+ }
case Clusters::CommissionerControl::Id: {
switch (aCommand)
{
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 e38283f..86b9c38 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
@@ -404,6 +404,56 @@
// Global structs.
namespace Structs {
+namespace CurrencyStruct {
+enum class Fields : uint8_t
+{
+ kCurrency = 0,
+ kDecimalPoints = 1,
+};
+
+struct Type
+{
+public:
+ uint16_t currency = static_cast<uint16_t>(0);
+ uint8_t decimalPoints = static_cast<uint8_t>(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace CurrencyStruct
+
+namespace PowerThresholdStruct {
+enum class Fields : uint8_t
+{
+ kPowerThreshold = 0,
+ kApparentPowerThreshold = 1,
+ kPowerThresholdSource = 2,
+};
+
+struct Type
+{
+public:
+ Optional<int64_t> powerThreshold;
+ Optional<int64_t> apparentPowerThreshold;
+ DataModel::Nullable<Globals::PowerThresholdSourceEnum> powerThresholdSource;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace PowerThresholdStruct
+
namespace TestGlobalStruct {
enum class Fields : uint8_t
{
@@ -456,6 +506,30 @@
} // namespace LocationDescriptorStruct
+namespace PriceStruct {
+enum class Fields : uint8_t
+{
+ kAmount = 0,
+ kCurrency = 1,
+};
+
+struct Type
+{
+public:
+ int64_t amount = static_cast<int64_t>(0);
+ Globals::Structs::CurrencyStruct::Type currency;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace PriceStruct
+
namespace AtomicAttributeStatusStruct {
enum class Fields : uint8_t
{
@@ -21228,6 +21302,407 @@
} // namespace BoostEnded
} // namespace Events
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Structs {
+namespace CommodityPriceComponentStruct {
+enum class Fields : uint8_t
+{
+ kPrice = 0,
+ kSource = 1,
+ kDescription = 2,
+ kTariffComponentID = 3,
+};
+
+struct Type
+{
+public:
+ int64_t price = static_cast<int64_t>(0);
+ Globals::TariffPriceTypeEnum source = static_cast<Globals::TariffPriceTypeEnum>(0);
+ Optional<chip::CharSpan> description;
+ Optional<uint32_t> tariffComponentID;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace CommodityPriceComponentStruct
+namespace CommodityPriceStruct {
+enum class Fields : uint8_t
+{
+ kPeriodStart = 0,
+ kPeriodEnd = 1,
+ kPrice = 2,
+ kDescription = 3,
+ kComponents = 4,
+};
+
+struct Type
+{
+public:
+ uint32_t periodStart = static_cast<uint32_t>(0);
+ DataModel::Nullable<uint32_t> periodEnd;
+ Globals::Structs::PriceStruct::Type price;
+ Optional<chip::CharSpan> description;
+ Optional<DataModel::List<const Structs::CommodityPriceComponentStruct::Type>> components;
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ uint32_t periodStart = static_cast<uint32_t>(0);
+ DataModel::Nullable<uint32_t> periodEnd;
+ Globals::Structs::PriceStruct::DecodableType price;
+ Optional<chip::CharSpan> description;
+ Optional<DataModel::DecodableList<Structs::CommodityPriceComponentStruct::DecodableType>> components;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace CommodityPriceStruct
+} // namespace Structs
+
+namespace Commands {
+// Forward-declarations so we can reference these later.
+
+namespace GetDetailedPriceRequest {
+struct Type;
+struct DecodableType;
+} // namespace GetDetailedPriceRequest
+
+namespace GetDetailedPriceResponse {
+struct Type;
+struct DecodableType;
+} // namespace GetDetailedPriceResponse
+
+namespace GetDetailedForecastRequest {
+struct Type;
+struct DecodableType;
+} // namespace GetDetailedForecastRequest
+
+namespace GetDetailedForecastResponse {
+struct Type;
+struct DecodableType;
+} // namespace GetDetailedForecastResponse
+
+} // namespace Commands
+
+namespace Commands {
+namespace GetDetailedPriceRequest {
+enum class Fields : uint8_t
+{
+ kDetails = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedPriceRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ chip::BitMask<CommodityPriceDetailBitmap> details = static_cast<chip::BitMask<CommodityPriceDetailBitmap>>(0);
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedPriceRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ chip::BitMask<CommodityPriceDetailBitmap> details = static_cast<chip::BitMask<CommodityPriceDetailBitmap>>(0);
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetDetailedPriceRequest
+namespace GetDetailedPriceResponse {
+enum class Fields : uint8_t
+{
+ kCurrentPrice = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedPriceResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ DataModel::Nullable<Structs::CommodityPriceStruct::Type> currentPrice;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = DataModel::NullObjectType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedPriceResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ DataModel::Nullable<Structs::CommodityPriceStruct::DecodableType> currentPrice;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetDetailedPriceResponse
+namespace GetDetailedForecastRequest {
+enum class Fields : uint8_t
+{
+ kDetails = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedForecastRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ chip::BitMask<CommodityPriceDetailBitmap> details = static_cast<chip::BitMask<CommodityPriceDetailBitmap>>(0);
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedForecastRequest::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ chip::BitMask<CommodityPriceDetailBitmap> details = static_cast<chip::BitMask<CommodityPriceDetailBitmap>>(0);
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetDetailedForecastRequest
+namespace GetDetailedForecastResponse {
+enum class Fields : uint8_t
+{
+ kPriceForecast = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedForecastResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ DataModel::List<const Structs::CommodityPriceStruct::Type> priceForecast;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = DataModel::NullObjectType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetDetailedForecastResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ DataModel::DecodableList<Structs::CommodityPriceStruct::DecodableType> priceForecast;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetDetailedForecastResponse
+} // namespace Commands
+
+namespace Attributes {
+
+namespace TariffUnit {
+struct TypeInfo
+{
+ using Type = chip::app::Clusters::Globals::TariffUnitEnum;
+ using DecodableType = chip::app::Clusters::Globals::TariffUnitEnum;
+ using DecodableArgType = chip::app::Clusters::Globals::TariffUnitEnum;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::TariffUnit::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace TariffUnit
+namespace Currency {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::CurrencyStruct::Type>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::Currency::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace Currency
+namespace CurrentPrice {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type>;
+ using DecodableType =
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPrice::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace CurrentPrice
+namespace PriceForecast {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::List<const chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type>;
+ using DecodableType =
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType>;
+ using DecodableArgType = const chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::PriceForecast::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace PriceForecast
+namespace GeneratedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+};
+} // namespace GeneratedCommandList
+namespace AcceptedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+};
+} // namespace AcceptedCommandList
+namespace AttributeList {
+struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+};
+} // namespace AttributeList
+namespace FeatureMap {
+struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+};
+} // namespace FeatureMap
+namespace ClusterRevision {
+struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+};
+} // namespace ClusterRevision
+
+struct TypeInfo
+{
+ struct DecodableType
+ {
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
+
+ Attributes::TariffUnit::TypeInfo::DecodableType tariffUnit = static_cast<chip::app::Clusters::Globals::TariffUnitEnum>(0);
+ Attributes::Currency::TypeInfo::DecodableType currency;
+ Attributes::CurrentPrice::TypeInfo::DecodableType currentPrice;
+ Attributes::PriceForecast::TypeInfo::DecodableType priceForecast;
+ Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
+ Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
+ Attributes::AttributeList::TypeInfo::DecodableType attributeList;
+ Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast<uint32_t>(0);
+ Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast<uint16_t>(0);
+ };
+};
+} // namespace Attributes
+namespace Events {
+namespace PriceChange {
+static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info;
+
+enum class Fields : uint8_t
+{
+ kCurrentPrice = 0,
+};
+
+struct Type
+{
+public:
+ static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
+ static constexpr EventId GetEventId() { return Events::PriceChange::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+ static constexpr bool kIsFabricScoped = false;
+
+ Structs::CommodityPriceStruct::Type currentPrice;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
+ static constexpr EventId GetEventId() { return Events::PriceChange::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ Structs::CommodityPriceStruct::DecodableType currentPrice;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+} // namespace PriceChange
+namespace ForecastChange {
+static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info;
+
+enum class Fields : uint8_t
+{
+ kPriceForecast = 0,
+};
+
+struct Type
+{
+public:
+ static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
+ static constexpr EventId GetEventId() { return Events::ForecastChange::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+ static constexpr bool kIsFabricScoped = false;
+
+ DataModel::List<const Structs::CommodityPriceStruct::Type> priceForecast;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; }
+ static constexpr EventId GetEventId() { return Events::ForecastChange::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityPrice::Id; }
+
+ DataModel::DecodableList<Structs::CommodityPriceStruct::DecodableType> priceForecast;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+} // namespace ForecastChange
+} // namespace Events
+} // namespace CommodityPrice
namespace DemandResponseLoadControl {
namespace Structs {
namespace HeatingSourceControlStruct {
@@ -45441,6 +45916,795 @@
};
} // namespace Attributes
} // namespace Chime
+namespace CommodityTariff {
+namespace Structs {
+namespace PeakPeriodStruct {
+enum class Fields : uint8_t
+{
+ kSeverity = 0,
+ kPeakPeriod = 1,
+};
+
+struct Type
+{
+public:
+ PeakPeriodSeverityEnum severity = static_cast<PeakPeriodSeverityEnum>(0);
+ uint16_t peakPeriod = static_cast<uint16_t>(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace PeakPeriodStruct
+namespace AuxiliaryLoadSwitchSettingsStruct {
+enum class Fields : uint8_t
+{
+ kNumber = 0,
+ kRequiredState = 1,
+};
+
+struct Type
+{
+public:
+ uint8_t number = static_cast<uint8_t>(0);
+ AuxiliaryLoadSettingEnum requiredState = static_cast<AuxiliaryLoadSettingEnum>(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace AuxiliaryLoadSwitchSettingsStruct
+namespace TariffPriceStruct {
+enum class Fields : uint8_t
+{
+ kPriceType = 0,
+ kPrice = 1,
+ kPriceLevel = 2,
+};
+
+struct Type
+{
+public:
+ Globals::TariffPriceTypeEnum priceType = static_cast<Globals::TariffPriceTypeEnum>(0);
+ Optional<int64_t> price;
+ Optional<int16_t> priceLevel;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace TariffPriceStruct
+namespace TariffComponentStruct {
+enum class Fields : uint8_t
+{
+ kTariffComponentID = 0,
+ kPrice = 1,
+ kFriendlyCredit = 2,
+ kAuxiliaryLoad = 3,
+ kPeakPeriod = 4,
+ kPowerThreshold = 5,
+ kThreshold = 6,
+ kLabel = 7,
+ kPredicted = 8,
+};
+
+struct Type
+{
+public:
+ uint32_t tariffComponentID = static_cast<uint32_t>(0);
+ Optional<DataModel::Nullable<Structs::TariffPriceStruct::Type>> price;
+ Optional<bool> friendlyCredit;
+ Optional<Structs::AuxiliaryLoadSwitchSettingsStruct::Type> auxiliaryLoad;
+ Optional<Structs::PeakPeriodStruct::Type> peakPeriod;
+ Optional<Globals::Structs::PowerThresholdStruct::Type> powerThreshold;
+ DataModel::Nullable<uint32_t> threshold;
+ Optional<DataModel::Nullable<chip::CharSpan>> label;
+ Optional<bool> predicted;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace TariffComponentStruct
+namespace CalendarPeriodStruct {
+enum class Fields : uint8_t
+{
+ kStartDate = 0,
+ kDayPatternIDs = 1,
+};
+
+struct Type
+{
+public:
+ DataModel::Nullable<uint32_t> startDate;
+ DataModel::List<const uint32_t> dayPatternIDs;
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ DataModel::Nullable<uint32_t> startDate;
+ DataModel::DecodableList<uint32_t> dayPatternIDs;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace CalendarPeriodStruct
+namespace DayEntryStruct {
+enum class Fields : uint8_t
+{
+ kDayEntryID = 0,
+ kStartTime = 1,
+ kDuration = 2,
+ kRandomizationOffset = 3,
+ kRandomizationType = 4,
+};
+
+struct Type
+{
+public:
+ uint32_t dayEntryID = static_cast<uint32_t>(0);
+ uint16_t startTime = static_cast<uint16_t>(0);
+ Optional<uint16_t> duration;
+ Optional<int16_t> randomizationOffset;
+ Optional<DayEntryRandomizationTypeEnum> randomizationType;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace DayEntryStruct
+namespace DayPatternStruct {
+enum class Fields : uint8_t
+{
+ kDayPatternID = 0,
+ kDaysOfWeek = 1,
+ kDayEntryIDs = 2,
+};
+
+struct Type
+{
+public:
+ uint32_t dayPatternID = static_cast<uint32_t>(0);
+ chip::BitMask<DayPatternDayOfWeekBitmap> daysOfWeek = static_cast<chip::BitMask<DayPatternDayOfWeekBitmap>>(0);
+ DataModel::List<const uint32_t> dayEntryIDs;
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ uint32_t dayPatternID = static_cast<uint32_t>(0);
+ chip::BitMask<DayPatternDayOfWeekBitmap> daysOfWeek = static_cast<chip::BitMask<DayPatternDayOfWeekBitmap>>(0);
+ DataModel::DecodableList<uint32_t> dayEntryIDs;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace DayPatternStruct
+namespace DayStruct {
+enum class Fields : uint8_t
+{
+ kDate = 0,
+ kDayType = 1,
+ kDayEntryIDs = 2,
+};
+
+struct Type
+{
+public:
+ uint32_t date = static_cast<uint32_t>(0);
+ DayTypeEnum dayType = static_cast<DayTypeEnum>(0);
+ DataModel::List<const uint32_t> dayEntryIDs;
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ uint32_t date = static_cast<uint32_t>(0);
+ DayTypeEnum dayType = static_cast<DayTypeEnum>(0);
+ DataModel::DecodableList<uint32_t> dayEntryIDs;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace DayStruct
+namespace TariffInformationStruct {
+enum class Fields : uint8_t
+{
+ kTariffLabel = 0,
+ kProviderName = 1,
+ kCurrency = 2,
+ kBlockMode = 3,
+};
+
+struct Type
+{
+public:
+ DataModel::Nullable<chip::CharSpan> tariffLabel;
+ DataModel::Nullable<chip::CharSpan> providerName;
+ Optional<DataModel::Nullable<Globals::Structs::CurrencyStruct::Type>> currency;
+ DataModel::Nullable<BlockModeEnum> blockMode;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace TariffInformationStruct
+namespace TariffPeriodStruct {
+enum class Fields : uint8_t
+{
+ kLabel = 0,
+ kDayEntryIDs = 1,
+ kTariffComponentIDs = 2,
+};
+
+struct Type
+{
+public:
+ DataModel::Nullable<chip::CharSpan> label;
+ DataModel::List<const uint32_t> dayEntryIDs;
+ DataModel::List<const uint32_t> tariffComponentIDs;
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ DataModel::Nullable<chip::CharSpan> label;
+ DataModel::DecodableList<uint32_t> dayEntryIDs;
+ DataModel::DecodableList<uint32_t> tariffComponentIDs;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace TariffPeriodStruct
+} // namespace Structs
+
+namespace Commands {
+// Forward-declarations so we can reference these later.
+
+namespace GetTariffComponent {
+struct Type;
+struct DecodableType;
+} // namespace GetTariffComponent
+
+namespace GetTariffComponentResponse {
+struct Type;
+struct DecodableType;
+} // namespace GetTariffComponentResponse
+
+namespace GetDayEntry {
+struct Type;
+struct DecodableType;
+} // namespace GetDayEntry
+
+namespace GetDayEntryResponse {
+struct Type;
+struct DecodableType;
+} // namespace GetDayEntryResponse
+
+} // namespace Commands
+
+namespace Commands {
+namespace GetTariffComponent {
+enum class Fields : uint8_t
+{
+ kTariffComponentID = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetTariffComponent::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ uint32_t tariffComponentID = static_cast<uint32_t>(0);
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = Clusters::CommodityTariff::Commands::GetTariffComponentResponse::DecodableType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetTariffComponent::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ uint32_t tariffComponentID = static_cast<uint32_t>(0);
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetTariffComponent
+namespace GetTariffComponentResponse {
+enum class Fields : uint8_t
+{
+ kLabel = 0,
+ kDayEntryIDs = 1,
+ kTariffComponent = 2,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetTariffComponentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ DataModel::Nullable<chip::CharSpan> label;
+ DataModel::List<const uint32_t> dayEntryIDs;
+ Structs::TariffComponentStruct::Type tariffComponent;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = DataModel::NullObjectType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetTariffComponentResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ DataModel::Nullable<chip::CharSpan> label;
+ DataModel::DecodableList<uint32_t> dayEntryIDs;
+ Structs::TariffComponentStruct::DecodableType tariffComponent;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetTariffComponentResponse
+namespace GetDayEntry {
+enum class Fields : uint8_t
+{
+ kDayEntryID = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetDayEntry::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ uint32_t dayEntryID = static_cast<uint32_t>(0);
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = Clusters::CommodityTariff::Commands::GetDayEntryResponse::DecodableType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetDayEntry::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ uint32_t dayEntryID = static_cast<uint32_t>(0);
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetDayEntry
+namespace GetDayEntryResponse {
+enum class Fields : uint8_t
+{
+ kDayEntry = 0,
+};
+
+struct Type
+{
+public:
+ // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
+ static constexpr CommandId GetCommandId() { return Commands::GetDayEntryResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ Structs::DayEntryStruct::Type dayEntry;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+
+ using ResponseType = DataModel::NullObjectType;
+
+ static constexpr bool MustUseTimedInvoke() { return false; }
+};
+
+struct DecodableType
+{
+public:
+ static constexpr CommandId GetCommandId() { return Commands::GetDayEntryResponse::Id; }
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ Structs::DayEntryStruct::DecodableType dayEntry;
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+};
+}; // namespace GetDayEntryResponse
+} // namespace Commands
+
+namespace Attributes {
+
+namespace TariffInfo {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::Type>;
+ using DecodableType =
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::DecodableType>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::TariffInfo::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace TariffInfo
+namespace TariffUnit {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::TariffUnit::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace TariffUnit
+namespace StartDate {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableType = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<uint32_t> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::StartDate::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace StartDate
+namespace DayEntries {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::DayEntries::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace DayEntries
+namespace DayPatterns {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::DayPatterns::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace DayPatterns
+namespace CalendarPeriods {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::CalendarPeriods::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace CalendarPeriods
+namespace IndividualDays {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::IndividualDays::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace IndividualDays
+namespace CurrentDay {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::CurrentDay::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace CurrentDay
+namespace NextDay {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::NextDay::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace NextDay
+namespace CurrentDayEntry {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type>;
+ using DecodableType =
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::CurrentDayEntry::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace CurrentDayEntry
+namespace CurrentDayEntryDate {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableType = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<uint32_t> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::CurrentDayEntryDate::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace CurrentDayEntryDate
+namespace NextDayEntry {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type>;
+ using DecodableType =
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::NextDayEntry::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace NextDayEntry
+namespace NextDayEntryDate {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableType = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<uint32_t> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::NextDayEntryDate::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace NextDayEntryDate
+namespace TariffComponents {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::TariffComponents::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace TariffComponents
+namespace TariffPeriods {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::TariffPeriods::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace TariffPeriods
+namespace CurrentTariffComponents {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::CurrentTariffComponents::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace CurrentTariffComponents
+namespace NextTariffComponents {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::NextTariffComponents::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace NextTariffComponents
+namespace DefaultRandomizationOffset {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<int16_t>;
+ using DecodableType = chip::app::DataModel::Nullable<int16_t>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<int16_t> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::DefaultRandomizationOffset::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace DefaultRandomizationOffset
+namespace DefaultRandomizationType {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::DefaultRandomizationType::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace DefaultRandomizationType
+namespace GeneratedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+};
+} // namespace GeneratedCommandList
+namespace AcceptedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+};
+} // namespace AcceptedCommandList
+namespace AttributeList {
+struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+};
+} // namespace AttributeList
+namespace FeatureMap {
+struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+};
+} // namespace FeatureMap
+namespace ClusterRevision {
+struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+};
+} // namespace ClusterRevision
+
+struct TypeInfo
+{
+ struct DecodableType
+ {
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityTariff::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
+
+ Attributes::TariffInfo::TypeInfo::DecodableType tariffInfo;
+ Attributes::TariffUnit::TypeInfo::DecodableType tariffUnit;
+ Attributes::StartDate::TypeInfo::DecodableType startDate;
+ Attributes::DayEntries::TypeInfo::DecodableType dayEntries;
+ Attributes::DayPatterns::TypeInfo::DecodableType dayPatterns;
+ Attributes::CalendarPeriods::TypeInfo::DecodableType calendarPeriods;
+ Attributes::IndividualDays::TypeInfo::DecodableType individualDays;
+ Attributes::CurrentDay::TypeInfo::DecodableType currentDay;
+ Attributes::NextDay::TypeInfo::DecodableType nextDay;
+ Attributes::CurrentDayEntry::TypeInfo::DecodableType currentDayEntry;
+ Attributes::CurrentDayEntryDate::TypeInfo::DecodableType currentDayEntryDate;
+ Attributes::NextDayEntry::TypeInfo::DecodableType nextDayEntry;
+ Attributes::NextDayEntryDate::TypeInfo::DecodableType nextDayEntryDate;
+ Attributes::TariffComponents::TypeInfo::DecodableType tariffComponents;
+ Attributes::TariffPeriods::TypeInfo::DecodableType tariffPeriods;
+ Attributes::CurrentTariffComponents::TypeInfo::DecodableType currentTariffComponents;
+ Attributes::NextTariffComponents::TypeInfo::DecodableType nextTariffComponents;
+ Attributes::DefaultRandomizationOffset::TypeInfo::DecodableType defaultRandomizationOffset;
+ Attributes::DefaultRandomizationType::TypeInfo::DecodableType defaultRandomizationType;
+ Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
+ Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
+ Attributes::AttributeList::TypeInfo::DecodableType attributeList;
+ Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast<uint32_t>(0);
+ Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast<uint16_t>(0);
+ };
+};
+} // namespace Attributes
+} // namespace CommodityTariff
namespace EcosystemInformation {
namespace Structs {
namespace DeviceTypeStruct = Clusters::detail::Structs::DeviceTypeStruct;
@@ -46937,6 +48201,254 @@
};
} // namespace Attributes
} // namespace TlsClientManagement
+namespace MeterIdentification {
+
+namespace Attributes {
+
+namespace MeterType {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::MeterType::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace MeterType
+namespace PointOfDelivery {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::CharSpan>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::CharSpan>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::CharSpan> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::PointOfDelivery::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+ static constexpr size_t MaxLength() { return 64; }
+};
+} // namespace PointOfDelivery
+namespace MeterSerialNumber {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::CharSpan>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::CharSpan>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::CharSpan> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::MeterSerialNumber::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+ static constexpr size_t MaxLength() { return 64; }
+};
+} // namespace MeterSerialNumber
+namespace ProtocolVersion {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::CharSpan>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::CharSpan>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::CharSpan> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::ProtocolVersion::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+ static constexpr size_t MaxLength() { return 64; }
+};
+} // namespace ProtocolVersion
+namespace PowerThreshold {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::PowerThresholdStruct::Type>;
+ using DecodableType =
+ chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::PowerThresholdStruct::DecodableType>;
+ using DecodableArgType =
+ const chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::PowerThresholdStruct::DecodableType> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::PowerThreshold::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace PowerThreshold
+namespace GeneratedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+};
+} // namespace GeneratedCommandList
+namespace AcceptedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+};
+} // namespace AcceptedCommandList
+namespace AttributeList {
+struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+};
+} // namespace AttributeList
+namespace FeatureMap {
+struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+};
+} // namespace FeatureMap
+namespace ClusterRevision {
+struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+};
+} // namespace ClusterRevision
+
+struct TypeInfo
+{
+ struct DecodableType
+ {
+ static constexpr ClusterId GetClusterId() { return Clusters::MeterIdentification::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
+
+ Attributes::MeterType::TypeInfo::DecodableType meterType;
+ Attributes::PointOfDelivery::TypeInfo::DecodableType pointOfDelivery;
+ Attributes::MeterSerialNumber::TypeInfo::DecodableType meterSerialNumber;
+ Attributes::ProtocolVersion::TypeInfo::DecodableType protocolVersion;
+ Attributes::PowerThreshold::TypeInfo::DecodableType powerThreshold;
+ Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
+ Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
+ Attributes::AttributeList::TypeInfo::DecodableType attributeList;
+ Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast<uint32_t>(0);
+ Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast<uint16_t>(0);
+ };
+};
+} // namespace Attributes
+} // namespace MeterIdentification
+namespace CommodityMetering {
+namespace Structs {
+namespace MeteredQuantityStruct {
+enum class Fields : uint8_t
+{
+ kTariffComponentIDs = 0,
+ kQuantity = 1,
+};
+
+struct Type
+{
+public:
+ DataModel::List<const uint32_t> tariffComponentIDs;
+ int64_t quantity = static_cast<int64_t>(0);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ DataModel::DecodableList<uint32_t> tariffComponentIDs;
+ int64_t quantity = static_cast<int64_t>(0);
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace MeteredQuantityStruct
+} // namespace Structs
+
+namespace Attributes {
+
+namespace MeteredQuantity {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::Type>>;
+ using DecodableType = chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::DecodableType>>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::DecodableType>> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::MeteredQuantity::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace MeteredQuantity
+namespace MeteredQuantityTimestamp {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableType = chip::app::DataModel::Nullable<uint32_t>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<uint32_t> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::MeteredQuantityTimestamp::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace MeteredQuantityTimestamp
+namespace MeasurementType {
+struct TypeInfo
+{
+ using Type = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ using DecodableType = chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>;
+ using DecodableArgType = const chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> &;
+
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+ static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementType::Id; }
+ static constexpr bool MustUseTimedWrite() { return false; }
+};
+} // namespace MeasurementType
+namespace GeneratedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+};
+} // namespace GeneratedCommandList
+namespace AcceptedCommandList {
+struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+};
+} // namespace AcceptedCommandList
+namespace AttributeList {
+struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+};
+} // namespace AttributeList
+namespace FeatureMap {
+struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+};
+} // namespace FeatureMap
+namespace ClusterRevision {
+struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo
+{
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+};
+} // namespace ClusterRevision
+
+struct TypeInfo
+{
+ struct DecodableType
+ {
+ static constexpr ClusterId GetClusterId() { return Clusters::CommodityMetering::Id; }
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path);
+
+ Attributes::MeteredQuantity::TypeInfo::DecodableType meteredQuantity;
+ Attributes::MeteredQuantityTimestamp::TypeInfo::DecodableType meteredQuantityTimestamp;
+ Attributes::MeasurementType::TypeInfo::DecodableType measurementType;
+ Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList;
+ Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList;
+ Attributes::AttributeList::TypeInfo::DecodableType attributeList;
+ Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast<uint32_t>(0);
+ Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast<uint16_t>(0);
+ };
+};
+} // namespace Attributes
+} // namespace CommodityMetering
namespace UnitTesting {
namespace Structs {
namespace SimpleStruct {
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 5dcc4a8..e5a677a 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
@@ -3515,6 +3515,48 @@
} // namespace Attributes
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Attributes {
+
+namespace TariffUnit {
+static constexpr AttributeId Id = 0x00000000;
+} // namespace TariffUnit
+
+namespace Currency {
+static constexpr AttributeId Id = 0x00000001;
+} // namespace Currency
+
+namespace CurrentPrice {
+static constexpr AttributeId Id = 0x00000002;
+} // namespace CurrentPrice
+
+namespace PriceForecast {
+static constexpr AttributeId Id = 0x00000003;
+} // namespace PriceForecast
+
+namespace GeneratedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id;
+} // namespace GeneratedCommandList
+
+namespace AcceptedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id;
+} // namespace AcceptedCommandList
+
+namespace AttributeList {
+static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id;
+} // namespace AttributeList
+
+namespace FeatureMap {
+static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id;
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id;
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityPrice
+
namespace DemandResponseLoadControl {
namespace Attributes {
@@ -7383,6 +7425,108 @@
} // namespace Attributes
} // namespace Chime
+namespace CommodityTariff {
+namespace Attributes {
+
+namespace TariffInfo {
+static constexpr AttributeId Id = 0x00000000;
+} // namespace TariffInfo
+
+namespace TariffUnit {
+static constexpr AttributeId Id = 0x00000001;
+} // namespace TariffUnit
+
+namespace StartDate {
+static constexpr AttributeId Id = 0x00000002;
+} // namespace StartDate
+
+namespace DayEntries {
+static constexpr AttributeId Id = 0x00000003;
+} // namespace DayEntries
+
+namespace DayPatterns {
+static constexpr AttributeId Id = 0x00000004;
+} // namespace DayPatterns
+
+namespace CalendarPeriods {
+static constexpr AttributeId Id = 0x00000005;
+} // namespace CalendarPeriods
+
+namespace IndividualDays {
+static constexpr AttributeId Id = 0x00000006;
+} // namespace IndividualDays
+
+namespace CurrentDay {
+static constexpr AttributeId Id = 0x00000007;
+} // namespace CurrentDay
+
+namespace NextDay {
+static constexpr AttributeId Id = 0x00000008;
+} // namespace NextDay
+
+namespace CurrentDayEntry {
+static constexpr AttributeId Id = 0x00000009;
+} // namespace CurrentDayEntry
+
+namespace CurrentDayEntryDate {
+static constexpr AttributeId Id = 0x0000000A;
+} // namespace CurrentDayEntryDate
+
+namespace NextDayEntry {
+static constexpr AttributeId Id = 0x0000000B;
+} // namespace NextDayEntry
+
+namespace NextDayEntryDate {
+static constexpr AttributeId Id = 0x0000000C;
+} // namespace NextDayEntryDate
+
+namespace TariffComponents {
+static constexpr AttributeId Id = 0x0000000D;
+} // namespace TariffComponents
+
+namespace TariffPeriods {
+static constexpr AttributeId Id = 0x0000000E;
+} // namespace TariffPeriods
+
+namespace CurrentTariffComponents {
+static constexpr AttributeId Id = 0x0000000F;
+} // namespace CurrentTariffComponents
+
+namespace NextTariffComponents {
+static constexpr AttributeId Id = 0x00000010;
+} // namespace NextTariffComponents
+
+namespace DefaultRandomizationOffset {
+static constexpr AttributeId Id = 0x00000011;
+} // namespace DefaultRandomizationOffset
+
+namespace DefaultRandomizationType {
+static constexpr AttributeId Id = 0x00000012;
+} // namespace DefaultRandomizationType
+
+namespace GeneratedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id;
+} // namespace GeneratedCommandList
+
+namespace AcceptedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id;
+} // namespace AcceptedCommandList
+
+namespace AttributeList {
+static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id;
+} // namespace AttributeList
+
+namespace FeatureMap {
+static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id;
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id;
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityTariff
+
namespace EcosystemInformation {
namespace Attributes {
@@ -7523,6 +7667,90 @@
} // namespace Attributes
} // namespace TlsClientManagement
+namespace MeterIdentification {
+namespace Attributes {
+
+namespace MeterType {
+static constexpr AttributeId Id = 0x00000000;
+} // namespace MeterType
+
+namespace PointOfDelivery {
+static constexpr AttributeId Id = 0x00000001;
+} // namespace PointOfDelivery
+
+namespace MeterSerialNumber {
+static constexpr AttributeId Id = 0x00000002;
+} // namespace MeterSerialNumber
+
+namespace ProtocolVersion {
+static constexpr AttributeId Id = 0x00000003;
+} // namespace ProtocolVersion
+
+namespace PowerThreshold {
+static constexpr AttributeId Id = 0x00000004;
+} // namespace PowerThreshold
+
+namespace GeneratedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id;
+} // namespace GeneratedCommandList
+
+namespace AcceptedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id;
+} // namespace AcceptedCommandList
+
+namespace AttributeList {
+static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id;
+} // namespace AttributeList
+
+namespace FeatureMap {
+static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id;
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id;
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace MeterIdentification
+
+namespace CommodityMetering {
+namespace Attributes {
+
+namespace MeteredQuantity {
+static constexpr AttributeId Id = 0x00000000;
+} // namespace MeteredQuantity
+
+namespace MeteredQuantityTimestamp {
+static constexpr AttributeId Id = 0x00000001;
+} // namespace MeteredQuantityTimestamp
+
+namespace MeasurementType {
+static constexpr AttributeId Id = 0x00000002;
+} // namespace MeasurementType
+
+namespace GeneratedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id;
+} // namespace GeneratedCommandList
+
+namespace AcceptedCommandList {
+static constexpr AttributeId Id = Globals::Attributes::AcceptedCommandList::Id;
+} // namespace AcceptedCommandList
+
+namespace AttributeList {
+static constexpr AttributeId Id = Globals::Attributes::AttributeList::Id;
+} // namespace AttributeList
+
+namespace FeatureMap {
+static constexpr AttributeId Id = Globals::Attributes::FeatureMap::Id;
+} // namespace FeatureMap
+
+namespace ClusterRevision {
+static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id;
+} // namespace ClusterRevision
+
+} // namespace Attributes
+} // namespace CommodityMetering
+
namespace UnitTesting {
namespace Attributes {
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
index 178883b..6055123 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Clusters.h
@@ -223,6 +223,9 @@
namespace WaterHeaterManagement {
static constexpr ClusterId Id = 0x00000094;
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+static constexpr ClusterId Id = 0x00000095;
+} // namespace CommodityPrice
namespace DemandResponseLoadControl {
static constexpr ClusterId Id = 0x00000096;
} // namespace DemandResponseLoadControl
@@ -403,6 +406,9 @@
namespace Chime {
static constexpr ClusterId Id = 0x00000556;
} // namespace Chime
+namespace CommodityTariff {
+static constexpr ClusterId Id = 0x00000700;
+} // namespace CommodityTariff
namespace EcosystemInformation {
static constexpr ClusterId Id = 0x00000750;
} // namespace EcosystemInformation
@@ -415,6 +421,12 @@
namespace TlsClientManagement {
static constexpr ClusterId Id = 0x00000802;
} // namespace TlsClientManagement
+namespace MeterIdentification {
+static constexpr ClusterId Id = 0x00000B06;
+} // namespace MeterIdentification
+namespace CommodityMetering {
+static constexpr ClusterId Id = 0x00000B07;
+} // namespace CommodityMetering
namespace UnitTesting {
static constexpr ClusterId Id = 0xFFF1FC05;
} // namespace UnitTesting
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
index 03b1ddd..6ca29aa 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h
@@ -987,6 +987,28 @@
} // namespace Commands
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Commands {
+
+namespace GetDetailedPriceRequest {
+static constexpr CommandId Id = 0x00000000;
+} // namespace GetDetailedPriceRequest
+
+namespace GetDetailedPriceResponse {
+static constexpr CommandId Id = 0x00000001;
+} // namespace GetDetailedPriceResponse
+
+namespace GetDetailedForecastRequest {
+static constexpr CommandId Id = 0x00000002;
+} // namespace GetDetailedForecastRequest
+
+namespace GetDetailedForecastResponse {
+static constexpr CommandId Id = 0x00000003;
+} // namespace GetDetailedForecastResponse
+
+} // namespace Commands
+} // namespace CommodityPrice
+
namespace DemandResponseLoadControl {
namespace Commands {
@@ -2085,6 +2107,28 @@
} // namespace Commands
} // namespace Chime
+namespace CommodityTariff {
+namespace Commands {
+
+namespace GetTariffComponent {
+static constexpr CommandId Id = 0x00000000;
+} // namespace GetTariffComponent
+
+namespace GetTariffComponentResponse {
+static constexpr CommandId Id = 0x00000000;
+} // namespace GetTariffComponentResponse
+
+namespace GetDayEntry {
+static constexpr CommandId Id = 0x00000001;
+} // namespace GetDayEntry
+
+namespace GetDayEntryResponse {
+static constexpr CommandId Id = 0x00000001;
+} // namespace GetDayEntryResponse
+
+} // namespace Commands
+} // namespace CommodityTariff
+
namespace CommissionerControl {
namespace Commands {
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
index 8cc6d0e..8e71b5e 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Events.h
@@ -453,6 +453,20 @@
} // namespace Events
} // namespace WaterHeaterManagement
+namespace CommodityPrice {
+namespace Events {
+
+namespace PriceChange {
+static constexpr EventId Id = 0x00000000;
+} // namespace PriceChange
+
+namespace ForecastChange {
+static constexpr EventId Id = 0x00000001;
+} // namespace ForecastChange
+
+} // namespace Events
+} // namespace CommodityPrice
+
namespace DemandResponseLoadControl {
namespace Events {
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index f5fd0a1..9244f10 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -101,6 +101,7 @@
| ElectricalPowerMeasurement | 0x0090 |
| ElectricalEnergyMeasurement | 0x0091 |
| WaterHeaterManagement | 0x0094 |
+| CommodityPrice | 0x0095 |
| DemandResponseLoadControl | 0x0096 |
| Messages | 0x0097 |
| DeviceEnergyManagement | 0x0098 |
@@ -161,10 +162,13 @@
| WebRTCTransportRequestor | 0x0554 |
| PushAvStreamTransport | 0x0555 |
| Chime | 0x0556 |
+| CommodityTariff | 0x0700 |
| EcosystemInformation | 0x0750 |
| CommissionerControl | 0x0751 |
| TlsCertificateManagement | 0x0801 |
| TlsClientManagement | 0x0802 |
+| MeterIdentification | 0x0B06 |
+| CommodityMetering | 0x0B07 |
| UnitTesting | 0xFFF1FC05|
| FaultInjection | 0xFFF1FC06|
| SampleMei | 0xFFF1FC20|
@@ -6794,6 +6798,105 @@
};
/*----------------------------------------------------------------------------*\
+| Cluster CommodityPrice | 0x0095 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+| * GetDetailedPriceRequest | 0x00 |
+| * GetDetailedForecastRequest | 0x02 |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * TariffUnit | 0x0000 |
+| * Currency | 0x0001 |
+| * CurrentPrice | 0x0002 |
+| * PriceForecast | 0x0003 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+| * PriceChange | 0x0000 |
+| * ForecastChange | 0x0001 |
+\*----------------------------------------------------------------------------*/
+
+/*
+ * Command GetDetailedPriceRequest
+ */
+class CommodityPriceGetDetailedPriceRequest : public ClusterCommand
+{
+public:
+ CommodityPriceGetDetailedPriceRequest(CredentialIssuerCommands * credsIssuerConfig) :
+ ClusterCommand("get-detailed-price-request", credsIssuerConfig)
+ {
+ AddArgument("Details", 0, UINT16_MAX, &mRequest.details);
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector<chip::EndpointId> endpointIds) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId,
+ commandId, endpointIds.at(0));
+ return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest);
+ }
+
+ CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId,
+ groupId);
+
+ return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest);
+ }
+
+private:
+ chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Type mRequest;
+};
+
+/*
+ * Command GetDetailedForecastRequest
+ */
+class CommodityPriceGetDetailedForecastRequest : public ClusterCommand
+{
+public:
+ CommodityPriceGetDetailedForecastRequest(CredentialIssuerCommands * credsIssuerConfig) :
+ ClusterCommand("get-detailed-forecast-request", credsIssuerConfig)
+ {
+ AddArgument("Details", 0, UINT16_MAX, &mRequest.details);
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector<chip::EndpointId> endpointIds) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId,
+ commandId, endpointIds.at(0));
+ return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest);
+ }
+
+ CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId,
+ groupId);
+
+ return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest);
+ }
+
+private:
+ chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Type mRequest;
+};
+
+/*----------------------------------------------------------------------------*\
| Cluster DemandResponseLoadControl | 0x0096 |
|------------------------------------------------------------------------------|
| Commands: | |
@@ -15666,6 +15769,117 @@
};
/*----------------------------------------------------------------------------*\
+| Cluster CommodityTariff | 0x0700 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+| * GetTariffComponent | 0x00 |
+| * GetDayEntry | 0x01 |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * TariffInfo | 0x0000 |
+| * TariffUnit | 0x0001 |
+| * StartDate | 0x0002 |
+| * DayEntries | 0x0003 |
+| * DayPatterns | 0x0004 |
+| * CalendarPeriods | 0x0005 |
+| * IndividualDays | 0x0006 |
+| * CurrentDay | 0x0007 |
+| * NextDay | 0x0008 |
+| * CurrentDayEntry | 0x0009 |
+| * CurrentDayEntryDate | 0x000A |
+| * NextDayEntry | 0x000B |
+| * NextDayEntryDate | 0x000C |
+| * TariffComponents | 0x000D |
+| * TariffPeriods | 0x000E |
+| * CurrentTariffComponents | 0x000F |
+| * NextTariffComponents | 0x0010 |
+| * DefaultRandomizationOffset | 0x0011 |
+| * DefaultRandomizationType | 0x0012 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+/*
+ * Command GetTariffComponent
+ */
+class CommodityTariffGetTariffComponent : public ClusterCommand
+{
+public:
+ CommodityTariffGetTariffComponent(CredentialIssuerCommands * credsIssuerConfig) :
+ ClusterCommand("get-tariff-component", credsIssuerConfig)
+ {
+ AddArgument("TariffComponentID", 0, UINT32_MAX, &mRequest.tariffComponentID);
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector<chip::EndpointId> endpointIds) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId,
+ commandId, endpointIds.at(0));
+ return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest);
+ }
+
+ CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId,
+ groupId);
+
+ return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest);
+ }
+
+private:
+ chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Type mRequest;
+};
+
+/*
+ * Command GetDayEntry
+ */
+class CommodityTariffGetDayEntry : public ClusterCommand
+{
+public:
+ CommodityTariffGetDayEntry(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-day-entry", credsIssuerConfig)
+ {
+ AddArgument("DayEntryID", 0, UINT32_MAX, &mRequest.dayEntryID);
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector<chip::EndpointId> endpointIds) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId,
+ commandId, endpointIds.at(0));
+ return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest);
+ }
+
+ CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId,
+ groupId);
+
+ return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest);
+ }
+
+private:
+ chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Type mRequest;
+};
+
+/*----------------------------------------------------------------------------*\
| Cluster EcosystemInformation | 0x0750 |
|------------------------------------------------------------------------------|
| Commands: | |
@@ -16297,6 +16511,44 @@
};
/*----------------------------------------------------------------------------*\
+| Cluster MeterIdentification | 0x0B06 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * MeterType | 0x0000 |
+| * PointOfDelivery | 0x0001 |
+| * MeterSerialNumber | 0x0002 |
+| * ProtocolVersion | 0x0003 |
+| * PowerThreshold | 0x0004 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*\
+| Cluster CommodityMetering | 0x0B07 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * MeteredQuantity | 0x0000 |
+| * MeteredQuantityTimestamp | 0x0001 |
+| * MeasurementType | 0x0002 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+/*----------------------------------------------------------------------------*\
| Cluster UnitTesting | 0xFFF1FC05 |
|------------------------------------------------------------------------------|
| Commands: | |
@@ -23087,6 +23339,78 @@
commands.RegisterCluster(clusterName, clusterCommands);
}
+void registerClusterCommodityPrice(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
+{
+ using namespace chip::app::Clusters::CommodityPrice;
+
+ const char * clusterName = "CommodityPrice";
+
+ commands_list clusterCommands = {
+ //
+ // Commands
+ //
+ make_unique<ClusterCommand>(Id, credsIssuerConfig), //
+ make_unique<CommodityPriceGetDetailedPriceRequest>(credsIssuerConfig), //
+ make_unique<CommodityPriceGetDetailedForecastRequest>(credsIssuerConfig), //
+ //
+ // Attributes
+ //
+ make_unique<ReadAttribute>(Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "tariff-unit", Attributes::TariffUnit::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "currency", Attributes::Currency::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "current-price", Attributes::CurrentPrice::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "price-forecast", Attributes::PriceForecast::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ make_unique<WriteAttribute<>>(Id, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::Clusters::Globals::TariffUnitEnum>>(
+ Id, "tariff-unit", 0, UINT8_MAX, Attributes::TariffUnit::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<
+ WriteAttributeAsComplex<chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::CurrencyStruct::Type>>>(
+ Id, "currency", Attributes::Currency::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type>>>(
+ Id, "current-price", Attributes::CurrentPrice::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type>>>(
+ Id, "price-forecast", Attributes::PriceForecast::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::AttributeId>>>(
+ Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint32_t>>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint16_t>>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "tariff-unit", Attributes::TariffUnit::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "currency", Attributes::Currency::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "current-price", Attributes::CurrentPrice::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "price-forecast", Attributes::PriceForecast::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ //
+ // Events
+ //
+ make_unique<ReadEvent>(Id, credsIssuerConfig), //
+ make_unique<ReadEvent>(Id, "price-change", Events::PriceChange::Id, credsIssuerConfig), //
+ make_unique<ReadEvent>(Id, "forecast-change", Events::ForecastChange::Id, credsIssuerConfig), //
+ make_unique<SubscribeEvent>(Id, credsIssuerConfig), //
+ make_unique<SubscribeEvent>(Id, "price-change", Events::PriceChange::Id, credsIssuerConfig), //
+ make_unique<SubscribeEvent>(Id, "forecast-change", Events::ForecastChange::Id, credsIssuerConfig), //
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+}
void registerClusterDemandResponseLoadControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
{
using namespace chip::app::Clusters::DemandResponseLoadControl;
@@ -29078,6 +29402,156 @@
commands.RegisterCluster(clusterName, clusterCommands);
}
+void registerClusterCommodityTariff(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
+{
+ using namespace chip::app::Clusters::CommodityTariff;
+
+ const char * clusterName = "CommodityTariff";
+
+ commands_list clusterCommands = {
+ //
+ // Commands
+ //
+ make_unique<ClusterCommand>(Id, credsIssuerConfig), //
+ make_unique<CommodityTariffGetTariffComponent>(credsIssuerConfig), //
+ make_unique<CommodityTariffGetDayEntry>(credsIssuerConfig), //
+ //
+ // Attributes
+ //
+ make_unique<ReadAttribute>(Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "tariff-info", Attributes::TariffInfo::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "tariff-unit", Attributes::TariffUnit::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "start-date", Attributes::StartDate::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "day-entries", Attributes::DayEntries::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "day-patterns", Attributes::DayPatterns::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "calendar-periods", Attributes::CalendarPeriods::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "individual-days", Attributes::IndividualDays::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "current-day", Attributes::CurrentDay::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "next-day", Attributes::NextDay::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "current-day-entry", Attributes::CurrentDayEntry::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "current-day-entry-date", Attributes::CurrentDayEntryDate::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "next-day-entry", Attributes::NextDayEntry::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "next-day-entry-date", Attributes::NextDayEntryDate::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "tariff-components", Attributes::TariffComponents::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "tariff-periods", Attributes::TariffPeriods::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "current-tariff-components", Attributes::CurrentTariffComponents::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "next-tariff-components", Attributes::NextTariffComponents::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "default-randomization-offset", Attributes::DefaultRandomizationOffset::Id,
+ credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "default-randomization-type", Attributes::DefaultRandomizationType::Id,
+ credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ make_unique<WriteAttribute<>>(Id, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::Type>>>(
+ Id, "tariff-info", Attributes::TariffInfo::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum>>>(
+ Id, "tariff-unit", 0, UINT8_MAX, Attributes::TariffUnit::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint32_t>>>(
+ Id, "start-date", 0, UINT32_MAX, Attributes::StartDate::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type>>>>(
+ Id, "day-entries", Attributes::DayEntries::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::Type>>>>(
+ Id, "day-patterns", Attributes::DayPatterns::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::Type>>>>(
+ Id, "calendar-periods", Attributes::CalendarPeriods::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type>>>>(
+ Id, "individual-days", Attributes::IndividualDays::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type>>>(
+ Id, "current-day", Attributes::CurrentDay::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type>>>(
+ Id, "next-day", Attributes::NextDay::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type>>>(
+ Id, "current-day-entry", Attributes::CurrentDayEntry::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint32_t>>>(Id, "current-day-entry-date", 0, UINT32_MAX,
+ Attributes::CurrentDayEntryDate::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type>>>(
+ Id, "next-day-entry", Attributes::NextDayEntry::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint32_t>>>(Id, "next-day-entry-date", 0, UINT32_MAX,
+ Attributes::NextDayEntryDate::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type>>>>(
+ Id, "tariff-components", Attributes::TariffComponents::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::Type>>>>(
+ Id, "tariff-periods", Attributes::TariffPeriods::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type>>>>(
+ Id, "current-tariff-components", Attributes::CurrentTariffComponents::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type>>>>(
+ Id, "next-tariff-components", Attributes::NextTariffComponents::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<int16_t>>>(Id, "default-randomization-offset", INT16_MIN,
+ INT16_MAX, Attributes::DefaultRandomizationOffset::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<
+ WriteAttribute<chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum>>>(
+ Id, "default-randomization-type", 0, UINT8_MAX, Attributes::DefaultRandomizationType::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::AttributeId>>>(
+ Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint32_t>>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint16_t>>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "tariff-info", Attributes::TariffInfo::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "tariff-unit", Attributes::TariffUnit::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "start-date", Attributes::StartDate::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "day-entries", Attributes::DayEntries::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "day-patterns", Attributes::DayPatterns::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "calendar-periods", Attributes::CalendarPeriods::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "individual-days", Attributes::IndividualDays::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "current-day", Attributes::CurrentDay::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "next-day", Attributes::NextDay::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "current-day-entry", Attributes::CurrentDayEntry::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "current-day-entry-date", Attributes::CurrentDayEntryDate::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "next-day-entry", Attributes::NextDayEntry::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "next-day-entry-date", Attributes::NextDayEntryDate::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "tariff-components", Attributes::TariffComponents::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "tariff-periods", Attributes::TariffPeriods::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "current-tariff-components", Attributes::CurrentTariffComponents::Id,
+ credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "next-tariff-components", Attributes::NextTariffComponents::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "default-randomization-offset", Attributes::DefaultRandomizationOffset::Id,
+ credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "default-randomization-type", Attributes::DefaultRandomizationType::Id,
+ credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ //
+ // Events
+ //
+ make_unique<ReadEvent>(Id, credsIssuerConfig), //
+ make_unique<SubscribeEvent>(Id, credsIssuerConfig), //
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+}
void registerClusterEcosystemInformation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
{
using namespace chip::app::Clusters::EcosystemInformation;
@@ -29333,6 +29807,138 @@
commands.RegisterCluster(clusterName, clusterCommands);
}
+void registerClusterMeterIdentification(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
+{
+ using namespace chip::app::Clusters::MeterIdentification;
+
+ const char * clusterName = "MeterIdentification";
+
+ commands_list clusterCommands = {
+ //
+ // Commands
+ //
+ make_unique<ClusterCommand>(Id, credsIssuerConfig), //
+ //
+ // Attributes
+ //
+ make_unique<ReadAttribute>(Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "meter-type", Attributes::MeterType::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "point-of-delivery", Attributes::PointOfDelivery::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "meter-serial-number", Attributes::MeterSerialNumber::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "protocol-version", Attributes::ProtocolVersion::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "power-threshold", Attributes::PowerThreshold::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ make_unique<WriteAttribute<>>(Id, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum>>>(
+ Id, "meter-type", 0, UINT8_MAX, Attributes::MeterType::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::CharSpan>>>(
+ Id, "point-of-delivery", Attributes::PointOfDelivery::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::CharSpan>>>(
+ Id, "meter-serial-number", Attributes::MeterSerialNumber::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::CharSpan>>>(
+ Id, "protocol-version", Attributes::ProtocolVersion::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<
+ chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::PowerThresholdStruct::Type>>>(
+ Id, "power-threshold", Attributes::PowerThreshold::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::AttributeId>>>(
+ Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint32_t>>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint16_t>>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "meter-type", Attributes::MeterType::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "point-of-delivery", Attributes::PointOfDelivery::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "meter-serial-number", Attributes::MeterSerialNumber::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "protocol-version", Attributes::ProtocolVersion::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "power-threshold", Attributes::PowerThreshold::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ //
+ // Events
+ //
+ make_unique<ReadEvent>(Id, credsIssuerConfig), //
+ make_unique<SubscribeEvent>(Id, credsIssuerConfig), //
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+}
+void registerClusterCommodityMetering(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
+{
+ using namespace chip::app::Clusters::CommodityMetering;
+
+ const char * clusterName = "CommodityMetering";
+
+ commands_list clusterCommands = {
+ //
+ // Commands
+ //
+ make_unique<ClusterCommand>(Id, credsIssuerConfig), //
+ //
+ // Attributes
+ //
+ make_unique<ReadAttribute>(Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "metered-quantity", Attributes::MeteredQuantity::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "metered-quantity-timestamp", Attributes::MeteredQuantityTimestamp::Id,
+ credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "measurement-type", Attributes::MeasurementType::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ make_unique<WriteAttribute<>>(Id, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::Nullable<
+ chip::app::DataModel::List<const chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::Type>>>>(
+ Id, "metered-quantity", Attributes::MeteredQuantity::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint32_t>>>(Id, "metered-quantity-timestamp", 0, UINT32_MAX,
+ Attributes::MeteredQuantityTimestamp::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum>>>(
+ Id, "measurement-type", 0, UINT16_MAX, Attributes::MeasurementType::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite,
+ credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::CommandId>>>(
+ Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttributeAsComplex<chip::app::DataModel::List<const chip::AttributeId>>>(
+ Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint32_t>>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<WriteAttribute<uint16_t>>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id,
+ WriteCommandType::kForceWrite, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "metered-quantity", Attributes::MeteredQuantity::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "metered-quantity-timestamp", Attributes::MeteredQuantityTimestamp::Id,
+ credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "measurement-type", Attributes::MeasurementType::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), //
+ make_unique<SubscribeAttribute>(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), //
+ //
+ // Events
+ //
+ make_unique<ReadEvent>(Id, credsIssuerConfig), //
+ make_unique<SubscribeEvent>(Id, credsIssuerConfig), //
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+}
void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * credsIssuerConfig)
{
using namespace chip::app::Clusters::UnitTesting;
@@ -30008,6 +30614,7 @@
registerClusterElectricalPowerMeasurement(commands, credsIssuerConfig);
registerClusterElectricalEnergyMeasurement(commands, credsIssuerConfig);
registerClusterWaterHeaterManagement(commands, credsIssuerConfig);
+ registerClusterCommodityPrice(commands, credsIssuerConfig);
registerClusterDemandResponseLoadControl(commands, credsIssuerConfig);
registerClusterMessages(commands, credsIssuerConfig);
registerClusterDeviceEnergyManagement(commands, credsIssuerConfig);
@@ -30068,10 +30675,13 @@
registerClusterWebRTCTransportRequestor(commands, credsIssuerConfig);
registerClusterPushAvStreamTransport(commands, credsIssuerConfig);
registerClusterChime(commands, credsIssuerConfig);
+ registerClusterCommodityTariff(commands, credsIssuerConfig);
registerClusterEcosystemInformation(commands, credsIssuerConfig);
registerClusterCommissionerControl(commands, credsIssuerConfig);
registerClusterTlsCertificateManagement(commands, credsIssuerConfig);
registerClusterTlsClientManagement(commands, credsIssuerConfig);
+ registerClusterMeterIdentification(commands, credsIssuerConfig);
+ registerClusterCommodityMetering(commands, credsIssuerConfig);
registerClusterUnitTesting(commands, credsIssuerConfig);
registerClusterFaultInjection(commands, credsIssuerConfig);
registerClusterSampleMei(commands, credsIssuerConfig);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
index 9a9bc8e..c6e4cee 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
@@ -19,6 +19,80 @@
#include <commands/clusters/ComplexArgument.h>
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Globals::Structs::CurrencyStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CurrencyStruct.currency", "currency", value.isMember("currency")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CurrencyStruct.decimalPoints", "decimalPoints", value.isMember("decimalPoints")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currency");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currency, value["currency"]));
+ valueCopy.removeMember("currency");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "decimalPoints");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.decimalPoints, value["decimalPoints"]));
+ valueCopy.removeMember("decimalPoints");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::Globals::Structs::CurrencyStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.currency);
+ ComplexArgumentParser::Finalize(request.decimalPoints);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::Globals::Structs::PowerThresholdStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PowerThresholdStruct.powerThresholdSource",
+ "powerThresholdSource", value.isMember("powerThresholdSource")));
+
+ char labelWithMember[kMaxLabelLength];
+ if (value.isMember("powerThreshold"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "powerThreshold");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.powerThreshold, value["powerThreshold"]));
+ }
+ valueCopy.removeMember("powerThreshold");
+
+ if (value.isMember("apparentPowerThreshold"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "apparentPowerThreshold");
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::Setup(labelWithMember, request.apparentPowerThreshold, value["apparentPowerThreshold"]));
+ }
+ valueCopy.removeMember("apparentPowerThreshold");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "powerThresholdSource");
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::Setup(labelWithMember, request.powerThresholdSource, value["powerThresholdSource"]));
+ valueCopy.removeMember("powerThresholdSource");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::Globals::Structs::PowerThresholdStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.powerThreshold);
+ ComplexArgumentParser::Finalize(request.apparentPowerThreshold);
+ ComplexArgumentParser::Finalize(request.powerThresholdSource);
+}
+
CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request,
Json::Value & value)
{
@@ -327,6 +401,35 @@
ComplexArgumentParser::Finalize(request.revision);
}
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Globals::Structs::PriceStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PriceStruct.amount", "amount", value.isMember("amount")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PriceStruct.currency", "currency", value.isMember("currency")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "amount");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.amount, value["amount"]));
+ valueCopy.removeMember("amount");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currency");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currency, value["currency"]));
+ valueCopy.removeMember("currency");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::Globals::Structs::PriceStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.amount);
+ ComplexArgumentParser::Finalize(request.currency);
+}
+
CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request,
Json::Value & value)
{
@@ -3143,6 +3246,108 @@
ComplexArgumentParser::Finalize(request.targetReheat);
}
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityPrice::Structs::CommodityPriceComponentStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CommodityPriceComponentStruct.price", "price", value.isMember("price")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CommodityPriceComponentStruct.source", "source", value.isMember("source")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "price");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.price, value["price"]));
+ valueCopy.removeMember("price");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "source");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.source, value["source"]));
+ valueCopy.removeMember("source");
+
+ if (value.isMember("description"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "description");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.description, value["description"]));
+ }
+ valueCopy.removeMember("description");
+
+ if (value.isMember("tariffComponentID"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tariffComponentID");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tariffComponentID, value["tariffComponentID"]));
+ }
+ valueCopy.removeMember("tariffComponentID");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityPrice::Structs::CommodityPriceComponentStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.price);
+ ComplexArgumentParser::Finalize(request.source);
+ ComplexArgumentParser::Finalize(request.description);
+ ComplexArgumentParser::Finalize(request.tariffComponentID);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CommodityPriceStruct.periodStart", "periodStart", value.isMember("periodStart")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CommodityPriceStruct.periodEnd", "periodEnd", value.isMember("periodEnd")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("CommodityPriceStruct.price", "price", value.isMember("price")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "periodStart");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.periodStart, value["periodStart"]));
+ valueCopy.removeMember("periodStart");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "periodEnd");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.periodEnd, value["periodEnd"]));
+ valueCopy.removeMember("periodEnd");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "price");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.price, value["price"]));
+ valueCopy.removeMember("price");
+
+ if (value.isMember("description"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "description");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.description, value["description"]));
+ }
+ valueCopy.removeMember("description");
+
+ if (value.isMember("components"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "components");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.components, value["components"]));
+ }
+ valueCopy.removeMember("components");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.periodStart);
+ ComplexArgumentParser::Finalize(request.periodEnd);
+ ComplexArgumentParser::Finalize(request.price);
+ ComplexArgumentParser::Finalize(request.description);
+ ComplexArgumentParser::Finalize(request.components);
+}
+
CHIP_ERROR
ComplexArgumentParser::Setup(const char * label,
chip::app::Clusters::DemandResponseLoadControl::Structs::HeatingSourceControlStruct::Type & request,
@@ -7233,6 +7438,451 @@
}
CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::PeakPeriodStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("PeakPeriodStruct.severity", "severity", value.isMember("severity")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("PeakPeriodStruct.peakPeriod", "peakPeriod", value.isMember("peakPeriod")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "severity");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.severity, value["severity"]));
+ valueCopy.removeMember("severity");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "peakPeriod");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.peakPeriod, value["peakPeriod"]));
+ valueCopy.removeMember("peakPeriod");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::PeakPeriodStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.severity);
+ ComplexArgumentParser::Finalize(request.peakPeriod);
+}
+
+CHIP_ERROR
+ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::AuxiliaryLoadSwitchSettingsStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("AuxiliaryLoadSwitchSettingsStruct.number", "number", value.isMember("number")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AuxiliaryLoadSwitchSettingsStruct.requiredState",
+ "requiredState", value.isMember("requiredState")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "number");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.number, value["number"]));
+ valueCopy.removeMember("number");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "requiredState");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.requiredState, value["requiredState"]));
+ valueCopy.removeMember("requiredState");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(
+ chip::app::Clusters::CommodityTariff::Structs::AuxiliaryLoadSwitchSettingsStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.number);
+ ComplexArgumentParser::Finalize(request.requiredState);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::TariffPriceStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("TariffPriceStruct.priceType", "priceType", value.isMember("priceType")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "priceType");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.priceType, value["priceType"]));
+ valueCopy.removeMember("priceType");
+
+ if (value.isMember("price"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "price");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.price, value["price"]));
+ }
+ valueCopy.removeMember("price");
+
+ if (value.isMember("priceLevel"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "priceLevel");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.priceLevel, value["priceLevel"]));
+ }
+ valueCopy.removeMember("priceLevel");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffPriceStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.priceType);
+ ComplexArgumentParser::Finalize(request.price);
+ ComplexArgumentParser::Finalize(request.priceLevel);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TariffComponentStruct.tariffComponentID", "tariffComponentID",
+ value.isMember("tariffComponentID")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("TariffComponentStruct.threshold", "threshold", value.isMember("threshold")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tariffComponentID");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tariffComponentID, value["tariffComponentID"]));
+ valueCopy.removeMember("tariffComponentID");
+
+ if (value.isMember("price"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "price");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.price, value["price"]));
+ }
+ valueCopy.removeMember("price");
+
+ if (value.isMember("friendlyCredit"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "friendlyCredit");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.friendlyCredit, value["friendlyCredit"]));
+ }
+ valueCopy.removeMember("friendlyCredit");
+
+ if (value.isMember("auxiliaryLoad"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "auxiliaryLoad");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.auxiliaryLoad, value["auxiliaryLoad"]));
+ }
+ valueCopy.removeMember("auxiliaryLoad");
+
+ if (value.isMember("peakPeriod"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "peakPeriod");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.peakPeriod, value["peakPeriod"]));
+ }
+ valueCopy.removeMember("peakPeriod");
+
+ if (value.isMember("powerThreshold"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "powerThreshold");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.powerThreshold, value["powerThreshold"]));
+ }
+ valueCopy.removeMember("powerThreshold");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "threshold");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.threshold, value["threshold"]));
+ valueCopy.removeMember("threshold");
+
+ if (value.isMember("label"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"]));
+ }
+ valueCopy.removeMember("label");
+
+ if (value.isMember("predicted"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "predicted");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.predicted, value["predicted"]));
+ }
+ valueCopy.removeMember("predicted");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.tariffComponentID);
+ ComplexArgumentParser::Finalize(request.price);
+ ComplexArgumentParser::Finalize(request.friendlyCredit);
+ ComplexArgumentParser::Finalize(request.auxiliaryLoad);
+ ComplexArgumentParser::Finalize(request.peakPeriod);
+ ComplexArgumentParser::Finalize(request.powerThreshold);
+ ComplexArgumentParser::Finalize(request.threshold);
+ ComplexArgumentParser::Finalize(request.label);
+ ComplexArgumentParser::Finalize(request.predicted);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("CalendarPeriodStruct.startDate", "startDate", value.isMember("startDate")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("CalendarPeriodStruct.dayPatternIDs", "dayPatternIDs",
+ value.isMember("dayPatternIDs")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "startDate");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.startDate, value["startDate"]));
+ valueCopy.removeMember("startDate");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayPatternIDs");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayPatternIDs, value["dayPatternIDs"]));
+ valueCopy.removeMember("dayPatternIDs");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.startDate);
+ ComplexArgumentParser::Finalize(request.dayPatternIDs);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DayEntryStruct.dayEntryID", "dayEntryID", value.isMember("dayEntryID")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DayEntryStruct.startTime", "startTime", value.isMember("startTime")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayEntryID");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayEntryID, value["dayEntryID"]));
+ valueCopy.removeMember("dayEntryID");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "startTime");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.startTime, value["startTime"]));
+ valueCopy.removeMember("startTime");
+
+ if (value.isMember("duration"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "duration");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.duration, value["duration"]));
+ }
+ valueCopy.removeMember("duration");
+
+ if (value.isMember("randomizationOffset"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "randomizationOffset");
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::Setup(labelWithMember, request.randomizationOffset, value["randomizationOffset"]));
+ }
+ valueCopy.removeMember("randomizationOffset");
+
+ if (value.isMember("randomizationType"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "randomizationType");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.randomizationType, value["randomizationType"]));
+ }
+ valueCopy.removeMember("randomizationType");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.dayEntryID);
+ ComplexArgumentParser::Finalize(request.startTime);
+ ComplexArgumentParser::Finalize(request.duration);
+ ComplexArgumentParser::Finalize(request.randomizationOffset);
+ ComplexArgumentParser::Finalize(request.randomizationType);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DayPatternStruct.dayPatternID", "dayPatternID", value.isMember("dayPatternID")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DayPatternStruct.daysOfWeek", "daysOfWeek", value.isMember("daysOfWeek")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DayPatternStruct.dayEntryIDs", "dayEntryIDs", value.isMember("dayEntryIDs")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayPatternID");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayPatternID, value["dayPatternID"]));
+ valueCopy.removeMember("dayPatternID");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "daysOfWeek");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.daysOfWeek, value["daysOfWeek"]));
+ valueCopy.removeMember("daysOfWeek");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayEntryIDs");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayEntryIDs, value["dayEntryIDs"]));
+ valueCopy.removeMember("dayEntryIDs");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.dayPatternID);
+ ComplexArgumentParser::Finalize(request.daysOfWeek);
+ ComplexArgumentParser::Finalize(request.dayEntryIDs);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DayStruct.date", "date", value.isMember("date")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("DayStruct.dayType", "dayType", value.isMember("dayType")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("DayStruct.dayEntryIDs", "dayEntryIDs", value.isMember("dayEntryIDs")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "date");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.date, value["date"]));
+ valueCopy.removeMember("date");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayType");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayType, value["dayType"]));
+ valueCopy.removeMember("dayType");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayEntryIDs");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayEntryIDs, value["dayEntryIDs"]));
+ valueCopy.removeMember("dayEntryIDs");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.date);
+ ComplexArgumentParser::Finalize(request.dayType);
+ ComplexArgumentParser::Finalize(request.dayEntryIDs);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TariffInformationStruct.tariffLabel", "tariffLabel",
+ value.isMember("tariffLabel")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TariffInformationStruct.providerName", "providerName",
+ value.isMember("providerName")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("TariffInformationStruct.blockMode", "blockMode", value.isMember("blockMode")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tariffLabel");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tariffLabel, value["tariffLabel"]));
+ valueCopy.removeMember("tariffLabel");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "providerName");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.providerName, value["providerName"]));
+ valueCopy.removeMember("providerName");
+
+ if (value.isMember("currency"))
+ {
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "currency");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.currency, value["currency"]));
+ }
+ valueCopy.removeMember("currency");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "blockMode");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.blockMode, value["blockMode"]));
+ valueCopy.removeMember("blockMode");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.tariffLabel);
+ ComplexArgumentParser::Finalize(request.providerName);
+ ComplexArgumentParser::Finalize(request.currency);
+ ComplexArgumentParser::Finalize(request.blockMode);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TariffPeriodStruct.label", "label", value.isMember("label")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("TariffPeriodStruct.dayEntryIDs", "dayEntryIDs", value.isMember("dayEntryIDs")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("TariffPeriodStruct.tariffComponentIDs", "tariffComponentIDs",
+ value.isMember("tariffComponentIDs")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"]));
+ valueCopy.removeMember("label");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayEntryIDs");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayEntryIDs, value["dayEntryIDs"]));
+ valueCopy.removeMember("dayEntryIDs");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tariffComponentIDs");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tariffComponentIDs, value["tariffComponentIDs"]));
+ valueCopy.removeMember("tariffComponentIDs");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.label);
+ ComplexArgumentParser::Finalize(request.dayEntryIDs);
+ ComplexArgumentParser::Finalize(request.tariffComponentIDs);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
chip::app::Clusters::EcosystemInformation::Structs::EcosystemDeviceStruct::Type & request,
Json::Value & value)
{
@@ -7492,6 +8142,38 @@
ComplexArgumentParser::Finalize(request.status);
}
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("MeteredQuantityStruct.tariffComponentIDs", "tariffComponentIDs",
+ value.isMember("tariffComponentIDs")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("MeteredQuantityStruct.quantity", "quantity", value.isMember("quantity")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "tariffComponentIDs");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.tariffComponentIDs, value["tariffComponentIDs"]));
+ valueCopy.removeMember("tariffComponentIDs");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "quantity");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.quantity, value["quantity"]));
+ valueCopy.removeMember("quantity");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.tariffComponentIDs);
+ ComplexArgumentParser::Finalize(request.quantity);
+}
+
CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request,
Json::Value & value)
{
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
index d769965..a3baf4c 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
@@ -22,6 +22,16 @@
#include <app-common/zap-generated/cluster-objects.h>
#include <lib/core/CHIPError.h>
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Globals::Structs::CurrencyStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::Globals::Structs::CurrencyStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Globals::Structs::PowerThresholdStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::Globals::Structs::PowerThresholdStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Globals::Structs::TestGlobalStruct::Type & request,
Json::Value & value);
@@ -57,6 +67,11 @@
static void Finalize(chip::app::Clusters::detail::Structs::DeviceTypeStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Globals::Structs::PriceStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::Globals::Structs::PriceStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::detail::Structs::ApplicationStruct::Type & request,
Json::Value & value);
@@ -365,6 +380,17 @@
static void Finalize(chip::app::Clusters::WaterHeaterManagement::Structs::WaterHeaterBoostInfoStruct::Type & request);
static CHIP_ERROR Setup(const char * label,
+ chip::app::Clusters::CommodityPrice::Structs::CommodityPriceComponentStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityPrice::Structs::CommodityPriceComponentStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label,
chip::app::Clusters::DemandResponseLoadControl::Structs::HeatingSourceControlStruct::Type & request,
Json::Value & value);
@@ -838,6 +864,57 @@
static void Finalize(chip::app::Clusters::Chime::Structs::ChimeSoundStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::PeakPeriodStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::PeakPeriodStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label,
+ chip::app::Clusters::CommodityTariff::Structs::AuxiliaryLoadSwitchSettingsStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::AuxiliaryLoadSwitchSettingsStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::TariffPriceStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffPriceStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::DayStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::Type & request);
+
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label,
chip::app::Clusters::EcosystemInformation::Structs::EcosystemDeviceStruct::Type & request,
Json::Value & value);
@@ -866,6 +943,11 @@
static void Finalize(chip::app::Clusters::TlsClientManagement::Structs::TLSEndpointStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::UnitTesting::Structs::SimpleStruct::Type & request,
Json::Value & value);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
index e18d8ec..a1f2dc4 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -23,6 +23,64 @@
using namespace chip::app::Clusters;
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Currency", indent + 1, value.currency);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Currency'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DecimalPoints", indent + 1, value.decimalPoints);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DecimalPoints'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::Globals::Structs::PowerThresholdStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("PowerThreshold", indent + 1, value.powerThreshold);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PowerThreshold'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("ApparentPowerThreshold", indent + 1, value.apparentPowerThreshold);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ApparentPowerThreshold'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("PowerThresholdSource", indent + 1, value.powerThresholdSource);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PowerThresholdSource'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::Globals::Structs::TestGlobalStruct::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -291,6 +349,31 @@
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::Globals::Structs::PriceStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Amount", indent + 1, value.amount);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Amount'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Currency", indent + 1, value.currency);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Currency'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -2818,6 +2901,98 @@
return CHIP_NO_ERROR;
}
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Structs::CommodityPriceComponentStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Price", indent + 1, value.price);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Price'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Source", indent + 1, value.source);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Source'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Description", indent + 1, value.description);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Description'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("TariffComponentID", indent + 1, value.tariffComponentID);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TariffComponentID'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("PeriodStart", indent + 1, value.periodStart);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PeriodStart'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("PeriodEnd", indent + 1, value.periodEnd);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PeriodEnd'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Price", indent + 1, value.price);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Price'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Description", indent + 1, value.description);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Description'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Components", indent + 1, value.components);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Components'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
CHIP_ERROR DataModelLogger::LogValue(
const char * label, size_t indent,
const chip::app::Clusters::DemandResponseLoadControl::Structs::HeatingSourceControlStruct::DecodableType & value)
@@ -6389,6 +6564,388 @@
return CHIP_NO_ERROR;
}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::PeakPeriodStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Severity", indent + 1, value.severity);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Severity'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("PeakPeriod", indent + 1, value.peakPeriod);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PeakPeriod'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(
+ const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::AuxiliaryLoadSwitchSettingsStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Number", indent + 1, value.number);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Number'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("RequiredState", indent + 1, value.requiredState);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RequiredState'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffPriceStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("PriceType", indent + 1, value.priceType);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PriceType'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Price", indent + 1, value.price);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Price'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("PriceLevel", indent + 1, value.priceLevel);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PriceLevel'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("TariffComponentID", indent + 1, value.tariffComponentID);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TariffComponentID'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Price", indent + 1, value.price);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Price'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("FriendlyCredit", indent + 1, value.friendlyCredit);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FriendlyCredit'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("AuxiliaryLoad", indent + 1, value.auxiliaryLoad);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AuxiliaryLoad'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("PeakPeriod", indent + 1, value.peakPeriod);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PeakPeriod'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("PowerThreshold", indent + 1, value.powerThreshold);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PowerThreshold'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Threshold", indent + 1, value.threshold);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Threshold'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Label", indent + 1, value.label);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Predicted", indent + 1, value.predicted);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Predicted'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("StartDate", indent + 1, value.startDate);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartDate'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DayPatternIDs", indent + 1, value.dayPatternIDs);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayPatternIDs'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("DayEntryID", indent + 1, value.dayEntryID);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayEntryID'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("RandomizationOffset", indent + 1, value.randomizationOffset);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RandomizationOffset'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("RandomizationType", indent + 1, value.randomizationType);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RandomizationType'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("DayPatternID", indent + 1, value.dayPatternID);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayPatternID'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DaysOfWeek", indent + 1, value.daysOfWeek);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DaysOfWeek'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DayEntryIDs", indent + 1, value.dayEntryIDs);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayEntryIDs'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Date", indent + 1, value.date);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Date'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DayType", indent + 1, value.dayType);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayType'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DayEntryIDs", indent + 1, value.dayEntryIDs);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayEntryIDs'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("TariffLabel", indent + 1, value.tariffLabel);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TariffLabel'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("ProviderName", indent + 1, value.providerName);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ProviderName'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Currency", indent + 1, value.currency);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Currency'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("BlockMode", indent + 1, value.blockMode);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'BlockMode'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("Label", indent + 1, value.label);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("DayEntryIDs", indent + 1, value.dayEntryIDs);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayEntryIDs'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("TariffComponentIDs", indent + 1, value.tariffComponentIDs);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TariffComponentIDs'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
CHIP_ERROR
DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::EcosystemInformation::Structs::EcosystemDeviceStruct::DecodableType & value)
@@ -6623,6 +7180,32 @@
return CHIP_NO_ERROR;
}
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("TariffComponentIDs", indent + 1, value.tariffComponentIDs);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TariffComponentIDs'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("Quantity", indent + 1, value.quantity);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Quantity'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value)
{
@@ -8473,6 +9056,38 @@
return CHIP_NO_ERROR;
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const CommodityPrice::Events::PriceChange::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = DataModelLogger::LogValue("CurrentPrice", indent + 1, value.currentPrice);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'CurrentPrice'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const CommodityPrice::Events::ForecastChange::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = DataModelLogger::LogValue("PriceForecast", indent + 1, value.priceForecast);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'PriceForecast'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -10083,6 +10698,22 @@
return CHIP_NO_ERROR;
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ ReturnErrorOnFailure(DataModelLogger::LogValue("currentPrice", indent + 1, value.currentPrice));
+ DataModelLogger::LogString(indent, "}");
+ return CHIP_NO_ERROR;
+}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ ReturnErrorOnFailure(DataModelLogger::LogValue("priceForecast", indent + 1, value.priceForecast));
+ DataModelLogger::LogString(indent, "}");
+ return CHIP_NO_ERROR;
+}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const EnergyEvse::Commands::GetTargetsResponse::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -10439,6 +11070,24 @@
return CHIP_NO_ERROR;
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const CommodityTariff::Commands::GetTariffComponentResponse::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ ReturnErrorOnFailure(DataModelLogger::LogValue("label", indent + 1, value.label));
+ ReturnErrorOnFailure(DataModelLogger::LogValue("dayEntryIDs", indent + 1, value.dayEntryIDs));
+ ReturnErrorOnFailure(DataModelLogger::LogValue("tariffComponent", indent + 1, value.tariffComponent));
+ DataModelLogger::LogString(indent, "}");
+ return CHIP_NO_ERROR;
+}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const CommodityTariff::Commands::GetDayEntryResponse::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ ReturnErrorOnFailure(DataModelLogger::LogValue("dayEntry", indent + 1, value.dayEntry));
+ DataModelLogger::LogString(indent, "}");
+ return CHIP_NO_ERROR;
+}
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
@@ -15007,6 +15656,58 @@
}
break;
}
+ case CommodityPrice::Id: {
+ switch (path.mAttributeId)
+ {
+ case CommodityPrice::Attributes::TariffUnit::Id: {
+ chip::app::Clusters::Globals::TariffUnitEnum value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("TariffUnit", 1, value);
+ }
+ case CommodityPrice::Attributes::Currency::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("Currency", 1, value);
+ }
+ case CommodityPrice::Attributes::CurrentPrice::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("CurrentPrice", 1, value);
+ }
+ case CommodityPrice::Attributes::PriceForecast::Id: {
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("PriceForecast", 1, value);
+ }
+ case CommodityPrice::Attributes::GeneratedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, CommodityPrice::Id);
+ }
+ case CommodityPrice::Attributes::AcceptedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, CommodityPrice::Id);
+ }
+ case CommodityPrice::Attributes::AttributeList::Id: {
+ chip::app::DataModel::DecodableList<chip::AttributeId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAttributeId("AttributeList", 1, value, CommodityPrice::Id);
+ }
+ case CommodityPrice::Attributes::FeatureMap::Id: {
+ uint32_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("FeatureMap", 1, value);
+ }
+ case CommodityPrice::Attributes::ClusterRevision::Id: {
+ uint16_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("ClusterRevision", 1, value);
+ }
+ }
+ break;
+ }
case DemandResponseLoadControl::Id: {
switch (path.mAttributeId)
{
@@ -19807,6 +20508,149 @@
}
break;
}
+ case CommodityTariff::Id: {
+ switch (path.mAttributeId)
+ {
+ case CommodityTariff::Attributes::TariffInfo::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::DecodableType>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("TariffInfo", 1, value);
+ }
+ case CommodityTariff::Attributes::TariffUnit::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::Globals::TariffUnitEnum> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("TariffUnit", 1, value);
+ }
+ case CommodityTariff::Attributes::StartDate::Id: {
+ chip::app::DataModel::Nullable<uint32_t> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("StartDate", 1, value);
+ }
+ case CommodityTariff::Attributes::DayEntries::Id: {
+ chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("DayEntries", 1, value);
+ }
+ case CommodityTariff::Attributes::DayPatterns::Id: {
+ chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("DayPatterns", 1, value);
+ }
+ case CommodityTariff::Attributes::CalendarPeriods::Id: {
+ chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("CalendarPeriods", 1, value);
+ }
+ case CommodityTariff::Attributes::IndividualDays::Id: {
+ chip::app::DataModel::Nullable<
+ chip::app::DataModel::DecodableList<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("IndividualDays", 1, value);
+ }
+ case CommodityTariff::Attributes::CurrentDay::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("CurrentDay", 1, value);
+ }
+ case CommodityTariff::Attributes::NextDay::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("NextDay", 1, value);
+ }
+ case CommodityTariff::Attributes::CurrentDayEntry::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("CurrentDayEntry", 1, value);
+ }
+ case CommodityTariff::Attributes::CurrentDayEntryDate::Id: {
+ chip::app::DataModel::Nullable<uint32_t> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("CurrentDayEntryDate", 1, value);
+ }
+ case CommodityTariff::Attributes::NextDayEntry::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("NextDayEntry", 1, value);
+ }
+ case CommodityTariff::Attributes::NextDayEntryDate::Id: {
+ chip::app::DataModel::Nullable<uint32_t> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("NextDayEntryDate", 1, value);
+ }
+ case CommodityTariff::Attributes::TariffComponents::Id: {
+ chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("TariffComponents", 1, value);
+ }
+ case CommodityTariff::Attributes::TariffPeriods::Id: {
+ chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("TariffPeriods", 1, value);
+ }
+ case CommodityTariff::Attributes::CurrentTariffComponents::Id: {
+ chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("CurrentTariffComponents", 1, value);
+ }
+ case CommodityTariff::Attributes::NextTariffComponents::Id: {
+ chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("NextTariffComponents", 1, value);
+ }
+ case CommodityTariff::Attributes::DefaultRandomizationOffset::Id: {
+ chip::app::DataModel::Nullable<int16_t> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("DefaultRandomizationOffset", 1, value);
+ }
+ case CommodityTariff::Attributes::DefaultRandomizationType::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityTariff::DayEntryRandomizationTypeEnum> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("DefaultRandomizationType", 1, value);
+ }
+ case CommodityTariff::Attributes::GeneratedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, CommodityTariff::Id);
+ }
+ case CommodityTariff::Attributes::AcceptedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, CommodityTariff::Id);
+ }
+ case CommodityTariff::Attributes::AttributeList::Id: {
+ chip::app::DataModel::DecodableList<chip::AttributeId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAttributeId("AttributeList", 1, value, CommodityTariff::Id);
+ }
+ case CommodityTariff::Attributes::FeatureMap::Id: {
+ uint32_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("FeatureMap", 1, value);
+ }
+ case CommodityTariff::Attributes::ClusterRevision::Id: {
+ uint16_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("ClusterRevision", 1, value);
+ }
+ }
+ break;
+ }
case EcosystemInformation::Id: {
switch (path.mAttributeId)
{
@@ -19985,6 +20829,110 @@
}
break;
}
+ case MeterIdentification::Id: {
+ switch (path.mAttributeId)
+ {
+ case MeterIdentification::Attributes::MeterType::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::MeterIdentification::MeterTypeEnum> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("MeterType", 1, value);
+ }
+ case MeterIdentification::Attributes::PointOfDelivery::Id: {
+ chip::app::DataModel::Nullable<chip::CharSpan> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("PointOfDelivery", 1, value);
+ }
+ case MeterIdentification::Attributes::MeterSerialNumber::Id: {
+ chip::app::DataModel::Nullable<chip::CharSpan> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("MeterSerialNumber", 1, value);
+ }
+ case MeterIdentification::Attributes::ProtocolVersion::Id: {
+ chip::app::DataModel::Nullable<chip::CharSpan> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("ProtocolVersion", 1, value);
+ }
+ case MeterIdentification::Attributes::PowerThreshold::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::Globals::Structs::PowerThresholdStruct::DecodableType> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("PowerThreshold", 1, value);
+ }
+ case MeterIdentification::Attributes::GeneratedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, MeterIdentification::Id);
+ }
+ case MeterIdentification::Attributes::AcceptedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, MeterIdentification::Id);
+ }
+ case MeterIdentification::Attributes::AttributeList::Id: {
+ chip::app::DataModel::DecodableList<chip::AttributeId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAttributeId("AttributeList", 1, value, MeterIdentification::Id);
+ }
+ case MeterIdentification::Attributes::FeatureMap::Id: {
+ uint32_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("FeatureMap", 1, value);
+ }
+ case MeterIdentification::Attributes::ClusterRevision::Id: {
+ uint16_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("ClusterRevision", 1, value);
+ }
+ }
+ break;
+ }
+ case CommodityMetering::Id: {
+ switch (path.mAttributeId)
+ {
+ case CommodityMetering::Attributes::MeteredQuantity::Id: {
+ chip::app::DataModel::Nullable<chip::app::DataModel::DecodableList<
+ chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::DecodableType>>
+ value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("MeteredQuantity", 1, value);
+ }
+ case CommodityMetering::Attributes::MeteredQuantityTimestamp::Id: {
+ chip::app::DataModel::Nullable<uint32_t> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("MeteredQuantityTimestamp", 1, value);
+ }
+ case CommodityMetering::Attributes::MeasurementType::Id: {
+ chip::app::DataModel::Nullable<chip::app::Clusters::CommodityMetering::MeasurementTypeEnum> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("MeasurementType", 1, value);
+ }
+ case CommodityMetering::Attributes::GeneratedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, CommodityMetering::Id);
+ }
+ case CommodityMetering::Attributes::AcceptedCommandList::Id: {
+ chip::app::DataModel::DecodableList<chip::CommandId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, CommodityMetering::Id);
+ }
+ case CommodityMetering::Attributes::AttributeList::Id: {
+ chip::app::DataModel::DecodableList<chip::AttributeId> value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogAttributeId("AttributeList", 1, value, CommodityMetering::Id);
+ }
+ case CommodityMetering::Attributes::FeatureMap::Id: {
+ uint32_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("FeatureMap", 1, value);
+ }
+ case CommodityMetering::Attributes::ClusterRevision::Id: {
+ uint16_t value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("ClusterRevision", 1, value);
+ }
+ }
+ break;
+ }
case UnitTesting::Id: {
switch (path.mAttributeId)
{
@@ -20891,6 +21839,22 @@
}
break;
}
+ case CommodityPrice::Id: {
+ switch (path.mCommandId)
+ {
+ case CommodityPrice::Commands::GetDetailedPriceResponse::Id: {
+ CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("GetDetailedPriceResponse", 1, value);
+ }
+ case CommodityPrice::Commands::GetDetailedForecastResponse::Id: {
+ CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("GetDetailedForecastResponse", 1, value);
+ }
+ }
+ break;
+ }
case EnergyEvse::Id: {
switch (path.mCommandId)
{
@@ -21214,6 +22178,22 @@
}
break;
}
+ case CommodityTariff::Id: {
+ switch (path.mCommandId)
+ {
+ case CommodityTariff::Commands::GetTariffComponentResponse::Id: {
+ CommodityTariff::Commands::GetTariffComponentResponse::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("GetTariffComponentResponse", 1, value);
+ }
+ case CommodityTariff::Commands::GetDayEntryResponse::Id: {
+ CommodityTariff::Commands::GetDayEntryResponse::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("GetDayEntryResponse", 1, value);
+ }
+ }
+ break;
+ }
case CommissionerControl::Id: {
switch (path.mCommandId)
{
@@ -21908,6 +22888,22 @@
}
break;
}
+ case CommodityPrice::Id: {
+ switch (header.mPath.mEventId)
+ {
+ case CommodityPrice::Events::PriceChange::Id: {
+ chip::app::Clusters::CommodityPrice::Events::PriceChange::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("PriceChange", 1, value);
+ }
+ case CommodityPrice::Events::ForecastChange::Id: {
+ chip::app::Clusters::CommodityPrice::Events::ForecastChange::DecodableType value;
+ ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
+ return DataModelLogger::LogValue("ForecastChange", 1, value);
+ }
+ }
+ break;
+ }
case DemandResponseLoadControl::Id: {
switch (header.mPath.mEventId)
{
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
index ec47d74..ad29b77 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -21,6 +21,12 @@
#include <lib/core/CHIPError.h>
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::Globals::Structs::CurrencyStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::Globals::Structs::PowerThresholdStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::Globals::Structs::TestGlobalStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -42,6 +48,9 @@
const chip::app::Clusters::detail::Structs::DeviceTypeStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::Globals::Structs::PriceStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::detail::Structs::ApplicationStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -229,6 +238,13 @@
static CHIP_ERROR
LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Structs::CommodityPriceComponentStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Structs::CommodityPriceStruct::DecodableType & value);
+
+static CHIP_ERROR
+LogValue(const char * label, size_t indent,
const chip::app::Clusters::DemandResponseLoadControl::Structs::HeatingSourceControlStruct::DecodableType & value);
static CHIP_ERROR
@@ -516,6 +532,37 @@
const chip::app::Clusters::Chime::Structs::ChimeSoundStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::PeakPeriodStruct::DecodableType & value);
+
+static CHIP_ERROR
+LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::AuxiliaryLoadSwitchSettingsStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffPriceStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffComponentStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::CalendarPeriodStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::DayEntryStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::DayPatternStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::DayStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffInformationStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Structs::TariffPeriodStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::EcosystemInformation::Structs::EcosystemDeviceStruct::DecodableType & value);
static CHIP_ERROR
@@ -533,6 +580,9 @@
const chip::app::Clusters::TlsClientManagement::Structs::TLSEndpointStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityMetering::Structs::MeteredQuantityStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::UnitTesting::Structs::SimpleStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
@@ -701,6 +751,10 @@
const chip::app::Clusters::WaterHeaterManagement::Events::BoostStarted::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::WaterHeaterManagement::Events::BoostEnded::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Events::PriceChange::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Events::ForecastChange::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::DemandResponseLoadControl::Events::LoadControlEventStatusChange::DecodableType & value);
@@ -918,6 +972,10 @@
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::EnergyEvseMode::Commands::ChangeToModeResponse::DecodableType & value);
@@ -1006,6 +1064,10 @@
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::PushAvStreamTransport::Commands::FindTransportResponse::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::DecodableType & value);
+static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::DecodableType & value);
static CHIP_ERROR
LogValue(const char * label, size_t indent,
const chip::app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType & value);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp
index d127c75..bc0892a 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp
@@ -157,6 +157,8 @@
return "ElectricalEnergyMeasurement";
case chip::app::Clusters::WaterHeaterManagement::Id:
return "WaterHeaterManagement";
+ case chip::app::Clusters::CommodityPrice::Id:
+ return "CommodityPrice";
case chip::app::Clusters::DemandResponseLoadControl::Id:
return "DemandResponseLoadControl";
case chip::app::Clusters::Messages::Id:
@@ -277,6 +279,8 @@
return "PushAvStreamTransport";
case chip::app::Clusters::Chime::Id:
return "Chime";
+ case chip::app::Clusters::CommodityTariff::Id:
+ return "CommodityTariff";
case chip::app::Clusters::EcosystemInformation::Id:
return "EcosystemInformation";
case chip::app::Clusters::CommissionerControl::Id:
@@ -285,6 +289,10 @@
return "TlsCertificateManagement";
case chip::app::Clusters::TlsClientManagement::Id:
return "TlsClientManagement";
+ case chip::app::Clusters::MeterIdentification::Id:
+ return "MeterIdentification";
+ case chip::app::Clusters::CommodityMetering::Id:
+ return "CommodityMetering";
case chip::app::Clusters::UnitTesting::Id:
return "UnitTesting";
case chip::app::Clusters::FaultInjection::Id:
@@ -2296,6 +2304,31 @@
return "Unknown";
}
}
+ case chip::app::Clusters::CommodityPrice::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityPrice::Attributes::TariffUnit::Id:
+ return "TariffUnit";
+ case chip::app::Clusters::CommodityPrice::Attributes::Currency::Id:
+ return "Currency";
+ case chip::app::Clusters::CommodityPrice::Attributes::CurrentPrice::Id:
+ return "CurrentPrice";
+ case chip::app::Clusters::CommodityPrice::Attributes::PriceForecast::Id:
+ return "PriceForecast";
+ case chip::app::Clusters::CommodityPrice::Attributes::GeneratedCommandList::Id:
+ return "GeneratedCommandList";
+ case chip::app::Clusters::CommodityPrice::Attributes::AcceptedCommandList::Id:
+ return "AcceptedCommandList";
+ case chip::app::Clusters::CommodityPrice::Attributes::AttributeList::Id:
+ return "AttributeList";
+ case chip::app::Clusters::CommodityPrice::Attributes::FeatureMap::Id:
+ return "FeatureMap";
+ case chip::app::Clusters::CommodityPrice::Attributes::ClusterRevision::Id:
+ return "ClusterRevision";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::DemandResponseLoadControl::Id: {
switch (id)
{
@@ -4470,6 +4503,61 @@
return "Unknown";
}
}
+ case chip::app::Clusters::CommodityTariff::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityTariff::Attributes::TariffInfo::Id:
+ return "TariffInfo";
+ case chip::app::Clusters::CommodityTariff::Attributes::TariffUnit::Id:
+ return "TariffUnit";
+ case chip::app::Clusters::CommodityTariff::Attributes::StartDate::Id:
+ return "StartDate";
+ case chip::app::Clusters::CommodityTariff::Attributes::DayEntries::Id:
+ return "DayEntries";
+ case chip::app::Clusters::CommodityTariff::Attributes::DayPatterns::Id:
+ return "DayPatterns";
+ case chip::app::Clusters::CommodityTariff::Attributes::CalendarPeriods::Id:
+ return "CalendarPeriods";
+ case chip::app::Clusters::CommodityTariff::Attributes::IndividualDays::Id:
+ return "IndividualDays";
+ case chip::app::Clusters::CommodityTariff::Attributes::CurrentDay::Id:
+ return "CurrentDay";
+ case chip::app::Clusters::CommodityTariff::Attributes::NextDay::Id:
+ return "NextDay";
+ case chip::app::Clusters::CommodityTariff::Attributes::CurrentDayEntry::Id:
+ return "CurrentDayEntry";
+ case chip::app::Clusters::CommodityTariff::Attributes::CurrentDayEntryDate::Id:
+ return "CurrentDayEntryDate";
+ case chip::app::Clusters::CommodityTariff::Attributes::NextDayEntry::Id:
+ return "NextDayEntry";
+ case chip::app::Clusters::CommodityTariff::Attributes::NextDayEntryDate::Id:
+ return "NextDayEntryDate";
+ case chip::app::Clusters::CommodityTariff::Attributes::TariffComponents::Id:
+ return "TariffComponents";
+ case chip::app::Clusters::CommodityTariff::Attributes::TariffPeriods::Id:
+ return "TariffPeriods";
+ case chip::app::Clusters::CommodityTariff::Attributes::CurrentTariffComponents::Id:
+ return "CurrentTariffComponents";
+ case chip::app::Clusters::CommodityTariff::Attributes::NextTariffComponents::Id:
+ return "NextTariffComponents";
+ case chip::app::Clusters::CommodityTariff::Attributes::DefaultRandomizationOffset::Id:
+ return "DefaultRandomizationOffset";
+ case chip::app::Clusters::CommodityTariff::Attributes::DefaultRandomizationType::Id:
+ return "DefaultRandomizationType";
+ case chip::app::Clusters::CommodityTariff::Attributes::GeneratedCommandList::Id:
+ return "GeneratedCommandList";
+ case chip::app::Clusters::CommodityTariff::Attributes::AcceptedCommandList::Id:
+ return "AcceptedCommandList";
+ case chip::app::Clusters::CommodityTariff::Attributes::AttributeList::Id:
+ return "AttributeList";
+ case chip::app::Clusters::CommodityTariff::Attributes::FeatureMap::Id:
+ return "FeatureMap";
+ case chip::app::Clusters::CommodityTariff::Attributes::ClusterRevision::Id:
+ return "ClusterRevision";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::EcosystemInformation::Id: {
switch (id)
{
@@ -4556,6 +4644,56 @@
return "Unknown";
}
}
+ case chip::app::Clusters::MeterIdentification::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::MeterIdentification::Attributes::MeterType::Id:
+ return "MeterType";
+ case chip::app::Clusters::MeterIdentification::Attributes::PointOfDelivery::Id:
+ return "PointOfDelivery";
+ case chip::app::Clusters::MeterIdentification::Attributes::MeterSerialNumber::Id:
+ return "MeterSerialNumber";
+ case chip::app::Clusters::MeterIdentification::Attributes::ProtocolVersion::Id:
+ return "ProtocolVersion";
+ case chip::app::Clusters::MeterIdentification::Attributes::PowerThreshold::Id:
+ return "PowerThreshold";
+ case chip::app::Clusters::MeterIdentification::Attributes::GeneratedCommandList::Id:
+ return "GeneratedCommandList";
+ case chip::app::Clusters::MeterIdentification::Attributes::AcceptedCommandList::Id:
+ return "AcceptedCommandList";
+ case chip::app::Clusters::MeterIdentification::Attributes::AttributeList::Id:
+ return "AttributeList";
+ case chip::app::Clusters::MeterIdentification::Attributes::FeatureMap::Id:
+ return "FeatureMap";
+ case chip::app::Clusters::MeterIdentification::Attributes::ClusterRevision::Id:
+ return "ClusterRevision";
+ default:
+ return "Unknown";
+ }
+ }
+ case chip::app::Clusters::CommodityMetering::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityMetering::Attributes::MeteredQuantity::Id:
+ return "MeteredQuantity";
+ case chip::app::Clusters::CommodityMetering::Attributes::MeteredQuantityTimestamp::Id:
+ return "MeteredQuantityTimestamp";
+ case chip::app::Clusters::CommodityMetering::Attributes::MeasurementType::Id:
+ return "MeasurementType";
+ case chip::app::Clusters::CommodityMetering::Attributes::GeneratedCommandList::Id:
+ return "GeneratedCommandList";
+ case chip::app::Clusters::CommodityMetering::Attributes::AcceptedCommandList::Id:
+ return "AcceptedCommandList";
+ case chip::app::Clusters::CommodityMetering::Attributes::AttributeList::Id:
+ return "AttributeList";
+ case chip::app::Clusters::CommodityMetering::Attributes::FeatureMap::Id:
+ return "FeatureMap";
+ case chip::app::Clusters::CommodityMetering::Attributes::ClusterRevision::Id:
+ return "ClusterRevision";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::UnitTesting::Id: {
switch (id)
{
@@ -5364,6 +5502,17 @@
return "Unknown";
}
}
+ case chip::app::Clusters::CommodityPrice::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Id:
+ return "GetDetailedPriceRequest";
+ case chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Id:
+ return "GetDetailedForecastRequest";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::DemandResponseLoadControl::Id: {
switch (id)
{
@@ -5987,6 +6136,17 @@
return "Unknown";
}
}
+ case chip::app::Clusters::CommodityTariff::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Id:
+ return "GetTariffComponent";
+ case chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Id:
+ return "GetDayEntry";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::CommissionerControl::Id: {
switch (id)
{
@@ -6363,6 +6523,17 @@
return "Unknown";
}
}
+ case chip::app::Clusters::CommodityPrice::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::Id:
+ return "GetDetailedPriceResponse";
+ case chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::Id:
+ return "GetDetailedForecastResponse";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::EnergyEvse::Id: {
switch (id)
{
@@ -6598,6 +6769,17 @@
return "Unknown";
}
}
+ case chip::app::Clusters::CommodityTariff::Id: {
+ switch (id)
+ {
+ case chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::Id:
+ return "GetTariffComponentResponse";
+ case chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::Id:
+ return "GetDayEntryResponse";
+ default:
+ return "Unknown";
+ }
+ }
case chip::app::Clusters::CommissionerControl::Id: {
switch (id)
{
@@ -6866,6 +7048,14 @@
return "Water Heater";
case 0x00000510:
return "Electrical Sensor";
+ case 0x00000511:
+ return "Electrical Utility Meter";
+ case 0x00000512:
+ return "Meter Reference Point";
+ case 0x00000513:
+ return "Electrical Energy Tariff";
+ case 0x00000514:
+ return "Electrical Meter";
case 0x00000840:
return "Control Bridge";
case 0x00000850:
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index c72cfc1..910acfc 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -103,6 +103,7 @@
| ElectricalPowerMeasurement | 0x0090 |
| ElectricalEnergyMeasurement | 0x0091 |
| WaterHeaterManagement | 0x0094 |
+| CommodityPrice | 0x0095 |
| DemandResponseLoadControl | 0x0096 |
| Messages | 0x0097 |
| DeviceEnergyManagement | 0x0098 |
@@ -163,10 +164,13 @@
| WebRTCTransportRequestor | 0x0554 |
| PushAvStreamTransport | 0x0555 |
| Chime | 0x0556 |
+| CommodityTariff | 0x0700 |
| EcosystemInformation | 0x0750 |
| CommissionerControl | 0x0751 |
| TlsCertificateManagement | 0x0801 |
| TlsClientManagement | 0x0802 |
+| MeterIdentification | 0x0B06 |
+| CommodityMetering | 0x0B07 |
| UnitTesting | 0xFFF1FC05|
| FaultInjection | 0xFFF1FC06|
| SampleMei | 0xFFF1FC20|
@@ -71728,6 +71732,915 @@
#if MTR_ENABLE_PROVISIONAL
/*----------------------------------------------------------------------------*\
+| Cluster CommodityPrice | 0x0095 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+| * GetDetailedPriceRequest | 0x00 |
+| * GetDetailedForecastRequest | 0x02 |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * TariffUnit | 0x0000 |
+| * Currency | 0x0001 |
+| * CurrentPrice | 0x0002 |
+| * PriceForecast | 0x0003 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+| * PriceChange | 0x0000 |
+| * ForecastChange | 0x0001 |
+\*----------------------------------------------------------------------------*/
+
+#if MTR_ENABLE_PROVISIONAL
+/*
+ * Command GetDetailedPriceRequest
+ */
+class CommodityPriceGetDetailedPriceRequest : public ClusterCommand {
+public:
+ CommodityPriceGetDetailedPriceRequest()
+ : ClusterCommand("get-detailed-price-request")
+ {
+#if MTR_ENABLE_PROVISIONAL
+ AddArgument("Details", 0, UINT16_MAX, &mRequest.details);
+#endif // MTR_ENABLE_PROVISIONAL
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRCommodityPriceClusterGetDetailedPriceRequestParams alloc] init];
+ params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
+#if MTR_ENABLE_PROVISIONAL
+ params.details = [NSNumber numberWithUnsignedShort:mRequest.details.Raw()];
+#endif // MTR_ENABLE_PROVISIONAL
+ uint16_t repeatCount = mRepeatCount.ValueOr(1);
+ uint16_t __block responsesNeeded = repeatCount;
+ while (repeatCount--) {
+ [cluster getDetailedPriceRequestWithParams:params completion:
+ ^(MTRCommodityPriceClusterGetDetailedPriceResponseParams * _Nullable values, NSError * _Nullable error) {
+ NSLog(@"Values: %@", values);
+ if (error == nil) {
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::Id;
+ RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values);
+ }
+ responsesNeeded--;
+ if (error != nil) {
+ mError = error;
+ LogNSError("Error", error);
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceResponse::Id;
+ RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error);
+ }
+ if (responsesNeeded == 0) {
+ SetCommandExitStatus(mError);
+ }
+ }];
+ }
+ return CHIP_NO_ERROR;
+ }
+
+private:
+ chip::app::Clusters::CommodityPrice::Commands::GetDetailedPriceRequest::Type mRequest;
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+/*
+ * Command GetDetailedForecastRequest
+ */
+class CommodityPriceGetDetailedForecastRequest : public ClusterCommand {
+public:
+ CommodityPriceGetDetailedForecastRequest()
+ : ClusterCommand("get-detailed-forecast-request")
+ {
+#if MTR_ENABLE_PROVISIONAL
+ AddArgument("Details", 0, UINT16_MAX, &mRequest.details);
+#endif // MTR_ENABLE_PROVISIONAL
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRCommodityPriceClusterGetDetailedForecastRequestParams alloc] init];
+ params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
+#if MTR_ENABLE_PROVISIONAL
+ params.details = [NSNumber numberWithUnsignedShort:mRequest.details.Raw()];
+#endif // MTR_ENABLE_PROVISIONAL
+ uint16_t repeatCount = mRepeatCount.ValueOr(1);
+ uint16_t __block responsesNeeded = repeatCount;
+ while (repeatCount--) {
+ [cluster getDetailedForecastRequestWithParams:params completion:
+ ^(MTRCommodityPriceClusterGetDetailedForecastResponseParams * _Nullable values, NSError * _Nullable error) {
+ NSLog(@"Values: %@", values);
+ if (error == nil) {
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::Id;
+ RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values);
+ }
+ responsesNeeded--;
+ if (error != nil) {
+ mError = error;
+ LogNSError("Error", error);
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastResponse::Id;
+ RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error);
+ }
+ if (responsesNeeded == 0) {
+ SetCommandExitStatus(mError);
+ }
+ }];
+ }
+ return CHIP_NO_ERROR;
+ }
+
+private:
+ chip::app::Clusters::CommodityPrice::Commands::GetDetailedForecastRequest::Type mRequest;
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute TariffUnit
+ */
+class ReadCommodityPriceTariffUnit : public ReadAttribute {
+public:
+ ReadCommodityPriceTariffUnit()
+ : ReadAttribute("tariff-unit")
+ {
+ }
+
+ ~ReadCommodityPriceTariffUnit()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::TariffUnit::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeTariffUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.TariffUnit response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice TariffUnit read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceTariffUnit : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceTariffUnit()
+ : SubscribeAttribute("tariff-unit")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceTariffUnit()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::TariffUnit::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeTariffUnitWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.TariffUnit response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute Currency
+ */
+class ReadCommodityPriceCurrency : public ReadAttribute {
+public:
+ ReadCommodityPriceCurrency()
+ : ReadAttribute("currency")
+ {
+ }
+
+ ~ReadCommodityPriceCurrency()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::Currency::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCurrencyWithCompletion:^(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.Currency response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice Currency read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceCurrency : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceCurrency()
+ : SubscribeAttribute("currency")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceCurrency()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::Currency::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCurrencyWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRDataTypeCurrencyStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.Currency response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute CurrentPrice
+ */
+class ReadCommodityPriceCurrentPrice : public ReadAttribute {
+public:
+ ReadCommodityPriceCurrentPrice()
+ : ReadAttribute("current-price")
+ {
+ }
+
+ ~ReadCommodityPriceCurrentPrice()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::CurrentPrice::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCurrentPriceWithCompletion:^(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.CurrentPrice response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice CurrentPrice read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceCurrentPrice : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceCurrentPrice()
+ : SubscribeAttribute("current-price")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceCurrentPrice()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::CurrentPrice::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCurrentPriceWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRCommodityPriceClusterCommodityPriceStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.CurrentPrice response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute PriceForecast
+ */
+class ReadCommodityPricePriceForecast : public ReadAttribute {
+public:
+ ReadCommodityPricePriceForecast()
+ : ReadAttribute("price-forecast")
+ {
+ }
+
+ ~ReadCommodityPricePriceForecast()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::PriceForecast::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributePriceForecastWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.PriceForecast response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice PriceForecast read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPricePriceForecast : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPricePriceForecast()
+ : SubscribeAttribute("price-forecast")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPricePriceForecast()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::PriceForecast::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributePriceForecastWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.PriceForecast response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute GeneratedCommandList
+ */
+class ReadCommodityPriceGeneratedCommandList : public ReadAttribute {
+public:
+ ReadCommodityPriceGeneratedCommandList()
+ : ReadAttribute("generated-command-list")
+ {
+ }
+
+ ~ReadCommodityPriceGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice GeneratedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceGeneratedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceGeneratedCommandList()
+ : SubscribeAttribute("generated-command-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeGeneratedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AcceptedCommandList
+ */
+class ReadCommodityPriceAcceptedCommandList : public ReadAttribute {
+public:
+ ReadCommodityPriceAcceptedCommandList()
+ : ReadAttribute("accepted-command-list")
+ {
+ }
+
+ ~ReadCommodityPriceAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice AcceptedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceAcceptedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceAcceptedCommandList()
+ : SubscribeAttribute("accepted-command-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAcceptedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AttributeList
+ */
+class ReadCommodityPriceAttributeList : public ReadAttribute {
+public:
+ ReadCommodityPriceAttributeList()
+ : ReadAttribute("attribute-list")
+ {
+ }
+
+ ~ReadCommodityPriceAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice AttributeList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceAttributeList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceAttributeList()
+ : SubscribeAttribute("attribute-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAttributeListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute FeatureMap
+ */
+class ReadCommodityPriceFeatureMap : public ReadAttribute {
+public:
+ ReadCommodityPriceFeatureMap()
+ : ReadAttribute("feature-map")
+ {
+ }
+
+ ~ReadCommodityPriceFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice FeatureMap read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceFeatureMap : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceFeatureMap()
+ : SubscribeAttribute("feature-map")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeFeatureMapWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute ClusterRevision
+ */
+class ReadCommodityPriceClusterRevision : public ReadAttribute {
+public:
+ ReadCommodityPriceClusterRevision()
+ : ReadAttribute("cluster-revision")
+ {
+ }
+
+ ~ReadCommodityPriceClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityPrice::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityPrice ClusterRevision read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityPriceClusterRevision : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityPriceClusterRevision()
+ : SubscribeAttribute("cluster-revision")
+ {
+ }
+
+ ~SubscribeAttributeCommodityPriceClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityPrice::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityPrice::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityPrice alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeClusterRevisionWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityPrice.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+/*----------------------------------------------------------------------------*\
| Cluster DemandResponseLoadControl | 0x0096 |
|------------------------------------------------------------------------------|
| Commands: | |
@@ -162421,6 +163334,2203 @@
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL
/*----------------------------------------------------------------------------*\
+| Cluster CommodityTariff | 0x0700 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+| * GetTariffComponent | 0x00 |
+| * GetDayEntry | 0x01 |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * TariffInfo | 0x0000 |
+| * TariffUnit | 0x0001 |
+| * StartDate | 0x0002 |
+| * DayEntries | 0x0003 |
+| * DayPatterns | 0x0004 |
+| * CalendarPeriods | 0x0005 |
+| * IndividualDays | 0x0006 |
+| * CurrentDay | 0x0007 |
+| * NextDay | 0x0008 |
+| * CurrentDayEntry | 0x0009 |
+| * CurrentDayEntryDate | 0x000A |
+| * NextDayEntry | 0x000B |
+| * NextDayEntryDate | 0x000C |
+| * TariffComponents | 0x000D |
+| * TariffPeriods | 0x000E |
+| * CurrentTariffComponents | 0x000F |
+| * NextTariffComponents | 0x0010 |
+| * DefaultRandomizationOffset | 0x0011 |
+| * DefaultRandomizationType | 0x0012 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+#if MTR_ENABLE_PROVISIONAL
+/*
+ * Command GetTariffComponent
+ */
+class CommodityTariffGetTariffComponent : public ClusterCommand {
+public:
+ CommodityTariffGetTariffComponent()
+ : ClusterCommand("get-tariff-component")
+ {
+#if MTR_ENABLE_PROVISIONAL
+ AddArgument("TariffComponentID", 0, UINT32_MAX, &mRequest.tariffComponentID);
+#endif // MTR_ENABLE_PROVISIONAL
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRCommodityTariffClusterGetTariffComponentParams alloc] init];
+ params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
+#if MTR_ENABLE_PROVISIONAL
+ params.tariffComponentID = [NSNumber numberWithUnsignedInt:mRequest.tariffComponentID];
+#endif // MTR_ENABLE_PROVISIONAL
+ uint16_t repeatCount = mRepeatCount.ValueOr(1);
+ uint16_t __block responsesNeeded = repeatCount;
+ while (repeatCount--) {
+ [cluster getTariffComponentWithParams:params completion:
+ ^(MTRCommodityTariffClusterGetTariffComponentResponseParams * _Nullable values, NSError * _Nullable error) {
+ NSLog(@"Values: %@", values);
+ if (error == nil) {
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::Id;
+ RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values);
+ }
+ responsesNeeded--;
+ if (error != nil) {
+ mError = error;
+ LogNSError("Error", error);
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityTariff::Commands::GetTariffComponentResponse::Id;
+ RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error);
+ }
+ if (responsesNeeded == 0) {
+ SetCommandExitStatus(mError);
+ }
+ }];
+ }
+ return CHIP_NO_ERROR;
+ }
+
+private:
+ chip::app::Clusters::CommodityTariff::Commands::GetTariffComponent::Type mRequest;
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+/*
+ * Command GetDayEntry
+ */
+class CommodityTariffGetDayEntry : public ClusterCommand {
+public:
+ CommodityTariffGetDayEntry()
+ : ClusterCommand("get-day-entry")
+ {
+#if MTR_ENABLE_PROVISIONAL
+ AddArgument("DayEntryID", 0, UINT32_MAX, &mRequest.dayEntryID);
+#endif // MTR_ENABLE_PROVISIONAL
+ ClusterCommand::AddArguments();
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId commandId = chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRCommodityTariffClusterGetDayEntryParams alloc] init];
+ params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
+#if MTR_ENABLE_PROVISIONAL
+ params.dayEntryID = [NSNumber numberWithUnsignedInt:mRequest.dayEntryID];
+#endif // MTR_ENABLE_PROVISIONAL
+ uint16_t repeatCount = mRepeatCount.ValueOr(1);
+ uint16_t __block responsesNeeded = repeatCount;
+ while (repeatCount--) {
+ [cluster getDayEntryWithParams:params completion:
+ ^(MTRCommodityTariffClusterGetDayEntryResponseParams * _Nullable values, NSError * _Nullable error) {
+ NSLog(@"Values: %@", values);
+ if (error == nil) {
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::Id;
+ RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values);
+ }
+ responsesNeeded--;
+ if (error != nil) {
+ mError = error;
+ LogNSError("Error", error);
+ constexpr chip::CommandId responseId = chip::app::Clusters::CommodityTariff::Commands::GetDayEntryResponse::Id;
+ RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error);
+ }
+ if (responsesNeeded == 0) {
+ SetCommandExitStatus(mError);
+ }
+ }];
+ }
+ return CHIP_NO_ERROR;
+ }
+
+private:
+ chip::app::Clusters::CommodityTariff::Commands::GetDayEntry::Type mRequest;
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute TariffInfo
+ */
+class ReadCommodityTariffTariffInfo : public ReadAttribute {
+public:
+ ReadCommodityTariffTariffInfo()
+ : ReadAttribute("tariff-info")
+ {
+ }
+
+ ~ReadCommodityTariffTariffInfo()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffInfo::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeTariffInfoWithCompletion:^(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffInfo response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff TariffInfo read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffTariffInfo : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffTariffInfo()
+ : SubscribeAttribute("tariff-info")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffTariffInfo()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffInfo::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeTariffInfoWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRCommodityTariffClusterTariffInformationStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffInfo response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute TariffUnit
+ */
+class ReadCommodityTariffTariffUnit : public ReadAttribute {
+public:
+ ReadCommodityTariffTariffUnit()
+ : ReadAttribute("tariff-unit")
+ {
+ }
+
+ ~ReadCommodityTariffTariffUnit()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffUnit::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeTariffUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffUnit response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff TariffUnit read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffTariffUnit : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffTariffUnit()
+ : SubscribeAttribute("tariff-unit")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffTariffUnit()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffUnit::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeTariffUnitWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffUnit response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute StartDate
+ */
+class ReadCommodityTariffStartDate : public ReadAttribute {
+public:
+ ReadCommodityTariffStartDate()
+ : ReadAttribute("start-date")
+ {
+ }
+
+ ~ReadCommodityTariffStartDate()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::StartDate::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeStartDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.StartDate response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff StartDate read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffStartDate : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffStartDate()
+ : SubscribeAttribute("start-date")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffStartDate()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::StartDate::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeStartDateWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.StartDate response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute DayEntries
+ */
+class ReadCommodityTariffDayEntries : public ReadAttribute {
+public:
+ ReadCommodityTariffDayEntries()
+ : ReadAttribute("day-entries")
+ {
+ }
+
+ ~ReadCommodityTariffDayEntries()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DayEntries::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeDayEntriesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DayEntries response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff DayEntries read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffDayEntries : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffDayEntries()
+ : SubscribeAttribute("day-entries")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffDayEntries()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DayEntries::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeDayEntriesWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DayEntries response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute DayPatterns
+ */
+class ReadCommodityTariffDayPatterns : public ReadAttribute {
+public:
+ ReadCommodityTariffDayPatterns()
+ : ReadAttribute("day-patterns")
+ {
+ }
+
+ ~ReadCommodityTariffDayPatterns()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DayPatterns::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeDayPatternsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DayPatterns response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff DayPatterns read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffDayPatterns : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffDayPatterns()
+ : SubscribeAttribute("day-patterns")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffDayPatterns()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DayPatterns::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeDayPatternsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DayPatterns response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute CalendarPeriods
+ */
+class ReadCommodityTariffCalendarPeriods : public ReadAttribute {
+public:
+ ReadCommodityTariffCalendarPeriods()
+ : ReadAttribute("calendar-periods")
+ {
+ }
+
+ ~ReadCommodityTariffCalendarPeriods()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CalendarPeriods::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCalendarPeriodsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CalendarPeriods response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff CalendarPeriods read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffCalendarPeriods : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffCalendarPeriods()
+ : SubscribeAttribute("calendar-periods")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffCalendarPeriods()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CalendarPeriods::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCalendarPeriodsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CalendarPeriods response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute IndividualDays
+ */
+class ReadCommodityTariffIndividualDays : public ReadAttribute {
+public:
+ ReadCommodityTariffIndividualDays()
+ : ReadAttribute("individual-days")
+ {
+ }
+
+ ~ReadCommodityTariffIndividualDays()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::IndividualDays::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeIndividualDaysWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.IndividualDays response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff IndividualDays read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffIndividualDays : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffIndividualDays()
+ : SubscribeAttribute("individual-days")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffIndividualDays()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::IndividualDays::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeIndividualDaysWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.IndividualDays response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute CurrentDay
+ */
+class ReadCommodityTariffCurrentDay : public ReadAttribute {
+public:
+ ReadCommodityTariffCurrentDay()
+ : ReadAttribute("current-day")
+ {
+ }
+
+ ~ReadCommodityTariffCurrentDay()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentDay::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCurrentDayWithCompletion:^(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentDay response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff CurrentDay read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffCurrentDay : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffCurrentDay()
+ : SubscribeAttribute("current-day")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffCurrentDay()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentDay::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCurrentDayWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentDay response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute NextDay
+ */
+class ReadCommodityTariffNextDay : public ReadAttribute {
+public:
+ ReadCommodityTariffNextDay()
+ : ReadAttribute("next-day")
+ {
+ }
+
+ ~ReadCommodityTariffNextDay()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextDay::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeNextDayWithCompletion:^(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextDay response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff NextDay read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffNextDay : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffNextDay()
+ : SubscribeAttribute("next-day")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffNextDay()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextDay::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeNextDayWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRCommodityTariffClusterDayStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextDay response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute CurrentDayEntry
+ */
+class ReadCommodityTariffCurrentDayEntry : public ReadAttribute {
+public:
+ ReadCommodityTariffCurrentDayEntry()
+ : ReadAttribute("current-day-entry")
+ {
+ }
+
+ ~ReadCommodityTariffCurrentDayEntry()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCurrentDayEntryWithCompletion:^(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentDayEntry response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff CurrentDayEntry read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffCurrentDayEntry : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffCurrentDayEntry()
+ : SubscribeAttribute("current-day-entry")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffCurrentDayEntry()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCurrentDayEntryWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentDayEntry response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute CurrentDayEntryDate
+ */
+class ReadCommodityTariffCurrentDayEntryDate : public ReadAttribute {
+public:
+ ReadCommodityTariffCurrentDayEntryDate()
+ : ReadAttribute("current-day-entry-date")
+ {
+ }
+
+ ~ReadCommodityTariffCurrentDayEntryDate()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentDayEntryDate::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCurrentDayEntryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentDayEntryDate response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff CurrentDayEntryDate read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffCurrentDayEntryDate : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffCurrentDayEntryDate()
+ : SubscribeAttribute("current-day-entry-date")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffCurrentDayEntryDate()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentDayEntryDate::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCurrentDayEntryDateWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentDayEntryDate response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute NextDayEntry
+ */
+class ReadCommodityTariffNextDayEntry : public ReadAttribute {
+public:
+ ReadCommodityTariffNextDayEntry()
+ : ReadAttribute("next-day-entry")
+ {
+ }
+
+ ~ReadCommodityTariffNextDayEntry()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeNextDayEntryWithCompletion:^(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextDayEntry response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff NextDayEntry read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffNextDayEntry : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffNextDayEntry()
+ : SubscribeAttribute("next-day-entry")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffNextDayEntry()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextDayEntry::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeNextDayEntryWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRCommodityTariffClusterDayEntryStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextDayEntry response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute NextDayEntryDate
+ */
+class ReadCommodityTariffNextDayEntryDate : public ReadAttribute {
+public:
+ ReadCommodityTariffNextDayEntryDate()
+ : ReadAttribute("next-day-entry-date")
+ {
+ }
+
+ ~ReadCommodityTariffNextDayEntryDate()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextDayEntryDate::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeNextDayEntryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextDayEntryDate response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff NextDayEntryDate read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffNextDayEntryDate : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffNextDayEntryDate()
+ : SubscribeAttribute("next-day-entry-date")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffNextDayEntryDate()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextDayEntryDate::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeNextDayEntryDateWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextDayEntryDate response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute TariffComponents
+ */
+class ReadCommodityTariffTariffComponents : public ReadAttribute {
+public:
+ ReadCommodityTariffTariffComponents()
+ : ReadAttribute("tariff-components")
+ {
+ }
+
+ ~ReadCommodityTariffTariffComponents()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffComponents::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeTariffComponentsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffComponents response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff TariffComponents read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffTariffComponents : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffTariffComponents()
+ : SubscribeAttribute("tariff-components")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffTariffComponents()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffComponents::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeTariffComponentsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffComponents response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute TariffPeriods
+ */
+class ReadCommodityTariffTariffPeriods : public ReadAttribute {
+public:
+ ReadCommodityTariffTariffPeriods()
+ : ReadAttribute("tariff-periods")
+ {
+ }
+
+ ~ReadCommodityTariffTariffPeriods()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffPeriods::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeTariffPeriodsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffPeriods response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff TariffPeriods read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffTariffPeriods : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffTariffPeriods()
+ : SubscribeAttribute("tariff-periods")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffTariffPeriods()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::TariffPeriods::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeTariffPeriodsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.TariffPeriods response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute CurrentTariffComponents
+ */
+class ReadCommodityTariffCurrentTariffComponents : public ReadAttribute {
+public:
+ ReadCommodityTariffCurrentTariffComponents()
+ : ReadAttribute("current-tariff-components")
+ {
+ }
+
+ ~ReadCommodityTariffCurrentTariffComponents()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentTariffComponents::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeCurrentTariffComponentsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentTariffComponents response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff CurrentTariffComponents read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffCurrentTariffComponents : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffCurrentTariffComponents()
+ : SubscribeAttribute("current-tariff-components")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffCurrentTariffComponents()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::CurrentTariffComponents::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeCurrentTariffComponentsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.CurrentTariffComponents response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute NextTariffComponents
+ */
+class ReadCommodityTariffNextTariffComponents : public ReadAttribute {
+public:
+ ReadCommodityTariffNextTariffComponents()
+ : ReadAttribute("next-tariff-components")
+ {
+ }
+
+ ~ReadCommodityTariffNextTariffComponents()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextTariffComponents::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeNextTariffComponentsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextTariffComponents response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff NextTariffComponents read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffNextTariffComponents : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffNextTariffComponents()
+ : SubscribeAttribute("next-tariff-components")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffNextTariffComponents()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::NextTariffComponents::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeNextTariffComponentsWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.NextTariffComponents response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute DefaultRandomizationOffset
+ */
+class ReadCommodityTariffDefaultRandomizationOffset : public ReadAttribute {
+public:
+ ReadCommodityTariffDefaultRandomizationOffset()
+ : ReadAttribute("default-randomization-offset")
+ {
+ }
+
+ ~ReadCommodityTariffDefaultRandomizationOffset()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DefaultRandomizationOffset::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeDefaultRandomizationOffsetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DefaultRandomizationOffset response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff DefaultRandomizationOffset read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffDefaultRandomizationOffset : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffDefaultRandomizationOffset()
+ : SubscribeAttribute("default-randomization-offset")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffDefaultRandomizationOffset()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DefaultRandomizationOffset::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeDefaultRandomizationOffsetWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DefaultRandomizationOffset response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute DefaultRandomizationType
+ */
+class ReadCommodityTariffDefaultRandomizationType : public ReadAttribute {
+public:
+ ReadCommodityTariffDefaultRandomizationType()
+ : ReadAttribute("default-randomization-type")
+ {
+ }
+
+ ~ReadCommodityTariffDefaultRandomizationType()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DefaultRandomizationType::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeDefaultRandomizationTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DefaultRandomizationType response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff DefaultRandomizationType read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffDefaultRandomizationType : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffDefaultRandomizationType()
+ : SubscribeAttribute("default-randomization-type")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffDefaultRandomizationType()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::DefaultRandomizationType::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeDefaultRandomizationTypeWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.DefaultRandomizationType response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute GeneratedCommandList
+ */
+class ReadCommodityTariffGeneratedCommandList : public ReadAttribute {
+public:
+ ReadCommodityTariffGeneratedCommandList()
+ : ReadAttribute("generated-command-list")
+ {
+ }
+
+ ~ReadCommodityTariffGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff GeneratedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffGeneratedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffGeneratedCommandList()
+ : SubscribeAttribute("generated-command-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeGeneratedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AcceptedCommandList
+ */
+class ReadCommodityTariffAcceptedCommandList : public ReadAttribute {
+public:
+ ReadCommodityTariffAcceptedCommandList()
+ : ReadAttribute("accepted-command-list")
+ {
+ }
+
+ ~ReadCommodityTariffAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff AcceptedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffAcceptedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffAcceptedCommandList()
+ : SubscribeAttribute("accepted-command-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAcceptedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AttributeList
+ */
+class ReadCommodityTariffAttributeList : public ReadAttribute {
+public:
+ ReadCommodityTariffAttributeList()
+ : ReadAttribute("attribute-list")
+ {
+ }
+
+ ~ReadCommodityTariffAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff AttributeList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffAttributeList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffAttributeList()
+ : SubscribeAttribute("attribute-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAttributeListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute FeatureMap
+ */
+class ReadCommodityTariffFeatureMap : public ReadAttribute {
+public:
+ ReadCommodityTariffFeatureMap()
+ : ReadAttribute("feature-map")
+ {
+ }
+
+ ~ReadCommodityTariffFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff FeatureMap read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffFeatureMap : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffFeatureMap()
+ : SubscribeAttribute("feature-map")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeFeatureMapWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute ClusterRevision
+ */
+class ReadCommodityTariffClusterRevision : public ReadAttribute {
+public:
+ ReadCommodityTariffClusterRevision()
+ : ReadAttribute("cluster-revision")
+ {
+ }
+
+ ~ReadCommodityTariffClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityTariff::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityTariff ClusterRevision read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityTariffClusterRevision : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityTariffClusterRevision()
+ : SubscribeAttribute("cluster-revision")
+ {
+ }
+
+ ~SubscribeAttributeCommodityTariffClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityTariff::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityTariff::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityTariff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeClusterRevisionWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityTariff.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+/*----------------------------------------------------------------------------*\
| Cluster EcosystemInformation | 0x0750 |
|------------------------------------------------------------------------------|
| Commands: | |
@@ -165843,6 +168953,1578 @@
#endif // MTR_ENABLE_PROVISIONAL
#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+/*----------------------------------------------------------------------------*\
+| Cluster MeterIdentification | 0x0B06 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * MeterType | 0x0000 |
+| * PointOfDelivery | 0x0001 |
+| * MeterSerialNumber | 0x0002 |
+| * ProtocolVersion | 0x0003 |
+| * PowerThreshold | 0x0004 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute MeterType
+ */
+class ReadMeterIdentificationMeterType : public ReadAttribute {
+public:
+ ReadMeterIdentificationMeterType()
+ : ReadAttribute("meter-type")
+ {
+ }
+
+ ~ReadMeterIdentificationMeterType()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::MeterType::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeMeterTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.MeterType response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification MeterType read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationMeterType : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationMeterType()
+ : SubscribeAttribute("meter-type")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationMeterType()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::MeterType::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeMeterTypeWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.MeterType response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute PointOfDelivery
+ */
+class ReadMeterIdentificationPointOfDelivery : public ReadAttribute {
+public:
+ ReadMeterIdentificationPointOfDelivery()
+ : ReadAttribute("point-of-delivery")
+ {
+ }
+
+ ~ReadMeterIdentificationPointOfDelivery()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::PointOfDelivery::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributePointOfDeliveryWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.PointOfDelivery response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification PointOfDelivery read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationPointOfDelivery : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationPointOfDelivery()
+ : SubscribeAttribute("point-of-delivery")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationPointOfDelivery()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::PointOfDelivery::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributePointOfDeliveryWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.PointOfDelivery response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute MeterSerialNumber
+ */
+class ReadMeterIdentificationMeterSerialNumber : public ReadAttribute {
+public:
+ ReadMeterIdentificationMeterSerialNumber()
+ : ReadAttribute("meter-serial-number")
+ {
+ }
+
+ ~ReadMeterIdentificationMeterSerialNumber()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::MeterSerialNumber::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeMeterSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.MeterSerialNumber response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification MeterSerialNumber read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationMeterSerialNumber : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationMeterSerialNumber()
+ : SubscribeAttribute("meter-serial-number")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationMeterSerialNumber()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::MeterSerialNumber::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeMeterSerialNumberWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.MeterSerialNumber response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute ProtocolVersion
+ */
+class ReadMeterIdentificationProtocolVersion : public ReadAttribute {
+public:
+ ReadMeterIdentificationProtocolVersion()
+ : ReadAttribute("protocol-version")
+ {
+ }
+
+ ~ReadMeterIdentificationProtocolVersion()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::ProtocolVersion::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeProtocolVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.ProtocolVersion response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification ProtocolVersion read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationProtocolVersion : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationProtocolVersion()
+ : SubscribeAttribute("protocol-version")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationProtocolVersion()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::ProtocolVersion::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeProtocolVersionWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.ProtocolVersion response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute PowerThreshold
+ */
+class ReadMeterIdentificationPowerThreshold : public ReadAttribute {
+public:
+ ReadMeterIdentificationPowerThreshold()
+ : ReadAttribute("power-threshold")
+ {
+ }
+
+ ~ReadMeterIdentificationPowerThreshold()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::PowerThreshold::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributePowerThresholdWithCompletion:^(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.PowerThreshold response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification PowerThreshold read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationPowerThreshold : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationPowerThreshold()
+ : SubscribeAttribute("power-threshold")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationPowerThreshold()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::PowerThreshold::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributePowerThresholdWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(MTRDataTypePowerThresholdStruct * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.PowerThreshold response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute GeneratedCommandList
+ */
+class ReadMeterIdentificationGeneratedCommandList : public ReadAttribute {
+public:
+ ReadMeterIdentificationGeneratedCommandList()
+ : ReadAttribute("generated-command-list")
+ {
+ }
+
+ ~ReadMeterIdentificationGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification GeneratedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationGeneratedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationGeneratedCommandList()
+ : SubscribeAttribute("generated-command-list")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeGeneratedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AcceptedCommandList
+ */
+class ReadMeterIdentificationAcceptedCommandList : public ReadAttribute {
+public:
+ ReadMeterIdentificationAcceptedCommandList()
+ : ReadAttribute("accepted-command-list")
+ {
+ }
+
+ ~ReadMeterIdentificationAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification AcceptedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationAcceptedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationAcceptedCommandList()
+ : SubscribeAttribute("accepted-command-list")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAcceptedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AttributeList
+ */
+class ReadMeterIdentificationAttributeList : public ReadAttribute {
+public:
+ ReadMeterIdentificationAttributeList()
+ : ReadAttribute("attribute-list")
+ {
+ }
+
+ ~ReadMeterIdentificationAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification AttributeList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationAttributeList : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationAttributeList()
+ : SubscribeAttribute("attribute-list")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAttributeListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute FeatureMap
+ */
+class ReadMeterIdentificationFeatureMap : public ReadAttribute {
+public:
+ ReadMeterIdentificationFeatureMap()
+ : ReadAttribute("feature-map")
+ {
+ }
+
+ ~ReadMeterIdentificationFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification FeatureMap read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationFeatureMap : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationFeatureMap()
+ : SubscribeAttribute("feature-map")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeFeatureMapWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute ClusterRevision
+ */
+class ReadMeterIdentificationClusterRevision : public ReadAttribute {
+public:
+ ReadMeterIdentificationClusterRevision()
+ : ReadAttribute("cluster-revision")
+ {
+ }
+
+ ~ReadMeterIdentificationClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::MeterIdentification::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("MeterIdentification ClusterRevision read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeMeterIdentificationClusterRevision : public SubscribeAttribute {
+public:
+ SubscribeAttributeMeterIdentificationClusterRevision()
+ : SubscribeAttribute("cluster-revision")
+ {
+ }
+
+ ~SubscribeAttributeMeterIdentificationClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::MeterIdentification::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::MeterIdentification::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterMeterIdentification alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeClusterRevisionWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"MeterIdentification.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+/*----------------------------------------------------------------------------*\
+| Cluster CommodityMetering | 0x0B07 |
+|------------------------------------------------------------------------------|
+| Commands: | |
+|------------------------------------------------------------------------------|
+| Attributes: | |
+| * MeteredQuantity | 0x0000 |
+| * MeteredQuantityTimestamp | 0x0001 |
+| * MeasurementType | 0x0002 |
+| * GeneratedCommandList | 0xFFF8 |
+| * AcceptedCommandList | 0xFFF9 |
+| * AttributeList | 0xFFFB |
+| * FeatureMap | 0xFFFC |
+| * ClusterRevision | 0xFFFD |
+|------------------------------------------------------------------------------|
+| Events: | |
+\*----------------------------------------------------------------------------*/
+
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute MeteredQuantity
+ */
+class ReadCommodityMeteringMeteredQuantity : public ReadAttribute {
+public:
+ ReadCommodityMeteringMeteredQuantity()
+ : ReadAttribute("metered-quantity")
+ {
+ }
+
+ ~ReadCommodityMeteringMeteredQuantity()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::MeteredQuantity::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeMeteredQuantityWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.MeteredQuantity response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering MeteredQuantity read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringMeteredQuantity : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringMeteredQuantity()
+ : SubscribeAttribute("metered-quantity")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringMeteredQuantity()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::MeteredQuantity::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeMeteredQuantityWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.MeteredQuantity response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute MeteredQuantityTimestamp
+ */
+class ReadCommodityMeteringMeteredQuantityTimestamp : public ReadAttribute {
+public:
+ ReadCommodityMeteringMeteredQuantityTimestamp()
+ : ReadAttribute("metered-quantity-timestamp")
+ {
+ }
+
+ ~ReadCommodityMeteringMeteredQuantityTimestamp()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::MeteredQuantityTimestamp::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeMeteredQuantityTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.MeteredQuantityTimestamp response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering MeteredQuantityTimestamp read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringMeteredQuantityTimestamp : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringMeteredQuantityTimestamp()
+ : SubscribeAttribute("metered-quantity-timestamp")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringMeteredQuantityTimestamp()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::MeteredQuantityTimestamp::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeMeteredQuantityTimestampWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.MeteredQuantityTimestamp response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute MeasurementType
+ */
+class ReadCommodityMeteringMeasurementType : public ReadAttribute {
+public:
+ ReadCommodityMeteringMeasurementType()
+ : ReadAttribute("measurement-type")
+ {
+ }
+
+ ~ReadCommodityMeteringMeasurementType()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::MeasurementType::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.MeasurementType response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering MeasurementType read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringMeasurementType : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringMeasurementType()
+ : SubscribeAttribute("measurement-type")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringMeasurementType()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::MeasurementType::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeMeasurementTypeWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.MeasurementType response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute GeneratedCommandList
+ */
+class ReadCommodityMeteringGeneratedCommandList : public ReadAttribute {
+public:
+ ReadCommodityMeteringGeneratedCommandList()
+ : ReadAttribute("generated-command-list")
+ {
+ }
+
+ ~ReadCommodityMeteringGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering GeneratedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringGeneratedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringGeneratedCommandList()
+ : SubscribeAttribute("generated-command-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringGeneratedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::GeneratedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeGeneratedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.GeneratedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AcceptedCommandList
+ */
+class ReadCommodityMeteringAcceptedCommandList : public ReadAttribute {
+public:
+ ReadCommodityMeteringAcceptedCommandList()
+ : ReadAttribute("accepted-command-list")
+ {
+ }
+
+ ~ReadCommodityMeteringAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering AcceptedCommandList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringAcceptedCommandList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringAcceptedCommandList()
+ : SubscribeAttribute("accepted-command-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringAcceptedCommandList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::AcceptedCommandList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAcceptedCommandListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.AcceptedCommandList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute AttributeList
+ */
+class ReadCommodityMeteringAttributeList : public ReadAttribute {
+public:
+ ReadCommodityMeteringAttributeList()
+ : ReadAttribute("attribute-list")
+ {
+ }
+
+ ~ReadCommodityMeteringAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering AttributeList read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringAttributeList : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringAttributeList()
+ : SubscribeAttribute("attribute-list")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringAttributeList()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::AttributeList::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeAttributeListWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.AttributeList response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute FeatureMap
+ */
+class ReadCommodityMeteringFeatureMap : public ReadAttribute {
+public:
+ ReadCommodityMeteringFeatureMap()
+ : ReadAttribute("feature-map")
+ {
+ }
+
+ ~ReadCommodityMeteringFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering FeatureMap read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringFeatureMap : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringFeatureMap()
+ : SubscribeAttribute("feature-map")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringFeatureMap()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::FeatureMap::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeFeatureMapWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.FeatureMap response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+
+/*
+ * Attribute ClusterRevision
+ */
+class ReadCommodityMeteringClusterRevision : public ReadAttribute {
+public:
+ ReadCommodityMeteringClusterRevision()
+ : ReadAttribute("cluster-revision")
+ {
+ }
+
+ ~ReadCommodityMeteringClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::AttributeId attributeId = chip::app::Clusters::CommodityMetering::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
+
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ LogNSError("CommodityMetering ClusterRevision read Error", error);
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+ return CHIP_NO_ERROR;
+ }
+};
+
+class SubscribeAttributeCommodityMeteringClusterRevision : public SubscribeAttribute {
+public:
+ SubscribeAttributeCommodityMeteringClusterRevision()
+ : SubscribeAttribute("cluster-revision")
+ {
+ }
+
+ ~SubscribeAttributeCommodityMeteringClusterRevision()
+ {
+ }
+
+ CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
+ {
+ constexpr chip::ClusterId clusterId = chip::app::Clusters::CommodityMetering::Id;
+ constexpr chip::CommandId attributeId = chip::app::Clusters::CommodityMetering::Attributes::ClusterRevision::Id;
+
+ ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
+ dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
+ __auto_type * cluster = [[MTRBaseClusterCommodityMetering alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
+ __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
+ if (mKeepSubscriptions.HasValue()) {
+ params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
+ }
+ if (mFabricFiltered.HasValue()) {
+ params.filterByFabric = mFabricFiltered.Value();
+ }
+ if (mAutoResubscribe.HasValue()) {
+ params.resubscribeAutomatically = mAutoResubscribe.Value();
+ }
+ [cluster subscribeAttributeClusterRevisionWithParams:params
+ subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
+ reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
+ NSLog(@"CommodityMetering.ClusterRevision response %@", [value description]);
+ if (error == nil) {
+ RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
+ } else {
+ RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
+ }
+ SetCommandExitStatus(error);
+ }];
+
+ return CHIP_NO_ERROR;
+ }
+};
+
+#endif // MTR_ENABLE_PROVISIONAL
+#endif // MTR_ENABLE_PROVISIONAL
/*----------------------------------------------------------------------------*\
| Cluster UnitTesting | 0xFFF1FC05 |
|------------------------------------------------------------------------------|
@@ -183243,6 +187925,67 @@
commands.RegisterCluster(clusterName, clusterCommands);
}
+void registerClusterCommodityPrice(Commands & commands)
+{
+#if MTR_ENABLE_PROVISIONAL
+ using namespace chip::app::Clusters::CommodityPrice;
+
+ const char * clusterName = "CommodityPrice";
+
+ commands_list clusterCommands = {
+ make_unique<ClusterCommand>(Id), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<CommodityPriceGetDetailedPriceRequest>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<CommodityPriceGetDetailedForecastRequest>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+ make_unique<ReadAttribute>(Id), //
+ make_unique<WriteAttribute>(Id), //
+ make_unique<SubscribeAttribute>(Id), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceTariffUnit>(), //
+ make_unique<SubscribeAttributeCommodityPriceTariffUnit>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceCurrency>(), //
+ make_unique<SubscribeAttributeCommodityPriceCurrency>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceCurrentPrice>(), //
+ make_unique<SubscribeAttributeCommodityPriceCurrentPrice>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPricePriceForecast>(), //
+ make_unique<SubscribeAttributeCommodityPricePriceForecast>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceGeneratedCommandList>(), //
+ make_unique<SubscribeAttributeCommodityPriceGeneratedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceAcceptedCommandList>(), //
+ make_unique<SubscribeAttributeCommodityPriceAcceptedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceAttributeList>(), //
+ make_unique<SubscribeAttributeCommodityPriceAttributeList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceFeatureMap>(), //
+ make_unique<SubscribeAttributeCommodityPriceFeatureMap>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityPriceClusterRevision>(), //
+ make_unique<SubscribeAttributeCommodityPriceClusterRevision>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+ make_unique<ReadEvent>(Id), //
+ make_unique<SubscribeEvent>(Id), //
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+#endif // MTR_ENABLE_PROVISIONAL
+}
void registerClusterDemandResponseLoadControl(Commands & commands)
{
#if MTR_ENABLE_PROVISIONAL
@@ -186721,6 +191464,125 @@
commands.RegisterCluster(clusterName, clusterCommands);
#endif // MTR_ENABLE_PROVISIONAL
}
+void registerClusterCommodityTariff(Commands & commands)
+{
+#if MTR_ENABLE_PROVISIONAL
+ using namespace chip::app::Clusters::CommodityTariff;
+
+ const char * clusterName = "CommodityTariff";
+
+ commands_list clusterCommands = {
+ make_unique<ClusterCommand>(Id), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<CommodityTariffGetTariffComponent>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<CommodityTariffGetDayEntry>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+ make_unique<ReadAttribute>(Id), //
+ make_unique<WriteAttribute>(Id), //
+ make_unique<SubscribeAttribute>(Id), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffTariffInfo>(), //
+ make_unique<SubscribeAttributeCommodityTariffTariffInfo>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffTariffUnit>(), //
+ make_unique<SubscribeAttributeCommodityTariffTariffUnit>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffStartDate>(), //
+ make_unique<SubscribeAttributeCommodityTariffStartDate>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffDayEntries>(), //
+ make_unique<SubscribeAttributeCommodityTariffDayEntries>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffDayPatterns>(), //
+ make_unique<SubscribeAttributeCommodityTariffDayPatterns>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffCalendarPeriods>(), //
+ make_unique<SubscribeAttributeCommodityTariffCalendarPeriods>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffIndividualDays>(), //
+ make_unique<SubscribeAttributeCommodityTariffIndividualDays>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffCurrentDay>(), //
+ make_unique<SubscribeAttributeCommodityTariffCurrentDay>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffNextDay>(), //
+ make_unique<SubscribeAttributeCommodityTariffNextDay>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffCurrentDayEntry>(), //
+ make_unique<SubscribeAttributeCommodityTariffCurrentDayEntry>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffCurrentDayEntryDate>(), //
+ make_unique<SubscribeAttributeCommodityTariffCurrentDayEntryDate>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffNextDayEntry>(), //
+ make_unique<SubscribeAttributeCommodityTariffNextDayEntry>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffNextDayEntryDate>(), //
+ make_unique<SubscribeAttributeCommodityTariffNextDayEntryDate>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffTariffComponents>(), //
+ make_unique<SubscribeAttributeCommodityTariffTariffComponents>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffTariffPeriods>(), //
+ make_unique<SubscribeAttributeCommodityTariffTariffPeriods>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffCurrentTariffComponents>(), //
+ make_unique<SubscribeAttributeCommodityTariffCurrentTariffComponents>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffNextTariffComponents>(), //
+ make_unique<SubscribeAttributeCommodityTariffNextTariffComponents>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffDefaultRandomizationOffset>(), //
+ make_unique<SubscribeAttributeCommodityTariffDefaultRandomizationOffset>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffDefaultRandomizationType>(), //
+ make_unique<SubscribeAttributeCommodityTariffDefaultRandomizationType>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffGeneratedCommandList>(), //
+ make_unique<SubscribeAttributeCommodityTariffGeneratedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffAcceptedCommandList>(), //
+ make_unique<SubscribeAttributeCommodityTariffAcceptedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffAttributeList>(), //
+ make_unique<SubscribeAttributeCommodityTariffAttributeList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffFeatureMap>(), //
+ make_unique<SubscribeAttributeCommodityTariffFeatureMap>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityTariffClusterRevision>(), //
+ make_unique<SubscribeAttributeCommodityTariffClusterRevision>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+#endif // MTR_ENABLE_PROVISIONAL
+}
void registerClusterEcosystemInformation(Commands & commands)
{
#if MTR_ENABLE_PROVISIONAL
@@ -186931,6 +191793,112 @@
commands.RegisterCluster(clusterName, clusterCommands);
#endif // MTR_ENABLE_PROVISIONAL
}
+void registerClusterMeterIdentification(Commands & commands)
+{
+#if MTR_ENABLE_PROVISIONAL
+ using namespace chip::app::Clusters::MeterIdentification;
+
+ const char * clusterName = "MeterIdentification";
+
+ commands_list clusterCommands = {
+ make_unique<ClusterCommand>(Id), //
+ make_unique<ReadAttribute>(Id), //
+ make_unique<WriteAttribute>(Id), //
+ make_unique<SubscribeAttribute>(Id), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationMeterType>(), //
+ make_unique<SubscribeAttributeMeterIdentificationMeterType>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationPointOfDelivery>(), //
+ make_unique<SubscribeAttributeMeterIdentificationPointOfDelivery>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationMeterSerialNumber>(), //
+ make_unique<SubscribeAttributeMeterIdentificationMeterSerialNumber>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationProtocolVersion>(), //
+ make_unique<SubscribeAttributeMeterIdentificationProtocolVersion>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationPowerThreshold>(), //
+ make_unique<SubscribeAttributeMeterIdentificationPowerThreshold>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationGeneratedCommandList>(), //
+ make_unique<SubscribeAttributeMeterIdentificationGeneratedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationAcceptedCommandList>(), //
+ make_unique<SubscribeAttributeMeterIdentificationAcceptedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationAttributeList>(), //
+ make_unique<SubscribeAttributeMeterIdentificationAttributeList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationFeatureMap>(), //
+ make_unique<SubscribeAttributeMeterIdentificationFeatureMap>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadMeterIdentificationClusterRevision>(), //
+ make_unique<SubscribeAttributeMeterIdentificationClusterRevision>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+#endif // MTR_ENABLE_PROVISIONAL
+}
+void registerClusterCommodityMetering(Commands & commands)
+{
+#if MTR_ENABLE_PROVISIONAL
+ using namespace chip::app::Clusters::CommodityMetering;
+
+ const char * clusterName = "CommodityMetering";
+
+ commands_list clusterCommands = {
+ make_unique<ClusterCommand>(Id), //
+ make_unique<ReadAttribute>(Id), //
+ make_unique<WriteAttribute>(Id), //
+ make_unique<SubscribeAttribute>(Id), //
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringMeteredQuantity>(), //
+ make_unique<SubscribeAttributeCommodityMeteringMeteredQuantity>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringMeteredQuantityTimestamp>(), //
+ make_unique<SubscribeAttributeCommodityMeteringMeteredQuantityTimestamp>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringMeasurementType>(), //
+ make_unique<SubscribeAttributeCommodityMeteringMeasurementType>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringGeneratedCommandList>(), //
+ make_unique<SubscribeAttributeCommodityMeteringGeneratedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringAcceptedCommandList>(), //
+ make_unique<SubscribeAttributeCommodityMeteringAcceptedCommandList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringAttributeList>(), //
+ make_unique<SubscribeAttributeCommodityMeteringAttributeList>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringFeatureMap>(), //
+ make_unique<SubscribeAttributeCommodityMeteringFeatureMap>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+#if MTR_ENABLE_PROVISIONAL
+ make_unique<ReadCommodityMeteringClusterRevision>(), //
+ make_unique<SubscribeAttributeCommodityMeteringClusterRevision>(), //
+#endif // MTR_ENABLE_PROVISIONAL
+ };
+
+ commands.RegisterCluster(clusterName, clusterCommands);
+#endif // MTR_ENABLE_PROVISIONAL
+}
void registerClusterUnitTesting(Commands & commands)
{
using namespace chip::app::Clusters::UnitTesting;
@@ -187410,6 +192378,7 @@
registerClusterElectricalPowerMeasurement(commands);
registerClusterElectricalEnergyMeasurement(commands);
registerClusterWaterHeaterManagement(commands);
+ registerClusterCommodityPrice(commands);
registerClusterDemandResponseLoadControl(commands);
registerClusterMessages(commands);
registerClusterDeviceEnergyManagement(commands);
@@ -187470,10 +192439,13 @@
registerClusterWebRTCTransportRequestor(commands);
registerClusterPushAvStreamTransport(commands);
registerClusterChime(commands);
+ registerClusterCommodityTariff(commands);
registerClusterEcosystemInformation(commands);
registerClusterCommissionerControl(commands);
registerClusterTlsCertificateManagement(commands);
registerClusterTlsClientManagement(commands);
+ registerClusterMeterIdentification(commands);
+ registerClusterCommodityMetering(commands);
registerClusterUnitTesting(commands);
registerClusterSampleMei(commands);
}