diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a9620b617e5938..d14d188a2fb6e4 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -202,10 +202,6 @@ jobs: src/app/zap-templates/zcl/data-model/chip/window-covering.xml \ src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \ - src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml \ - src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml \ - src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \ - src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \ src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \ diff --git a/docs/zap_clusters.md b/docs/zap_clusters.md index 93e37131626379..41679143b5c428 100644 --- a/docs/zap_clusters.md +++ b/docs/zap_clusters.md @@ -15,9 +15,7 @@ Generally regenerate using one of: | 3 | 0x03 | Identify | | 4 | 0x04 | Groups | | 6 | 0x06 | OnOff | -| 7 | 0x07 | OnOffSwitchConfiguration | | 8 | 0x08 | LevelControl | -| 15 | 0x0F | BinaryInputBasic | | 28 | 0x1C | PulseWidthModulation | | 29 | 0x1D | Descriptor | | 30 | 0x1E | Binding | @@ -91,7 +89,6 @@ Generally regenerate using one of: | 159 | 0x9F | DeviceEnergyManagementMode | | 257 | 0x101 | DoorLock | | 258 | 0x102 | WindowCovering | -| 259 | 0x103 | BarrierControl | | 336 | 0x150 | ServiceArea | | 512 | 0x200 | PumpConfigurationAndControl | | 513 | 0x201 | Thermostat | @@ -134,7 +131,6 @@ Generally regenerate using one of: | 1296 | 0x510 | ContentAppObserver | | 1872 | 0x750 | EcosystemInformation | | 1873 | 0x751 | CommissionerControl | -| 2820 | 0xB04 | ElectricalMeasurement | | 4294048773 | 0xFFF1FC05 | UnitTesting | | 4294048774 | 0xFFF1FC06 | FaultInjection | | 4294048800 | 0xFFF1FC20 | SampleMei | diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap index 0ffbbd01e7c139..a869118b57fb33 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap index 023a19864173c0..03d4b9edfb3669 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { 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 1aa3c8007507d3..33a676bc15b1cf 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 @@ -505,20 +505,6 @@ cluster OnOff = 6 { command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } -/** Attributes and commands for configuring On/Off switching devices. */ -deprecated cluster OnOffSwitchConfiguration = 7 { - revision 1; // NOTE: Default/not specifically set - - readonly attribute enum8 switchType = 0; - attribute enum8 switchActions = 16; - 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; -} - /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ cluster LevelControl = 8 { revision 6; @@ -644,27 +630,6 @@ cluster LevelControl = 8 { command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } -/** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -deprecated cluster BinaryInputBasic = 15 { - revision 1; // NOTE: Default/not specifically set - - attribute optional char_string<16> activeText = 4; - attribute optional char_string<16> description = 28; - attribute optional char_string<16> inactiveText = 46; - attribute boolean outOfService = 81; - readonly attribute optional enum8 polarity = 84; - attribute boolean presentValue = 85; - attribute optional enum8 reliability = 103; - readonly attribute bitmap8 statusFlags = 111; - readonly attribute optional int32u applicationType = 256; - 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 Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -5310,48 +5275,6 @@ cluster WindowCovering = 258 { command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } -/** This cluster provides control of a barrier (garage door). */ -deprecated cluster BarrierControl = 259 { - revision 1; // NOTE: Default/not specifically set - - bitmap BarrierControlCapabilities : bitmap8 { - kPartialBarrier = 0x1; - } - - bitmap BarrierControlSafetyStatus : bitmap16 { - kRemoteLockout = 0x1; - kTemperDetected = 0x2; - kFailedCommunication = 0x4; - kPositionFailure = 0x8; - } - - readonly attribute enum8 barrierMovingState = 1; - readonly attribute bitmap16 barrierSafetyStatus = 2; - readonly attribute bitmap8 barrierCapabilities = 3; - attribute optional int16u barrierOpenEvents = 4; - attribute optional int16u barrierCloseEvents = 5; - attribute optional int16u barrierCommandOpenEvents = 6; - attribute optional int16u barrierCommandCloseEvents = 7; - attribute optional int16u barrierOpenPeriod = 8; - attribute optional int16u barrierClosePeriod = 9; - readonly attribute int8u barrierPosition = 10; - 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 BarrierControlGoToPercentRequest { - int8u percentOpen = 0; - } - - /** Command to instruct a barrier to go to a percent open state. */ - command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; - /** Command that instructs the barrier to stop moving. */ - command BarrierControlStop(): DefaultSuccess = 1; -} - /** An interface for configuring and controlling pumps. */ cluster PumpConfigurationAndControl = 512 { revision 3; @@ -7068,173 +6991,6 @@ cluster LowPower = 1288 { command Sleep(): DefaultSuccess = 0; } -/** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -deprecated cluster ElectricalMeasurement = 2820 { - revision 3; - - readonly attribute optional bitmap32 measurementType = 0; - readonly attribute optional int16s dcVoltage = 256; - readonly attribute optional int16s dcVoltageMin = 257; - readonly attribute optional int16s dcVoltageMax = 258; - readonly attribute optional int16s dcCurrent = 259; - readonly attribute optional int16s dcCurrentMin = 260; - readonly attribute optional int16s dcCurrentMax = 261; - readonly attribute optional int16s dcPower = 262; - readonly attribute optional int16s dcPowerMin = 263; - readonly attribute optional int16s dcPowerMax = 264; - readonly attribute optional int16u dcVoltageMultiplier = 512; - readonly attribute optional int16u dcVoltageDivisor = 513; - readonly attribute optional int16u dcCurrentMultiplier = 514; - readonly attribute optional int16u dcCurrentDivisor = 515; - readonly attribute optional int16u dcPowerMultiplier = 516; - readonly attribute optional int16u dcPowerDivisor = 517; - readonly attribute optional int16u acFrequency = 768; - readonly attribute optional int16u acFrequencyMin = 769; - readonly attribute optional int16u acFrequencyMax = 770; - readonly attribute optional int16u neutralCurrent = 771; - readonly attribute optional int32s totalActivePower = 772; - readonly attribute optional int32s totalReactivePower = 773; - readonly attribute optional int32u totalApparentPower = 774; - readonly attribute optional int16s measured1stHarmonicCurrent = 775; - readonly attribute optional int16s measured3rdHarmonicCurrent = 776; - readonly attribute optional int16s measured5thHarmonicCurrent = 777; - readonly attribute optional int16s measured7thHarmonicCurrent = 778; - readonly attribute optional int16s measured9thHarmonicCurrent = 779; - readonly attribute optional int16s measured11thHarmonicCurrent = 780; - readonly attribute optional int16s measuredPhase1stHarmonicCurrent = 781; - readonly attribute optional int16s measuredPhase3rdHarmonicCurrent = 782; - readonly attribute optional int16s measuredPhase5thHarmonicCurrent = 783; - readonly attribute optional int16s measuredPhase7thHarmonicCurrent = 784; - readonly attribute optional int16s measuredPhase9thHarmonicCurrent = 785; - readonly attribute optional int16s measuredPhase11thHarmonicCurrent = 786; - readonly attribute optional int16u acFrequencyMultiplier = 1024; - readonly attribute optional int16u acFrequencyDivisor = 1025; - readonly attribute optional int32u powerMultiplier = 1026; - readonly attribute optional int32u powerDivisor = 1027; - readonly attribute optional int8s harmonicCurrentMultiplier = 1028; - readonly attribute optional int8s phaseHarmonicCurrentMultiplier = 1029; - readonly attribute optional int16s instantaneousVoltage = 1280; - readonly attribute optional int16u instantaneousLineCurrent = 1281; - readonly attribute optional int16s instantaneousActiveCurrent = 1282; - readonly attribute optional int16s instantaneousReactiveCurrent = 1283; - readonly attribute optional int16s instantaneousPower = 1284; - readonly attribute optional int16u rmsVoltage = 1285; - readonly attribute optional int16u rmsVoltageMin = 1286; - readonly attribute optional int16u rmsVoltageMax = 1287; - readonly attribute optional int16u rmsCurrent = 1288; - readonly attribute optional int16u rmsCurrentMin = 1289; - readonly attribute optional int16u rmsCurrentMax = 1290; - readonly attribute optional int16s activePower = 1291; - readonly attribute optional int16s activePowerMin = 1292; - readonly attribute optional int16s activePowerMax = 1293; - readonly attribute optional int16s reactivePower = 1294; - readonly attribute optional int16u apparentPower = 1295; - readonly attribute optional int8s powerFactor = 1296; - attribute optional int16u averageRmsVoltageMeasurementPeriod = 1297; - attribute optional int16u averageRmsUnderVoltageCounter = 1299; - attribute optional int16u rmsExtremeOverVoltagePeriod = 1300; - attribute optional int16u rmsExtremeUnderVoltagePeriod = 1301; - attribute optional int16u rmsVoltageSagPeriod = 1302; - attribute optional int16u rmsVoltageSwellPeriod = 1303; - readonly attribute optional int16u acVoltageMultiplier = 1536; - readonly attribute optional int16u acVoltageDivisor = 1537; - readonly attribute optional int16u acCurrentMultiplier = 1538; - readonly attribute optional int16u acCurrentDivisor = 1539; - readonly attribute optional int16u acPowerMultiplier = 1540; - readonly attribute optional int16u acPowerDivisor = 1541; - attribute optional bitmap8 overloadAlarmsMask = 1792; - readonly attribute optional int16s voltageOverload = 1793; - readonly attribute optional int16s currentOverload = 1794; - attribute optional bitmap16 acOverloadAlarmsMask = 2048; - readonly attribute optional int16s acVoltageOverload = 2049; - readonly attribute optional int16s acCurrentOverload = 2050; - readonly attribute optional int16s acActivePowerOverload = 2051; - readonly attribute optional int16s acReactivePowerOverload = 2052; - readonly attribute optional int16s averageRmsOverVoltage = 2053; - readonly attribute optional int16s averageRmsUnderVoltage = 2054; - readonly attribute optional int16s rmsExtremeOverVoltage = 2055; - readonly attribute optional int16s rmsExtremeUnderVoltage = 2056; - readonly attribute optional int16s rmsVoltageSag = 2057; - readonly attribute optional int16s rmsVoltageSwell = 2058; - readonly attribute optional int16u lineCurrentPhaseB = 2305; - readonly attribute optional int16s activeCurrentPhaseB = 2306; - readonly attribute optional int16s reactiveCurrentPhaseB = 2307; - readonly attribute optional int16u rmsVoltagePhaseB = 2309; - readonly attribute optional int16u rmsVoltageMinPhaseB = 2310; - readonly attribute optional int16u rmsVoltageMaxPhaseB = 2311; - readonly attribute optional int16u rmsCurrentPhaseB = 2312; - readonly attribute optional int16u rmsCurrentMinPhaseB = 2313; - readonly attribute optional int16u rmsCurrentMaxPhaseB = 2314; - readonly attribute optional int16s activePowerPhaseB = 2315; - readonly attribute optional int16s activePowerMinPhaseB = 2316; - readonly attribute optional int16s activePowerMaxPhaseB = 2317; - readonly attribute optional int16s reactivePowerPhaseB = 2318; - readonly attribute optional int16u apparentPowerPhaseB = 2319; - readonly attribute optional int8s powerFactorPhaseB = 2320; - readonly attribute optional int16u averageRmsVoltageMeasurementPeriodPhaseB = 2321; - readonly attribute optional int16u averageRmsOverVoltageCounterPhaseB = 2322; - readonly attribute optional int16u averageRmsUnderVoltageCounterPhaseB = 2323; - readonly attribute optional int16u rmsExtremeOverVoltagePeriodPhaseB = 2324; - readonly attribute optional int16u rmsExtremeUnderVoltagePeriodPhaseB = 2325; - readonly attribute optional int16u rmsVoltageSagPeriodPhaseB = 2326; - readonly attribute optional int16u rmsVoltageSwellPeriodPhaseB = 2327; - readonly attribute optional int16u lineCurrentPhaseC = 2561; - readonly attribute optional int16s activeCurrentPhaseC = 2562; - readonly attribute optional int16s reactiveCurrentPhaseC = 2563; - readonly attribute optional int16u rmsVoltagePhaseC = 2565; - readonly attribute optional int16u rmsVoltageMinPhaseC = 2566; - readonly attribute optional int16u rmsVoltageMaxPhaseC = 2567; - readonly attribute optional int16u rmsCurrentPhaseC = 2568; - readonly attribute optional int16u rmsCurrentMinPhaseC = 2569; - readonly attribute optional int16u rmsCurrentMaxPhaseC = 2570; - readonly attribute optional int16s activePowerPhaseC = 2571; - readonly attribute optional int16s activePowerMinPhaseC = 2572; - readonly attribute optional int16s activePowerMaxPhaseC = 2573; - readonly attribute optional int16s reactivePowerPhaseC = 2574; - readonly attribute optional int16u apparentPowerPhaseC = 2575; - readonly attribute optional int8s powerFactorPhaseC = 2576; - readonly attribute optional int16u averageRmsVoltageMeasurementPeriodPhaseC = 2577; - readonly attribute optional int16u averageRmsOverVoltageCounterPhaseC = 2578; - readonly attribute optional int16u averageRmsUnderVoltageCounterPhaseC = 2579; - readonly attribute optional int16u rmsExtremeOverVoltagePeriodPhaseC = 2580; - readonly attribute optional int16u rmsExtremeUnderVoltagePeriodPhaseC = 2581; - readonly attribute optional int16u rmsVoltageSagPeriodPhaseC = 2582; - readonly attribute optional int16u rmsVoltageSwellPeriodPhaseC = 2583; - 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; - - response struct GetProfileInfoResponseCommand = 0 { - int8u profileCount = 0; - enum8 profileIntervalPeriod = 1; - int8u maxNumberOfIntervals = 2; - int16u listOfAttributes[] = 3; - } - - response struct GetMeasurementProfileResponseCommand = 1 { - int32u startTime = 0; - enum8 status = 1; - enum8 profileIntervalPeriod = 2; - int8u numberOfIntervalsDelivered = 3; - int16u attributeId = 4; - int8u intervals[] = 5; - } - - request struct GetMeasurementProfileCommandRequest { - int16u attributeId = 0; - int32u startTime = 1; - enum8 numberOfIntervals = 2; - } - - /** A function which retrieves the power profiling information from the electrical measurement server. */ - command GetProfileInfoCommand(): DefaultSuccess = 0; - /** A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. */ - command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1; -} - /** The Test Cluster is meant to validate the generated code */ internal cluster UnitTesting = 4294048773 { revision 1; // NOTE: Default/not specifically set @@ -8355,13 +8111,6 @@ endpoint 1 { handle command OnWithTimedOff; } - server cluster OnOffSwitchConfiguration { - ram attribute switchType; - ram attribute switchActions default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster LevelControl { persist attribute currentLevel default = 0xFE; ram attribute remainingTime default = 0x0000; @@ -8390,14 +8139,6 @@ endpoint 1 { handle command StopWithOnOff; } - server cluster BinaryInputBasic { - ram attribute outOfService default = 0x00; - ram attribute presentValue; - ram attribute statusFlags default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; @@ -9108,18 +8849,6 @@ endpoint 1 { handle command GoToTiltPercentage; } - server cluster BarrierControl { - ram attribute barrierMovingState; - ram attribute barrierSafetyStatus; - ram attribute barrierCapabilities; - ram attribute barrierPosition; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - - handle command BarrierControlGoToPercent; - handle command BarrierControlStop; - } - server cluster PumpConfigurationAndControl { ram attribute maxPressure; ram attribute maxSpeed; @@ -9573,22 +9302,6 @@ endpoint 1 { handle command Sleep; } - server cluster ElectricalMeasurement { - ram attribute measurementType default = 0x000000; - ram attribute totalActivePower default = 0x000000; - ram attribute rmsVoltage default = 0xffff; - ram attribute rmsVoltageMin default = 0x8000; - ram attribute rmsVoltageMax default = 0x8000; - ram attribute rmsCurrent default = 0xffff; - ram attribute rmsCurrentMin default = 0xffff; - ram attribute rmsCurrentMax default = 0xffff; - ram attribute activePower default = 0xffff; - ram attribute activePowerMin default = 0xffff; - ram attribute activePowerMax default = 0xffff; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 3; - } - server cluster UnitTesting { emits event TestEvent; emits event TestFabricScopedEvent; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 94747c1fbf40c8..f8e3dbd8806c3f 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -1176,24 +1176,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -6540,40 +6522,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -6812,81 +6760,6 @@ } ] }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "switch type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "switch actions", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Level Control", "code": 8, @@ -7219,97 +7092,6 @@ } ] }, - { - "name": "Binary Input (Basic)", - "code": 15, - "mfgCode": null, - "define": "BINARY_INPUT_BASIC_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "out of service", - "code": 81, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "present value", - "code": 85, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "status flags", - "code": 111, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, @@ -15751,131 +15533,6 @@ } ] }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "commands": [ - { - "name": "BarrierControlGoToPercent", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "BarrierControlStop", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "barrier moving state", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier safety status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier capabilities", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier position", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Pump Configuration and Control", "code": 512, @@ -21949,225 +21606,6 @@ } ] }, - { - "name": "Electrical Measurement", - "code": 2820, - "mfgCode": null, - "define": "ELECTRICAL_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "measurement type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "total active power", - "code": 772, - "mfgCode": null, - "side": "server", - "type": "int32s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms voltage", - "code": 1285, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms voltage min", - "code": 1286, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms voltage max", - "code": 1287, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms current", - "code": 1288, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms current min", - "code": 1289, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms current max", - "code": 1290, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "active power", - "code": 1291, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "active power min", - "code": 1292, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "active power max", - "code": 1293, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 66448c121f22db..31292543ca5f50 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -60,7 +60,6 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/barrier-control-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/window-covering-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 249b28707df21b..82b1b2440303b7 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -1027,24 +1027,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index 06916c32c6670d..f82f301e3ae362 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -1,128 +1,127 @@ # -# Copyright (c) 2021 Project CHIP Authors -# All rights reserved. +# Copyright (c) 2021 Project CHIP Authors +# All rights reserved. # -# 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 +# 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 +# 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. +# 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. # # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) # The list of src and include dirs must be in sync with that in all-clusters-minimal-app/esp32/main/component.mk set(PRIV_INCLUDE_DIRS_LIST - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/common/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/include" - "${CMAKE_CURRENT_LIST_DIR}/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/common/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/include" + "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" ) set(SRC_DIRS_LIST - "${CMAKE_CURRENT_LIST_DIR}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-basic-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/test-cluster-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fan-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/account-login-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-launcher-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/audio-output-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/barrier-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/window-covering-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/color-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/content-launch-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-input-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-select-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/low-power-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/keypad-input-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/temperature-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-user-interface-configuration-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/channel-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/smoke-co-alarm-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wake-on-lan-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/resource-monitoring-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src" + "${CMAKE_CURRENT_LIST_DIR}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-basic-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/test-cluster-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fan-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/account-login-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-launcher-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/audio-output-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/window-covering-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/color-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/content-launch-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-input-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-select-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/low-power-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/keypad-input-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/temperature-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thermostat-user-interface-configuration-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/channel-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/smoke-co-alarm-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wake-on-lan-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/pump-configuration-and-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/resource-monitoring-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/src" ) -if (CONFIG_ENABLE_PW_RPC) -# Append additional directories for RPC build -set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" -) +if(CONFIG_ENABLE_PW_RPC) + # Append additional directories for RPC build + set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" + ) -if (${IDF_VERSION_MAJOR} LESS 5) + if(${IDF_VERSION_MAJOR} LESS 5) list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") -else() + else() list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") -endif() + endif() -set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" -) -endif (CONFIG_ENABLE_PW_RPC) + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" + ) +endif(CONFIG_ENABLE_PW_RPC) idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST} - SRC_DIRS ${SRC_DIRS_LIST}) + SRC_DIRS ${SRC_DIRS_LIST}) get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) @@ -134,134 +133,132 @@ chip_app_component_zapgen("${CHIP_ROOT}/examples/all-clusters-minimal-app/all-cl set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") target_compile_options(${COMPONENT_LIB} PUBLIC - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" ) -if (CONFIG_ENABLE_PW_RPC) +if(CONFIG_ENABLE_PW_RPC) + set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") + include(${PIGWEED_ROOT}/pw_build/pigweed.cmake) + include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) + set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) -set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") -include(${PIGWEED_ROOT}/pw_build/pigweed.cmake) -include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) -set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) - -pw_proto_library(attributes_service - SOURCES + pw_proto_library(attributes_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.proto - INPUTS + INPUTS ${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.options - PREFIX + PREFIX attributes_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(button_service - SOURCES + pw_proto_library(button_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/button_service.proto - PREFIX + PREFIX button_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(descriptor_service - SOURCES + pw_proto_library(descriptor_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/descriptor_service.proto - PREFIX + PREFIX descriptor_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(device_service - SOURCES + pw_proto_library(device_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.proto - INPUTS + INPUTS ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.options - PREFIX + PREFIX device_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(lighting_service - SOURCES + pw_proto_library(lighting_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/lighting_service.proto - PREFIX + PREFIX lighting_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(locking_service - SOURCES + pw_proto_library(locking_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/locking_service.proto - PREFIX + PREFIX locking_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(wifi_service - SOURCES + pw_proto_library(wifi_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.proto - INPUTS + INPUTS ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.options - PREFIX + PREFIX wifi_service - DEPS + DEPS pw_protobuf.common_proto - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos -) + ) -target_link_libraries(${COMPONENT_LIB} PUBLIC - attributes_service.nanopb_rpc - button_service.nanopb_rpc - descriptor_service.nanopb_rpc - device_service.nanopb_rpc - lighting_service.nanopb_rpc - locking_service.nanopb_rpc - wifi_service.nanopb_rpc - pw_checksum - pw_hdlc - pw_log - pw_rpc.server - pw_sys_io - pw_trace - pw_trace_tokenized - pw_trace_tokenized.trace_buffer - pw_trace_tokenized.rpc_service - pw_trace_tokenized.protos.nanopb_rpc -) + target_link_libraries(${COMPONENT_LIB} PUBLIC + attributes_service.nanopb_rpc + button_service.nanopb_rpc + descriptor_service.nanopb_rpc + device_service.nanopb_rpc + lighting_service.nanopb_rpc + locking_service.nanopb_rpc + wifi_service.nanopb_rpc + pw_checksum + pw_hdlc + pw_log + pw_rpc.server + pw_sys_io + pw_trace + pw_trace_tokenized + pw_trace_tokenized.trace_buffer + pw_trace_tokenized.rpc_service + pw_trace_tokenized.protos.nanopb_rpc + ) -target_link_options(${COMPONENT_LIB} - PUBLIC + target_link_options(${COMPONENT_LIB} + PUBLIC "-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld" "-L${PIGWEED_ROOT}/pw_tokenizer" -) - -target_compile_options(${COMPONENT_LIB} PRIVATE - "-DPW_RPC_ATTRIBUTE_SERVICE=1" - "-DPW_RPC_BUTTON_SERVICE=1" - "-DPW_RPC_DESCRIPTOR_SERVICE=1" - "-DPW_RPC_DEVICE_SERVICE=1" - "-DPW_RPC_LIGHTING_SERVICE=1" - "-DPW_RPC_LOCKING_SERVICE=1" - "-DPW_RPC_TRACING_SERVICE=1" - "-DPW_RPC_WIFI_SERVICE=1" - "-DPW_TRACE_BACKEND_SET=1") + ) -endif (CONFIG_ENABLE_PW_RPC) + target_compile_options(${COMPONENT_LIB} PRIVATE + "-DPW_RPC_ATTRIBUTE_SERVICE=1" + "-DPW_RPC_BUTTON_SERVICE=1" + "-DPW_RPC_DESCRIPTOR_SERVICE=1" + "-DPW_RPC_DEVICE_SERVICE=1" + "-DPW_RPC_LIGHTING_SERVICE=1" + "-DPW_RPC_LOCKING_SERVICE=1" + "-DPW_RPC_TRACING_SERVICE=1" + "-DPW_RPC_WIFI_SERVICE=1" + "-DPW_TRACE_BACKEND_SET=1") +endif(CONFIG_ENABLE_PW_RPC) diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 1b6b16be94d51a..5b820fd57c83cc 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -221,41 +221,7 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Access Control", @@ -4757,41 +4723,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Actions", diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 1636d8aab6b119..5f2e2bd0eb4859 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4568,41 +4550,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Occupancy Sensing", @@ -4610,41 +4558,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap index 78aa987f1d8fa6..da6333deeef08f 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap index 7154d9edf4c91f..7e58d312609fc7 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 43d2e0e15b5146..0bb3ed63d078d9 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index 6aa6a2502fb4b4..24f3246bce52e8 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap index 2c65da229ebbe4..76b4309c6cf250 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index 78408b145c9317..5b66f7b9718212 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2825,41 +2807,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Power Source", diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index fc6b2773a67e86..0651533b3cdb2f 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -802,24 +802,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3305,41 +3287,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Occupancy Sensing", @@ -3347,41 +3295,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap index 09dfe991518468..fc429171835ec5 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3385,41 +3367,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Scenes Management", @@ -3672,41 +3620,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index a08fcd9f2f02b7..85fd040970f9c1 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index 5cfcfdfa3a27a8..a4f09cc013f125 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3273,25 +3255,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Color Control", diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 2ee1ba966b139a..1f976f24c67632 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 3974dabbc27d78..b1a23b03ad6d3d 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2467,41 +2449,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -2663,41 +2611,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Flow Measurement", diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 483f04f74af7e0..912729e0646dc2 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3177,41 +3159,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thermostat", @@ -3219,41 +3167,7 @@ "mfgCode": null, "define": "THERMOSTAT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Fan Control", diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 11d5fb7f1dee99..f62c601c05aecf 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2467,41 +2449,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -2663,41 +2611,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Relative Humidity Measurement", diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index 459c52fe5a2570..833cca12b97c4b 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2467,25 +2449,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -2647,25 +2611,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Illuminance Measurement", diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index e6b4dcef3ed3ae..05d6200c7917d0 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2467,41 +2449,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -2663,41 +2611,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Occupancy Sensing", diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index 53e30c1ed298cd..d696db7a086855 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3273,25 +3255,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.zap b/examples/chef/devices/rootnode_onofflight_samplemei.zap index 30dca3d1e54ebf..480eb4a073f849 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.zap +++ b/examples/chef/devices/rootnode_onofflight_samplemei.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3273,25 +3255,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Sample MEI", diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index de332faefc57ea..a4823ec9c13bd7 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2681,24 +2663,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2861,25 +2825,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 99f826d194b05a..4242c860e86e00 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3005,41 +2987,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 21c60d8cef2350..3131dca9c5d00d 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2525,25 +2507,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -2705,25 +2669,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Pressure Measurement", diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index 61325839e9d157..509ebc9db82193 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2989,41 +2971,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 2c20622caa4824..0395fbd3633f57 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2467,41 +2449,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -2663,41 +2611,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Temperature Measurement", diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index c30fe33f9e465c..f1a0ae9c7c03ed 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2973,41 +2955,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thermostat", @@ -3547,41 +3495,7 @@ "mfgCode": null, "define": "FAN_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "f", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thermostat User Interface Configuration", @@ -3711,41 +3625,7 @@ "mfgCode": null, "define": "TEMPERATURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Relative Humidity Measurement", @@ -3753,41 +3633,7 @@ "mfgCode": null, "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Occupancy Sensing", @@ -3795,41 +3641,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index 043e0a30a7c335..930d7bfc1b1e0b 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2809,25 +2791,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Window Covering", diff --git a/examples/chef/sample_app_util/zap_file_parser.py b/examples/chef/sample_app_util/zap_file_parser.py index 99881ba57c4d76..0176b1f1f39d5b 100644 --- a/examples/chef/sample_app_util/zap_file_parser.py +++ b/examples/chef/sample_app_util/zap_file_parser.py @@ -145,8 +145,8 @@ def _convert_metadata_to_hashable_digest(metadata_input: Sequence[Dict[str, Endp cluster_obj = endpoint_obj[cluster_type][cluster_id] # Replace attribute names - attribute_obj = cluster_obj["attributes"] - attribute_keys = list(cluster_obj["attributes"]) + attribute_obj = cluster_obj.get("attributes", []) + attribute_keys = list(attribute_obj) for attribute_key in attribute_keys: attribute_id = _get_id(attribute_key) attribute_obj[attribute_id] = attribute_obj.pop( @@ -252,7 +252,8 @@ def generate_metadata( else: cluster_obj: ClusterType = {"attributes": {}} - for attribute in cluster["attributes"]: + attributes = cluster.get("attributes", []) + for attribute in attributes: attribute_allowed = ( attribute_allow_list is None or str(attribute["code"]) in attribute_allow_list) if attribute["included"] and attribute_allowed: @@ -311,7 +312,7 @@ def generate_name(zap_file_path: str) -> str: zap_file_path: Path to the zap file to parse for generating the metadata file. Returns: - Name of the file generated by following convention. + Name of the file generated by following the convention. """ parsed = generate_metadata(zap_file_path) names = [] diff --git a/examples/chip-tool/README.md b/examples/chip-tool/README.md index b22b5276c8c7b6..f702e202ac6e86 100644 --- a/examples/chip-tool/README.md +++ b/examples/chip-tool/README.md @@ -253,12 +253,10 @@ Usage: +-------------------------------------------------------------------------------------+ | Clusters: | +-------------------------------------------------------------------------------------+ - | * barriercontrol | | * basic | | * colorcontrol | | * doorlock | | * groups | - | * iaszone | | * identify | | * levelcontrol | | * onoff | @@ -344,12 +342,10 @@ chip-tool payload parse-additional-data-payload "#####" ## Command List -- [barriercontrol](#barriercontrol) - [basic](#basic) - [colorcontrol](#colorcontrol) - [doorlock](#doorlock) - [groups](#groups) -- [iaszone](#iaszone) - [identify](#identify) - [levelcontrol](#levelcontrol) - [onoff](#onoff) @@ -360,22 +356,6 @@ chip-tool payload parse-additional-data-payload "#####" ## Command Details -### barriercontrol - -```bash -Usage: - ./chip-tool barriercontrol command_name [param1 param2 ...] - - +-------------------------------------------------------------------------------------+ - | Commands: | - +-------------------------------------------------------------------------------------+ - | * barrier-control-go-to-percent | - | * barrier-control-stop | - | * discover | - | * read | - +-------------------------------------------------------------------------------------+ -``` - ### basic ```bash @@ -478,21 +458,6 @@ Usage: +-------------------------------------------------------------------------------------+ ``` -### iaszone - -```bash -Usage: - ./chip-tool iaszone command_name [param1 param2 ...] - - +-------------------------------------------------------------------------------------+ - | Commands: | - +-------------------------------------------------------------------------------------+ - | * discover | - | * read | - | * write | - +-------------------------------------------------------------------------------------+ -``` - ### identify ```bash diff --git a/examples/common/pigweed/protos/attributes_service.proto b/examples/common/pigweed/protos/attributes_service.proto index 0256e6e0434690..927f10a8aa2fc6 100644 --- a/examples/common/pigweed/protos/attributes_service.proto +++ b/examples/common/pigweed/protos/attributes_service.proto @@ -76,13 +76,10 @@ enum ClusterType { ZCL_DEVICE_TEMP_CLUSTER_ID = 0x0002; ZCL_IDENTIFY_CLUSTER_ID = 0x0003; ZCL_GROUPS_CLUSTER_ID = 0x0004; - ZCL_SCENES_CLUSTER_ID = 0x0005; ZCL_ON_OFF_CLUSTER_ID = 0x0006; - ZCL_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_ID = 0x0007; ZCL_LEVEL_CONTROL_CLUSTER_ID = 0x0008; ZCL_ALARM_CLUSTER_ID = 0x0009; ZCL_TIME_CLUSTER_ID = 0x000A; - ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 0x000F; ZCL_POWER_PROFILE_CLUSTER_ID = 0x001A; ZCL_APPLIANCE_CONTROL_CLUSTER_ID = 0x001B; ZCL_DESCRIPTOR_CLUSTER_ID = 0x001D; @@ -126,7 +123,6 @@ enum ClusterType { ZCL_SHADE_CONFIG_CLUSTER_ID = 0x0100; ZCL_DOOR_LOCK_CLUSTER_ID = 0x0101; ZCL_WINDOW_COVERING_CLUSTER_ID = 0x0102; - ZCL_BARRIER_CONTROL_CLUSTER_ID = 0x0103; ZCL_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_ID = 0x0200; ZCL_THERMOSTAT_CLUSTER_ID = 0x0201; ZCL_FAN_CONTROL_CLUSTER_ID = 0x0202; @@ -176,8 +172,6 @@ enum ClusterType { ZCL_PM10_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042D; ZCL_TOTAL_VOLATILE_ORGANIC_COMPOUNDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042E; ZCL_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 0x042F; - ZCL_IAS_ACE_CLUSTER_ID = 0x0501; - ZCL_IAS_WD_CLUSTER_ID = 0x0502; ZCL_WAKE_ON_LAN_CLUSTER_ID = 0x0503; ZCL_CHANNEL_CLUSTER_ID = 0x0504; ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 0x0505; @@ -197,9 +191,6 @@ enum ClusterType { ZCL_METER_IDENTIFICATION_CLUSTER_ID = 0x0B01; ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID = 0x0B02; ZCL_APPLIANCE_STATISTICS_CLUSTER_ID = 0x0B03; - ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 0x0B04; - ZCL_BINDING_CLUSTER_ID = 0xF000; - ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID = 0xF004; ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID = 0xFC00; // NOTE: This is a large number that becomes negative as a 32-bit integer. diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index 2006f483e969f6..1aac3415237235 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -910,24 +910,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap index 25d003c55eb798..31c3577edca1a3 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.zap @@ -786,24 +786,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.zap b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.zap index ae00575abd3592..56717f4edfefcc 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.zap +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.zap @@ -786,24 +786,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/darwin-framework-tool/README.md b/examples/darwin-framework-tool/README.md index 4b8b2d29ac7658..2d7a11b47b874b 100644 --- a/examples/darwin-framework-tool/README.md +++ b/examples/darwin-framework-tool/README.md @@ -83,7 +83,6 @@ Usage: | * colorcontrol | | * doorlock | | * groups | - | * iaszone | | * identify | | * levelcontrol | | * onoff | diff --git a/examples/energy-management-app/esp32/main/CMakeLists.txt b/examples/energy-management-app/esp32/main/CMakeLists.txt index 56940fb5baa0a5..e5459616238d3d 100644 --- a/examples/energy-management-app/esp32/main/CMakeLists.txt +++ b/examples/energy-management-app/esp32/main/CMakeLists.txt @@ -1,112 +1,110 @@ # -# Copyright (c) 2021-2023 Project CHIP Authors -# All rights reserved. +# Copyright (c) 2021-2023 Project CHIP Authors +# All rights reserved. # -# 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 +# 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 +# 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. +# 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. # # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) set(PRIV_INCLUDE_DIRS_LIST - "${APP_GEN_DIR}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/common/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/water-heater/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/esp32/main/include" - "${CMAKE_CURRENT_LIST_DIR}/include" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${APP_GEN_DIR}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/common/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/water-heater/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/esp32/main/include" + "${CMAKE_CURRENT_LIST_DIR}/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" ) set(SRC_DIRS_LIST - "${CMAKE_CURRENT_LIST_DIR}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/common/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/water-heater/src" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/time" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/barrier-control-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-topology-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-base-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/electrical-energy-measurement-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/electrical-power-measurement-server" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/water-heater-management-server" + "${CMAKE_CURRENT_LIST_DIR}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/common/src" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/src" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/src" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/src" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/water-heater/src" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/time" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/fixed-label-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-commissioning-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/time-format-localization-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/network-commissioning" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/operational-credentials-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-source-configuration-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/power-topology-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/switch-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/user-label-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/wifi-network-diagnostics-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-requestor" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/groups-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/mode-base-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/electrical-energy-measurement-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/electrical-power-measurement-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/water-heater-management-server" ) - -if (CONFIG_ENABLE_PW_RPC) -# Append additional directories for RPC build -set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" -) - -if (${IDF_VERSION_MAJOR} LESS 5) +if(CONFIG_ENABLE_PW_RPC) + # Append additional directories for RPC build + set(PRIV_INCLUDE_DIRS_LIST "${PRIV_INCLUDE_DIRS_LIST}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/pw_sys_io/public" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support" + ) + + if(${IDF_VERSION_MAJOR} LESS 5) list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/include/freertos") -else() + else() list(APPEND PRIV_INCLUDE_DIRS_LIST "${IDF_PATH}/components/freertos/FreeRTOS-Kernel/include/freertos") -endif() + endif() -set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" - "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" -) -endif (CONFIG_ENABLE_PW_RPC) + set(SRC_DIRS_LIST "${SRC_DIRS_LIST}" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32" + ) +endif(CONFIG_ENABLE_PW_RPC) idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST} - SRC_DIRS ${SRC_DIRS_LIST}) + SRC_DIRS ${SRC_DIRS_LIST}) get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake") @@ -114,143 +112,141 @@ include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake") chip_app_component_codegen("${CHIP_ROOT}/examples/energy-management-app/energy-management-common/energy-management-app.matter") chip_app_component_zapgen("${CHIP_ROOT}/examples/energy-management-app/energy-management-common/energy-management-app.zap") -if (CONFIG_ENABLE_ESP_INSIGHTS_TRACE) - target_add_binary_data(${COMPONENT_TARGET} "insights_auth_key.txt" TEXT) +if(CONFIG_ENABLE_ESP_INSIGHTS_TRACE) + target_add_binary_data(${COMPONENT_TARGET} "insights_auth_key.txt" TEXT) endif() set_property(TARGET ${COMPONENT_LIB} PROPERTY CXX_STANDARD 17) target_compile_options(${COMPONENT_LIB} PRIVATE "-DCHIP_HAVE_CONFIG_H") target_compile_options(${COMPONENT_LIB} PUBLIC - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" ) -if (CONFIG_ENABLE_PW_RPC) +if(CONFIG_ENABLE_PW_RPC) + get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) -get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH) - -set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") -include(${PIGWEED_ROOT}/pw_build/pigweed.cmake) -include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) -set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) + set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") + include(${PIGWEED_ROOT}/pw_build/pigweed.cmake) + include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake) + set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE) -pw_proto_library(attributes_service - SOURCES + pw_proto_library(attributes_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.proto - INPUTS + INPUTS ${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.options - PREFIX + PREFIX attributes_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(button_service - SOURCES + pw_proto_library(button_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/button_service.proto - PREFIX + PREFIX button_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(descriptor_service - SOURCES + pw_proto_library(descriptor_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/descriptor_service.proto - PREFIX + PREFIX descriptor_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(device_service - SOURCES + pw_proto_library(device_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.proto - INPUTS + INPUTS ${CHIP_ROOT}/examples/common/pigweed/protos/device_service.options - PREFIX + PREFIX device_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(lighting_service - SOURCES + pw_proto_library(lighting_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/lighting_service.proto - PREFIX + PREFIX lighting_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(locking_service - SOURCES + pw_proto_library(locking_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/locking_service.proto - PREFIX + PREFIX locking_service - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos - DEPS + DEPS pw_protobuf.common_proto -) + ) -pw_proto_library(wifi_service - SOURCES + pw_proto_library(wifi_service + SOURCES ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.proto - INPUTS + INPUTS ${CHIP_ROOT}/examples/common/pigweed/protos/wifi_service.options - PREFIX + PREFIX wifi_service - DEPS + DEPS pw_protobuf.common_proto - STRIP_PREFIX + STRIP_PREFIX ${CHIP_ROOT}/examples/common/pigweed/protos -) - -target_link_libraries(${COMPONENT_LIB} PUBLIC - attributes_service.nanopb_rpc - button_service.nanopb_rpc - descriptor_service.nanopb_rpc - device_service.nanopb_rpc - lighting_service.nanopb_rpc - locking_service.nanopb_rpc - wifi_service.nanopb_rpc - pw_checksum - pw_hdlc - pw_log - pw_rpc.server - pw_sys_io - pw_trace - pw_trace_tokenized - pw_trace_tokenized.trace_buffer - pw_trace_tokenized.rpc_service - pw_trace_tokenized.protos.nanopb_rpc -) - -target_link_options(${COMPONENT_LIB} - PUBLIC + ) + + target_link_libraries(${COMPONENT_LIB} PUBLIC + attributes_service.nanopb_rpc + button_service.nanopb_rpc + descriptor_service.nanopb_rpc + device_service.nanopb_rpc + lighting_service.nanopb_rpc + locking_service.nanopb_rpc + wifi_service.nanopb_rpc + pw_checksum + pw_hdlc + pw_log + pw_rpc.server + pw_sys_io + pw_trace + pw_trace_tokenized + pw_trace_tokenized.trace_buffer + pw_trace_tokenized.rpc_service + pw_trace_tokenized.protos.nanopb_rpc + ) + + target_link_options(${COMPONENT_LIB} + PUBLIC "-T${PIGWEED_ROOT}/pw_tokenizer/pw_tokenizer_linker_sections.ld" "-L${PIGWEED_ROOT}/pw_tokenizer" -) - -target_compile_options(${COMPONENT_LIB} PRIVATE - "-DPW_RPC_ATTRIBUTE_SERVICE=1" - "-DPW_RPC_BUTTON_SERVICE=1" - "-DPW_RPC_DESCRIPTOR_SERVICE=1" - "-DPW_RPC_DEVICE_SERVICE=1" - "-DPW_RPC_LIGHTING_SERVICE=1" - "-DPW_RPC_LOCKING_SERVICE=1" - "-DPW_RPC_TRACING_SERVICE=1" - "-DPW_RPC_WIFI_SERVICE=1" - "-DPW_TRACE_BACKEND_SET=1") - -endif (CONFIG_ENABLE_PW_RPC) + ) + + target_compile_options(${COMPONENT_LIB} PRIVATE + "-DPW_RPC_ATTRIBUTE_SERVICE=1" + "-DPW_RPC_BUTTON_SERVICE=1" + "-DPW_RPC_DESCRIPTOR_SERVICE=1" + "-DPW_RPC_DEVICE_SERVICE=1" + "-DPW_RPC_LIGHTING_SERVICE=1" + "-DPW_RPC_LOCKING_SERVICE=1" + "-DPW_RPC_TRACING_SERVICE=1" + "-DPW_RPC_WIFI_SERVICE=1" + "-DPW_TRACE_BACKEND_SET=1") +endif(CONFIG_ENABLE_PW_RPC) diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap index 6345745cde4fce..83dae81eec9a28 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap @@ -221,41 +221,7 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Access Control", diff --git a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap index 189241e5005e7a..8af4eaa8976040 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.zap @@ -850,24 +850,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp index 119fb710e5873e..b8a8019af39d8a 100644 --- a/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/ameba/main/DeviceCallbacks.cpp @@ -113,10 +113,6 @@ void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Cluster { switch (clusterId) { - case OnOffSwitchConfiguration::Id: - OnOffSwitchConfigurationAttributeChangeCallback(endpointId, attributeId, type, value, size); - break; - case Identify::Id: OnIdentifyPostAttributeChangeCallback(endpointId, attributeId, value); break; @@ -157,13 +153,6 @@ void DeviceCallbacks::OnInternetConnectivityChange(const ChipDeviceEvent * event } } -void DeviceCallbacks::OnOffSwitchConfigurationAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t type, - uint8_t * value, uint16_t size) -{ - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); -} - void IdentifyTimerHandler(Layer * systemLayer, void * appState, CHIP_ERROR error) { if (identifyTimerCount) diff --git a/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h b/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h index 745d1663f29a31..05b81d63bdae19 100644 --- a/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h +++ b/examples/light-switch-app/ameba/main/include/DeviceCallbacks.h @@ -39,7 +39,5 @@ class DeviceCallbacks : public chip::DeviceManager::CHIPDeviceManagerCallbacks private: void OnInternetConnectivityChange(const chip::DeviceLayer::ChipDeviceEvent * event); - void OnOffSwitchConfigurationAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t type, - uint8_t * value, uint16_t size); void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); }; diff --git a/examples/light-switch-app/asr/src/DeviceCallbacks.cpp b/examples/light-switch-app/asr/src/DeviceCallbacks.cpp index 80d2893d09aa72..94bba13aec2470 100644 --- a/examples/light-switch-app/asr/src/DeviceCallbacks.cpp +++ b/examples/light-switch-app/asr/src/DeviceCallbacks.cpp @@ -98,13 +98,7 @@ void DeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Cluster { ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - // WIP Apply attribute change to Light - } - else if (clusterId == Identify::Id) + if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); diff --git a/examples/light-switch-app/cc13x4_26x4/src/ZclCallbacks.cpp b/examples/light-switch-app/cc13x4_26x4/src/ZclCallbacks.cpp index 0ef772323fe39c..8e94642401e4e6 100644 --- a/examples/light-switch-app/cc13x4_26x4/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/cc13x4_26x4/src/ZclCallbacks.cpp @@ -39,12 +39,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & (void) attributeId; ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOffSwitchConfiguration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - } - else if (clusterId == Identify::Id) + if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); diff --git a/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp b/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp index 8fb0dabd95dec7..4bf90e1193f99f 100644 --- a/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/light-switch-app/esp32/main/DeviceCallbacks.cpp @@ -42,9 +42,6 @@ void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Clus switch (clusterId) { - case OnOffSwitchConfiguration::Id: - OnOffSwitchConfigurationAttributeChangeCallback(endpointId, attributeId, type, value, size); - break; default: ESP_LOGI(TAG, "Unhandled cluster ID: %" PRIu32, clusterId); break; @@ -52,10 +49,3 @@ void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Clus ESP_LOGI(TAG, "Current free heap: %u\n", static_cast(heap_caps_get_free_size(MALLOC_CAP_8BIT))); } - -void AppDeviceCallbacks::OnOffSwitchConfigurationAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, - uint8_t type, uint8_t * value, uint16_t size) -{ - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); -} diff --git a/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h b/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h index 7d9c0b00b32861..7a0064c58a2821 100644 --- a/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h +++ b/examples/light-switch-app/esp32/main/include/DeviceCallbacks.h @@ -37,8 +37,6 @@ class AppDeviceCallbacks : public CommonDeviceCallbacks private: void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); - void OnOffSwitchConfigurationAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t type, - uint8_t * value, uint16_t size); }; class AppDeviceCallbacksDelegate : public DeviceCallbacksDelegate diff --git a/examples/light-switch-app/genio/src/ZclCallbacks.cpp b/examples/light-switch-app/genio/src/ZclCallbacks.cpp index 52542ca88fb390..f89d4aaa8cd581 100644 --- a/examples/light-switch-app/genio/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/genio/src/ZclCallbacks.cpp @@ -37,14 +37,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & AttributeId attributeId = attributePath.mAttributeId; ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == Identify::Id) + if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); diff --git a/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp b/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp index a8e252719ae791..bf7e0e9b2b35a7 100644 --- a/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/infineon/cyw30739/src/ZclCallbacks.cpp @@ -41,10 +41,6 @@ void MatterPostAttributeChangeCallback(const app::ConcreteAttributePath & attrib } } break; - case OnOffSwitchConfiguration::Id: - printf("OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u\n", - ChipLogValueMEI(attributePath.mAttributeId), type, *value, size); - return; default: printf("Unhandled cluster ID: 0x%04lx\n", attributePath.mClusterId); return; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.zap b/examples/light-switch-app/light-switch-common/light-switch-app.zap index e426e68bbc9063..89f718140f12e3 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.zap +++ b/examples/light-switch-app/light-switch-common/light-switch-app.zap @@ -828,24 +828,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4467,24 +4449,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4767,24 +4731,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5080,24 +5026,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5236,24 +5164,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "7", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] } ] diff --git a/examples/light-switch-app/qpg/zap/switch.zap b/examples/light-switch-app/qpg/zap/switch.zap index 2b36781c42eb18..5e0a5474ab6e64 100644 --- a/examples/light-switch-app/qpg/zap/switch.zap +++ b/examples/light-switch-app/qpg/zap/switch.zap @@ -946,40 +946,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5010,40 +4976,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5422,40 +5354,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5474,40 +5372,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5915,24 +5779,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5951,40 +5797,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "7", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] } ] diff --git a/examples/light-switch-app/silabs/src/ZclCallbacks.cpp b/examples/light-switch-app/silabs/src/ZclCallbacks.cpp index 13375537556067..790a39fa943e2d 100644 --- a/examples/light-switch-app/silabs/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/silabs/src/ZclCallbacks.cpp @@ -37,14 +37,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & [[maybe_unused]] AttributeId attributeId = attributePath.mAttributeId; ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == Identify::Id) + if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); diff --git a/examples/light-switch-app/telink/src/ZclCallbacks.cpp b/examples/light-switch-app/telink/src/ZclCallbacks.cpp index e7edb8514e7a18..a8fe88904d7f43 100644 --- a/examples/light-switch-app/telink/src/ZclCallbacks.cpp +++ b/examples/light-switch-app/telink/src/ZclCallbacks.cpp @@ -35,15 +35,7 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & AttributeId attributeId = attributePath.mAttributeId; ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - if (clusterId == OnOffSwitchConfiguration::Id) - { - // Following print is used for printing single-byte value. Change it for printing non-single-byte values. - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } - else if (clusterId == Identify::Id) + if (clusterId == Identify::Id) { // Following print is used for printing single-byte value. Change it for printing non-single-byte values. ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", diff --git a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap index 67cbfdedad076f..8d55481e31f739 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.zap @@ -754,24 +754,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/bouffalolab/common/ZclCallbacks.cpp b/examples/lighting-app/bouffalolab/common/ZclCallbacks.cpp index e987fcbd325112..b546dd10d7c80b 100644 --- a/examples/lighting-app/bouffalolab/common/ZclCallbacks.cpp +++ b/examples/lighting-app/bouffalolab/common/ZclCallbacks.cpp @@ -56,12 +56,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & ChipLogProgress(Zcl, "Color Control attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", ChipLogValueMEI(attributeId), type, *value, size); } - else if (clusterId == OnOffSwitchConfiguration::Id) - { - GetAppTask().PostEvent(AppTask::APP_EVENT_LIGHTING_ONOFF); - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - } else if (clusterId == Identify::Id) { GetAppTask().PostEvent(AppTask::APP_EVENT_IDENTIFY_IDENTIFY); diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap index db1960f57718af..5a0e876845aef6 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.zap @@ -664,24 +664,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap index 31f009e23fdb3a..0c3c28dbddfdd1 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap index b5d0569687e8f6..3f7f9e31192dc2 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/genio/src/ZclCallbacks.cpp b/examples/lighting-app/genio/src/ZclCallbacks.cpp index 30faa57990ba7f..0af8c179e9599d 100644 --- a/examples/lighting-app/genio/src/ZclCallbacks.cpp +++ b/examples/lighting-app/genio/src/ZclCallbacks.cpp @@ -121,13 +121,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & LightMgr().InitiateAction(AppEvent::kEventType_Light, LightingManager::COLOR_ACTION_CT, (uint8_t *) &ct.ctMireds); } } - else if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } else if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", diff --git a/examples/lighting-app/infineon/psoc6/src/ZclCallbacks.cpp b/examples/lighting-app/infineon/psoc6/src/ZclCallbacks.cpp index d67c8cc86c6597..4ca91fd6c14c35 100644 --- a/examples/lighting-app/infineon/psoc6/src/ZclCallbacks.cpp +++ b/examples/lighting-app/infineon/psoc6/src/ZclCallbacks.cpp @@ -56,13 +56,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & // WIP Apply attribute change to Light } - else if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } else if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index a11ef874882a93..b7928f3b96f163 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/nxp/common/DeviceCallbacks.cpp b/examples/lighting-app/nxp/common/DeviceCallbacks.cpp index 140cdffb9febe2..76ef5a383daca3 100644 --- a/examples/lighting-app/nxp/common/DeviceCallbacks.cpp +++ b/examples/lighting-app/nxp/common/DeviceCallbacks.cpp @@ -69,13 +69,6 @@ void LightingApp::DeviceCallbacks::PostAttributeChangeCallback(chip::EndpointId // WIP Apply attribute change to Light } - else if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } else { ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(attributeId)); diff --git a/examples/lighting-app/nxp/k32w0/main/ZclCallbacks.cpp b/examples/lighting-app/nxp/k32w0/main/ZclCallbacks.cpp index caccdf51b0665b..3812761df25807 100644 --- a/examples/lighting-app/nxp/k32w0/main/ZclCallbacks.cpp +++ b/examples/lighting-app/nxp/k32w0/main/ZclCallbacks.cpp @@ -55,13 +55,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & // WIP Apply attribute change to Light } - else if (path.mClusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(path.mAttributeId), type, *value, size); - - // WIP Apply attribute change to Light - } else { ChipLogProgress(Zcl, "Unknown attribute ID: " ChipLogFormatMEI, ChipLogValueMEI(path.mAttributeId)); diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.zap b/examples/lighting-app/nxp/zap/lighting-on-off.zap index 941eb33fb2c5d2..6d5d8fd8cb382d 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.zap +++ b/examples/lighting-app/nxp/zap/lighting-on-off.zap @@ -658,24 +658,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/qpg/zap/light.zap b/examples/lighting-app/qpg/zap/light.zap index d1d40286f88ac7..f4b4c6f1bf8ce9 100644 --- a/examples/lighting-app/qpg/zap/light.zap +++ b/examples/lighting-app/qpg/zap/light.zap @@ -898,40 +898,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap index 8ce49423a2afb1..2644717a84a11a 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.zap @@ -747,24 +747,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap index fe5189980b619e..086261b9e095dc 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -747,24 +747,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lighting-app/silabs/src/ZclCallbacks.cpp b/examples/lighting-app/silabs/src/ZclCallbacks.cpp index 1a27a20da15a63..3e56ac26e3b9c7 100644 --- a/examples/lighting-app/silabs/src/ZclCallbacks.cpp +++ b/examples/lighting-app/silabs/src/ZclCallbacks.cpp @@ -63,13 +63,6 @@ void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & // WIP Apply attribute change to Light } - else if (clusterId == OnOffSwitchConfiguration::Id) - { - ChipLogProgress(Zcl, "OnOff Switch Configuration attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", - ChipLogValueMEI(attributeId), type, *value, size); - - // WIP Apply attribute change to Light - } else if (clusterId == Identify::Id) { ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", diff --git a/examples/lock-app/lock-common/lock-app.zap b/examples/lock-app/lock-common/lock-app.zap index de7a4801225d75..cd8979532f284e 100644 --- a/examples/lock-app/lock-common/lock-app.zap +++ b/examples/lock-app/lock-common/lock-app.zap @@ -954,24 +954,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/lock-app/qpg/zap/lock.zap b/examples/lock-app/qpg/zap/lock.zap index d46b1f63567e2f..f8a1eee9ae162d 100644 --- a/examples/lock-app/qpg/zap/lock.zap +++ b/examples/lock-app/qpg/zap/lock.zap @@ -898,40 +898,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { 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 0ed34e7eea61fb..1ed4ed6159a260 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 @@ -1724,8 +1724,6 @@ endpoint 0 { callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 1; - - handle command ResetCounts; } server cluster AdministratorCommissioning { diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.zap b/examples/network-manager-app/network-manager-common/network-manager-app.zap index a016ef57f5c9e9..35b4af63d808e2 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.zap +++ b/examples/network-manager-app/network-manager-common/network-manager-app.zap @@ -347,7 +347,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -449,16 +449,9 @@ "side": "server", "included": 1 }, - { - "name": "AccessRestrictionEntryChanged", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - }, { "name": "FabricRestrictionReviewUpdate", - "code": 3, + "code": 2, "mfgCode": null, "side": "server", "included": 1 @@ -2294,16 +2287,7 @@ "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", "side": "server", "enabled": 1, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 0 - } - ], + "commands": [], "attributes": [ { "name": "GeneratedCommandList", diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap index e1cb30834e29ad..eb621485f6d0d4 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.zap @@ -221,25 +221,7 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Access Control", diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap index c14a51d1a3d5e9..ab924da3dfabc7 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.zap @@ -954,40 +954,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 21f2a00eb50e9b..248e02c0537aa5 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -2005,40 +2005,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2992,25 +2958,7 @@ "mfgCode": null, "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thread Network Diagnostics", @@ -4862,41 +4810,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Switch", @@ -5288,40 +5202,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5918,40 +5798,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -6318,24 +6164,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -7876,24 +7704,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -8712,41 +8522,7 @@ "mfgCode": null, "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thermostat User Interface Configuration", @@ -9014,25 +8790,7 @@ "mfgCode": null, "define": "TEMPERATURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Temperature Measurement", @@ -9438,77 +9196,43 @@ "mfgCode": null, "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", + "enabled": 1 + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", "enabled": 1, "attributes": [ { - "name": "FeatureMap", - "code": 65532, + "name": "MeasuredValue", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "MinMeasuredValue", + "code": 1, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Relative Humidity Measurement", - "code": 1029, - "mfgCode": null, - "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9634,25 +9358,7 @@ "mfgCode": null, "define": "CHANNEL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Channel", @@ -9794,24 +9500,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -10040,24 +9728,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -10318,25 +9988,7 @@ "mfgCode": null, "define": "MEDIA_INPUT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Media Input", @@ -10436,25 +10088,7 @@ "mfgCode": null, "define": "LOW_POWER_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Keypad Input", @@ -10480,24 +10114,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -10614,24 +10230,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -10788,41 +10386,7 @@ "mfgCode": null, "define": "AUDIO_OUTPUT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Audio Output", @@ -10956,40 +10520,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -11072,25 +10602,7 @@ "mfgCode": null, "define": "APPLICATION_BASIC_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Application Basic", @@ -11316,25 +10828,7 @@ "mfgCode": null, "define": "ACCOUNT_LOGIN_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Account Login", @@ -11431,41 +10925,7 @@ "mfgCode": null, "define": "IDENTIFY_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Identify", @@ -11851,40 +11311,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -12179,40 +11605,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -13117,41 +12509,7 @@ "mfgCode": null, "define": "LOCALIZATION_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Localization Configuration", @@ -13233,25 +12591,7 @@ "mfgCode": null, "define": "UNIT_LOCALIZATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Unit Localization", @@ -13317,25 +12657,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Fixed Label", @@ -13826,24 +13148,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "7", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 45b74c1f84c9bf..463c73a9c42371 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -2021,40 +2021,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3008,25 +2974,7 @@ "mfgCode": null, "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thread Network Diagnostics", @@ -4878,41 +4826,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Switch", @@ -5304,40 +5218,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5992,40 +5872,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -6392,24 +6238,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -7950,24 +7778,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -8786,41 +8596,7 @@ "mfgCode": null, "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thermostat User Interface Configuration", @@ -9088,25 +8864,7 @@ "mfgCode": null, "define": "TEMPERATURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Temperature Measurement", @@ -9512,77 +9270,43 @@ "mfgCode": null, "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", + "enabled": 1 + }, + { + "name": "Relative Humidity Measurement", + "code": 1029, + "mfgCode": null, + "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", + "side": "server", "enabled": 1, "attributes": [ { - "name": "FeatureMap", - "code": 65532, + "name": "MeasuredValue", + "code": 0, "mfgCode": null, - "side": "client", - "type": "bitmap32", + "side": "server", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "MinMeasuredValue", + "code": 1, "mfgCode": null, - "side": "client", + "side": "server", "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Relative Humidity Measurement", - "code": 1029, - "mfgCode": null, - "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9708,25 +9432,7 @@ "mfgCode": null, "define": "CHANNEL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Channel", @@ -9868,24 +9574,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -10114,24 +9802,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -10392,25 +10062,7 @@ "mfgCode": null, "define": "MEDIA_INPUT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Media Input", @@ -10510,25 +10162,7 @@ "mfgCode": null, "define": "LOW_POWER_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Keypad Input", @@ -10554,24 +10188,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -10696,24 +10312,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -10870,41 +10468,7 @@ "mfgCode": null, "define": "AUDIO_OUTPUT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Audio Output", @@ -11038,40 +10602,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -11154,25 +10684,7 @@ "mfgCode": null, "define": "APPLICATION_BASIC_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Application Basic", @@ -11398,25 +10910,7 @@ "mfgCode": null, "define": "ACCOUNT_LOGIN_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Account Login", @@ -11513,41 +11007,7 @@ "mfgCode": null, "define": "IDENTIFY_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Identify", @@ -11933,40 +11393,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -12261,40 +11687,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -13167,25 +12559,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Fixed Label", @@ -13586,24 +12960,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "7", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { diff --git a/examples/pump-app/pump-common/pump-app.zap b/examples/pump-app/pump-common/pump-app.zap index 0d3235ce637719..4e4fe6570db239 100644 --- a/examples/pump-app/pump-common/pump-app.zap +++ b/examples/pump-app/pump-common/pump-app.zap @@ -882,40 +882,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -4617,41 +4583,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.zap b/examples/pump-app/silabs/data_model/pump-thread-app.zap index b58b4f50c804f5..e26ba1cc500af1 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.zap +++ b/examples/pump-app/silabs/data_model/pump-thread-app.zap @@ -882,40 +882,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -4617,41 +4583,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.zap b/examples/pump-app/silabs/data_model/pump-wifi-app.zap index b58b4f50c804f5..e26ba1cc500af1 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.zap +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.zap @@ -882,40 +882,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -4617,41 +4583,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 040218e9083e23..9ef65ceeacc485 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -882,40 +882,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3015,40 +2981,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3317,41 +3249,7 @@ "mfgCode": null, "define": "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Temperature Measurement", @@ -3359,41 +3257,7 @@ "mfgCode": null, "define": "TEMPERATURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Pressure Measurement", @@ -3401,41 +3265,7 @@ "mfgCode": null, "define": "PRESSURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Flow Measurement", @@ -3443,41 +3273,7 @@ "mfgCode": null, "define": "FLOW_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 } ] } diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap index 36f42d7a37f794..c6da2ccc572161 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.zap @@ -731,24 +731,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap index b2a1e2c7bbb3ed..691a28bdc8c682 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 6b19e3da7c61fd..e873824f15e07c 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -850,24 +850,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3753,40 +3735,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index e3868768ae56bc..f934eaeff7c62f 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -850,24 +850,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2847,40 +2829,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap index 07d5830e2909bb..82b782ddead7c6 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap @@ -828,24 +828,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3553,24 +3535,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index bd5d8084997fe9..3f62022ea7f6fe 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -828,24 +828,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4202,24 +4184,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 9acccceace7c4d..3ea4adf772089f 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -173,25 +173,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Binding", @@ -1168,24 +1150,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1440,40 +1404,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3855,24 +3785,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -8948,40 +8860,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] } ] 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 3e4fe7fa47bc06..a28a236fa8ad5b 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 @@ -558,27 +558,6 @@ cluster LevelControl = 8 { command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } -/** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -deprecated cluster BinaryInputBasic = 15 { - revision 1; // NOTE: Default/not specifically set - - attribute optional char_string<16> activeText = 4; - attribute optional char_string<16> description = 28; - attribute optional char_string<16> inactiveText = 46; - attribute boolean outOfService = 81; - readonly attribute optional enum8 polarity = 84; - attribute boolean presentValue = 85; - attribute optional enum8 reliability = 103; - readonly attribute bitmap8 statusFlags = 111; - readonly attribute optional int32u applicationType = 256; - 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 Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -3220,14 +3199,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster BinaryInputBasic { - ram attribute outOfService default = 0x00; - ram attribute presentValue; - ram attribute statusFlags default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index a8cb35694cf8f7..6f4ab131fa0672 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -2991,40 +2991,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3099,131 +3065,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Binary Input (Basic)", - "code": 15, - "mfgCode": null, - "define": "BINARY_INPUT_BASIC_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "out of service", - "code": 81, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "present value", - "code": 85, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "status flags", - "code": 111, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3232,41 +3073,7 @@ "mfgCode": null, "define": "DESCRIPTOR_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Descriptor", @@ -3611,40 +3418,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3653,41 +3426,7 @@ "mfgCode": null, "define": "WAKE_ON_LAN_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Channel", @@ -3721,53 +3460,19 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Target Navigator", - "code": 1285, - "mfgCode": null, - "define": "TARGET_NAVIGATOR_CLUSTER", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "NavigateTarget", - "code": 0, + "name": "NavigateTarget", + "code": 0, "mfgCode": null, "source": "client", "isIncoming": 0, @@ -3781,40 +3486,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3921,40 +3592,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3997,40 +3634,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4049,40 +3652,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -4109,40 +3678,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4169,40 +3704,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4229,40 +3730,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4305,40 +3772,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4347,41 +3780,7 @@ "mfgCode": null, "define": "APPLICATION_BASIC_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Account Login", @@ -4423,40 +3822,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4556,40 +3921,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { diff --git a/examples/window-app/common/window-app.zap b/examples/window-app/common/window-app.zap index 85c01e1e6b52ff..64f9a634e4871a 100644 --- a/examples/window-app/common/window-app.zap +++ b/examples/window-app/common/window-app.zap @@ -954,24 +954,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter index ef27e45d2c66c7..607ccd40f9c9b4 100644 --- a/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter +++ b/scripts/py_matter_idl/matter_idl/tests/inputs/large_all_clusters_app.matter @@ -269,13 +269,6 @@ server cluster OnOff = 6 { command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } -server cluster OnOffSwitchConfiguration = 7 { - readonly attribute enum8 switchType = 0; - attribute enum8 switchActions = 16; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - server cluster LevelControl = 8 { enum MoveMode : ENUM8 { kUp = 0; @@ -2460,22 +2453,6 @@ server cluster WindowCovering = 258 { command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } -server cluster BarrierControl = 259 { - readonly attribute enum8 barrierMovingState = 1; - readonly attribute bitmap16 barrierSafetyStatus = 2; - readonly attribute bitmap8 barrierCapabilities = 3; - readonly attribute int8u barrierPosition = 10; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct BarrierControlGoToPercentRequest { - INT8U percentOpen = 0; - } - - command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; - command BarrierControlStop(): DefaultSuccess = 1; -} - server cluster PumpConfigurationAndControl = 512 { enum PumpControlMode : ENUM8 { kConstantSpeed = 0; @@ -3514,22 +3491,6 @@ server cluster AccountLogin = 1294 { readonly attribute int16u clusterRevision = 65533; } -server cluster ElectricalMeasurement = 2820 { - readonly attribute bitmap32 measurementType = 0; - readonly attribute int32s totalActivePower = 772; - readonly attribute int16u rmsVoltage = 1285; - readonly attribute int16u rmsVoltageMin = 1286; - readonly attribute int16u rmsVoltageMax = 1287; - readonly attribute int16u rmsCurrent = 1288; - readonly attribute int16u rmsCurrentMin = 1289; - readonly attribute int16u rmsCurrentMax = 1290; - readonly attribute int16s activePower = 1291; - readonly attribute int16s activePowerMin = 1292; - readonly attribute int16s activePowerMax = 1293; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - server cluster UnitTesting = 4294048773 { enum SimpleEnum : ENUM8 { kUnspecified = 0; @@ -4239,13 +4200,6 @@ endpoint 1 { ram attribute clusterRevision default = 4; } - server cluster OnOffSwitchConfiguration { - ram attribute switchType; - ram attribute switchActions; - ram attribute featureMap; - ram attribute clusterRevision default = 1; - } - server cluster LevelControl { persist attribute currentLevel default = 0xFE; ram attribute remainingTime; @@ -4414,15 +4368,6 @@ endpoint 1 { ram attribute clusterRevision default = 5; } - server cluster BarrierControl { - ram attribute barrierMovingState; - ram attribute barrierSafetyStatus; - ram attribute barrierCapabilities; - ram attribute barrierPosition; - ram attribute featureMap; - ram attribute clusterRevision default = 1; - } - server cluster PumpConfigurationAndControl { ram attribute maxPressure; ram attribute maxSpeed; @@ -4691,22 +4636,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster ElectricalMeasurement { - ram attribute measurementType; - ram attribute totalActivePower; - ram attribute rmsVoltage default = 0xffff; - ram attribute rmsVoltageMin default = 0x8000; - ram attribute rmsVoltageMax default = 0x8000; - ram attribute rmsCurrent default = 0xffff; - ram attribute rmsCurrentMin default = 0xffff; - ram attribute rmsCurrentMax default = 0xffff; - ram attribute activePower default = 0xffff; - ram attribute activePowerMin default = 0xffff; - ram attribute activePowerMax default = 0xffff; - ram attribute featureMap; - ram attribute clusterRevision default = 3; - } - server cluster UnitTesting { ram attribute boolean; ram attribute bitmap8; diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h index 67bd61c9519d3c..b8c83f683e5bf6 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/PluginApplicationCallbacks.h @@ -6,7 +6,6 @@ void MatterAdministratorCommissioningPluginServerInitCallback(); void MatterApplicationBasicPluginServerInitCallback(); void MatterApplicationLauncherPluginServerInitCallback(); void MatterAudioOutputPluginServerInitCallback(); -void MatterBarrierControlPluginServerInitCallback(); void MatterBasicInformationPluginServerInitCallback(); void MatterBinaryInputBasicPluginServerInitCallback(); void MatterBindingPluginServerInitCallback(); @@ -17,7 +16,6 @@ void MatterContentLauncherPluginServerInitCallback(); void MatterDescriptorPluginServerInitCallback(); void MatterDiagnosticLogsPluginServerInitCallback(); void MatterDoorLockPluginServerInitCallback(); -void MatterElectricalMeasurementPluginServerInitCallback(); void MatterEthernetNetworkDiagnosticsPluginServerInitCallback(); void MatterFanControlPluginServerInitCallback(); void MatterFaultInjectionPluginServerInitCallback(); @@ -40,7 +38,6 @@ void MatterModeSelectPluginServerInitCallback(); void MatterNetworkCommissioningPluginServerInitCallback(); void MatterOccupancySensingPluginServerInitCallback(); void MatterOnOffPluginServerInitCallback(); -void MatterOnOffSwitchConfigurationPluginServerInitCallback(); void MatterOperationalCredentialsPluginServerInitCallback(); void MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); void MatterPowerSourcePluginServerInitCallback(); @@ -71,7 +68,6 @@ void MatterWindowCoveringPluginServerInitCallback(); MatterApplicationBasicPluginServerInitCallback(); \ MatterApplicationLauncherPluginServerInitCallback(); \ MatterAudioOutputPluginServerInitCallback(); \ - MatterBarrierControlPluginServerInitCallback(); \ MatterBasicInformationPluginServerInitCallback(); \ MatterBinaryInputBasicPluginServerInitCallback(); \ MatterBindingPluginServerInitCallback(); \ @@ -82,7 +78,6 @@ void MatterWindowCoveringPluginServerInitCallback(); MatterDescriptorPluginServerInitCallback(); \ MatterDiagnosticLogsPluginServerInitCallback(); \ MatterDoorLockPluginServerInitCallback(); \ - MatterElectricalMeasurementPluginServerInitCallback(); \ MatterEthernetNetworkDiagnosticsPluginServerInitCallback(); \ MatterFanControlPluginServerInitCallback(); \ MatterFaultInjectionPluginServerInitCallback(); \ @@ -105,7 +100,6 @@ void MatterWindowCoveringPluginServerInitCallback(); MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ - MatterOnOffSwitchConfigurationPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterOtaSoftwareUpdateRequestorPluginServerInitCallback(); \ MatterPowerSourcePluginServerInitCallback(); \ diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp index 74735c9fe8036e..49c67f436a1120 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/callback-stub.cpp @@ -36,11 +36,6 @@ void __attribute__((weak)) emberAfAudioOutputClusterInitCallback(EndpointId endp // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfBarrierControlClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfBasicInformationClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -91,11 +86,6 @@ void __attribute__((weak)) emberAfDoorLockClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfElectricalMeasurementClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfEthernetNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -206,11 +196,6 @@ void __attribute__((weak)) emberAfOnOffClusterInitCallback(EndpointId endpoint) // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfOnOffSwitchConfigurationClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/cluster-init-callback.cpp b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/cluster-init-callback.cpp index 8144c53c404e9f..650d59d3dddf05 100644 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/cluster-init-callback.cpp +++ b/scripts/py_matter_idl/matter_idl/tests/outputs/large_all_clusters_app/cpp-app/cluster-init-callback.cpp @@ -31,9 +31,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::AudioOutput::Id: emberAfAudioOutputClusterInitCallback(endpoint); break; - case app::Clusters::BarrierControl::Id: - emberAfBarrierControlClusterInitCallback(endpoint); - break; case app::Clusters::BasicInformation::Id: emberAfBasicInformationClusterInitCallback(endpoint); break; @@ -64,9 +61,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::DoorLock::Id: emberAfDoorLockClusterInitCallback(endpoint); break; - case app::Clusters::ElectricalMeasurement::Id: - emberAfElectricalMeasurementClusterInitCallback(endpoint); - break; case app::Clusters::EthernetNetworkDiagnostics::Id: emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); break; @@ -133,9 +127,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case app::Clusters::OnOff::Id: emberAfOnOffClusterInitCallback(endpoint); break; - case app::Clusters::OnOffSwitchConfiguration::Id: - emberAfOnOffSwitchConfigurationClusterInitCallback(endpoint); - break; case app::Clusters::OperationalCredentials::Id: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint index ee27673ae5bb0b..e7bd644249a13e 100644 --- a/scripts/rules.matterlint +++ b/scripts/rules.matterlint @@ -117,10 +117,6 @@ load "../src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.x load "../src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml"; load "../src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml"; -load "../src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml"; -load "../src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml"; -load "../src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml"; -load "../src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml"; all endpoints { // These attributes follow a different code path and do not have to be diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 2826e506382556..161d3b8c0cdcc1 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -38,7 +38,6 @@ class ManualTest: INVALID_TESTS = { - "tests.yaml", # certification/tests.yaml is not a real test "PICS.yaml", # certification/PICS.yaml is not a real test # The items below are examples and will never work (likely) diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 9d4ae062f054c8..77c492dad171ef 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -1176,24 +1176,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -6540,40 +6522,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -6812,81 +6760,6 @@ } ] }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "switch type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "switch actions", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Level Control", "code": 8, @@ -7219,97 +7092,6 @@ } ] }, - { - "name": "Binary Input (Basic)", - "code": 15, - "mfgCode": null, - "define": "BINARY_INPUT_BASIC_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "out of service", - "code": 81, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "present value", - "code": 85, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "status flags", - "code": 111, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, @@ -15278,131 +15060,6 @@ } ] }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "commands": [ - { - "name": "BarrierControlGoToPercent", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "BarrierControlStop", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "barrier moving state", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "enum8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier safety status", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "bitmap16", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier capabilities", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier position", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Pump Configuration and Control", "code": 512, @@ -21412,225 +21069,6 @@ } ] }, - { - "name": "Electrical Measurement", - "code": 2820, - "mfgCode": null, - "define": "ELECTRICAL_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "measurement type", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "total active power", - "code": 772, - "mfgCode": null, - "side": "server", - "type": "int32s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms voltage", - "code": 1285, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms voltage min", - "code": 1286, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms voltage max", - "code": 1287, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms current", - "code": 1288, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms current min", - "code": 1289, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rms current max", - "code": 1290, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "active power", - "code": 1291, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "active power min", - "code": 1292, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "active power max", - "code": 1293, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xffff", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, { "name": "Unit Testing", "code": 4294048773, diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index b0bb70a68fbe5d..808a1e7de7b2ae 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -770,24 +770,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp index dbfbc68a2bcf2f..bd3030cf63ddc9 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/IMClusterCommandHandler.cpp @@ -95,52 +95,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace AdministratorCommissioning -namespace BarrierControl { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::BarrierControlGoToPercent::Id: { - Commands::BarrierControlGoToPercent::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfBarrierControlClusterBarrierControlGoToPercentCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::BarrierControlStop::Id: { - Commands::BarrierControlStop::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfBarrierControlClusterBarrierControlStopCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } -} - -} // namespace BarrierControl - namespace BooleanStateConfiguration { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -1983,9 +1937,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::AdministratorCommissioning::Id: Clusters::AdministratorCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::BarrierControl::Id: - Clusters::BarrierControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::BooleanStateConfiguration::Id: Clusters::BooleanStateConfiguration::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 08646d26bc566d..cc52961a0aa087 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -261,7 +261,7 @@ #define GENERATED_DEFAULTS_COUNT (30) // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 50 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 48 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ @@ -271,16 +271,10 @@ /* Endpoint: 1, Cluster: On/Off (server) */ \ { (uint16_t) 0xFF, (uint16_t) 0x0, (uint16_t) 0x2 }, /* StartUpOnOff */ \ \ - /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x2 }, /* switch actions */ \ - \ /* Endpoint: 1, Cluster: Level Control (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x3 }, /* Options */ \ { (uint16_t) 0x32, (uint16_t) 0x1, (uint16_t) 0xFF }, /* DefaultMoveRate */ \ \ - /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* out of service */ \ - \ /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1F }, /* SpinSpeedCurrent */ \ \ @@ -355,7 +349,7 @@ } // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 1050 +#define GENERATED_ATTRIBUTE_COUNT 1022 #define GENERATED_ATTRIBUTES \ { \ \ @@ -797,13 +791,6 @@ { ZAP_SIMPLE_DEFAULT(0x0001), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 1, ZAP_TYPE(ENUM8), 0 }, /* switch type */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(2), 0x00000010, 1, ZAP_TYPE(ENUM8), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* switch actions */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ /* Endpoint: 1, Cluster: Level Control (server) */ \ { ZAP_SIMPLE_DEFAULT(0xFE), 0x00000000, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* CurrentLevel */ \ @@ -813,7 +800,7 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000004, 2, ZAP_TYPE(INT16U), 0 }, /* CurrentFrequency */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000005, 2, ZAP_TYPE(INT16U), 0 }, /* MinFrequency */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000006, 2, ZAP_TYPE(INT16U), 0 }, /* MaxFrequency */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(3), 0x0000000F, 1, ZAP_TYPE(BITMAP8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(2), 0x0000000F, 1, ZAP_TYPE(BITMAP8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Options */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00000010, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OnOffTransitionTime */ \ @@ -823,7 +810,7 @@ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* OnTransitionTime */ \ { ZAP_EMPTY_DEFAULT(), 0x00000013, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* OffTransitionTime */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(4), 0x00000014, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(3), 0x00000014, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* DefaultMoveRate */ \ { ZAP_SIMPLE_DEFAULT(255), 0x00004000, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ @@ -831,14 +818,6 @@ { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(5), 0x00000051, 1, ZAP_TYPE(BOOLEAN), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* out of service */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000055, 1, ZAP_TYPE(BOOLEAN), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* present value */ \ - { ZAP_SIMPLE_DEFAULT(0x00), 0x0000006F, 1, ZAP_TYPE(BITMAP8), 0 }, /* status flags */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* DeviceTypeList */ \ { ZAP_EMPTY_DEFAULT(), 0x00000001, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ServerList */ \ @@ -960,7 +939,7 @@ \ /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SpinSpeeds */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(6), 0x00000001, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(4), 0x00000001, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SpinSpeedCurrent */ \ { ZAP_EMPTY_DEFAULT(), 0x00000002, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* NumberOfRinses */ \ { ZAP_EMPTY_DEFAULT(), 0x00000003, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedRinses */ \ @@ -1021,7 +1000,7 @@ { ZAP_SIMPLE_DEFAULT(0), 0x00000008, 1, ZAP_TYPE(ENUM8), 0 }, /* InterconnectSmokeAlarm */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00000009, 1, ZAP_TYPE(ENUM8), 0 }, /* InterconnectCOAlarm */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000000A, 1, ZAP_TYPE(ENUM8), 0 }, /* ContaminationState */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(7), 0x0000000B, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(5), 0x0000000B, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* SmokeSensitivityLevel */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000000C, 4, ZAP_TYPE(EPOCH_S), 0 }, /* ExpiryDate */ \ { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ @@ -1133,7 +1112,7 @@ { ZAP_SIMPLE_DEFAULT(0xFF), 0x00000005, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* TargetState */ \ { ZAP_SIMPLE_DEFAULT(0xFF), 0x00000006, 1, ZAP_TYPE(PERCENT), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* CurrentLevel */ \ { ZAP_SIMPLE_DEFAULT(0xFF), 0x00000007, 1, ZAP_TYPE(PERCENT), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* TargetLevel */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(8), 0x00000008, 1, ZAP_TYPE(PERCENT), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(6), 0x00000008, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* DefaultOpenLevel */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00000009, 2, ZAP_TYPE(BITMAP16), 0 }, /* ValveFault */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000000A, 1, ZAP_TYPE(INT8U), 0 }, /* LevelStep */ \ @@ -1233,7 +1212,7 @@ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* NextChargeRequiredEnergy */ \ { ZAP_EMPTY_DEFAULT(), 0x00000026, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* NextChargeTargetSoC */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(9), 0x00000027, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(7), 0x00000027, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ApproximateEVEfficiency */ \ { ZAP_EMPTY_DEFAULT(), 0x00000040, 4, ZAP_TYPE(INT32U), \ @@ -1310,20 +1289,12 @@ ZAP_ATTRIBUTE_MASK(TOKENIZE) }, /* InstalledOpenLimitTilt */ \ { ZAP_SIMPLE_DEFAULT(0xFFFF), 0x00000013, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(TOKENIZE) }, /* InstalledClosedLimitTilt */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(10), 0x00000017, 1, ZAP_TYPE(BITMAP8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(8), 0x00000017, 1, ZAP_TYPE(BITMAP8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* Mode */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x0000001A, 2, ZAP_TYPE(BITMAP16), 0 }, /* SafetyStatus */ \ { ZAP_SIMPLE_DEFAULT(0x17), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Barrier Control (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* barrier moving state */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000002, 2, ZAP_TYPE(BITMAP16), 0 }, /* barrier safety status */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000003, 1, ZAP_TYPE(BITMAP8), 0 }, /* barrier capabilities */ \ - { ZAP_EMPTY_DEFAULT(), 0x0000000A, 1, ZAP_TYPE(INT8U), 0 }, /* barrier position */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(INT16S), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* MaxPressure */ \ { ZAP_EMPTY_DEFAULT(), 0x00000001, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* MaxSpeed */ \ @@ -1348,9 +1319,9 @@ { ZAP_EMPTY_DEFAULT(), 0x00000016, 3, ZAP_TYPE(INT24U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Power */ \ { ZAP_SIMPLE_DEFAULT(0x00000000), 0x00000017, 4, ZAP_TYPE(INT32U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LifetimeEnergyConsumed */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(11), 0x00000020, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(9), 0x00000020, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OperationMode */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(12), 0x00000021, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(10), 0x00000021, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ControlMode */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ @@ -1361,23 +1332,23 @@ { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000004, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMaxHeatSetpointLimit */ \ { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000005, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMinCoolSetpointLimit */ \ { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000006, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMaxCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000011, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(11), 0x00000011, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x00000012, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(12), 0x00000012, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxHeatSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000017, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000017, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000019, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000019, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinSetpointDeadBand */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ControlSequenceOfOperation */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* SystemMode */ \ { ZAP_EMPTY_DEFAULT(), 0x00000048, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* PresetTypes */ \ { ZAP_EMPTY_DEFAULT(), 0x00000049, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* ScheduleTypes */ \ @@ -1399,14 +1370,14 @@ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* FanMode */ \ { ZAP_SIMPLE_DEFAULT(0x02), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* FanModeSequence */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000002, 1, ZAP_TYPE(PERCENT), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x00000002, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PercentSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(PERCENT), 0 }, /* PercentCurrent */ \ { ZAP_SIMPLE_DEFAULT(100), 0x00000004, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedMax */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000005, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000005, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SpeedSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000006, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedCurrent */ \ { ZAP_SIMPLE_DEFAULT(0x03), 0x00000007, 1, ZAP_TYPE(BITMAP8), 0 }, /* RockSupport */ \ @@ -1418,11 +1389,11 @@ { ZAP_SIMPLE_DEFAULT(4), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* TemperatureDisplayMode */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000001, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000001, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* KeypadLockout */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000002, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000002, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ScheduleProgrammingVisibility */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ @@ -1458,25 +1429,25 @@ { ZAP_EMPTY_DEFAULT(), 0x00000028, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6X */ \ { ZAP_EMPTY_DEFAULT(), 0x00000029, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6Y */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Primary6Intensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x00000030, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000030, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x00000031, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000031, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointY */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x00000032, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x00000032, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x00000033, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x00000033, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000034, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointRIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00000036, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x00000036, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000037, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x00000037, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000038, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointGIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x0000003A, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x0000003A, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x0000003B, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x0000003B, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBY */ \ { ZAP_EMPTY_DEFAULT(), 0x0000003C, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointBIntensity */ \ @@ -1492,7 +1463,7 @@ { ZAP_SIMPLE_DEFAULT(0x009A), 0x0000400B, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMinMireds */ \ { ZAP_SIMPLE_DEFAULT(0x01C6), 0x0000400C, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMaxMireds */ \ { ZAP_EMPTY_DEFAULT(), 0x0000400D, 2, ZAP_TYPE(INT16U), 0 }, /* CoupleColorTempToLevelMinMireds */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00004010, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x00004010, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpColorTemperatureMireds */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ @@ -1502,13 +1473,13 @@ { ZAP_SIMPLE_DEFAULT(0x01), 0x00000000, 1, ZAP_TYPE(INT8U), 0 }, /* PhysicalMinLevel */ \ { ZAP_SIMPLE_DEFAULT(0xFE), 0x00000001, 1, ZAP_TYPE(INT8U), 0 }, /* PhysicalMaxLevel */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000002, 1, ZAP_TYPE(BITMAP8), 0 }, /* BallastStatus */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00000010, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x00000010, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinLevel */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00000011, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00000011, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxLevel */ \ { ZAP_EMPTY_DEFAULT(), 0x00000014, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* IntrinsicBallastFactor */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00000015, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00000015, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* BallastFactorAdjustment */ \ { ZAP_EMPTY_DEFAULT(), 0x00000020, 1, ZAP_TYPE(INT8U), 0 }, /* LampQuantity */ \ @@ -1518,7 +1489,7 @@ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LampRatedHours */ \ { ZAP_SIMPLE_DEFAULT(0x000000), 0x00000033, 3, ZAP_TYPE(INT24U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LampBurnHours */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(40), 0x00000034, 1, ZAP_TYPE(BITMAP8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00000034, 1, ZAP_TYPE(BITMAP8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* LampAlarmMode */ \ { ZAP_SIMPLE_DEFAULT(0xFFFFFF), 0x00000035, 3, ZAP_TYPE(INT24U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LampBurnHoursTripPoint */ \ @@ -1804,21 +1775,6 @@ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(1), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ - /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { ZAP_SIMPLE_DEFAULT(0x000000), 0x00000000, 4, ZAP_TYPE(BITMAP32), 0 }, /* measurement type */ \ - { ZAP_SIMPLE_DEFAULT(0x000000), 0x00000304, 4, ZAP_TYPE(INT32S), 0 }, /* total active power */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x00000505, 2, ZAP_TYPE(INT16U), 0 }, /* rms voltage */ \ - { ZAP_SIMPLE_DEFAULT(0x8000), 0x00000506, 2, ZAP_TYPE(INT16U), 0 }, /* rms voltage min */ \ - { ZAP_SIMPLE_DEFAULT(0x8000), 0x00000507, 2, ZAP_TYPE(INT16U), 0 }, /* rms voltage max */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x00000508, 2, ZAP_TYPE(INT16U), 0 }, /* rms current */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x00000509, 2, ZAP_TYPE(INT16U), 0 }, /* rms current min */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x0000050A, 2, ZAP_TYPE(INT16U), 0 }, /* rms current max */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x0000050B, 2, ZAP_TYPE(INT16S), 0 }, /* active power */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x0000050C, 2, ZAP_TYPE(INT16S), 0 }, /* active power min */ \ - { ZAP_SIMPLE_DEFAULT(0xffff), 0x0000050D, 2, ZAP_TYPE(INT16S), 0 }, /* active power max */ \ - { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ - \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ { ZAP_SIMPLE_DEFAULT(false), 0x00000000, 1, ZAP_TYPE(BOOLEAN), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* boolean */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00000001, 1, ZAP_TYPE(BITMAP8), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* bitmap8 */ \ @@ -1865,13 +1821,13 @@ { ZAP_EMPTY_DEFAULT(), 0x00000024, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* enum_attr */ \ { ZAP_EMPTY_DEFAULT(), 0x00000025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* struct_attr */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(41), 0x00000026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00000026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(42), 0x00000027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(40), 0x00000027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(43), 0x00000028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(41), 0x00000028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(44), 0x00000029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(42), 0x00000029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 0, ZAP_TYPE(ARRAY), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* list_long_octet_string */ \ @@ -1942,16 +1898,16 @@ { ZAP_EMPTY_DEFAULT(), 0x00004025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_struct */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(45), 0x00004026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(43), 0x00004026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(46), 0x00004027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(44), 0x00004027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(47), 0x00004028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(45), 0x00004028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(48), 0x00004029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(46), 0x00004029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000402A, 1, ZAP_TYPE(INT8U), \ @@ -1976,7 +1932,7 @@ { ZAP_SIMPLE_DEFAULT(1), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004001, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OnTime */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004002, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OffWaitTime */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(49), 0x00004003, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(47), 0x00004003, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpOnOff */ \ { ZAP_SIMPLE_DEFAULT(0x0001), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ @@ -2201,9 +2157,6 @@ const EmberAfGenericClusterFunction chipFuncArrayWindowCoveringServer[] = { \ (EmberAfGenericClusterFunction) MatterWindowCoveringClusterServerAttributeChangedCallback, \ }; \ - const EmberAfGenericClusterFunction chipFuncArrayBarrierControlServer[] = { \ - (EmberAfGenericClusterFunction) MatterBarrierControlClusterServerShutdownCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayPumpConfigurationAndControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback, \ @@ -2573,27 +2526,22 @@ 0x00000007 /* GoToTiltValue */, \ 0x00000008 /* GoToTiltPercentage */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 1, Cluster: Barrier Control (server) */\ - /* AcceptedCommandList (index=235) */ \ - 0x00000000 /* BarrierControlGoToPercent */, \ - 0x00000001 /* BarrierControlStop */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Thermostat (server) */\ - /* AcceptedCommandList (index=238) */ \ + /* AcceptedCommandList (index=235) */ \ 0x00000000 /* SetpointRaiseLower */, \ 0x00000005 /* SetActiveScheduleRequest */, \ 0x00000006 /* SetActivePresetRequest */, \ 0x000000FE /* AtomicRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=243)*/ \ + /* GeneratedCommandList (index=240)*/ \ 0x000000FD /* AtomicResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Fan Control (server) */\ - /* AcceptedCommandList (index=245) */ \ + /* AcceptedCommandList (index=242) */ \ 0x00000000 /* Step */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Color Control (server) */\ - /* AcceptedCommandList (index=247) */ \ + /* AcceptedCommandList (index=244) */ \ 0x00000000 /* MoveToHue */, \ 0x00000001 /* MoveHue */, \ 0x00000002 /* StepHue */, \ @@ -2615,11 +2563,11 @@ 0x0000004C /* StepColorTemperature */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Low Power (server) */\ - /* AcceptedCommandList (index=267) */ \ + /* AcceptedCommandList (index=264) */ \ 0x00000000 /* Sleep */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Unit Testing (server) */\ - /* AcceptedCommandList (index=269) */ \ + /* AcceptedCommandList (index=266) */ \ 0x00000000 /* Test */, \ 0x00000001 /* TestNotHandled */, \ 0x00000002 /* TestSpecific */, \ @@ -2642,7 +2590,7 @@ 0x00000017 /* TestSecondBatchHelperRequest */, \ 0xFFF200AA /* TestDifferentVendorMeiRequest */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=291)*/ \ + /* GeneratedCommandList (index=288)*/ \ 0x00000000 /* TestSpecificResponse */, \ 0x00000001 /* TestAddArgumentsResponse */, \ 0x00000004 /* TestListInt8UReverseResponse */, \ @@ -2656,12 +2604,12 @@ 0xFFF200BB /* TestDifferentVendorMeiResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Identify (server) */\ - /* AcceptedCommandList (index=303) */ \ + /* AcceptedCommandList (index=300) */ \ 0x00000000 /* Identify */, \ 0x00000040 /* TriggerEffect */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Groups (server) */\ - /* AcceptedCommandList (index=306) */ \ + /* AcceptedCommandList (index=303) */ \ 0x00000000 /* AddGroup */, \ 0x00000001 /* ViewGroup */, \ 0x00000002 /* GetGroupMembership */, \ @@ -2669,14 +2617,14 @@ 0x00000004 /* RemoveAllGroups */, \ 0x00000005 /* AddGroupIfIdentifying */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=313)*/ \ + /* GeneratedCommandList (index=310)*/ \ 0x00000000 /* AddGroupResponse */, \ 0x00000001 /* ViewGroupResponse */, \ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: On/Off (server) */\ - /* AcceptedCommandList (index=318) */ \ + /* AcceptedCommandList (index=315) */ \ 0x00000000 /* Off */, \ 0x00000001 /* On */, \ 0x00000002 /* Toggle */, \ @@ -2685,7 +2633,7 @@ 0x00000042 /* OnWithTimedOff */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 2, Cluster: Scenes Management (server) */\ - /* AcceptedCommandList (index=325) */ \ + /* AcceptedCommandList (index=322) */ \ 0x00000000 /* AddScene */, \ 0x00000001 /* ViewScene */, \ 0x00000002 /* RemoveScene */, \ @@ -2695,7 +2643,7 @@ 0x00000006 /* GetSceneMembership */, \ 0x00000040 /* CopyScene */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=334)*/ \ + /* GeneratedCommandList (index=331)*/ \ 0x00000000 /* AddSceneResponse */, \ 0x00000001 /* ViewSceneResponse */, \ 0x00000002 /* RemoveSceneResponse */, \ @@ -2705,7 +2653,7 @@ 0x00000040 /* CopySceneResponse */, \ chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */\ - /* AcceptedCommandList (index=342) */ \ + /* AcceptedCommandList (index=339) */ \ 0x00000000 /* ScanNetworks */, \ 0x00000002 /* AddOrUpdateWiFiNetwork */, \ 0x00000003 /* AddOrUpdateThreadNetwork */, \ @@ -2713,7 +2661,7 @@ 0x00000006 /* ConnectNetwork */, \ 0x00000008 /* ReorderNetwork */, \ chip::kInvalidCommandId /* end of list */, \ - /* GeneratedCommandList (index=349)*/ \ + /* GeneratedCommandList (index=346)*/ \ 0x00000001 /* ScanNetworksResponse */, \ 0x00000005 /* NetworkConfigResponse */, \ 0x00000007 /* ConnectNetworkResponse */, \ @@ -2723,7 +2671,7 @@ // clang-format on // This is an array of EmberAfCluster structures. -#define GENERATED_CLUSTER_COUNT 111 +#define GENERATED_CLUSTER_COUNT 107 // clang-format off #define GENERATED_CLUSTERS { \ { \ @@ -3142,23 +3090,10 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ - .clusterId = 0x00000007, \ - .attributes = ZAP_ATTRIBUTE_INDEX(264), \ - .attributeCount = 4, \ - .clusterSize = 8, \ - .mask = ZAP_CLUSTER_MASK(SERVER), \ - .functions = NULL, \ - .acceptedCommandList = nullptr, \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(268), \ + .attributes = ZAP_ATTRIBUTE_INDEX(264), \ .attributeCount = 16, \ .clusterSize = 27, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -3168,23 +3103,10 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ - .clusterId = 0x0000000F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(284), \ - .attributeCount = 5, \ - .clusterSize = 9, \ - .mask = ZAP_CLUSTER_MASK(SERVER), \ - .functions = NULL, \ - .acceptedCommandList = nullptr, \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(289), \ + .attributes = ZAP_ATTRIBUTE_INDEX(280), \ .attributeCount = 7, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3197,7 +3119,7 @@ { \ /* Endpoint: 1, Cluster: Binding (server) */ \ .clusterId = 0x0000001E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(296), \ + .attributes = ZAP_ATTRIBUTE_INDEX(287), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3210,7 +3132,7 @@ { \ /* Endpoint: 1, Cluster: Actions (server) */ \ .clusterId = 0x00000025, \ - .attributes = ZAP_ATTRIBUTE_INDEX(299), \ + .attributes = ZAP_ATTRIBUTE_INDEX(290), \ .attributeCount = 5, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3223,7 +3145,7 @@ { \ /* Endpoint: 1, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(304), \ + .attributes = ZAP_ATTRIBUTE_INDEX(295), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3236,7 +3158,7 @@ { \ /* Endpoint: 1, Cluster: Switch (server) */ \ .clusterId = 0x0000003B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(313), \ + .attributes = ZAP_ATTRIBUTE_INDEX(304), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3249,7 +3171,7 @@ { \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(317), \ + .attributes = ZAP_ATTRIBUTE_INDEX(308), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3262,7 +3184,7 @@ { \ /* Endpoint: 1, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(320), \ + .attributes = ZAP_ATTRIBUTE_INDEX(311), \ .attributeCount = 3, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3275,7 +3197,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State (server) */ \ .clusterId = 0x00000045, \ - .attributes = ZAP_ATTRIBUTE_INDEX(323), \ + .attributes = ZAP_ATTRIBUTE_INDEX(314), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3288,7 +3210,7 @@ { \ /* Endpoint: 1, Cluster: Oven Cavity Operational State (server) */ \ .clusterId = 0x00000048, \ - .attributes = ZAP_ATTRIBUTE_INDEX(326), \ + .attributes = ZAP_ATTRIBUTE_INDEX(317), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3301,7 +3223,7 @@ { \ /* Endpoint: 1, Cluster: Oven Mode (server) */ \ .clusterId = 0x00000049, \ - .attributes = ZAP_ATTRIBUTE_INDEX(334), \ + .attributes = ZAP_ATTRIBUTE_INDEX(325), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3314,7 +3236,7 @@ { \ /* Endpoint: 1, Cluster: Laundry Dryer Controls (server) */ \ .clusterId = 0x0000004A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(338), \ + .attributes = ZAP_ATTRIBUTE_INDEX(329), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3327,7 +3249,7 @@ { \ /* Endpoint: 1, Cluster: Mode Select (server) */ \ .clusterId = 0x00000050, \ - .attributes = ZAP_ATTRIBUTE_INDEX(342), \ + .attributes = ZAP_ATTRIBUTE_INDEX(333), \ .attributeCount = 9, \ .clusterSize = 77, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3340,7 +3262,7 @@ { \ /* Endpoint: 1, Cluster: Laundry Washer Mode (server) */ \ .clusterId = 0x00000051, \ - .attributes = ZAP_ATTRIBUTE_INDEX(351), \ + .attributes = ZAP_ATTRIBUTE_INDEX(342), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3353,7 +3275,7 @@ { \ /* Endpoint: 1, Cluster: Refrigerator And Temperature Controlled Cabinet Mode (server) */ \ .clusterId = 0x00000052, \ - .attributes = ZAP_ATTRIBUTE_INDEX(357), \ + .attributes = ZAP_ATTRIBUTE_INDEX(348), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3366,7 +3288,7 @@ { \ /* Endpoint: 1, Cluster: Laundry Washer Controls (server) */ \ .clusterId = 0x00000053, \ - .attributes = ZAP_ATTRIBUTE_INDEX(363), \ + .attributes = ZAP_ATTRIBUTE_INDEX(354), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3379,7 +3301,7 @@ { \ /* Endpoint: 1, Cluster: RVC Run Mode (server) */ \ .clusterId = 0x00000054, \ - .attributes = ZAP_ATTRIBUTE_INDEX(369), \ + .attributes = ZAP_ATTRIBUTE_INDEX(360), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3392,7 +3314,7 @@ { \ /* Endpoint: 1, Cluster: RVC Clean Mode (server) */ \ .clusterId = 0x00000055, \ - .attributes = ZAP_ATTRIBUTE_INDEX(373), \ + .attributes = ZAP_ATTRIBUTE_INDEX(364), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3405,7 +3327,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Control (server) */ \ .clusterId = 0x00000056, \ - .attributes = ZAP_ATTRIBUTE_INDEX(377), \ + .attributes = ZAP_ATTRIBUTE_INDEX(368), \ .attributeCount = 4, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3418,7 +3340,7 @@ { \ /* Endpoint: 1, Cluster: Refrigerator Alarm (server) */ \ .clusterId = 0x00000057, \ - .attributes = ZAP_ATTRIBUTE_INDEX(381), \ + .attributes = ZAP_ATTRIBUTE_INDEX(372), \ .attributeCount = 5, \ .clusterSize = 18, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3431,7 +3353,7 @@ { \ /* Endpoint: 1, Cluster: Dishwasher Mode (server) */ \ .clusterId = 0x00000059, \ - .attributes = ZAP_ATTRIBUTE_INDEX(386), \ + .attributes = ZAP_ATTRIBUTE_INDEX(377), \ .attributeCount = 6, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3444,7 +3366,7 @@ { \ /* Endpoint: 1, Cluster: Air Quality (server) */ \ .clusterId = 0x0000005B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(392), \ + .attributes = ZAP_ATTRIBUTE_INDEX(383), \ .attributeCount = 3, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3457,7 +3379,7 @@ { \ /* Endpoint: 1, Cluster: Smoke CO Alarm (server) */ \ .clusterId = 0x0000005C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(395), \ + .attributes = ZAP_ATTRIBUTE_INDEX(386), \ .attributeCount = 15, \ .clusterSize = 22, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3470,7 +3392,7 @@ { \ /* Endpoint: 1, Cluster: Dishwasher Alarm (server) */ \ .clusterId = 0x0000005D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(410), \ + .attributes = ZAP_ATTRIBUTE_INDEX(401), \ .attributeCount = 6, \ .clusterSize = 22, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3483,7 +3405,7 @@ { \ /* Endpoint: 1, Cluster: Microwave Oven Mode (server) */ \ .clusterId = 0x0000005E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(416), \ + .attributes = ZAP_ATTRIBUTE_INDEX(407), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3496,7 +3418,7 @@ { \ /* Endpoint: 1, Cluster: Operational State (server) */ \ .clusterId = 0x00000060, \ - .attributes = ZAP_ATTRIBUTE_INDEX(420), \ + .attributes = ZAP_ATTRIBUTE_INDEX(411), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3509,7 +3431,7 @@ { \ /* Endpoint: 1, Cluster: RVC Operational State (server) */ \ .clusterId = 0x00000061, \ - .attributes = ZAP_ATTRIBUTE_INDEX(428), \ + .attributes = ZAP_ATTRIBUTE_INDEX(419), \ .attributeCount = 8, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3522,7 +3444,7 @@ { \ /* Endpoint: 1, Cluster: Scenes Management (server) */ \ .clusterId = 0x00000062, \ - .attributes = ZAP_ATTRIBUTE_INDEX(436), \ + .attributes = ZAP_ATTRIBUTE_INDEX(427), \ .attributeCount = 5, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ @@ -3535,7 +3457,7 @@ { \ /* Endpoint: 1, Cluster: HEPA Filter Monitoring (server) */ \ .clusterId = 0x00000071, \ - .attributes = ZAP_ATTRIBUTE_INDEX(441), \ + .attributes = ZAP_ATTRIBUTE_INDEX(432), \ .attributeCount = 8, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3548,7 +3470,7 @@ { \ /* Endpoint: 1, Cluster: Activated Carbon Filter Monitoring (server) */ \ .clusterId = 0x00000072, \ - .attributes = ZAP_ATTRIBUTE_INDEX(449), \ + .attributes = ZAP_ATTRIBUTE_INDEX(440), \ .attributeCount = 8, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3561,7 +3483,7 @@ { \ /* Endpoint: 1, Cluster: Boolean State Configuration (server) */ \ .clusterId = 0x00000080, \ - .attributes = ZAP_ATTRIBUTE_INDEX(457), \ + .attributes = ZAP_ATTRIBUTE_INDEX(448), \ .attributeCount = 10, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3574,7 +3496,7 @@ { \ /* Endpoint: 1, Cluster: Valve Configuration and Control (server) */ \ .clusterId = 0x00000081, \ - .attributes = ZAP_ATTRIBUTE_INDEX(467), \ + .attributes = ZAP_ATTRIBUTE_INDEX(458), \ .attributeCount = 13, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3587,7 +3509,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Power Measurement (server) */ \ .clusterId = 0x00000090, \ - .attributes = ZAP_ATTRIBUTE_INDEX(480), \ + .attributes = ZAP_ATTRIBUTE_INDEX(471), \ .attributeCount = 21, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3600,7 +3522,7 @@ { \ /* Endpoint: 1, Cluster: Electrical Energy Measurement (server) */ \ .clusterId = 0x00000091, \ - .attributes = ZAP_ATTRIBUTE_INDEX(501), \ + .attributes = ZAP_ATTRIBUTE_INDEX(492), \ .attributeCount = 8, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3613,7 +3535,7 @@ { \ /* Endpoint: 1, Cluster: Device Energy Management (server) */ \ .clusterId = 0x00000098, \ - .attributes = ZAP_ATTRIBUTE_INDEX(509), \ + .attributes = ZAP_ATTRIBUTE_INDEX(500), \ .attributeCount = 10, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3626,7 +3548,7 @@ { \ /* Endpoint: 1, Cluster: Energy EVSE (server) */ \ .clusterId = 0x00000099, \ - .attributes = ZAP_ATTRIBUTE_INDEX(519), \ + .attributes = ZAP_ATTRIBUTE_INDEX(510), \ .attributeCount = 19, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3639,7 +3561,7 @@ { \ /* Endpoint: 1, Cluster: Energy Preference (server) */ \ .clusterId = 0x0000009B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(538), \ + .attributes = ZAP_ATTRIBUTE_INDEX(529), \ .attributeCount = 7, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3652,7 +3574,7 @@ { \ /* Endpoint: 1, Cluster: Power Topology (server) */ \ .clusterId = 0x0000009C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(545), \ + .attributes = ZAP_ATTRIBUTE_INDEX(536), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3665,7 +3587,7 @@ { \ /* Endpoint: 1, Cluster: Energy EVSE Mode (server) */ \ .clusterId = 0x0000009D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(549), \ + .attributes = ZAP_ATTRIBUTE_INDEX(540), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3678,7 +3600,7 @@ { \ /* Endpoint: 1, Cluster: Device Energy Management Mode (server) */ \ .clusterId = 0x0000009F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(553), \ + .attributes = ZAP_ATTRIBUTE_INDEX(544), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3691,7 +3613,7 @@ { \ /* Endpoint: 1, Cluster: Window Covering (server) */ \ .clusterId = 0x00000102, \ - .attributes = ZAP_ATTRIBUTE_INDEX(557), \ + .attributes = ZAP_ATTRIBUTE_INDEX(548), \ .attributeCount = 24, \ .clusterSize = 43, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3701,23 +3623,10 @@ .eventList = nullptr, \ .eventCount = 0, \ },\ - { \ - /* Endpoint: 1, Cluster: Barrier Control (server) */ \ - .clusterId = 0x00000103, \ - .attributes = ZAP_ATTRIBUTE_INDEX(581), \ - .attributeCount = 6, \ - .clusterSize = 11, \ - .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ - .functions = chipFuncArrayBarrierControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 235 ), \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(587), \ + .attributes = ZAP_ATTRIBUTE_INDEX(572), \ .attributeCount = 25, \ .clusterSize = 52, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3730,25 +3639,25 @@ { \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ .clusterId = 0x00000201, \ - .attributes = ZAP_ATTRIBUTE_INDEX(612), \ + .attributes = ZAP_ATTRIBUTE_INDEX(597), \ .attributeCount = 26, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 238 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 243 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 235 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 240 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ .clusterId = 0x00000202, \ - .attributes = ZAP_ATTRIBUTE_INDEX(638), \ + .attributes = ZAP_ATTRIBUTE_INDEX(623), \ .attributeCount = 14, \ .clusterSize = 18, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayFanControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 245 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 242 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3756,7 +3665,7 @@ { \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ .clusterId = 0x00000204, \ - .attributes = ZAP_ATTRIBUTE_INDEX(652), \ + .attributes = ZAP_ATTRIBUTE_INDEX(637), \ .attributeCount = 5, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -3769,12 +3678,12 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(657), \ + .attributes = ZAP_ATTRIBUTE_INDEX(642), \ .attributeCount = 54, \ .clusterSize = 345, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 247 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 244 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -3782,7 +3691,7 @@ { \ /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ .clusterId = 0x00000301, \ - .attributes = ZAP_ATTRIBUTE_INDEX(711), \ + .attributes = ZAP_ATTRIBUTE_INDEX(696), \ .attributeCount = 16, \ .clusterSize = 58, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3795,7 +3704,7 @@ { \ /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ .clusterId = 0x00000400, \ - .attributes = ZAP_ATTRIBUTE_INDEX(727), \ + .attributes = ZAP_ATTRIBUTE_INDEX(712), \ .attributeCount = 7, \ .clusterSize = 15, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3808,7 +3717,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(734), \ + .attributes = ZAP_ATTRIBUTE_INDEX(719), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3821,7 +3730,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(740), \ + .attributes = ZAP_ATTRIBUTE_INDEX(725), \ .attributeCount = 5, \ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3834,7 +3743,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(745), \ + .attributes = ZAP_ATTRIBUTE_INDEX(730), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3847,7 +3756,7 @@ { \ /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ .clusterId = 0x00000405, \ - .attributes = ZAP_ATTRIBUTE_INDEX(751), \ + .attributes = ZAP_ATTRIBUTE_INDEX(736), \ .attributeCount = 6, \ .clusterSize = 14, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3860,7 +3769,7 @@ { \ /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(757), \ + .attributes = ZAP_ATTRIBUTE_INDEX(742), \ .attributeCount = 5, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -3873,7 +3782,7 @@ { \ /* Endpoint: 1, Cluster: Carbon Monoxide Concentration Measurement (server) */ \ .clusterId = 0x0000040C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(762), \ + .attributes = ZAP_ATTRIBUTE_INDEX(747), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3886,7 +3795,7 @@ { \ /* Endpoint: 1, Cluster: Carbon Dioxide Concentration Measurement (server) */ \ .clusterId = 0x0000040D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(775), \ + .attributes = ZAP_ATTRIBUTE_INDEX(760), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3899,7 +3808,7 @@ { \ /* Endpoint: 1, Cluster: Nitrogen Dioxide Concentration Measurement (server) */ \ .clusterId = 0x00000413, \ - .attributes = ZAP_ATTRIBUTE_INDEX(788), \ + .attributes = ZAP_ATTRIBUTE_INDEX(773), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3912,7 +3821,7 @@ { \ /* Endpoint: 1, Cluster: Ozone Concentration Measurement (server) */ \ .clusterId = 0x00000415, \ - .attributes = ZAP_ATTRIBUTE_INDEX(801), \ + .attributes = ZAP_ATTRIBUTE_INDEX(786), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3925,7 +3834,7 @@ { \ /* Endpoint: 1, Cluster: PM2.5 Concentration Measurement (server) */ \ .clusterId = 0x0000042A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(814), \ + .attributes = ZAP_ATTRIBUTE_INDEX(799), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3938,7 +3847,7 @@ { \ /* Endpoint: 1, Cluster: Formaldehyde Concentration Measurement (server) */ \ .clusterId = 0x0000042B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(827), \ + .attributes = ZAP_ATTRIBUTE_INDEX(812), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3951,7 +3860,7 @@ { \ /* Endpoint: 1, Cluster: PM1 Concentration Measurement (server) */ \ .clusterId = 0x0000042C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(840), \ + .attributes = ZAP_ATTRIBUTE_INDEX(825), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3964,7 +3873,7 @@ { \ /* Endpoint: 1, Cluster: PM10 Concentration Measurement (server) */ \ .clusterId = 0x0000042D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(853), \ + .attributes = ZAP_ATTRIBUTE_INDEX(838), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3977,7 +3886,7 @@ { \ /* Endpoint: 1, Cluster: Total Volatile Organic Compounds Concentration Measurement (server) */ \ .clusterId = 0x0000042E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(866), \ + .attributes = ZAP_ATTRIBUTE_INDEX(851), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -3990,7 +3899,7 @@ { \ /* Endpoint: 1, Cluster: Radon Concentration Measurement (server) */ \ .clusterId = 0x0000042F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(879), \ + .attributes = ZAP_ATTRIBUTE_INDEX(864), \ .attributeCount = 13, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4003,7 +3912,7 @@ { \ /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ .clusterId = 0x00000503, \ - .attributes = ZAP_ATTRIBUTE_INDEX(892), \ + .attributes = ZAP_ATTRIBUTE_INDEX(877), \ .attributeCount = 3, \ .clusterSize = 19, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4016,25 +3925,12 @@ { \ /* Endpoint: 1, Cluster: Low Power (server) */ \ .clusterId = 0x00000508, \ - .attributes = ZAP_ATTRIBUTE_INDEX(895), \ + .attributes = ZAP_ATTRIBUTE_INDEX(880), \ .attributeCount = 2, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 267 ), \ - .generatedCommandList = nullptr, \ - .eventList = nullptr, \ - .eventCount = 0, \ - },\ - { \ - /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - .clusterId = 0x00000B04, \ - .attributes = ZAP_ATTRIBUTE_INDEX(897), \ - .attributeCount = 13, \ - .clusterSize = 32, \ - .mask = ZAP_CLUSTER_MASK(SERVER), \ - .functions = NULL, \ - .acceptedCommandList = nullptr, \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 264 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -4042,25 +3938,25 @@ { \ /* Endpoint: 1, Cluster: Unit Testing (server) */ \ .clusterId = 0xFFF1FC05, \ - .attributes = ZAP_ATTRIBUTE_INDEX(910), \ + .attributes = ZAP_ATTRIBUTE_INDEX(882), \ .attributeCount = 84, \ .clusterSize = 2290, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 269 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 291 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 266 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 288 ), \ .eventList = ZAP_GENERATED_EVENTS_INDEX( 59 ), \ .eventCount = 3, \ },\ { \ /* Endpoint: 2, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(994), \ + .attributes = ZAP_ATTRIBUTE_INDEX(966), \ .attributeCount = 4, \ .clusterSize = 9, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 303 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 300 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -4068,25 +3964,25 @@ { \ /* Endpoint: 2, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(998), \ + .attributes = ZAP_ATTRIBUTE_INDEX(970), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 306 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 313 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 303 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 310 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 2, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1001), \ + .attributes = ZAP_ATTRIBUTE_INDEX(973), \ .attributeCount = 7, \ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 318 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 315 ), \ .generatedCommandList = nullptr, \ .eventList = nullptr, \ .eventCount = 0, \ @@ -4094,7 +3990,7 @@ { \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1008), \ + .attributes = ZAP_ATTRIBUTE_INDEX(980), \ .attributeCount = 7, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4107,7 +4003,7 @@ { \ /* Endpoint: 2, Cluster: Power Source (server) */ \ .clusterId = 0x0000002F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1015), \ + .attributes = ZAP_ATTRIBUTE_INDEX(987), \ .attributeCount = 9, \ .clusterSize = 72, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4120,20 +4016,20 @@ { \ /* Endpoint: 2, Cluster: Scenes Management (server) */ \ .clusterId = 0x00000062, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1024), \ + .attributes = ZAP_ATTRIBUTE_INDEX(996), \ .attributeCount = 5, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \ .functions = chipFuncArrayScenesManagementServer, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 325 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 334 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 322 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 331 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ { \ /* Endpoint: 2, Cluster: Occupancy Sensing (server) */ \ .clusterId = 0x00000406, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1029), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1001), \ .attributeCount = 5, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -4146,7 +4042,7 @@ { \ /* Endpoint: 65534, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1034), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1006), \ .attributeCount = 6, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -4159,13 +4055,13 @@ { \ /* Endpoint: 65534, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(1040), \ + .attributes = ZAP_ATTRIBUTE_INDEX(1012), \ .attributeCount = 10, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 342 ), \ - .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 349 ), \ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 339 ), \ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 346 ), \ .eventList = nullptr, \ .eventCount = 0, \ },\ @@ -4173,13 +4069,13 @@ // clang-format on -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 109 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 105 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 28, 340 }, { ZAP_CLUSTER_INDEX(28), 74, 3517 }, { ZAP_CLUSTER_INDEX(102), 7, 122 }, \ - { ZAP_CLUSTER_INDEX(109), 2, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 28, 340 }, { ZAP_CLUSTER_INDEX(28), 70, 3457 }, { ZAP_CLUSTER_INDEX(98), 7, 122 }, \ + { ZAP_CLUSTER_INDEX(105), 2, 0 }, \ } // Largest attribute size is needed for various buffers @@ -4191,7 +4087,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (36) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (3979) +#define ATTRIBUTE_MAX_SIZE (3919) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (4) 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 ccb66133d42412..9c1886588e4529 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 @@ -25,9 +25,7 @@ #define MATTER_DM_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define MATTER_DM_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define MATTER_DM_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define MATTER_DM_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define MATTER_DM_BINARY_INPUT_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (4) #define MATTER_DM_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define MATTER_DM_ACCESS_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -88,7 +86,6 @@ #define MATTER_DM_ENERGY_EVSE_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define MATTER_DM_BARRIER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_FAN_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -113,7 +110,6 @@ #define MATTER_DM_RADON_CONCENTRATION_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_WAKE_ON_LAN_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define MATTER_DM_ELECTRICAL_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -138,11 +134,6 @@ #define MATTER_DM_PLUGIN_ON_OFF_SERVER #define MATTER_DM_PLUGIN_ON_OFF -// Use this macro to check if the server side of the On/off Switch Configuration cluster is included -#define ZCL_USING_ON_OFF_SWITCH_CONFIGURATION_CLUSTER_SERVER -#define MATTER_DM_PLUGIN_ON_OFF_SWITCH_CONFIGURATION_SERVER -#define MATTER_DM_PLUGIN_ON_OFF_SWITCH_CONFIGURATION - // Use this macro to check if the server side of the Level Control cluster is included #define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER #define MATTER_DM_PLUGIN_LEVEL_CONTROL_SERVER @@ -152,11 +143,6 @@ #define MATTER_DM_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define MATTER_DM_PLUGIN_LEVEL_CONTROL_RATE 0 -// Use this macro to check if the server side of the Binary Input (Basic) cluster is included -#define ZCL_USING_BINARY_INPUT_BASIC_CLUSTER_SERVER -#define MATTER_DM_PLUGIN_BINARY_INPUT_BASIC_SERVER -#define MATTER_DM_PLUGIN_BINARY_INPUT_BASIC - // Use this macro to check if the server side of the Descriptor cluster is included #define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER #define MATTER_DM_PLUGIN_DESCRIPTOR_SERVER @@ -467,11 +453,6 @@ #define MATTER_DM_PLUGIN_WINDOW_COVERING_SERVER #define MATTER_DM_PLUGIN_WINDOW_COVERING -// Use this macro to check if the server side of the Barrier Control cluster is included -#define ZCL_USING_BARRIER_CONTROL_CLUSTER_SERVER -#define MATTER_DM_PLUGIN_BARRIER_CONTROL_SERVER -#define MATTER_DM_PLUGIN_BARRIER_CONTROL - // Use this macro to check if the server side of the Pump Configuration and Control cluster is included #define ZCL_USING_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER #define MATTER_DM_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL_SERVER @@ -596,11 +577,6 @@ #define MATTER_DM_PLUGIN_LOW_POWER_SERVER #define MATTER_DM_PLUGIN_LOW_POWER -// Use this macro to check if the server side of the Electrical Measurement cluster is included -#define ZCL_USING_ELECTRICAL_MEASUREMENT_CLUSTER_SERVER -#define MATTER_DM_PLUGIN_ELECTRICAL_MEASUREMENT_SERVER -#define MATTER_DM_PLUGIN_ELECTRICAL_MEASUREMENT - // Use this macro to check if the server side of the Unit Testing cluster is included #define ZCL_USING_UNIT_TESTING_CLUSTER_SERVER #define MATTER_DM_PLUGIN_UNIT_TESTING_SERVER diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index c8907ac98b3d79..42b221c1a98836 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -182,7 +182,6 @@ template("chip_data_model") { } sources += [ - "${_app_root}/clusters/barrier-control-server/barrier-control-server.h", "${_app_root}/clusters/basic-information/basic-information.h", "${_app_root}/clusters/color-control-server/color-control-server.h", "${_app_root}/clusters/door-lock-server/door-lock-server.h", diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.cpp b/src/app/clusters/barrier-control-server/barrier-control-server.cpp deleted file mode 100644 index da7d23e7038933..00000000000000 --- a/src/app/clusters/barrier-control-server/barrier-control-server.cpp +++ /dev/null @@ -1,370 +0,0 @@ -/** - * - * Copyright (c) 2020 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. - */ - -#include "barrier-control-server.h" -#include -#include -#include -#include -#include -#include -#include - -#include - -// We need this for initializating default reporting configurations. -#include - -#include -#include - -using namespace chip; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::BarrierControl; -using chip::Protocols::InteractionModel::Status; - -// this is NOT in any spec (CHIP spec does not currently have BarrierControl) -// and XMLs do not attach these enums to clusters. -// -// This directly defines some constants. These could be replaced with real -// constants if we ever have some BarrierControl in the matter specification. -namespace chip { -namespace app { -namespace Clusters { -namespace BarrierControl { - -namespace Position { -static constexpr uint8_t kClosed = 0; -static constexpr uint8_t kOpen = 100; -static constexpr uint8_t kUnknown = 255; -} // namespace Position - -namespace MovingState { -static constexpr uint8_t kStopped = 0; -static constexpr uint8_t kClosing = 1; -static constexpr uint8_t kOpening = 2; -} // namespace MovingState - -} // namespace BarrierControl -} // namespace Clusters -} // namespace app -} // namespace chip - -typedef struct -{ - uint8_t currentPosition; - uint8_t targetPosition; - bool increasing; - uint32_t delayMs; -} State; -static State state; - -/********************************************************** - * Matter timer scheduling glue logic - *********************************************************/ - -void emberAfBarrierControlClusterServerTickCallback(EndpointId endpoint); - -static void timerCallback(System::Layer *, void * callbackContext) -{ - emberAfBarrierControlClusterServerTickCallback(static_cast(reinterpret_cast(callbackContext))); -} - -static void scheduleTimerCallbackMs(EndpointId endpoint, uint32_t delayMs) -{ - DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(delayMs), timerCallback, - reinterpret_cast(static_cast(endpoint))); -} - -static void cancelEndpointTimerCallback(EndpointId endpoint) -{ - DeviceLayer::SystemLayer().CancelTimer(timerCallback, reinterpret_cast(static_cast(endpoint))); -} - -// ----------------------------------------------------------------------------- -// Accessing attributes - -uint8_t emAfPluginBarrierControlServerGetBarrierPosition(EndpointId endpoint) -{ - uint8_t position; - Status status = Attributes::BarrierPosition::Get(endpoint, &position); - assert(status == Status::Success); - return position; -} - -void emAfPluginBarrierControlServerSetBarrierPosition(EndpointId endpoint, uint8_t position) -{ - Status status = Attributes::BarrierPosition::Set(endpoint, position); - assert(status == Status::Success); -} - -bool emAfPluginBarrierControlServerIsPartialBarrierSupported(EndpointId endpoint) -{ - uint8_t bitmap; - Status status = Attributes::BarrierCapabilities::Get(endpoint, &bitmap); - assert(status == Status::Success); - return (bitmap & to_underlying(BarrierControlCapabilities::kPartialBarrier)) != 0; -} - -static uint16_t getOpenOrClosePeriod(EndpointId endpoint, bool open) -{ - uint16_t period = 0; - Status status = Status::Success; -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_OPEN_PERIOD_ATTRIBUTE) - if (open) - { - status = Attributes::BarrierOpenPeriod::Get(endpoint, &period); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_CLOSE_PERIOD_ATTRIBUTE) - if (!open) - { - status = Attributes::BarrierClosePeriod::Get(endpoint, &period); - } -#endif - assert(status == Status::Success); - return period; -} - -static void setMovingState(EndpointId endpoint, uint8_t newState) -{ - Status status = Attributes::BarrierMovingState::Set(endpoint, newState); - assert(status == Status::Success); -} - -uint16_t emAfPluginBarrierControlServerGetSafetyStatus(EndpointId endpoint) -{ - uint16_t safetyStatus; - Status status = Attributes::BarrierSafetyStatus::Get(endpoint, &safetyStatus); - assert(status == Status::Success); - return safetyStatus; -} - -static bool isRemoteLockoutOn(EndpointId endpoint) -{ - uint16_t safetyStatus = emAfPluginBarrierControlServerGetSafetyStatus(endpoint); - return (safetyStatus & to_underlying(BarrierControlSafetyStatus::kRemoteLockout)) != 0; -} - -void emAfPluginBarrierControlServerIncrementEvents(EndpointId endpoint, bool open, bool command) -{ - Status status = Status::Success; - uint16_t events = 0; - -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_OPEN_EVENTS_ATTRIBUTE) - if (open && !command) - { - status = Attributes::BarrierOpenEvents::Get(endpoint, &events); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_CLOSE_EVENTS_ATTRIBUTE) - if (!open && !command) - { - status = Attributes::BarrierCloseEvents::Get(endpoint, &events); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE) - if (open && command) - { - status = Attributes::BarrierCommandOpenEvents::Get(endpoint, &events); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE) - if (!open && command) - { - status = Attributes::BarrierCommandCloseEvents::Get(endpoint, &events); - } -#endif - assert(status == Status::Success); - - // Section 7.1.2.1.5-8 says that this events counter SHALL NOT roll over. - // The maximum 16-bit unsigned integer in Zigbee is 0xFFFE, so we have this - // check here. - if (events == UINT16_MAX - 1) - { - return; - } - events++; - -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_OPEN_EVENTS_ATTRIBUTE) - if (open && !command) - { - status = Attributes::BarrierOpenEvents::Set(endpoint, events); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_CLOSE_EVENTS_ATTRIBUTE) - if (!open && !command) - { - status = Attributes::BarrierCloseEvents::Set(endpoint, events); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE) - if (open && command) - { - status = Attributes::BarrierCommandOpenEvents::Set(endpoint, events); - } -#endif -#if defined(ZCL_USING_BARRIER_CONTROL_CLUSTER_BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE) - if (!open && command) - { - status = Attributes::BarrierCommandCloseEvents::Set(endpoint, events); - } -#endif - assert(status == Status::Success); -} - -// ----------------------------------------------------------------------------- -// Opening/closing barrier - -static uint8_t getCurrentPosition(EndpointId endpoint) -{ - // If the BarrierPosition attribute does not store the exact position of the - // barrier, then it will be set to 0xFF. If this is the case, then we have no - // way of knowing the position of the barrier. Let's guess that the barrier is - // open so that we don't leave the barrier open when it should be closed. - uint8_t currentPositionFromAttribute = emAfPluginBarrierControlServerGetBarrierPosition(endpoint); - return ((currentPositionFromAttribute == BarrierControl::Position::kUnknown) ? BarrierControl::Position::kOpen - : currentPositionFromAttribute); -} - -static uint32_t calculateDelayMs(EndpointId endpoint, uint8_t targetPosition, bool * opening) -{ - uint8_t currentPosition = emAfPluginBarrierControlServerGetBarrierPosition(endpoint); - *opening = targetPosition > currentPosition; - uint8_t positionDelta = static_cast(*opening ? targetPosition - currentPosition : currentPosition - targetPosition); - uint16_t openOrClosePeriodDs = getOpenOrClosePeriod(endpoint, *opening); - uint32_t openOrClosePeriodMs = openOrClosePeriodDs * MILLISECOND_TICKS_PER_DECISECOND; - - // We use a minimum delay so that our barrier changes position in a realistic - // amount of time. - if (openOrClosePeriodDs == 0 || positionDelta == 0) - { - return MIN_POSITION_CHANGE_DELAY_MS; - } - - uint32_t delayMs = openOrClosePeriodMs / positionDelta; - return (delayMs < MIN_POSITION_CHANGE_DELAY_MS ? MIN_POSITION_CHANGE_DELAY_MS : delayMs); -} - -void emberAfBarrierControlClusterServerTickCallback(EndpointId endpoint) -{ - if (state.currentPosition == state.targetPosition) - { - emAfPluginBarrierControlServerSetBarrierPosition(endpoint, state.currentPosition); - setMovingState(endpoint, BarrierControl::MovingState::kStopped); - cancelEndpointTimerCallback(endpoint); - } - else - { - if (state.increasing) - { - if (++state.currentPosition == 1) - { - // Zero -> nonzero: open event - emAfPluginBarrierControlServerIncrementEvents(endpoint, true, false); - } - } - else - { - if (--state.currentPosition == 0) - { - // Nonzero -> zero: close event - emAfPluginBarrierControlServerIncrementEvents(endpoint, false, false); - } - } - emAfPluginBarrierControlServerSetBarrierPosition(endpoint, - (emAfPluginBarrierControlServerIsPartialBarrierSupported(endpoint) - ? state.currentPosition - : BarrierControl::Position::kUnknown)); - setMovingState(endpoint, - (state.increasing ? BarrierControl::MovingState::kOpening : BarrierControl::MovingState::kClosing)); - - scheduleTimerCallbackMs(endpoint, state.delayMs); - } -} - -// ----------------------------------------------------------------------------- -// Handling commands - -static void sendDefaultResponse(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, Status status) -{ - commandObj->AddStatus(commandPath, status); -} - -bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( - app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - const Commands::BarrierControlGoToPercent::DecodableType & commandData) -{ - auto & percentOpen = commandData.percentOpen; - - EndpointId endpoint = commandPath.mEndpointId; - Status status = Status::Success; - - ChipLogProgress(Zcl, "RX: GoToPercentCallback p=%d", percentOpen); - - if (isRemoteLockoutOn(endpoint)) - { - status = Status::Failure; - } - else if (percentOpen > 100 // "100" means "100%", so greater than that is invalid - || (!emAfPluginBarrierControlServerIsPartialBarrierSupported(endpoint) && - percentOpen != BarrierControl::Position::kClosed && percentOpen != BarrierControl::Position::kOpen)) - { - status = Status::ConstraintError; - } - else - { - state.currentPosition = getCurrentPosition(endpoint); - state.targetPosition = percentOpen; - state.delayMs = calculateDelayMs(endpoint, state.targetPosition, &state.increasing); - ChipLogProgress(Zcl, "Scheduling barrier move from %d to %d with %" PRIu32 "ms delay", state.currentPosition, - state.targetPosition, state.delayMs); - scheduleTimerCallbackMs(endpoint, state.delayMs); - - if (state.currentPosition < state.targetPosition) - { - emAfPluginBarrierControlServerIncrementEvents(endpoint, true, true); - } - else if (state.currentPosition > state.targetPosition) - { - emAfPluginBarrierControlServerIncrementEvents(endpoint, false, true); - } - } - - sendDefaultResponse(commandObj, commandPath, status); - - return true; -} - -bool emberAfBarrierControlClusterBarrierControlStopCallback(app::CommandHandler * commandObj, - const app::ConcreteCommandPath & commandPath, - const Commands::BarrierControlStop::DecodableType & commandData) -{ - EndpointId endpoint = commandPath.mEndpointId; - cancelEndpointTimerCallback(endpoint); - setMovingState(endpoint, BarrierControl::MovingState::kStopped); - sendDefaultResponse(commandObj, commandPath, Status::Success); - return true; -} - -void MatterBarrierControlPluginServerInitCallback() {} - -void MatterBarrierControlClusterServerShutdownCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "Shuting barrier control server cluster on endpoint %d", endpoint); - cancelEndpointTimerCallback(endpoint); -} diff --git a/src/app/clusters/barrier-control-server/barrier-control-server.h b/src/app/clusters/barrier-control-server/barrier-control-server.h deleted file mode 100644 index 549bbdf30616e6..00000000000000 --- a/src/app/clusters/barrier-control-server/barrier-control-server.h +++ /dev/null @@ -1,53 +0,0 @@ -/** - * - * Copyright (c) 2020 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. - */ - -#pragma once - -#include -#include - -#include - -#ifndef DOXYGEN_SHOULD_SKIP_THIS -// There are helper getter/setting APIs that are shared between the core -// implementation and the CLI code. They are private to the plugin. - -// This will always either return the current BarrierPosition attribute value -// or assert. -uint8_t emAfPluginBarrierControlServerGetBarrierPosition(chip::EndpointId endpoint); - -// This will always either set the current BarrierPosition attribute value or -// assert. -void emAfPluginBarrierControlServerSetBarrierPosition(chip::EndpointId endpoint, uint8_t barrierPosition); - -// This will either return whether or not the PartialBarrier bit is set in the -// Capabilities attribute value, or it will assert. -bool emAfPluginBarrierControlServerIsPartialBarrierSupported(chip::EndpointId endpoint); - -// This will increment the OpenEvents, CloseEvents, CommandOpenEvents, and -// CommandCloseEvents attribute values depending on which combination of the -// open and command arguments are passed, or assert. -void emAfPluginBarrierControlServerIncrementEvents(chip::EndpointId endpoint, bool open, bool command); - -// This will read the SafetyStatus attribute and return the value, or assert. -uint16_t emAfPluginBarrierControlServerGetSafetyStatus(chip::EndpointId endpoint); - -// We use a minimum delay so that our barrier changes position in a realistic -// amount of time. -#define MIN_POSITION_CHANGE_DELAY_MS 30 - -#endif diff --git a/src/app/tests/suites/README.md b/src/app/tests/suites/README.md index 39236e3b1517d6..e89862ec27cd81 100644 --- a/src/app/tests/suites/README.md +++ b/src/app/tests/suites/README.md @@ -3,25 +3,30 @@ - [CHIP Test Suites](#chip-test-suites) - [Controllers](#controllers) - [Automatic conversion process](#automatic-conversion-process) -- [List](#list) - - [chip_tests](#list-chiptests) - - [Property: test](#property-test) - - [Property: config](#property-config) - - [Property: {variable_name}](#property-variable_name) - - [chip_tests_items](#list-chip_tests_items) - - [Property: tests](#property-tests) - - [Property: arguments](#property-arguments) - - [Property: values](#property-values) - - [Property: response](#property-response) - - [Property: constraints](#property-constraints) - - [chip_tests_item_parameters](#list-chip_tests_item_parameters) - - [chip_tests_item_response_parameters](#list-chip_tests_item_response_parameters) - - [chip_tests_pics](#list-chip_tests_pics) +- [Lists](#lists) + - [List: _chip_tests_](#list-chip_tests) + - [Property: _test_](#property-test) + - [Property: _config_](#property-config) + - [Property: _{variable_name}_](#property-variable_name) + - [List: _chip_tests_items_](#list-chip_tests_items) + - [Property: _tests_](#property-tests) + - [Property: _arguments_](#property-arguments) + - [Property: _values_](#property-values) + - [Property: _response_](#property-response) + - [Property: _constraints_](#property-constraints) + - [List: _chip_tests_item_parameters_](#list-chip_tests_item_parameters) + - [List: _chip_tests_item_response_parameters_](#list-chip_tests_item_response_parameters) + - [List: _chip_tests_pics_](#list-chip_tests_pics) + - [List: _chip_tests_config_](#list-chip_tests_config) - [YAML Test Definition](#yaml-test-definition) -- [PICS Usage](#pics-usage) + - [Location of Test Definitions](#location-of-test-definitions) +- [PICS Usage](#pics-usage) - [Required Files](#required-files) - + [Example PICS Command](#example-pics-command) - [Examples](#examples) - [YAML Examples](#yaml-examples) - [ZAP Example](#zap-example) + - [Required Files](#required-files-1) + - [Generate Example Script](#generate-example-script) - [Index](#index) This directory contains a set of tests describing interactions between nodes, @@ -375,48 +380,3 @@ src/app/tests/suites/examples/gen_readme_example.sh | unknown | 0 | UNKNOWN | 0xFF | Unknown | uint8_t \* | - -
Cluster Names

- -| | | | -| ------------------------------ | ---------------------------------------- | --------------------------------------------- | -| PowerConfiguration | AdministratorCommissioning | DissolvedOxygenConcentrationMeasurement | -| DeviceTemperatureConfiguration | OperationalCredentials | BromateConcentrationMeasurement | -| Identify | GroupKeyManagement | ChloraminesConcentrationMeasurement | -| Groups | FixedLabel | ChlorineConcentrationMeasurement | -| Scenes | UserLabel | FecalColiformAndEColiConcentrationMeasurement | -| OnOff | ProxyConfiguration | FluorideConcentrationMeasurement | -| OnOffSwitchConfiguration | ProxyDiscovery | HaloaceticAcidsConcentrationMeasurement | -| LevelControl | ProxyValid | TotalTrihalomethanesConcentrationMeasurement | -| Alarms | BooleanState | TotalColiformBacteriaConcentrationMeasurement | -| Time | ModeSelect | TurbidityConcentrationMeasurement | -| BinaryInputBasic | ShadeConfiguration | CopperConcentrationMeasurement | -| PowerProfile | DoorLock | LeadConcentrationMeasurement | -| ApplianceControl | WindowCovering | ManganeseConcentrationMeasurement | -| PulseWidthModulation | BarrierControl | SulfateConcentrationMeasurement | -| Descriptor | PumpConfigurationAndControl | BromodichloromethaneConcentrationMeasurement | -| Binding | Thermostat | BromoformConcentrationMeasurement | -| AccessControl | FanControl | ChlorodibromomethaneConcentrationMeasurement | -| PollControl | DehumidificationControl | ChloroformConcentrationMeasurement | -| Actions | ThermostatUserInterfaceConfiguration | SodiumConcentrationMeasurement | -| Basic | ColorControl | IasZone | -| OtaSoftwareUpdateProvider | BallastConfiguration | IasAce | -| OtaSoftwareUpdateRequestor | IlluminanceMeasurement | IasWd | -| LocalizationConfiguration | TemperatureMeasurement | WakeOnLan | -| TimeFormatLocalization | PressureMeasurement | Channel | -| UnitLocalization | FlowMeasurement | TargetNavigator | -| PowerSourceConfiguration | RelativeHumidityMeasurement | MediaPlayback | -| PowerSource | OccupancySensing | MediaInput | -| GeneralCommissioning | CarbonMonoxideConcentrationMeasurement | LowPower | -| NetworkCommissioning | CarbonDioxideConcentrationMeasurement | KeypadInput | -| DiagnosticLogs | EthyleneConcentrationMeasurement | ContentLauncher | -| GeneralDiagnostics | EthyleneOxideConcentrationMeasurement | AudioOutput | -| SoftwareDiagnostics | HydrogenConcentrationMeasurement | ApplicationLauncher | -| ThreadNetworkDiagnostics | HydrogenSulphideConcentrationMeasurement | ApplicationBasic | -| WiFiNetworkDiagnostics | NitricOxideConcentrationMeasurement | AccountLogin | -| EthernetNetworkDiagnostics | NitrogenDioxideConcentrationMeasurement | TestCluster | -| TimeSynchronization | OxygenConcentrationMeasurement | Messaging | -| BridgedDeviceBasicInformation | OzoneConcentrationMeasurement | ApplianceIdentification | -| Switch | SulfurDioxideConcentrationMeasurement | MeterIdentification | - -

diff --git a/src/app/tests/suites/certification/information.py b/src/app/tests/suites/certification/information.py deleted file mode 100755 index bf5bbaa418bd30..00000000000000 --- a/src/app/tests/suites/certification/information.py +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2021 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. -# - -import argparse -import sys -from enum import Enum -from os import listdir, path - -import yaml - -# Test status description: -# * Missing: Tests has not been written yet (default) -# * Pending: Tests are not running in CI, and all tests are disabled -# * Partial: Tests are running in CI, but some tests are disabled -# * Complete: Tests are running in CI - - -class TestStatus(Enum): - missing = 1 - pending = 2 - partial = 3 - complete = 4 - - -class ArgOptions(Enum): - summary = 1 - unknown = 2 - missing = 3 - pending = 4 - partial = 5 - complete = 6 - - -def checkPythonVersion(): - if sys.version_info[0] < 3: - print('Must use Python 3. Current version is ' + - str(sys.version_info[0])) - exit(1) - - -def parseTestPlans(filepath): - tests_names = [] - tests_statuses = [] - - for name, test_plan in parseYaml(filepath)['Test Plans'].items(): - for section, tests in test_plan['tests'].items(): - for index, test in enumerate(tests): - test_name = '_'.join([ - 'Test_TC', - test_plan['shortname'], - str(section), - str(index + 1) - ]) - - tests_names.append(test_name) - tests_statuses.append(parseTestPlan(getPathFor(test_name))) - - return dict(zip(tests_names, tests_statuses)) - - -def parseTestPlan(filepath): - if not path.exists(filepath): - return TestStatus.missing - - is_pending_test = True - - for test_definition in parseYaml(filepath)['tests']: - if 'disabled' in test_definition: - if is_pending_test is False: - return TestStatus.partial - else: - is_pending_test = False - - if is_pending_test is True: - return TestStatus.pending - - return TestStatus.complete - - -def parseYaml(filepath): - with open(filepath) as file: - return yaml.load(file, Loader=yaml.FullLoader) - - -def getPathFor(filename): - return path.join(path.dirname(__file__), filename + '.yaml') - - -def printSummaryFor(name, summary): - count = summary[name] - total = summary['total'] - percent = round(count/total*100, 2) - print(' * ' + name.ljust(10) + ': ' + str(count).rjust(3) + - ' (' + str(percent).rjust(5) + '%)') - - -def printSummary(statuses): - summary = { - 'total': len(statuses), - 'missings': sum(TestStatus.missing == status for status in statuses.values()), - 'pendings': sum(TestStatus.pending == status for status in statuses.values()), - 'partials': sum(TestStatus.partial == status for status in statuses.values()), - 'completes': sum(TestStatus.complete == status for status in statuses.values()), - } - - print('Tests count: ', summary['total']) - printSummaryFor('missings', summary) - printSummaryFor('pendings', summary) - printSummaryFor('partials', summary) - printSummaryFor('completes', summary) - - -def printUnknown(statuses): - filtered = list(filter(lambda name: name.startswith( - 'Test_TC_'), listdir(path.dirname(__file__)))) - dir_test_names = [path.splitext(name)[0] for name in filtered] - - known_test_names = [name for name in statuses] - unknown_test_names = list( - filter(lambda name: name not in known_test_names, dir_test_names)) - - print('List of tests that are not part of the test plan:') - for name in unknown_test_names: - print(' *', name) - - -def printList(statuses, name): - filtered = dict( - filter(lambda item: TestStatus[name] == item[1], statuses.items())) - - print('List of tests with status:', name) - for name in filtered: - print(' *', name) - - -def main(): - checkPythonVersion() - - default_options = ArgOptions.summary.name - default_choices = [name for name in ArgOptions.__members__] - - parser = argparse.ArgumentParser( - description='Extract information from the set of certifications tests') - parser.add_argument('-s', '--show', default=default_options, choices=default_choices, - help='The information that needs to be returned from the test set') - args = parser.parse_args() - - statuses = parseTestPlans(getPathFor('tests')) - - if (ArgOptions.summary.name == args.show): - printSummary(statuses) - elif (ArgOptions.unknown.name == args.show): - printUnknown(statuses) - elif (args.show in ArgOptions.__members__): - printList(statuses, args.show) - else: - parser.print_help() - - -if __name__ == '__main__': - main() diff --git a/src/app/tests/suites/certification/tests.yaml b/src/app/tests/suites/certification/tests.yaml deleted file mode 100644 index 738b7be6619df1..00000000000000 --- a/src/app/tests/suites/certification/tests.yaml +++ /dev/null @@ -1,300 +0,0 @@ -# Copyright (c) 2021 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. - -name: Certification Tests - -Test Plans: - Bridge: - shortname: BR - tests: - 1: - - name: Basics of Bridging - 2: - - name: Changing the set of Bridged Devices - 3: - - name: Changing names - - Secure Channel: - shortname: SC - tests: - 1: - - name: MRP Retransmission Messaging - - name: MRP MAX Message Size - - name: MRP Message Flows - - name: MRP max number of failed attempts verification - - name: MRP message counter and duplicate messaging verification - 2: - - name: PASE Session Establishment - - name: PASE Bidirectional Connection Session Establishment - 3: - - name: CASE Session Establishment - - name: CASE Session Resumption - 4: - - name: Commissionable Node Discovery - Commissionee Case - - name: Commissionable Node Discovery - Commissioner Case - - name: Operational Discovery - Node - - name: Operational Discovery - Controller - - name: Operational Discovery - Thread Node - - name: Operational Discovery - Thread Controller - - name: Commissioner Discovery - Commissioner - - name: Commissioner Discovery - Commissionee - - Interaction Data Model: - shortname: IDM - tests: - 1: - - name: Invoke Request Action to DUT - - name: Invoke Response Action from DUT - 2: - - name: ReadRequestMessage to DUT test cases - - Multiple Administrators: - shortname: MA - tests: - 1: - - name: Administrator Behavior - - name: Node Behavior - - name: Commissioning window handling (negative test) - - Device Discovery: - shortname: DD - tests: - 1: - - name: QR Code Onboarding Payload Verification - - name: Manual Pairing Code Payload Verification - - name: NFC Onboarding Payload Verification - - name: Concatenation - QR Code Onboarding Payload Verification - - name: NFC Rules of advertisement and Onboarding - - name: QR Code Format and Label - - name: Setup Code Format and Label - - name: - QR Code Onboarding Payload Verification [DUT - Controller] - - name: - Manual Pairing Code Payload Verification [DUT - - Controller] - - name: NFC Onboarding Payload Verification [DUT - Controller] - - name: - Concatenation - QR Code Onboarding Payload Verification - [DUT - Controller] - 2: - - name: Announcement by device verification - - name: Discovery by commissioner verification - 3: - - name: Commissioning Flow - Concurrent - - name: Commissioning Flow - Non-concurrent - - name: User Directed Commissioning - Commissionee - - name: User Directed Commissioning - Commissioner - 4: - - name: Operational Certificate Authority Verification - - Device Management: - shortname: DM - tests: - 1: - - name: Basic Cluster Server Attributes - - name: Basic Cluster Events - - name: Basic Cluster Server Attributes [DUT - Controller] - 2: - - name: Operational Credential Commands - - name: Operational Credential Attributes - 3: - - name: Network Commissioning Attributes - - name: Network Commissioning Commands - - name: Network Commissioning Commands [DUT - Controller] - - Binary Input: - shortname: BI - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: Primary functionality with server as DUT - - Color Control: - shortname: CC - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - 3: - - name: Hue MoveTo functionality with server as DUT - - name: Hue Move functionality with server as DUT - - name: Hue Step functionality with server as DUT - 4: - - name: Saturation MoveTo functionality with server as DUT - - name: Saturation Move functionality with server as DUT - - name: Saturation Step functionality with server as DUT - - name: MoveToHueAndSaturation functionality with server as DUT - 5: - - name: Color MoveTo functionality with server as DUT - - name: Color Move functionality with server as DUT - - name: Color Step functionality with server as DUT - 6: - - name: - Color Temporature MoveTo functionality with server as DUT - - name: Color Temporature Move functionality with server as DUT - - name: Color Temporature Step functionality with server as DUT - 7: - - name: Enhanced MoveTo functionality with server as DUT - - name: Enhanced Move functionality with server as DUT - - name: Enhanced Step functionality with server as DUT - - name: - MoveToEnhancedHueAndSaturation functionality with server - as DUT - 8: - - name: Stop Move Step functionality with server as DUT - - Electrical Measurement: - shortname: EMR - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: Primary functionality with server as DUT - - Flow Measurement: - shortname: FLW - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: Primary functionality with server as DUT - - Level Control: - shortname: LVL - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: MoveToLevel Verification (DUT as Server) - 3: - - name: Move Verification (DUT as Server) - 4: - - name: Step Verification (DUT as Server) - 5: - - name: Stop Verification (DUT as Server) - - Media Control: - shortname: MC - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Low Power Mode Verification (DUT as Server) - 3: - - name: Navigation Keycode Verification - - name: Location Keys Verification - - name: Number Keys Verification - - name: Press And Hold Key Press Verification - - name: Catalog List Verification - - name: Current App Verification - - name: Launch Application Verification - - name: Input List Verification - - name: Select Input Verification - - name: Show and Hide Input Status Verification - - name: Rename Input Verification - 4: - - name: Wake-On LAN Verification - 5: - - name: List TV Channels Verification - - name: Change Channel by Number Verification - - name: Skip Channel Verification - - Occupancy Sensing: - shortname: OCC - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - OnOff: - shortname: OO - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: Primary functionality with server as DUT - - name: Secondary functionality with server as DUT - - Pressure Measurement: - shortname: PRS - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - Pump Configuration Control: - shortname: PCC - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - Relative Humidity Measurement: - shortname: RH - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: Primary functionality with server as DUT - - Temperature Measurement: - shortname: TM - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: Primary functionality with server as DUT - - Window Covering: - shortname: WNCV - tests: - 1: - - name: Global attributes with server as DUT - 2: - - name: Attributes with server as DUT - - name: ConfigStatus Attribute with server as DUT - - name: Mode Attribute with server as DUT - - name: Type Attribute with server as DUT - - name: EndProductType Attribute with server as DUT - 3: - - name: - UpOrOpen Command & Report Verification with server as DUT - - name: - DownOrClose Command & Report Verification with server as - DUT - - name: StopMotion Verification with server as DUT - - name: UpOrOpen Long-Run Verification with server as DUT - - name: DownOrClose Long-Run Verification with server as DUT - 4: - - name: - GoToLiftPercentage Long-Run Verification with server as - DUT - - name: - GoToTiltPercentage Long-Run Verification with server as - DUT - - name: - GoToLiftPercentage Limits Verification with server as DUT - - name: - GoToTiltPercentage Limits Verification with server as DUT diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 763e198f41fded..3072e8aafd2a7f 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -88,14 +88,12 @@ void emberAfInit() // them in. void MatterBallastConfigurationPluginServerInitCallback() {} void MatterBooleanStatePluginServerInitCallback() {} -void MatterElectricalMeasurementPluginServerInitCallback() {} void MatterRelativeHumidityMeasurementPluginServerInitCallback() {} void MatterIlluminanceMeasurementPluginServerInitCallback() {} void MatterBinaryInputBasicPluginServerInitCallback() {} void MatterPressureMeasurementPluginServerInitCallback() {} void MatterTemperatureMeasurementPluginServerInitCallback() {} void MatterFlowMeasurementPluginServerInitCallback() {} -void MatterOnOffSwitchConfigurationPluginServerInitCallback() {} void MatterThermostatUserInterfaceConfigurationPluginServerInitCallback() {} void MatterBridgedDeviceBasicInformationPluginServerInitCallback() {} void MatterPowerConfigurationPluginServerInitCallback() {} 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 93d6016ae48b59..386ba20c6d6982 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 @@ -2475,10 +2475,6 @@ limitations under the License. BINDING - - BarrierControlGoToPercent - BarrierControlStop - COLOR_CONTROL_CURRENT_HUE COLOR_CONTROL_CURRENT_SATURATION diff --git a/src/app/zap-templates/zcl/data-model/draft/README.md b/src/app/zap-templates/zcl/data-model/draft/README.md deleted file mode 100644 index 06d7e77df709e3..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Data Model Draft - -### What is this repo? - -This directory contains clusters and types that have not been specified yet. - -**IMPORTANT**: Adding a cluster code to the types in this folder will expose -them as if they are fully specified. diff --git a/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml deleted file mode 100644 index 282cb205020935..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - Barrier Control - Closures - 0x0103 - BARRIER_CONTROL_CLUSTER - This cluster provides control of a barrier (garage door). - - true - true - - barrier moving state - barrier safety status - barrier capabilities - barrier open events - barrier close events - barrier command open events - barrier command close events - barrier open period - barrier close period - barrier position - - - - Command to instruct a barrier to go to a percent open state. - - - - - - - Command that instructs the barrier to stop moving. - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml deleted file mode 100644 index e9246a1e3ff84d..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - Electrical Measurement - Home Automation - Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. - 0x0B04 - ELECTRICAL_MEASUREMENT_CLUSTER - - true - true - - - - measurement type - dc voltage - dc voltage min - dc voltage max - dc current - dc current min - dc current max - dc power - dc power min - dc power max - dc voltage multiplier - dc voltage divisor - dc current multiplier - dc current divisor - dc power multiplier - dc power divisor - ac frequency - ac frequency min - ac frequency max - neutral current - total active power - total reactive power - total apparent power - measured 1st harmonic current - measured 3rd harmonic current - measured 5th harmonic current - measured 7th harmonic current - measured 9th harmonic current - measured 11th harmonic current - measured phase 1st harmonic current - measured phase 3rd harmonic current - measured phase 5th harmonic current - measured phase 7th harmonic current - measured phase 9th harmonic current - measured phase 11th harmonic current - ac frequency multiplier - ac frequency divisor - power multiplier - power divisor - harmonic current multiplier - phase harmonic current multiplier - instantaneous voltage - instantaneous line current - instantaneous active current - instantaneous reactive current - instantaneous power - rms voltage - rms voltage min - rms voltage max - rms current - rms current min - rms current max - active power - active power min - active power max - reactive power - apparent power - power factor - average rms voltage measurement period - average rms under voltage counter - rms extreme over voltage period - rms extreme under voltage period - rms voltage sag period - rms voltage swell period - ac voltage multiplier - ac voltage divisor - ac current multiplier - ac current divisor - ac power multiplier - ac power divisor - overload alarms mask - voltage overload - current overload - ac overload alarms mask - ac voltage overload - ac current overload - ac active power overload - ac reactive power overload - average rms over voltage - average rms under voltage - rms extreme over voltage - rms extreme under voltage - rms voltage sag - rms voltage swell - line current phase b - active current phase b - reactive current phase b - rms voltage phase b - rms voltage min phase b - rms voltage max phase b - rms current phase b - rms current min phase b - rms current max phase b - active power phase b - active power min phase b - active power max phase b - reactive power phase b - apparent power phase b - power factor phase b - average rms voltage measurement period phase b - average rms over voltage counter phase b - average rms under voltage counter phase b - rms extreme over voltage period phase b - rms extreme under voltage period phase b - rms voltage sag period phase b - rms voltage swell period phase b - line current phase c - active current phase c - reactive current phase c - rms voltage phase c - rms voltage min phase c - rms voltage max phase c - rms current phase c - rms current min phase c - rms current max phase c - active power phase c - active power min phase c - active power max phase c - reactive power phase c - apparent power phase c - power factor phase c - average rms voltage measurement period phase c - average rms over voltage counter phase c - average rms under voltage counter phase c - rms extreme over voltage period phase c - rms extreme under voltage period phase c - rms voltage sag period phase c - rms voltage swell period phase c - - - - A function which returns the power profiling information requested in the GetProfileInfo command. The power profiling information consists of a list of attributes which are profiled along with the period used to profile them. - - - - - - - - - - A function which returns the electricity measurement profile. The electricity measurement profile includes information regarding the amount of time used to capture data related to the flow of electricity as well as the intervals thes - - - - - - - - - - - - A function which retrieves the power profiling information from the electrical measurement server. - - - - - - A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml b/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml deleted file mode 100644 index 132de384def242..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - Binary Input (Basic) - General - An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. - 0x000F - BINARY_INPUT_BASIC_CLUSTER - - true - true - - active text - description - inactive text - out of service - polarity - present value - reliability - status flags - application type - - diff --git a/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml deleted file mode 100644 index eb74be7c600b06..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - On/off Switch Configuration - General - Attributes and commands for configuring On/Off switching devices. - 0x0007 - ON_OFF_SWITCH_CONFIGURATION_CLUSTER - - true - true - - switch type - switch actions - - 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 46f78a177874f6..bc1a29c4b4aa3b 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -6,7 +6,6 @@ "xmlRoot": [ ".", "./data-model/chip/", - "./data-model/draft/", "./data-model/silabs/", "./data-model/test" ], @@ -22,7 +21,6 @@ "application-launcher-cluster.xml", "audio-output-cluster.xml", "ballast-configuration-cluster.xml", - "barrier-control-cluster.xml", "basic-information-cluster.xml", "binding-cluster.xml", "boolean-state-cluster.xml", @@ -51,7 +49,6 @@ "ecosystem-information-cluster.xml", "energy-preference-cluster.xml", "electrical-energy-measurement-cluster.xml", - "electrical-measurement-cluster.xml", "electrical-power-measurement-cluster.xml", "energy-evse-cluster.xml", "energy-evse-mode-cluster.xml", @@ -71,7 +68,6 @@ "icd-management-cluster.xml", "identify-cluster.xml", "illuminance-measurement-cluster.xml", - "input-output-value-clusters.xml", "keypad-input-cluster.xml", "laundry-washer-mode-cluster.xml", "laundry-dryer-controls-cluster.xml", @@ -89,7 +85,6 @@ "network-commissioning-cluster.xml", "occupancy-sensing-cluster.xml", "onoff-cluster.xml", - "onoff-switch-configuration-cluster.xml", "operational-credentials-cluster.xml", "operational-state-cluster.xml", "operational-state-oven-cluster.xml", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index de81dc8ba31c99..db4526e39cbbde 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -3,12 +3,7 @@ "category": "matter", "version": 1, "requiredFeatureLevel": 102, - "xmlRoot": [ - ".", - "./data-model/chip/", - "./data-model/draft/", - "./data-model/silabs/" - ], + "xmlRoot": [".", "./data-model/chip/", "./data-model/silabs/"], "_comment": "Ensure access-control-definitions.xml is first in xmlFile array", "xmlFile": [ "access-control-definitions.xml", @@ -21,7 +16,6 @@ "application-launcher-cluster.xml", "audio-output-cluster.xml", "ballast-configuration-cluster.xml", - "barrier-control-cluster.xml", "basic-information-cluster.xml", "binding-cluster.xml", "boolean-state-cluster.xml", @@ -48,7 +42,6 @@ "drlc-cluster.xml", "ecosystem-information-cluster.xml", "electrical-energy-measurement-cluster.xml", - "electrical-measurement-cluster.xml", "electrical-power-measurement-cluster.xml", "energy-evse-cluster.xml", "energy-evse-mode-cluster.xml", @@ -69,7 +62,6 @@ "icd-management-cluster.xml", "identify-cluster.xml", "illuminance-measurement-cluster.xml", - "input-output-value-clusters.xml", "keypad-input-cluster.xml", "laundry-washer-mode-cluster.xml", "laundry-dryer-controls-cluster.xml", @@ -86,7 +78,6 @@ "network-commissioning-cluster.xml", "occupancy-sensing-cluster.xml", "onoff-cluster.xml", - "onoff-switch-configuration-cluster.xml", "operational-credentials-cluster.xml", "operational-state-cluster.xml", "operational-state-oven-cluster.xml", diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json index e5f0ea9e2e892a..a047340147ece5 100644 --- a/src/app/zap_cluster_list.json +++ b/src/app/zap_cluster_list.json @@ -11,9 +11,7 @@ "APPLICATION_LAUNCHER_CLUSTER": [], "AUDIO_OUTPUT_CLUSTER": [], "BALLAST_CONFIGURATION_CLUSTER": [], - "BARRIER_CONTROL_CLUSTER": [], "BASIC_INFORMATION_CLUSTER": [], - "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": [], "BOOLEAN_STATE_CLUSTER": [], "BOOLEAN_STATE_CONFIGURATION_CLUSTER": [], @@ -39,7 +37,6 @@ "DOOR_LOCK_CLUSTER": [], "ECOSYSTEM_INFORMATION_CLUSTER": [], "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [], - "ELECTRICAL_MEASUREMENT_CLUSTER": [], "ELECTRICAL_POWER_MEASUREMENT_CLUSTER": [], "ENERGY_EVSE_CLUSTER": [], "ENERGY_EVSE_MODE_CLUSTER": [], @@ -55,7 +52,6 @@ "GROUP_KEY_MANAGEMENT_CLUSTER": [], "GROUPS_CLUSTER": [], "HEPA_FILTER_MONITORING_CLUSTER": [], - "IAS_ZONE_CLUSTER": [], "ICD_MANAGEMENT_CLUSTER": [], "IDENTIFY_CLUSTER": [], "ILLUMINANCE_MEASUREMENT_CLUSTER": [], @@ -74,7 +70,6 @@ "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER": [], "OCCUPANCY_SENSING_CLUSTER": [], "ON_OFF_CLUSTER": [], - "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], "OPERATIONAL_CREDENTIALS_CLUSTER": [], "OPERATIONAL_STATE_CLUSTER": [], "OPERATIONAL_STATE_OVEN_CLUSTER": [], @@ -136,8 +131,7 @@ "WATER_HEATER_MANAGEMENT_CLUSTER": [], "WATER_HEATER_MODE_CLUSTER": [], "WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [], - "WINDOW_COVERING_CLUSTER": [], - "ZLL_COMMISSIONING_CLUSTER": [] + "WINDOW_COVERING_CLUSTER": [] }, "ServerDirectories": { "ACCESS_CONTROL_CLUSTER": ["access-control-server"], @@ -155,9 +149,7 @@ "APPLICATION_LAUNCHER_CLUSTER": ["application-launcher-server"], "AUDIO_OUTPUT_CLUSTER": ["audio-output-server"], "BALLAST_CONFIGURATION_CLUSTER": [], - "BARRIER_CONTROL_CLUSTER": ["barrier-control-server"], "BASIC_INFORMATION_CLUSTER": ["basic-information"], - "BINARY_INPUT_BASIC_CLUSTER": [], "BINDING_CLUSTER": ["bindings"], "BOOLEAN_STATE_CLUSTER": [], "BOOLEAN_STATE_CONFIGURATION_CLUSTER": [ @@ -192,7 +184,6 @@ "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER": [ "electrical-energy-measurement-server" ], - "ELECTRICAL_MEASUREMENT_CLUSTER": [], "ELECTRICAL_POWER_MEASUREMENT_CLUSTER": [ "electrical-power-measurement-server" ], @@ -214,7 +205,6 @@ "GROUPS_CLUSTER": ["groups-server"], "HEPA_FILTER_MONITORING_CLUSTER": ["resource-monitoring-server"], "GROUP_KEY_MANAGEMENT_CLUSTER": ["group-key-mgmt-server"], - "IAS_ZONE_CLUSTER": [], "ICD_MANAGEMENT_CLUSTER": ["icd-management-server"], "IDENTIFY_CLUSTER": ["identify-server"], "ILLUMINANCE_MEASUREMENT_CLUSTER": [], @@ -238,7 +228,6 @@ "OCCUPANCY_SENSING_CLUSTER": ["occupancy-sensor-server"], "ON_OFF_CLUSTER": ["on-off-server"], "POWER_TOPOLOGY_CLUSTER": ["power-topology-server"], - "ON_OFF_SWITCH_CONFIGURATION_CLUSTER": [], "OPERATIONAL_CREDENTIALS_CLUSTER": ["operational-credentials-server"], "OPERATIONAL_STATE_CLUSTER": ["operational-state-server"], "OPERATIONAL_STATE_OVEN_CLUSTER": ["operational-state-server"], @@ -323,7 +312,6 @@ "WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"], "WINDOW_COVERING_CLUSTER": ["window-covering-server"], "WATER_HEATER_MANAGEMENT_CLUSTER": ["water-heater-management-server"], - "WATER_HEATER_MODE_CLUSTER": ["mode-base-server"], - "ZLL_COMMISSIONING_CLUSTER": [] + "WATER_HEATER_MODE_CLUSTER": ["mode-base-server"] } } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 0a2a04ee0e420c..1ba56719ab4549 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -433,20 +433,6 @@ cluster OnOff = 6 { command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } -/** Attributes and commands for configuring On/Off switching devices. */ -deprecated cluster OnOffSwitchConfiguration = 7 { - revision 1; // NOTE: Default/not specifically set - - readonly attribute enum8 switchType = 0; - attribute enum8 switchActions = 16; - 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; -} - /** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ cluster LevelControl = 8 { revision 6; @@ -572,27 +558,6 @@ cluster LevelControl = 8 { command MoveToClosestFrequency(MoveToClosestFrequencyRequest): DefaultSuccess = 8; } -/** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -deprecated cluster BinaryInputBasic = 15 { - revision 1; // NOTE: Default/not specifically set - - attribute optional char_string<16> activeText = 4; - attribute optional char_string<16> description = 28; - attribute optional char_string<16> inactiveText = 46; - attribute boolean outOfService = 81; - readonly attribute optional enum8 polarity = 84; - attribute boolean presentValue = 85; - attribute optional enum8 reliability = 103; - readonly attribute bitmap8 statusFlags = 111; - readonly attribute optional int32u applicationType = 256; - 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; -} - /** Cluster to control pulse width modulation */ deprecated cluster PulseWidthModulation = 28 { revision 1; // NOTE: Default/not specifically set @@ -6512,48 +6477,6 @@ cluster WindowCovering = 258 { command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; } -/** This cluster provides control of a barrier (garage door). */ -deprecated cluster BarrierControl = 259 { - revision 1; // NOTE: Default/not specifically set - - bitmap BarrierControlCapabilities : bitmap8 { - kPartialBarrier = 0x1; - } - - bitmap BarrierControlSafetyStatus : bitmap16 { - kRemoteLockout = 0x1; - kTemperDetected = 0x2; - kFailedCommunication = 0x4; - kPositionFailure = 0x8; - } - - readonly attribute enum8 barrierMovingState = 1; - readonly attribute bitmap16 barrierSafetyStatus = 2; - readonly attribute bitmap8 barrierCapabilities = 3; - attribute optional int16u barrierOpenEvents = 4; - attribute optional int16u barrierCloseEvents = 5; - attribute optional int16u barrierCommandOpenEvents = 6; - attribute optional int16u barrierCommandCloseEvents = 7; - attribute optional int16u barrierOpenPeriod = 8; - attribute optional int16u barrierClosePeriod = 9; - readonly attribute int8u barrierPosition = 10; - 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 BarrierControlGoToPercentRequest { - int8u percentOpen = 0; - } - - /** Command to instruct a barrier to go to a percent open state. */ - command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; - /** Command that instructs the barrier to stop moving. */ - command BarrierControlStop(): DefaultSuccess = 1; -} - /** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */ provisional cluster ServiceArea = 336 { revision 1; @@ -9570,173 +9493,6 @@ provisional cluster CommissionerControl = 1873 { command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1; } -/** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -deprecated cluster ElectricalMeasurement = 2820 { - revision 3; - - readonly attribute optional bitmap32 measurementType = 0; - readonly attribute optional int16s dcVoltage = 256; - readonly attribute optional int16s dcVoltageMin = 257; - readonly attribute optional int16s dcVoltageMax = 258; - readonly attribute optional int16s dcCurrent = 259; - readonly attribute optional int16s dcCurrentMin = 260; - readonly attribute optional int16s dcCurrentMax = 261; - readonly attribute optional int16s dcPower = 262; - readonly attribute optional int16s dcPowerMin = 263; - readonly attribute optional int16s dcPowerMax = 264; - readonly attribute optional int16u dcVoltageMultiplier = 512; - readonly attribute optional int16u dcVoltageDivisor = 513; - readonly attribute optional int16u dcCurrentMultiplier = 514; - readonly attribute optional int16u dcCurrentDivisor = 515; - readonly attribute optional int16u dcPowerMultiplier = 516; - readonly attribute optional int16u dcPowerDivisor = 517; - readonly attribute optional int16u acFrequency = 768; - readonly attribute optional int16u acFrequencyMin = 769; - readonly attribute optional int16u acFrequencyMax = 770; - readonly attribute optional int16u neutralCurrent = 771; - readonly attribute optional int32s totalActivePower = 772; - readonly attribute optional int32s totalReactivePower = 773; - readonly attribute optional int32u totalApparentPower = 774; - readonly attribute optional int16s measured1stHarmonicCurrent = 775; - readonly attribute optional int16s measured3rdHarmonicCurrent = 776; - readonly attribute optional int16s measured5thHarmonicCurrent = 777; - readonly attribute optional int16s measured7thHarmonicCurrent = 778; - readonly attribute optional int16s measured9thHarmonicCurrent = 779; - readonly attribute optional int16s measured11thHarmonicCurrent = 780; - readonly attribute optional int16s measuredPhase1stHarmonicCurrent = 781; - readonly attribute optional int16s measuredPhase3rdHarmonicCurrent = 782; - readonly attribute optional int16s measuredPhase5thHarmonicCurrent = 783; - readonly attribute optional int16s measuredPhase7thHarmonicCurrent = 784; - readonly attribute optional int16s measuredPhase9thHarmonicCurrent = 785; - readonly attribute optional int16s measuredPhase11thHarmonicCurrent = 786; - readonly attribute optional int16u acFrequencyMultiplier = 1024; - readonly attribute optional int16u acFrequencyDivisor = 1025; - readonly attribute optional int32u powerMultiplier = 1026; - readonly attribute optional int32u powerDivisor = 1027; - readonly attribute optional int8s harmonicCurrentMultiplier = 1028; - readonly attribute optional int8s phaseHarmonicCurrentMultiplier = 1029; - readonly attribute optional int16s instantaneousVoltage = 1280; - readonly attribute optional int16u instantaneousLineCurrent = 1281; - readonly attribute optional int16s instantaneousActiveCurrent = 1282; - readonly attribute optional int16s instantaneousReactiveCurrent = 1283; - readonly attribute optional int16s instantaneousPower = 1284; - readonly attribute optional int16u rmsVoltage = 1285; - readonly attribute optional int16u rmsVoltageMin = 1286; - readonly attribute optional int16u rmsVoltageMax = 1287; - readonly attribute optional int16u rmsCurrent = 1288; - readonly attribute optional int16u rmsCurrentMin = 1289; - readonly attribute optional int16u rmsCurrentMax = 1290; - readonly attribute optional int16s activePower = 1291; - readonly attribute optional int16s activePowerMin = 1292; - readonly attribute optional int16s activePowerMax = 1293; - readonly attribute optional int16s reactivePower = 1294; - readonly attribute optional int16u apparentPower = 1295; - readonly attribute optional int8s powerFactor = 1296; - attribute optional int16u averageRmsVoltageMeasurementPeriod = 1297; - attribute optional int16u averageRmsUnderVoltageCounter = 1299; - attribute optional int16u rmsExtremeOverVoltagePeriod = 1300; - attribute optional int16u rmsExtremeUnderVoltagePeriod = 1301; - attribute optional int16u rmsVoltageSagPeriod = 1302; - attribute optional int16u rmsVoltageSwellPeriod = 1303; - readonly attribute optional int16u acVoltageMultiplier = 1536; - readonly attribute optional int16u acVoltageDivisor = 1537; - readonly attribute optional int16u acCurrentMultiplier = 1538; - readonly attribute optional int16u acCurrentDivisor = 1539; - readonly attribute optional int16u acPowerMultiplier = 1540; - readonly attribute optional int16u acPowerDivisor = 1541; - attribute optional bitmap8 overloadAlarmsMask = 1792; - readonly attribute optional int16s voltageOverload = 1793; - readonly attribute optional int16s currentOverload = 1794; - attribute optional bitmap16 acOverloadAlarmsMask = 2048; - readonly attribute optional int16s acVoltageOverload = 2049; - readonly attribute optional int16s acCurrentOverload = 2050; - readonly attribute optional int16s acActivePowerOverload = 2051; - readonly attribute optional int16s acReactivePowerOverload = 2052; - readonly attribute optional int16s averageRmsOverVoltage = 2053; - readonly attribute optional int16s averageRmsUnderVoltage = 2054; - readonly attribute optional int16s rmsExtremeOverVoltage = 2055; - readonly attribute optional int16s rmsExtremeUnderVoltage = 2056; - readonly attribute optional int16s rmsVoltageSag = 2057; - readonly attribute optional int16s rmsVoltageSwell = 2058; - readonly attribute optional int16u lineCurrentPhaseB = 2305; - readonly attribute optional int16s activeCurrentPhaseB = 2306; - readonly attribute optional int16s reactiveCurrentPhaseB = 2307; - readonly attribute optional int16u rmsVoltagePhaseB = 2309; - readonly attribute optional int16u rmsVoltageMinPhaseB = 2310; - readonly attribute optional int16u rmsVoltageMaxPhaseB = 2311; - readonly attribute optional int16u rmsCurrentPhaseB = 2312; - readonly attribute optional int16u rmsCurrentMinPhaseB = 2313; - readonly attribute optional int16u rmsCurrentMaxPhaseB = 2314; - readonly attribute optional int16s activePowerPhaseB = 2315; - readonly attribute optional int16s activePowerMinPhaseB = 2316; - readonly attribute optional int16s activePowerMaxPhaseB = 2317; - readonly attribute optional int16s reactivePowerPhaseB = 2318; - readonly attribute optional int16u apparentPowerPhaseB = 2319; - readonly attribute optional int8s powerFactorPhaseB = 2320; - readonly attribute optional int16u averageRmsVoltageMeasurementPeriodPhaseB = 2321; - readonly attribute optional int16u averageRmsOverVoltageCounterPhaseB = 2322; - readonly attribute optional int16u averageRmsUnderVoltageCounterPhaseB = 2323; - readonly attribute optional int16u rmsExtremeOverVoltagePeriodPhaseB = 2324; - readonly attribute optional int16u rmsExtremeUnderVoltagePeriodPhaseB = 2325; - readonly attribute optional int16u rmsVoltageSagPeriodPhaseB = 2326; - readonly attribute optional int16u rmsVoltageSwellPeriodPhaseB = 2327; - readonly attribute optional int16u lineCurrentPhaseC = 2561; - readonly attribute optional int16s activeCurrentPhaseC = 2562; - readonly attribute optional int16s reactiveCurrentPhaseC = 2563; - readonly attribute optional int16u rmsVoltagePhaseC = 2565; - readonly attribute optional int16u rmsVoltageMinPhaseC = 2566; - readonly attribute optional int16u rmsVoltageMaxPhaseC = 2567; - readonly attribute optional int16u rmsCurrentPhaseC = 2568; - readonly attribute optional int16u rmsCurrentMinPhaseC = 2569; - readonly attribute optional int16u rmsCurrentMaxPhaseC = 2570; - readonly attribute optional int16s activePowerPhaseC = 2571; - readonly attribute optional int16s activePowerMinPhaseC = 2572; - readonly attribute optional int16s activePowerMaxPhaseC = 2573; - readonly attribute optional int16s reactivePowerPhaseC = 2574; - readonly attribute optional int16u apparentPowerPhaseC = 2575; - readonly attribute optional int8s powerFactorPhaseC = 2576; - readonly attribute optional int16u averageRmsVoltageMeasurementPeriodPhaseC = 2577; - readonly attribute optional int16u averageRmsOverVoltageCounterPhaseC = 2578; - readonly attribute optional int16u averageRmsUnderVoltageCounterPhaseC = 2579; - readonly attribute optional int16u rmsExtremeOverVoltagePeriodPhaseC = 2580; - readonly attribute optional int16u rmsExtremeUnderVoltagePeriodPhaseC = 2581; - readonly attribute optional int16u rmsVoltageSagPeriodPhaseC = 2582; - readonly attribute optional int16u rmsVoltageSwellPeriodPhaseC = 2583; - 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; - - response struct GetProfileInfoResponseCommand = 0 { - int8u profileCount = 0; - enum8 profileIntervalPeriod = 1; - int8u maxNumberOfIntervals = 2; - int16u listOfAttributes[] = 3; - } - - response struct GetMeasurementProfileResponseCommand = 1 { - int32u startTime = 0; - enum8 status = 1; - enum8 profileIntervalPeriod = 2; - int8u numberOfIntervalsDelivered = 3; - int16u attributeId = 4; - int8u intervals[] = 5; - } - - request struct GetMeasurementProfileCommandRequest { - int16u attributeId = 0; - int32u startTime = 1; - enum8 numberOfIntervals = 2; - } - - /** A function which retrieves the power profiling information from the electrical measurement server. */ - command GetProfileInfoCommand(): DefaultSuccess = 0; - /** A function which retrieves an electricity measurement profile from the electricity measurement server for a specific attribute Id requested. */ - command GetMeasurementProfileCommand(GetMeasurementProfileCommandRequest): DefaultSuccess = 1; -} - /** 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/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 32b6ea18fc8fb8..1a1f8539267101 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -85,24 +85,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -193,24 +175,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -269,51 +233,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off Switch Configuration", - "code": 7, - "mfgCode": null, - "define": "ON_OFF_SWITCH_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -388,67 +307,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Binary Input (Basic)", - "code": 15, - "mfgCode": null, - "define": "BINARY_INPUT_BASIC_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -457,25 +315,7 @@ "mfgCode": null, "define": "DESCRIPTOR_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Binding", @@ -483,25 +323,7 @@ "mfgCode": null, "define": "BINDING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Access Control", @@ -509,25 +331,7 @@ "mfgCode": null, "define": "ACCESS_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Actions", @@ -633,24 +437,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -659,25 +445,7 @@ "mfgCode": null, "define": "BASIC_INFORMATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "OTA Software Update Provider", @@ -727,24 +495,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -763,24 +513,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -813,25 +545,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Power Source", @@ -839,25 +553,7 @@ "mfgCode": null, "define": "POWER_SOURCE_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "General Commissioning", @@ -915,40 +611,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1031,40 +693,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1109,24 +737,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1145,40 +755,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1197,40 +773,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1249,24 +791,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1285,40 +809,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1377,40 +867,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -1419,25 +875,7 @@ "mfgCode": null, "define": "BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Switch", @@ -1445,25 +883,7 @@ "mfgCode": null, "define": "SWITCH_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Administrator Commissioning", @@ -1497,24 +917,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1621,24 +1023,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1697,24 +1081,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -1723,25 +1089,7 @@ "mfgCode": null, "define": "FIXED_LABEL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "User Label", @@ -1757,25 +1105,7 @@ "mfgCode": null, "define": "BOOLEAN_STATE_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "ICD Management", @@ -1825,40 +1155,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -1886,40 +1182,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -1928,41 +1190,7 @@ "mfgCode": null, "define": "OPERATIONAL_STATE_OVEN_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Oven Mode", @@ -1988,40 +1216,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2030,41 +1224,7 @@ "mfgCode": null, "define": "LAUNDRY_DRYER_CONTROLS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Mode Select", @@ -2082,40 +1242,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2142,40 +1268,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2202,40 +1294,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2244,41 +1302,7 @@ "mfgCode": null, "define": "LAUNDRY_WASHER_CONTROLS_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "RVC Run Mode", @@ -2304,40 +1328,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2364,40 +1354,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2416,40 +1372,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2458,41 +1380,7 @@ "mfgCode": null, "define": "REFRIGERATOR_ALARM_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Dishwasher Mode", @@ -2518,40 +1406,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2560,41 +1414,7 @@ "mfgCode": null, "define": "AIR_QUALITY_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Smoke CO Alarm", @@ -2612,24 +1432,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -2648,40 +1450,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2690,41 +1458,7 @@ "mfgCode": null, "define": "MICROWAVE_OVEN_MODE_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Microwave Oven Control", @@ -2742,40 +1476,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -2784,41 +1484,7 @@ "mfgCode": null, "define": "OPERATIONAL_STATE_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "RVC Operational State", @@ -2852,40 +1518,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3001,24 +1633,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3027,41 +1641,7 @@ "mfgCode": null, "define": "HEPA_FILTER_MONITORING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Activated Carbon Filter Monitoring", @@ -3069,41 +1649,7 @@ "mfgCode": null, "define": "ACTIVATED_CARBON_FILTER_MONITORING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Electrical Power Measurement", @@ -3111,41 +1657,7 @@ "mfgCode": null, "define": "ELECTRICAL_POWER_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Electrical Energy Measurement", @@ -3153,41 +1665,7 @@ "mfgCode": null, "define": "ELECTRICAL_ENERGY_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Water Heater Management", @@ -3214,40 +1692,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3257,41 +1701,7 @@ "define": "DEVICE_ENERGY_MANAGEMENT_CLUSTER", "side": "client", "enabled": 1, - "apiMaturity": "provisional", - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "apiMaturity": "provisional" }, { "name": "Energy EVSE", @@ -3317,40 +1727,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3359,41 +1735,7 @@ "mfgCode": null, "define": "POWER_TOPOLOGY_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Energy EVSE Mode", @@ -3419,40 +1761,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3479,40 +1787,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3540,40 +1814,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -3776,24 +2016,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3860,69 +2082,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "deprecated", - "commands": [ - { - "name": "BarrierControlGoToPercent", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "BarrierControlStop", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -3931,41 +2090,7 @@ "mfgCode": null, "define": "PUMP_CONFIGURATION_AND_CONTROL_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thermostat", @@ -4015,24 +2140,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4049,25 +2156,7 @@ "mfgCode": null, "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Color Control", @@ -4229,24 +2318,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "7", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4256,41 +2327,7 @@ "define": "BALLAST_CONFIGURATION_CLUSTER", "side": "client", "enabled": 1, - "apiMaturity": "provisional", - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "apiMaturity": "provisional" }, { "name": "Illuminance Measurement", @@ -4298,25 +2335,7 @@ "mfgCode": null, "define": "ILLUMINANCE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Temperature Measurement", @@ -4324,25 +2343,7 @@ "mfgCode": null, "define": "TEMPERATURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Pressure Measurement", @@ -4350,25 +2351,7 @@ "mfgCode": null, "define": "PRESSURE_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Flow Measurement", @@ -4376,25 +2359,7 @@ "mfgCode": null, "define": "FLOW_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Relative Humidity Measurement", @@ -4402,25 +2367,7 @@ "mfgCode": null, "define": "RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Occupancy Sensing", @@ -4428,25 +2375,7 @@ "mfgCode": null, "define": "OCCUPANCY_SENSING_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Carbon Monoxide Concentration Measurement", @@ -4454,41 +2383,7 @@ "mfgCode": null, "define": "CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Carbon Dioxide Concentration Measurement", @@ -4496,41 +2391,7 @@ "mfgCode": null, "define": "CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Nitrogen Dioxide Concentration Measurement", @@ -4538,41 +2399,7 @@ "mfgCode": null, "define": "NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Ozone Concentration Measurement", @@ -4580,41 +2407,7 @@ "mfgCode": null, "define": "OZONE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "PM2.5 Concentration Measurement", @@ -4622,41 +2415,7 @@ "mfgCode": null, "define": "PM2_5_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Formaldehyde Concentration Measurement", @@ -4664,41 +2423,7 @@ "mfgCode": null, "define": "FORMALDEHYDE_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "PM1 Concentration Measurement", @@ -4706,41 +2431,7 @@ "mfgCode": null, "define": "PM1_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "PM10 Concentration Measurement", @@ -4748,41 +2439,7 @@ "mfgCode": null, "define": "PM10_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Total Volatile Organic Compounds Concentration Measurement", @@ -4790,41 +2447,7 @@ "mfgCode": null, "define": "TVOC_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Radon Concentration Measurement", @@ -4832,41 +2455,7 @@ "mfgCode": null, "define": "RADON_CONCENTRATION_MEASUREMENT_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Thread Border Router Management", @@ -4901,40 +2490,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -4978,40 +2533,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] }, { @@ -5020,25 +2541,7 @@ "mfgCode": null, "define": "WAKE_ON_LAN_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Channel", @@ -5080,24 +2583,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5124,24 +2609,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5248,24 +2715,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5308,24 +2757,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5344,24 +2775,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5388,24 +2801,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5440,24 +2835,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5484,24 +2861,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5544,24 +2903,6 @@ "isIncoming": 1, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5570,25 +2911,7 @@ "mfgCode": null, "define": "APPLICATION_BASIC_CLUSTER", "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "enabled": 1 }, { "name": "Account Login", @@ -5630,51 +2953,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Electrical Measurement", - "code": 2820, - "mfgCode": null, - "define": "ELECTRICAL_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 1, - "apiMaturity": "deprecated", - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5894,24 +3172,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } ] }, { @@ -5946,40 +3206,6 @@ "isIncoming": 0, "isEnabled": 1 } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } ] } ] diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index ce3d602f1f89b6..2ce04c328ded6f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -1504,262 +1504,6 @@ public void onSuccess(byte[] tlv) { } } - public static class OnOffSwitchConfigurationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 7L; - - private static final long SWITCH_TYPE_ATTRIBUTE_ID = 0L; - private static final long SWITCH_ACTIONS_ATTRIBUTE_ID = 16L; - 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 OnOffSwitchConfigurationCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readSwitchTypeAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_TYPE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SWITCH_TYPE_ATTRIBUTE_ID, true); - } - - public void subscribeSwitchTypeAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_TYPE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SWITCH_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSwitchActionsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_ACTIONS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SWITCH_ACTIONS_ATTRIBUTE_ID, true); - } - - public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value) { - writeSwitchActionsAttribute(callback, value, 0); - } - - public void writeSwitchActionsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), SWITCH_ACTIONS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeSwitchActionsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SWITCH_ACTIONS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SWITCH_ACTIONS_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 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 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 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 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 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 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 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 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 LevelControlCluster extends BaseChipCluster { public static final long CLUSTER_ID = 8L; @@ -2686,18 +2430,9 @@ public void onSuccess(byte[] tlv) { } } - public static class BinaryInputBasicCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 15L; - - private static final long ACTIVE_TEXT_ATTRIBUTE_ID = 4L; - private static final long DESCRIPTION_ATTRIBUTE_ID = 28L; - private static final long INACTIVE_TEXT_ATTRIBUTE_ID = 46L; - private static final long OUT_OF_SERVICE_ATTRIBUTE_ID = 81L; - private static final long POLARITY_ATTRIBUTE_ID = 84L; - private static final long PRESENT_VALUE_ATTRIBUTE_ID = 85L; - private static final long RELIABILITY_ATTRIBUTE_ID = 103L; - private static final long STATUS_FLAGS_ATTRIBUTE_ID = 111L; - private static final long APPLICATION_TYPE_ATTRIBUTE_ID = 256L; + public static class PulseWidthModulationCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 28L; + 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; @@ -2705,488 +2440,7 @@ public static class BinaryInputBasicCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public BinaryInputBasicCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readActiveTextAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_TEXT_ATTRIBUTE_ID, true); - } - - public void writeActiveTextAttribute(DefaultClusterCallback callback, String value) { - writeActiveTextAttribute(callback, value, 0); - } - - public void writeActiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), ACTIVE_TEXT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeActiveTextAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_TEXT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_TEXT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDescriptionAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DESCRIPTION_ATTRIBUTE_ID, true); - } - - public void writeDescriptionAttribute(DefaultClusterCallback callback, String value) { - writeDescriptionAttribute(callback, value, 0); - } - - public void writeDescriptionAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), DESCRIPTION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeDescriptionAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DESCRIPTION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DESCRIPTION_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInactiveTextAttribute( - CharStringAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INACTIVE_TEXT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INACTIVE_TEXT_ATTRIBUTE_ID, true); - } - - public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value) { - writeInactiveTextAttribute(callback, value, 0); - } - - public void writeInactiveTextAttribute(DefaultClusterCallback callback, String value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new StringType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), INACTIVE_TEXT_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeInactiveTextAttribute( - CharStringAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INACTIVE_TEXT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - String value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INACTIVE_TEXT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOutOfServiceAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUT_OF_SERVICE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OUT_OF_SERVICE_ATTRIBUTE_ID, true); - } - - public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value) { - writeOutOfServiceAttribute(callback, value, 0); - } - - public void writeOutOfServiceAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new BooleanType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), OUT_OF_SERVICE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOutOfServiceAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OUT_OF_SERVICE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OUT_OF_SERVICE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPolarityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POLARITY_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POLARITY_ATTRIBUTE_ID, true); - } - - public void subscribePolarityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POLARITY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POLARITY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPresentValueAttribute( - BooleanAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESENT_VALUE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PRESENT_VALUE_ATTRIBUTE_ID, true); - } - - public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value) { - writePresentValueAttribute(callback, value, 0); - } - - public void writePresentValueAttribute(DefaultClusterCallback callback, Boolean value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new BooleanType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), PRESENT_VALUE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribePresentValueAttribute( - BooleanAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESENT_VALUE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PRESENT_VALUE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReliabilityAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RELIABILITY_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RELIABILITY_ATTRIBUTE_ID, true); - } - - public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value) { - writeReliabilityAttribute(callback, value, 0); - } - - public void writeReliabilityAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), RELIABILITY_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeReliabilityAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RELIABILITY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RELIABILITY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readStatusFlagsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_FLAGS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, STATUS_FLAGS_ATTRIBUTE_ID, true); - } - - public void subscribeStatusFlagsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, STATUS_FLAGS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, STATUS_FLAGS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readApplicationTypeAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_TYPE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPLICATION_TYPE_ATTRIBUTE_ID, true); - } - - public void subscribeApplicationTypeAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPLICATION_TYPE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPLICATION_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 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 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 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 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 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 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 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 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 PulseWidthModulationCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 28L; - - 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 PulseWidthModulationCluster(long devicePtr, int endpointId) { + public PulseWidthModulationCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -38492,19 +37746,15 @@ public void onSuccess(byte[] tlv) { } } - public static class BarrierControlCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 259L; - - private static final long BARRIER_MOVING_STATE_ATTRIBUTE_ID = 1L; - private static final long BARRIER_SAFETY_STATUS_ATTRIBUTE_ID = 2L; - private static final long BARRIER_CAPABILITIES_ATTRIBUTE_ID = 3L; - private static final long BARRIER_OPEN_EVENTS_ATTRIBUTE_ID = 4L; - private static final long BARRIER_CLOSE_EVENTS_ATTRIBUTE_ID = 5L; - private static final long BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE_ID = 6L; - private static final long BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE_ID = 7L; - private static final long BARRIER_OPEN_PERIOD_ATTRIBUTE_ID = 8L; - private static final long BARRIER_CLOSE_PERIOD_ATTRIBUTE_ID = 9L; - private static final long BARRIER_POSITION_ATTRIBUTE_ID = 10L; + public static class ServiceAreaCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 336L; + + private static final long SUPPORTED_AREAS_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_MAPS_ATTRIBUTE_ID = 1L; + private static final long SELECTED_AREAS_ATTRIBUTE_ID = 2L; + private static final long CURRENT_AREA_ATTRIBUTE_ID = 3L; + private static final long ESTIMATED_END_TIME_ATTRIBUTE_ID = 4L; + private static final long PROGRESS_ATTRIBUTE_ID = 5L; 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; @@ -38512,7 +37762,7 @@ public static class BarrierControlCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public BarrierControlCluster(long devicePtr, int endpointId) { + public ServiceAreaCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -38522,831 +37772,282 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void barrierControlGoToPercent(DefaultClusterCallback callback, Integer percentOpen) { - barrierControlGoToPercent(callback, percentOpen, 0); + public void selectAreas(SelectAreasResponseCallback callback, ArrayList newAreas) { + selectAreas(callback, newAreas, 0); } - public void barrierControlGoToPercent(DefaultClusterCallback callback, Integer percentOpen, int timedInvokeTimeoutMs) { + public void selectAreas(SelectAreasResponseCallback callback, ArrayList newAreas, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long percentOpenFieldID = 0L; - BaseTLVType percentOpentlvValue = new UIntType(percentOpen); - elements.add(new StructElement(percentOpenFieldID, percentOpentlvValue)); + final long newAreasFieldID = 0L; + BaseTLVType newAreastlvValue = ArrayType.generateArrayType(newAreas, (elementnewAreas) -> new UIntType(elementnewAreas)); + elements.add(new StructElement(newAreasFieldID, newAreastlvValue)); StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + String statusText = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = castingValue.value(String.class); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void barrierControlStop(DefaultClusterCallback callback) { - barrierControlStop(callback, 0); + public void skipArea(SkipAreaResponseCallback callback, Long skippedArea) { + skipArea(callback, skippedArea, 0); } - public void barrierControlStop(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public void skipArea(SkipAreaResponseCallback callback, Long skippedArea, int timedInvokeTimeoutMs) { + final long commandId = 2L; ArrayList elements = new ArrayList<>(); + final long skippedAreaFieldID = 0L; + BaseTLVType skippedAreatlvValue = new UIntType(skippedArea); + elements.add(new StructElement(skippedAreaFieldID, skippedAreatlvValue)); + StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long statusFieldID = 0L; + Integer status = null; + final long statusTextFieldID = 1L; + String statusText = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == statusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + status = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == statusTextFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + statusText = castingValue.value(String.class); + } + } + } + callback.onSuccess(status, statusText); }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface SelectAreasResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, String statusText); } - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface SkipAreaResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, String statusText); } - public void readBarrierMovingStateAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_MOVING_STATE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_MOVING_STATE_ATTRIBUTE_ID, true); + public interface SupportedAreasAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeBarrierMovingStateAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_MOVING_STATE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_MOVING_STATE_ATTRIBUTE_ID, minInterval, maxInterval); + public interface SupportedMapsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readBarrierSafetyStatusAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_SAFETY_STATUS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_SAFETY_STATUS_ATTRIBUTE_ID, true); + public interface SelectedAreasAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeBarrierSafetyStatusAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_SAFETY_STATUS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_SAFETY_STATUS_ATTRIBUTE_ID, minInterval, maxInterval); + public interface CurrentAreaAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); } - public void readBarrierCapabilitiesAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_CAPABILITIES_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_CAPABILITIES_ATTRIBUTE_ID, true); + public interface EstimatedEndTimeAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); } - public void subscribeBarrierCapabilitiesAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_CAPABILITIES_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_CAPABILITIES_ATTRIBUTE_ID, minInterval, maxInterval); + public interface ProgressAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readBarrierOpenEventsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_OPEN_EVENTS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_OPEN_EVENTS_ATTRIBUTE_ID, true); + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void writeBarrierOpenEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierOpenEventsAttribute(callback, value, 0); + public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void writeBarrierOpenEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BARRIER_OPEN_EVENTS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + public interface EventListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void subscribeBarrierOpenEventsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_OPEN_EVENTS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, BARRIER_OPEN_EVENTS_ATTRIBUTE_ID, minInterval, maxInterval); + public interface AttributeListAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } - public void readBarrierCloseEventsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_CLOSE_EVENTS_ATTRIBUTE_ID); + public void readSupportedAreasAttribute( + SupportedAreasAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_AREAS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_CLOSE_EVENTS_ATTRIBUTE_ID, true); - } - - public void writeBarrierCloseEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierCloseEventsAttribute(callback, value, 0); - } - - public void writeBarrierCloseEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BARRIER_CLOSE_EVENTS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, SUPPORTED_AREAS_ATTRIBUTE_ID, true); } - public void subscribeBarrierCloseEventsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_CLOSE_EVENTS_ATTRIBUTE_ID); + public void subscribeSupportedAreasAttribute( + SupportedAreasAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_AREAS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_CLOSE_EVENTS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_AREAS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBarrierCommandOpenEventsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE_ID); + public void readSupportedMapsAttribute( + SupportedMapsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MAPS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE_ID, true); - } - - public void writeBarrierCommandOpenEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierCommandOpenEventsAttribute(callback, value, 0); - } - - public void writeBarrierCommandOpenEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, SUPPORTED_MAPS_ATTRIBUTE_ID, true); } - public void subscribeBarrierCommandOpenEventsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE_ID); + public void subscribeSupportedMapsAttribute( + SupportedMapsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MAPS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_COMMAND_OPEN_EVENTS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_MAPS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBarrierCommandCloseEventsAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE_ID); + public void readSelectedAreasAttribute( + SelectedAreasAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_AREAS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE_ID, true); - } - - public void writeBarrierCommandCloseEventsAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierCommandCloseEventsAttribute(callback, value, 0); - } - - public void writeBarrierCommandCloseEventsAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, SELECTED_AREAS_ATTRIBUTE_ID, true); } - public void subscribeBarrierCommandCloseEventsAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE_ID); + public void subscribeSelectedAreasAttribute( + SelectedAreasAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_AREAS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_COMMAND_CLOSE_EVENTS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SELECTED_AREAS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBarrierOpenPeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_OPEN_PERIOD_ATTRIBUTE_ID); + public void readCurrentAreaAttribute( + CurrentAreaAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_AREA_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_OPEN_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeBarrierOpenPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierOpenPeriodAttribute(callback, value, 0); - } - - public void writeBarrierOpenPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BARRIER_OPEN_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, CURRENT_AREA_ATTRIBUTE_ID, true); } - public void subscribeBarrierOpenPeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_OPEN_PERIOD_ATTRIBUTE_ID); + public void subscribeCurrentAreaAttribute( + CurrentAreaAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_AREA_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_OPEN_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_AREA_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBarrierClosePeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_CLOSE_PERIOD_ATTRIBUTE_ID); + public void readEstimatedEndTimeAttribute( + EstimatedEndTimeAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ESTIMATED_END_TIME_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_CLOSE_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeBarrierClosePeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeBarrierClosePeriodAttribute(callback, value, 0); - } - - public void writeBarrierClosePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), BARRIER_CLOSE_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + }, ESTIMATED_END_TIME_ATTRIBUTE_ID, true); } - public void subscribeBarrierClosePeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_CLOSE_PERIOD_ATTRIBUTE_ID); + public void subscribeEstimatedEndTimeAttribute( + EstimatedEndTimeAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ESTIMATED_END_TIME_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_CLOSE_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); + }, ESTIMATED_END_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readBarrierPositionAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_POSITION_ATTRIBUTE_ID); + public void readProgressAttribute( + ProgressAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROGRESS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_POSITION_ATTRIBUTE_ID, true); + }, PROGRESS_ATTRIBUTE_ID, true); } - public void subscribeBarrierPositionAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, BARRIER_POSITION_ATTRIBUTE_ID); + public void subscribeProgressAttribute( + ProgressAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROGRESS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, BARRIER_POSITION_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 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 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 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 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 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 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 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 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 ServiceAreaCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 336L; - - private static final long SUPPORTED_AREAS_ATTRIBUTE_ID = 0L; - private static final long SUPPORTED_MAPS_ATTRIBUTE_ID = 1L; - private static final long SELECTED_AREAS_ATTRIBUTE_ID = 2L; - private static final long CURRENT_AREA_ATTRIBUTE_ID = 3L; - private static final long ESTIMATED_END_TIME_ATTRIBUTE_ID = 4L; - private static final long PROGRESS_ATTRIBUTE_ID = 5L; - 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 ServiceAreaCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void selectAreas(SelectAreasResponseCallback callback, ArrayList newAreas) { - selectAreas(callback, newAreas, 0); - } - - public void selectAreas(SelectAreasResponseCallback callback, ArrayList newAreas, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - final long newAreasFieldID = 0L; - BaseTLVType newAreastlvValue = ArrayType.generateArrayType(newAreas, (elementnewAreas) -> new UIntType(elementnewAreas)); - elements.add(new StructElement(newAreasFieldID, newAreastlvValue)); - - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - String statusText = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = castingValue.value(String.class); - } - } - } - callback.onSuccess(status, statusText); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - - public void skipArea(SkipAreaResponseCallback callback, Long skippedArea) { - skipArea(callback, skippedArea, 0); - } - - public void skipArea(SkipAreaResponseCallback callback, Long skippedArea, int timedInvokeTimeoutMs) { - final long commandId = 2L; - - ArrayList elements = new ArrayList<>(); - final long skippedAreaFieldID = 0L; - BaseTLVType skippedAreatlvValue = new UIntType(skippedArea); - elements.add(new StructElement(skippedAreaFieldID, skippedAreatlvValue)); - - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long statusFieldID = 0L; - Integer status = null; - final long statusTextFieldID = 1L; - String statusText = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == statusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - status = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == statusTextFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.String) { - StringType castingValue = element.value(StringType.class); - statusText = castingValue.value(String.class); - } - } - } - callback.onSuccess(status, statusText); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - - public interface SelectAreasResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, String statusText); - } - - public interface SkipAreaResponseCallback extends BaseClusterCallback { - void onSuccess(Integer status, String statusText); - } - - public interface SupportedAreasAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface SupportedMapsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface SelectedAreasAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface CurrentAreaAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface EstimatedEndTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - - public interface ProgressAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readSupportedAreasAttribute( - SupportedAreasAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_AREAS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_AREAS_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedAreasAttribute( - SupportedAreasAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_AREAS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_AREAS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSupportedMapsAttribute( - SupportedMapsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MAPS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_MAPS_ATTRIBUTE_ID, true); - } - - public void subscribeSupportedMapsAttribute( - SupportedMapsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_MAPS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SUPPORTED_MAPS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readSelectedAreasAttribute( - SelectedAreasAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_AREAS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SELECTED_AREAS_ATTRIBUTE_ID, true); - } - - public void subscribeSelectedAreasAttribute( - SelectedAreasAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_AREAS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SELECTED_AREAS_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentAreaAttribute( - CurrentAreaAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_AREA_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_AREA_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentAreaAttribute( - CurrentAreaAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_AREA_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_AREA_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readEstimatedEndTimeAttribute( - EstimatedEndTimeAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ESTIMATED_END_TIME_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ESTIMATED_END_TIME_ATTRIBUTE_ID, true); - } - - public void subscribeEstimatedEndTimeAttribute( - EstimatedEndTimeAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ESTIMATED_END_TIME_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ESTIMATED_END_TIME_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readProgressAttribute( - ProgressAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROGRESS_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PROGRESS_ATTRIBUTE_ID, true); - } - - public void subscribeProgressAttribute( - ProgressAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PROGRESS_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); + }, PROGRESS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -61366,3771 +60067,6 @@ public void onSuccess(byte[] tlv) { } } - public static class ElectricalMeasurementCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 2820L; - - private static final long MEASUREMENT_TYPE_ATTRIBUTE_ID = 0L; - private static final long DC_VOLTAGE_ATTRIBUTE_ID = 256L; - private static final long DC_VOLTAGE_MIN_ATTRIBUTE_ID = 257L; - private static final long DC_VOLTAGE_MAX_ATTRIBUTE_ID = 258L; - private static final long DC_CURRENT_ATTRIBUTE_ID = 259L; - private static final long DC_CURRENT_MIN_ATTRIBUTE_ID = 260L; - private static final long DC_CURRENT_MAX_ATTRIBUTE_ID = 261L; - private static final long DC_POWER_ATTRIBUTE_ID = 262L; - private static final long DC_POWER_MIN_ATTRIBUTE_ID = 263L; - private static final long DC_POWER_MAX_ATTRIBUTE_ID = 264L; - private static final long DC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID = 512L; - private static final long DC_VOLTAGE_DIVISOR_ATTRIBUTE_ID = 513L; - private static final long DC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 514L; - private static final long DC_CURRENT_DIVISOR_ATTRIBUTE_ID = 515L; - private static final long DC_POWER_MULTIPLIER_ATTRIBUTE_ID = 516L; - private static final long DC_POWER_DIVISOR_ATTRIBUTE_ID = 517L; - private static final long AC_FREQUENCY_ATTRIBUTE_ID = 768L; - private static final long AC_FREQUENCY_MIN_ATTRIBUTE_ID = 769L; - private static final long AC_FREQUENCY_MAX_ATTRIBUTE_ID = 770L; - private static final long NEUTRAL_CURRENT_ATTRIBUTE_ID = 771L; - private static final long TOTAL_ACTIVE_POWER_ATTRIBUTE_ID = 772L; - private static final long TOTAL_REACTIVE_POWER_ATTRIBUTE_ID = 773L; - private static final long TOTAL_APPARENT_POWER_ATTRIBUTE_ID = 774L; - private static final long MEASURED1ST_HARMONIC_CURRENT_ATTRIBUTE_ID = 775L; - private static final long MEASURED3RD_HARMONIC_CURRENT_ATTRIBUTE_ID = 776L; - private static final long MEASURED5TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 777L; - private static final long MEASURED7TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 778L; - private static final long MEASURED9TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 779L; - private static final long MEASURED11TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 780L; - private static final long MEASURED_PHASE1ST_HARMONIC_CURRENT_ATTRIBUTE_ID = 781L; - private static final long MEASURED_PHASE3RD_HARMONIC_CURRENT_ATTRIBUTE_ID = 782L; - private static final long MEASURED_PHASE5TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 783L; - private static final long MEASURED_PHASE7TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 784L; - private static final long MEASURED_PHASE9TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 785L; - private static final long MEASURED_PHASE11TH_HARMONIC_CURRENT_ATTRIBUTE_ID = 786L; - private static final long AC_FREQUENCY_MULTIPLIER_ATTRIBUTE_ID = 1024L; - private static final long AC_FREQUENCY_DIVISOR_ATTRIBUTE_ID = 1025L; - private static final long POWER_MULTIPLIER_ATTRIBUTE_ID = 1026L; - private static final long POWER_DIVISOR_ATTRIBUTE_ID = 1027L; - private static final long HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 1028L; - private static final long PHASE_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 1029L; - private static final long INSTANTANEOUS_VOLTAGE_ATTRIBUTE_ID = 1280L; - private static final long INSTANTANEOUS_LINE_CURRENT_ATTRIBUTE_ID = 1281L; - private static final long INSTANTANEOUS_ACTIVE_CURRENT_ATTRIBUTE_ID = 1282L; - private static final long INSTANTANEOUS_REACTIVE_CURRENT_ATTRIBUTE_ID = 1283L; - private static final long INSTANTANEOUS_POWER_ATTRIBUTE_ID = 1284L; - private static final long RMS_VOLTAGE_ATTRIBUTE_ID = 1285L; - private static final long RMS_VOLTAGE_MIN_ATTRIBUTE_ID = 1286L; - private static final long RMS_VOLTAGE_MAX_ATTRIBUTE_ID = 1287L; - private static final long RMS_CURRENT_ATTRIBUTE_ID = 1288L; - private static final long RMS_CURRENT_MIN_ATTRIBUTE_ID = 1289L; - private static final long RMS_CURRENT_MAX_ATTRIBUTE_ID = 1290L; - private static final long ACTIVE_POWER_ATTRIBUTE_ID = 1291L; - private static final long ACTIVE_POWER_MIN_ATTRIBUTE_ID = 1292L; - private static final long ACTIVE_POWER_MAX_ATTRIBUTE_ID = 1293L; - private static final long REACTIVE_POWER_ATTRIBUTE_ID = 1294L; - private static final long APPARENT_POWER_ATTRIBUTE_ID = 1295L; - private static final long POWER_FACTOR_ATTRIBUTE_ID = 1296L; - private static final long AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID = 1297L; - private static final long AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID = 1299L; - private static final long RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID = 1300L; - private static final long RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID = 1301L; - private static final long RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID = 1302L; - private static final long RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID = 1303L; - private static final long AC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID = 1536L; - private static final long AC_VOLTAGE_DIVISOR_ATTRIBUTE_ID = 1537L; - private static final long AC_CURRENT_MULTIPLIER_ATTRIBUTE_ID = 1538L; - private static final long AC_CURRENT_DIVISOR_ATTRIBUTE_ID = 1539L; - private static final long AC_POWER_MULTIPLIER_ATTRIBUTE_ID = 1540L; - private static final long AC_POWER_DIVISOR_ATTRIBUTE_ID = 1541L; - private static final long OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID = 1792L; - private static final long VOLTAGE_OVERLOAD_ATTRIBUTE_ID = 1793L; - private static final long CURRENT_OVERLOAD_ATTRIBUTE_ID = 1794L; - private static final long AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID = 2048L; - private static final long AC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID = 2049L; - private static final long AC_CURRENT_OVERLOAD_ATTRIBUTE_ID = 2050L; - private static final long AC_ACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID = 2051L; - private static final long AC_REACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID = 2052L; - private static final long AVERAGE_RMS_OVER_VOLTAGE_ATTRIBUTE_ID = 2053L; - private static final long AVERAGE_RMS_UNDER_VOLTAGE_ATTRIBUTE_ID = 2054L; - private static final long RMS_EXTREME_OVER_VOLTAGE_ATTRIBUTE_ID = 2055L; - private static final long RMS_EXTREME_UNDER_VOLTAGE_ATTRIBUTE_ID = 2056L; - private static final long RMS_VOLTAGE_SAG_ATTRIBUTE_ID = 2057L; - private static final long RMS_VOLTAGE_SWELL_ATTRIBUTE_ID = 2058L; - private static final long LINE_CURRENT_PHASE_B_ATTRIBUTE_ID = 2305L; - private static final long ACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID = 2306L; - private static final long REACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID = 2307L; - private static final long RMS_VOLTAGE_PHASE_B_ATTRIBUTE_ID = 2309L; - private static final long RMS_VOLTAGE_MIN_PHASE_B_ATTRIBUTE_ID = 2310L; - private static final long RMS_VOLTAGE_MAX_PHASE_B_ATTRIBUTE_ID = 2311L; - private static final long RMS_CURRENT_PHASE_B_ATTRIBUTE_ID = 2312L; - private static final long RMS_CURRENT_MIN_PHASE_B_ATTRIBUTE_ID = 2313L; - private static final long RMS_CURRENT_MAX_PHASE_B_ATTRIBUTE_ID = 2314L; - private static final long ACTIVE_POWER_PHASE_B_ATTRIBUTE_ID = 2315L; - private static final long ACTIVE_POWER_MIN_PHASE_B_ATTRIBUTE_ID = 2316L; - private static final long ACTIVE_POWER_MAX_PHASE_B_ATTRIBUTE_ID = 2317L; - private static final long REACTIVE_POWER_PHASE_B_ATTRIBUTE_ID = 2318L; - private static final long APPARENT_POWER_PHASE_B_ATTRIBUTE_ID = 2319L; - private static final long POWER_FACTOR_PHASE_B_ATTRIBUTE_ID = 2320L; - private static final long AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B_ATTRIBUTE_ID = 2321L; - private static final long AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID = 2322L; - private static final long AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID = 2323L; - private static final long RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID = 2324L; - private static final long RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID = 2325L; - private static final long RMS_VOLTAGE_SAG_PERIOD_PHASE_B_ATTRIBUTE_ID = 2326L; - private static final long RMS_VOLTAGE_SWELL_PERIOD_PHASE_B_ATTRIBUTE_ID = 2327L; - private static final long LINE_CURRENT_PHASE_C_ATTRIBUTE_ID = 2561L; - private static final long ACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID = 2562L; - private static final long REACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID = 2563L; - private static final long RMS_VOLTAGE_PHASE_C_ATTRIBUTE_ID = 2565L; - private static final long RMS_VOLTAGE_MIN_PHASE_C_ATTRIBUTE_ID = 2566L; - private static final long RMS_VOLTAGE_MAX_PHASE_C_ATTRIBUTE_ID = 2567L; - private static final long RMS_CURRENT_PHASE_C_ATTRIBUTE_ID = 2568L; - private static final long RMS_CURRENT_MIN_PHASE_C_ATTRIBUTE_ID = 2569L; - private static final long RMS_CURRENT_MAX_PHASE_C_ATTRIBUTE_ID = 2570L; - private static final long ACTIVE_POWER_PHASE_C_ATTRIBUTE_ID = 2571L; - private static final long ACTIVE_POWER_MIN_PHASE_C_ATTRIBUTE_ID = 2572L; - private static final long ACTIVE_POWER_MAX_PHASE_C_ATTRIBUTE_ID = 2573L; - private static final long REACTIVE_POWER_PHASE_C_ATTRIBUTE_ID = 2574L; - private static final long APPARENT_POWER_PHASE_C_ATTRIBUTE_ID = 2575L; - private static final long POWER_FACTOR_PHASE_C_ATTRIBUTE_ID = 2576L; - private static final long AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C_ATTRIBUTE_ID = 2577L; - private static final long AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID = 2578L; - private static final long AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID = 2579L; - private static final long RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID = 2580L; - private static final long RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID = 2581L; - private static final long RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID = 2582L; - private static final long RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID = 2583L; - 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 ElectricalMeasurementCluster(long devicePtr, int endpointId) { - super(devicePtr, endpointId, CLUSTER_ID); - } - - @Override - @Deprecated - public long initWithDevice(long devicePtr, int endpointId) { - return 0L; - } - - public void getProfileInfoCommand(DefaultClusterCallback callback) { - getProfileInfoCommand(callback, 0); - } - - public void getProfileInfoCommand(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 0L; - - ArrayList elements = new ArrayList<>(); - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - - public void getMeasurementProfileCommand(DefaultClusterCallback callback, Integer attributeId, Long startTime, Integer numberOfIntervals) { - getMeasurementProfileCommand(callback, attributeId, startTime, numberOfIntervals, 0); - } - - public void getMeasurementProfileCommand(DefaultClusterCallback callback, Integer attributeId, Long startTime, Integer numberOfIntervals, int timedInvokeTimeoutMs) { - final long commandId = 1L; - - ArrayList elements = new ArrayList<>(); - final long attributeIdFieldID = 0L; - BaseTLVType attributeIdtlvValue = new UIntType(attributeId); - elements.add(new StructElement(attributeIdFieldID, attributeIdtlvValue)); - - final long startTimeFieldID = 1L; - BaseTLVType startTimetlvValue = new UIntType(startTime); - elements.add(new StructElement(startTimeFieldID, startTimetlvValue)); - - final long numberOfIntervalsFieldID = 2L; - BaseTLVType numberOfIntervalstlvValue = new UIntType(numberOfIntervals); - elements.add(new StructElement(numberOfIntervalsFieldID, numberOfIntervalstlvValue)); - - StructType commandArgs = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, commandArgs, timedInvokeTimeoutMs); - } - - public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface EventListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public interface AttributeListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); - } - - public void readMeasurementTypeAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASUREMENT_TYPE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASUREMENT_TYPE_ATTRIBUTE_ID, true); - } - - public void subscribeMeasurementTypeAttribute( - LongAttributeCallback 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) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASUREMENT_TYPE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeDcVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcVoltageMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeDcVoltageMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcVoltageMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeDcVoltageMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeDcCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcCurrentMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeDcCurrentMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcCurrentMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeDcCurrentMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeDcPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcPowerMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeDcPowerMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcPowerMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeDcPowerMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcVoltageMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeDcVoltageMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcVoltageDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeDcVoltageDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_VOLTAGE_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_VOLTAGE_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcCurrentMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeDcCurrentMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcCurrentDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeDcCurrentDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_CURRENT_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_CURRENT_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcPowerMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeDcPowerMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readDcPowerDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeDcPowerDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, DC_POWER_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, DC_POWER_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcFrequencyAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_ATTRIBUTE_ID, true); - } - - public void subscribeAcFrequencyAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcFrequencyMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeAcFrequencyMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcFrequencyMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeAcFrequencyMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readNeutralCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEUTRAL_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, NEUTRAL_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeNeutralCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEUTRAL_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, NEUTRAL_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readTotalActivePowerAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOTAL_ACTIVE_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOTAL_ACTIVE_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeTotalActivePowerAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOTAL_ACTIVE_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOTAL_ACTIVE_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readTotalReactivePowerAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOTAL_REACTIVE_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOTAL_REACTIVE_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeTotalReactivePowerAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOTAL_REACTIVE_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOTAL_REACTIVE_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readTotalApparentPowerAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOTAL_APPARENT_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOTAL_APPARENT_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeTotalApparentPowerAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TOTAL_APPARENT_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, TOTAL_APPARENT_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasured1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED1ST_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED1ST_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasured1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED1ST_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED1ST_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasured3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED3RD_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED3RD_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasured3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED3RD_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED3RD_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasured5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED5TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED5TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasured5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED5TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED5TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasured7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED7TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED7TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasured7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED7TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED7TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasured9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED9TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED9TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasured9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED9TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED9TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasured11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED11TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED11TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasured11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED11TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED11TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasuredPhase1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE1ST_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE1ST_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredPhase1stHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE1ST_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE1ST_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasuredPhase3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE3RD_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE3RD_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredPhase3rdHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE3RD_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE3RD_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasuredPhase5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE5TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE5TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredPhase5thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE5TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE5TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasuredPhase7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE7TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE7TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredPhase7thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE7TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE7TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasuredPhase9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE9TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE9TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredPhase9thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE9TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE9TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readMeasuredPhase11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE11TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE11TH_HARMONIC_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeMeasuredPhase11thHarmonicCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MEASURED_PHASE11TH_HARMONIC_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, MEASURED_PHASE11TH_HARMONIC_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcFrequencyMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeAcFrequencyMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcFrequencyDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeAcFrequencyDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_FREQUENCY_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_FREQUENCY_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPowerMultiplierAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribePowerMultiplierAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPowerDivisorAttribute( - LongAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribePowerDivisorAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPhaseHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PHASE_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribePhaseHarmonicCurrentMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PHASE_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, PHASE_HARMONIC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInstantaneousVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeInstantaneousVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInstantaneousLineCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_LINE_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_LINE_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeInstantaneousLineCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_LINE_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_LINE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInstantaneousActiveCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_ACTIVE_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_ACTIVE_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeInstantaneousActiveCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_ACTIVE_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_ACTIVE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInstantaneousReactiveCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_REACTIVE_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_REACTIVE_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeInstantaneousReactiveCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_REACTIVE_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_REACTIVE_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readInstantaneousPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeInstantaneousPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, INSTANTANEOUS_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, INSTANTANEOUS_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerMinAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MIN_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MIN_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerMinAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MIN_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MIN_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerMaxAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MAX_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MAX_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerMaxAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MAX_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MAX_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReactivePowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeReactivePowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readApparentPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPARENT_POWER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPARENT_POWER_ATTRIBUTE_ID, true); - } - - public void subscribeApparentPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPARENT_POWER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPARENT_POWER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPowerFactorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_FACTOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_FACTOR_ATTRIBUTE_ID, true); - } - - public void subscribePowerFactorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_FACTOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_FACTOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsVoltageMeasurementPeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeAverageRmsVoltageMeasurementPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeAverageRmsVoltageMeasurementPeriodAttribute(callback, value, 0); - } - - public void writeAverageRmsVoltageMeasurementPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeAverageRmsVoltageMeasurementPeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageCounterAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID, true); - } - - public void writeAverageRmsUnderVoltageCounterAttribute(DefaultClusterCallback callback, Integer value) { - writeAverageRmsUnderVoltageCounterAttribute(callback, value, 0); - } - - public void writeAverageRmsUnderVoltageCounterAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeAverageRmsUnderVoltageCounterAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltagePeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeRmsExtremeOverVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsExtremeOverVoltagePeriodAttribute(callback, value, 0); - } - - public void writeRmsExtremeOverVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeRmsExtremeOverVoltagePeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltagePeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeRmsExtremeUnderVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsExtremeUnderVoltagePeriodAttribute(callback, value, 0); - } - - public void writeRmsExtremeUnderVoltagePeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeRmsExtremeUnderVoltagePeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSagPeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeRmsVoltageSagPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsVoltageSagPeriodAttribute(callback, value, 0); - } - - public void writeRmsVoltageSagPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeRmsVoltageSagPeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSwellPeriodAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID, true); - } - - public void writeRmsVoltageSwellPeriodAttribute(DefaultClusterCallback callback, Integer value) { - writeRmsVoltageSwellPeriodAttribute(callback, value, 0); - } - - public void writeRmsVoltageSwellPeriodAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeRmsVoltageSwellPeriodAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_PERIOD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcVoltageMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeAcVoltageMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_VOLTAGE_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcVoltageDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_VOLTAGE_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_VOLTAGE_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeAcVoltageDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_VOLTAGE_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_VOLTAGE_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcCurrentMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeAcCurrentMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_CURRENT_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_CURRENT_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcCurrentDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_CURRENT_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_CURRENT_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeAcCurrentDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_CURRENT_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_CURRENT_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcPowerMultiplierAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_POWER_MULTIPLIER_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_POWER_MULTIPLIER_ATTRIBUTE_ID, true); - } - - public void subscribeAcPowerMultiplierAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_POWER_MULTIPLIER_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_POWER_MULTIPLIER_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcPowerDivisorAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_POWER_DIVISOR_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_POWER_DIVISOR_ATTRIBUTE_ID, true); - } - - public void subscribeAcPowerDivisorAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_POWER_DIVISOR_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_POWER_DIVISOR_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID, true); - } - - public void writeOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value) { - writeOverloadAlarmsMaskAttribute(callback, value, 0); - } - - public void writeOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readVoltageOverloadAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VOLTAGE_OVERLOAD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, VOLTAGE_OVERLOAD_ATTRIBUTE_ID, true); - } - - public void subscribeVoltageOverloadAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, VOLTAGE_OVERLOAD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, VOLTAGE_OVERLOAD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readCurrentOverloadAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_OVERLOAD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_OVERLOAD_ATTRIBUTE_ID, true); - } - - public void subscribeCurrentOverloadAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_OVERLOAD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_OVERLOAD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID, true); - } - - public void writeAcOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value) { - writeAcOverloadAlarmsMaskAttribute(callback, value, 0); - } - - public void writeAcOverloadAlarmsMaskAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeAcOverloadAlarmsMaskAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_OVERLOAD_ALARMS_MASK_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcVoltageOverloadAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID, true); - } - - public void subscribeAcVoltageOverloadAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_VOLTAGE_OVERLOAD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcCurrentOverloadAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_CURRENT_OVERLOAD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_CURRENT_OVERLOAD_ATTRIBUTE_ID, true); - } - - public void subscribeAcCurrentOverloadAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_CURRENT_OVERLOAD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_CURRENT_OVERLOAD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcActivePowerOverloadAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_ACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_ACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID, true); - } - - public void subscribeAcActivePowerOverloadAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_ACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_ACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAcReactivePowerOverloadAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_REACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_REACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID, true); - } - - public void subscribeAcReactivePowerOverloadAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AC_REACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AC_REACTIVE_POWER_OVERLOAD_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsOverVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_OVER_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_OVER_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsOverVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_OVER_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_OVER_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsUnderVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeRmsExtremeOverVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltageAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_ATTRIBUTE_ID, true); - } - - public void subscribeRmsExtremeUnderVoltageAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSagAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageSagAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSwellAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageSwellAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readLineCurrentPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINE_CURRENT_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LINE_CURRENT_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeLineCurrentPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINE_CURRENT_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LINE_CURRENT_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeActiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReactiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeReactiveCurrentPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_CURRENT_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltagePhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltagePhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageMinPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MIN_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MIN_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageMinPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MIN_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MIN_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageMaxPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MAX_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MAX_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageMaxPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MAX_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MAX_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentMinPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MIN_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MIN_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentMinPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MIN_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MIN_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentMaxPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MAX_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MAX_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentMaxPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MAX_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MAX_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerMinPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MIN_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MIN_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerMinPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MIN_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MIN_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerMaxPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MAX_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MAX_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerMaxPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MAX_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MAX_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReactivePowerPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_POWER_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_POWER_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeReactivePowerPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_POWER_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_POWER_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readApparentPowerPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPARENT_POWER_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPARENT_POWER_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeApparentPowerPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPARENT_POWER_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPARENT_POWER_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPowerFactorPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_FACTOR_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_FACTOR_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribePowerFactorPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_FACTOR_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_FACTOR_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsVoltageMeasurementPeriodPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsOverVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsOverVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsUnderVoltageCounterPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSagPeriodPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_PERIOD_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_PERIOD_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageSagPeriodPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_PERIOD_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_PERIOD_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSwellPeriodPhaseBAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_PERIOD_PHASE_B_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_PERIOD_PHASE_B_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageSwellPeriodPhaseBAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_PERIOD_PHASE_B_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_PERIOD_PHASE_B_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readLineCurrentPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINE_CURRENT_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LINE_CURRENT_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeLineCurrentPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LINE_CURRENT_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LINE_CURRENT_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeActiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReactiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeReactiveCurrentPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_CURRENT_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltagePhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltagePhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageMinPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MIN_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MIN_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageMinPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MIN_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MIN_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageMaxPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MAX_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MAX_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageMaxPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_MAX_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_MAX_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentMinPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MIN_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MIN_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentMinPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MIN_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MIN_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsCurrentMaxPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MAX_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MAX_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsCurrentMaxPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_CURRENT_MAX_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_CURRENT_MAX_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerMinPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MIN_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MIN_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerMinPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MIN_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MIN_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readActivePowerMaxPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MAX_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MAX_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeActivePowerMaxPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_POWER_MAX_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, ACTIVE_POWER_MAX_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readReactivePowerPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_POWER_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_POWER_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeReactivePowerPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REACTIVE_POWER_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REACTIVE_POWER_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readApparentPowerPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPARENT_POWER_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPARENT_POWER_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeApparentPowerPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, APPARENT_POWER_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, APPARENT_POWER_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readPowerFactorPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_FACTOR_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_FACTOR_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribePowerFactorPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_FACTOR_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, POWER_FACTOR_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsVoltageMeasurementPeriodPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_VOLTAGE_MEASUREMENT_PERIOD_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsOverVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsOverVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_OVER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readAverageRmsUnderVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeAverageRmsUnderVoltageCounterPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, AVERAGE_RMS_UNDER_VOLTAGE_COUNTER_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeOverVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_OVER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsExtremeUnderVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_EXTREME_UNDER_VOLTAGE_PERIOD_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSagPeriodPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageSagPeriodPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SAG_PERIOD_PHASE_C_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readRmsVoltageSwellPeriodPhaseCAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID, true); - } - - public void subscribeRmsVoltageSwellPeriodPhaseCAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, RMS_VOLTAGE_SWELL_PERIOD_PHASE_C_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 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 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 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 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 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 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 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 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/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 950e6070dff2c0..8bf4e6d615c358 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -37,15 +37,9 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == OnOff.ID) { return new OnOff(); } - if (clusterId == OnOffSwitchConfiguration.ID) { - return new OnOffSwitchConfiguration(); - } if (clusterId == LevelControl.ID) { return new LevelControl(); } - if (clusterId == BinaryInputBasic.ID) { - return new BinaryInputBasic(); - } if (clusterId == PulseWidthModulation.ID) { return new PulseWidthModulation(); } @@ -265,9 +259,6 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == WindowCovering.ID) { return new WindowCovering(); } - if (clusterId == BarrierControl.ID) { - return new BarrierControl(); - } if (clusterId == ServiceArea.ID) { return new ServiceArea(); } @@ -394,9 +385,6 @@ public static BaseCluster getCluster(long clusterId) { if (clusterId == CommissionerControl.ID) { return new CommissionerControl(); } - if (clusterId == ElectricalMeasurement.ID) { - return new ElectricalMeasurement(); - } if (clusterId == UnitTesting.ID) { return new UnitTesting(); } @@ -882,108 +870,6 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class OnOffSwitchConfiguration implements BaseCluster { - public static final long ID = 7L; - public long getID() { - return ID; - } - - public enum Attribute { - SwitchType(0L), - SwitchActions(16L), - 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 LevelControl implements BaseCluster { public static final long ID = 8L; public long getID() { @@ -1260,115 +1146,6 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class BinaryInputBasic implements BaseCluster { - public static final long ID = 15L; - public long getID() { - return ID; - } - - public enum Attribute { - ActiveText(4L), - Description(28L), - InactiveText(46L), - OutOfService(81L), - Polarity(84L), - PresentValue(85L), - Reliability(103L), - StatusFlags(111L), - ApplicationType(256L), - 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 PulseWidthModulation implements BaseCluster { public static final long ID = 28L; public long getID() { @@ -11499,135 +11276,6 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class BarrierControl implements BaseCluster { - public static final long ID = 259L; - public long getID() { - return ID; - } - - public enum Attribute { - BarrierMovingState(1L), - BarrierSafetyStatus(2L), - BarrierCapabilities(3L), - BarrierOpenEvents(4L), - BarrierCloseEvents(5L), - BarrierCommandOpenEvents(6L), - BarrierCommandCloseEvents(7L), - BarrierOpenPeriod(8L), - BarrierClosePeriod(9L), - BarrierPosition(10L), - 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 { - BarrierControlGoToPercent(0L), - BarrierControlStop(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 BarrierControlGoToPercentCommandField {PercentOpen(0),; - private final int id; - BarrierControlGoToPercentCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static BarrierControlGoToPercentCommandField value(int id) throws NoSuchFieldError { - for (BarrierControlGoToPercentCommandField field : BarrierControlGoToPercentCommandField.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 ServiceArea implements BaseCluster { public static final long ID = 336L; public long getID() { @@ -17470,253 +17118,6 @@ public long getCommandID(String name) throws IllegalArgumentException { return Command.valueOf(name).getID(); } } - public static class ElectricalMeasurement implements BaseCluster { - public static final long ID = 2820L; - public long getID() { - return ID; - } - - public enum Attribute { - MeasurementType(0L), - DcVoltage(256L), - DcVoltageMin(257L), - DcVoltageMax(258L), - DcCurrent(259L), - DcCurrentMin(260L), - DcCurrentMax(261L), - DcPower(262L), - DcPowerMin(263L), - DcPowerMax(264L), - DcVoltageMultiplier(512L), - DcVoltageDivisor(513L), - DcCurrentMultiplier(514L), - DcCurrentDivisor(515L), - DcPowerMultiplier(516L), - DcPowerDivisor(517L), - AcFrequency(768L), - AcFrequencyMin(769L), - AcFrequencyMax(770L), - NeutralCurrent(771L), - TotalActivePower(772L), - TotalReactivePower(773L), - TotalApparentPower(774L), - Measured1stHarmonicCurrent(775L), - Measured3rdHarmonicCurrent(776L), - Measured5thHarmonicCurrent(777L), - Measured7thHarmonicCurrent(778L), - Measured9thHarmonicCurrent(779L), - Measured11thHarmonicCurrent(780L), - MeasuredPhase1stHarmonicCurrent(781L), - MeasuredPhase3rdHarmonicCurrent(782L), - MeasuredPhase5thHarmonicCurrent(783L), - MeasuredPhase7thHarmonicCurrent(784L), - MeasuredPhase9thHarmonicCurrent(785L), - MeasuredPhase11thHarmonicCurrent(786L), - AcFrequencyMultiplier(1024L), - AcFrequencyDivisor(1025L), - PowerMultiplier(1026L), - PowerDivisor(1027L), - HarmonicCurrentMultiplier(1028L), - PhaseHarmonicCurrentMultiplier(1029L), - InstantaneousVoltage(1280L), - InstantaneousLineCurrent(1281L), - InstantaneousActiveCurrent(1282L), - InstantaneousReactiveCurrent(1283L), - InstantaneousPower(1284L), - RmsVoltage(1285L), - RmsVoltageMin(1286L), - RmsVoltageMax(1287L), - RmsCurrent(1288L), - RmsCurrentMin(1289L), - RmsCurrentMax(1290L), - ActivePower(1291L), - ActivePowerMin(1292L), - ActivePowerMax(1293L), - ReactivePower(1294L), - ApparentPower(1295L), - PowerFactor(1296L), - AverageRmsVoltageMeasurementPeriod(1297L), - AverageRmsUnderVoltageCounter(1299L), - RmsExtremeOverVoltagePeriod(1300L), - RmsExtremeUnderVoltagePeriod(1301L), - RmsVoltageSagPeriod(1302L), - RmsVoltageSwellPeriod(1303L), - AcVoltageMultiplier(1536L), - AcVoltageDivisor(1537L), - AcCurrentMultiplier(1538L), - AcCurrentDivisor(1539L), - AcPowerMultiplier(1540L), - AcPowerDivisor(1541L), - OverloadAlarmsMask(1792L), - VoltageOverload(1793L), - CurrentOverload(1794L), - AcOverloadAlarmsMask(2048L), - AcVoltageOverload(2049L), - AcCurrentOverload(2050L), - AcActivePowerOverload(2051L), - AcReactivePowerOverload(2052L), - AverageRmsOverVoltage(2053L), - AverageRmsUnderVoltage(2054L), - RmsExtremeOverVoltage(2055L), - RmsExtremeUnderVoltage(2056L), - RmsVoltageSag(2057L), - RmsVoltageSwell(2058L), - LineCurrentPhaseB(2305L), - ActiveCurrentPhaseB(2306L), - ReactiveCurrentPhaseB(2307L), - RmsVoltagePhaseB(2309L), - RmsVoltageMinPhaseB(2310L), - RmsVoltageMaxPhaseB(2311L), - RmsCurrentPhaseB(2312L), - RmsCurrentMinPhaseB(2313L), - RmsCurrentMaxPhaseB(2314L), - ActivePowerPhaseB(2315L), - ActivePowerMinPhaseB(2316L), - ActivePowerMaxPhaseB(2317L), - ReactivePowerPhaseB(2318L), - ApparentPowerPhaseB(2319L), - PowerFactorPhaseB(2320L), - AverageRmsVoltageMeasurementPeriodPhaseB(2321L), - AverageRmsOverVoltageCounterPhaseB(2322L), - AverageRmsUnderVoltageCounterPhaseB(2323L), - RmsExtremeOverVoltagePeriodPhaseB(2324L), - RmsExtremeUnderVoltagePeriodPhaseB(2325L), - RmsVoltageSagPeriodPhaseB(2326L), - RmsVoltageSwellPeriodPhaseB(2327L), - LineCurrentPhaseC(2561L), - ActiveCurrentPhaseC(2562L), - ReactiveCurrentPhaseC(2563L), - RmsVoltagePhaseC(2565L), - RmsVoltageMinPhaseC(2566L), - RmsVoltageMaxPhaseC(2567L), - RmsCurrentPhaseC(2568L), - RmsCurrentMinPhaseC(2569L), - RmsCurrentMaxPhaseC(2570L), - ActivePowerPhaseC(2571L), - ActivePowerMinPhaseC(2572L), - ActivePowerMaxPhaseC(2573L), - ReactivePowerPhaseC(2574L), - ApparentPowerPhaseC(2575L), - PowerFactorPhaseC(2576L), - AverageRmsVoltageMeasurementPeriodPhaseC(2577L), - AverageRmsOverVoltageCounterPhaseC(2578L), - AverageRmsUnderVoltageCounterPhaseC(2579L), - RmsExtremeOverVoltagePeriodPhaseC(2580L), - RmsExtremeUnderVoltagePeriodPhaseC(2581L), - RmsVoltageSagPeriodPhaseC(2582L), - RmsVoltageSwellPeriodPhaseC(2583L), - 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 { - GetProfileInfoCommand(0L), - GetMeasurementProfileCommand(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 GetMeasurementProfileCommandCommandField {AttributeId(0),StartTime(1),NumberOfIntervals(2),; - private final int id; - GetMeasurementProfileCommandCommandField(int id) { - this.id = id; - } - - public int getID() { - return id; - } - public static GetMeasurementProfileCommandCommandField value(int id) throws NoSuchFieldError { - for (GetMeasurementProfileCommandCommandField field : GetMeasurementProfileCommandCommandField.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 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 6e009e3ae63c5a..40427e62794337 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -585,90 +585,6 @@ public void onError(Exception ex) { } } - public static class DelegatedOnOffSwitchConfigurationClusterGeneratedCommandListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedOnOffSwitchConfigurationClusterAcceptedCommandListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedOnOffSwitchConfigurationClusterEventListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.EventListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedOnOffSwitchConfigurationClusterAttributeListAttributeCallback implements ChipClusters.OnOffSwitchConfigurationCluster.AttributeListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedLevelControlClusterCurrentLevelAttributeCallback implements ChipClusters.LevelControlCluster.CurrentLevelAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -879,90 +795,6 @@ public void onError(Exception ex) { } } - public static class DelegatedBinaryInputBasicClusterGeneratedCommandListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedBinaryInputBasicClusterAcceptedCommandListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedBinaryInputBasicClusterEventListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.EventListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedBinaryInputBasicClusterAttributeListAttributeCallback implements ChipClusters.BinaryInputBasicCluster.AttributeListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedPulseWidthModulationClusterGeneratedCommandListAttributeCallback implements ChipClusters.PulseWidthModulationCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -13054,90 +12886,6 @@ public void onError(Exception ex) { } } - public static class DelegatedBarrierControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.BarrierControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedBarrierControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.BarrierControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedBarrierControlClusterEventListAttributeCallback implements ChipClusters.BarrierControlCluster.EventListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedBarrierControlClusterAttributeListAttributeCallback implements ChipClusters.BarrierControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedServiceAreaClusterSelectAreasResponseCallback implements ChipClusters.ServiceAreaCluster.SelectAreasResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -20484,90 +20232,6 @@ public void onError(Exception ex) { } } - public static class DelegatedElectricalMeasurementClusterGeneratedCommandListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedElectricalMeasurementClusterAcceptedCommandListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedElectricalMeasurementClusterEventListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.EventListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - - public static class DelegatedElectricalMeasurementClusterAttributeListAttributeCallback implements ChipClusters.ElectricalMeasurementCluster.AttributeListAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(List valueList) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); - responseValues.put(commandResponseInfo, valueList); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @@ -22208,18 +21872,10 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.OnOffCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("onOff", onOffClusterInfo); - ClusterInfo onOffSwitchConfigurationClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.OnOffSwitchConfigurationCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("onOffSwitchConfiguration", onOffSwitchConfigurationClusterInfo); - ClusterInfo levelControlClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.LevelControlCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("levelControl", levelControlClusterInfo); - ClusterInfo binaryInputBasicClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.BinaryInputBasicCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("binaryInputBasic", binaryInputBasicClusterInfo); - ClusterInfo pulseWidthModulationClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.PulseWidthModulationCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("pulseWidthModulation", pulseWidthModulationClusterInfo); @@ -22512,10 +22168,6 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.WindowCoveringCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("windowCovering", windowCoveringClusterInfo); - ClusterInfo barrierControlClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.BarrierControlCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("barrierControl", barrierControlClusterInfo); - ClusterInfo serviceAreaClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.ServiceAreaCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("serviceArea", serviceAreaClusterInfo); @@ -22684,10 +22336,6 @@ public Map initializeClusterMap() { (ptr, endpointId) -> new ChipClusters.CommissionerControlCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("commissionerControl", commissionerControlClusterInfo); - ClusterInfo electricalMeasurementClusterInfo = new ClusterInfo( - (ptr, endpointId) -> new ChipClusters.ElectricalMeasurementCluster(ptr, endpointId), new HashMap<>()); - clusterMap.put("electricalMeasurement", electricalMeasurementClusterInfo); - ClusterInfo unitTestingClusterInfo = new ClusterInfo( (ptr, endpointId) -> new ChipClusters.UnitTestingCluster(ptr, endpointId), new HashMap<>()); clusterMap.put("unitTesting", unitTestingClusterInfo); @@ -22707,9 +22355,7 @@ public void combineCommand(Map destination, Map destination, Map destination, Map> getCommandMap() { commandMap.put("onOff", onOffClusterInteractionInfoMap); - Map onOffSwitchConfigurationClusterInteractionInfoMap = new LinkedHashMap<>(); - - commandMap.put("onOffSwitchConfiguration", onOffSwitchConfigurationClusterInteractionInfoMap); - Map levelControlClusterInteractionInfoMap = new LinkedHashMap<>(); Map levelControlmoveToLevelCommandParams = new LinkedHashMap(); @@ -23367,10 +23007,6 @@ public Map> getCommandMap() { commandMap.put("levelControl", levelControlClusterInteractionInfoMap); - Map binaryInputBasicClusterInteractionInfoMap = new LinkedHashMap<>(); - - commandMap.put("binaryInputBasic", binaryInputBasicClusterInteractionInfoMap); - Map pulseWidthModulationClusterInteractionInfoMap = new LinkedHashMap<>(); commandMap.put("pulseWidthModulation", pulseWidthModulationClusterInteractionInfoMap); @@ -26911,39 +26547,6 @@ public Map> getCommandMap() { commandMap.put("windowCovering", windowCoveringClusterInteractionInfoMap); - Map barrierControlClusterInteractionInfoMap = new LinkedHashMap<>(); - - Map barrierControlbarrierControlGoToPercentCommandParams = new LinkedHashMap(); - - CommandParameterInfo barrierControlbarrierControlGoToPercentpercentOpenCommandParameterInfo = new CommandParameterInfo("percentOpen", Integer.class, Integer.class); - barrierControlbarrierControlGoToPercentCommandParams.put("percentOpen",barrierControlbarrierControlGoToPercentpercentOpenCommandParameterInfo); - InteractionInfo barrierControlbarrierControlGoToPercentInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster) - .barrierControlGoToPercent((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("percentOpen") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - barrierControlbarrierControlGoToPercentCommandParams - ); - barrierControlClusterInteractionInfoMap.put("barrierControlGoToPercent", barrierControlbarrierControlGoToPercentInteractionInfo); - - Map barrierControlbarrierControlStopCommandParams = new LinkedHashMap(); - InteractionInfo barrierControlbarrierControlStopInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster) - .barrierControlStop((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), - barrierControlbarrierControlStopCommandParams - ); - barrierControlClusterInteractionInfoMap.put("barrierControlStop", barrierControlbarrierControlStopInteractionInfo); - - commandMap.put("barrierControl", barrierControlClusterInteractionInfoMap); - Map serviceAreaClusterInteractionInfoMap = new LinkedHashMap<>(); Map serviceAreaselectAreasCommandParams = new LinkedHashMap(); @@ -29088,49 +28691,6 @@ public Map> getCommandMap() { commandMap.put("commissionerControl", commissionerControlClusterInteractionInfoMap); - Map electricalMeasurementClusterInteractionInfoMap = new LinkedHashMap<>(); - - Map electricalMeasurementgetProfileInfoCommandCommandParams = new LinkedHashMap(); - InteractionInfo electricalMeasurementgetProfileInfoCommandInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster) - .getProfileInfoCommand((DefaultClusterCallback) callback - ); - }, - () -> new DelegatedDefaultClusterCallback(), - electricalMeasurementgetProfileInfoCommandCommandParams - ); - electricalMeasurementClusterInteractionInfoMap.put("getProfileInfoCommand", electricalMeasurementgetProfileInfoCommandInteractionInfo); - - Map electricalMeasurementgetMeasurementProfileCommandCommandParams = new LinkedHashMap(); - - CommandParameterInfo electricalMeasurementgetMeasurementProfileCommandattributeIdCommandParameterInfo = new CommandParameterInfo("attributeId", Integer.class, Integer.class); - electricalMeasurementgetMeasurementProfileCommandCommandParams.put("attributeId",electricalMeasurementgetMeasurementProfileCommandattributeIdCommandParameterInfo); - - CommandParameterInfo electricalMeasurementgetMeasurementProfileCommandstartTimeCommandParameterInfo = new CommandParameterInfo("startTime", Long.class, Long.class); - electricalMeasurementgetMeasurementProfileCommandCommandParams.put("startTime",electricalMeasurementgetMeasurementProfileCommandstartTimeCommandParameterInfo); - - CommandParameterInfo electricalMeasurementgetMeasurementProfileCommandnumberOfIntervalsCommandParameterInfo = new CommandParameterInfo("numberOfIntervals", Integer.class, Integer.class); - electricalMeasurementgetMeasurementProfileCommandCommandParams.put("numberOfIntervals",electricalMeasurementgetMeasurementProfileCommandnumberOfIntervalsCommandParameterInfo); - InteractionInfo electricalMeasurementgetMeasurementProfileCommandInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster) - .getMeasurementProfileCommand((DefaultClusterCallback) callback - , (Integer) - commandArguments.get("attributeId") - , (Long) - commandArguments.get("startTime") - , (Integer) - commandArguments.get("numberOfIntervals") - ); - }, - () -> new DelegatedDefaultClusterCallback(), - electricalMeasurementgetMeasurementProfileCommandCommandParams - ); - electricalMeasurementClusterInteractionInfoMap.put("getMeasurementProfileCommand", electricalMeasurementgetMeasurementProfileCommandInteractionInfo); - - commandMap.put("electricalMeasurement", electricalMeasurementClusterInteractionInfoMap); - Map unitTestingClusterInteractionInfoMap = new LinkedHashMap<>(); Map unitTestingtestCommandParams = new LinkedHashMap(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index b09c89302d33b6..7de9e8cdc25d2f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -323,98 +323,6 @@ private static Map readOnOffInteractionInfo() { return result; } - private static Map readOnOffSwitchConfigurationInteractionInfo() { - Map result = new LinkedHashMap<>();Map readOnOffSwitchConfigurationSwitchTypeCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationSwitchTypeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readSwitchTypeAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readOnOffSwitchConfigurationSwitchTypeCommandParams - ); - result.put("readSwitchTypeAttribute", readOnOffSwitchConfigurationSwitchTypeAttributeInteractionInfo); - Map readOnOffSwitchConfigurationSwitchActionsCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationSwitchActionsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readSwitchActionsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readOnOffSwitchConfigurationSwitchActionsCommandParams - ); - result.put("readSwitchActionsAttribute", readOnOffSwitchConfigurationSwitchActionsAttributeInteractionInfo); - Map readOnOffSwitchConfigurationGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.OnOffSwitchConfigurationCluster.GeneratedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedOnOffSwitchConfigurationClusterGeneratedCommandListAttributeCallback(), - readOnOffSwitchConfigurationGeneratedCommandListCommandParams - ); - result.put("readGeneratedCommandListAttribute", readOnOffSwitchConfigurationGeneratedCommandListAttributeInteractionInfo); - Map readOnOffSwitchConfigurationAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.OnOffSwitchConfigurationCluster.AcceptedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedOnOffSwitchConfigurationClusterAcceptedCommandListAttributeCallback(), - readOnOffSwitchConfigurationAcceptedCommandListCommandParams - ); - result.put("readAcceptedCommandListAttribute", readOnOffSwitchConfigurationAcceptedCommandListAttributeInteractionInfo); - Map readOnOffSwitchConfigurationEventListCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationEventListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readEventListAttribute( - (ChipClusters.OnOffSwitchConfigurationCluster.EventListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedOnOffSwitchConfigurationClusterEventListAttributeCallback(), - readOnOffSwitchConfigurationEventListCommandParams - ); - result.put("readEventListAttribute", readOnOffSwitchConfigurationEventListAttributeInteractionInfo); - Map readOnOffSwitchConfigurationAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationAttributeListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readAttributeListAttribute( - (ChipClusters.OnOffSwitchConfigurationCluster.AttributeListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedOnOffSwitchConfigurationClusterAttributeListAttributeCallback(), - readOnOffSwitchConfigurationAttributeListCommandParams - ); - result.put("readAttributeListAttribute", readOnOffSwitchConfigurationAttributeListAttributeInteractionInfo); - Map readOnOffSwitchConfigurationFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationFeatureMapAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readFeatureMapAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readOnOffSwitchConfigurationFeatureMapCommandParams - ); - result.put("readFeatureMapAttribute", readOnOffSwitchConfigurationFeatureMapAttributeInteractionInfo); - Map readOnOffSwitchConfigurationClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readOnOffSwitchConfigurationClusterRevisionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).readClusterRevisionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readOnOffSwitchConfigurationClusterRevisionCommandParams - ); - result.put("readClusterRevisionAttribute", readOnOffSwitchConfigurationClusterRevisionAttributeInteractionInfo); - - return result; - } private static Map readLevelControlInteractionInfo() { Map result = new LinkedHashMap<>();Map readLevelControlCurrentLevelCommandParams = new LinkedHashMap(); InteractionInfo readLevelControlCurrentLevelAttributeInteractionInfo = new InteractionInfo( @@ -639,175 +547,6 @@ private static Map readLevelControlInteractionInfo() { return result; } - private static Map readBinaryInputBasicInteractionInfo() { - Map result = new LinkedHashMap<>();Map readBinaryInputBasicActiveTextCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicActiveTextAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readActiveTextAttribute( - (ChipClusters.CharStringAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBinaryInputBasicActiveTextCommandParams - ); - result.put("readActiveTextAttribute", readBinaryInputBasicActiveTextAttributeInteractionInfo); - Map readBinaryInputBasicDescriptionCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicDescriptionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readDescriptionAttribute( - (ChipClusters.CharStringAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBinaryInputBasicDescriptionCommandParams - ); - result.put("readDescriptionAttribute", readBinaryInputBasicDescriptionAttributeInteractionInfo); - Map readBinaryInputBasicInactiveTextCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicInactiveTextAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readInactiveTextAttribute( - (ChipClusters.CharStringAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedCharStringAttributeCallback(), - readBinaryInputBasicInactiveTextCommandParams - ); - result.put("readInactiveTextAttribute", readBinaryInputBasicInactiveTextAttributeInteractionInfo); - Map readBinaryInputBasicOutOfServiceCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicOutOfServiceAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readOutOfServiceAttribute( - (ChipClusters.BooleanAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), - readBinaryInputBasicOutOfServiceCommandParams - ); - result.put("readOutOfServiceAttribute", readBinaryInputBasicOutOfServiceAttributeInteractionInfo); - Map readBinaryInputBasicPolarityCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicPolarityAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readPolarityAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBinaryInputBasicPolarityCommandParams - ); - result.put("readPolarityAttribute", readBinaryInputBasicPolarityAttributeInteractionInfo); - Map readBinaryInputBasicPresentValueCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicPresentValueAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readPresentValueAttribute( - (ChipClusters.BooleanAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), - readBinaryInputBasicPresentValueCommandParams - ); - result.put("readPresentValueAttribute", readBinaryInputBasicPresentValueAttributeInteractionInfo); - Map readBinaryInputBasicReliabilityCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicReliabilityAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readReliabilityAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBinaryInputBasicReliabilityCommandParams - ); - result.put("readReliabilityAttribute", readBinaryInputBasicReliabilityAttributeInteractionInfo); - Map readBinaryInputBasicStatusFlagsCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicStatusFlagsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readStatusFlagsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBinaryInputBasicStatusFlagsCommandParams - ); - result.put("readStatusFlagsAttribute", readBinaryInputBasicStatusFlagsAttributeInteractionInfo); - Map readBinaryInputBasicApplicationTypeCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicApplicationTypeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readApplicationTypeAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readBinaryInputBasicApplicationTypeCommandParams - ); - result.put("readApplicationTypeAttribute", readBinaryInputBasicApplicationTypeAttributeInteractionInfo); - Map readBinaryInputBasicGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.BinaryInputBasicCluster.GeneratedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBinaryInputBasicClusterGeneratedCommandListAttributeCallback(), - readBinaryInputBasicGeneratedCommandListCommandParams - ); - result.put("readGeneratedCommandListAttribute", readBinaryInputBasicGeneratedCommandListAttributeInteractionInfo); - Map readBinaryInputBasicAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.BinaryInputBasicCluster.AcceptedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBinaryInputBasicClusterAcceptedCommandListAttributeCallback(), - readBinaryInputBasicAcceptedCommandListCommandParams - ); - result.put("readAcceptedCommandListAttribute", readBinaryInputBasicAcceptedCommandListAttributeInteractionInfo); - Map readBinaryInputBasicEventListCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicEventListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readEventListAttribute( - (ChipClusters.BinaryInputBasicCluster.EventListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBinaryInputBasicClusterEventListAttributeCallback(), - readBinaryInputBasicEventListCommandParams - ); - result.put("readEventListAttribute", readBinaryInputBasicEventListAttributeInteractionInfo); - Map readBinaryInputBasicAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicAttributeListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readAttributeListAttribute( - (ChipClusters.BinaryInputBasicCluster.AttributeListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBinaryInputBasicClusterAttributeListAttributeCallback(), - readBinaryInputBasicAttributeListCommandParams - ); - result.put("readAttributeListAttribute", readBinaryInputBasicAttributeListAttributeInteractionInfo); - Map readBinaryInputBasicFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicFeatureMapAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readFeatureMapAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readBinaryInputBasicFeatureMapCommandParams - ); - result.put("readFeatureMapAttribute", readBinaryInputBasicFeatureMapAttributeInteractionInfo); - Map readBinaryInputBasicClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readBinaryInputBasicClusterRevisionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).readClusterRevisionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBinaryInputBasicClusterRevisionCommandParams - ); - result.put("readClusterRevisionAttribute", readBinaryInputBasicClusterRevisionAttributeInteractionInfo); - - return result; - } private static Map readPulseWidthModulationInteractionInfo() { Map result = new LinkedHashMap<>();Map readPulseWidthModulationGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readPulseWidthModulationGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( @@ -11682,186 +11421,6 @@ private static Map readWindowCoveringInteractionInfo() return result; } - private static Map readBarrierControlInteractionInfo() { - Map result = new LinkedHashMap<>();Map readBarrierControlBarrierMovingStateCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierMovingStateAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierMovingStateAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierMovingStateCommandParams - ); - result.put("readBarrierMovingStateAttribute", readBarrierControlBarrierMovingStateAttributeInteractionInfo); - Map readBarrierControlBarrierSafetyStatusCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierSafetyStatusAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierSafetyStatusAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierSafetyStatusCommandParams - ); - result.put("readBarrierSafetyStatusAttribute", readBarrierControlBarrierSafetyStatusAttributeInteractionInfo); - Map readBarrierControlBarrierCapabilitiesCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierCapabilitiesAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierCapabilitiesAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierCapabilitiesCommandParams - ); - result.put("readBarrierCapabilitiesAttribute", readBarrierControlBarrierCapabilitiesAttributeInteractionInfo); - Map readBarrierControlBarrierOpenEventsCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierOpenEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierOpenEventsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierOpenEventsCommandParams - ); - result.put("readBarrierOpenEventsAttribute", readBarrierControlBarrierOpenEventsAttributeInteractionInfo); - Map readBarrierControlBarrierCloseEventsCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierCloseEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierCloseEventsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierCloseEventsCommandParams - ); - result.put("readBarrierCloseEventsAttribute", readBarrierControlBarrierCloseEventsAttributeInteractionInfo); - Map readBarrierControlBarrierCommandOpenEventsCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierCommandOpenEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierCommandOpenEventsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierCommandOpenEventsCommandParams - ); - result.put("readBarrierCommandOpenEventsAttribute", readBarrierControlBarrierCommandOpenEventsAttributeInteractionInfo); - Map readBarrierControlBarrierCommandCloseEventsCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierCommandCloseEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierCommandCloseEventsAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierCommandCloseEventsCommandParams - ); - result.put("readBarrierCommandCloseEventsAttribute", readBarrierControlBarrierCommandCloseEventsAttributeInteractionInfo); - Map readBarrierControlBarrierOpenPeriodCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierOpenPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierOpenPeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierOpenPeriodCommandParams - ); - result.put("readBarrierOpenPeriodAttribute", readBarrierControlBarrierOpenPeriodAttributeInteractionInfo); - Map readBarrierControlBarrierClosePeriodCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierClosePeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierClosePeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierClosePeriodCommandParams - ); - result.put("readBarrierClosePeriodAttribute", readBarrierControlBarrierClosePeriodAttributeInteractionInfo); - Map readBarrierControlBarrierPositionCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlBarrierPositionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readBarrierPositionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlBarrierPositionCommandParams - ); - result.put("readBarrierPositionAttribute", readBarrierControlBarrierPositionAttributeInteractionInfo); - Map readBarrierControlGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.BarrierControlCluster.GeneratedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBarrierControlClusterGeneratedCommandListAttributeCallback(), - readBarrierControlGeneratedCommandListCommandParams - ); - result.put("readGeneratedCommandListAttribute", readBarrierControlGeneratedCommandListAttributeInteractionInfo); - Map readBarrierControlAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.BarrierControlCluster.AcceptedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBarrierControlClusterAcceptedCommandListAttributeCallback(), - readBarrierControlAcceptedCommandListCommandParams - ); - result.put("readAcceptedCommandListAttribute", readBarrierControlAcceptedCommandListAttributeInteractionInfo); - Map readBarrierControlEventListCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlEventListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readEventListAttribute( - (ChipClusters.BarrierControlCluster.EventListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBarrierControlClusterEventListAttributeCallback(), - readBarrierControlEventListCommandParams - ); - result.put("readEventListAttribute", readBarrierControlEventListAttributeInteractionInfo); - Map readBarrierControlAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlAttributeListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readAttributeListAttribute( - (ChipClusters.BarrierControlCluster.AttributeListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedBarrierControlClusterAttributeListAttributeCallback(), - readBarrierControlAttributeListCommandParams - ); - result.put("readAttributeListAttribute", readBarrierControlAttributeListAttributeInteractionInfo); - Map readBarrierControlFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlFeatureMapAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readFeatureMapAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readBarrierControlFeatureMapCommandParams - ); - result.put("readFeatureMapAttribute", readBarrierControlFeatureMapAttributeInteractionInfo); - Map readBarrierControlClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readBarrierControlClusterRevisionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).readClusterRevisionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readBarrierControlClusterRevisionCommandParams - ); - result.put("readClusterRevisionAttribute", readBarrierControlClusterRevisionAttributeInteractionInfo); - - return result; - } private static Map readServiceAreaInteractionInfo() { Map result = new LinkedHashMap<>();Map readServiceAreaSupportedAreasCommandParams = new LinkedHashMap(); InteractionInfo readServiceAreaSupportedAreasAttributeInteractionInfo = new InteractionInfo( @@ -18850,1484 +18409,6 @@ private static Map readCommissionerControlInteractionIn return result; } - private static Map readElectricalMeasurementInteractionInfo() { - Map result = new LinkedHashMap<>();Map readElectricalMeasurementMeasurementTypeCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasurementTypeAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasurementTypeAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementMeasurementTypeCommandParams - ); - result.put("readMeasurementTypeAttribute", readElectricalMeasurementMeasurementTypeAttributeInteractionInfo); - Map readElectricalMeasurementDcVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcVoltageCommandParams - ); - result.put("readDcVoltageAttribute", readElectricalMeasurementDcVoltageAttributeInteractionInfo); - Map readElectricalMeasurementDcVoltageMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcVoltageMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcVoltageMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcVoltageMinCommandParams - ); - result.put("readDcVoltageMinAttribute", readElectricalMeasurementDcVoltageMinAttributeInteractionInfo); - Map readElectricalMeasurementDcVoltageMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcVoltageMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcVoltageMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcVoltageMaxCommandParams - ); - result.put("readDcVoltageMaxAttribute", readElectricalMeasurementDcVoltageMaxAttributeInteractionInfo); - Map readElectricalMeasurementDcCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcCurrentCommandParams - ); - result.put("readDcCurrentAttribute", readElectricalMeasurementDcCurrentAttributeInteractionInfo); - Map readElectricalMeasurementDcCurrentMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcCurrentMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcCurrentMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcCurrentMinCommandParams - ); - result.put("readDcCurrentMinAttribute", readElectricalMeasurementDcCurrentMinAttributeInteractionInfo); - Map readElectricalMeasurementDcCurrentMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcCurrentMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcCurrentMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcCurrentMaxCommandParams - ); - result.put("readDcCurrentMaxAttribute", readElectricalMeasurementDcCurrentMaxAttributeInteractionInfo); - Map readElectricalMeasurementDcPowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcPowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcPowerAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcPowerCommandParams - ); - result.put("readDcPowerAttribute", readElectricalMeasurementDcPowerAttributeInteractionInfo); - Map readElectricalMeasurementDcPowerMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcPowerMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcPowerMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcPowerMinCommandParams - ); - result.put("readDcPowerMinAttribute", readElectricalMeasurementDcPowerMinAttributeInteractionInfo); - Map readElectricalMeasurementDcPowerMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcPowerMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcPowerMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcPowerMaxCommandParams - ); - result.put("readDcPowerMaxAttribute", readElectricalMeasurementDcPowerMaxAttributeInteractionInfo); - Map readElectricalMeasurementDcVoltageMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcVoltageMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcVoltageMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcVoltageMultiplierCommandParams - ); - result.put("readDcVoltageMultiplierAttribute", readElectricalMeasurementDcVoltageMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementDcVoltageDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcVoltageDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcVoltageDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcVoltageDivisorCommandParams - ); - result.put("readDcVoltageDivisorAttribute", readElectricalMeasurementDcVoltageDivisorAttributeInteractionInfo); - Map readElectricalMeasurementDcCurrentMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcCurrentMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcCurrentMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcCurrentMultiplierCommandParams - ); - result.put("readDcCurrentMultiplierAttribute", readElectricalMeasurementDcCurrentMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementDcCurrentDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcCurrentDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcCurrentDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcCurrentDivisorCommandParams - ); - result.put("readDcCurrentDivisorAttribute", readElectricalMeasurementDcCurrentDivisorAttributeInteractionInfo); - Map readElectricalMeasurementDcPowerMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcPowerMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcPowerMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcPowerMultiplierCommandParams - ); - result.put("readDcPowerMultiplierAttribute", readElectricalMeasurementDcPowerMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementDcPowerDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementDcPowerDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readDcPowerDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementDcPowerDivisorCommandParams - ); - result.put("readDcPowerDivisorAttribute", readElectricalMeasurementDcPowerDivisorAttributeInteractionInfo); - Map readElectricalMeasurementAcFrequencyCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcFrequencyAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcFrequencyAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcFrequencyCommandParams - ); - result.put("readAcFrequencyAttribute", readElectricalMeasurementAcFrequencyAttributeInteractionInfo); - Map readElectricalMeasurementAcFrequencyMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcFrequencyMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcFrequencyMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcFrequencyMinCommandParams - ); - result.put("readAcFrequencyMinAttribute", readElectricalMeasurementAcFrequencyMinAttributeInteractionInfo); - Map readElectricalMeasurementAcFrequencyMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcFrequencyMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcFrequencyMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcFrequencyMaxCommandParams - ); - result.put("readAcFrequencyMaxAttribute", readElectricalMeasurementAcFrequencyMaxAttributeInteractionInfo); - Map readElectricalMeasurementNeutralCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementNeutralCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readNeutralCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementNeutralCurrentCommandParams - ); - result.put("readNeutralCurrentAttribute", readElectricalMeasurementNeutralCurrentAttributeInteractionInfo); - Map readElectricalMeasurementTotalActivePowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementTotalActivePowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readTotalActivePowerAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementTotalActivePowerCommandParams - ); - result.put("readTotalActivePowerAttribute", readElectricalMeasurementTotalActivePowerAttributeInteractionInfo); - Map readElectricalMeasurementTotalReactivePowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementTotalReactivePowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readTotalReactivePowerAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementTotalReactivePowerCommandParams - ); - result.put("readTotalReactivePowerAttribute", readElectricalMeasurementTotalReactivePowerAttributeInteractionInfo); - Map readElectricalMeasurementTotalApparentPowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementTotalApparentPowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readTotalApparentPowerAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementTotalApparentPowerCommandParams - ); - result.put("readTotalApparentPowerAttribute", readElectricalMeasurementTotalApparentPowerAttributeInteractionInfo); - Map readElectricalMeasurementMeasured1stHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasured1stHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasured1stHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasured1stHarmonicCurrentCommandParams - ); - result.put("readMeasured1stHarmonicCurrentAttribute", readElectricalMeasurementMeasured1stHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasured3rdHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasured3rdHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasured3rdHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasured3rdHarmonicCurrentCommandParams - ); - result.put("readMeasured3rdHarmonicCurrentAttribute", readElectricalMeasurementMeasured3rdHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasured5thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasured5thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasured5thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasured5thHarmonicCurrentCommandParams - ); - result.put("readMeasured5thHarmonicCurrentAttribute", readElectricalMeasurementMeasured5thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasured7thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasured7thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasured7thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasured7thHarmonicCurrentCommandParams - ); - result.put("readMeasured7thHarmonicCurrentAttribute", readElectricalMeasurementMeasured7thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasured9thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasured9thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasured9thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasured9thHarmonicCurrentCommandParams - ); - result.put("readMeasured9thHarmonicCurrentAttribute", readElectricalMeasurementMeasured9thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasured11thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasured11thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasured11thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasured11thHarmonicCurrentCommandParams - ); - result.put("readMeasured11thHarmonicCurrentAttribute", readElectricalMeasurementMeasured11thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasuredPhase1stHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasuredPhase1stHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasuredPhase1stHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasuredPhase1stHarmonicCurrentCommandParams - ); - result.put("readMeasuredPhase1stHarmonicCurrentAttribute", readElectricalMeasurementMeasuredPhase1stHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasuredPhase3rdHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasuredPhase3rdHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasuredPhase3rdHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasuredPhase3rdHarmonicCurrentCommandParams - ); - result.put("readMeasuredPhase3rdHarmonicCurrentAttribute", readElectricalMeasurementMeasuredPhase3rdHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasuredPhase5thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasuredPhase5thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasuredPhase5thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasuredPhase5thHarmonicCurrentCommandParams - ); - result.put("readMeasuredPhase5thHarmonicCurrentAttribute", readElectricalMeasurementMeasuredPhase5thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasuredPhase7thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasuredPhase7thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasuredPhase7thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasuredPhase7thHarmonicCurrentCommandParams - ); - result.put("readMeasuredPhase7thHarmonicCurrentAttribute", readElectricalMeasurementMeasuredPhase7thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasuredPhase9thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasuredPhase9thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasuredPhase9thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasuredPhase9thHarmonicCurrentCommandParams - ); - result.put("readMeasuredPhase9thHarmonicCurrentAttribute", readElectricalMeasurementMeasuredPhase9thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementMeasuredPhase11thHarmonicCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementMeasuredPhase11thHarmonicCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readMeasuredPhase11thHarmonicCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementMeasuredPhase11thHarmonicCurrentCommandParams - ); - result.put("readMeasuredPhase11thHarmonicCurrentAttribute", readElectricalMeasurementMeasuredPhase11thHarmonicCurrentAttributeInteractionInfo); - Map readElectricalMeasurementAcFrequencyMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcFrequencyMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcFrequencyMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcFrequencyMultiplierCommandParams - ); - result.put("readAcFrequencyMultiplierAttribute", readElectricalMeasurementAcFrequencyMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementAcFrequencyDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcFrequencyDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcFrequencyDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcFrequencyDivisorCommandParams - ); - result.put("readAcFrequencyDivisorAttribute", readElectricalMeasurementAcFrequencyDivisorAttributeInteractionInfo); - Map readElectricalMeasurementPowerMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementPowerMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readPowerMultiplierAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementPowerMultiplierCommandParams - ); - result.put("readPowerMultiplierAttribute", readElectricalMeasurementPowerMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementPowerDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementPowerDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readPowerDivisorAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementPowerDivisorCommandParams - ); - result.put("readPowerDivisorAttribute", readElectricalMeasurementPowerDivisorAttributeInteractionInfo); - Map readElectricalMeasurementHarmonicCurrentMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementHarmonicCurrentMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readHarmonicCurrentMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementHarmonicCurrentMultiplierCommandParams - ); - result.put("readHarmonicCurrentMultiplierAttribute", readElectricalMeasurementHarmonicCurrentMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementPhaseHarmonicCurrentMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementPhaseHarmonicCurrentMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readPhaseHarmonicCurrentMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementPhaseHarmonicCurrentMultiplierCommandParams - ); - result.put("readPhaseHarmonicCurrentMultiplierAttribute", readElectricalMeasurementPhaseHarmonicCurrentMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementInstantaneousVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementInstantaneousVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readInstantaneousVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementInstantaneousVoltageCommandParams - ); - result.put("readInstantaneousVoltageAttribute", readElectricalMeasurementInstantaneousVoltageAttributeInteractionInfo); - Map readElectricalMeasurementInstantaneousLineCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementInstantaneousLineCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readInstantaneousLineCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementInstantaneousLineCurrentCommandParams - ); - result.put("readInstantaneousLineCurrentAttribute", readElectricalMeasurementInstantaneousLineCurrentAttributeInteractionInfo); - Map readElectricalMeasurementInstantaneousActiveCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementInstantaneousActiveCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readInstantaneousActiveCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementInstantaneousActiveCurrentCommandParams - ); - result.put("readInstantaneousActiveCurrentAttribute", readElectricalMeasurementInstantaneousActiveCurrentAttributeInteractionInfo); - Map readElectricalMeasurementInstantaneousReactiveCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementInstantaneousReactiveCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readInstantaneousReactiveCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementInstantaneousReactiveCurrentCommandParams - ); - result.put("readInstantaneousReactiveCurrentAttribute", readElectricalMeasurementInstantaneousReactiveCurrentAttributeInteractionInfo); - Map readElectricalMeasurementInstantaneousPowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementInstantaneousPowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readInstantaneousPowerAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementInstantaneousPowerCommandParams - ); - result.put("readInstantaneousPowerAttribute", readElectricalMeasurementInstantaneousPowerAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageCommandParams - ); - result.put("readRmsVoltageAttribute", readElectricalMeasurementRmsVoltageAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageMinCommandParams - ); - result.put("readRmsVoltageMinAttribute", readElectricalMeasurementRmsVoltageMinAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageMaxCommandParams - ); - result.put("readRmsVoltageMaxAttribute", readElectricalMeasurementRmsVoltageMaxAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentCommandParams - ); - result.put("readRmsCurrentAttribute", readElectricalMeasurementRmsCurrentAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentMinCommandParams - ); - result.put("readRmsCurrentMinAttribute", readElectricalMeasurementRmsCurrentMinAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentMaxCommandParams - ); - result.put("readRmsCurrentMaxAttribute", readElectricalMeasurementRmsCurrentMaxAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerCommandParams - ); - result.put("readActivePowerAttribute", readElectricalMeasurementActivePowerAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerMinCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerMinAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerMinAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerMinCommandParams - ); - result.put("readActivePowerMinAttribute", readElectricalMeasurementActivePowerMinAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerMaxCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerMaxAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerMaxAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerMaxCommandParams - ); - result.put("readActivePowerMaxAttribute", readElectricalMeasurementActivePowerMaxAttributeInteractionInfo); - Map readElectricalMeasurementReactivePowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementReactivePowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readReactivePowerAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementReactivePowerCommandParams - ); - result.put("readReactivePowerAttribute", readElectricalMeasurementReactivePowerAttributeInteractionInfo); - Map readElectricalMeasurementApparentPowerCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementApparentPowerAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readApparentPowerAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementApparentPowerCommandParams - ); - result.put("readApparentPowerAttribute", readElectricalMeasurementApparentPowerAttributeInteractionInfo); - Map readElectricalMeasurementPowerFactorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementPowerFactorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readPowerFactorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementPowerFactorCommandParams - ); - result.put("readPowerFactorAttribute", readElectricalMeasurementPowerFactorAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsVoltageMeasurementPeriodCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsVoltageMeasurementPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsVoltageMeasurementPeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsVoltageMeasurementPeriodCommandParams - ); - result.put("readAverageRmsVoltageMeasurementPeriodAttribute", readElectricalMeasurementAverageRmsVoltageMeasurementPeriodAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsUnderVoltageCounterCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsUnderVoltageCounterAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsUnderVoltageCounterAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsUnderVoltageCounterCommandParams - ); - result.put("readAverageRmsUnderVoltageCounterAttribute", readElectricalMeasurementAverageRmsUnderVoltageCounterAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeOverVoltagePeriodCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeOverVoltagePeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeOverVoltagePeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeOverVoltagePeriodCommandParams - ); - result.put("readRmsExtremeOverVoltagePeriodAttribute", readElectricalMeasurementRmsExtremeOverVoltagePeriodAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeUnderVoltagePeriodCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeUnderVoltagePeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeUnderVoltagePeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeUnderVoltagePeriodCommandParams - ); - result.put("readRmsExtremeUnderVoltagePeriodAttribute", readElectricalMeasurementRmsExtremeUnderVoltagePeriodAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSagPeriodCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSagPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSagPeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSagPeriodCommandParams - ); - result.put("readRmsVoltageSagPeriodAttribute", readElectricalMeasurementRmsVoltageSagPeriodAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSwellPeriodCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSwellPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSwellPeriodAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSwellPeriodCommandParams - ); - result.put("readRmsVoltageSwellPeriodAttribute", readElectricalMeasurementRmsVoltageSwellPeriodAttributeInteractionInfo); - Map readElectricalMeasurementAcVoltageMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcVoltageMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcVoltageMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcVoltageMultiplierCommandParams - ); - result.put("readAcVoltageMultiplierAttribute", readElectricalMeasurementAcVoltageMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementAcVoltageDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcVoltageDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcVoltageDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcVoltageDivisorCommandParams - ); - result.put("readAcVoltageDivisorAttribute", readElectricalMeasurementAcVoltageDivisorAttributeInteractionInfo); - Map readElectricalMeasurementAcCurrentMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcCurrentMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcCurrentMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcCurrentMultiplierCommandParams - ); - result.put("readAcCurrentMultiplierAttribute", readElectricalMeasurementAcCurrentMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementAcCurrentDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcCurrentDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcCurrentDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcCurrentDivisorCommandParams - ); - result.put("readAcCurrentDivisorAttribute", readElectricalMeasurementAcCurrentDivisorAttributeInteractionInfo); - Map readElectricalMeasurementAcPowerMultiplierCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcPowerMultiplierAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcPowerMultiplierAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcPowerMultiplierCommandParams - ); - result.put("readAcPowerMultiplierAttribute", readElectricalMeasurementAcPowerMultiplierAttributeInteractionInfo); - Map readElectricalMeasurementAcPowerDivisorCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcPowerDivisorAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcPowerDivisorAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcPowerDivisorCommandParams - ); - result.put("readAcPowerDivisorAttribute", readElectricalMeasurementAcPowerDivisorAttributeInteractionInfo); - Map readElectricalMeasurementOverloadAlarmsMaskCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementOverloadAlarmsMaskAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readOverloadAlarmsMaskAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementOverloadAlarmsMaskCommandParams - ); - result.put("readOverloadAlarmsMaskAttribute", readElectricalMeasurementOverloadAlarmsMaskAttributeInteractionInfo); - Map readElectricalMeasurementVoltageOverloadCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementVoltageOverloadAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readVoltageOverloadAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementVoltageOverloadCommandParams - ); - result.put("readVoltageOverloadAttribute", readElectricalMeasurementVoltageOverloadAttributeInteractionInfo); - Map readElectricalMeasurementCurrentOverloadCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementCurrentOverloadAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readCurrentOverloadAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementCurrentOverloadCommandParams - ); - result.put("readCurrentOverloadAttribute", readElectricalMeasurementCurrentOverloadAttributeInteractionInfo); - Map readElectricalMeasurementAcOverloadAlarmsMaskCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcOverloadAlarmsMaskAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcOverloadAlarmsMaskAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcOverloadAlarmsMaskCommandParams - ); - result.put("readAcOverloadAlarmsMaskAttribute", readElectricalMeasurementAcOverloadAlarmsMaskAttributeInteractionInfo); - Map readElectricalMeasurementAcVoltageOverloadCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcVoltageOverloadAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcVoltageOverloadAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcVoltageOverloadCommandParams - ); - result.put("readAcVoltageOverloadAttribute", readElectricalMeasurementAcVoltageOverloadAttributeInteractionInfo); - Map readElectricalMeasurementAcCurrentOverloadCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcCurrentOverloadAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcCurrentOverloadAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcCurrentOverloadCommandParams - ); - result.put("readAcCurrentOverloadAttribute", readElectricalMeasurementAcCurrentOverloadAttributeInteractionInfo); - Map readElectricalMeasurementAcActivePowerOverloadCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcActivePowerOverloadAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcActivePowerOverloadAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcActivePowerOverloadCommandParams - ); - result.put("readAcActivePowerOverloadAttribute", readElectricalMeasurementAcActivePowerOverloadAttributeInteractionInfo); - Map readElectricalMeasurementAcReactivePowerOverloadCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcReactivePowerOverloadAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcReactivePowerOverloadAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAcReactivePowerOverloadCommandParams - ); - result.put("readAcReactivePowerOverloadAttribute", readElectricalMeasurementAcReactivePowerOverloadAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsOverVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsOverVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsOverVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsOverVoltageCommandParams - ); - result.put("readAverageRmsOverVoltageAttribute", readElectricalMeasurementAverageRmsOverVoltageAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsUnderVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsUnderVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsUnderVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsUnderVoltageCommandParams - ); - result.put("readAverageRmsUnderVoltageAttribute", readElectricalMeasurementAverageRmsUnderVoltageAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeOverVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeOverVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeOverVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeOverVoltageCommandParams - ); - result.put("readRmsExtremeOverVoltageAttribute", readElectricalMeasurementRmsExtremeOverVoltageAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeUnderVoltageCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeUnderVoltageAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeUnderVoltageAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeUnderVoltageCommandParams - ); - result.put("readRmsExtremeUnderVoltageAttribute", readElectricalMeasurementRmsExtremeUnderVoltageAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSagCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSagAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSagAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSagCommandParams - ); - result.put("readRmsVoltageSagAttribute", readElectricalMeasurementRmsVoltageSagAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSwellCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSwellAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSwellAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSwellCommandParams - ); - result.put("readRmsVoltageSwellAttribute", readElectricalMeasurementRmsVoltageSwellAttributeInteractionInfo); - Map readElectricalMeasurementLineCurrentPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementLineCurrentPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readLineCurrentPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementLineCurrentPhaseBCommandParams - ); - result.put("readLineCurrentPhaseBAttribute", readElectricalMeasurementLineCurrentPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementActiveCurrentPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActiveCurrentPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActiveCurrentPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActiveCurrentPhaseBCommandParams - ); - result.put("readActiveCurrentPhaseBAttribute", readElectricalMeasurementActiveCurrentPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementReactiveCurrentPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementReactiveCurrentPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readReactiveCurrentPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementReactiveCurrentPhaseBCommandParams - ); - result.put("readReactiveCurrentPhaseBAttribute", readElectricalMeasurementReactiveCurrentPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltagePhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltagePhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltagePhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltagePhaseBCommandParams - ); - result.put("readRmsVoltagePhaseBAttribute", readElectricalMeasurementRmsVoltagePhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageMinPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageMinPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageMinPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageMinPhaseBCommandParams - ); - result.put("readRmsVoltageMinPhaseBAttribute", readElectricalMeasurementRmsVoltageMinPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageMaxPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageMaxPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageMaxPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageMaxPhaseBCommandParams - ); - result.put("readRmsVoltageMaxPhaseBAttribute", readElectricalMeasurementRmsVoltageMaxPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentPhaseBCommandParams - ); - result.put("readRmsCurrentPhaseBAttribute", readElectricalMeasurementRmsCurrentPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentMinPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentMinPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentMinPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentMinPhaseBCommandParams - ); - result.put("readRmsCurrentMinPhaseBAttribute", readElectricalMeasurementRmsCurrentMinPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentMaxPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentMaxPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentMaxPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentMaxPhaseBCommandParams - ); - result.put("readRmsCurrentMaxPhaseBAttribute", readElectricalMeasurementRmsCurrentMaxPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerPhaseBCommandParams - ); - result.put("readActivePowerPhaseBAttribute", readElectricalMeasurementActivePowerPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerMinPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerMinPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerMinPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerMinPhaseBCommandParams - ); - result.put("readActivePowerMinPhaseBAttribute", readElectricalMeasurementActivePowerMinPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerMaxPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerMaxPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerMaxPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerMaxPhaseBCommandParams - ); - result.put("readActivePowerMaxPhaseBAttribute", readElectricalMeasurementActivePowerMaxPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementReactivePowerPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementReactivePowerPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readReactivePowerPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementReactivePowerPhaseBCommandParams - ); - result.put("readReactivePowerPhaseBAttribute", readElectricalMeasurementReactivePowerPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementApparentPowerPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementApparentPowerPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readApparentPowerPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementApparentPowerPhaseBCommandParams - ); - result.put("readApparentPowerPhaseBAttribute", readElectricalMeasurementApparentPowerPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementPowerFactorPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementPowerFactorPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readPowerFactorPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementPowerFactorPhaseBCommandParams - ); - result.put("readPowerFactorPhaseBAttribute", readElectricalMeasurementPowerFactorPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsVoltageMeasurementPeriodPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseBCommandParams - ); - result.put("readAverageRmsVoltageMeasurementPeriodPhaseBAttribute", readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsOverVoltageCounterPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsOverVoltageCounterPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsOverVoltageCounterPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsOverVoltageCounterPhaseBCommandParams - ); - result.put("readAverageRmsOverVoltageCounterPhaseBAttribute", readElectricalMeasurementAverageRmsOverVoltageCounterPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsUnderVoltageCounterPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseBCommandParams - ); - result.put("readAverageRmsUnderVoltageCounterPhaseBAttribute", readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeOverVoltagePeriodPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseBCommandParams - ); - result.put("readRmsExtremeOverVoltagePeriodPhaseBAttribute", readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeUnderVoltagePeriodPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseBCommandParams - ); - result.put("readRmsExtremeUnderVoltagePeriodPhaseBAttribute", readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSagPeriodPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSagPeriodPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSagPeriodPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSagPeriodPhaseBCommandParams - ); - result.put("readRmsVoltageSagPeriodPhaseBAttribute", readElectricalMeasurementRmsVoltageSagPeriodPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSwellPeriodPhaseBCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSwellPeriodPhaseBAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSwellPeriodPhaseBAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSwellPeriodPhaseBCommandParams - ); - result.put("readRmsVoltageSwellPeriodPhaseBAttribute", readElectricalMeasurementRmsVoltageSwellPeriodPhaseBAttributeInteractionInfo); - Map readElectricalMeasurementLineCurrentPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementLineCurrentPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readLineCurrentPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementLineCurrentPhaseCCommandParams - ); - result.put("readLineCurrentPhaseCAttribute", readElectricalMeasurementLineCurrentPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementActiveCurrentPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActiveCurrentPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActiveCurrentPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActiveCurrentPhaseCCommandParams - ); - result.put("readActiveCurrentPhaseCAttribute", readElectricalMeasurementActiveCurrentPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementReactiveCurrentPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementReactiveCurrentPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readReactiveCurrentPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementReactiveCurrentPhaseCCommandParams - ); - result.put("readReactiveCurrentPhaseCAttribute", readElectricalMeasurementReactiveCurrentPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltagePhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltagePhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltagePhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltagePhaseCCommandParams - ); - result.put("readRmsVoltagePhaseCAttribute", readElectricalMeasurementRmsVoltagePhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageMinPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageMinPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageMinPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageMinPhaseCCommandParams - ); - result.put("readRmsVoltageMinPhaseCAttribute", readElectricalMeasurementRmsVoltageMinPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageMaxPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageMaxPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageMaxPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageMaxPhaseCCommandParams - ); - result.put("readRmsVoltageMaxPhaseCAttribute", readElectricalMeasurementRmsVoltageMaxPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentPhaseCCommandParams - ); - result.put("readRmsCurrentPhaseCAttribute", readElectricalMeasurementRmsCurrentPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentMinPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentMinPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentMinPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentMinPhaseCCommandParams - ); - result.put("readRmsCurrentMinPhaseCAttribute", readElectricalMeasurementRmsCurrentMinPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsCurrentMaxPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsCurrentMaxPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsCurrentMaxPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsCurrentMaxPhaseCCommandParams - ); - result.put("readRmsCurrentMaxPhaseCAttribute", readElectricalMeasurementRmsCurrentMaxPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerPhaseCCommandParams - ); - result.put("readActivePowerPhaseCAttribute", readElectricalMeasurementActivePowerPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerMinPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerMinPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerMinPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerMinPhaseCCommandParams - ); - result.put("readActivePowerMinPhaseCAttribute", readElectricalMeasurementActivePowerMinPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementActivePowerMaxPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementActivePowerMaxPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readActivePowerMaxPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementActivePowerMaxPhaseCCommandParams - ); - result.put("readActivePowerMaxPhaseCAttribute", readElectricalMeasurementActivePowerMaxPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementReactivePowerPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementReactivePowerPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readReactivePowerPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementReactivePowerPhaseCCommandParams - ); - result.put("readReactivePowerPhaseCAttribute", readElectricalMeasurementReactivePowerPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementApparentPowerPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementApparentPowerPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readApparentPowerPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementApparentPowerPhaseCCommandParams - ); - result.put("readApparentPowerPhaseCAttribute", readElectricalMeasurementApparentPowerPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementPowerFactorPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementPowerFactorPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readPowerFactorPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementPowerFactorPhaseCCommandParams - ); - result.put("readPowerFactorPhaseCAttribute", readElectricalMeasurementPowerFactorPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsVoltageMeasurementPeriodPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseCCommandParams - ); - result.put("readAverageRmsVoltageMeasurementPeriodPhaseCAttribute", readElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsOverVoltageCounterPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsOverVoltageCounterPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsOverVoltageCounterPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsOverVoltageCounterPhaseCCommandParams - ); - result.put("readAverageRmsOverVoltageCounterPhaseCAttribute", readElectricalMeasurementAverageRmsOverVoltageCounterPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAverageRmsUnderVoltageCounterPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseCCommandParams - ); - result.put("readAverageRmsUnderVoltageCounterPhaseCAttribute", readElectricalMeasurementAverageRmsUnderVoltageCounterPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeOverVoltagePeriodPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseCCommandParams - ); - result.put("readRmsExtremeOverVoltagePeriodPhaseCAttribute", readElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsExtremeUnderVoltagePeriodPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseCCommandParams - ); - result.put("readRmsExtremeUnderVoltagePeriodPhaseCAttribute", readElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSagPeriodPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSagPeriodPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSagPeriodPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSagPeriodPhaseCCommandParams - ); - result.put("readRmsVoltageSagPeriodPhaseCAttribute", readElectricalMeasurementRmsVoltageSagPeriodPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementRmsVoltageSwellPeriodPhaseCCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementRmsVoltageSwellPeriodPhaseCAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readRmsVoltageSwellPeriodPhaseCAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementRmsVoltageSwellPeriodPhaseCCommandParams - ); - result.put("readRmsVoltageSwellPeriodPhaseCAttribute", readElectricalMeasurementRmsVoltageSwellPeriodPhaseCAttributeInteractionInfo); - Map readElectricalMeasurementGeneratedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readGeneratedCommandListAttribute( - (ChipClusters.ElectricalMeasurementCluster.GeneratedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedElectricalMeasurementClusterGeneratedCommandListAttributeCallback(), - readElectricalMeasurementGeneratedCommandListCommandParams - ); - result.put("readGeneratedCommandListAttribute", readElectricalMeasurementGeneratedCommandListAttributeInteractionInfo); - Map readElectricalMeasurementAcceptedCommandListCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAcceptedCommandListAttribute( - (ChipClusters.ElectricalMeasurementCluster.AcceptedCommandListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedElectricalMeasurementClusterAcceptedCommandListAttributeCallback(), - readElectricalMeasurementAcceptedCommandListCommandParams - ); - result.put("readAcceptedCommandListAttribute", readElectricalMeasurementAcceptedCommandListAttributeInteractionInfo); - Map readElectricalMeasurementEventListCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementEventListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readEventListAttribute( - (ChipClusters.ElectricalMeasurementCluster.EventListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedElectricalMeasurementClusterEventListAttributeCallback(), - readElectricalMeasurementEventListCommandParams - ); - result.put("readEventListAttribute", readElectricalMeasurementEventListAttributeInteractionInfo); - Map readElectricalMeasurementAttributeListCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementAttributeListAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readAttributeListAttribute( - (ChipClusters.ElectricalMeasurementCluster.AttributeListAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedElectricalMeasurementClusterAttributeListAttributeCallback(), - readElectricalMeasurementAttributeListCommandParams - ); - result.put("readAttributeListAttribute", readElectricalMeasurementAttributeListAttributeInteractionInfo); - Map readElectricalMeasurementFeatureMapCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementFeatureMapAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readFeatureMapAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readElectricalMeasurementFeatureMapCommandParams - ); - result.put("readFeatureMapAttribute", readElectricalMeasurementFeatureMapAttributeInteractionInfo); - Map readElectricalMeasurementClusterRevisionCommandParams = new LinkedHashMap(); - InteractionInfo readElectricalMeasurementClusterRevisionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).readClusterRevisionAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readElectricalMeasurementClusterRevisionCommandParams - ); - result.put("readClusterRevisionAttribute", readElectricalMeasurementClusterRevisionAttributeInteractionInfo); - - return result; - } private static Map readUnitTestingInteractionInfo() { Map result = new LinkedHashMap<>();Map readUnitTestingBooleanCommandParams = new LinkedHashMap(); InteractionInfo readUnitTestingBooleanAttributeInteractionInfo = new InteractionInfo( @@ -21491,9 +19572,7 @@ public Map> getReadAttributeMap() { put("identify", readIdentifyInteractionInfo()); put("groups", readGroupsInteractionInfo()); put("onOff", readOnOffInteractionInfo()); - put("onOffSwitchConfiguration", readOnOffSwitchConfigurationInteractionInfo()); put("levelControl", readLevelControlInteractionInfo()); - put("binaryInputBasic", readBinaryInputBasicInteractionInfo()); put("pulseWidthModulation", readPulseWidthModulationInteractionInfo()); put("descriptor", readDescriptorInteractionInfo()); put("binding", readBindingInteractionInfo()); @@ -21567,7 +19646,6 @@ public Map> getReadAttributeMap() { put("deviceEnergyManagementMode", readDeviceEnergyManagementModeInteractionInfo()); put("doorLock", readDoorLockInteractionInfo()); put("windowCovering", readWindowCoveringInteractionInfo()); - put("barrierControl", readBarrierControlInteractionInfo()); put("serviceArea", readServiceAreaInteractionInfo()); put("pumpConfigurationAndControl", readPumpConfigurationAndControlInteractionInfo()); put("thermostat", readThermostatInteractionInfo()); @@ -21610,7 +19688,6 @@ public Map> getReadAttributeMap() { put("contentAppObserver", readContentAppObserverInteractionInfo()); put("ecosystemInformation", readEcosystemInformationInteractionInfo()); put("commissionerControl", readCommissionerControlInteractionInfo()); - put("electricalMeasurement", readElectricalMeasurementInteractionInfo()); 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 0a59b42a9ffe34..b61658cc4ef211 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -120,30 +120,6 @@ public Map> getWriteAttributeMap() { ); writeOnOffInteractionInfo.put("writeStartUpOnOffAttribute", writeOnOffStartUpOnOffAttributeInteractionInfo); writeAttributeMap.put("onOff", writeOnOffInteractionInfo); - Map writeOnOffSwitchConfigurationInteractionInfo = new LinkedHashMap<>(); - Map writeOnOffSwitchConfigurationSwitchActionsCommandParams = new LinkedHashMap(); - CommandParameterInfo onOffSwitchConfigurationswitchActionsCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeOnOffSwitchConfigurationSwitchActionsCommandParams.put( - "value", - onOffSwitchConfigurationswitchActionsCommandParameterInfo - ); - InteractionInfo writeOnOffSwitchConfigurationSwitchActionsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.OnOffSwitchConfigurationCluster) cluster).writeSwitchActionsAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeOnOffSwitchConfigurationSwitchActionsCommandParams - ); - writeOnOffSwitchConfigurationInteractionInfo.put("writeSwitchActionsAttribute", writeOnOffSwitchConfigurationSwitchActionsAttributeInteractionInfo); - writeAttributeMap.put("onOffSwitchConfiguration", writeOnOffSwitchConfigurationInteractionInfo); Map writeLevelControlInteractionInfo = new LinkedHashMap<>(); Map writeLevelControlOptionsCommandParams = new LinkedHashMap(); CommandParameterInfo levelControloptionsCommandParameterInfo = @@ -300,140 +276,6 @@ public Map> getWriteAttributeMap() { ); writeLevelControlInteractionInfo.put("writeStartUpCurrentLevelAttribute", writeLevelControlStartUpCurrentLevelAttributeInteractionInfo); writeAttributeMap.put("levelControl", writeLevelControlInteractionInfo); - Map writeBinaryInputBasicInteractionInfo = new LinkedHashMap<>(); - Map writeBinaryInputBasicActiveTextCommandParams = new LinkedHashMap(); - CommandParameterInfo binaryInputBasicactiveTextCommandParameterInfo = - new CommandParameterInfo( - "value", - String.class, - String.class - ); - writeBinaryInputBasicActiveTextCommandParams.put( - "value", - binaryInputBasicactiveTextCommandParameterInfo - ); - InteractionInfo writeBinaryInputBasicActiveTextAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).writeActiveTextAttribute( - (DefaultClusterCallback) callback, - (String) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBinaryInputBasicActiveTextCommandParams - ); - writeBinaryInputBasicInteractionInfo.put("writeActiveTextAttribute", writeBinaryInputBasicActiveTextAttributeInteractionInfo); - Map writeBinaryInputBasicDescriptionCommandParams = new LinkedHashMap(); - CommandParameterInfo binaryInputBasicdescriptionCommandParameterInfo = - new CommandParameterInfo( - "value", - String.class, - String.class - ); - writeBinaryInputBasicDescriptionCommandParams.put( - "value", - binaryInputBasicdescriptionCommandParameterInfo - ); - InteractionInfo writeBinaryInputBasicDescriptionAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).writeDescriptionAttribute( - (DefaultClusterCallback) callback, - (String) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBinaryInputBasicDescriptionCommandParams - ); - writeBinaryInputBasicInteractionInfo.put("writeDescriptionAttribute", writeBinaryInputBasicDescriptionAttributeInteractionInfo); - Map writeBinaryInputBasicInactiveTextCommandParams = new LinkedHashMap(); - CommandParameterInfo binaryInputBasicinactiveTextCommandParameterInfo = - new CommandParameterInfo( - "value", - String.class, - String.class - ); - writeBinaryInputBasicInactiveTextCommandParams.put( - "value", - binaryInputBasicinactiveTextCommandParameterInfo - ); - InteractionInfo writeBinaryInputBasicInactiveTextAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).writeInactiveTextAttribute( - (DefaultClusterCallback) callback, - (String) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBinaryInputBasicInactiveTextCommandParams - ); - writeBinaryInputBasicInteractionInfo.put("writeInactiveTextAttribute", writeBinaryInputBasicInactiveTextAttributeInteractionInfo); - Map writeBinaryInputBasicOutOfServiceCommandParams = new LinkedHashMap(); - CommandParameterInfo binaryInputBasicoutOfServiceCommandParameterInfo = - new CommandParameterInfo( - "value", - Boolean.class, - Boolean.class - ); - writeBinaryInputBasicOutOfServiceCommandParams.put( - "value", - binaryInputBasicoutOfServiceCommandParameterInfo - ); - InteractionInfo writeBinaryInputBasicOutOfServiceAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).writeOutOfServiceAttribute( - (DefaultClusterCallback) callback, - (Boolean) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBinaryInputBasicOutOfServiceCommandParams - ); - writeBinaryInputBasicInteractionInfo.put("writeOutOfServiceAttribute", writeBinaryInputBasicOutOfServiceAttributeInteractionInfo); - Map writeBinaryInputBasicPresentValueCommandParams = new LinkedHashMap(); - CommandParameterInfo binaryInputBasicpresentValueCommandParameterInfo = - new CommandParameterInfo( - "value", - Boolean.class, - Boolean.class - ); - writeBinaryInputBasicPresentValueCommandParams.put( - "value", - binaryInputBasicpresentValueCommandParameterInfo - ); - InteractionInfo writeBinaryInputBasicPresentValueAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).writePresentValueAttribute( - (DefaultClusterCallback) callback, - (Boolean) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBinaryInputBasicPresentValueCommandParams - ); - writeBinaryInputBasicInteractionInfo.put("writePresentValueAttribute", writeBinaryInputBasicPresentValueAttributeInteractionInfo); - Map writeBinaryInputBasicReliabilityCommandParams = new LinkedHashMap(); - CommandParameterInfo binaryInputBasicreliabilityCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBinaryInputBasicReliabilityCommandParams.put( - "value", - binaryInputBasicreliabilityCommandParameterInfo - ); - InteractionInfo writeBinaryInputBasicReliabilityAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BinaryInputBasicCluster) cluster).writeReliabilityAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBinaryInputBasicReliabilityCommandParams - ); - writeBinaryInputBasicInteractionInfo.put("writeReliabilityAttribute", writeBinaryInputBasicReliabilityAttributeInteractionInfo); - writeAttributeMap.put("binaryInputBasic", writeBinaryInputBasicInteractionInfo); Map writePulseWidthModulationInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("pulseWidthModulation", writePulseWidthModulationInteractionInfo); Map writeDescriptorInteractionInfo = new LinkedHashMap<>(); @@ -1922,140 +1764,6 @@ public Map> getWriteAttributeMap() { ); writeWindowCoveringInteractionInfo.put("writeModeAttribute", writeWindowCoveringModeAttributeInteractionInfo); writeAttributeMap.put("windowCovering", writeWindowCoveringInteractionInfo); - Map writeBarrierControlInteractionInfo = new LinkedHashMap<>(); - Map writeBarrierControlBarrierOpenEventsCommandParams = new LinkedHashMap(); - CommandParameterInfo barrierControlbarrierOpenEventsCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBarrierControlBarrierOpenEventsCommandParams.put( - "value", - barrierControlbarrierOpenEventsCommandParameterInfo - ); - InteractionInfo writeBarrierControlBarrierOpenEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).writeBarrierOpenEventsAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBarrierControlBarrierOpenEventsCommandParams - ); - writeBarrierControlInteractionInfo.put("writeBarrierOpenEventsAttribute", writeBarrierControlBarrierOpenEventsAttributeInteractionInfo); - Map writeBarrierControlBarrierCloseEventsCommandParams = new LinkedHashMap(); - CommandParameterInfo barrierControlbarrierCloseEventsCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBarrierControlBarrierCloseEventsCommandParams.put( - "value", - barrierControlbarrierCloseEventsCommandParameterInfo - ); - InteractionInfo writeBarrierControlBarrierCloseEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).writeBarrierCloseEventsAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBarrierControlBarrierCloseEventsCommandParams - ); - writeBarrierControlInteractionInfo.put("writeBarrierCloseEventsAttribute", writeBarrierControlBarrierCloseEventsAttributeInteractionInfo); - Map writeBarrierControlBarrierCommandOpenEventsCommandParams = new LinkedHashMap(); - CommandParameterInfo barrierControlbarrierCommandOpenEventsCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBarrierControlBarrierCommandOpenEventsCommandParams.put( - "value", - barrierControlbarrierCommandOpenEventsCommandParameterInfo - ); - InteractionInfo writeBarrierControlBarrierCommandOpenEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).writeBarrierCommandOpenEventsAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBarrierControlBarrierCommandOpenEventsCommandParams - ); - writeBarrierControlInteractionInfo.put("writeBarrierCommandOpenEventsAttribute", writeBarrierControlBarrierCommandOpenEventsAttributeInteractionInfo); - Map writeBarrierControlBarrierCommandCloseEventsCommandParams = new LinkedHashMap(); - CommandParameterInfo barrierControlbarrierCommandCloseEventsCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBarrierControlBarrierCommandCloseEventsCommandParams.put( - "value", - barrierControlbarrierCommandCloseEventsCommandParameterInfo - ); - InteractionInfo writeBarrierControlBarrierCommandCloseEventsAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).writeBarrierCommandCloseEventsAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBarrierControlBarrierCommandCloseEventsCommandParams - ); - writeBarrierControlInteractionInfo.put("writeBarrierCommandCloseEventsAttribute", writeBarrierControlBarrierCommandCloseEventsAttributeInteractionInfo); - Map writeBarrierControlBarrierOpenPeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo barrierControlbarrierOpenPeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBarrierControlBarrierOpenPeriodCommandParams.put( - "value", - barrierControlbarrierOpenPeriodCommandParameterInfo - ); - InteractionInfo writeBarrierControlBarrierOpenPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).writeBarrierOpenPeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBarrierControlBarrierOpenPeriodCommandParams - ); - writeBarrierControlInteractionInfo.put("writeBarrierOpenPeriodAttribute", writeBarrierControlBarrierOpenPeriodAttributeInteractionInfo); - Map writeBarrierControlBarrierClosePeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo barrierControlbarrierClosePeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeBarrierControlBarrierClosePeriodCommandParams.put( - "value", - barrierControlbarrierClosePeriodCommandParameterInfo - ); - InteractionInfo writeBarrierControlBarrierClosePeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.BarrierControlCluster) cluster).writeBarrierClosePeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeBarrierControlBarrierClosePeriodCommandParams - ); - writeBarrierControlInteractionInfo.put("writeBarrierClosePeriodAttribute", writeBarrierControlBarrierClosePeriodAttributeInteractionInfo); - writeAttributeMap.put("barrierControl", writeBarrierControlInteractionInfo); Map writeServiceAreaInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("serviceArea", writeServiceAreaInteractionInfo); Map writePumpConfigurationAndControlInteractionInfo = new LinkedHashMap<>(); @@ -3768,184 +3476,6 @@ public Map> getWriteAttributeMap() { writeAttributeMap.put("ecosystemInformation", writeEcosystemInformationInteractionInfo); Map writeCommissionerControlInteractionInfo = new LinkedHashMap<>(); writeAttributeMap.put("commissionerControl", writeCommissionerControlInteractionInfo); - Map writeElectricalMeasurementInteractionInfo = new LinkedHashMap<>(); - Map writeElectricalMeasurementAverageRmsVoltageMeasurementPeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementaverageRmsVoltageMeasurementPeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementAverageRmsVoltageMeasurementPeriodCommandParams.put( - "value", - electricalMeasurementaverageRmsVoltageMeasurementPeriodCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementAverageRmsVoltageMeasurementPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeAverageRmsVoltageMeasurementPeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementAverageRmsVoltageMeasurementPeriodCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeAverageRmsVoltageMeasurementPeriodAttribute", writeElectricalMeasurementAverageRmsVoltageMeasurementPeriodAttributeInteractionInfo); - Map writeElectricalMeasurementAverageRmsUnderVoltageCounterCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementaverageRmsUnderVoltageCounterCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementAverageRmsUnderVoltageCounterCommandParams.put( - "value", - electricalMeasurementaverageRmsUnderVoltageCounterCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementAverageRmsUnderVoltageCounterAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeAverageRmsUnderVoltageCounterAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementAverageRmsUnderVoltageCounterCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeAverageRmsUnderVoltageCounterAttribute", writeElectricalMeasurementAverageRmsUnderVoltageCounterAttributeInteractionInfo); - Map writeElectricalMeasurementRmsExtremeOverVoltagePeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementrmsExtremeOverVoltagePeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementRmsExtremeOverVoltagePeriodCommandParams.put( - "value", - electricalMeasurementrmsExtremeOverVoltagePeriodCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementRmsExtremeOverVoltagePeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeRmsExtremeOverVoltagePeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementRmsExtremeOverVoltagePeriodCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeRmsExtremeOverVoltagePeriodAttribute", writeElectricalMeasurementRmsExtremeOverVoltagePeriodAttributeInteractionInfo); - Map writeElectricalMeasurementRmsExtremeUnderVoltagePeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementrmsExtremeUnderVoltagePeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementRmsExtremeUnderVoltagePeriodCommandParams.put( - "value", - electricalMeasurementrmsExtremeUnderVoltagePeriodCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementRmsExtremeUnderVoltagePeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeRmsExtremeUnderVoltagePeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementRmsExtremeUnderVoltagePeriodCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeRmsExtremeUnderVoltagePeriodAttribute", writeElectricalMeasurementRmsExtremeUnderVoltagePeriodAttributeInteractionInfo); - Map writeElectricalMeasurementRmsVoltageSagPeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementrmsVoltageSagPeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementRmsVoltageSagPeriodCommandParams.put( - "value", - electricalMeasurementrmsVoltageSagPeriodCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementRmsVoltageSagPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeRmsVoltageSagPeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementRmsVoltageSagPeriodCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeRmsVoltageSagPeriodAttribute", writeElectricalMeasurementRmsVoltageSagPeriodAttributeInteractionInfo); - Map writeElectricalMeasurementRmsVoltageSwellPeriodCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementrmsVoltageSwellPeriodCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementRmsVoltageSwellPeriodCommandParams.put( - "value", - electricalMeasurementrmsVoltageSwellPeriodCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementRmsVoltageSwellPeriodAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeRmsVoltageSwellPeriodAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementRmsVoltageSwellPeriodCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeRmsVoltageSwellPeriodAttribute", writeElectricalMeasurementRmsVoltageSwellPeriodAttributeInteractionInfo); - Map writeElectricalMeasurementOverloadAlarmsMaskCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementoverloadAlarmsMaskCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementOverloadAlarmsMaskCommandParams.put( - "value", - electricalMeasurementoverloadAlarmsMaskCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementOverloadAlarmsMaskAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeOverloadAlarmsMaskAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementOverloadAlarmsMaskCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeOverloadAlarmsMaskAttribute", writeElectricalMeasurementOverloadAlarmsMaskAttributeInteractionInfo); - Map writeElectricalMeasurementAcOverloadAlarmsMaskCommandParams = new LinkedHashMap(); - CommandParameterInfo electricalMeasurementacOverloadAlarmsMaskCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeElectricalMeasurementAcOverloadAlarmsMaskCommandParams.put( - "value", - electricalMeasurementacOverloadAlarmsMaskCommandParameterInfo - ); - InteractionInfo writeElectricalMeasurementAcOverloadAlarmsMaskAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ElectricalMeasurementCluster) cluster).writeAcOverloadAlarmsMaskAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeElectricalMeasurementAcOverloadAlarmsMaskCommandParams - ); - writeElectricalMeasurementInteractionInfo.put("writeAcOverloadAlarmsMaskAttribute", writeElectricalMeasurementAcOverloadAlarmsMaskAttributeInteractionInfo); - writeAttributeMap.put("electricalMeasurement", writeElectricalMeasurementInteractionInfo); Map writeUnitTestingInteractionInfo = new LinkedHashMap<>(); Map writeUnitTestingBooleanCommandParams = new LinkedHashMap(); CommandParameterInfo unitTestingbooleanCommandParameterInfo = diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/BarrierControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/BarrierControlCluster.kt deleted file mode 100644 index 1c424199292f41..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/BarrierControlCluster.kt +++ /dev/null @@ -1,1817 +0,0 @@ -/* - * - * 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.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse -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 BarrierControlCluster( - private val controller: MatterController, - private val endpointId: UShort, -) { - class GeneratedCommandListAttribute(val value: List) - - sealed class GeneratedCommandListAttributeSubscriptionState { - data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() - } - - class AcceptedCommandListAttribute(val value: List) - - sealed class AcceptedCommandListAttributeSubscriptionState { - data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() - } - - class EventListAttribute(val value: List) - - sealed class EventListAttributeSubscriptionState { - data class Success(val value: List) : EventListAttributeSubscriptionState() - - data class Error(val exception: Exception) : EventListAttributeSubscriptionState() - - object SubscriptionEstablished : EventListAttributeSubscriptionState() - } - - class AttributeListAttribute(val value: List) - - sealed class AttributeListAttributeSubscriptionState { - data class Success(val value: List) : AttributeListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() - - object SubscriptionEstablished : AttributeListAttributeSubscriptionState() - } - - suspend fun barrierControlGoToPercent(percentOpen: UByte, timedInvokeTimeout: Duration? = null) { - val commandId: UInt = 0u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - - val TAG_PERCENT_OPEN_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_PERCENT_OPEN_REQ), percentOpen) - 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}") - } - - suspend fun barrierControlStop(timedInvokeTimeout: Duration? = null) { - val commandId: UInt = 1u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - 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}") - } - - suspend fun readBarrierMovingStateAttribute(): UByte { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriermovingstate 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 subscribeBarrierMovingStateAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriermovingstate 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 readBarrierSafetyStatusAttribute(): UShort { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriersafetystatus 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 subscribeBarrierSafetyStatusAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriersafetystatus 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) - } - } - } - } - - suspend fun readBarrierCapabilitiesAttribute(): UByte { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriercapabilities 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 subscribeBarrierCapabilitiesAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriercapabilities 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 readBarrierOpenEventsAttribute(): UShort? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barrieropenevents attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeBarrierOpenEventsAttribute(value: UShort, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 4u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeBarrierOpenEventsAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barrieropenevents 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readBarrierCloseEventsAttribute(): UShort? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriercloseevents attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeBarrierCloseEventsAttribute(value: UShort, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 5u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeBarrierCloseEventsAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriercloseevents 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readBarrierCommandOpenEventsAttribute(): UShort? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriercommandopenevents attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeBarrierCommandOpenEventsAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 6u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeBarrierCommandOpenEventsAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriercommandopenevents 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readBarrierCommandCloseEventsAttribute(): UShort? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriercommandcloseevents attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeBarrierCommandCloseEventsAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 7u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeBarrierCommandCloseEventsAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriercommandcloseevents 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readBarrierOpenPeriodAttribute(): UShort? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barrieropenperiod attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeBarrierOpenPeriodAttribute(value: UShort, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 8u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeBarrierOpenPeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barrieropenperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readBarrierClosePeriodAttribute(): UShort? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barriercloseperiod attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeBarrierClosePeriodAttribute(value: UShort, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 9u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeBarrierClosePeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barriercloseperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readBarrierPositionAttribute(): UByte { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Barrierposition 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 subscribeBarrierPositionAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Barrierposition 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 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return GeneratedCommandListAttribute(decodedValue) - } - - suspend fun subscribeGeneratedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AcceptedCommandListAttribute(decodedValue) - } - - suspend fun subscribeAcceptedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return EventListAttribute(decodedValue) - } - - suspend fun subscribeEventListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AttributeListAttribute(decodedValue) - } - - suspend fun subscribeAttributeListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 { - 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() - .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().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 { - 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() - .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(BarrierControlCluster::class.java.name) - const val CLUSTER_ID: UInt = 259u - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/BinaryInputBasicCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/BinaryInputBasicCluster.kt deleted file mode 100644 index a3aeb110b47fbc..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/BinaryInputBasicCluster.kt +++ /dev/null @@ -1,1671 +0,0 @@ -/* - * - * 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.BooleanSubscriptionState -import matter.controller.MatterController -import matter.controller.ReadData -import matter.controller.ReadRequest -import matter.controller.StringSubscriptionState -import matter.controller.SubscribeRequest -import matter.controller.SubscriptionState -import matter.controller.UByteSubscriptionState -import matter.controller.UIntSubscriptionState -import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse -import matter.controller.cluster.structs.* -import matter.controller.model.AttributePath -import matter.tlv.AnonymousTag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class BinaryInputBasicCluster( - private val controller: MatterController, - private val endpointId: UShort, -) { - class GeneratedCommandListAttribute(val value: List) - - sealed class GeneratedCommandListAttributeSubscriptionState { - data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() - } - - class AcceptedCommandListAttribute(val value: List) - - sealed class AcceptedCommandListAttributeSubscriptionState { - data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() - } - - class EventListAttribute(val value: List) - - sealed class EventListAttributeSubscriptionState { - data class Success(val value: List) : EventListAttributeSubscriptionState() - - data class Error(val exception: Exception) : EventListAttributeSubscriptionState() - - object SubscriptionEstablished : EventListAttributeSubscriptionState() - } - - class AttributeListAttribute(val value: List) - - sealed class AttributeListAttributeSubscriptionState { - data class Success(val value: List) : AttributeListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() - - object SubscriptionEstablished : AttributeListAttributeSubscriptionState() - } - - suspend fun readActiveTextAttribute(): String? { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activetext attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: String? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getString(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeActiveTextAttribute(value: String, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 4u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeActiveTextAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - StringSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Activetext 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.isNextTag(AnonymousTag)) { - tlvReader.getString(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(StringSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(StringSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDescriptionAttribute(): String? { - val ATTRIBUTE_ID: UInt = 28u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Description attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: String? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getString(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeDescriptionAttribute(value: String, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 28u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeDescriptionAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 28u - 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( - StringSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Description 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.isNextTag(AnonymousTag)) { - tlvReader.getString(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(StringSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(StringSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readInactiveTextAttribute(): String? { - val ATTRIBUTE_ID: UInt = 46u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Inactivetext attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: String? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getString(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeInactiveTextAttribute(value: String, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 46u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeInactiveTextAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 46u - 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( - StringSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Inactivetext 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.isNextTag(AnonymousTag)) { - tlvReader.getString(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(StringSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(StringSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readOutOfServiceAttribute(): Boolean { - val ATTRIBUTE_ID: UInt = 81u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Outofservice attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag) - - return decodedValue - } - - suspend fun writeOutOfServiceAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 81u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOutOfServiceAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 81u - 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( - BooleanSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Outofservice attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag) - - emit(BooleanSubscriptionState.Success(decodedValue)) - } - SubscriptionState.SubscriptionEstablished -> { - emit(BooleanSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPolarityAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 84u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Polarity attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePolarityAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 84u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Polarity 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.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPresentValueAttribute(): Boolean { - val ATTRIBUTE_ID: UInt = 85u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Presentvalue attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag) - - return decodedValue - } - - suspend fun writePresentValueAttribute(value: Boolean, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 85u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribePresentValueAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 85u - 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( - BooleanSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Presentvalue attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Boolean = tlvReader.getBoolean(AnonymousTag) - - emit(BooleanSubscriptionState.Success(decodedValue)) - } - SubscriptionState.SubscriptionEstablished -> { - emit(BooleanSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readReliabilityAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 103u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Reliability attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeReliabilityAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 103u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeReliabilityAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 103u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Reliability 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.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readStatusFlagsAttribute(): UByte { - val ATTRIBUTE_ID: UInt = 111u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Statusflags 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 subscribeStatusFlagsAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 111u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Statusflags 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 readApplicationTypeAttribute(): UInt? { - val ATTRIBUTE_ID: UInt = 256u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Applicationtype attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeApplicationTypeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 256u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Applicationtype 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.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return GeneratedCommandListAttribute(decodedValue) - } - - suspend fun subscribeGeneratedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AcceptedCommandListAttribute(decodedValue) - } - - suspend fun subscribeAcceptedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return EventListAttribute(decodedValue) - } - - suspend fun subscribeEventListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AttributeListAttribute(decodedValue) - } - - suspend fun subscribeAttributeListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 { - 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() - .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().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 { - 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() - .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(BinaryInputBasicCluster::class.java.name) - const val CLUSTER_ID: UInt = 15u - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ElectricalMeasurementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ElectricalMeasurementCluster.kt deleted file mode 100644 index 7c564d94f7738c..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ElectricalMeasurementCluster.kt +++ /dev/null @@ -1,12934 +0,0 @@ -/* - * - * 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.ByteSubscriptionState -import matter.controller.IntSubscriptionState -import matter.controller.InvokeRequest -import matter.controller.InvokeResponse -import matter.controller.MatterController -import matter.controller.ReadData -import matter.controller.ReadRequest -import matter.controller.ShortSubscriptionState -import matter.controller.SubscribeRequest -import matter.controller.SubscriptionState -import matter.controller.UByteSubscriptionState -import matter.controller.UIntSubscriptionState -import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse -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 ElectricalMeasurementCluster( - private val controller: MatterController, - private val endpointId: UShort, -) { - class GeneratedCommandListAttribute(val value: List) - - sealed class GeneratedCommandListAttributeSubscriptionState { - data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() - } - - class AcceptedCommandListAttribute(val value: List) - - sealed class AcceptedCommandListAttributeSubscriptionState { - data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() - } - - class EventListAttribute(val value: List) - - sealed class EventListAttributeSubscriptionState { - data class Success(val value: List) : EventListAttributeSubscriptionState() - - data class Error(val exception: Exception) : EventListAttributeSubscriptionState() - - object SubscriptionEstablished : EventListAttributeSubscriptionState() - } - - class AttributeListAttribute(val value: List) - - sealed class AttributeListAttributeSubscriptionState { - data class Success(val value: List) : AttributeListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() - - object SubscriptionEstablished : AttributeListAttributeSubscriptionState() - } - - suspend fun getProfileInfoCommand(timedInvokeTimeout: Duration? = null) { - val commandId: UInt = 0u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - 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}") - } - - suspend fun getMeasurementProfileCommand( - attributeId: UShort, - startTime: UInt, - numberOfIntervals: UByte, - timedInvokeTimeout: Duration? = null, - ) { - val commandId: UInt = 1u - - val tlvWriter = TlvWriter() - tlvWriter.startStructure(AnonymousTag) - - val TAG_ATTRIBUTE_ID_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_ATTRIBUTE_ID_REQ), attributeId) - - val TAG_START_TIME_REQ: Int = 1 - tlvWriter.put(ContextSpecificTag(TAG_START_TIME_REQ), startTime) - - val TAG_NUMBER_OF_INTERVALS_REQ: Int = 2 - tlvWriter.put(ContextSpecificTag(TAG_NUMBER_OF_INTERVALS_REQ), numberOfIntervals) - 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}") - } - - suspend fun readMeasurementTypeAttribute(): UInt? { - 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().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: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasurementTypeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UIntSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .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: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcVoltageAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 256u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcvoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 256u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dcvoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcVoltageMinAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 257u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcvoltagemin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcVoltageMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 257u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dcvoltagemin 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcVoltageMaxAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 258u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcvoltagemax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcVoltageMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 258u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dcvoltagemax 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 259u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 259u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcCurrentMinAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 260u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dccurrentmin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcCurrentMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 260u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dccurrentmin 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcCurrentMaxAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 261u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dccurrentmax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcCurrentMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 261u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dccurrentmax 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcPowerAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 262u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcpower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcPowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 262u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dcpower 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcPowerMinAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 263u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcpowermin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcPowerMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 263u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dcpowermin 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcPowerMaxAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 264u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcpowermax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcPowerMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 264u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Dcpowermax 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcVoltageMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 512u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcvoltagemultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcVoltageMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 512u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Dcvoltagemultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcVoltageDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 513u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcvoltagedivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcVoltageDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 513u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Dcvoltagedivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcCurrentMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 514u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dccurrentmultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcCurrentMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 514u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Dccurrentmultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcCurrentDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 515u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dccurrentdivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcCurrentDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 515u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Dccurrentdivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcPowerMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 516u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcpowermultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcPowerMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 516u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Dcpowermultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readDcPowerDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 517u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Dcpowerdivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeDcPowerDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 517u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Dcpowerdivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcFrequencyAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 768u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acfrequency attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcFrequencyAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 768u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Acfrequency 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcFrequencyMinAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 769u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acfrequencymin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcFrequencyMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 769u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acfrequencymin 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcFrequencyMaxAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 770u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acfrequencymax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcFrequencyMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 770u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acfrequencymax 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readNeutralCurrentAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 771u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Neutralcurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeNeutralCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 771u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Neutralcurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readTotalActivePowerAttribute(): Int? { - val ATTRIBUTE_ID: UInt = 772u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Totalactivepower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Int? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeTotalActivePowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 772u - 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( - IntSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Totalactivepower attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Int? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(IntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(IntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readTotalReactivePowerAttribute(): Int? { - val ATTRIBUTE_ID: UInt = 773u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Totalreactivepower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Int? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeTotalReactivePowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 773u - 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( - IntSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Totalreactivepower attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Int? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(IntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(IntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readTotalApparentPowerAttribute(): UInt? { - val ATTRIBUTE_ID: UInt = 774u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Totalapparentpower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeTotalApparentPowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 774u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Totalapparentpower 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.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasured1stHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 775u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Measured1stharmoniccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasured1stHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 775u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measured1stharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasured3rdHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 776u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Measured3rdharmoniccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasured3rdHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 776u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measured3rdharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasured5thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 777u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Measured5thharmoniccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasured5thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 777u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measured5thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasured7thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 778u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Measured7thharmoniccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasured7thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 778u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measured7thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasured9thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 779u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Measured9thharmoniccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasured9thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 779u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measured9thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasured11thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 780u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Measured11thharmoniccurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasured11thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 780u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measured11thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasuredPhase1stHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 781u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Measuredphase1stharmoniccurrent attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasuredPhase1stHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 781u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measuredphase1stharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasuredPhase3rdHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 782u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Measuredphase3rdharmoniccurrent attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasuredPhase3rdHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 782u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measuredphase3rdharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasuredPhase5thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 783u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Measuredphase5thharmoniccurrent attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasuredPhase5thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 783u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measuredphase5thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasuredPhase7thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 784u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Measuredphase7thharmoniccurrent attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasuredPhase7thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 784u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measuredphase7thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasuredPhase9thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 785u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Measuredphase9thharmoniccurrent attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasuredPhase9thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 785u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measuredphase9thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readMeasuredPhase11thHarmonicCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 786u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Measuredphase11thharmoniccurrent attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeMeasuredPhase11thHarmonicCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 786u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Measuredphase11thharmoniccurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcFrequencyMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1024u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acfrequencymultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcFrequencyMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1024u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acfrequencymultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcFrequencyDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1025u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acfrequencydivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcFrequencyDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1025u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acfrequencydivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPowerMultiplierAttribute(): UInt? { - val ATTRIBUTE_ID: UInt = 1026u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Powermultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePowerMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1026u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Powermultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPowerDivisorAttribute(): UInt? { - val ATTRIBUTE_ID: UInt = 1027u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Powerdivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UInt? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePowerDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1027u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Powerdivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUInt(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UIntSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readHarmonicCurrentMultiplierAttribute(): Byte? { - val ATTRIBUTE_ID: UInt = 1028u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Harmoniccurrentmultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeHarmonicCurrentMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1028u - 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( - ByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Harmoniccurrentmultiplier attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPhaseHarmonicCurrentMultiplierAttribute(): Byte? { - val ATTRIBUTE_ID: UInt = 1029u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Phaseharmoniccurrentmultiplier attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePhaseHarmonicCurrentMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1029u - 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( - ByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Phaseharmoniccurrentmultiplier attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readInstantaneousVoltageAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1280u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Instantaneousvoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeInstantaneousVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1280u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Instantaneousvoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readInstantaneousLineCurrentAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1281u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Instantaneouslinecurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeInstantaneousLineCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1281u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Instantaneouslinecurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readInstantaneousActiveCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1282u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Instantaneousactivecurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeInstantaneousActiveCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1282u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Instantaneousactivecurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readInstantaneousReactiveCurrentAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1283u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Instantaneousreactivecurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeInstantaneousReactiveCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1283u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Instantaneousreactivecurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readInstantaneousPowerAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1284u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Instantaneouspower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeInstantaneousPowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1284u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Instantaneouspower 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1285u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1285u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmsvoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageMinAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1286u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagemin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1286u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmsvoltagemin 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageMaxAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1287u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagemax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1287u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmsvoltagemax 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1288u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrent attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1288u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmscurrent 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentMinAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1289u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentmin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1289u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmscurrentmin 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentMaxAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1290u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentmax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1290u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmscurrentmax 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1291u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1291u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Activepower 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerMinAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1292u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowermin attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerMinAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1292u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowermin 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerMaxAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1293u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowermax attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerMaxAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1293u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowermax 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readReactivePowerAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1294u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Reactivepower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeReactivePowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1294u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Reactivepower 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readApparentPowerAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1295u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Apparentpower attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeApparentPowerAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1295u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Apparentpower 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPowerFactorAttribute(): Byte? { - val ATTRIBUTE_ID: UInt = 1296u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Powerfactor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePowerFactorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1296u - 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( - ByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Powerfactor attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsVoltageMeasurementPeriodAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1297u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsvoltagemeasurementperiod attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeAverageRmsVoltageMeasurementPeriodAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 1297u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeAverageRmsVoltageMeasurementPeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1297u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsvoltagemeasurementperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsUnderVoltageCounterAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1299u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsundervoltagecounter attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeAverageRmsUnderVoltageCounterAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 1299u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeAverageRmsUnderVoltageCounterAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1299u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsundervoltagecounter 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeOverVoltagePeriodAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1300u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsextremeovervoltageperiod attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeRmsExtremeOverVoltagePeriodAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 1300u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeRmsExtremeOverVoltagePeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1300u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeovervoltageperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeUnderVoltagePeriodAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1301u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsextremeundervoltageperiod attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeRmsExtremeUnderVoltagePeriodAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 1301u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeRmsExtremeUnderVoltagePeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1301u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeundervoltageperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSagPeriodAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1302u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagesagperiod attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeRmsVoltageSagPeriodAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 1302u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeRmsVoltageSagPeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1302u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagesagperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSwellPeriodAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1303u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltageswellperiod attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeRmsVoltageSwellPeriodAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 1303u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeRmsVoltageSwellPeriodAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1303u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltageswellperiod 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcVoltageMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1536u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acvoltagemultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcVoltageMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1536u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acvoltagemultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcVoltageDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1537u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acvoltagedivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcVoltageDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1537u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acvoltagedivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcCurrentMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1538u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Accurrentmultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcCurrentMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1538u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Accurrentmultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcCurrentDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1539u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Accurrentdivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcCurrentDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1539u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Accurrentdivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcPowerMultiplierAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1540u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acpowermultiplier attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcPowerMultiplierAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1540u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acpowermultiplier 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcPowerDivisorAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 1541u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acpowerdivisor attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcPowerDivisorAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1541u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acpowerdivisor 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readOverloadAlarmsMaskAttribute(): UByte? { - val ATTRIBUTE_ID: UInt = 1792u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Overloadalarmsmask attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeOverloadAlarmsMaskAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 1792u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeOverloadAlarmsMaskAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1792u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Overloadalarmsmask 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.isNextTag(AnonymousTag)) { - tlvReader.getUByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readVoltageOverloadAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1793u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Voltageoverload attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeVoltageOverloadAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1793u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Voltageoverload 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readCurrentOverloadAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 1794u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Currentoverload attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeCurrentOverloadAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 1794u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Currentoverload 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcOverloadAlarmsMaskAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2048u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acoverloadalarmsmask attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun writeAcOverloadAlarmsMaskAttribute( - value: UShort, - timedWriteTimeout: Duration? = null, - ) { - val ATTRIBUTE_ID: UInt = 2048u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeAcOverloadAlarmsMaskAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2048u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acoverloadalarmsmask 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcVoltageOverloadAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2049u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acvoltageoverload attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcVoltageOverloadAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2049u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acvoltageoverload 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcCurrentOverloadAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2050u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Accurrentoverload attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcCurrentOverloadAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2050u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Accurrentoverload 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcActivePowerOverloadAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2051u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acactivepoweroverload attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcActivePowerOverloadAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2051u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acactivepoweroverload 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAcReactivePowerOverloadAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2052u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Acreactivepoweroverload attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAcReactivePowerOverloadAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2052u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Acreactivepoweroverload 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsOverVoltageAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2053u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Averagermsovervoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsOverVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2053u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsovervoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsUnderVoltageAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2054u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Averagermsundervoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsUnderVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2054u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsundervoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeOverVoltageAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2055u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsextremeovervoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsExtremeOverVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2055u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeovervoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeUnderVoltageAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2056u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsextremeundervoltage attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsExtremeUnderVoltageAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2056u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeundervoltage 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSagAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2057u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagesag attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageSagAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2057u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Rmsvoltagesag 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSwellAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2058u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltageswell attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageSwellAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2058u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltageswell 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readLineCurrentPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2305u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Linecurrentphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeLineCurrentPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2305u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Linecurrentphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActiveCurrentPhaseBAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2306u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activecurrentphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActiveCurrentPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2306u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activecurrentphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readReactiveCurrentPhaseBAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2307u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Reactivecurrentphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeReactiveCurrentPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2307u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Reactivecurrentphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltagePhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2309u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagephaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltagePhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2309u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagephaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageMinPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2310u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltageminphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageMinPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2310u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltageminphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageMaxPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2311u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagemaxphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageMaxPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2311u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagemaxphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2312u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2312u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmscurrentphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentMinPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2313u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentminphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentMinPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2313u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmscurrentminphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentMaxPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2314u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentmaxphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentMaxPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2314u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmscurrentmaxphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerPhaseBAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2315u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowerphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2315u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowerphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerMinPhaseBAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2316u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowerminphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerMinPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2316u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowerminphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerMaxPhaseBAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2317u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowermaxphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerMaxPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2317u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowermaxphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readReactivePowerPhaseBAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2318u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Reactivepowerphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeReactivePowerPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2318u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Reactivepowerphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readApparentPowerPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2319u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Apparentpowerphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeApparentPowerPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2319u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Apparentpowerphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPowerFactorPhaseBAttribute(): Byte? { - val ATTRIBUTE_ID: UInt = 2320u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Powerfactorphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePowerFactorPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2320u - 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( - ByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Powerfactorphaseb attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsVoltageMeasurementPeriodPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2321u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsvoltagemeasurementperiodphaseb attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsVoltageMeasurementPeriodPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2321u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsvoltagemeasurementperiodphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsOverVoltageCounterPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2322u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsovervoltagecounterphaseb attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsOverVoltageCounterPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2322u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsovervoltagecounterphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsUnderVoltageCounterPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2323u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsundervoltagecounterphaseb attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsUnderVoltageCounterPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2323u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsundervoltagecounterphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeOverVoltagePeriodPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2324u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Rmsextremeovervoltageperiodphaseb attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsExtremeOverVoltagePeriodPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2324u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeovervoltageperiodphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeUnderVoltagePeriodPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2325u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Rmsextremeundervoltageperiodphaseb attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsExtremeUnderVoltagePeriodPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2325u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeundervoltageperiodphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSagPeriodPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2326u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagesagperiodphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageSagPeriodPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2326u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagesagperiodphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSwellPeriodPhaseBAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2327u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltageswellperiodphaseb attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageSwellPeriodPhaseBAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2327u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltageswellperiodphaseb 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readLineCurrentPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2561u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Linecurrentphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeLineCurrentPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2561u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Linecurrentphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActiveCurrentPhaseCAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2562u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activecurrentphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActiveCurrentPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2562u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activecurrentphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readReactiveCurrentPhaseCAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2563u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Reactivecurrentphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeReactiveCurrentPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2563u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Reactivecurrentphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltagePhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2565u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagephasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltagePhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2565u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagephasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageMinPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2566u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltageminphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageMinPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2566u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltageminphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageMaxPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2567u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagemaxphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageMaxPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2567u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagemaxphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2568u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2568u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmscurrentphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentMinPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2569u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentminphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentMinPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2569u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmscurrentminphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsCurrentMaxPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2570u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmscurrentmaxphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsCurrentMaxPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2570u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmscurrentmaxphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerPhaseCAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2571u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowerphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2571u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowerphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerMinPhaseCAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2572u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowerminphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerMinPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2572u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowerminphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readActivePowerMaxPhaseCAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2573u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Activepowermaxphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeActivePowerMaxPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2573u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Activepowermaxphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readReactivePowerPhaseCAttribute(): Short? { - val ATTRIBUTE_ID: UInt = 2574u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Reactivepowerphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Short? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeReactivePowerPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2574u - 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( - ShortSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Reactivepowerphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readApparentPowerPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2575u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Apparentpowerphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeApparentPowerPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2575u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Apparentpowerphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readPowerFactorPhaseCAttribute(): Byte? { - val ATTRIBUTE_ID: UInt = 2576u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Powerfactorphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribePowerFactorPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2576u - 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( - ByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Powerfactorphasec attribute not found in Node State update" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: Byte? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getByte(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(ByteSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(ByteSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsVoltageMeasurementPeriodPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2577u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsvoltagemeasurementperiodphasec attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsVoltageMeasurementPeriodPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2577u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsvoltagemeasurementperiodphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsOverVoltageCounterPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2578u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsovervoltagecounterphasec attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsOverVoltageCounterPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2578u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsovervoltagecounterphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readAverageRmsUnderVoltageCounterPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2579u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Averagermsundervoltagecounterphasec attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeAverageRmsUnderVoltageCounterPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2579u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Averagermsundervoltagecounterphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeOverVoltagePeriodPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2580u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Rmsextremeovervoltageperiodphasec attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsExtremeOverVoltagePeriodPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2580u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeovervoltageperiodphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsExtremeUnderVoltagePeriodPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2581u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { - "Rmsextremeundervoltageperiodphasec attribute not found in response" - } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsExtremeUnderVoltagePeriodPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2581u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsextremeundervoltageperiodphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSagPeriodPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2582u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltagesagperiodphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageSagPeriodPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2582u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltagesagperiodphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.SubscriptionEstablished) - } - } - } - } - - suspend fun readRmsVoltageSwellPeriodPhaseCAttribute(): UShort? { - val ATTRIBUTE_ID: UInt = 2583u - - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Rmsvoltageswellperiodphasec attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: UShort? = - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - return decodedValue - } - - suspend fun subscribeRmsVoltageSwellPeriodPhaseCAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 2583u - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { - "Rmsvoltageswellperiodphasec 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.isNextTag(AnonymousTag)) { - tlvReader.getUShort(AnonymousTag) - } else { - null - } - - decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(UShortSubscriptionState.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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return GeneratedCommandListAttribute(decodedValue) - } - - suspend fun subscribeGeneratedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AcceptedCommandListAttribute(decodedValue) - } - - suspend fun subscribeAcceptedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return EventListAttribute(decodedValue) - } - - suspend fun subscribeEventListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AttributeListAttribute(decodedValue) - } - - suspend fun subscribeAttributeListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 { - 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() - .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().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 { - 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() - .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(ElectricalMeasurementCluster::class.java.name) - const val CLUSTER_ID: UInt = 2820u - } -} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/OnOffSwitchConfigurationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/OnOffSwitchConfigurationCluster.kt deleted file mode 100644 index 88a03128e9f596..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/OnOffSwitchConfigurationCluster.kt +++ /dev/null @@ -1,840 +0,0 @@ -/* - * - * 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.UByteSubscriptionState -import matter.controller.UIntSubscriptionState -import matter.controller.UShortSubscriptionState -import matter.controller.WriteRequest -import matter.controller.WriteRequests -import matter.controller.WriteResponse -import matter.controller.cluster.structs.* -import matter.controller.model.AttributePath -import matter.tlv.AnonymousTag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class OnOffSwitchConfigurationCluster( - private val controller: MatterController, - private val endpointId: UShort, -) { - class GeneratedCommandListAttribute(val value: List) - - sealed class GeneratedCommandListAttributeSubscriptionState { - data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState() - } - - class AcceptedCommandListAttribute(val value: List) - - sealed class AcceptedCommandListAttributeSubscriptionState { - data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState() - - object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState() - } - - class EventListAttribute(val value: List) - - sealed class EventListAttributeSubscriptionState { - data class Success(val value: List) : EventListAttributeSubscriptionState() - - data class Error(val exception: Exception) : EventListAttributeSubscriptionState() - - object SubscriptionEstablished : EventListAttributeSubscriptionState() - } - - class AttributeListAttribute(val value: List) - - sealed class AttributeListAttributeSubscriptionState { - data class Success(val value: List) : AttributeListAttributeSubscriptionState() - - data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState() - - object SubscriptionEstablished : AttributeListAttributeSubscriptionState() - } - - suspend fun readSwitchTypeAttribute(): 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Switchtype 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 subscribeSwitchTypeAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Switchtype 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 readSwitchActionsAttribute(): UByte { - 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().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Switchactions 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 writeSwitchActionsAttribute(value: UByte, timedWriteTimeout: Duration? = null) { - val ATTRIBUTE_ID: UInt = 16u - - val tlvWriter = TlvWriter() - tlvWriter.put(AnonymousTag, value) - - val writeRequests: WriteRequests = - WriteRequests( - requests = - listOf( - WriteRequest( - attributePath = - AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), - tlvPayload = tlvWriter.getEncoded(), - ) - ), - timedRequest = timedWriteTimeout, - ) - - val response: WriteResponse = controller.write(writeRequests) - - when (response) { - is WriteResponse.Success -> { - logger.log(Level.FINE, "Write command succeeded") - } - is WriteResponse.PartialWriteFailure -> { - val aggregatedErrorMessage = - response.failures.joinToString("\n") { failure -> - "Error at ${failure.attributePath}: ${failure.ex.message}" - } - - response.failures.forEach { failure -> - logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") - } - - throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") - } - } - } - - suspend fun subscribeSwitchActionsAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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( - UByteSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Switchactions 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 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return GeneratedCommandListAttribute(decodedValue) - } - - suspend fun subscribeGeneratedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AcceptedCommandListAttribute(decodedValue) - } - - suspend fun subscribeAcceptedCommandListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return EventListAttribute(decodedValue) - } - - suspend fun subscribeEventListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 = - buildList { - tlvReader.enterArray(AnonymousTag) - while (!tlvReader.isEndOfContainer()) { - add(tlvReader.getUInt(AnonymousTag)) - } - tlvReader.exitContainer() - } - - return AttributeListAttribute(decodedValue) - } - - suspend fun subscribeAttributeListAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - 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() - .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 = - buildList { - 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().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 { - 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() - .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().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 { - 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() - .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(OnOffSwitchConfigurationCluster::class.java.name) - const val CLUSTER_ID: UInt = 7u - } -} 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 1f287a13ae0ff2..d1a3d9681b21bf 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -259,9 +259,7 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ApplicationLauncherCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/AudioOutputCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BallastConfigurationCluster.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BarrierControlCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BasicInformationCluster.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BinaryInputBasicCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BindingCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/BooleanStateConfigurationCluster.kt", @@ -284,7 +282,6 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/DoorLockCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/EcosystemInformationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ElectricalEnergyMeasurementCluster.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ElectricalMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/ElectricalPowerMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseModeCluster.kt", @@ -320,7 +317,6 @@ matter_clusters_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/NitrogenDioxideConcentrationMeasurementCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/OccupancySensingCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/OnOffCluster.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/OnOffSwitchConfigurationCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/OperationalCredentialsCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/OperationalStateCluster.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/OtaSoftwareUpdateProviderCluster.kt", diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 771d026771d39d..fbbb5be261737f 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -598,180 +598,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::OnOffSwitchConfiguration::Id: { - using namespace app::Clusters::OnOffSwitchConfiguration; - switch (aPath.mAttributeId) - { - case Attributes::SwitchType::Id: { - using TypeInfo = Attributes::SwitchType::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::SwitchActions::Id: { - using TypeInfo = Attributes::SwitchActions::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } case app::Clusters::LevelControl::Id: { using namespace app::Clusters::LevelControl; switch (aPath.mAttributeId) @@ -1180,280 +1006,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::BinaryInputBasic::Id: { - using namespace app::Clusters::BinaryInputBasic; - switch (aPath.mAttributeId) - { - case Attributes::ActiveText::Id: { - using TypeInfo = Attributes::ActiveText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); - return value; - } - case Attributes::Description::Id: { - using TypeInfo = Attributes::Description::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); - return value; - } - case Attributes::InactiveText::Id: { - using TypeInfo = Attributes::InactiveText::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue, value)); - return value; - } - case Attributes::OutOfService::Id: { - using TypeInfo = Attributes::OutOfService::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::Polarity::Id: { - using TypeInfo = Attributes::Polarity::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::PresentValue::Id: { - using TypeInfo = Attributes::PresentValue::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Boolean"; - std::string valueCtorSignature = "(Z)V"; - jboolean jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::Reliability::Id: { - using TypeInfo = Attributes::Reliability::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::StatusFlags::Id: { - using TypeInfo = Attributes::StatusFlags::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ApplicationType::Id: { - using TypeInfo = Attributes::ApplicationType::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } case app::Clusters::PulseWidthModulation::Id: { using namespace app::Clusters::PulseWidthModulation; switch (aPath.mAttributeId) @@ -28304,308 +27856,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::BarrierControl::Id: { - using namespace app::Clusters::BarrierControl; - switch (aPath.mAttributeId) - { - case Attributes::BarrierMovingState::Id: { - using TypeInfo = Attributes::BarrierMovingState::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierSafetyStatus::Id: { - using TypeInfo = Attributes::BarrierSafetyStatus::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierCapabilities::Id: { - using TypeInfo = Attributes::BarrierCapabilities::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierOpenEvents::Id: { - using TypeInfo = Attributes::BarrierOpenEvents::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCloseEvents::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierCommandOpenEvents::Id: { - using TypeInfo = Attributes::BarrierCommandOpenEvents::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierCommandCloseEvents::Id: { - using TypeInfo = Attributes::BarrierCommandCloseEvents::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierOpenPeriod::Id: { - using TypeInfo = Attributes::BarrierOpenPeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierClosePeriod::Id: { - using TypeInfo = Attributes::BarrierClosePeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::BarrierPosition::Id: { - using TypeInfo = Attributes::BarrierPosition::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } case app::Clusters::ServiceArea::Id: { using namespace app::Clusters::ServiceArea; switch (aPath.mAttributeId) @@ -43561,2196 +42811,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ElectricalMeasurement::Id: { - using namespace app::Clusters::ElectricalMeasurement; - switch (aPath.mAttributeId) - { - 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; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::DcVoltage::Id: { - using TypeInfo = Attributes::DcVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcVoltageMin::Id: { - using TypeInfo = Attributes::DcVoltageMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcVoltageMax::Id: { - using TypeInfo = Attributes::DcVoltageMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcCurrent::Id: { - using TypeInfo = Attributes::DcCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcCurrentMin::Id: { - using TypeInfo = Attributes::DcCurrentMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcCurrentMax::Id: { - using TypeInfo = Attributes::DcCurrentMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcPower::Id: { - using TypeInfo = Attributes::DcPower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcPowerMin::Id: { - using TypeInfo = Attributes::DcPowerMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcPowerMax::Id: { - using TypeInfo = Attributes::DcPowerMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcVoltageMultiplier::Id: { - using TypeInfo = Attributes::DcVoltageMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcVoltageDivisor::Id: { - using TypeInfo = Attributes::DcVoltageDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcCurrentMultiplier::Id: { - using TypeInfo = Attributes::DcCurrentMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcCurrentDivisor::Id: { - using TypeInfo = Attributes::DcCurrentDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcPowerMultiplier::Id: { - using TypeInfo = Attributes::DcPowerMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::DcPowerDivisor::Id: { - using TypeInfo = Attributes::DcPowerDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcFrequency::Id: { - using TypeInfo = Attributes::AcFrequency::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcFrequencyMin::Id: { - using TypeInfo = Attributes::AcFrequencyMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcFrequencyMax::Id: { - using TypeInfo = Attributes::AcFrequencyMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::NeutralCurrent::Id: { - using TypeInfo = Attributes::NeutralCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::TotalActivePower::Id: { - using TypeInfo = Attributes::TotalActivePower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::TotalReactivePower::Id: { - using TypeInfo = Attributes::TotalReactivePower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::TotalApparentPower::Id: { - using TypeInfo = Attributes::TotalApparentPower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::Measured1stHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured1stHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::Measured3rdHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured3rdHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::Measured5thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured5thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::Measured7thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured7thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::Measured9thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured9thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::Measured11thHarmonicCurrent::Id: { - using TypeInfo = Attributes::Measured11thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::MeasuredPhase1stHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase1stHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase3rdHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::MeasuredPhase5thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase5thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::MeasuredPhase7thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase7thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::MeasuredPhase9thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase9thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::MeasuredPhase11thHarmonicCurrent::Id: { - using TypeInfo = Attributes::MeasuredPhase11thHarmonicCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcFrequencyMultiplier::Id: { - using TypeInfo = Attributes::AcFrequencyMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcFrequencyDivisor::Id: { - using TypeInfo = Attributes::AcFrequencyDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::PowerMultiplier::Id: { - using TypeInfo = Attributes::PowerMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::PowerDivisor::Id: { - using TypeInfo = Attributes::PowerDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } - case Attributes::HarmonicCurrentMultiplier::Id: { - using TypeInfo = Attributes::HarmonicCurrentMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::PhaseHarmonicCurrentMultiplier::Id: { - using TypeInfo = Attributes::PhaseHarmonicCurrentMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::InstantaneousVoltage::Id: { - using TypeInfo = Attributes::InstantaneousVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::InstantaneousLineCurrent::Id: { - using TypeInfo = Attributes::InstantaneousLineCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::InstantaneousActiveCurrent::Id: { - using TypeInfo = Attributes::InstantaneousActiveCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::InstantaneousReactiveCurrent::Id: { - using TypeInfo = Attributes::InstantaneousReactiveCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::InstantaneousPower::Id: { - using TypeInfo = Attributes::InstantaneousPower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltage::Id: { - using TypeInfo = Attributes::RmsVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageMin::Id: { - using TypeInfo = Attributes::RmsVoltageMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageMax::Id: { - using TypeInfo = Attributes::RmsVoltageMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrent::Id: { - using TypeInfo = Attributes::RmsCurrent::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentMin::Id: { - using TypeInfo = Attributes::RmsCurrentMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentMax::Id: { - using TypeInfo = Attributes::RmsCurrentMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePower::Id: { - using TypeInfo = Attributes::ActivePower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerMin::Id: { - using TypeInfo = Attributes::ActivePowerMin::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerMax::Id: { - using TypeInfo = Attributes::ActivePowerMax::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ReactivePower::Id: { - using TypeInfo = Attributes::ReactivePower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ApparentPower::Id: { - using TypeInfo = Attributes::ApparentPower::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::PowerFactor::Id: { - using TypeInfo = Attributes::PowerFactor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriod::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsUnderVoltageCounter::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounter::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeOverVoltagePeriod::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeUnderVoltagePeriod::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSagPeriod::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSwellPeriod::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriod::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcVoltageMultiplier::Id: { - using TypeInfo = Attributes::AcVoltageMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcVoltageDivisor::Id: { - using TypeInfo = Attributes::AcVoltageDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcCurrentMultiplier::Id: { - using TypeInfo = Attributes::AcCurrentMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcCurrentDivisor::Id: { - using TypeInfo = Attributes::AcCurrentDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcPowerMultiplier::Id: { - using TypeInfo = Attributes::AcPowerMultiplier::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcPowerDivisor::Id: { - using TypeInfo = Attributes::AcPowerDivisor::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::OverloadAlarmsMask::Id: { - using TypeInfo = Attributes::OverloadAlarmsMask::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::VoltageOverload::Id: { - using TypeInfo = Attributes::VoltageOverload::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::CurrentOverload::Id: { - using TypeInfo = Attributes::CurrentOverload::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcOverloadAlarmsMask::Id: { - using TypeInfo = Attributes::AcOverloadAlarmsMask::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcVoltageOverload::Id: { - using TypeInfo = Attributes::AcVoltageOverload::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcCurrentOverload::Id: { - using TypeInfo = Attributes::AcCurrentOverload::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcActivePowerOverload::Id: { - using TypeInfo = Attributes::AcActivePowerOverload::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AcReactivePowerOverload::Id: { - using TypeInfo = Attributes::AcReactivePowerOverload::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsOverVoltage::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsUnderVoltage::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeOverVoltage::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeUnderVoltage::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltage::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSag::Id: { - using TypeInfo = Attributes::RmsVoltageSag::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSwell::Id: { - using TypeInfo = Attributes::RmsVoltageSwell::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::LineCurrentPhaseB::Id: { - using TypeInfo = Attributes::LineCurrentPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActiveCurrentPhaseB::Id: { - using TypeInfo = Attributes::ActiveCurrentPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ReactiveCurrentPhaseB::Id: { - using TypeInfo = Attributes::ReactiveCurrentPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltagePhaseB::Id: { - using TypeInfo = Attributes::RmsVoltagePhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageMinPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageMinPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageMaxPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageMaxPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentPhaseB::Id: { - using TypeInfo = Attributes::RmsCurrentPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentMinPhaseB::Id: { - using TypeInfo = Attributes::RmsCurrentMinPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentMaxPhaseB::Id: { - using TypeInfo = Attributes::RmsCurrentMaxPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerPhaseB::Id: { - using TypeInfo = Attributes::ActivePowerPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerMinPhaseB::Id: { - using TypeInfo = Attributes::ActivePowerMinPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerMaxPhaseB::Id: { - using TypeInfo = Attributes::ActivePowerMaxPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ReactivePowerPhaseB::Id: { - using TypeInfo = Attributes::ReactivePowerPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ApparentPowerPhaseB::Id: { - using TypeInfo = Attributes::ApparentPowerPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::PowerFactorPhaseB::Id: { - using TypeInfo = Attributes::PowerFactorPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSagPeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSwellPeriodPhaseB::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseB::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::LineCurrentPhaseC::Id: { - using TypeInfo = Attributes::LineCurrentPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActiveCurrentPhaseC::Id: { - using TypeInfo = Attributes::ActiveCurrentPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ReactiveCurrentPhaseC::Id: { - using TypeInfo = Attributes::ReactiveCurrentPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltagePhaseC::Id: { - using TypeInfo = Attributes::RmsVoltagePhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageMinPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageMinPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageMaxPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageMaxPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentPhaseC::Id: { - using TypeInfo = Attributes::RmsCurrentPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentMinPhaseC::Id: { - using TypeInfo = Attributes::RmsCurrentMinPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsCurrentMaxPhaseC::Id: { - using TypeInfo = Attributes::RmsCurrentMaxPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerPhaseC::Id: { - using TypeInfo = Attributes::ActivePowerPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerMinPhaseC::Id: { - using TypeInfo = Attributes::ActivePowerMinPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ActivePowerMaxPhaseC::Id: { - using TypeInfo = Attributes::ActivePowerMaxPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ReactivePowerPhaseC::Id: { - using TypeInfo = Attributes::ReactivePowerPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::ApparentPowerPhaseC::Id: { - using TypeInfo = Attributes::ApparentPowerPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::PowerFactorPhaseC::Id: { - using TypeInfo = Attributes::PowerFactorPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSagPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0); - chip::JniReferences::GetInstance().AddToList(value, newElement_0); - } - return value; - } - case Attributes::EventList::Id: { - using TypeInfo = Attributes::EventList::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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(entry_0); - chip::JniReferences::GetInstance().CreateBoxedObject( - 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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(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 a133eceb499a0f..dd385a777c9276 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -67,16 +67,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::OnOffSwitchConfiguration::Id: { - using namespace app::Clusters::OnOffSwitchConfiguration; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } case app::Clusters::LevelControl::Id: { using namespace app::Clusters::LevelControl; switch (aPath.mEventId) @@ -87,16 +77,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::BinaryInputBasic::Id: { - using namespace app::Clusters::BinaryInputBasic; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } case app::Clusters::PulseWidthModulation::Id: { using namespace app::Clusters::PulseWidthModulation; switch (aPath.mEventId) @@ -6987,16 +6967,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::BarrierControl::Id: { - using namespace app::Clusters::BarrierControl; - switch (aPath.mEventId) - { - default: - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - break; - } - break; - } case app::Clusters::ServiceArea::Id: { using namespace app::Clusters::ServiceArea; switch (aPath.mEventId) @@ -8362,16 +8332,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } break; } - case app::Clusters::ElectricalMeasurement::Id: { - using namespace app::Clusters::ElectricalMeasurement; - 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 268dd1abfb574c..af684af705969f 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -313,63 +313,6 @@ class ChipClusters: }, }, } - _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO = { - "clusterName": "OnOffSwitchConfiguration", - "clusterId": 0x00000007, - "commands": { - }, - "attributes": { - 0x00000000: { - "attributeName": "SwitchType", - "attributeId": 0x00000000, - "type": "int", - "reportable": True, - }, - 0x00000010: { - "attributeName": "SwitchActions", - "attributeId": 0x00000010, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, - }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, - }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "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, - }, - }, - } _LEVEL_CONTROL_CLUSTER_INFO = { "clusterName": "LevelControl", "clusterId": 0x00000008, @@ -590,110 +533,6 @@ class ChipClusters: }, }, } - _BINARY_INPUT_BASIC_CLUSTER_INFO = { - "clusterName": "BinaryInputBasic", - "clusterId": 0x0000000F, - "commands": { - }, - "attributes": { - 0x00000004: { - "attributeName": "ActiveText", - "attributeId": 0x00000004, - "type": "str", - "reportable": True, - "writable": True, - }, - 0x0000001C: { - "attributeName": "Description", - "attributeId": 0x0000001C, - "type": "str", - "reportable": True, - "writable": True, - }, - 0x0000002E: { - "attributeName": "InactiveText", - "attributeId": 0x0000002E, - "type": "str", - "reportable": True, - "writable": True, - }, - 0x00000051: { - "attributeName": "OutOfService", - "attributeId": 0x00000051, - "type": "bool", - "reportable": True, - "writable": True, - }, - 0x00000054: { - "attributeName": "Polarity", - "attributeId": 0x00000054, - "type": "int", - "reportable": True, - }, - 0x00000055: { - "attributeName": "PresentValue", - "attributeId": 0x00000055, - "type": "bool", - "reportable": True, - "writable": True, - }, - 0x00000067: { - "attributeName": "Reliability", - "attributeId": 0x00000067, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x0000006F: { - "attributeName": "StatusFlags", - "attributeId": 0x0000006F, - "type": "int", - "reportable": True, - }, - 0x00000100: { - "attributeName": "ApplicationType", - "attributeId": 0x00000100, - "type": "int", - "reportable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, - }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, - }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "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, - }, - }, - } _PULSE_WIDTH_MODULATION_CLUSTER_INFO = { "clusterName": "PulseWidthModulation", "clusterId": 0x0000001C, @@ -8429,129 +8268,6 @@ class ChipClusters: }, }, } - _BARRIER_CONTROL_CLUSTER_INFO = { - "clusterName": "BarrierControl", - "clusterId": 0x00000103, - "commands": { - 0x00000000: { - "commandId": 0x00000000, - "commandName": "BarrierControlGoToPercent", - "args": { - "percentOpen": "int", - }, - }, - 0x00000001: { - "commandId": 0x00000001, - "commandName": "BarrierControlStop", - "args": { - }, - }, - }, - "attributes": { - 0x00000001: { - "attributeName": "BarrierMovingState", - "attributeId": 0x00000001, - "type": "int", - "reportable": True, - }, - 0x00000002: { - "attributeName": "BarrierSafetyStatus", - "attributeId": 0x00000002, - "type": "int", - "reportable": True, - }, - 0x00000003: { - "attributeName": "BarrierCapabilities", - "attributeId": 0x00000003, - "type": "int", - "reportable": True, - }, - 0x00000004: { - "attributeName": "BarrierOpenEvents", - "attributeId": 0x00000004, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000005: { - "attributeName": "BarrierCloseEvents", - "attributeId": 0x00000005, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000006: { - "attributeName": "BarrierCommandOpenEvents", - "attributeId": 0x00000006, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000007: { - "attributeName": "BarrierCommandCloseEvents", - "attributeId": 0x00000007, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000008: { - "attributeName": "BarrierOpenPeriod", - "attributeId": 0x00000008, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000009: { - "attributeName": "BarrierClosePeriod", - "attributeId": 0x00000009, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x0000000A: { - "attributeName": "BarrierPosition", - "attributeId": 0x0000000A, - "type": "int", - "reportable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, - }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, - }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "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, - }, - }, - } _SERVICE_AREA_CLUSTER_INFO = { "clusterName": "ServiceArea", "clusterId": 0x00000150, @@ -13437,841 +13153,6 @@ class ChipClusters: }, }, } - _ELECTRICAL_MEASUREMENT_CLUSTER_INFO = { - "clusterName": "ElectricalMeasurement", - "clusterId": 0x00000B04, - "commands": { - 0x00000000: { - "commandId": 0x00000000, - "commandName": "GetProfileInfoCommand", - "args": { - }, - }, - 0x00000001: { - "commandId": 0x00000001, - "commandName": "GetMeasurementProfileCommand", - "args": { - "attributeId": "int", - "startTime": "int", - "numberOfIntervals": "int", - }, - }, - }, - "attributes": { - 0x00000000: { - "attributeName": "MeasurementType", - "attributeId": 0x00000000, - "type": "int", - "reportable": True, - }, - 0x00000100: { - "attributeName": "DcVoltage", - "attributeId": 0x00000100, - "type": "int", - "reportable": True, - }, - 0x00000101: { - "attributeName": "DcVoltageMin", - "attributeId": 0x00000101, - "type": "int", - "reportable": True, - }, - 0x00000102: { - "attributeName": "DcVoltageMax", - "attributeId": 0x00000102, - "type": "int", - "reportable": True, - }, - 0x00000103: { - "attributeName": "DcCurrent", - "attributeId": 0x00000103, - "type": "int", - "reportable": True, - }, - 0x00000104: { - "attributeName": "DcCurrentMin", - "attributeId": 0x00000104, - "type": "int", - "reportable": True, - }, - 0x00000105: { - "attributeName": "DcCurrentMax", - "attributeId": 0x00000105, - "type": "int", - "reportable": True, - }, - 0x00000106: { - "attributeName": "DcPower", - "attributeId": 0x00000106, - "type": "int", - "reportable": True, - }, - 0x00000107: { - "attributeName": "DcPowerMin", - "attributeId": 0x00000107, - "type": "int", - "reportable": True, - }, - 0x00000108: { - "attributeName": "DcPowerMax", - "attributeId": 0x00000108, - "type": "int", - "reportable": True, - }, - 0x00000200: { - "attributeName": "DcVoltageMultiplier", - "attributeId": 0x00000200, - "type": "int", - "reportable": True, - }, - 0x00000201: { - "attributeName": "DcVoltageDivisor", - "attributeId": 0x00000201, - "type": "int", - "reportable": True, - }, - 0x00000202: { - "attributeName": "DcCurrentMultiplier", - "attributeId": 0x00000202, - "type": "int", - "reportable": True, - }, - 0x00000203: { - "attributeName": "DcCurrentDivisor", - "attributeId": 0x00000203, - "type": "int", - "reportable": True, - }, - 0x00000204: { - "attributeName": "DcPowerMultiplier", - "attributeId": 0x00000204, - "type": "int", - "reportable": True, - }, - 0x00000205: { - "attributeName": "DcPowerDivisor", - "attributeId": 0x00000205, - "type": "int", - "reportable": True, - }, - 0x00000300: { - "attributeName": "AcFrequency", - "attributeId": 0x00000300, - "type": "int", - "reportable": True, - }, - 0x00000301: { - "attributeName": "AcFrequencyMin", - "attributeId": 0x00000301, - "type": "int", - "reportable": True, - }, - 0x00000302: { - "attributeName": "AcFrequencyMax", - "attributeId": 0x00000302, - "type": "int", - "reportable": True, - }, - 0x00000303: { - "attributeName": "NeutralCurrent", - "attributeId": 0x00000303, - "type": "int", - "reportable": True, - }, - 0x00000304: { - "attributeName": "TotalActivePower", - "attributeId": 0x00000304, - "type": "int", - "reportable": True, - }, - 0x00000305: { - "attributeName": "TotalReactivePower", - "attributeId": 0x00000305, - "type": "int", - "reportable": True, - }, - 0x00000306: { - "attributeName": "TotalApparentPower", - "attributeId": 0x00000306, - "type": "int", - "reportable": True, - }, - 0x00000307: { - "attributeName": "Measured1stHarmonicCurrent", - "attributeId": 0x00000307, - "type": "int", - "reportable": True, - }, - 0x00000308: { - "attributeName": "Measured3rdHarmonicCurrent", - "attributeId": 0x00000308, - "type": "int", - "reportable": True, - }, - 0x00000309: { - "attributeName": "Measured5thHarmonicCurrent", - "attributeId": 0x00000309, - "type": "int", - "reportable": True, - }, - 0x0000030A: { - "attributeName": "Measured7thHarmonicCurrent", - "attributeId": 0x0000030A, - "type": "int", - "reportable": True, - }, - 0x0000030B: { - "attributeName": "Measured9thHarmonicCurrent", - "attributeId": 0x0000030B, - "type": "int", - "reportable": True, - }, - 0x0000030C: { - "attributeName": "Measured11thHarmonicCurrent", - "attributeId": 0x0000030C, - "type": "int", - "reportable": True, - }, - 0x0000030D: { - "attributeName": "MeasuredPhase1stHarmonicCurrent", - "attributeId": 0x0000030D, - "type": "int", - "reportable": True, - }, - 0x0000030E: { - "attributeName": "MeasuredPhase3rdHarmonicCurrent", - "attributeId": 0x0000030E, - "type": "int", - "reportable": True, - }, - 0x0000030F: { - "attributeName": "MeasuredPhase5thHarmonicCurrent", - "attributeId": 0x0000030F, - "type": "int", - "reportable": True, - }, - 0x00000310: { - "attributeName": "MeasuredPhase7thHarmonicCurrent", - "attributeId": 0x00000310, - "type": "int", - "reportable": True, - }, - 0x00000311: { - "attributeName": "MeasuredPhase9thHarmonicCurrent", - "attributeId": 0x00000311, - "type": "int", - "reportable": True, - }, - 0x00000312: { - "attributeName": "MeasuredPhase11thHarmonicCurrent", - "attributeId": 0x00000312, - "type": "int", - "reportable": True, - }, - 0x00000400: { - "attributeName": "AcFrequencyMultiplier", - "attributeId": 0x00000400, - "type": "int", - "reportable": True, - }, - 0x00000401: { - "attributeName": "AcFrequencyDivisor", - "attributeId": 0x00000401, - "type": "int", - "reportable": True, - }, - 0x00000402: { - "attributeName": "PowerMultiplier", - "attributeId": 0x00000402, - "type": "int", - "reportable": True, - }, - 0x00000403: { - "attributeName": "PowerDivisor", - "attributeId": 0x00000403, - "type": "int", - "reportable": True, - }, - 0x00000404: { - "attributeName": "HarmonicCurrentMultiplier", - "attributeId": 0x00000404, - "type": "int", - "reportable": True, - }, - 0x00000405: { - "attributeName": "PhaseHarmonicCurrentMultiplier", - "attributeId": 0x00000405, - "type": "int", - "reportable": True, - }, - 0x00000500: { - "attributeName": "InstantaneousVoltage", - "attributeId": 0x00000500, - "type": "int", - "reportable": True, - }, - 0x00000501: { - "attributeName": "InstantaneousLineCurrent", - "attributeId": 0x00000501, - "type": "int", - "reportable": True, - }, - 0x00000502: { - "attributeName": "InstantaneousActiveCurrent", - "attributeId": 0x00000502, - "type": "int", - "reportable": True, - }, - 0x00000503: { - "attributeName": "InstantaneousReactiveCurrent", - "attributeId": 0x00000503, - "type": "int", - "reportable": True, - }, - 0x00000504: { - "attributeName": "InstantaneousPower", - "attributeId": 0x00000504, - "type": "int", - "reportable": True, - }, - 0x00000505: { - "attributeName": "RmsVoltage", - "attributeId": 0x00000505, - "type": "int", - "reportable": True, - }, - 0x00000506: { - "attributeName": "RmsVoltageMin", - "attributeId": 0x00000506, - "type": "int", - "reportable": True, - }, - 0x00000507: { - "attributeName": "RmsVoltageMax", - "attributeId": 0x00000507, - "type": "int", - "reportable": True, - }, - 0x00000508: { - "attributeName": "RmsCurrent", - "attributeId": 0x00000508, - "type": "int", - "reportable": True, - }, - 0x00000509: { - "attributeName": "RmsCurrentMin", - "attributeId": 0x00000509, - "type": "int", - "reportable": True, - }, - 0x0000050A: { - "attributeName": "RmsCurrentMax", - "attributeId": 0x0000050A, - "type": "int", - "reportable": True, - }, - 0x0000050B: { - "attributeName": "ActivePower", - "attributeId": 0x0000050B, - "type": "int", - "reportable": True, - }, - 0x0000050C: { - "attributeName": "ActivePowerMin", - "attributeId": 0x0000050C, - "type": "int", - "reportable": True, - }, - 0x0000050D: { - "attributeName": "ActivePowerMax", - "attributeId": 0x0000050D, - "type": "int", - "reportable": True, - }, - 0x0000050E: { - "attributeName": "ReactivePower", - "attributeId": 0x0000050E, - "type": "int", - "reportable": True, - }, - 0x0000050F: { - "attributeName": "ApparentPower", - "attributeId": 0x0000050F, - "type": "int", - "reportable": True, - }, - 0x00000510: { - "attributeName": "PowerFactor", - "attributeId": 0x00000510, - "type": "int", - "reportable": True, - }, - 0x00000511: { - "attributeName": "AverageRmsVoltageMeasurementPeriod", - "attributeId": 0x00000511, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000513: { - "attributeName": "AverageRmsUnderVoltageCounter", - "attributeId": 0x00000513, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000514: { - "attributeName": "RmsExtremeOverVoltagePeriod", - "attributeId": 0x00000514, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000515: { - "attributeName": "RmsExtremeUnderVoltagePeriod", - "attributeId": 0x00000515, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000516: { - "attributeName": "RmsVoltageSagPeriod", - "attributeId": 0x00000516, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000517: { - "attributeName": "RmsVoltageSwellPeriod", - "attributeId": 0x00000517, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000600: { - "attributeName": "AcVoltageMultiplier", - "attributeId": 0x00000600, - "type": "int", - "reportable": True, - }, - 0x00000601: { - "attributeName": "AcVoltageDivisor", - "attributeId": 0x00000601, - "type": "int", - "reportable": True, - }, - 0x00000602: { - "attributeName": "AcCurrentMultiplier", - "attributeId": 0x00000602, - "type": "int", - "reportable": True, - }, - 0x00000603: { - "attributeName": "AcCurrentDivisor", - "attributeId": 0x00000603, - "type": "int", - "reportable": True, - }, - 0x00000604: { - "attributeName": "AcPowerMultiplier", - "attributeId": 0x00000604, - "type": "int", - "reportable": True, - }, - 0x00000605: { - "attributeName": "AcPowerDivisor", - "attributeId": 0x00000605, - "type": "int", - "reportable": True, - }, - 0x00000700: { - "attributeName": "OverloadAlarmsMask", - "attributeId": 0x00000700, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000701: { - "attributeName": "VoltageOverload", - "attributeId": 0x00000701, - "type": "int", - "reportable": True, - }, - 0x00000702: { - "attributeName": "CurrentOverload", - "attributeId": 0x00000702, - "type": "int", - "reportable": True, - }, - 0x00000800: { - "attributeName": "AcOverloadAlarmsMask", - "attributeId": 0x00000800, - "type": "int", - "reportable": True, - "writable": True, - }, - 0x00000801: { - "attributeName": "AcVoltageOverload", - "attributeId": 0x00000801, - "type": "int", - "reportable": True, - }, - 0x00000802: { - "attributeName": "AcCurrentOverload", - "attributeId": 0x00000802, - "type": "int", - "reportable": True, - }, - 0x00000803: { - "attributeName": "AcActivePowerOverload", - "attributeId": 0x00000803, - "type": "int", - "reportable": True, - }, - 0x00000804: { - "attributeName": "AcReactivePowerOverload", - "attributeId": 0x00000804, - "type": "int", - "reportable": True, - }, - 0x00000805: { - "attributeName": "AverageRmsOverVoltage", - "attributeId": 0x00000805, - "type": "int", - "reportable": True, - }, - 0x00000806: { - "attributeName": "AverageRmsUnderVoltage", - "attributeId": 0x00000806, - "type": "int", - "reportable": True, - }, - 0x00000807: { - "attributeName": "RmsExtremeOverVoltage", - "attributeId": 0x00000807, - "type": "int", - "reportable": True, - }, - 0x00000808: { - "attributeName": "RmsExtremeUnderVoltage", - "attributeId": 0x00000808, - "type": "int", - "reportable": True, - }, - 0x00000809: { - "attributeName": "RmsVoltageSag", - "attributeId": 0x00000809, - "type": "int", - "reportable": True, - }, - 0x0000080A: { - "attributeName": "RmsVoltageSwell", - "attributeId": 0x0000080A, - "type": "int", - "reportable": True, - }, - 0x00000901: { - "attributeName": "LineCurrentPhaseB", - "attributeId": 0x00000901, - "type": "int", - "reportable": True, - }, - 0x00000902: { - "attributeName": "ActiveCurrentPhaseB", - "attributeId": 0x00000902, - "type": "int", - "reportable": True, - }, - 0x00000903: { - "attributeName": "ReactiveCurrentPhaseB", - "attributeId": 0x00000903, - "type": "int", - "reportable": True, - }, - 0x00000905: { - "attributeName": "RmsVoltagePhaseB", - "attributeId": 0x00000905, - "type": "int", - "reportable": True, - }, - 0x00000906: { - "attributeName": "RmsVoltageMinPhaseB", - "attributeId": 0x00000906, - "type": "int", - "reportable": True, - }, - 0x00000907: { - "attributeName": "RmsVoltageMaxPhaseB", - "attributeId": 0x00000907, - "type": "int", - "reportable": True, - }, - 0x00000908: { - "attributeName": "RmsCurrentPhaseB", - "attributeId": 0x00000908, - "type": "int", - "reportable": True, - }, - 0x00000909: { - "attributeName": "RmsCurrentMinPhaseB", - "attributeId": 0x00000909, - "type": "int", - "reportable": True, - }, - 0x0000090A: { - "attributeName": "RmsCurrentMaxPhaseB", - "attributeId": 0x0000090A, - "type": "int", - "reportable": True, - }, - 0x0000090B: { - "attributeName": "ActivePowerPhaseB", - "attributeId": 0x0000090B, - "type": "int", - "reportable": True, - }, - 0x0000090C: { - "attributeName": "ActivePowerMinPhaseB", - "attributeId": 0x0000090C, - "type": "int", - "reportable": True, - }, - 0x0000090D: { - "attributeName": "ActivePowerMaxPhaseB", - "attributeId": 0x0000090D, - "type": "int", - "reportable": True, - }, - 0x0000090E: { - "attributeName": "ReactivePowerPhaseB", - "attributeId": 0x0000090E, - "type": "int", - "reportable": True, - }, - 0x0000090F: { - "attributeName": "ApparentPowerPhaseB", - "attributeId": 0x0000090F, - "type": "int", - "reportable": True, - }, - 0x00000910: { - "attributeName": "PowerFactorPhaseB", - "attributeId": 0x00000910, - "type": "int", - "reportable": True, - }, - 0x00000911: { - "attributeName": "AverageRmsVoltageMeasurementPeriodPhaseB", - "attributeId": 0x00000911, - "type": "int", - "reportable": True, - }, - 0x00000912: { - "attributeName": "AverageRmsOverVoltageCounterPhaseB", - "attributeId": 0x00000912, - "type": "int", - "reportable": True, - }, - 0x00000913: { - "attributeName": "AverageRmsUnderVoltageCounterPhaseB", - "attributeId": 0x00000913, - "type": "int", - "reportable": True, - }, - 0x00000914: { - "attributeName": "RmsExtremeOverVoltagePeriodPhaseB", - "attributeId": 0x00000914, - "type": "int", - "reportable": True, - }, - 0x00000915: { - "attributeName": "RmsExtremeUnderVoltagePeriodPhaseB", - "attributeId": 0x00000915, - "type": "int", - "reportable": True, - }, - 0x00000916: { - "attributeName": "RmsVoltageSagPeriodPhaseB", - "attributeId": 0x00000916, - "type": "int", - "reportable": True, - }, - 0x00000917: { - "attributeName": "RmsVoltageSwellPeriodPhaseB", - "attributeId": 0x00000917, - "type": "int", - "reportable": True, - }, - 0x00000A01: { - "attributeName": "LineCurrentPhaseC", - "attributeId": 0x00000A01, - "type": "int", - "reportable": True, - }, - 0x00000A02: { - "attributeName": "ActiveCurrentPhaseC", - "attributeId": 0x00000A02, - "type": "int", - "reportable": True, - }, - 0x00000A03: { - "attributeName": "ReactiveCurrentPhaseC", - "attributeId": 0x00000A03, - "type": "int", - "reportable": True, - }, - 0x00000A05: { - "attributeName": "RmsVoltagePhaseC", - "attributeId": 0x00000A05, - "type": "int", - "reportable": True, - }, - 0x00000A06: { - "attributeName": "RmsVoltageMinPhaseC", - "attributeId": 0x00000A06, - "type": "int", - "reportable": True, - }, - 0x00000A07: { - "attributeName": "RmsVoltageMaxPhaseC", - "attributeId": 0x00000A07, - "type": "int", - "reportable": True, - }, - 0x00000A08: { - "attributeName": "RmsCurrentPhaseC", - "attributeId": 0x00000A08, - "type": "int", - "reportable": True, - }, - 0x00000A09: { - "attributeName": "RmsCurrentMinPhaseC", - "attributeId": 0x00000A09, - "type": "int", - "reportable": True, - }, - 0x00000A0A: { - "attributeName": "RmsCurrentMaxPhaseC", - "attributeId": 0x00000A0A, - "type": "int", - "reportable": True, - }, - 0x00000A0B: { - "attributeName": "ActivePowerPhaseC", - "attributeId": 0x00000A0B, - "type": "int", - "reportable": True, - }, - 0x00000A0C: { - "attributeName": "ActivePowerMinPhaseC", - "attributeId": 0x00000A0C, - "type": "int", - "reportable": True, - }, - 0x00000A0D: { - "attributeName": "ActivePowerMaxPhaseC", - "attributeId": 0x00000A0D, - "type": "int", - "reportable": True, - }, - 0x00000A0E: { - "attributeName": "ReactivePowerPhaseC", - "attributeId": 0x00000A0E, - "type": "int", - "reportable": True, - }, - 0x00000A0F: { - "attributeName": "ApparentPowerPhaseC", - "attributeId": 0x00000A0F, - "type": "int", - "reportable": True, - }, - 0x00000A10: { - "attributeName": "PowerFactorPhaseC", - "attributeId": 0x00000A10, - "type": "int", - "reportable": True, - }, - 0x00000A11: { - "attributeName": "AverageRmsVoltageMeasurementPeriodPhaseC", - "attributeId": 0x00000A11, - "type": "int", - "reportable": True, - }, - 0x00000A12: { - "attributeName": "AverageRmsOverVoltageCounterPhaseC", - "attributeId": 0x00000A12, - "type": "int", - "reportable": True, - }, - 0x00000A13: { - "attributeName": "AverageRmsUnderVoltageCounterPhaseC", - "attributeId": 0x00000A13, - "type": "int", - "reportable": True, - }, - 0x00000A14: { - "attributeName": "RmsExtremeOverVoltagePeriodPhaseC", - "attributeId": 0x00000A14, - "type": "int", - "reportable": True, - }, - 0x00000A15: { - "attributeName": "RmsExtremeUnderVoltagePeriodPhaseC", - "attributeId": 0x00000A15, - "type": "int", - "reportable": True, - }, - 0x00000A16: { - "attributeName": "RmsVoltageSagPeriodPhaseC", - "attributeId": 0x00000A16, - "type": "int", - "reportable": True, - }, - 0x00000A17: { - "attributeName": "RmsVoltageSwellPeriodPhaseC", - "attributeId": 0x00000A17, - "type": "int", - "reportable": True, - }, - 0x0000FFF8: { - "attributeName": "GeneratedCommandList", - "attributeId": 0x0000FFF8, - "type": "int", - "reportable": True, - }, - 0x0000FFF9: { - "attributeName": "AcceptedCommandList", - "attributeId": 0x0000FFF9, - "type": "int", - "reportable": True, - }, - 0x0000FFFA: { - "attributeName": "EventList", - "attributeId": 0x0000FFFA, - "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, @@ -15282,9 +14163,7 @@ class ChipClusters: 0x00000003: _IDENTIFY_CLUSTER_INFO, 0x00000004: _GROUPS_CLUSTER_INFO, 0x00000006: _ON_OFF_CLUSTER_INFO, - 0x00000007: _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO, 0x00000008: _LEVEL_CONTROL_CLUSTER_INFO, - 0x0000000F: _BINARY_INPUT_BASIC_CLUSTER_INFO, 0x0000001C: _PULSE_WIDTH_MODULATION_CLUSTER_INFO, 0x0000001D: _DESCRIPTOR_CLUSTER_INFO, 0x0000001E: _BINDING_CLUSTER_INFO, @@ -15358,7 +14237,6 @@ class ChipClusters: 0x0000009F: _DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_INFO, 0x00000101: _DOOR_LOCK_CLUSTER_INFO, 0x00000102: _WINDOW_COVERING_CLUSTER_INFO, - 0x00000103: _BARRIER_CONTROL_CLUSTER_INFO, 0x00000150: _SERVICE_AREA_CLUSTER_INFO, 0x00000200: _PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, 0x00000201: _THERMOSTAT_CLUSTER_INFO, @@ -15401,7 +14279,6 @@ class ChipClusters: 0x00000510: _CONTENT_APP_OBSERVER_CLUSTER_INFO, 0x00000750: _ECOSYSTEM_INFORMATION_CLUSTER_INFO, 0x00000751: _COMMISSIONER_CONTROL_CLUSTER_INFO, - 0x00000B04: _ELECTRICAL_MEASUREMENT_CLUSTER_INFO, 0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO, 0xFFF1FC06: _FAULT_INJECTION_CLUSTER_INFO, 0xFFF1FC20: _SAMPLE_MEI_CLUSTER_INFO, @@ -15411,9 +14288,7 @@ class ChipClusters: "Identify": _IDENTIFY_CLUSTER_INFO, "Groups": _GROUPS_CLUSTER_INFO, "OnOff": _ON_OFF_CLUSTER_INFO, - "OnOffSwitchConfiguration": _ON_OFF_SWITCH_CONFIGURATION_CLUSTER_INFO, "LevelControl": _LEVEL_CONTROL_CLUSTER_INFO, - "BinaryInputBasic": _BINARY_INPUT_BASIC_CLUSTER_INFO, "PulseWidthModulation": _PULSE_WIDTH_MODULATION_CLUSTER_INFO, "Descriptor": _DESCRIPTOR_CLUSTER_INFO, "Binding": _BINDING_CLUSTER_INFO, @@ -15487,7 +14362,6 @@ class ChipClusters: "DeviceEnergyManagementMode": _DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_INFO, "DoorLock": _DOOR_LOCK_CLUSTER_INFO, "WindowCovering": _WINDOW_COVERING_CLUSTER_INFO, - "BarrierControl": _BARRIER_CONTROL_CLUSTER_INFO, "ServiceArea": _SERVICE_AREA_CLUSTER_INFO, "PumpConfigurationAndControl": _PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_INFO, "Thermostat": _THERMOSTAT_CLUSTER_INFO, @@ -15530,7 +14404,6 @@ class ChipClusters: "ContentAppObserver": _CONTENT_APP_OBSERVER_CLUSTER_INFO, "EcosystemInformation": _ECOSYSTEM_INFORMATION_CLUSTER_INFO, "CommissionerControl": _COMMISSIONER_CONTROL_CLUSTER_INFO, - "ElectricalMeasurement": _ELECTRICAL_MEASUREMENT_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 89f364a79a094e..efefaf9059dd7f 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -42,9 +42,7 @@ "Identify", "Groups", "OnOff", - "OnOffSwitchConfiguration", "LevelControl", - "BinaryInputBasic", "PulseWidthModulation", "Descriptor", "Binding", @@ -118,7 +116,6 @@ "DeviceEnergyManagementMode", "DoorLock", "WindowCovering", - "BarrierControl", "ServiceArea", "PumpConfigurationAndControl", "Thermostat", @@ -161,7 +158,6 @@ "ContentAppObserver", "EcosystemInformation", "CommissionerControl", - "ElectricalMeasurement", "UnitTesting", "FaultInjection", "SampleMei", @@ -1354,163 +1350,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 -@dataclass -class OnOffSwitchConfiguration(Cluster): - id: typing.ClassVar[int] = 0x00000007 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="switchType", Tag=0x00000000, Type=uint), - ClusterObjectFieldDescriptor(Label="switchActions", Tag=0x00000010, Type=uint), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, 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), - ]) - - switchType: 'uint' = None - switchActions: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Attributes: - @dataclass - class SwitchType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000007 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class SwitchActions(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000007 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000010 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000007 - - @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 0x00000007 - - @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 EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000007 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @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 0x00000007 - - @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 0x00000007 - - @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 0x00000007 - - @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 LevelControl(Cluster): id: typing.ClassVar[int] = 0x00000008 @@ -2102,289 +1941,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 -@dataclass -class BinaryInputBasic(Cluster): - id: typing.ClassVar[int] = 0x0000000F - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="activeText", Tag=0x00000004, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="description", Tag=0x0000001C, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="inactiveText", Tag=0x0000002E, Type=typing.Optional[str]), - ClusterObjectFieldDescriptor(Label="outOfService", Tag=0x00000051, Type=bool), - ClusterObjectFieldDescriptor(Label="polarity", Tag=0x00000054, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="presentValue", Tag=0x00000055, Type=bool), - ClusterObjectFieldDescriptor(Label="reliability", Tag=0x00000067, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="statusFlags", Tag=0x0000006F, Type=uint), - ClusterObjectFieldDescriptor(Label="applicationType", Tag=0x00000100, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, 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), - ]) - - activeText: 'typing.Optional[str]' = None - description: 'typing.Optional[str]' = None - inactiveText: 'typing.Optional[str]' = None - outOfService: 'bool' = None - polarity: 'typing.Optional[uint]' = None - presentValue: 'bool' = None - reliability: 'typing.Optional[uint]' = None - statusFlags: 'uint' = None - applicationType: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Attributes: - @dataclass - class ActiveText(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - - value: 'typing.Optional[str]' = None - - @dataclass - class Description(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000001C - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - - value: 'typing.Optional[str]' = None - - @dataclass - class InactiveText(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000002E - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[str]) - - value: 'typing.Optional[str]' = None - - @dataclass - class OutOfService(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000051 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) - - value: 'bool' = False - - @dataclass - class Polarity(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000054 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PresentValue(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000055 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=bool) - - value: 'bool' = False - - @dataclass - class Reliability(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000067 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class StatusFlags(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000006F - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class ApplicationType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000100 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @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 0x0000000F - - @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 EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000000F - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @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 0x0000000F - - @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 0x0000000F - - @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 0x0000000F - - @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 PulseWidthModulation(Cluster): id: typing.ClassVar[int] = 0x0000001C @@ -31058,347 +30614,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 -@dataclass -class BarrierControl(Cluster): - id: typing.ClassVar[int] = 0x00000103 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="barrierMovingState", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="barrierSafetyStatus", Tag=0x00000002, Type=uint), - ClusterObjectFieldDescriptor(Label="barrierCapabilities", Tag=0x00000003, Type=uint), - ClusterObjectFieldDescriptor(Label="barrierOpenEvents", Tag=0x00000004, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierCloseEvents", Tag=0x00000005, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierCommandOpenEvents", Tag=0x00000006, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierCommandCloseEvents", Tag=0x00000007, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierOpenPeriod", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierClosePeriod", Tag=0x00000009, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="barrierPosition", Tag=0x0000000A, Type=uint), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, 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), - ]) - - barrierMovingState: 'uint' = None - barrierSafetyStatus: 'uint' = None - barrierCapabilities: 'uint' = None - barrierOpenEvents: 'typing.Optional[uint]' = None - barrierCloseEvents: 'typing.Optional[uint]' = None - barrierCommandOpenEvents: 'typing.Optional[uint]' = None - barrierCommandCloseEvents: 'typing.Optional[uint]' = None - barrierOpenPeriod: 'typing.Optional[uint]' = None - barrierClosePeriod: 'typing.Optional[uint]' = None - barrierPosition: 'uint' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Bitmaps: - class BarrierControlCapabilities(IntFlag): - kPartialBarrier = 0x1 - - class BarrierControlSafetyStatus(IntFlag): - kRemoteLockout = 0x1 - kTemperDetected = 0x2 - kFailedCommunication = 0x4 - kPositionFailure = 0x8 - - class Commands: - @dataclass - class BarrierControlGoToPercent(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000103 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="percentOpen", Tag=0, Type=uint), - ]) - - percentOpen: 'uint' = 0 - - @dataclass - class BarrierControlStop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000103 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - class Attributes: - @dataclass - class BarrierMovingState(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000001 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class BarrierSafetyStatus(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class BarrierCapabilities(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000003 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class BarrierOpenEvents(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000004 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class BarrierCloseEvents(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000005 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class BarrierCommandOpenEvents(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000006 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class BarrierCommandCloseEvents(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000007 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class BarrierOpenPeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000008 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class BarrierClosePeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class BarrierPosition(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000000A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) - - value: 'uint' = 0 - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @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 0x00000103 - - @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 EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @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 0x00000103 - - @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 0x00000103 - - @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 0x00000103 - - @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 ServiceArea(Cluster): id: typing.ClassVar[int] = 0x00000150 @@ -47735,2513 +46950,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: fabricIndex: 'uint' = 0 -@dataclass -class ElectricalMeasurement(Cluster): - id: typing.ClassVar[int] = 0x00000B04 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="measurementType", Tag=0x00000000, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="dcVoltage", Tag=0x00000100, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcVoltageMin", Tag=0x00000101, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcVoltageMax", Tag=0x00000102, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcCurrent", Tag=0x00000103, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcCurrentMin", Tag=0x00000104, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcCurrentMax", Tag=0x00000105, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcPower", Tag=0x00000106, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcPowerMin", Tag=0x00000107, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcPowerMax", Tag=0x00000108, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="dcVoltageMultiplier", Tag=0x00000200, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="dcVoltageDivisor", Tag=0x00000201, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="dcCurrentMultiplier", Tag=0x00000202, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="dcCurrentDivisor", Tag=0x00000203, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="dcPowerMultiplier", Tag=0x00000204, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="dcPowerDivisor", Tag=0x00000205, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acFrequency", Tag=0x00000300, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acFrequencyMin", Tag=0x00000301, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acFrequencyMax", Tag=0x00000302, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="neutralCurrent", Tag=0x00000303, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="totalActivePower", Tag=0x00000304, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="totalReactivePower", Tag=0x00000305, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="totalApparentPower", Tag=0x00000306, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="measured1stHarmonicCurrent", Tag=0x00000307, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measured3rdHarmonicCurrent", Tag=0x00000308, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measured5thHarmonicCurrent", Tag=0x00000309, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measured7thHarmonicCurrent", Tag=0x0000030A, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measured9thHarmonicCurrent", Tag=0x0000030B, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measured11thHarmonicCurrent", Tag=0x0000030C, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measuredPhase1stHarmonicCurrent", Tag=0x0000030D, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measuredPhase3rdHarmonicCurrent", Tag=0x0000030E, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measuredPhase5thHarmonicCurrent", Tag=0x0000030F, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measuredPhase7thHarmonicCurrent", Tag=0x00000310, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measuredPhase9thHarmonicCurrent", Tag=0x00000311, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="measuredPhase11thHarmonicCurrent", Tag=0x00000312, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="acFrequencyMultiplier", Tag=0x00000400, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acFrequencyDivisor", Tag=0x00000401, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="powerMultiplier", Tag=0x00000402, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="powerDivisor", Tag=0x00000403, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="harmonicCurrentMultiplier", Tag=0x00000404, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="phaseHarmonicCurrentMultiplier", Tag=0x00000405, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="instantaneousVoltage", Tag=0x00000500, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="instantaneousLineCurrent", Tag=0x00000501, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="instantaneousActiveCurrent", Tag=0x00000502, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="instantaneousReactiveCurrent", Tag=0x00000503, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="instantaneousPower", Tag=0x00000504, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsVoltage", Tag=0x00000505, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageMin", Tag=0x00000506, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageMax", Tag=0x00000507, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrent", Tag=0x00000508, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentMin", Tag=0x00000509, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentMax", Tag=0x0000050A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="activePower", Tag=0x0000050B, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="activePowerMin", Tag=0x0000050C, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="activePowerMax", Tag=0x0000050D, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="reactivePower", Tag=0x0000050E, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="apparentPower", Tag=0x0000050F, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="powerFactor", Tag=0x00000510, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="averageRmsVoltageMeasurementPeriod", Tag=0x00000511, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageRmsUnderVoltageCounter", Tag=0x00000513, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsExtremeOverVoltagePeriod", Tag=0x00000514, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsExtremeUnderVoltagePeriod", Tag=0x00000515, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSagPeriod", Tag=0x00000516, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSwellPeriod", Tag=0x00000517, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acVoltageMultiplier", Tag=0x00000600, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acVoltageDivisor", Tag=0x00000601, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acCurrentMultiplier", Tag=0x00000602, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acCurrentDivisor", Tag=0x00000603, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acPowerMultiplier", Tag=0x00000604, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acPowerDivisor", Tag=0x00000605, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="overloadAlarmsMask", Tag=0x00000700, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="voltageOverload", Tag=0x00000701, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="currentOverload", Tag=0x00000702, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="acOverloadAlarmsMask", Tag=0x00000800, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="acVoltageOverload", Tag=0x00000801, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="acCurrentOverload", Tag=0x00000802, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="acActivePowerOverload", Tag=0x00000803, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="acReactivePowerOverload", Tag=0x00000804, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="averageRmsOverVoltage", Tag=0x00000805, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="averageRmsUnderVoltage", Tag=0x00000806, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsExtremeOverVoltage", Tag=0x00000807, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsExtremeUnderVoltage", Tag=0x00000808, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSag", Tag=0x00000809, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSwell", Tag=0x0000080A, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="lineCurrentPhaseB", Tag=0x00000901, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="activeCurrentPhaseB", Tag=0x00000902, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="reactiveCurrentPhaseB", Tag=0x00000903, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsVoltagePhaseB", Tag=0x00000905, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageMinPhaseB", Tag=0x00000906, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageMaxPhaseB", Tag=0x00000907, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentPhaseB", Tag=0x00000908, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentMinPhaseB", Tag=0x00000909, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentMaxPhaseB", Tag=0x0000090A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="activePowerPhaseB", Tag=0x0000090B, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="activePowerMinPhaseB", Tag=0x0000090C, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="activePowerMaxPhaseB", Tag=0x0000090D, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="reactivePowerPhaseB", Tag=0x0000090E, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="apparentPowerPhaseB", Tag=0x0000090F, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="powerFactorPhaseB", Tag=0x00000910, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="averageRmsVoltageMeasurementPeriodPhaseB", Tag=0x00000911, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageRmsOverVoltageCounterPhaseB", Tag=0x00000912, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageRmsUnderVoltageCounterPhaseB", Tag=0x00000913, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsExtremeOverVoltagePeriodPhaseB", Tag=0x00000914, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsExtremeUnderVoltagePeriodPhaseB", Tag=0x00000915, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSagPeriodPhaseB", Tag=0x00000916, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSwellPeriodPhaseB", Tag=0x00000917, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="lineCurrentPhaseC", Tag=0x00000A01, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="activeCurrentPhaseC", Tag=0x00000A02, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="reactiveCurrentPhaseC", Tag=0x00000A03, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="rmsVoltagePhaseC", Tag=0x00000A05, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageMinPhaseC", Tag=0x00000A06, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageMaxPhaseC", Tag=0x00000A07, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentPhaseC", Tag=0x00000A08, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentMinPhaseC", Tag=0x00000A09, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsCurrentMaxPhaseC", Tag=0x00000A0A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="activePowerPhaseC", Tag=0x00000A0B, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="activePowerMinPhaseC", Tag=0x00000A0C, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="activePowerMaxPhaseC", Tag=0x00000A0D, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="reactivePowerPhaseC", Tag=0x00000A0E, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="apparentPowerPhaseC", Tag=0x00000A0F, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="powerFactorPhaseC", Tag=0x00000A10, Type=typing.Optional[int]), - ClusterObjectFieldDescriptor(Label="averageRmsVoltageMeasurementPeriodPhaseC", Tag=0x00000A11, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageRmsOverVoltageCounterPhaseC", Tag=0x00000A12, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="averageRmsUnderVoltageCounterPhaseC", Tag=0x00000A13, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsExtremeOverVoltagePeriodPhaseC", Tag=0x00000A14, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsExtremeUnderVoltagePeriodPhaseC", Tag=0x00000A15, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSagPeriodPhaseC", Tag=0x00000A16, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="rmsVoltageSwellPeriodPhaseC", Tag=0x00000A17, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), - ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, 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), - ]) - - measurementType: 'typing.Optional[uint]' = None - dcVoltage: 'typing.Optional[int]' = None - dcVoltageMin: 'typing.Optional[int]' = None - dcVoltageMax: 'typing.Optional[int]' = None - dcCurrent: 'typing.Optional[int]' = None - dcCurrentMin: 'typing.Optional[int]' = None - dcCurrentMax: 'typing.Optional[int]' = None - dcPower: 'typing.Optional[int]' = None - dcPowerMin: 'typing.Optional[int]' = None - dcPowerMax: 'typing.Optional[int]' = None - dcVoltageMultiplier: 'typing.Optional[uint]' = None - dcVoltageDivisor: 'typing.Optional[uint]' = None - dcCurrentMultiplier: 'typing.Optional[uint]' = None - dcCurrentDivisor: 'typing.Optional[uint]' = None - dcPowerMultiplier: 'typing.Optional[uint]' = None - dcPowerDivisor: 'typing.Optional[uint]' = None - acFrequency: 'typing.Optional[uint]' = None - acFrequencyMin: 'typing.Optional[uint]' = None - acFrequencyMax: 'typing.Optional[uint]' = None - neutralCurrent: 'typing.Optional[uint]' = None - totalActivePower: 'typing.Optional[int]' = None - totalReactivePower: 'typing.Optional[int]' = None - totalApparentPower: 'typing.Optional[uint]' = None - measured1stHarmonicCurrent: 'typing.Optional[int]' = None - measured3rdHarmonicCurrent: 'typing.Optional[int]' = None - measured5thHarmonicCurrent: 'typing.Optional[int]' = None - measured7thHarmonicCurrent: 'typing.Optional[int]' = None - measured9thHarmonicCurrent: 'typing.Optional[int]' = None - measured11thHarmonicCurrent: 'typing.Optional[int]' = None - measuredPhase1stHarmonicCurrent: 'typing.Optional[int]' = None - measuredPhase3rdHarmonicCurrent: 'typing.Optional[int]' = None - measuredPhase5thHarmonicCurrent: 'typing.Optional[int]' = None - measuredPhase7thHarmonicCurrent: 'typing.Optional[int]' = None - measuredPhase9thHarmonicCurrent: 'typing.Optional[int]' = None - measuredPhase11thHarmonicCurrent: 'typing.Optional[int]' = None - acFrequencyMultiplier: 'typing.Optional[uint]' = None - acFrequencyDivisor: 'typing.Optional[uint]' = None - powerMultiplier: 'typing.Optional[uint]' = None - powerDivisor: 'typing.Optional[uint]' = None - harmonicCurrentMultiplier: 'typing.Optional[int]' = None - phaseHarmonicCurrentMultiplier: 'typing.Optional[int]' = None - instantaneousVoltage: 'typing.Optional[int]' = None - instantaneousLineCurrent: 'typing.Optional[uint]' = None - instantaneousActiveCurrent: 'typing.Optional[int]' = None - instantaneousReactiveCurrent: 'typing.Optional[int]' = None - instantaneousPower: 'typing.Optional[int]' = None - rmsVoltage: 'typing.Optional[uint]' = None - rmsVoltageMin: 'typing.Optional[uint]' = None - rmsVoltageMax: 'typing.Optional[uint]' = None - rmsCurrent: 'typing.Optional[uint]' = None - rmsCurrentMin: 'typing.Optional[uint]' = None - rmsCurrentMax: 'typing.Optional[uint]' = None - activePower: 'typing.Optional[int]' = None - activePowerMin: 'typing.Optional[int]' = None - activePowerMax: 'typing.Optional[int]' = None - reactivePower: 'typing.Optional[int]' = None - apparentPower: 'typing.Optional[uint]' = None - powerFactor: 'typing.Optional[int]' = None - averageRmsVoltageMeasurementPeriod: 'typing.Optional[uint]' = None - averageRmsUnderVoltageCounter: 'typing.Optional[uint]' = None - rmsExtremeOverVoltagePeriod: 'typing.Optional[uint]' = None - rmsExtremeUnderVoltagePeriod: 'typing.Optional[uint]' = None - rmsVoltageSagPeriod: 'typing.Optional[uint]' = None - rmsVoltageSwellPeriod: 'typing.Optional[uint]' = None - acVoltageMultiplier: 'typing.Optional[uint]' = None - acVoltageDivisor: 'typing.Optional[uint]' = None - acCurrentMultiplier: 'typing.Optional[uint]' = None - acCurrentDivisor: 'typing.Optional[uint]' = None - acPowerMultiplier: 'typing.Optional[uint]' = None - acPowerDivisor: 'typing.Optional[uint]' = None - overloadAlarmsMask: 'typing.Optional[uint]' = None - voltageOverload: 'typing.Optional[int]' = None - currentOverload: 'typing.Optional[int]' = None - acOverloadAlarmsMask: 'typing.Optional[uint]' = None - acVoltageOverload: 'typing.Optional[int]' = None - acCurrentOverload: 'typing.Optional[int]' = None - acActivePowerOverload: 'typing.Optional[int]' = None - acReactivePowerOverload: 'typing.Optional[int]' = None - averageRmsOverVoltage: 'typing.Optional[int]' = None - averageRmsUnderVoltage: 'typing.Optional[int]' = None - rmsExtremeOverVoltage: 'typing.Optional[int]' = None - rmsExtremeUnderVoltage: 'typing.Optional[int]' = None - rmsVoltageSag: 'typing.Optional[int]' = None - rmsVoltageSwell: 'typing.Optional[int]' = None - lineCurrentPhaseB: 'typing.Optional[uint]' = None - activeCurrentPhaseB: 'typing.Optional[int]' = None - reactiveCurrentPhaseB: 'typing.Optional[int]' = None - rmsVoltagePhaseB: 'typing.Optional[uint]' = None - rmsVoltageMinPhaseB: 'typing.Optional[uint]' = None - rmsVoltageMaxPhaseB: 'typing.Optional[uint]' = None - rmsCurrentPhaseB: 'typing.Optional[uint]' = None - rmsCurrentMinPhaseB: 'typing.Optional[uint]' = None - rmsCurrentMaxPhaseB: 'typing.Optional[uint]' = None - activePowerPhaseB: 'typing.Optional[int]' = None - activePowerMinPhaseB: 'typing.Optional[int]' = None - activePowerMaxPhaseB: 'typing.Optional[int]' = None - reactivePowerPhaseB: 'typing.Optional[int]' = None - apparentPowerPhaseB: 'typing.Optional[uint]' = None - powerFactorPhaseB: 'typing.Optional[int]' = None - averageRmsVoltageMeasurementPeriodPhaseB: 'typing.Optional[uint]' = None - averageRmsOverVoltageCounterPhaseB: 'typing.Optional[uint]' = None - averageRmsUnderVoltageCounterPhaseB: 'typing.Optional[uint]' = None - rmsExtremeOverVoltagePeriodPhaseB: 'typing.Optional[uint]' = None - rmsExtremeUnderVoltagePeriodPhaseB: 'typing.Optional[uint]' = None - rmsVoltageSagPeriodPhaseB: 'typing.Optional[uint]' = None - rmsVoltageSwellPeriodPhaseB: 'typing.Optional[uint]' = None - lineCurrentPhaseC: 'typing.Optional[uint]' = None - activeCurrentPhaseC: 'typing.Optional[int]' = None - reactiveCurrentPhaseC: 'typing.Optional[int]' = None - rmsVoltagePhaseC: 'typing.Optional[uint]' = None - rmsVoltageMinPhaseC: 'typing.Optional[uint]' = None - rmsVoltageMaxPhaseC: 'typing.Optional[uint]' = None - rmsCurrentPhaseC: 'typing.Optional[uint]' = None - rmsCurrentMinPhaseC: 'typing.Optional[uint]' = None - rmsCurrentMaxPhaseC: 'typing.Optional[uint]' = None - activePowerPhaseC: 'typing.Optional[int]' = None - activePowerMinPhaseC: 'typing.Optional[int]' = None - activePowerMaxPhaseC: 'typing.Optional[int]' = None - reactivePowerPhaseC: 'typing.Optional[int]' = None - apparentPowerPhaseC: 'typing.Optional[uint]' = None - powerFactorPhaseC: 'typing.Optional[int]' = None - averageRmsVoltageMeasurementPeriodPhaseC: 'typing.Optional[uint]' = None - averageRmsOverVoltageCounterPhaseC: 'typing.Optional[uint]' = None - averageRmsUnderVoltageCounterPhaseC: 'typing.Optional[uint]' = None - rmsExtremeOverVoltagePeriodPhaseC: 'typing.Optional[uint]' = None - rmsExtremeUnderVoltagePeriodPhaseC: 'typing.Optional[uint]' = None - rmsVoltageSagPeriodPhaseC: 'typing.Optional[uint]' = None - rmsVoltageSwellPeriodPhaseC: 'typing.Optional[uint]' = None - generatedCommandList: 'typing.List[uint]' = None - acceptedCommandList: 'typing.List[uint]' = None - eventList: 'typing.List[uint]' = None - attributeList: 'typing.List[uint]' = None - featureMap: 'uint' = None - clusterRevision: 'uint' = None - - class Commands: - @dataclass - class GetProfileInfoResponseCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000B04 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="profileCount", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="profileIntervalPeriod", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="maxNumberOfIntervals", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="listOfAttributes", Tag=3, Type=typing.List[uint]), - ]) - - profileCount: 'uint' = 0 - profileIntervalPeriod: 'uint' = 0 - maxNumberOfIntervals: 'uint' = 0 - listOfAttributes: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class GetProfileInfoCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000B04 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - - @dataclass - class GetMeasurementProfileResponseCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000B04 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="startTime", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="profileIntervalPeriod", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="numberOfIntervalsDelivered", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="attributeId", Tag=4, Type=uint), - ClusterObjectFieldDescriptor(Label="intervals", Tag=5, Type=typing.List[uint]), - ]) - - startTime: 'uint' = 0 - status: 'uint' = 0 - profileIntervalPeriod: 'uint' = 0 - numberOfIntervalsDelivered: 'uint' = 0 - attributeId: 'uint' = 0 - intervals: 'typing.List[uint]' = field(default_factory=lambda: []) - - @dataclass - class GetMeasurementProfileCommand(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000B04 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="attributeId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="startTime", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="numberOfIntervals", Tag=2, Type=uint), - ]) - - attributeId: 'uint' = 0 - startTime: 'uint' = 0 - numberOfIntervals: 'uint' = 0 - - class Attributes: - @dataclass - class MeasurementType(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class DcVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000100 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcVoltageMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000101 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcVoltageMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000102 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000103 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcCurrentMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000104 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcCurrentMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000105 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcPower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000106 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcPowerMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000107 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcPowerMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000108 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class DcVoltageMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000200 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class DcVoltageDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class DcCurrentMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000202 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class DcCurrentDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000203 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class DcPowerMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000204 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class DcPowerDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000205 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcFrequency(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000300 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcFrequencyMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000301 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcFrequencyMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000302 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class NeutralCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000303 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class TotalActivePower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000304 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class TotalReactivePower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000305 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class TotalApparentPower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000306 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class Measured1stHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000307 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class Measured3rdHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000308 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class Measured5thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000309 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class Measured7thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000030A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class Measured9thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000030B - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class Measured11thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000030C - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class MeasuredPhase1stHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000030D - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class MeasuredPhase3rdHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000030E - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class MeasuredPhase5thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000030F - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class MeasuredPhase7thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000310 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class MeasuredPhase9thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000311 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class MeasuredPhase11thHarmonicCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000312 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AcFrequencyMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000400 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcFrequencyDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000401 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PowerMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000402 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PowerDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000403 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class HarmonicCurrentMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000404 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class PhaseHarmonicCurrentMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000405 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class InstantaneousVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000500 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class InstantaneousLineCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000501 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class InstantaneousActiveCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000502 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class InstantaneousReactiveCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000503 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class InstantaneousPower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000504 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000505 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000506 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000507 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrent(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000508 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000509 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000050A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class ActivePower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000050B - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ActivePowerMin(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000050C - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ActivePowerMax(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000050D - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ReactivePower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000050E - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ApparentPower(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000050F - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PowerFactor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000510 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AverageRmsVoltageMeasurementPeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000511 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AverageRmsUnderVoltageCounter(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000513 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsExtremeOverVoltagePeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000514 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsExtremeUnderVoltagePeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000515 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageSagPeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000516 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageSwellPeriod(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000517 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcVoltageMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000600 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcVoltageDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000601 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcCurrentMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000602 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcCurrentDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000603 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcPowerMultiplier(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000604 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcPowerDivisor(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000605 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class OverloadAlarmsMask(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000700 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class VoltageOverload(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000701 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class CurrentOverload(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000702 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AcOverloadAlarmsMask(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000800 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AcVoltageOverload(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000801 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AcCurrentOverload(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000802 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AcActivePowerOverload(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000803 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AcReactivePowerOverload(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000804 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AverageRmsOverVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000805 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AverageRmsUnderVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000806 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsExtremeOverVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000807 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsExtremeUnderVoltage(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000808 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsVoltageSag(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000809 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsVoltageSwell(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000080A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class LineCurrentPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000901 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class ActiveCurrentPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000902 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ReactiveCurrentPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000903 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsVoltagePhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000905 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageMinPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000906 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageMaxPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000907 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000908 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentMinPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000909 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentMaxPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000090A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class ActivePowerPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000090B - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ActivePowerMinPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000090C - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ActivePowerMaxPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000090D - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ReactivePowerPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000090E - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ApparentPowerPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000090F - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PowerFactorPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000910 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AverageRmsVoltageMeasurementPeriodPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000911 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AverageRmsOverVoltageCounterPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000912 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AverageRmsUnderVoltageCounterPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000913 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsExtremeOverVoltagePeriodPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000914 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsExtremeUnderVoltagePeriodPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000915 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageSagPeriodPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000916 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageSwellPeriodPhaseB(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000917 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class LineCurrentPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A01 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class ActiveCurrentPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A02 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ReactiveCurrentPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A03 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class RmsVoltagePhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A05 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageMinPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A06 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageMaxPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A07 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A08 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentMinPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A09 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsCurrentMaxPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A0A - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class ActivePowerPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A0B - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ActivePowerMinPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A0C - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ActivePowerMaxPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A0D - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ReactivePowerPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A0E - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class ApparentPowerPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A0F - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class PowerFactorPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A10 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[int]) - - value: 'typing.Optional[int]' = None - - @dataclass - class AverageRmsVoltageMeasurementPeriodPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A11 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AverageRmsOverVoltageCounterPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A12 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class AverageRmsUnderVoltageCounterPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A13 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsExtremeOverVoltagePeriodPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A14 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsExtremeUnderVoltagePeriodPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A15 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageSagPeriodPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A16 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class RmsVoltageSwellPeriodPhaseC(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000A17 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - - @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @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 0x00000B04 - - @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 EventList(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000B04 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x0000FFFA - - @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 0x00000B04 - - @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 0x00000B04 - - @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 0x00000B04 - - @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/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 4088d638e85c98..4d9c6b9f545dd1 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 @@ -748,200 +748,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace OnOff -namespace OnOffSwitchConfiguration { -namespace Attributes { - -namespace SwitchType { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::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, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::OnOffSwitchConfiguration::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - 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::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace SwitchType - -namespace SwitchActions { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::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, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::OnOffSwitchConfiguration::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - 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::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace SwitchActions - -namespace FeatureMap { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::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; - 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::OnOffSwitchConfiguration::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::OnOffSwitchConfiguration::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; - 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::OnOffSwitchConfiguration::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace OnOffSwitchConfiguration - namespace LevelControl { namespace Attributes { @@ -1960,159 +1766,18 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace LevelControl -namespace BinaryInputBasic { +namespace PulseWidthModulation { namespace Attributes { -namespace ActiveText { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) -{ - uint8_t zclString[16 + 1]; - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - - VerifyOrReturnError(value.size() == 16, Protocols::InteractionModel::Status::InvalidDataType); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) -{ - - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) -{ - - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace ActiveText - -namespace Description { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) -{ - uint8_t zclString[16 + 1]; - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - - VerifyOrReturnError(value.size() == 16, Protocols::InteractionModel::Status::InvalidDataType); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) -{ - - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) -{ - - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace Description - -namespace InactiveText { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) -{ - uint8_t zclString[16 + 1]; - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - - VerifyOrReturnError(value.size() == 16, Protocols::InteractionModel::Status::InvalidDataType); - memcpy(value.data(), &zclString[1], 16); - value.reduce_size(length); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) -{ - - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) -{ - - static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 16, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[16 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace InactiveText - -namespace OutOfService { +namespace FeatureMap { -Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2122,9 +1787,9 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2132,13 +1797,13 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAtt Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PulseWidthModulation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2146,20 +1811,20 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace OutOfService +} // namespace FeatureMap -namespace Polarity { +namespace ClusterRevision { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2169,9 +1834,9 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) return status; } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2179,13 +1844,13 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, Mark Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PulseWidthModulation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2193,20 +1858,29 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Polarity +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace PulseWidthModulation -namespace PresentValue { +namespace Descriptor { +namespace Attributes {} // namespace Attributes +} // namespace Descriptor -Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) +namespace Binding { +namespace Attributes { + +namespace FeatureMap { + +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Binding::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2216,9 +1890,9 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2226,13 +1900,13 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAtt Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Binding::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2240,20 +1914,19 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace PresentValue +} // namespace FeatureMap -namespace Reliability { +namespace ClusterRevision { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Binding::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2263,9 +1936,9 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) return status; } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2273,13 +1946,13 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, Mark Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Binding::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2287,20 +1960,26 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace Reliability +} // namespace ClusterRevision -namespace StatusFlags { +} // namespace Attributes +} // namespace Binding -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) +namespace AccessControl { +namespace Attributes { + +namespace FeatureMap { + +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::AccessControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2310,9 +1989,9 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) return status; } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2320,13 +1999,13 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, Mark Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AccessControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return Protocols::InteractionModel::Status::ConstraintError; @@ -2334,57 +2013,63 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace StatusFlags +} // namespace FeatureMap + +} // namespace Attributes +} // namespace AccessControl + +namespace Actions { +namespace Attributes { -namespace ApplicationType { +namespace SetupURL { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + uint8_t zclString[512 + 2]; Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, zclString, sizeof(zclString)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + size_t length = emberAfLongStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return Protocols::InteractionModel::Status::ConstraintError; } - *value = Traits::StorageToWorking(temp); + + VerifyOrReturnError(value.size() == 512, Protocols::InteractionModel::Status::InvalidDataType); + memcpy(value.data(), &zclString[2], 512); + value.reduce_size(length); return status; } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { - using Traits = NumericAttributeTraits; - 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::BinaryInputBasic::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + + static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 512, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[512 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { - using Traits = NumericAttributeTraits; - 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::BinaryInputBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); + + static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 512, Protocols::InteractionModel::Status::ConstraintError); + uint8_t zclString[512 + 2]; + auto length = static_cast(value.size()); + Encoding::LittleEndian::Put16(zclString, length); + memcpy(&zclString[2], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); } -} // namespace ApplicationType +} // namespace SetupURL namespace FeatureMap { @@ -2392,9 +2077,8 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2414,7 +2098,7 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, Mar Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } @@ -2428,7 +2112,7 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -2439,9 +2123,8 @@ Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -2461,7 +2144,7 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } @@ -2475,427 +2158,27 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace BinaryInputBasic +} // namespace Actions -namespace PulseWidthModulation { +namespace BasicInformation { namespace Attributes { -namespace FeatureMap { +namespace NodeLabel { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, readable, sizeof(temp)); + emberAfReadAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, sizeof(zclString)); 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; - 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::PulseWidthModulation::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::PulseWidthModulation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::PulseWidthModulation::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; - 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::PulseWidthModulation::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::PulseWidthModulation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace PulseWidthModulation - -namespace Descriptor { -namespace Attributes {} // namespace Attributes -} // namespace Descriptor - -namespace Binding { -namespace Attributes { - -namespace FeatureMap { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Binding::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; - 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::Binding::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::Binding::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Binding::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; - 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::Binding::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::Binding::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Binding - -namespace AccessControl { -namespace Attributes { - -namespace FeatureMap { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::AccessControl::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; - 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::AccessControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::AccessControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -} // namespace Attributes -} // namespace AccessControl - -namespace Actions { -namespace Attributes { - -namespace SetupURL { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) -{ - uint8_t zclString[512 + 2]; - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - size_t length = emberAfLongStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - - VerifyOrReturnError(value.size() == 512, Protocols::InteractionModel::Status::InvalidDataType); - memcpy(value.data(), &zclString[2], 512); - value.reduce_size(length); - return status; -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) -{ - - static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 512, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[512 + 2]; - auto length = static_cast(value.size()); - Encoding::LittleEndian::Put16(zclString, length); - memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), - EmberAfWriteDataInput(zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) -{ - - static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 512, Protocols::InteractionModel::Status::ConstraintError); - uint8_t zclString[512 + 2]; - auto length = static_cast(value.size()); - Encoding::LittleEndian::Put16(zclString, length); - memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE); -} - -} // namespace SetupURL - -namespace FeatureMap { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Actions::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; - 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::Actions::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::Actions::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = emberAfReadAttribute(endpoint, Clusters::Actions::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; - 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::Actions::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::Actions::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace Actions - -namespace BasicInformation { -namespace Attributes { - -namespace NodeLabel { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) -{ - uint8_t zclString[32 + 1]; - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, sizeof(zclString)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) { return Protocols::InteractionModel::Status::ConstraintError; } @@ -20270,576 +19553,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace WindowCovering -namespace BarrierControl { -namespace Attributes { - -namespace BarrierMovingState { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace BarrierMovingState - -namespace BarrierSafetyStatus { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); -} - -} // namespace BarrierSafetyStatus - -namespace BarrierCapabilities { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); -} - -} // namespace BarrierCapabilities - -namespace BarrierOpenEvents { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierOpenEvents - -namespace BarrierCloseEvents { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierCloseEvents - -namespace BarrierCommandOpenEvents { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierCommandOpenEvents - -namespace BarrierCommandCloseEvents { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierCommandCloseEvents - -namespace BarrierOpenPeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierOpenPeriod - -namespace BarrierClosePeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierClosePeriod - -namespace BarrierPosition { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace BarrierPosition - -namespace FeatureMap { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::BarrierControl::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; - 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::BarrierControl::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace BarrierControl - namespace ServiceArea { namespace Attributes { @@ -38205,6122 +36918,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace CommissionerControl -namespace ElectricalMeasurement { -namespace Attributes { - -namespace MeasurementType { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace MeasurementType - -namespace DcVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcVoltage - -namespace DcVoltageMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcVoltageMin - -namespace DcVoltageMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcVoltageMax - -namespace DcCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcCurrent - -namespace DcCurrentMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcCurrentMin - -namespace DcCurrentMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcCurrentMax - -namespace DcPower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcPower - -namespace DcPowerMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcPowerMin - -namespace DcPowerMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace DcPowerMax - -namespace DcVoltageMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace DcVoltageMultiplier - -namespace DcVoltageDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace DcVoltageDivisor - -namespace DcCurrentMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace DcCurrentMultiplier - -namespace DcCurrentDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace DcCurrentDivisor - -namespace DcPowerMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace DcPowerMultiplier - -namespace DcPowerDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace DcPowerDivisor - -namespace AcFrequency { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcFrequency - -namespace AcFrequencyMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcFrequencyMin - -namespace AcFrequencyMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcFrequencyMax - -namespace NeutralCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace NeutralCurrent - -namespace TotalActivePower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int32_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); -} - -} // namespace TotalActivePower - -namespace TotalReactivePower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int32_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); -} - -} // namespace TotalReactivePower - -namespace TotalApparentPower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace TotalApparentPower - -namespace Measured1stHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace Measured1stHarmonicCurrent - -namespace Measured3rdHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace Measured3rdHarmonicCurrent - -namespace Measured5thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace Measured5thHarmonicCurrent - -namespace Measured7thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace Measured7thHarmonicCurrent - -namespace Measured9thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace Measured9thHarmonicCurrent - -namespace Measured11thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace Measured11thHarmonicCurrent - -namespace MeasuredPhase1stHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MeasuredPhase1stHarmonicCurrent - -namespace MeasuredPhase3rdHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MeasuredPhase3rdHarmonicCurrent - -namespace MeasuredPhase5thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MeasuredPhase5thHarmonicCurrent - -namespace MeasuredPhase7thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MeasuredPhase7thHarmonicCurrent - -namespace MeasuredPhase9thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MeasuredPhase9thHarmonicCurrent - -namespace MeasuredPhase11thHarmonicCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace MeasuredPhase11thHarmonicCurrent - -namespace AcFrequencyMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcFrequencyMultiplier - -namespace AcFrequencyDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcFrequencyDivisor - -namespace PowerMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace PowerMultiplier - -namespace PowerDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -} // namespace PowerDivisor - -namespace HarmonicCurrentMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); -} - -} // namespace HarmonicCurrentMultiplier - -namespace PhaseHarmonicCurrentMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); -} - -} // namespace PhaseHarmonicCurrentMultiplier - -namespace InstantaneousVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace InstantaneousVoltage - -namespace InstantaneousLineCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace InstantaneousLineCurrent - -namespace InstantaneousActiveCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace InstantaneousActiveCurrent - -namespace InstantaneousReactiveCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace InstantaneousReactiveCurrent - -namespace InstantaneousPower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace InstantaneousPower - -namespace RmsVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltage - -namespace RmsVoltageMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageMin - -namespace RmsVoltageMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageMax - -namespace RmsCurrent { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrent - -namespace RmsCurrentMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentMin - -namespace RmsCurrentMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentMax - -namespace ActivePower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePower - -namespace ActivePowerMin { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerMin - -namespace ActivePowerMax { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerMax - -namespace ReactivePower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ReactivePower - -namespace ApparentPower { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ApparentPower - -namespace PowerFactor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); -} - -} // namespace PowerFactor - -namespace AverageRmsVoltageMeasurementPeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsVoltageMeasurementPeriod - -namespace AverageRmsUnderVoltageCounter { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsUnderVoltageCounter - -namespace RmsExtremeOverVoltagePeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeOverVoltagePeriod - -namespace RmsExtremeUnderVoltagePeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeUnderVoltagePeriod - -namespace RmsVoltageSagPeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSagPeriod - -namespace RmsVoltageSwellPeriod { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSwellPeriod - -namespace AcVoltageMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcVoltageMultiplier - -namespace AcVoltageDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcVoltageDivisor - -namespace AcCurrentMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcCurrentMultiplier - -namespace AcCurrentDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcCurrentDivisor - -namespace AcPowerMultiplier { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcPowerMultiplier - -namespace AcPowerDivisor { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AcPowerDivisor - -namespace OverloadAlarmsMask { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, uint8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); -} - -} // namespace OverloadAlarmsMask - -namespace VoltageOverload { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace VoltageOverload - -namespace CurrentOverload { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace CurrentOverload - -namespace AcOverloadAlarmsMask { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); -} - -} // namespace AcOverloadAlarmsMask - -namespace AcVoltageOverload { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace AcVoltageOverload - -namespace AcCurrentOverload { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace AcCurrentOverload - -namespace AcActivePowerOverload { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace AcActivePowerOverload - -namespace AcReactivePowerOverload { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace AcReactivePowerOverload - -namespace AverageRmsOverVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsOverVoltage - -namespace AverageRmsUnderVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsUnderVoltage - -namespace RmsExtremeOverVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeOverVoltage - -namespace RmsExtremeUnderVoltage { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeUnderVoltage - -namespace RmsVoltageSag { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSag - -namespace RmsVoltageSwell { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSwell - -namespace LineCurrentPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace LineCurrentPhaseB - -namespace ActiveCurrentPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActiveCurrentPhaseB - -namespace ReactiveCurrentPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ReactiveCurrentPhaseB - -namespace RmsVoltagePhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltagePhaseB - -namespace RmsVoltageMinPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageMinPhaseB - -namespace RmsVoltageMaxPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageMaxPhaseB - -namespace RmsCurrentPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentPhaseB - -namespace RmsCurrentMinPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentMinPhaseB - -namespace RmsCurrentMaxPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentMaxPhaseB - -namespace ActivePowerPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerPhaseB - -namespace ActivePowerMinPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerMinPhaseB - -namespace ActivePowerMaxPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerMaxPhaseB - -namespace ReactivePowerPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ReactivePowerPhaseB - -namespace ApparentPowerPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ApparentPowerPhaseB - -namespace PowerFactorPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); -} - -} // namespace PowerFactorPhaseB - -namespace AverageRmsVoltageMeasurementPeriodPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsVoltageMeasurementPeriodPhaseB - -namespace AverageRmsOverVoltageCounterPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsOverVoltageCounterPhaseB - -namespace AverageRmsUnderVoltageCounterPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsUnderVoltageCounterPhaseB - -namespace RmsExtremeOverVoltagePeriodPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeOverVoltagePeriodPhaseB - -namespace RmsExtremeUnderVoltagePeriodPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeUnderVoltagePeriodPhaseB - -namespace RmsVoltageSagPeriodPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSagPeriodPhaseB - -namespace RmsVoltageSwellPeriodPhaseB { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSwellPeriodPhaseB - -namespace LineCurrentPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace LineCurrentPhaseC - -namespace ActiveCurrentPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActiveCurrentPhaseC - -namespace ReactiveCurrentPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ReactiveCurrentPhaseC - -namespace RmsVoltagePhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltagePhaseC - -namespace RmsVoltageMinPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageMinPhaseC - -namespace RmsVoltageMaxPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageMaxPhaseC - -namespace RmsCurrentPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentPhaseC - -namespace RmsCurrentMinPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentMinPhaseC - -namespace RmsCurrentMaxPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsCurrentMaxPhaseC - -namespace ActivePowerPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerPhaseC - -namespace ActivePowerMinPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerMinPhaseC - -namespace ActivePowerMaxPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ActivePowerMaxPhaseC - -namespace ReactivePowerPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int16_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); -} - -} // namespace ReactivePowerPhaseC - -namespace ApparentPowerPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ApparentPowerPhaseC - -namespace PowerFactorPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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, int8_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); -} - -} // namespace PowerFactorPhaseC - -namespace AverageRmsVoltageMeasurementPeriodPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsVoltageMeasurementPeriodPhaseC - -namespace AverageRmsOverVoltageCounterPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsOverVoltageCounterPhaseC - -namespace AverageRmsUnderVoltageCounterPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace AverageRmsUnderVoltageCounterPhaseC - -namespace RmsExtremeOverVoltagePeriodPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeOverVoltagePeriodPhaseC - -namespace RmsExtremeUnderVoltagePeriodPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsExtremeUnderVoltagePeriodPhaseC - -namespace RmsVoltageSagPeriodPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSagPeriodPhaseC - -namespace RmsVoltageSwellPeriodPhaseC { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace RmsVoltageSwellPeriodPhaseC - -namespace FeatureMap { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::ElectricalMeasurement::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; - 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::ElectricalMeasurement::Id, Id), - EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); -} - -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) -{ - using Traits = NumericAttributeTraits; - 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::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ElectricalMeasurement - 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 f44307d55e9ae1..c4b83e7920c064 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 @@ -151,36 +151,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar } // namespace Attributes } // namespace OnOff -namespace OnOffSwitchConfiguration { -namespace Attributes { - -namespace SwitchType { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace SwitchType - -namespace SwitchActions { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace SwitchActions - -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 OnOffSwitchConfiguration - namespace LevelControl { namespace Attributes { @@ -315,78 +285,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar } // namespace Attributes } // namespace LevelControl -namespace BinaryInputBasic { -namespace Attributes { - -namespace ActiveText { -Protocols::InteractionModel::Status Get(EndpointId endpoint, 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); -} // namespace ActiveText - -namespace Description { -Protocols::InteractionModel::Status Get(EndpointId endpoint, 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); -} // namespace Description - -namespace InactiveText { -Protocols::InteractionModel::Status Get(EndpointId endpoint, 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); -} // namespace InactiveText - -namespace OutOfService { -Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); -} // namespace OutOfService - -namespace Polarity { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace Polarity - -namespace PresentValue { -Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); -} // namespace PresentValue - -namespace Reliability { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace Reliability - -namespace StatusFlags { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace StatusFlags - -namespace ApplicationType { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace ApplicationType - -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 BinaryInputBasic - namespace PulseWidthModulation { namespace Attributes { @@ -3186,84 +3084,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar } // namespace Attributes } // namespace WindowCovering -namespace BarrierControl { -namespace Attributes { - -namespace BarrierMovingState { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace BarrierMovingState - -namespace BarrierSafetyStatus { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // bitmap16 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -} // namespace BarrierSafetyStatus - -namespace BarrierCapabilities { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace BarrierCapabilities - -namespace BarrierOpenEvents { -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 BarrierOpenEvents - -namespace BarrierCloseEvents { -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 BarrierCloseEvents - -namespace BarrierCommandOpenEvents { -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 BarrierCommandOpenEvents - -namespace BarrierCommandCloseEvents { -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 BarrierCommandCloseEvents - -namespace BarrierOpenPeriod { -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 BarrierOpenPeriod - -namespace BarrierClosePeriod { -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 BarrierClosePeriod - -namespace BarrierPosition { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace BarrierPosition - -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 BarrierControl - namespace ServiceArea { namespace Attributes { @@ -5790,792 +5610,6 @@ Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, Mar } // namespace Attributes } // namespace CommissionerControl -namespace ElectricalMeasurement { -namespace Attributes { - -namespace MeasurementType { -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 MeasurementType - -namespace DcVoltage { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcVoltage - -namespace DcVoltageMin { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcVoltageMin - -namespace DcVoltageMax { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcVoltageMax - -namespace DcCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcCurrent - -namespace DcCurrentMin { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcCurrentMin - -namespace DcCurrentMax { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcCurrentMax - -namespace DcPower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcPower - -namespace DcPowerMin { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcPowerMin - -namespace DcPowerMax { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace DcPowerMax - -namespace DcVoltageMultiplier { -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 DcVoltageMultiplier - -namespace DcVoltageDivisor { -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 DcVoltageDivisor - -namespace DcCurrentMultiplier { -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 DcCurrentMultiplier - -namespace DcCurrentDivisor { -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 DcCurrentDivisor - -namespace DcPowerMultiplier { -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 DcPowerMultiplier - -namespace DcPowerDivisor { -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 DcPowerDivisor - -namespace AcFrequency { -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 AcFrequency - -namespace AcFrequencyMin { -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 AcFrequencyMin - -namespace AcFrequencyMax { -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 AcFrequencyMax - -namespace NeutralCurrent { -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 NeutralCurrent - -namespace TotalActivePower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value); // int32s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); -} // namespace TotalActivePower - -namespace TotalReactivePower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value); // int32s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); -} // namespace TotalReactivePower - -namespace TotalApparentPower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace TotalApparentPower - -namespace Measured1stHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace Measured1stHarmonicCurrent - -namespace Measured3rdHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace Measured3rdHarmonicCurrent - -namespace Measured5thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace Measured5thHarmonicCurrent - -namespace Measured7thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace Measured7thHarmonicCurrent - -namespace Measured9thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace Measured9thHarmonicCurrent - -namespace Measured11thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace Measured11thHarmonicCurrent - -namespace MeasuredPhase1stHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace MeasuredPhase1stHarmonicCurrent - -namespace MeasuredPhase3rdHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace MeasuredPhase3rdHarmonicCurrent - -namespace MeasuredPhase5thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace MeasuredPhase5thHarmonicCurrent - -namespace MeasuredPhase7thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace MeasuredPhase7thHarmonicCurrent - -namespace MeasuredPhase9thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace MeasuredPhase9thHarmonicCurrent - -namespace MeasuredPhase11thHarmonicCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace MeasuredPhase11thHarmonicCurrent - -namespace AcFrequencyMultiplier { -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 AcFrequencyMultiplier - -namespace AcFrequencyDivisor { -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 AcFrequencyDivisor - -namespace PowerMultiplier { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace PowerMultiplier - -namespace PowerDivisor { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -} // namespace PowerDivisor - -namespace HarmonicCurrentMultiplier { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -} // namespace HarmonicCurrentMultiplier - -namespace PhaseHarmonicCurrentMultiplier { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -} // namespace PhaseHarmonicCurrentMultiplier - -namespace InstantaneousVoltage { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace InstantaneousVoltage - -namespace InstantaneousLineCurrent { -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 InstantaneousLineCurrent - -namespace InstantaneousActiveCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace InstantaneousActiveCurrent - -namespace InstantaneousReactiveCurrent { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace InstantaneousReactiveCurrent - -namespace InstantaneousPower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace InstantaneousPower - -namespace RmsVoltage { -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 RmsVoltage - -namespace RmsVoltageMin { -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 RmsVoltageMin - -namespace RmsVoltageMax { -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 RmsVoltageMax - -namespace RmsCurrent { -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 RmsCurrent - -namespace RmsCurrentMin { -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 RmsCurrentMin - -namespace RmsCurrentMax { -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 RmsCurrentMax - -namespace ActivePower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePower - -namespace ActivePowerMin { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerMin - -namespace ActivePowerMax { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerMax - -namespace ReactivePower { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ReactivePower - -namespace ApparentPower { -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 ApparentPower - -namespace PowerFactor { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -} // namespace PowerFactor - -namespace AverageRmsVoltageMeasurementPeriod { -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 AverageRmsVoltageMeasurementPeriod - -namespace AverageRmsUnderVoltageCounter { -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 AverageRmsUnderVoltageCounter - -namespace RmsExtremeOverVoltagePeriod { -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 RmsExtremeOverVoltagePeriod - -namespace RmsExtremeUnderVoltagePeriod { -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 RmsExtremeUnderVoltagePeriod - -namespace RmsVoltageSagPeriod { -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 RmsVoltageSagPeriod - -namespace RmsVoltageSwellPeriod { -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 RmsVoltageSwellPeriod - -namespace AcVoltageMultiplier { -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 AcVoltageMultiplier - -namespace AcVoltageDivisor { -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 AcVoltageDivisor - -namespace AcCurrentMultiplier { -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 AcCurrentMultiplier - -namespace AcCurrentDivisor { -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 AcCurrentDivisor - -namespace AcPowerMultiplier { -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 AcPowerMultiplier - -namespace AcPowerDivisor { -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 AcPowerDivisor - -namespace OverloadAlarmsMask { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -} // namespace OverloadAlarmsMask - -namespace VoltageOverload { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace VoltageOverload - -namespace CurrentOverload { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace CurrentOverload - -namespace AcOverloadAlarmsMask { -Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // bitmap16 -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -} // namespace AcOverloadAlarmsMask - -namespace AcVoltageOverload { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace AcVoltageOverload - -namespace AcCurrentOverload { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace AcCurrentOverload - -namespace AcActivePowerOverload { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace AcActivePowerOverload - -namespace AcReactivePowerOverload { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace AcReactivePowerOverload - -namespace AverageRmsOverVoltage { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace AverageRmsOverVoltage - -namespace AverageRmsUnderVoltage { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace AverageRmsUnderVoltage - -namespace RmsExtremeOverVoltage { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace RmsExtremeOverVoltage - -namespace RmsExtremeUnderVoltage { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace RmsExtremeUnderVoltage - -namespace RmsVoltageSag { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace RmsVoltageSag - -namespace RmsVoltageSwell { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace RmsVoltageSwell - -namespace LineCurrentPhaseB { -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 LineCurrentPhaseB - -namespace ActiveCurrentPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActiveCurrentPhaseB - -namespace ReactiveCurrentPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ReactiveCurrentPhaseB - -namespace RmsVoltagePhaseB { -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 RmsVoltagePhaseB - -namespace RmsVoltageMinPhaseB { -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 RmsVoltageMinPhaseB - -namespace RmsVoltageMaxPhaseB { -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 RmsVoltageMaxPhaseB - -namespace RmsCurrentPhaseB { -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 RmsCurrentPhaseB - -namespace RmsCurrentMinPhaseB { -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 RmsCurrentMinPhaseB - -namespace RmsCurrentMaxPhaseB { -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 RmsCurrentMaxPhaseB - -namespace ActivePowerPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerPhaseB - -namespace ActivePowerMinPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerMinPhaseB - -namespace ActivePowerMaxPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerMaxPhaseB - -namespace ReactivePowerPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ReactivePowerPhaseB - -namespace ApparentPowerPhaseB { -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 ApparentPowerPhaseB - -namespace PowerFactorPhaseB { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -} // namespace PowerFactorPhaseB - -namespace AverageRmsVoltageMeasurementPeriodPhaseB { -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 AverageRmsVoltageMeasurementPeriodPhaseB - -namespace AverageRmsOverVoltageCounterPhaseB { -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 AverageRmsOverVoltageCounterPhaseB - -namespace AverageRmsUnderVoltageCounterPhaseB { -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 AverageRmsUnderVoltageCounterPhaseB - -namespace RmsExtremeOverVoltagePeriodPhaseB { -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 RmsExtremeOverVoltagePeriodPhaseB - -namespace RmsExtremeUnderVoltagePeriodPhaseB { -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 RmsExtremeUnderVoltagePeriodPhaseB - -namespace RmsVoltageSagPeriodPhaseB { -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 RmsVoltageSagPeriodPhaseB - -namespace RmsVoltageSwellPeriodPhaseB { -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 RmsVoltageSwellPeriodPhaseB - -namespace LineCurrentPhaseC { -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 LineCurrentPhaseC - -namespace ActiveCurrentPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActiveCurrentPhaseC - -namespace ReactiveCurrentPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ReactiveCurrentPhaseC - -namespace RmsVoltagePhaseC { -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 RmsVoltagePhaseC - -namespace RmsVoltageMinPhaseC { -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 RmsVoltageMinPhaseC - -namespace RmsVoltageMaxPhaseC { -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 RmsVoltageMaxPhaseC - -namespace RmsCurrentPhaseC { -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 RmsCurrentPhaseC - -namespace RmsCurrentMinPhaseC { -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 RmsCurrentMinPhaseC - -namespace RmsCurrentMaxPhaseC { -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 RmsCurrentMaxPhaseC - -namespace ActivePowerPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerPhaseC - -namespace ActivePowerMinPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerMinPhaseC - -namespace ActivePowerMaxPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ActivePowerMaxPhaseC - -namespace ReactivePowerPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -} // namespace ReactivePowerPhaseC - -namespace ApparentPowerPhaseC { -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 ApparentPowerPhaseC - -namespace PowerFactorPhaseC { -Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -} // namespace PowerFactorPhaseC - -namespace AverageRmsVoltageMeasurementPeriodPhaseC { -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 AverageRmsVoltageMeasurementPeriodPhaseC - -namespace AverageRmsOverVoltageCounterPhaseC { -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 AverageRmsOverVoltageCounterPhaseC - -namespace AverageRmsUnderVoltageCounterPhaseC { -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 AverageRmsUnderVoltageCounterPhaseC - -namespace RmsExtremeOverVoltagePeriodPhaseC { -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 RmsExtremeOverVoltagePeriodPhaseC - -namespace RmsExtremeUnderVoltagePeriodPhaseC { -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 RmsExtremeUnderVoltagePeriodPhaseC - -namespace RmsVoltageSagPeriodPhaseC { -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 RmsVoltageSagPeriodPhaseC - -namespace RmsVoltageSwellPeriodPhaseC { -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 RmsVoltageSwellPeriodPhaseC - -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 ElectricalMeasurement - 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 724e7a7eb88857..7e86e92268f703 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -48,21 +48,11 @@ void emberAfGroupsClusterInitCallback(chip::EndpointId endpoint); */ void emberAfOnOffClusterInitCallback(chip::EndpointId endpoint); -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfOnOffSwitchConfigurationClusterInitCallback(chip::EndpointId endpoint); - /** * @param endpoint Endpoint that is being initialized */ void emberAfLevelControlClusterInitCallback(chip::EndpointId endpoint); -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfBinaryInputBasicClusterInitCallback(chip::EndpointId endpoint); - /** * @param endpoint Endpoint that is being initialized */ @@ -428,11 +418,6 @@ void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint); */ void emberAfWindowCoveringClusterInitCallback(chip::EndpointId endpoint); -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfBarrierControlClusterInitCallback(chip::EndpointId endpoint); - /** * @param endpoint Endpoint that is being initialized */ @@ -643,11 +628,6 @@ void emberAfEcosystemInformationClusterInitCallback(chip::EndpointId endpoint); */ void emberAfCommissionerControlClusterInitCallback(chip::EndpointId endpoint); -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfElectricalMeasurementClusterInitCallback(chip::EndpointId endpoint); - /** * @param endpoint Endpoint that is being initialized */ @@ -782,44 +762,6 @@ MatterOnOffClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAtt */ void emberAfOnOffClusterServerTickCallback(chip::EndpointId endpoint); -// -// On/off Switch Configuration Cluster -// - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfOnOffSwitchConfigurationClusterServerInitCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being shutdown - */ -void MatterOnOffSwitchConfigurationClusterServerShutdownCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfOnOffSwitchConfigurationClusterClientInitCallback(chip::EndpointId endpoint); - -/** - * @param attributePath Concrete attribute path that changed - */ -void MatterOnOffSwitchConfigurationClusterServerAttributeChangedCallback(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 MatterOnOffSwitchConfigurationClusterServerPreAttributeChangedCallback( - const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** - * @param endpoint Endpoint that is being served - */ -void emberAfOnOffSwitchConfigurationClusterServerTickCallback(chip::EndpointId endpoint); - // // Level Control Cluster // @@ -859,45 +801,6 @@ MatterLevelControlClusterServerPreAttributeChangedCallback(const chip::app::Conc */ void emberAfLevelControlClusterServerTickCallback(chip::EndpointId endpoint); -// -// Binary Input (Basic) Cluster -// - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfBinaryInputBasicClusterServerInitCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being shutdown - */ -void MatterBinaryInputBasicClusterServerShutdownCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfBinaryInputBasicClusterClientInitCallback(chip::EndpointId endpoint); - -/** - * @param attributePath Concrete attribute path that changed - */ -void MatterBinaryInputBasicClusterServerAttributeChangedCallback(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 -MatterBinaryInputBasicClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** - * @param endpoint Endpoint that is being served - */ -void emberAfBinaryInputBasicClusterServerTickCallback(chip::EndpointId endpoint); - // // Pulse Width Modulation Cluster // @@ -3714,45 +3617,6 @@ MatterWindowCoveringClusterServerPreAttributeChangedCallback(const chip::app::Co */ void emberAfWindowCoveringClusterServerTickCallback(chip::EndpointId endpoint); -// -// Barrier Control Cluster -// - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfBarrierControlClusterServerInitCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being shutdown - */ -void MatterBarrierControlClusterServerShutdownCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfBarrierControlClusterClientInitCallback(chip::EndpointId endpoint); - -/** - * @param attributePath Concrete attribute path that changed - */ -void MatterBarrierControlClusterServerAttributeChangedCallback(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 -MatterBarrierControlClusterServerPreAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath, - EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** - * @param endpoint Endpoint that is being served - */ -void emberAfBarrierControlClusterServerTickCallback(chip::EndpointId endpoint); - // // Service Area Cluster // @@ -5379,44 +5243,6 @@ chip::Protocols::InteractionModel::Status MatterCommissionerControlClusterServer */ void emberAfCommissionerControlClusterServerTickCallback(chip::EndpointId endpoint); -// -// Electrical Measurement Cluster -// - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfElectricalMeasurementClusterServerInitCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being shutdown - */ -void MatterElectricalMeasurementClusterServerShutdownCallback(chip::EndpointId endpoint); - -/** - * @param endpoint Endpoint that is being initialized - */ -void emberAfElectricalMeasurementClusterClientInitCallback(chip::EndpointId endpoint); - -/** - * @param attributePath Concrete attribute path that changed - */ -void MatterElectricalMeasurementClusterServerAttributeChangedCallback(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 MatterElectricalMeasurementClusterServerPreAttributeChangedCallback( - const chip::app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value); - -/** - * @param endpoint Endpoint that is being served - */ -void emberAfElectricalMeasurementClusterServerTickCallback(chip::EndpointId endpoint); - // // Unit Testing Cluster // @@ -6282,18 +6108,6 @@ bool emberAfWindowCoveringClusterGoToTiltValueCallback( bool emberAfWindowCoveringClusterGoToTiltPercentageCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::DecodableType & commandData); -/** - * @brief Barrier Control Cluster BarrierControlGoToPercent Command callback (from client) - */ -bool emberAfBarrierControlClusterBarrierControlGoToPercentCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::DecodableType & commandData); -/** - * @brief Barrier Control Cluster BarrierControlStop Command callback (from client) - */ -bool emberAfBarrierControlClusterBarrierControlStopCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::DecodableType & commandData); /** * @brief Thermostat Cluster SetpointRaiseLower Command callback (from client) */ @@ -6755,18 +6569,6 @@ bool emberAfCommissionerControlClusterRequestCommissioningApprovalCallback( bool emberAfCommissionerControlClusterCommissionNodeCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::CommissionerControl::Commands::CommissionNode::DecodableType & commandData); -/** - * @brief Electrical Measurement Cluster GetProfileInfoCommand Command callback (from client) - */ -bool emberAfElectricalMeasurementClusterGetProfileInfoCommandCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::DecodableType & commandData); -/** - * @brief Electrical Measurement Cluster GetMeasurementProfileCommand Command callback (from client) - */ -bool emberAfElectricalMeasurementClusterGetMeasurementProfileCommandCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::DecodableType & commandData); /** * @brief Unit Testing Cluster Test Command callback (from client) */ 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 627b5808fa7931..c55fab3f9ae9fa 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 @@ -544,8 +544,6 @@ enum class OnOffControlBitmap : uint8_t }; } // namespace OnOff -namespace OnOffSwitchConfiguration {} // namespace OnOffSwitchConfiguration - namespace LevelControl { // Enum for MoveModeEnum @@ -588,8 +586,6 @@ enum class OptionsBitmap : uint8_t }; } // namespace LevelControl -namespace BinaryInputBasic {} // namespace BinaryInputBasic - namespace PulseWidthModulation {} // namespace PulseWidthModulation namespace Descriptor { @@ -3914,24 +3910,6 @@ enum class SafetyStatus : uint16_t }; } // namespace WindowCovering -namespace BarrierControl { - -// Bitmap for BarrierControlCapabilities -enum class BarrierControlCapabilities : uint8_t -{ - kPartialBarrier = 0x1, -}; - -// Bitmap for BarrierControlSafetyStatus -enum class BarrierControlSafetyStatus : uint16_t -{ - kRemoteLockout = 0x1, - kTemperDetected = 0x2, - kFailedCommunication = 0x4, - kPositionFailure = 0x8, -}; -} // namespace BarrierControl - namespace ServiceArea { // Enum for OperationalStatusEnum @@ -5425,8 +5403,6 @@ enum class SupportedDeviceCategoryBitmap : uint32_t }; } // namespace CommissionerControl -namespace ElectricalMeasurement {} // namespace ElectricalMeasurement - 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 78368f7293b1a4..00e32012cb3be6 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 @@ -1352,40 +1352,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace OnOff -namespace OnOffSwitchConfiguration { - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::SwitchType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, switchType); - case Attributes::SwitchActions::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, switchActions); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - 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 OnOffSwitchConfiguration namespace LevelControl { namespace Commands { @@ -1861,54 +1827,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace LevelControl -namespace BinaryInputBasic { - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::ActiveText::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeText); - case Attributes::Description::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, description); - case Attributes::InactiveText::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, inactiveText); - case Attributes::OutOfService::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, outOfService); - case Attributes::Polarity::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, polarity); - case Attributes::PresentValue::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, presentValue); - case Attributes::Reliability::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reliability); - case Attributes::StatusFlags::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, statusFlags); - case Attributes::ApplicationType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, applicationType); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - 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 BinaryInputBasic namespace PulseWidthModulation { namespace Commands {} // namespace Commands @@ -20314,111 +20232,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events } // namespace WindowCovering -namespace BarrierControl { - -namespace Commands { -namespace BarrierControlGoToPercent { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kPercentOpen), percentOpen); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kPercentOpen)) - { - err = DataModel::Decode(reader, percentOpen); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace BarrierControlGoToPercent. -namespace BarrierControlStop { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace BarrierControlStop. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::BarrierMovingState::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierMovingState); - case Attributes::BarrierSafetyStatus::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierSafetyStatus); - case Attributes::BarrierCapabilities::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCapabilities); - case Attributes::BarrierOpenEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierOpenEvents); - case Attributes::BarrierCloseEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCloseEvents); - case Attributes::BarrierCommandOpenEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCommandOpenEvents); - case Attributes::BarrierCommandCloseEvents::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierCommandCloseEvents); - case Attributes::BarrierOpenPeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierOpenPeriod); - case Attributes::BarrierClosePeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierClosePeriod); - case Attributes::BarrierPosition::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, barrierPosition); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - 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 BarrierControl namespace ServiceArea { namespace Structs { @@ -29106,465 +28919,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Events } // namespace CommissionerControl -namespace ElectricalMeasurement { - -namespace Commands { -namespace GetProfileInfoResponseCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kProfileCount), profileCount); - encoder.Encode(to_underlying(Fields::kProfileIntervalPeriod), profileIntervalPeriod); - encoder.Encode(to_underlying(Fields::kMaxNumberOfIntervals), maxNumberOfIntervals); - encoder.Encode(to_underlying(Fields::kListOfAttributes), listOfAttributes); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kProfileCount)) - { - err = DataModel::Decode(reader, profileCount); - } - else if (__context_tag == to_underlying(Fields::kProfileIntervalPeriod)) - { - err = DataModel::Decode(reader, profileIntervalPeriod); - } - else if (__context_tag == to_underlying(Fields::kMaxNumberOfIntervals)) - { - err = DataModel::Decode(reader, maxNumberOfIntervals); - } - else if (__context_tag == to_underlying(Fields::kListOfAttributes)) - { - err = DataModel::Decode(reader, listOfAttributes); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace GetProfileInfoResponseCommand. -namespace GetProfileInfoCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace GetProfileInfoCommand. -namespace GetMeasurementProfileResponseCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kStartTime), startTime); - encoder.Encode(to_underlying(Fields::kStatus), status); - encoder.Encode(to_underlying(Fields::kProfileIntervalPeriod), profileIntervalPeriod); - encoder.Encode(to_underlying(Fields::kNumberOfIntervalsDelivered), numberOfIntervalsDelivered); - encoder.Encode(to_underlying(Fields::kAttributeId), attributeId); - encoder.Encode(to_underlying(Fields::kIntervals), intervals); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kStartTime)) - { - err = DataModel::Decode(reader, startTime); - } - else if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kProfileIntervalPeriod)) - { - err = DataModel::Decode(reader, profileIntervalPeriod); - } - else if (__context_tag == to_underlying(Fields::kNumberOfIntervalsDelivered)) - { - err = DataModel::Decode(reader, numberOfIntervalsDelivered); - } - else if (__context_tag == to_underlying(Fields::kAttributeId)) - { - err = DataModel::Decode(reader, attributeId); - } - else if (__context_tag == to_underlying(Fields::kIntervals)) - { - err = DataModel::Decode(reader, intervals); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace GetMeasurementProfileResponseCommand. -namespace GetMeasurementProfileCommand { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kAttributeId), attributeId); - encoder.Encode(to_underlying(Fields::kStartTime), startTime); - encoder.Encode(to_underlying(Fields::kNumberOfIntervals), numberOfIntervals); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kAttributeId)) - { - err = DataModel::Decode(reader, attributeId); - } - else if (__context_tag == to_underlying(Fields::kStartTime)) - { - err = DataModel::Decode(reader, startTime); - } - else if (__context_tag == to_underlying(Fields::kNumberOfIntervals)) - { - err = DataModel::Decode(reader, numberOfIntervals); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace GetMeasurementProfileCommand. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - case Attributes::MeasurementType::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measurementType); - case Attributes::DcVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcVoltage); - case Attributes::DcVoltageMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcVoltageMin); - case Attributes::DcVoltageMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcVoltageMax); - case Attributes::DcCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcCurrent); - case Attributes::DcCurrentMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcCurrentMin); - case Attributes::DcCurrentMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcCurrentMax); - case Attributes::DcPower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcPower); - case Attributes::DcPowerMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcPowerMin); - case Attributes::DcPowerMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcPowerMax); - case Attributes::DcVoltageMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcVoltageMultiplier); - case Attributes::DcVoltageDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcVoltageDivisor); - case Attributes::DcCurrentMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcCurrentMultiplier); - case Attributes::DcCurrentDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcCurrentDivisor); - case Attributes::DcPowerMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcPowerMultiplier); - case Attributes::DcPowerDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, dcPowerDivisor); - case Attributes::AcFrequency::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acFrequency); - case Attributes::AcFrequencyMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acFrequencyMin); - case Attributes::AcFrequencyMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acFrequencyMax); - case Attributes::NeutralCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, neutralCurrent); - case Attributes::TotalActivePower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, totalActivePower); - case Attributes::TotalReactivePower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, totalReactivePower); - case Attributes::TotalApparentPower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, totalApparentPower); - case Attributes::Measured1stHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measured1stHarmonicCurrent); - case Attributes::Measured3rdHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measured3rdHarmonicCurrent); - case Attributes::Measured5thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measured5thHarmonicCurrent); - case Attributes::Measured7thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measured7thHarmonicCurrent); - case Attributes::Measured9thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measured9thHarmonicCurrent); - case Attributes::Measured11thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measured11thHarmonicCurrent); - case Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredPhase1stHarmonicCurrent); - case Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredPhase3rdHarmonicCurrent); - case Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredPhase5thHarmonicCurrent); - case Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredPhase7thHarmonicCurrent); - case Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredPhase9thHarmonicCurrent); - case Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, measuredPhase11thHarmonicCurrent); - case Attributes::AcFrequencyMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acFrequencyMultiplier); - case Attributes::AcFrequencyDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acFrequencyDivisor); - case Attributes::PowerMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerMultiplier); - case Attributes::PowerDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerDivisor); - case Attributes::HarmonicCurrentMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, harmonicCurrentMultiplier); - case Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, phaseHarmonicCurrentMultiplier); - case Attributes::InstantaneousVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, instantaneousVoltage); - case Attributes::InstantaneousLineCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, instantaneousLineCurrent); - case Attributes::InstantaneousActiveCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, instantaneousActiveCurrent); - case Attributes::InstantaneousReactiveCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, instantaneousReactiveCurrent); - case Attributes::InstantaneousPower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, instantaneousPower); - case Attributes::RmsVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltage); - case Attributes::RmsVoltageMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageMin); - case Attributes::RmsVoltageMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageMax); - case Attributes::RmsCurrent::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrent); - case Attributes::RmsCurrentMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentMin); - case Attributes::RmsCurrentMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentMax); - case Attributes::ActivePower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePower); - case Attributes::ActivePowerMin::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerMin); - case Attributes::ActivePowerMax::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerMax); - case Attributes::ReactivePower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reactivePower); - case Attributes::ApparentPower::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, apparentPower); - case Attributes::PowerFactor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerFactor); - case Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsVoltageMeasurementPeriod); - case Attributes::AverageRmsUnderVoltageCounter::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsUnderVoltageCounter); - case Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeOverVoltagePeriod); - case Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeUnderVoltagePeriod); - case Attributes::RmsVoltageSagPeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSagPeriod); - case Attributes::RmsVoltageSwellPeriod::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSwellPeriod); - case Attributes::AcVoltageMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acVoltageMultiplier); - case Attributes::AcVoltageDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acVoltageDivisor); - case Attributes::AcCurrentMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acCurrentMultiplier); - case Attributes::AcCurrentDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acCurrentDivisor); - case Attributes::AcPowerMultiplier::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acPowerMultiplier); - case Attributes::AcPowerDivisor::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acPowerDivisor); - case Attributes::OverloadAlarmsMask::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, overloadAlarmsMask); - case Attributes::VoltageOverload::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, voltageOverload); - case Attributes::CurrentOverload::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentOverload); - case Attributes::AcOverloadAlarmsMask::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acOverloadAlarmsMask); - case Attributes::AcVoltageOverload::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acVoltageOverload); - case Attributes::AcCurrentOverload::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acCurrentOverload); - case Attributes::AcActivePowerOverload::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acActivePowerOverload); - case Attributes::AcReactivePowerOverload::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acReactivePowerOverload); - case Attributes::AverageRmsOverVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsOverVoltage); - case Attributes::AverageRmsUnderVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsUnderVoltage); - case Attributes::RmsExtremeOverVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeOverVoltage); - case Attributes::RmsExtremeUnderVoltage::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeUnderVoltage); - case Attributes::RmsVoltageSag::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSag); - case Attributes::RmsVoltageSwell::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSwell); - case Attributes::LineCurrentPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lineCurrentPhaseB); - case Attributes::ActiveCurrentPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeCurrentPhaseB); - case Attributes::ReactiveCurrentPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reactiveCurrentPhaseB); - case Attributes::RmsVoltagePhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltagePhaseB); - case Attributes::RmsVoltageMinPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageMinPhaseB); - case Attributes::RmsVoltageMaxPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageMaxPhaseB); - case Attributes::RmsCurrentPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentPhaseB); - case Attributes::RmsCurrentMinPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentMinPhaseB); - case Attributes::RmsCurrentMaxPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentMaxPhaseB); - case Attributes::ActivePowerPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerPhaseB); - case Attributes::ActivePowerMinPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerMinPhaseB); - case Attributes::ActivePowerMaxPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerMaxPhaseB); - case Attributes::ReactivePowerPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reactivePowerPhaseB); - case Attributes::ApparentPowerPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, apparentPowerPhaseB); - case Attributes::PowerFactorPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerFactorPhaseB); - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsVoltageMeasurementPeriodPhaseB); - case Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsOverVoltageCounterPhaseB); - case Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsUnderVoltageCounterPhaseB); - case Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeOverVoltagePeriodPhaseB); - case Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeUnderVoltagePeriodPhaseB); - case Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSagPeriodPhaseB); - case Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSwellPeriodPhaseB); - case Attributes::LineCurrentPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, lineCurrentPhaseC); - case Attributes::ActiveCurrentPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activeCurrentPhaseC); - case Attributes::ReactiveCurrentPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reactiveCurrentPhaseC); - case Attributes::RmsVoltagePhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltagePhaseC); - case Attributes::RmsVoltageMinPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageMinPhaseC); - case Attributes::RmsVoltageMaxPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageMaxPhaseC); - case Attributes::RmsCurrentPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentPhaseC); - case Attributes::RmsCurrentMinPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentMinPhaseC); - case Attributes::RmsCurrentMaxPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsCurrentMaxPhaseC); - case Attributes::ActivePowerPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerPhaseC); - case Attributes::ActivePowerMinPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerMinPhaseC); - case Attributes::ActivePowerMaxPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, activePowerMaxPhaseC); - case Attributes::ReactivePowerPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, reactivePowerPhaseC); - case Attributes::ApparentPowerPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, apparentPowerPhaseC); - case Attributes::PowerFactorPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, powerFactorPhaseC); - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsVoltageMeasurementPeriodPhaseC); - case Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsOverVoltageCounterPhaseC); - case Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageRmsUnderVoltageCounterPhaseC); - case Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeOverVoltagePeriodPhaseC); - case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsExtremeUnderVoltagePeriodPhaseC); - case Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSagPeriodPhaseC); - case Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, rmsVoltageSwellPeriodPhaseC); - case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, generatedCommandList); - case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, acceptedCommandList); - case Attributes::EventList::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, eventList); - 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 ElectricalMeasurement namespace UnitTesting { namespace Structs { @@ -32901,13 +32255,6 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::BarrierControl::Id: { - switch (aCommand) - { - default: - return false; - } - } case Clusters::ServiceArea::Id: { switch (aCommand) { @@ -33054,13 +32401,6 @@ bool CommandIsFabricScoped(ClusterId aCluster, CommandId aCommand) return false; } } - case Clusters::ElectricalMeasurement::Id: { - switch (aCommand) - { - default: - return false; - } - } case Clusters::UnitTesting::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 2aaf40bdbad6f9..f8847a3f1a0b51 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 @@ -1438,91 +1438,6 @@ struct TypeInfo }; } // namespace Attributes } // namespace OnOff -namespace OnOffSwitchConfiguration { - -namespace Attributes { - -namespace SwitchType { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SwitchType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SwitchType -namespace SwitchActions { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SwitchActions::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SwitchActions -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::OnOffSwitchConfiguration::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::SwitchType::TypeInfo::DecodableType switchType = static_cast(0); - Attributes::SwitchActions::TypeInfo::DecodableType switchActions = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace OnOffSwitchConfiguration namespace LevelControl { namespace Commands { @@ -2172,185 +2087,6 @@ struct TypeInfo }; } // namespace Attributes } // namespace LevelControl -namespace BinaryInputBasic { - -namespace Attributes { - -namespace ActiveText { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveText::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } -}; -} // namespace ActiveText -namespace Description { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Description::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } -}; -} // namespace Description -namespace InactiveText { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InactiveText::Id; } - static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 16; } -}; -} // namespace InactiveText -namespace OutOfService { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OutOfService::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OutOfService -namespace Polarity { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Polarity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Polarity -namespace PresentValue { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PresentValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PresentValue -namespace Reliability { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Reliability::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Reliability -namespace StatusFlags { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StatusFlags::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StatusFlags -namespace ApplicationType { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApplicationType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ApplicationType -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BinaryInputBasic::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::ActiveText::TypeInfo::DecodableType activeText; - Attributes::Description::TypeInfo::DecodableType description; - Attributes::InactiveText::TypeInfo::DecodableType inactiveText; - Attributes::OutOfService::TypeInfo::DecodableType outOfService = static_cast(0); - Attributes::Polarity::TypeInfo::DecodableType polarity = static_cast(0); - Attributes::PresentValue::TypeInfo::DecodableType presentValue = static_cast(0); - Attributes::Reliability::TypeInfo::DecodableType reliability = static_cast(0); - Attributes::StatusFlags::TypeInfo::DecodableType statusFlags = static_cast(0); - Attributes::ApplicationType::TypeInfo::DecodableType applicationType = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace BinaryInputBasic namespace PulseWidthModulation { namespace Attributes { @@ -28124,273 +27860,6 @@ struct TypeInfo }; } // namespace Attributes } // namespace WindowCovering -namespace BarrierControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace BarrierControlGoToPercent { -struct Type; -struct DecodableType; -} // namespace BarrierControlGoToPercent - -namespace BarrierControlStop { -struct Type; -struct DecodableType; -} // namespace BarrierControlStop - -} // namespace Commands - -namespace Commands { -namespace BarrierControlGoToPercent { -enum class Fields : uint8_t -{ - kPercentOpen = 0, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - - uint8_t percentOpen = static_cast(0); - - 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::BarrierControlGoToPercent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - - uint8_t percentOpen = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace BarrierControlGoToPercent -namespace BarrierControlStop { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - - 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::BarrierControlStop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace BarrierControlStop -} // namespace Commands - -namespace Attributes { - -namespace BarrierMovingState { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierMovingState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierMovingState -namespace BarrierSafetyStatus { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierSafetyStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierSafetyStatus -namespace BarrierCapabilities { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCapabilities::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierCapabilities -namespace BarrierOpenEvents { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierOpenEvents -namespace BarrierCloseEvents { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCloseEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierCloseEvents -namespace BarrierCommandOpenEvents { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandOpenEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierCommandOpenEvents -namespace BarrierCommandCloseEvents { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandCloseEvents::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierCommandCloseEvents -namespace BarrierOpenPeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenPeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierOpenPeriod -namespace BarrierClosePeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierClosePeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierClosePeriod -namespace BarrierPosition { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierPosition::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace BarrierPosition -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState = static_cast(0); - Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus = static_cast(0); - Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities = static_cast(0); - Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents = static_cast(0); - Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents = static_cast(0); - Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents = static_cast(0); - Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents = static_cast(0); - Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod = static_cast(0); - Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod = static_cast(0); - Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace BarrierControl namespace ServiceArea { namespace Structs { namespace LandmarkInfoStruct { @@ -42174,1928 +41643,6 @@ struct DecodableType } // namespace CommissioningRequestResult } // namespace Events } // namespace CommissionerControl -namespace ElectricalMeasurement { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace GetProfileInfoResponseCommand { -struct Type; -struct DecodableType; -} // namespace GetProfileInfoResponseCommand - -namespace GetProfileInfoCommand { -struct Type; -struct DecodableType; -} // namespace GetProfileInfoCommand - -namespace GetMeasurementProfileResponseCommand { -struct Type; -struct DecodableType; -} // namespace GetMeasurementProfileResponseCommand - -namespace GetMeasurementProfileCommand { -struct Type; -struct DecodableType; -} // namespace GetMeasurementProfileCommand - -} // namespace Commands - -namespace Commands { -namespace GetProfileInfoResponseCommand { -enum class Fields : uint8_t -{ - kProfileCount = 0, - kProfileIntervalPeriod = 1, - kMaxNumberOfIntervals = 2, - kListOfAttributes = 3, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetProfileInfoResponseCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - uint8_t profileCount = static_cast(0); - uint8_t profileIntervalPeriod = static_cast(0); - uint8_t maxNumberOfIntervals = static_cast(0); - DataModel::List listOfAttributes; - - 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::GetProfileInfoResponseCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - uint8_t profileCount = static_cast(0); - uint8_t profileIntervalPeriod = static_cast(0); - uint8_t maxNumberOfIntervals = static_cast(0); - DataModel::DecodableList listOfAttributes; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetProfileInfoResponseCommand -namespace GetProfileInfoCommand { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetProfileInfoCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - 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::GetProfileInfoCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetProfileInfoCommand -namespace GetMeasurementProfileResponseCommand { -enum class Fields : uint8_t -{ - kStartTime = 0, - kStatus = 1, - kProfileIntervalPeriod = 2, - kNumberOfIntervalsDelivered = 3, - kAttributeId = 4, - kIntervals = 5, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetMeasurementProfileResponseCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - uint32_t startTime = static_cast(0); - uint8_t status = static_cast(0); - uint8_t profileIntervalPeriod = static_cast(0); - uint8_t numberOfIntervalsDelivered = static_cast(0); - uint16_t attributeId = static_cast(0); - DataModel::List intervals; - - 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::GetMeasurementProfileResponseCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - uint32_t startTime = static_cast(0); - uint8_t status = static_cast(0); - uint8_t profileIntervalPeriod = static_cast(0); - uint8_t numberOfIntervalsDelivered = static_cast(0); - uint16_t attributeId = static_cast(0); - DataModel::DecodableList intervals; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetMeasurementProfileResponseCommand -namespace GetMeasurementProfileCommand { -enum class Fields : uint8_t -{ - kAttributeId = 0, - kStartTime = 1, - kNumberOfIntervals = 2, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetMeasurementProfileCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - uint16_t attributeId = static_cast(0); - uint32_t startTime = static_cast(0); - uint8_t numberOfIntervals = static_cast(0); - - 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::GetMeasurementProfileCommand::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - uint16_t attributeId = static_cast(0); - uint32_t startTime = static_cast(0); - uint8_t numberOfIntervals = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetMeasurementProfileCommand -} // namespace Commands - -namespace Attributes { - -namespace MeasurementType { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasurementType::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasurementType -namespace DcVoltage { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcVoltage -namespace DcVoltageMin { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcVoltageMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcVoltageMin -namespace DcVoltageMax { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcVoltageMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcVoltageMax -namespace DcCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcCurrent -namespace DcCurrentMin { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcCurrentMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcCurrentMin -namespace DcCurrentMax { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcCurrentMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcCurrentMax -namespace DcPower { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcPower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcPower -namespace DcPowerMin { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcPowerMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcPowerMin -namespace DcPowerMax { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcPowerMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcPowerMax -namespace DcVoltageMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcVoltageMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcVoltageMultiplier -namespace DcVoltageDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcVoltageDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcVoltageDivisor -namespace DcCurrentMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcCurrentMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcCurrentMultiplier -namespace DcCurrentDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcCurrentDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcCurrentDivisor -namespace DcPowerMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcPowerMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcPowerMultiplier -namespace DcPowerDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DcPowerDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace DcPowerDivisor -namespace AcFrequency { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcFrequency::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcFrequency -namespace AcFrequencyMin { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcFrequencyMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcFrequencyMin -namespace AcFrequencyMax { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcFrequencyMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcFrequencyMax -namespace NeutralCurrent { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NeutralCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace NeutralCurrent -namespace TotalActivePower { -struct TypeInfo -{ - using Type = int32_t; - using DecodableType = int32_t; - using DecodableArgType = int32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TotalActivePower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TotalActivePower -namespace TotalReactivePower { -struct TypeInfo -{ - using Type = int32_t; - using DecodableType = int32_t; - using DecodableArgType = int32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TotalReactivePower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TotalReactivePower -namespace TotalApparentPower { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TotalApparentPower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TotalApparentPower -namespace Measured1stHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Measured1stHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Measured1stHarmonicCurrent -namespace Measured3rdHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Measured3rdHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Measured3rdHarmonicCurrent -namespace Measured5thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Measured5thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Measured5thHarmonicCurrent -namespace Measured7thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Measured7thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Measured7thHarmonicCurrent -namespace Measured9thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Measured9thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Measured9thHarmonicCurrent -namespace Measured11thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Measured11thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Measured11thHarmonicCurrent -namespace MeasuredPhase1stHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredPhase1stHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredPhase1stHarmonicCurrent -namespace MeasuredPhase3rdHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredPhase3rdHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredPhase3rdHarmonicCurrent -namespace MeasuredPhase5thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredPhase5thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredPhase5thHarmonicCurrent -namespace MeasuredPhase7thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredPhase7thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredPhase7thHarmonicCurrent -namespace MeasuredPhase9thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredPhase9thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredPhase9thHarmonicCurrent -namespace MeasuredPhase11thHarmonicCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MeasuredPhase11thHarmonicCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MeasuredPhase11thHarmonicCurrent -namespace AcFrequencyMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcFrequencyMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcFrequencyMultiplier -namespace AcFrequencyDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcFrequencyDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcFrequencyDivisor -namespace PowerMultiplier { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerMultiplier -namespace PowerDivisor { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerDivisor -namespace HarmonicCurrentMultiplier { -struct TypeInfo -{ - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HarmonicCurrentMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace HarmonicCurrentMultiplier -namespace PhaseHarmonicCurrentMultiplier { -struct TypeInfo -{ - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhaseHarmonicCurrentMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PhaseHarmonicCurrentMultiplier -namespace InstantaneousVoltage { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstantaneousVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace InstantaneousVoltage -namespace InstantaneousLineCurrent { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstantaneousLineCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace InstantaneousLineCurrent -namespace InstantaneousActiveCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstantaneousActiveCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace InstantaneousActiveCurrent -namespace InstantaneousReactiveCurrent { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstantaneousReactiveCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace InstantaneousReactiveCurrent -namespace InstantaneousPower { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstantaneousPower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace InstantaneousPower -namespace RmsVoltage { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltage -namespace RmsVoltageMin { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageMin -namespace RmsVoltageMax { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageMax -namespace RmsCurrent { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrent -namespace RmsCurrentMin { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentMin -namespace RmsCurrentMax { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentMax -namespace ActivePower { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePower -namespace ActivePowerMin { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerMin::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerMin -namespace ActivePowerMax { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerMax::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerMax -namespace ReactivePower { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ReactivePower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ReactivePower -namespace ApparentPower { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApparentPower::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ApparentPower -namespace PowerFactor { -struct TypeInfo -{ - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerFactor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerFactor -namespace AverageRmsVoltageMeasurementPeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsVoltageMeasurementPeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsVoltageMeasurementPeriod -namespace AverageRmsUnderVoltageCounter { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsUnderVoltageCounter::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsUnderVoltageCounter -namespace RmsExtremeOverVoltagePeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeOverVoltagePeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeOverVoltagePeriod -namespace RmsExtremeUnderVoltagePeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeUnderVoltagePeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeUnderVoltagePeriod -namespace RmsVoltageSagPeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSagPeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSagPeriod -namespace RmsVoltageSwellPeriod { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSwellPeriod::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSwellPeriod -namespace AcVoltageMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcVoltageMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcVoltageMultiplier -namespace AcVoltageDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcVoltageDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcVoltageDivisor -namespace AcCurrentMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcCurrentMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcCurrentMultiplier -namespace AcCurrentDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcCurrentDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcCurrentDivisor -namespace AcPowerMultiplier { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcPowerMultiplier::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcPowerMultiplier -namespace AcPowerDivisor { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcPowerDivisor::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcPowerDivisor -namespace OverloadAlarmsMask { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OverloadAlarmsMask::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace OverloadAlarmsMask -namespace VoltageOverload { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::VoltageOverload::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace VoltageOverload -namespace CurrentOverload { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentOverload::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentOverload -namespace AcOverloadAlarmsMask { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcOverloadAlarmsMask::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcOverloadAlarmsMask -namespace AcVoltageOverload { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcVoltageOverload::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcVoltageOverload -namespace AcCurrentOverload { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcCurrentOverload::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcCurrentOverload -namespace AcActivePowerOverload { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcActivePowerOverload::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcActivePowerOverload -namespace AcReactivePowerOverload { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AcReactivePowerOverload::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AcReactivePowerOverload -namespace AverageRmsOverVoltage { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsOverVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsOverVoltage -namespace AverageRmsUnderVoltage { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsUnderVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsUnderVoltage -namespace RmsExtremeOverVoltage { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeOverVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeOverVoltage -namespace RmsExtremeUnderVoltage { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeUnderVoltage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeUnderVoltage -namespace RmsVoltageSag { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSag::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSag -namespace RmsVoltageSwell { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSwell::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSwell -namespace LineCurrentPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LineCurrentPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace LineCurrentPhaseB -namespace ActiveCurrentPhaseB { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveCurrentPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveCurrentPhaseB -namespace ReactiveCurrentPhaseB { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ReactiveCurrentPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ReactiveCurrentPhaseB -namespace RmsVoltagePhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltagePhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltagePhaseB -namespace RmsVoltageMinPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageMinPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageMinPhaseB -namespace RmsVoltageMaxPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageMaxPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageMaxPhaseB -namespace RmsCurrentPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentPhaseB -namespace RmsCurrentMinPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentMinPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentMinPhaseB -namespace RmsCurrentMaxPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentMaxPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentMaxPhaseB -namespace ActivePowerPhaseB { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerPhaseB -namespace ActivePowerMinPhaseB { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerMinPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerMinPhaseB -namespace ActivePowerMaxPhaseB { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerMaxPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerMaxPhaseB -namespace ReactivePowerPhaseB { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ReactivePowerPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ReactivePowerPhaseB -namespace ApparentPowerPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApparentPowerPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ApparentPowerPhaseB -namespace PowerFactorPhaseB { -struct TypeInfo -{ - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerFactorPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerFactorPhaseB -namespace AverageRmsVoltageMeasurementPeriodPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsVoltageMeasurementPeriodPhaseB -namespace AverageRmsOverVoltageCounterPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsOverVoltageCounterPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsOverVoltageCounterPhaseB -namespace AverageRmsUnderVoltageCounterPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsUnderVoltageCounterPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsUnderVoltageCounterPhaseB -namespace RmsExtremeOverVoltagePeriodPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeOverVoltagePeriodPhaseB -namespace RmsExtremeUnderVoltagePeriodPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeUnderVoltagePeriodPhaseB -namespace RmsVoltageSagPeriodPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSagPeriodPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSagPeriodPhaseB -namespace RmsVoltageSwellPeriodPhaseB { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSwellPeriodPhaseB::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSwellPeriodPhaseB -namespace LineCurrentPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LineCurrentPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace LineCurrentPhaseC -namespace ActiveCurrentPhaseC { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveCurrentPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActiveCurrentPhaseC -namespace ReactiveCurrentPhaseC { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ReactiveCurrentPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ReactiveCurrentPhaseC -namespace RmsVoltagePhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltagePhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltagePhaseC -namespace RmsVoltageMinPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageMinPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageMinPhaseC -namespace RmsVoltageMaxPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageMaxPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageMaxPhaseC -namespace RmsCurrentPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentPhaseC -namespace RmsCurrentMinPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentMinPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentMinPhaseC -namespace RmsCurrentMaxPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsCurrentMaxPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsCurrentMaxPhaseC -namespace ActivePowerPhaseC { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerPhaseC -namespace ActivePowerMinPhaseC { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerMinPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerMinPhaseC -namespace ActivePowerMaxPhaseC { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActivePowerMaxPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ActivePowerMaxPhaseC -namespace ReactivePowerPhaseC { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ReactivePowerPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ReactivePowerPhaseC -namespace ApparentPowerPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ApparentPowerPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace ApparentPowerPhaseC -namespace PowerFactorPhaseC { -struct TypeInfo -{ - using Type = int8_t; - using DecodableType = int8_t; - using DecodableArgType = int8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerFactorPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PowerFactorPhaseC -namespace AverageRmsVoltageMeasurementPeriodPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsVoltageMeasurementPeriodPhaseC -namespace AverageRmsOverVoltageCounterPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsOverVoltageCounterPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsOverVoltageCounterPhaseC -namespace AverageRmsUnderVoltageCounterPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageRmsUnderVoltageCounterPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageRmsUnderVoltageCounterPhaseC -namespace RmsExtremeOverVoltagePeriodPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeOverVoltagePeriodPhaseC -namespace RmsExtremeUnderVoltagePeriodPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsExtremeUnderVoltagePeriodPhaseC -namespace RmsVoltageSagPeriodPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSagPeriodPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSagPeriodPhaseC -namespace RmsVoltageSwellPeriodPhaseC { -struct TypeInfo -{ - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RmsVoltageSwellPeriodPhaseC::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RmsVoltageSwellPeriodPhaseC -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ElectricalMeasurement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - - Attributes::MeasurementType::TypeInfo::DecodableType measurementType = static_cast(0); - Attributes::DcVoltage::TypeInfo::DecodableType dcVoltage = static_cast(0); - Attributes::DcVoltageMin::TypeInfo::DecodableType dcVoltageMin = static_cast(0); - Attributes::DcVoltageMax::TypeInfo::DecodableType dcVoltageMax = static_cast(0); - Attributes::DcCurrent::TypeInfo::DecodableType dcCurrent = static_cast(0); - Attributes::DcCurrentMin::TypeInfo::DecodableType dcCurrentMin = static_cast(0); - Attributes::DcCurrentMax::TypeInfo::DecodableType dcCurrentMax = static_cast(0); - Attributes::DcPower::TypeInfo::DecodableType dcPower = static_cast(0); - Attributes::DcPowerMin::TypeInfo::DecodableType dcPowerMin = static_cast(0); - Attributes::DcPowerMax::TypeInfo::DecodableType dcPowerMax = static_cast(0); - Attributes::DcVoltageMultiplier::TypeInfo::DecodableType dcVoltageMultiplier = static_cast(0); - Attributes::DcVoltageDivisor::TypeInfo::DecodableType dcVoltageDivisor = static_cast(0); - Attributes::DcCurrentMultiplier::TypeInfo::DecodableType dcCurrentMultiplier = static_cast(0); - Attributes::DcCurrentDivisor::TypeInfo::DecodableType dcCurrentDivisor = static_cast(0); - Attributes::DcPowerMultiplier::TypeInfo::DecodableType dcPowerMultiplier = static_cast(0); - Attributes::DcPowerDivisor::TypeInfo::DecodableType dcPowerDivisor = static_cast(0); - Attributes::AcFrequency::TypeInfo::DecodableType acFrequency = static_cast(0); - Attributes::AcFrequencyMin::TypeInfo::DecodableType acFrequencyMin = static_cast(0); - Attributes::AcFrequencyMax::TypeInfo::DecodableType acFrequencyMax = static_cast(0); - Attributes::NeutralCurrent::TypeInfo::DecodableType neutralCurrent = static_cast(0); - Attributes::TotalActivePower::TypeInfo::DecodableType totalActivePower = static_cast(0); - Attributes::TotalReactivePower::TypeInfo::DecodableType totalReactivePower = static_cast(0); - Attributes::TotalApparentPower::TypeInfo::DecodableType totalApparentPower = static_cast(0); - Attributes::Measured1stHarmonicCurrent::TypeInfo::DecodableType measured1stHarmonicCurrent = static_cast(0); - Attributes::Measured3rdHarmonicCurrent::TypeInfo::DecodableType measured3rdHarmonicCurrent = static_cast(0); - Attributes::Measured5thHarmonicCurrent::TypeInfo::DecodableType measured5thHarmonicCurrent = static_cast(0); - Attributes::Measured7thHarmonicCurrent::TypeInfo::DecodableType measured7thHarmonicCurrent = static_cast(0); - Attributes::Measured9thHarmonicCurrent::TypeInfo::DecodableType measured9thHarmonicCurrent = static_cast(0); - Attributes::Measured11thHarmonicCurrent::TypeInfo::DecodableType measured11thHarmonicCurrent = static_cast(0); - Attributes::MeasuredPhase1stHarmonicCurrent::TypeInfo::DecodableType measuredPhase1stHarmonicCurrent = - static_cast(0); - Attributes::MeasuredPhase3rdHarmonicCurrent::TypeInfo::DecodableType measuredPhase3rdHarmonicCurrent = - static_cast(0); - Attributes::MeasuredPhase5thHarmonicCurrent::TypeInfo::DecodableType measuredPhase5thHarmonicCurrent = - static_cast(0); - Attributes::MeasuredPhase7thHarmonicCurrent::TypeInfo::DecodableType measuredPhase7thHarmonicCurrent = - static_cast(0); - Attributes::MeasuredPhase9thHarmonicCurrent::TypeInfo::DecodableType measuredPhase9thHarmonicCurrent = - static_cast(0); - Attributes::MeasuredPhase11thHarmonicCurrent::TypeInfo::DecodableType measuredPhase11thHarmonicCurrent = - static_cast(0); - Attributes::AcFrequencyMultiplier::TypeInfo::DecodableType acFrequencyMultiplier = static_cast(0); - Attributes::AcFrequencyDivisor::TypeInfo::DecodableType acFrequencyDivisor = static_cast(0); - Attributes::PowerMultiplier::TypeInfo::DecodableType powerMultiplier = static_cast(0); - Attributes::PowerDivisor::TypeInfo::DecodableType powerDivisor = static_cast(0); - Attributes::HarmonicCurrentMultiplier::TypeInfo::DecodableType harmonicCurrentMultiplier = static_cast(0); - Attributes::PhaseHarmonicCurrentMultiplier::TypeInfo::DecodableType phaseHarmonicCurrentMultiplier = static_cast(0); - Attributes::InstantaneousVoltage::TypeInfo::DecodableType instantaneousVoltage = static_cast(0); - Attributes::InstantaneousLineCurrent::TypeInfo::DecodableType instantaneousLineCurrent = static_cast(0); - Attributes::InstantaneousActiveCurrent::TypeInfo::DecodableType instantaneousActiveCurrent = static_cast(0); - Attributes::InstantaneousReactiveCurrent::TypeInfo::DecodableType instantaneousReactiveCurrent = static_cast(0); - Attributes::InstantaneousPower::TypeInfo::DecodableType instantaneousPower = static_cast(0); - Attributes::RmsVoltage::TypeInfo::DecodableType rmsVoltage = static_cast(0); - Attributes::RmsVoltageMin::TypeInfo::DecodableType rmsVoltageMin = static_cast(0); - Attributes::RmsVoltageMax::TypeInfo::DecodableType rmsVoltageMax = static_cast(0); - Attributes::RmsCurrent::TypeInfo::DecodableType rmsCurrent = static_cast(0); - Attributes::RmsCurrentMin::TypeInfo::DecodableType rmsCurrentMin = static_cast(0); - Attributes::RmsCurrentMax::TypeInfo::DecodableType rmsCurrentMax = static_cast(0); - Attributes::ActivePower::TypeInfo::DecodableType activePower = static_cast(0); - Attributes::ActivePowerMin::TypeInfo::DecodableType activePowerMin = static_cast(0); - Attributes::ActivePowerMax::TypeInfo::DecodableType activePowerMax = static_cast(0); - Attributes::ReactivePower::TypeInfo::DecodableType reactivePower = static_cast(0); - Attributes::ApparentPower::TypeInfo::DecodableType apparentPower = static_cast(0); - Attributes::PowerFactor::TypeInfo::DecodableType powerFactor = static_cast(0); - Attributes::AverageRmsVoltageMeasurementPeriod::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriod = - static_cast(0); - Attributes::AverageRmsUnderVoltageCounter::TypeInfo::DecodableType averageRmsUnderVoltageCounter = static_cast(0); - Attributes::RmsExtremeOverVoltagePeriod::TypeInfo::DecodableType rmsExtremeOverVoltagePeriod = static_cast(0); - Attributes::RmsExtremeUnderVoltagePeriod::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriod = static_cast(0); - Attributes::RmsVoltageSagPeriod::TypeInfo::DecodableType rmsVoltageSagPeriod = static_cast(0); - Attributes::RmsVoltageSwellPeriod::TypeInfo::DecodableType rmsVoltageSwellPeriod = static_cast(0); - Attributes::AcVoltageMultiplier::TypeInfo::DecodableType acVoltageMultiplier = static_cast(0); - Attributes::AcVoltageDivisor::TypeInfo::DecodableType acVoltageDivisor = static_cast(0); - Attributes::AcCurrentMultiplier::TypeInfo::DecodableType acCurrentMultiplier = static_cast(0); - Attributes::AcCurrentDivisor::TypeInfo::DecodableType acCurrentDivisor = static_cast(0); - Attributes::AcPowerMultiplier::TypeInfo::DecodableType acPowerMultiplier = static_cast(0); - Attributes::AcPowerDivisor::TypeInfo::DecodableType acPowerDivisor = static_cast(0); - Attributes::OverloadAlarmsMask::TypeInfo::DecodableType overloadAlarmsMask = static_cast(0); - Attributes::VoltageOverload::TypeInfo::DecodableType voltageOverload = static_cast(0); - Attributes::CurrentOverload::TypeInfo::DecodableType currentOverload = static_cast(0); - Attributes::AcOverloadAlarmsMask::TypeInfo::DecodableType acOverloadAlarmsMask = static_cast(0); - Attributes::AcVoltageOverload::TypeInfo::DecodableType acVoltageOverload = static_cast(0); - Attributes::AcCurrentOverload::TypeInfo::DecodableType acCurrentOverload = static_cast(0); - Attributes::AcActivePowerOverload::TypeInfo::DecodableType acActivePowerOverload = static_cast(0); - Attributes::AcReactivePowerOverload::TypeInfo::DecodableType acReactivePowerOverload = static_cast(0); - Attributes::AverageRmsOverVoltage::TypeInfo::DecodableType averageRmsOverVoltage = static_cast(0); - Attributes::AverageRmsUnderVoltage::TypeInfo::DecodableType averageRmsUnderVoltage = static_cast(0); - Attributes::RmsExtremeOverVoltage::TypeInfo::DecodableType rmsExtremeOverVoltage = static_cast(0); - Attributes::RmsExtremeUnderVoltage::TypeInfo::DecodableType rmsExtremeUnderVoltage = static_cast(0); - Attributes::RmsVoltageSag::TypeInfo::DecodableType rmsVoltageSag = static_cast(0); - Attributes::RmsVoltageSwell::TypeInfo::DecodableType rmsVoltageSwell = static_cast(0); - Attributes::LineCurrentPhaseB::TypeInfo::DecodableType lineCurrentPhaseB = static_cast(0); - Attributes::ActiveCurrentPhaseB::TypeInfo::DecodableType activeCurrentPhaseB = static_cast(0); - Attributes::ReactiveCurrentPhaseB::TypeInfo::DecodableType reactiveCurrentPhaseB = static_cast(0); - Attributes::RmsVoltagePhaseB::TypeInfo::DecodableType rmsVoltagePhaseB = static_cast(0); - Attributes::RmsVoltageMinPhaseB::TypeInfo::DecodableType rmsVoltageMinPhaseB = static_cast(0); - Attributes::RmsVoltageMaxPhaseB::TypeInfo::DecodableType rmsVoltageMaxPhaseB = static_cast(0); - Attributes::RmsCurrentPhaseB::TypeInfo::DecodableType rmsCurrentPhaseB = static_cast(0); - Attributes::RmsCurrentMinPhaseB::TypeInfo::DecodableType rmsCurrentMinPhaseB = static_cast(0); - Attributes::RmsCurrentMaxPhaseB::TypeInfo::DecodableType rmsCurrentMaxPhaseB = static_cast(0); - Attributes::ActivePowerPhaseB::TypeInfo::DecodableType activePowerPhaseB = static_cast(0); - Attributes::ActivePowerMinPhaseB::TypeInfo::DecodableType activePowerMinPhaseB = static_cast(0); - Attributes::ActivePowerMaxPhaseB::TypeInfo::DecodableType activePowerMaxPhaseB = static_cast(0); - Attributes::ReactivePowerPhaseB::TypeInfo::DecodableType reactivePowerPhaseB = static_cast(0); - Attributes::ApparentPowerPhaseB::TypeInfo::DecodableType apparentPowerPhaseB = static_cast(0); - Attributes::PowerFactorPhaseB::TypeInfo::DecodableType powerFactorPhaseB = static_cast(0); - Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriodPhaseB = - static_cast(0); - Attributes::AverageRmsOverVoltageCounterPhaseB::TypeInfo::DecodableType averageRmsOverVoltageCounterPhaseB = - static_cast(0); - Attributes::AverageRmsUnderVoltageCounterPhaseB::TypeInfo::DecodableType averageRmsUnderVoltageCounterPhaseB = - static_cast(0); - Attributes::RmsExtremeOverVoltagePeriodPhaseB::TypeInfo::DecodableType rmsExtremeOverVoltagePeriodPhaseB = - static_cast(0); - Attributes::RmsExtremeUnderVoltagePeriodPhaseB::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriodPhaseB = - static_cast(0); - Attributes::RmsVoltageSagPeriodPhaseB::TypeInfo::DecodableType rmsVoltageSagPeriodPhaseB = static_cast(0); - Attributes::RmsVoltageSwellPeriodPhaseB::TypeInfo::DecodableType rmsVoltageSwellPeriodPhaseB = static_cast(0); - Attributes::LineCurrentPhaseC::TypeInfo::DecodableType lineCurrentPhaseC = static_cast(0); - Attributes::ActiveCurrentPhaseC::TypeInfo::DecodableType activeCurrentPhaseC = static_cast(0); - Attributes::ReactiveCurrentPhaseC::TypeInfo::DecodableType reactiveCurrentPhaseC = static_cast(0); - Attributes::RmsVoltagePhaseC::TypeInfo::DecodableType rmsVoltagePhaseC = static_cast(0); - Attributes::RmsVoltageMinPhaseC::TypeInfo::DecodableType rmsVoltageMinPhaseC = static_cast(0); - Attributes::RmsVoltageMaxPhaseC::TypeInfo::DecodableType rmsVoltageMaxPhaseC = static_cast(0); - Attributes::RmsCurrentPhaseC::TypeInfo::DecodableType rmsCurrentPhaseC = static_cast(0); - Attributes::RmsCurrentMinPhaseC::TypeInfo::DecodableType rmsCurrentMinPhaseC = static_cast(0); - Attributes::RmsCurrentMaxPhaseC::TypeInfo::DecodableType rmsCurrentMaxPhaseC = static_cast(0); - Attributes::ActivePowerPhaseC::TypeInfo::DecodableType activePowerPhaseC = static_cast(0); - Attributes::ActivePowerMinPhaseC::TypeInfo::DecodableType activePowerMinPhaseC = static_cast(0); - Attributes::ActivePowerMaxPhaseC::TypeInfo::DecodableType activePowerMaxPhaseC = static_cast(0); - Attributes::ReactivePowerPhaseC::TypeInfo::DecodableType reactivePowerPhaseC = static_cast(0); - Attributes::ApparentPowerPhaseC::TypeInfo::DecodableType apparentPowerPhaseC = static_cast(0); - Attributes::PowerFactorPhaseC::TypeInfo::DecodableType powerFactorPhaseC = static_cast(0); - Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo::DecodableType averageRmsVoltageMeasurementPeriodPhaseC = - static_cast(0); - Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo::DecodableType averageRmsOverVoltageCounterPhaseC = - static_cast(0); - Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo::DecodableType averageRmsUnderVoltageCounterPhaseC = - static_cast(0); - Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo::DecodableType rmsExtremeOverVoltagePeriodPhaseC = - static_cast(0); - Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo::DecodableType rmsExtremeUnderVoltagePeriodPhaseC = - static_cast(0); - Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo::DecodableType rmsVoltageSagPeriodPhaseC = static_cast(0); - Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo::DecodableType rmsVoltageSwellPeriodPhaseC = static_cast(0); - Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; - Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; - Attributes::EventList::TypeInfo::DecodableType eventList; - Attributes::AttributeList::TypeInfo::DecodableType attributeList; - Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); - Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); - }; -}; -} // namespace Attributes -} // namespace ElectricalMeasurement 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 6e19a4c970df77..20e4ea7c9fd82a 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 @@ -177,44 +177,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace OnOff -namespace OnOffSwitchConfiguration { -namespace Attributes { - -namespace SwitchType { -static constexpr AttributeId Id = 0x00000000; -} // namespace SwitchType - -namespace SwitchActions { -static constexpr AttributeId Id = 0x00000010; -} // namespace SwitchActions - -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 EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - -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 OnOffSwitchConfiguration - namespace LevelControl { namespace Attributes { @@ -301,72 +263,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace LevelControl -namespace BinaryInputBasic { -namespace Attributes { - -namespace ActiveText { -static constexpr AttributeId Id = 0x00000004; -} // namespace ActiveText - -namespace Description { -static constexpr AttributeId Id = 0x0000001C; -} // namespace Description - -namespace InactiveText { -static constexpr AttributeId Id = 0x0000002E; -} // namespace InactiveText - -namespace OutOfService { -static constexpr AttributeId Id = 0x00000051; -} // namespace OutOfService - -namespace Polarity { -static constexpr AttributeId Id = 0x00000054; -} // namespace Polarity - -namespace PresentValue { -static constexpr AttributeId Id = 0x00000055; -} // namespace PresentValue - -namespace Reliability { -static constexpr AttributeId Id = 0x00000067; -} // namespace Reliability - -namespace StatusFlags { -static constexpr AttributeId Id = 0x0000006F; -} // namespace StatusFlags - -namespace ApplicationType { -static constexpr AttributeId Id = 0x00000100; -} // namespace ApplicationType - -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 EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - -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 BinaryInputBasic - namespace PulseWidthModulation { namespace Attributes { @@ -4725,76 +4621,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace WindowCovering -namespace BarrierControl { -namespace Attributes { - -namespace BarrierMovingState { -static constexpr AttributeId Id = 0x00000001; -} // namespace BarrierMovingState - -namespace BarrierSafetyStatus { -static constexpr AttributeId Id = 0x00000002; -} // namespace BarrierSafetyStatus - -namespace BarrierCapabilities { -static constexpr AttributeId Id = 0x00000003; -} // namespace BarrierCapabilities - -namespace BarrierOpenEvents { -static constexpr AttributeId Id = 0x00000004; -} // namespace BarrierOpenEvents - -namespace BarrierCloseEvents { -static constexpr AttributeId Id = 0x00000005; -} // namespace BarrierCloseEvents - -namespace BarrierCommandOpenEvents { -static constexpr AttributeId Id = 0x00000006; -} // namespace BarrierCommandOpenEvents - -namespace BarrierCommandCloseEvents { -static constexpr AttributeId Id = 0x00000007; -} // namespace BarrierCommandCloseEvents - -namespace BarrierOpenPeriod { -static constexpr AttributeId Id = 0x00000008; -} // namespace BarrierOpenPeriod - -namespace BarrierClosePeriod { -static constexpr AttributeId Id = 0x00000009; -} // namespace BarrierClosePeriod - -namespace BarrierPosition { -static constexpr AttributeId Id = 0x0000000A; -} // namespace BarrierPosition - -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 EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - -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 BarrierControl - namespace ServiceArea { namespace Attributes { @@ -7559,548 +7385,6 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; } // namespace Attributes } // namespace CommissionerControl -namespace ElectricalMeasurement { -namespace Attributes { - -namespace MeasurementType { -static constexpr AttributeId Id = 0x00000000; -} // namespace MeasurementType - -namespace DcVoltage { -static constexpr AttributeId Id = 0x00000100; -} // namespace DcVoltage - -namespace DcVoltageMin { -static constexpr AttributeId Id = 0x00000101; -} // namespace DcVoltageMin - -namespace DcVoltageMax { -static constexpr AttributeId Id = 0x00000102; -} // namespace DcVoltageMax - -namespace DcCurrent { -static constexpr AttributeId Id = 0x00000103; -} // namespace DcCurrent - -namespace DcCurrentMin { -static constexpr AttributeId Id = 0x00000104; -} // namespace DcCurrentMin - -namespace DcCurrentMax { -static constexpr AttributeId Id = 0x00000105; -} // namespace DcCurrentMax - -namespace DcPower { -static constexpr AttributeId Id = 0x00000106; -} // namespace DcPower - -namespace DcPowerMin { -static constexpr AttributeId Id = 0x00000107; -} // namespace DcPowerMin - -namespace DcPowerMax { -static constexpr AttributeId Id = 0x00000108; -} // namespace DcPowerMax - -namespace DcVoltageMultiplier { -static constexpr AttributeId Id = 0x00000200; -} // namespace DcVoltageMultiplier - -namespace DcVoltageDivisor { -static constexpr AttributeId Id = 0x00000201; -} // namespace DcVoltageDivisor - -namespace DcCurrentMultiplier { -static constexpr AttributeId Id = 0x00000202; -} // namespace DcCurrentMultiplier - -namespace DcCurrentDivisor { -static constexpr AttributeId Id = 0x00000203; -} // namespace DcCurrentDivisor - -namespace DcPowerMultiplier { -static constexpr AttributeId Id = 0x00000204; -} // namespace DcPowerMultiplier - -namespace DcPowerDivisor { -static constexpr AttributeId Id = 0x00000205; -} // namespace DcPowerDivisor - -namespace AcFrequency { -static constexpr AttributeId Id = 0x00000300; -} // namespace AcFrequency - -namespace AcFrequencyMin { -static constexpr AttributeId Id = 0x00000301; -} // namespace AcFrequencyMin - -namespace AcFrequencyMax { -static constexpr AttributeId Id = 0x00000302; -} // namespace AcFrequencyMax - -namespace NeutralCurrent { -static constexpr AttributeId Id = 0x00000303; -} // namespace NeutralCurrent - -namespace TotalActivePower { -static constexpr AttributeId Id = 0x00000304; -} // namespace TotalActivePower - -namespace TotalReactivePower { -static constexpr AttributeId Id = 0x00000305; -} // namespace TotalReactivePower - -namespace TotalApparentPower { -static constexpr AttributeId Id = 0x00000306; -} // namespace TotalApparentPower - -namespace Measured1stHarmonicCurrent { -static constexpr AttributeId Id = 0x00000307; -} // namespace Measured1stHarmonicCurrent - -namespace Measured3rdHarmonicCurrent { -static constexpr AttributeId Id = 0x00000308; -} // namespace Measured3rdHarmonicCurrent - -namespace Measured5thHarmonicCurrent { -static constexpr AttributeId Id = 0x00000309; -} // namespace Measured5thHarmonicCurrent - -namespace Measured7thHarmonicCurrent { -static constexpr AttributeId Id = 0x0000030A; -} // namespace Measured7thHarmonicCurrent - -namespace Measured9thHarmonicCurrent { -static constexpr AttributeId Id = 0x0000030B; -} // namespace Measured9thHarmonicCurrent - -namespace Measured11thHarmonicCurrent { -static constexpr AttributeId Id = 0x0000030C; -} // namespace Measured11thHarmonicCurrent - -namespace MeasuredPhase1stHarmonicCurrent { -static constexpr AttributeId Id = 0x0000030D; -} // namespace MeasuredPhase1stHarmonicCurrent - -namespace MeasuredPhase3rdHarmonicCurrent { -static constexpr AttributeId Id = 0x0000030E; -} // namespace MeasuredPhase3rdHarmonicCurrent - -namespace MeasuredPhase5thHarmonicCurrent { -static constexpr AttributeId Id = 0x0000030F; -} // namespace MeasuredPhase5thHarmonicCurrent - -namespace MeasuredPhase7thHarmonicCurrent { -static constexpr AttributeId Id = 0x00000310; -} // namespace MeasuredPhase7thHarmonicCurrent - -namespace MeasuredPhase9thHarmonicCurrent { -static constexpr AttributeId Id = 0x00000311; -} // namespace MeasuredPhase9thHarmonicCurrent - -namespace MeasuredPhase11thHarmonicCurrent { -static constexpr AttributeId Id = 0x00000312; -} // namespace MeasuredPhase11thHarmonicCurrent - -namespace AcFrequencyMultiplier { -static constexpr AttributeId Id = 0x00000400; -} // namespace AcFrequencyMultiplier - -namespace AcFrequencyDivisor { -static constexpr AttributeId Id = 0x00000401; -} // namespace AcFrequencyDivisor - -namespace PowerMultiplier { -static constexpr AttributeId Id = 0x00000402; -} // namespace PowerMultiplier - -namespace PowerDivisor { -static constexpr AttributeId Id = 0x00000403; -} // namespace PowerDivisor - -namespace HarmonicCurrentMultiplier { -static constexpr AttributeId Id = 0x00000404; -} // namespace HarmonicCurrentMultiplier - -namespace PhaseHarmonicCurrentMultiplier { -static constexpr AttributeId Id = 0x00000405; -} // namespace PhaseHarmonicCurrentMultiplier - -namespace InstantaneousVoltage { -static constexpr AttributeId Id = 0x00000500; -} // namespace InstantaneousVoltage - -namespace InstantaneousLineCurrent { -static constexpr AttributeId Id = 0x00000501; -} // namespace InstantaneousLineCurrent - -namespace InstantaneousActiveCurrent { -static constexpr AttributeId Id = 0x00000502; -} // namespace InstantaneousActiveCurrent - -namespace InstantaneousReactiveCurrent { -static constexpr AttributeId Id = 0x00000503; -} // namespace InstantaneousReactiveCurrent - -namespace InstantaneousPower { -static constexpr AttributeId Id = 0x00000504; -} // namespace InstantaneousPower - -namespace RmsVoltage { -static constexpr AttributeId Id = 0x00000505; -} // namespace RmsVoltage - -namespace RmsVoltageMin { -static constexpr AttributeId Id = 0x00000506; -} // namespace RmsVoltageMin - -namespace RmsVoltageMax { -static constexpr AttributeId Id = 0x00000507; -} // namespace RmsVoltageMax - -namespace RmsCurrent { -static constexpr AttributeId Id = 0x00000508; -} // namespace RmsCurrent - -namespace RmsCurrentMin { -static constexpr AttributeId Id = 0x00000509; -} // namespace RmsCurrentMin - -namespace RmsCurrentMax { -static constexpr AttributeId Id = 0x0000050A; -} // namespace RmsCurrentMax - -namespace ActivePower { -static constexpr AttributeId Id = 0x0000050B; -} // namespace ActivePower - -namespace ActivePowerMin { -static constexpr AttributeId Id = 0x0000050C; -} // namespace ActivePowerMin - -namespace ActivePowerMax { -static constexpr AttributeId Id = 0x0000050D; -} // namespace ActivePowerMax - -namespace ReactivePower { -static constexpr AttributeId Id = 0x0000050E; -} // namespace ReactivePower - -namespace ApparentPower { -static constexpr AttributeId Id = 0x0000050F; -} // namespace ApparentPower - -namespace PowerFactor { -static constexpr AttributeId Id = 0x00000510; -} // namespace PowerFactor - -namespace AverageRmsVoltageMeasurementPeriod { -static constexpr AttributeId Id = 0x00000511; -} // namespace AverageRmsVoltageMeasurementPeriod - -namespace AverageRmsUnderVoltageCounter { -static constexpr AttributeId Id = 0x00000513; -} // namespace AverageRmsUnderVoltageCounter - -namespace RmsExtremeOverVoltagePeriod { -static constexpr AttributeId Id = 0x00000514; -} // namespace RmsExtremeOverVoltagePeriod - -namespace RmsExtremeUnderVoltagePeriod { -static constexpr AttributeId Id = 0x00000515; -} // namespace RmsExtremeUnderVoltagePeriod - -namespace RmsVoltageSagPeriod { -static constexpr AttributeId Id = 0x00000516; -} // namespace RmsVoltageSagPeriod - -namespace RmsVoltageSwellPeriod { -static constexpr AttributeId Id = 0x00000517; -} // namespace RmsVoltageSwellPeriod - -namespace AcVoltageMultiplier { -static constexpr AttributeId Id = 0x00000600; -} // namespace AcVoltageMultiplier - -namespace AcVoltageDivisor { -static constexpr AttributeId Id = 0x00000601; -} // namespace AcVoltageDivisor - -namespace AcCurrentMultiplier { -static constexpr AttributeId Id = 0x00000602; -} // namespace AcCurrentMultiplier - -namespace AcCurrentDivisor { -static constexpr AttributeId Id = 0x00000603; -} // namespace AcCurrentDivisor - -namespace AcPowerMultiplier { -static constexpr AttributeId Id = 0x00000604; -} // namespace AcPowerMultiplier - -namespace AcPowerDivisor { -static constexpr AttributeId Id = 0x00000605; -} // namespace AcPowerDivisor - -namespace OverloadAlarmsMask { -static constexpr AttributeId Id = 0x00000700; -} // namespace OverloadAlarmsMask - -namespace VoltageOverload { -static constexpr AttributeId Id = 0x00000701; -} // namespace VoltageOverload - -namespace CurrentOverload { -static constexpr AttributeId Id = 0x00000702; -} // namespace CurrentOverload - -namespace AcOverloadAlarmsMask { -static constexpr AttributeId Id = 0x00000800; -} // namespace AcOverloadAlarmsMask - -namespace AcVoltageOverload { -static constexpr AttributeId Id = 0x00000801; -} // namespace AcVoltageOverload - -namespace AcCurrentOverload { -static constexpr AttributeId Id = 0x00000802; -} // namespace AcCurrentOverload - -namespace AcActivePowerOverload { -static constexpr AttributeId Id = 0x00000803; -} // namespace AcActivePowerOverload - -namespace AcReactivePowerOverload { -static constexpr AttributeId Id = 0x00000804; -} // namespace AcReactivePowerOverload - -namespace AverageRmsOverVoltage { -static constexpr AttributeId Id = 0x00000805; -} // namespace AverageRmsOverVoltage - -namespace AverageRmsUnderVoltage { -static constexpr AttributeId Id = 0x00000806; -} // namespace AverageRmsUnderVoltage - -namespace RmsExtremeOverVoltage { -static constexpr AttributeId Id = 0x00000807; -} // namespace RmsExtremeOverVoltage - -namespace RmsExtremeUnderVoltage { -static constexpr AttributeId Id = 0x00000808; -} // namespace RmsExtremeUnderVoltage - -namespace RmsVoltageSag { -static constexpr AttributeId Id = 0x00000809; -} // namespace RmsVoltageSag - -namespace RmsVoltageSwell { -static constexpr AttributeId Id = 0x0000080A; -} // namespace RmsVoltageSwell - -namespace LineCurrentPhaseB { -static constexpr AttributeId Id = 0x00000901; -} // namespace LineCurrentPhaseB - -namespace ActiveCurrentPhaseB { -static constexpr AttributeId Id = 0x00000902; -} // namespace ActiveCurrentPhaseB - -namespace ReactiveCurrentPhaseB { -static constexpr AttributeId Id = 0x00000903; -} // namespace ReactiveCurrentPhaseB - -namespace RmsVoltagePhaseB { -static constexpr AttributeId Id = 0x00000905; -} // namespace RmsVoltagePhaseB - -namespace RmsVoltageMinPhaseB { -static constexpr AttributeId Id = 0x00000906; -} // namespace RmsVoltageMinPhaseB - -namespace RmsVoltageMaxPhaseB { -static constexpr AttributeId Id = 0x00000907; -} // namespace RmsVoltageMaxPhaseB - -namespace RmsCurrentPhaseB { -static constexpr AttributeId Id = 0x00000908; -} // namespace RmsCurrentPhaseB - -namespace RmsCurrentMinPhaseB { -static constexpr AttributeId Id = 0x00000909; -} // namespace RmsCurrentMinPhaseB - -namespace RmsCurrentMaxPhaseB { -static constexpr AttributeId Id = 0x0000090A; -} // namespace RmsCurrentMaxPhaseB - -namespace ActivePowerPhaseB { -static constexpr AttributeId Id = 0x0000090B; -} // namespace ActivePowerPhaseB - -namespace ActivePowerMinPhaseB { -static constexpr AttributeId Id = 0x0000090C; -} // namespace ActivePowerMinPhaseB - -namespace ActivePowerMaxPhaseB { -static constexpr AttributeId Id = 0x0000090D; -} // namespace ActivePowerMaxPhaseB - -namespace ReactivePowerPhaseB { -static constexpr AttributeId Id = 0x0000090E; -} // namespace ReactivePowerPhaseB - -namespace ApparentPowerPhaseB { -static constexpr AttributeId Id = 0x0000090F; -} // namespace ApparentPowerPhaseB - -namespace PowerFactorPhaseB { -static constexpr AttributeId Id = 0x00000910; -} // namespace PowerFactorPhaseB - -namespace AverageRmsVoltageMeasurementPeriodPhaseB { -static constexpr AttributeId Id = 0x00000911; -} // namespace AverageRmsVoltageMeasurementPeriodPhaseB - -namespace AverageRmsOverVoltageCounterPhaseB { -static constexpr AttributeId Id = 0x00000912; -} // namespace AverageRmsOverVoltageCounterPhaseB - -namespace AverageRmsUnderVoltageCounterPhaseB { -static constexpr AttributeId Id = 0x00000913; -} // namespace AverageRmsUnderVoltageCounterPhaseB - -namespace RmsExtremeOverVoltagePeriodPhaseB { -static constexpr AttributeId Id = 0x00000914; -} // namespace RmsExtremeOverVoltagePeriodPhaseB - -namespace RmsExtremeUnderVoltagePeriodPhaseB { -static constexpr AttributeId Id = 0x00000915; -} // namespace RmsExtremeUnderVoltagePeriodPhaseB - -namespace RmsVoltageSagPeriodPhaseB { -static constexpr AttributeId Id = 0x00000916; -} // namespace RmsVoltageSagPeriodPhaseB - -namespace RmsVoltageSwellPeriodPhaseB { -static constexpr AttributeId Id = 0x00000917; -} // namespace RmsVoltageSwellPeriodPhaseB - -namespace LineCurrentPhaseC { -static constexpr AttributeId Id = 0x00000A01; -} // namespace LineCurrentPhaseC - -namespace ActiveCurrentPhaseC { -static constexpr AttributeId Id = 0x00000A02; -} // namespace ActiveCurrentPhaseC - -namespace ReactiveCurrentPhaseC { -static constexpr AttributeId Id = 0x00000A03; -} // namespace ReactiveCurrentPhaseC - -namespace RmsVoltagePhaseC { -static constexpr AttributeId Id = 0x00000A05; -} // namespace RmsVoltagePhaseC - -namespace RmsVoltageMinPhaseC { -static constexpr AttributeId Id = 0x00000A06; -} // namespace RmsVoltageMinPhaseC - -namespace RmsVoltageMaxPhaseC { -static constexpr AttributeId Id = 0x00000A07; -} // namespace RmsVoltageMaxPhaseC - -namespace RmsCurrentPhaseC { -static constexpr AttributeId Id = 0x00000A08; -} // namespace RmsCurrentPhaseC - -namespace RmsCurrentMinPhaseC { -static constexpr AttributeId Id = 0x00000A09; -} // namespace RmsCurrentMinPhaseC - -namespace RmsCurrentMaxPhaseC { -static constexpr AttributeId Id = 0x00000A0A; -} // namespace RmsCurrentMaxPhaseC - -namespace ActivePowerPhaseC { -static constexpr AttributeId Id = 0x00000A0B; -} // namespace ActivePowerPhaseC - -namespace ActivePowerMinPhaseC { -static constexpr AttributeId Id = 0x00000A0C; -} // namespace ActivePowerMinPhaseC - -namespace ActivePowerMaxPhaseC { -static constexpr AttributeId Id = 0x00000A0D; -} // namespace ActivePowerMaxPhaseC - -namespace ReactivePowerPhaseC { -static constexpr AttributeId Id = 0x00000A0E; -} // namespace ReactivePowerPhaseC - -namespace ApparentPowerPhaseC { -static constexpr AttributeId Id = 0x00000A0F; -} // namespace ApparentPowerPhaseC - -namespace PowerFactorPhaseC { -static constexpr AttributeId Id = 0x00000A10; -} // namespace PowerFactorPhaseC - -namespace AverageRmsVoltageMeasurementPeriodPhaseC { -static constexpr AttributeId Id = 0x00000A11; -} // namespace AverageRmsVoltageMeasurementPeriodPhaseC - -namespace AverageRmsOverVoltageCounterPhaseC { -static constexpr AttributeId Id = 0x00000A12; -} // namespace AverageRmsOverVoltageCounterPhaseC - -namespace AverageRmsUnderVoltageCounterPhaseC { -static constexpr AttributeId Id = 0x00000A13; -} // namespace AverageRmsUnderVoltageCounterPhaseC - -namespace RmsExtremeOverVoltagePeriodPhaseC { -static constexpr AttributeId Id = 0x00000A14; -} // namespace RmsExtremeOverVoltagePeriodPhaseC - -namespace RmsExtremeUnderVoltagePeriodPhaseC { -static constexpr AttributeId Id = 0x00000A15; -} // namespace RmsExtremeUnderVoltagePeriodPhaseC - -namespace RmsVoltageSagPeriodPhaseC { -static constexpr AttributeId Id = 0x00000A16; -} // namespace RmsVoltageSagPeriodPhaseC - -namespace RmsVoltageSwellPeriodPhaseC { -static constexpr AttributeId Id = 0x00000A17; -} // namespace RmsVoltageSwellPeriodPhaseC - -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 EventList { -static constexpr AttributeId Id = Globals::Attributes::EventList::Id; -} // namespace EventList - -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 ElectricalMeasurement - 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 9e5bb87b52ef51..26dd82c18e704e 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 @@ -34,15 +34,9 @@ static constexpr ClusterId Id = 0x00000004; namespace OnOff { static constexpr ClusterId Id = 0x00000006; } // namespace OnOff -namespace OnOffSwitchConfiguration { -static constexpr ClusterId Id = 0x00000007; -} // namespace OnOffSwitchConfiguration namespace LevelControl { static constexpr ClusterId Id = 0x00000008; } // namespace LevelControl -namespace BinaryInputBasic { -static constexpr ClusterId Id = 0x0000000F; -} // namespace BinaryInputBasic namespace PulseWidthModulation { static constexpr ClusterId Id = 0x0000001C; } // namespace PulseWidthModulation @@ -262,9 +256,6 @@ static constexpr ClusterId Id = 0x00000101; namespace WindowCovering { static constexpr ClusterId Id = 0x00000102; } // namespace WindowCovering -namespace BarrierControl { -static constexpr ClusterId Id = 0x00000103; -} // namespace BarrierControl namespace ServiceArea { static constexpr ClusterId Id = 0x00000150; } // namespace ServiceArea @@ -391,9 +382,6 @@ static constexpr ClusterId Id = 0x00000750; namespace CommissionerControl { static constexpr ClusterId Id = 0x00000751; } // namespace CommissionerControl -namespace ElectricalMeasurement { -static constexpr ClusterId Id = 0x00000B04; -} // namespace ElectricalMeasurement 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 36ff7b0f098911..b6cd8158f07d94 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 @@ -1281,20 +1281,6 @@ static constexpr CommandId Id = 0x00000008; } // namespace Commands } // namespace WindowCovering -namespace BarrierControl { -namespace Commands { - -namespace BarrierControlGoToPercent { -static constexpr CommandId Id = 0x00000000; -} // namespace BarrierControlGoToPercent - -namespace BarrierControlStop { -static constexpr CommandId Id = 0x00000001; -} // namespace BarrierControlStop - -} // namespace Commands -} // namespace BarrierControl - namespace ServiceArea { namespace Commands { @@ -1835,28 +1821,6 @@ static constexpr CommandId Id = 0x00000002; } // namespace Commands } // namespace CommissionerControl -namespace ElectricalMeasurement { -namespace Commands { - -namespace GetProfileInfoResponseCommand { -static constexpr CommandId Id = 0x00000000; -} // namespace GetProfileInfoResponseCommand - -namespace GetProfileInfoCommand { -static constexpr CommandId Id = 0x00000000; -} // namespace GetProfileInfoCommand - -namespace GetMeasurementProfileResponseCommand { -static constexpr CommandId Id = 0x00000001; -} // namespace GetMeasurementProfileResponseCommand - -namespace GetMeasurementProfileCommand { -static constexpr CommandId Id = 0x00000001; -} // namespace GetMeasurementProfileCommand - -} // namespace Commands -} // namespace ElectricalMeasurement - namespace UnitTesting { namespace Commands { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index c01a3135dc46bd..2333130d16c13a 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -38,9 +38,7 @@ | Identify | 0x0003 | | Groups | 0x0004 | | OnOff | 0x0006 | -| OnOffSwitchConfiguration | 0x0007 | | LevelControl | 0x0008 | -| BinaryInputBasic | 0x000F | | PulseWidthModulation | 0x001C | | Descriptor | 0x001D | | Binding | 0x001E | @@ -114,7 +112,6 @@ | DeviceEnergyManagementMode | 0x009F | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | -| BarrierControl | 0x0103 | | ServiceArea | 0x0150 | | PumpConfigurationAndControl | 0x0200 | | Thermostat | 0x0201 | @@ -157,7 +154,6 @@ | ContentAppObserver | 0x0510 | | EcosystemInformation | 0x0750 | | CommissionerControl | 0x0751 | -| ElectricalMeasurement | 0x0B04 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| | SampleMei | 0xFFF1FC20| @@ -756,24 +752,6 @@ class OnOffOnWithTimedOff : public ClusterCommand chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster OnOffSwitchConfiguration | 0x0007 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SwitchType | 0x0000 | -| * SwitchActions | 0x0010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /*----------------------------------------------------------------------------*\ | Cluster LevelControl | 0x0008 | |------------------------------------------------------------------------------| @@ -1170,31 +1148,6 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BinaryInputBasic | 0x000F | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActiveText | 0x0004 | -| * Description | 0x001C | -| * InactiveText | 0x002E | -| * OutOfService | 0x0051 | -| * Polarity | 0x0054 | -| * PresentValue | 0x0055 | -| * Reliability | 0x0067 | -| * StatusFlags | 0x006F | -| * ApplicationType | 0x0100 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /*----------------------------------------------------------------------------*\ | Cluster PulseWidthModulation | 0x001C | |------------------------------------------------------------------------------| @@ -9254,109 +9207,6 @@ class WindowCoveringGoToTiltPercentage : public ClusterCommand chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command BarrierControlGoToPercent - */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand -{ -public: - BarrierControlBarrierControlGoToPercent(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-go-to-percent", credsIssuerConfig) - { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::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::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::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::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; -}; - -/* - * Command BarrierControlStop - */ -class BarrierControlBarrierControlStop : public ClusterCommand -{ -public: - BarrierControlBarrierControlStop(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("barrier-control-stop", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::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::BarrierControl::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::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::BarrierControl::Commands::BarrierControlStop::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ | Cluster ServiceArea | 0x0150 | |------------------------------------------------------------------------------| @@ -13913,231 +13763,6 @@ class CommissionerControlCommissionNode : public ClusterCommand chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster ElectricalMeasurement | 0x0B04 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetProfileInfoCommand | 0x00 | -| * GetMeasurementProfileCommand | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasurementType | 0x0000 | -| * DcVoltage | 0x0100 | -| * DcVoltageMin | 0x0101 | -| * DcVoltageMax | 0x0102 | -| * DcCurrent | 0x0103 | -| * DcCurrentMin | 0x0104 | -| * DcCurrentMax | 0x0105 | -| * DcPower | 0x0106 | -| * DcPowerMin | 0x0107 | -| * DcPowerMax | 0x0108 | -| * DcVoltageMultiplier | 0x0200 | -| * DcVoltageDivisor | 0x0201 | -| * DcCurrentMultiplier | 0x0202 | -| * DcCurrentDivisor | 0x0203 | -| * DcPowerMultiplier | 0x0204 | -| * DcPowerDivisor | 0x0205 | -| * AcFrequency | 0x0300 | -| * AcFrequencyMin | 0x0301 | -| * AcFrequencyMax | 0x0302 | -| * NeutralCurrent | 0x0303 | -| * TotalActivePower | 0x0304 | -| * TotalReactivePower | 0x0305 | -| * TotalApparentPower | 0x0306 | -| * Measured1stHarmonicCurrent | 0x0307 | -| * Measured3rdHarmonicCurrent | 0x0308 | -| * Measured5thHarmonicCurrent | 0x0309 | -| * Measured7thHarmonicCurrent | 0x030A | -| * Measured9thHarmonicCurrent | 0x030B | -| * Measured11thHarmonicCurrent | 0x030C | -| * MeasuredPhase1stHarmonicCurrent | 0x030D | -| * MeasuredPhase3rdHarmonicCurrent | 0x030E | -| * MeasuredPhase5thHarmonicCurrent | 0x030F | -| * MeasuredPhase7thHarmonicCurrent | 0x0310 | -| * MeasuredPhase9thHarmonicCurrent | 0x0311 | -| * MeasuredPhase11thHarmonicCurrent | 0x0312 | -| * AcFrequencyMultiplier | 0x0400 | -| * AcFrequencyDivisor | 0x0401 | -| * PowerMultiplier | 0x0402 | -| * PowerDivisor | 0x0403 | -| * HarmonicCurrentMultiplier | 0x0404 | -| * PhaseHarmonicCurrentMultiplier | 0x0405 | -| * InstantaneousVoltage | 0x0500 | -| * InstantaneousLineCurrent | 0x0501 | -| * InstantaneousActiveCurrent | 0x0502 | -| * InstantaneousReactiveCurrent | 0x0503 | -| * InstantaneousPower | 0x0504 | -| * RmsVoltage | 0x0505 | -| * RmsVoltageMin | 0x0506 | -| * RmsVoltageMax | 0x0507 | -| * RmsCurrent | 0x0508 | -| * RmsCurrentMin | 0x0509 | -| * RmsCurrentMax | 0x050A | -| * ActivePower | 0x050B | -| * ActivePowerMin | 0x050C | -| * ActivePowerMax | 0x050D | -| * ReactivePower | 0x050E | -| * ApparentPower | 0x050F | -| * PowerFactor | 0x0510 | -| * AverageRmsVoltageMeasurementPeriod | 0x0511 | -| * AverageRmsUnderVoltageCounter | 0x0513 | -| * RmsExtremeOverVoltagePeriod | 0x0514 | -| * RmsExtremeUnderVoltagePeriod | 0x0515 | -| * RmsVoltageSagPeriod | 0x0516 | -| * RmsVoltageSwellPeriod | 0x0517 | -| * AcVoltageMultiplier | 0x0600 | -| * AcVoltageDivisor | 0x0601 | -| * AcCurrentMultiplier | 0x0602 | -| * AcCurrentDivisor | 0x0603 | -| * AcPowerMultiplier | 0x0604 | -| * AcPowerDivisor | 0x0605 | -| * OverloadAlarmsMask | 0x0700 | -| * VoltageOverload | 0x0701 | -| * CurrentOverload | 0x0702 | -| * AcOverloadAlarmsMask | 0x0800 | -| * AcVoltageOverload | 0x0801 | -| * AcCurrentOverload | 0x0802 | -| * AcActivePowerOverload | 0x0803 | -| * AcReactivePowerOverload | 0x0804 | -| * AverageRmsOverVoltage | 0x0805 | -| * AverageRmsUnderVoltage | 0x0806 | -| * RmsExtremeOverVoltage | 0x0807 | -| * RmsExtremeUnderVoltage | 0x0808 | -| * RmsVoltageSag | 0x0809 | -| * RmsVoltageSwell | 0x080A | -| * LineCurrentPhaseB | 0x0901 | -| * ActiveCurrentPhaseB | 0x0902 | -| * ReactiveCurrentPhaseB | 0x0903 | -| * RmsVoltagePhaseB | 0x0905 | -| * RmsVoltageMinPhaseB | 0x0906 | -| * RmsVoltageMaxPhaseB | 0x0907 | -| * RmsCurrentPhaseB | 0x0908 | -| * RmsCurrentMinPhaseB | 0x0909 | -| * RmsCurrentMaxPhaseB | 0x090A | -| * ActivePowerPhaseB | 0x090B | -| * ActivePowerMinPhaseB | 0x090C | -| * ActivePowerMaxPhaseB | 0x090D | -| * ReactivePowerPhaseB | 0x090E | -| * ApparentPowerPhaseB | 0x090F | -| * PowerFactorPhaseB | 0x0910 | -| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | -| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | -| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | -| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | -| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | -| * RmsVoltageSagPeriodPhaseB | 0x0916 | -| * RmsVoltageSwellPeriodPhaseB | 0x0917 | -| * LineCurrentPhaseC | 0x0A01 | -| * ActiveCurrentPhaseC | 0x0A02 | -| * ReactiveCurrentPhaseC | 0x0A03 | -| * RmsVoltagePhaseC | 0x0A05 | -| * RmsVoltageMinPhaseC | 0x0A06 | -| * RmsVoltageMaxPhaseC | 0x0A07 | -| * RmsCurrentPhaseC | 0x0A08 | -| * RmsCurrentMinPhaseC | 0x0A09 | -| * RmsCurrentMaxPhaseC | 0x0A0A | -| * ActivePowerPhaseC | 0x0A0B | -| * ActivePowerMinPhaseC | 0x0A0C | -| * ActivePowerMaxPhaseC | 0x0A0D | -| * ReactivePowerPhaseC | 0x0A0E | -| * ApparentPowerPhaseC | 0x0A0F | -| * PowerFactorPhaseC | 0x0A10 | -| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | -| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | -| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | -| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | -| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | -| * RmsVoltageSagPeriodPhaseC | 0x0A16 | -| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command GetProfileInfoCommand - */ -class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand -{ -public: - ElectricalMeasurementGetProfileInfoCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-profile-info-command", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::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::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::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::ElectricalMeasurement::Commands::GetProfileInfoCommand::Type mRequest; -}; - -/* - * Command GetMeasurementProfileCommand - */ -class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand -{ -public: - ElectricalMeasurementGetMeasurementProfileCommand(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-measurement-profile-command", credsIssuerConfig) - { - AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); - AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); - AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::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::ElectricalMeasurement::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::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::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ | Cluster UnitTesting | 0xFFF1FC05 | |------------------------------------------------------------------------------| @@ -15748,65 +15373,6 @@ void registerClusterOnOff(Commands & commands, CredentialIssuerCommands * credsI commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterOnOffSwitchConfiguration(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::OnOffSwitchConfiguration; - - const char * clusterName = "OnOffSwitchConfiguration"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // - make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "switch-type", 0, UINT8_MAX, Attributes::SwitchType::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "switch-actions", 0, UINT8_MAX, Attributes::SwitchActions::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "switch-type", Attributes::SwitchType::Id, credsIssuerConfig), // - make_unique(Id, "switch-actions", Attributes::SwitchActions::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::LevelControl; @@ -15926,11 +15492,11 @@ void registerClusterLevelControl(Commands & commands, CredentialIssuerCommands * commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::BinaryInputBasic; + using namespace chip::app::Clusters::PulseWidthModulation; - const char * clusterName = "BinaryInputBasic"; + const char * clusterName = "PulseWidthModulation"; commands_list clusterCommands = { // @@ -15941,15 +15507,6 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // - make_unique(Id, "out-of-service", Attributes::OutOfService::Id, credsIssuerConfig), // - make_unique(Id, "polarity", Attributes::Polarity::Id, credsIssuerConfig), // - make_unique(Id, "present-value", Attributes::PresentValue::Id, credsIssuerConfig), // - make_unique(Id, "reliability", Attributes::Reliability::Id, credsIssuerConfig), // - make_unique(Id, "status-flags", Attributes::StatusFlags::Id, credsIssuerConfig), // - make_unique(Id, "application-type", Attributes::ApplicationType::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -15957,24 +15514,6 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "active-text", Attributes::ActiveText::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "description", Attributes::Description::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "inactive-text", Attributes::InactiveText::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "out-of-service", 0, 1, Attributes::OutOfService::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "polarity", 0, UINT8_MAX, Attributes::Polarity::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "present-value", 0, 1, Attributes::PresentValue::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "reliability", 0, UINT8_MAX, Attributes::Reliability::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "status-flags", 0, UINT8_MAX, Attributes::StatusFlags::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "application-type", 0, UINT32_MAX, Attributes::ApplicationType::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -15989,15 +15528,6 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "active-text", Attributes::ActiveText::Id, credsIssuerConfig), // - make_unique(Id, "description", Attributes::Description::Id, credsIssuerConfig), // - make_unique(Id, "inactive-text", Attributes::InactiveText::Id, credsIssuerConfig), // - make_unique(Id, "out-of-service", Attributes::OutOfService::Id, credsIssuerConfig), // - make_unique(Id, "polarity", Attributes::Polarity::Id, credsIssuerConfig), // - make_unique(Id, "present-value", Attributes::PresentValue::Id, credsIssuerConfig), // - make_unique(Id, "reliability", Attributes::Reliability::Id, credsIssuerConfig), // - make_unique(Id, "status-flags", Attributes::StatusFlags::Id, credsIssuerConfig), // - make_unique(Id, "application-type", Attributes::ApplicationType::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -16013,11 +15543,11 @@ void registerClusterBinaryInputBasic(Commands & commands, CredentialIssuerComman commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) +void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { - using namespace chip::app::Clusters::PulseWidthModulation; + using namespace chip::app::Clusters::Descriptor; - const char * clusterName = "PulseWidthModulation"; + const char * clusterName = "Descriptor"; commands_list clusterCommands = { // @@ -16028,62 +15558,11 @@ void registerClusterPulseWidthModulation(Commands & commands, CredentialIssuerCo // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} -void registerClusterDescriptor(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::Descriptor; - - const char * clusterName = "Descriptor"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "device-type-list", Attributes::DeviceTypeList::Id, credsIssuerConfig), // - make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // - make_unique(Id, "client-list", Attributes::ClientList::Id, credsIssuerConfig), // - make_unique(Id, "parts-list", Attributes::PartsList::Id, credsIssuerConfig), // - make_unique(Id, "tag-list", Attributes::TagList::Id, credsIssuerConfig), // + make_unique(Id, "device-type-list", Attributes::DeviceTypeList::Id, credsIssuerConfig), // + make_unique(Id, "server-list", Attributes::ServerList::Id, credsIssuerConfig), // + make_unique(Id, "client-list", Attributes::ClientList::Id, credsIssuerConfig), // + make_unique(Id, "parts-list", Attributes::PartsList::Id, credsIssuerConfig), // + make_unique(Id, "tag-list", Attributes::TagList::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -22663,105 +22142,6 @@ void registerClusterWindowCovering(Commands & commands, CredentialIssuerCommands commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterBarrierControl(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::BarrierControl; - - const char * clusterName = "BarrierControl"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "barrier-moving-state", Attributes::BarrierMovingState::Id, credsIssuerConfig), // - make_unique(Id, "barrier-safety-status", Attributes::BarrierSafetyStatus::Id, credsIssuerConfig), // - make_unique(Id, "barrier-capabilities", Attributes::BarrierCapabilities::Id, credsIssuerConfig), // - make_unique(Id, "barrier-open-events", Attributes::BarrierOpenEvents::Id, credsIssuerConfig), // - make_unique(Id, "barrier-close-events", Attributes::BarrierCloseEvents::Id, credsIssuerConfig), // - make_unique(Id, "barrier-command-open-events", Attributes::BarrierCommandOpenEvents::Id, - credsIssuerConfig), // - make_unique(Id, "barrier-command-close-events", Attributes::BarrierCommandCloseEvents::Id, - credsIssuerConfig), // - make_unique(Id, "barrier-open-period", Attributes::BarrierOpenPeriod::Id, credsIssuerConfig), // - make_unique(Id, "barrier-close-period", Attributes::BarrierClosePeriod::Id, credsIssuerConfig), // - make_unique(Id, "barrier-position", Attributes::BarrierPosition::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "barrier-moving-state", 0, UINT8_MAX, Attributes::BarrierMovingState::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-safety-status", 0, UINT16_MAX, Attributes::BarrierSafetyStatus::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-capabilities", 0, UINT8_MAX, Attributes::BarrierCapabilities::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-open-events", 0, UINT16_MAX, Attributes::BarrierOpenEvents::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-close-events", 0, UINT16_MAX, Attributes::BarrierCloseEvents::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-command-open-events", 0, UINT16_MAX, - Attributes::BarrierCommandOpenEvents::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "barrier-command-close-events", 0, UINT16_MAX, - Attributes::BarrierCommandCloseEvents::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "barrier-open-period", 0, UINT16_MAX, Attributes::BarrierOpenPeriod::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-close-period", 0, UINT16_MAX, Attributes::BarrierClosePeriod::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "barrier-position", 0, UINT8_MAX, Attributes::BarrierPosition::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "barrier-moving-state", Attributes::BarrierMovingState::Id, credsIssuerConfig), // - make_unique(Id, "barrier-safety-status", Attributes::BarrierSafetyStatus::Id, credsIssuerConfig), // - make_unique(Id, "barrier-capabilities", Attributes::BarrierCapabilities::Id, credsIssuerConfig), // - make_unique(Id, "barrier-open-events", Attributes::BarrierOpenEvents::Id, credsIssuerConfig), // - make_unique(Id, "barrier-close-events", Attributes::BarrierCloseEvents::Id, credsIssuerConfig), // - make_unique(Id, "barrier-command-open-events", Attributes::BarrierCommandOpenEvents::Id, - credsIssuerConfig), // - make_unique(Id, "barrier-command-close-events", Attributes::BarrierCommandCloseEvents::Id, - credsIssuerConfig), // - make_unique(Id, "barrier-open-period", Attributes::BarrierOpenPeriod::Id, credsIssuerConfig), // - make_unique(Id, "barrier-close-period", Attributes::BarrierClosePeriod::Id, credsIssuerConfig), // - make_unique(Id, "barrier-position", Attributes::BarrierPosition::Id, credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterServiceArea(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::ServiceArea; @@ -26910,702 +26290,6 @@ void registerClusterCommissionerControl(Commands & commands, CredentialIssuerCom commands.RegisterCluster(clusterName, clusterCommands); } -void registerClusterElectricalMeasurement(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) -{ - using namespace chip::app::Clusters::ElectricalMeasurement; - - const char * clusterName = "ElectricalMeasurement"; - - commands_list clusterCommands = { - // - // Commands - // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - // - // Attributes - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "measurement-type", Attributes::MeasurementType::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage", Attributes::DcVoltage::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-min", Attributes::DcVoltageMin::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-max", Attributes::DcVoltageMax::Id, credsIssuerConfig), // - make_unique(Id, "dc-current", Attributes::DcCurrent::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-min", Attributes::DcCurrentMin::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-max", Attributes::DcCurrentMax::Id, credsIssuerConfig), // - make_unique(Id, "dc-power", Attributes::DcPower::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-min", Attributes::DcPowerMin::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-max", Attributes::DcPowerMax::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-multiplier", Attributes::DcVoltageMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-divisor", Attributes::DcVoltageDivisor::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-multiplier", Attributes::DcCurrentMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-divisor", Attributes::DcCurrentDivisor::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-multiplier", Attributes::DcPowerMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-divisor", Attributes::DcPowerDivisor::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency", Attributes::AcFrequency::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency-min", Attributes::AcFrequencyMin::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency-max", Attributes::AcFrequencyMax::Id, credsIssuerConfig), // - make_unique(Id, "neutral-current", Attributes::NeutralCurrent::Id, credsIssuerConfig), // - make_unique(Id, "total-active-power", Attributes::TotalActivePower::Id, credsIssuerConfig), // - make_unique(Id, "total-reactive-power", Attributes::TotalReactivePower::Id, credsIssuerConfig), // - make_unique(Id, "total-apparent-power", Attributes::TotalApparentPower::Id, credsIssuerConfig), // - make_unique(Id, "measured1st-harmonic-current", Attributes::Measured1stHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured3rd-harmonic-current", Attributes::Measured3rdHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured5th-harmonic-current", Attributes::Measured5thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured7th-harmonic-current", Attributes::Measured7thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured9th-harmonic-current", Attributes::Measured9thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured11th-harmonic-current", Attributes::Measured11thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase1st-harmonic-current", Attributes::MeasuredPhase1stHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase3rd-harmonic-current", Attributes::MeasuredPhase3rdHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase5th-harmonic-current", Attributes::MeasuredPhase5thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase7th-harmonic-current", Attributes::MeasuredPhase7thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase9th-harmonic-current", Attributes::MeasuredPhase9thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase11th-harmonic-current", Attributes::MeasuredPhase11thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "ac-frequency-multiplier", Attributes::AcFrequencyMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency-divisor", Attributes::AcFrequencyDivisor::Id, credsIssuerConfig), // - make_unique(Id, "power-multiplier", Attributes::PowerMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "power-divisor", Attributes::PowerDivisor::Id, credsIssuerConfig), // - make_unique(Id, "harmonic-current-multiplier", Attributes::HarmonicCurrentMultiplier::Id, - credsIssuerConfig), // - make_unique(Id, "phase-harmonic-current-multiplier", Attributes::PhaseHarmonicCurrentMultiplier::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-voltage", Attributes::InstantaneousVoltage::Id, credsIssuerConfig), // - make_unique(Id, "instantaneous-line-current", Attributes::InstantaneousLineCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-active-current", Attributes::InstantaneousActiveCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-reactive-current", Attributes::InstantaneousReactiveCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-power", Attributes::InstantaneousPower::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage", Attributes::RmsVoltage::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-min", Attributes::RmsVoltageMin::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-max", Attributes::RmsVoltageMax::Id, credsIssuerConfig), // - make_unique(Id, "rms-current", Attributes::RmsCurrent::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-min", Attributes::RmsCurrentMin::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-max", Attributes::RmsCurrentMax::Id, credsIssuerConfig), // - make_unique(Id, "active-power", Attributes::ActivePower::Id, credsIssuerConfig), // - make_unique(Id, "active-power-min", Attributes::ActivePowerMin::Id, credsIssuerConfig), // - make_unique(Id, "active-power-max", Attributes::ActivePowerMax::Id, credsIssuerConfig), // - make_unique(Id, "reactive-power", Attributes::ReactivePower::Id, credsIssuerConfig), // - make_unique(Id, "apparent-power", Attributes::ApparentPower::Id, credsIssuerConfig), // - make_unique(Id, "power-factor", Attributes::PowerFactor::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-voltage-measurement-period", Attributes::AverageRmsVoltageMeasurementPeriod::Id, - credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage-counter", Attributes::AverageRmsUnderVoltageCounter::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage-period", Attributes::RmsExtremeOverVoltagePeriod::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage-period", Attributes::RmsExtremeUnderVoltagePeriod::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag-period", Attributes::RmsVoltageSagPeriod::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell-period", Attributes::RmsVoltageSwellPeriod::Id, credsIssuerConfig), // - make_unique(Id, "ac-voltage-multiplier", Attributes::AcVoltageMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-voltage-divisor", Attributes::AcVoltageDivisor::Id, credsIssuerConfig), // - make_unique(Id, "ac-current-multiplier", Attributes::AcCurrentMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-current-divisor", Attributes::AcCurrentDivisor::Id, credsIssuerConfig), // - make_unique(Id, "ac-power-multiplier", Attributes::AcPowerMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-power-divisor", Attributes::AcPowerDivisor::Id, credsIssuerConfig), // - make_unique(Id, "overload-alarms-mask", Attributes::OverloadAlarmsMask::Id, credsIssuerConfig), // - make_unique(Id, "voltage-overload", Attributes::VoltageOverload::Id, credsIssuerConfig), // - make_unique(Id, "current-overload", Attributes::CurrentOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-overload-alarms-mask", Attributes::AcOverloadAlarmsMask::Id, credsIssuerConfig), // - make_unique(Id, "ac-voltage-overload", Attributes::AcVoltageOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-current-overload", Attributes::AcCurrentOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-active-power-overload", Attributes::AcActivePowerOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-reactive-power-overload", Attributes::AcReactivePowerOverload::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-over-voltage", Attributes::AverageRmsOverVoltage::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage", Attributes::AverageRmsUnderVoltage::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage", Attributes::RmsExtremeOverVoltage::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage", Attributes::RmsExtremeUnderVoltage::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag", Attributes::RmsVoltageSag::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell", Attributes::RmsVoltageSwell::Id, credsIssuerConfig), // - make_unique(Id, "line-current-phase-b", Attributes::LineCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-current-phase-b", Attributes::ActiveCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "reactive-current-phase-b", Attributes::ReactiveCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-phase-b", Attributes::RmsVoltagePhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-min-phase-b", Attributes::RmsVoltageMinPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-max-phase-b", Attributes::RmsVoltageMaxPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-phase-b", Attributes::RmsCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-min-phase-b", Attributes::RmsCurrentMinPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-max-phase-b", Attributes::RmsCurrentMaxPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-power-phase-b", Attributes::ActivePowerPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-power-min-phase-b", Attributes::ActivePowerMinPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-power-max-phase-b", Attributes::ActivePowerMaxPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "reactive-power-phase-b", Attributes::ReactivePowerPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "apparent-power-phase-b", Attributes::ApparentPowerPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "power-factor-phase-b", Attributes::PowerFactorPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-voltage-measurement-period-phase-b", - Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-over-voltage-counter-phase-b", - Attributes::AverageRmsOverVoltageCounterPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage-counter-phase-b", - Attributes::AverageRmsUnderVoltageCounterPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage-period-phase-b", Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage-period-phase-b", - Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag-period-phase-b", Attributes::RmsVoltageSagPeriodPhaseB::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell-period-phase-b", Attributes::RmsVoltageSwellPeriodPhaseB::Id, - credsIssuerConfig), // - make_unique(Id, "line-current-phase-c", Attributes::LineCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-current-phase-c", Attributes::ActiveCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "reactive-current-phase-c", Attributes::ReactiveCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-phase-c", Attributes::RmsVoltagePhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-min-phase-c", Attributes::RmsVoltageMinPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-max-phase-c", Attributes::RmsVoltageMaxPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-phase-c", Attributes::RmsCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-min-phase-c", Attributes::RmsCurrentMinPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-max-phase-c", Attributes::RmsCurrentMaxPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-power-phase-c", Attributes::ActivePowerPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-power-min-phase-c", Attributes::ActivePowerMinPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-power-max-phase-c", Attributes::ActivePowerMaxPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "reactive-power-phase-c", Attributes::ReactivePowerPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "apparent-power-phase-c", Attributes::ApparentPowerPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "power-factor-phase-c", Attributes::PowerFactorPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-voltage-measurement-period-phase-c", - Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-over-voltage-counter-phase-c", - Attributes::AverageRmsOverVoltageCounterPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage-counter-phase-c", - Attributes::AverageRmsUnderVoltageCounterPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage-period-phase-c", Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage-period-phase-c", - Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag-period-phase-c", Attributes::RmsVoltageSagPeriodPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell-period-phase-c", Attributes::RmsVoltageSwellPeriodPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - make_unique>(Id, credsIssuerConfig), // - make_unique>(Id, "measurement-type", 0, UINT32_MAX, Attributes::MeasurementType::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-voltage", INT16_MIN, INT16_MAX, Attributes::DcVoltage::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-voltage-min", INT16_MIN, INT16_MAX, Attributes::DcVoltageMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-voltage-max", INT16_MIN, INT16_MAX, Attributes::DcVoltageMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-current", INT16_MIN, INT16_MAX, Attributes::DcCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-current-min", INT16_MIN, INT16_MAX, Attributes::DcCurrentMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-current-max", INT16_MIN, INT16_MAX, Attributes::DcCurrentMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-power", INT16_MIN, INT16_MAX, Attributes::DcPower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-power-min", INT16_MIN, INT16_MAX, Attributes::DcPowerMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-power-max", INT16_MIN, INT16_MAX, Attributes::DcPowerMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-voltage-multiplier", 0, UINT16_MAX, Attributes::DcVoltageMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-voltage-divisor", 0, UINT16_MAX, Attributes::DcVoltageDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-current-multiplier", 0, UINT16_MAX, Attributes::DcCurrentMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-current-divisor", 0, UINT16_MAX, Attributes::DcCurrentDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-power-multiplier", 0, UINT16_MAX, Attributes::DcPowerMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "dc-power-divisor", 0, UINT16_MAX, Attributes::DcPowerDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-frequency", 0, UINT16_MAX, Attributes::AcFrequency::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-frequency-min", 0, UINT16_MAX, Attributes::AcFrequencyMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-frequency-max", 0, UINT16_MAX, Attributes::AcFrequencyMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "neutral-current", 0, UINT16_MAX, Attributes::NeutralCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "total-active-power", INT32_MIN, INT32_MAX, Attributes::TotalActivePower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "total-reactive-power", INT32_MIN, INT32_MAX, Attributes::TotalReactivePower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "total-apparent-power", 0, UINT32_MAX, Attributes::TotalApparentPower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "measured1st-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::Measured1stHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured3rd-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::Measured3rdHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured5th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::Measured5thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured7th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::Measured7thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured9th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::Measured9thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured11th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::Measured11thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured-phase1st-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::MeasuredPhase1stHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured-phase3rd-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::MeasuredPhase3rdHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured-phase5th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::MeasuredPhase5thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured-phase7th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::MeasuredPhase7thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured-phase9th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::MeasuredPhase9thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "measured-phase11th-harmonic-current", INT16_MIN, INT16_MAX, - Attributes::MeasuredPhase11thHarmonicCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "ac-frequency-multiplier", 0, UINT16_MAX, Attributes::AcFrequencyMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-frequency-divisor", 0, UINT16_MAX, Attributes::AcFrequencyDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "power-multiplier", 0, UINT32_MAX, Attributes::PowerMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "power-divisor", 0, UINT32_MAX, Attributes::PowerDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "harmonic-current-multiplier", INT8_MIN, INT8_MAX, - Attributes::HarmonicCurrentMultiplier::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "phase-harmonic-current-multiplier", INT8_MIN, INT8_MAX, - Attributes::PhaseHarmonicCurrentMultiplier::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "instantaneous-voltage", INT16_MIN, INT16_MAX, - Attributes::InstantaneousVoltage::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "instantaneous-line-current", 0, UINT16_MAX, - Attributes::InstantaneousLineCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "instantaneous-active-current", INT16_MIN, INT16_MAX, - Attributes::InstantaneousActiveCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "instantaneous-reactive-current", INT16_MIN, INT16_MAX, - Attributes::InstantaneousReactiveCurrent::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "instantaneous-power", INT16_MIN, INT16_MAX, Attributes::InstantaneousPower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage", 0, UINT16_MAX, Attributes::RmsVoltage::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-min", 0, UINT16_MAX, Attributes::RmsVoltageMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-max", 0, UINT16_MAX, Attributes::RmsVoltageMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current", 0, UINT16_MAX, Attributes::RmsCurrent::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-min", 0, UINT16_MAX, Attributes::RmsCurrentMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-max", 0, UINT16_MAX, Attributes::RmsCurrentMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power", INT16_MIN, INT16_MAX, Attributes::ActivePower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power-min", INT16_MIN, INT16_MAX, Attributes::ActivePowerMin::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power-max", INT16_MIN, INT16_MAX, Attributes::ActivePowerMax::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "reactive-power", INT16_MIN, INT16_MAX, Attributes::ReactivePower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "apparent-power", 0, UINT16_MAX, Attributes::ApparentPower::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "power-factor", INT8_MIN, INT8_MAX, Attributes::PowerFactor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "average-rms-voltage-measurement-period", 0, UINT16_MAX, - Attributes::AverageRmsVoltageMeasurementPeriod::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "average-rms-under-voltage-counter", 0, UINT16_MAX, - Attributes::AverageRmsUnderVoltageCounter::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-over-voltage-period", 0, UINT16_MAX, - Attributes::RmsExtremeOverVoltagePeriod::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-under-voltage-period", 0, UINT16_MAX, - Attributes::RmsExtremeUnderVoltagePeriod::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-sag-period", 0, UINT16_MAX, Attributes::RmsVoltageSagPeriod::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-swell-period", 0, UINT16_MAX, Attributes::RmsVoltageSwellPeriod::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "ac-voltage-multiplier", 0, UINT16_MAX, Attributes::AcVoltageMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-voltage-divisor", 0, UINT16_MAX, Attributes::AcVoltageDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-current-multiplier", 0, UINT16_MAX, Attributes::AcCurrentMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-current-divisor", 0, UINT16_MAX, Attributes::AcCurrentDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-power-multiplier", 0, UINT16_MAX, Attributes::AcPowerMultiplier::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-power-divisor", 0, UINT16_MAX, Attributes::AcPowerDivisor::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "overload-alarms-mask", 0, UINT8_MAX, Attributes::OverloadAlarmsMask::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "voltage-overload", INT16_MIN, INT16_MAX, Attributes::VoltageOverload::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "current-overload", INT16_MIN, INT16_MAX, Attributes::CurrentOverload::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-overload-alarms-mask", 0, UINT16_MAX, Attributes::AcOverloadAlarmsMask::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "ac-voltage-overload", INT16_MIN, INT16_MAX, Attributes::AcVoltageOverload::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-current-overload", INT16_MIN, INT16_MAX, Attributes::AcCurrentOverload::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "ac-active-power-overload", INT16_MIN, INT16_MAX, - Attributes::AcActivePowerOverload::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "ac-reactive-power-overload", INT16_MIN, INT16_MAX, - Attributes::AcReactivePowerOverload::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "average-rms-over-voltage", INT16_MIN, INT16_MAX, - Attributes::AverageRmsOverVoltage::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "average-rms-under-voltage", INT16_MIN, INT16_MAX, - Attributes::AverageRmsUnderVoltage::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-over-voltage", INT16_MIN, INT16_MAX, - Attributes::RmsExtremeOverVoltage::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-under-voltage", INT16_MIN, INT16_MAX, - Attributes::RmsExtremeUnderVoltage::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-sag", INT16_MIN, INT16_MAX, Attributes::RmsVoltageSag::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-swell", INT16_MIN, INT16_MAX, Attributes::RmsVoltageSwell::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "line-current-phase-b", 0, UINT16_MAX, Attributes::LineCurrentPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-current-phase-b", INT16_MIN, INT16_MAX, - Attributes::ActiveCurrentPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "reactive-current-phase-b", INT16_MIN, INT16_MAX, - Attributes::ReactiveCurrentPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-phase-b", 0, UINT16_MAX, Attributes::RmsVoltagePhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-min-phase-b", 0, UINT16_MAX, Attributes::RmsVoltageMinPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-max-phase-b", 0, UINT16_MAX, Attributes::RmsVoltageMaxPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-phase-b", 0, UINT16_MAX, Attributes::RmsCurrentPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-min-phase-b", 0, UINT16_MAX, Attributes::RmsCurrentMinPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-max-phase-b", 0, UINT16_MAX, Attributes::RmsCurrentMaxPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power-phase-b", INT16_MIN, INT16_MAX, Attributes::ActivePowerPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power-min-phase-b", INT16_MIN, INT16_MAX, - Attributes::ActivePowerMinPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "active-power-max-phase-b", INT16_MIN, INT16_MAX, - Attributes::ActivePowerMaxPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "reactive-power-phase-b", INT16_MIN, INT16_MAX, - Attributes::ReactivePowerPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "apparent-power-phase-b", 0, UINT16_MAX, Attributes::ApparentPowerPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "power-factor-phase-b", INT8_MIN, INT8_MAX, Attributes::PowerFactorPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "average-rms-voltage-measurement-period-phase-b", 0, UINT16_MAX, - Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "average-rms-over-voltage-counter-phase-b", 0, UINT16_MAX, - Attributes::AverageRmsOverVoltageCounterPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "average-rms-under-voltage-counter-phase-b", 0, UINT16_MAX, - Attributes::AverageRmsUnderVoltageCounterPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-over-voltage-period-phase-b", 0, UINT16_MAX, - Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-under-voltage-period-phase-b", 0, UINT16_MAX, - Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-sag-period-phase-b", 0, UINT16_MAX, - Attributes::RmsVoltageSagPeriodPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-swell-period-phase-b", 0, UINT16_MAX, - Attributes::RmsVoltageSwellPeriodPhaseB::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "line-current-phase-c", 0, UINT16_MAX, Attributes::LineCurrentPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-current-phase-c", INT16_MIN, INT16_MAX, - Attributes::ActiveCurrentPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "reactive-current-phase-c", INT16_MIN, INT16_MAX, - Attributes::ReactiveCurrentPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-phase-c", 0, UINT16_MAX, Attributes::RmsVoltagePhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-min-phase-c", 0, UINT16_MAX, Attributes::RmsVoltageMinPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-voltage-max-phase-c", 0, UINT16_MAX, Attributes::RmsVoltageMaxPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-phase-c", 0, UINT16_MAX, Attributes::RmsCurrentPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-min-phase-c", 0, UINT16_MAX, Attributes::RmsCurrentMinPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "rms-current-max-phase-c", 0, UINT16_MAX, Attributes::RmsCurrentMaxPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power-phase-c", INT16_MIN, INT16_MAX, Attributes::ActivePowerPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "active-power-min-phase-c", INT16_MIN, INT16_MAX, - Attributes::ActivePowerMinPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "active-power-max-phase-c", INT16_MIN, INT16_MAX, - Attributes::ActivePowerMaxPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "reactive-power-phase-c", INT16_MIN, INT16_MAX, - Attributes::ReactivePowerPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "apparent-power-phase-c", 0, UINT16_MAX, Attributes::ApparentPowerPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "power-factor-phase-c", INT8_MIN, INT8_MAX, Attributes::PowerFactorPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "average-rms-voltage-measurement-period-phase-c", 0, UINT16_MAX, - Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "average-rms-over-voltage-counter-phase-c", 0, UINT16_MAX, - Attributes::AverageRmsOverVoltageCounterPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "average-rms-under-voltage-counter-phase-c", 0, UINT16_MAX, - Attributes::AverageRmsUnderVoltageCounterPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-over-voltage-period-phase-c", 0, UINT16_MAX, - Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-extreme-under-voltage-period-phase-c", 0, UINT16_MAX, - Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-sag-period-phase-c", 0, UINT16_MAX, - Attributes::RmsVoltageSagPeriodPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>(Id, "rms-voltage-swell-period-phase-c", 0, UINT16_MAX, - Attributes::RmsVoltageSwellPeriodPhaseC::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, - credsIssuerConfig), // - make_unique>>( - Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "event-list", Attributes::EventList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>( - Id, "attribute-list", Attributes::AttributeList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "feature-map", 0, UINT32_MAX, Attributes::FeatureMap::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, "measurement-type", Attributes::MeasurementType::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage", Attributes::DcVoltage::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-min", Attributes::DcVoltageMin::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-max", Attributes::DcVoltageMax::Id, credsIssuerConfig), // - make_unique(Id, "dc-current", Attributes::DcCurrent::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-min", Attributes::DcCurrentMin::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-max", Attributes::DcCurrentMax::Id, credsIssuerConfig), // - make_unique(Id, "dc-power", Attributes::DcPower::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-min", Attributes::DcPowerMin::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-max", Attributes::DcPowerMax::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-multiplier", Attributes::DcVoltageMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "dc-voltage-divisor", Attributes::DcVoltageDivisor::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-multiplier", Attributes::DcCurrentMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "dc-current-divisor", Attributes::DcCurrentDivisor::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-multiplier", Attributes::DcPowerMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "dc-power-divisor", Attributes::DcPowerDivisor::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency", Attributes::AcFrequency::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency-min", Attributes::AcFrequencyMin::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency-max", Attributes::AcFrequencyMax::Id, credsIssuerConfig), // - make_unique(Id, "neutral-current", Attributes::NeutralCurrent::Id, credsIssuerConfig), // - make_unique(Id, "total-active-power", Attributes::TotalActivePower::Id, credsIssuerConfig), // - make_unique(Id, "total-reactive-power", Attributes::TotalReactivePower::Id, credsIssuerConfig), // - make_unique(Id, "total-apparent-power", Attributes::TotalApparentPower::Id, credsIssuerConfig), // - make_unique(Id, "measured1st-harmonic-current", Attributes::Measured1stHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured3rd-harmonic-current", Attributes::Measured3rdHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured5th-harmonic-current", Attributes::Measured5thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured7th-harmonic-current", Attributes::Measured7thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured9th-harmonic-current", Attributes::Measured9thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured11th-harmonic-current", Attributes::Measured11thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase1st-harmonic-current", Attributes::MeasuredPhase1stHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase3rd-harmonic-current", Attributes::MeasuredPhase3rdHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase5th-harmonic-current", Attributes::MeasuredPhase5thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase7th-harmonic-current", Attributes::MeasuredPhase7thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase9th-harmonic-current", Attributes::MeasuredPhase9thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "measured-phase11th-harmonic-current", Attributes::MeasuredPhase11thHarmonicCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "ac-frequency-multiplier", Attributes::AcFrequencyMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-frequency-divisor", Attributes::AcFrequencyDivisor::Id, credsIssuerConfig), // - make_unique(Id, "power-multiplier", Attributes::PowerMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "power-divisor", Attributes::PowerDivisor::Id, credsIssuerConfig), // - make_unique(Id, "harmonic-current-multiplier", Attributes::HarmonicCurrentMultiplier::Id, - credsIssuerConfig), // - make_unique(Id, "phase-harmonic-current-multiplier", Attributes::PhaseHarmonicCurrentMultiplier::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-voltage", Attributes::InstantaneousVoltage::Id, credsIssuerConfig), // - make_unique(Id, "instantaneous-line-current", Attributes::InstantaneousLineCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-active-current", Attributes::InstantaneousActiveCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-reactive-current", Attributes::InstantaneousReactiveCurrent::Id, - credsIssuerConfig), // - make_unique(Id, "instantaneous-power", Attributes::InstantaneousPower::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage", Attributes::RmsVoltage::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-min", Attributes::RmsVoltageMin::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-max", Attributes::RmsVoltageMax::Id, credsIssuerConfig), // - make_unique(Id, "rms-current", Attributes::RmsCurrent::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-min", Attributes::RmsCurrentMin::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-max", Attributes::RmsCurrentMax::Id, credsIssuerConfig), // - make_unique(Id, "active-power", Attributes::ActivePower::Id, credsIssuerConfig), // - make_unique(Id, "active-power-min", Attributes::ActivePowerMin::Id, credsIssuerConfig), // - make_unique(Id, "active-power-max", Attributes::ActivePowerMax::Id, credsIssuerConfig), // - make_unique(Id, "reactive-power", Attributes::ReactivePower::Id, credsIssuerConfig), // - make_unique(Id, "apparent-power", Attributes::ApparentPower::Id, credsIssuerConfig), // - make_unique(Id, "power-factor", Attributes::PowerFactor::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-voltage-measurement-period", - Attributes::AverageRmsVoltageMeasurementPeriod::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage-counter", Attributes::AverageRmsUnderVoltageCounter::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage-period", Attributes::RmsExtremeOverVoltagePeriod::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage-period", Attributes::RmsExtremeUnderVoltagePeriod::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag-period", Attributes::RmsVoltageSagPeriod::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell-period", Attributes::RmsVoltageSwellPeriod::Id, - credsIssuerConfig), // - make_unique(Id, "ac-voltage-multiplier", Attributes::AcVoltageMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-voltage-divisor", Attributes::AcVoltageDivisor::Id, credsIssuerConfig), // - make_unique(Id, "ac-current-multiplier", Attributes::AcCurrentMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-current-divisor", Attributes::AcCurrentDivisor::Id, credsIssuerConfig), // - make_unique(Id, "ac-power-multiplier", Attributes::AcPowerMultiplier::Id, credsIssuerConfig), // - make_unique(Id, "ac-power-divisor", Attributes::AcPowerDivisor::Id, credsIssuerConfig), // - make_unique(Id, "overload-alarms-mask", Attributes::OverloadAlarmsMask::Id, credsIssuerConfig), // - make_unique(Id, "voltage-overload", Attributes::VoltageOverload::Id, credsIssuerConfig), // - make_unique(Id, "current-overload", Attributes::CurrentOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-overload-alarms-mask", Attributes::AcOverloadAlarmsMask::Id, credsIssuerConfig), // - make_unique(Id, "ac-voltage-overload", Attributes::AcVoltageOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-current-overload", Attributes::AcCurrentOverload::Id, credsIssuerConfig), // - make_unique(Id, "ac-active-power-overload", Attributes::AcActivePowerOverload::Id, - credsIssuerConfig), // - make_unique(Id, "ac-reactive-power-overload", Attributes::AcReactivePowerOverload::Id, - credsIssuerConfig), // - make_unique(Id, "average-rms-over-voltage", Attributes::AverageRmsOverVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage", Attributes::AverageRmsUnderVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage", Attributes::RmsExtremeOverVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage", Attributes::RmsExtremeUnderVoltage::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag", Attributes::RmsVoltageSag::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell", Attributes::RmsVoltageSwell::Id, credsIssuerConfig), // - make_unique(Id, "line-current-phase-b", Attributes::LineCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-current-phase-b", Attributes::ActiveCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "reactive-current-phase-b", Attributes::ReactiveCurrentPhaseB::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-phase-b", Attributes::RmsVoltagePhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-min-phase-b", Attributes::RmsVoltageMinPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-max-phase-b", Attributes::RmsVoltageMaxPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-phase-b", Attributes::RmsCurrentPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-min-phase-b", Attributes::RmsCurrentMinPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-max-phase-b", Attributes::RmsCurrentMaxPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-power-phase-b", Attributes::ActivePowerPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-power-min-phase-b", Attributes::ActivePowerMinPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "active-power-max-phase-b", Attributes::ActivePowerMaxPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "reactive-power-phase-b", Attributes::ReactivePowerPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "apparent-power-phase-b", Attributes::ApparentPowerPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "power-factor-phase-b", Attributes::PowerFactorPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-voltage-measurement-period-phase-b", - Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-over-voltage-counter-phase-b", - Attributes::AverageRmsOverVoltageCounterPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage-counter-phase-b", - Attributes::AverageRmsUnderVoltageCounterPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage-period-phase-b", - Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage-period-phase-b", - Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag-period-phase-b", Attributes::RmsVoltageSagPeriodPhaseB::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell-period-phase-b", Attributes::RmsVoltageSwellPeriodPhaseB::Id, - credsIssuerConfig), // - make_unique(Id, "line-current-phase-c", Attributes::LineCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-current-phase-c", Attributes::ActiveCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "reactive-current-phase-c", Attributes::ReactiveCurrentPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-phase-c", Attributes::RmsVoltagePhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-min-phase-c", Attributes::RmsVoltageMinPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-max-phase-c", Attributes::RmsVoltageMaxPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-phase-c", Attributes::RmsCurrentPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-min-phase-c", Attributes::RmsCurrentMinPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-current-max-phase-c", Attributes::RmsCurrentMaxPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-power-phase-c", Attributes::ActivePowerPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-power-min-phase-c", Attributes::ActivePowerMinPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "active-power-max-phase-c", Attributes::ActivePowerMaxPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "reactive-power-phase-c", Attributes::ReactivePowerPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "apparent-power-phase-c", Attributes::ApparentPowerPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "power-factor-phase-c", Attributes::PowerFactorPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-voltage-measurement-period-phase-c", - Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-over-voltage-counter-phase-c", - Attributes::AverageRmsOverVoltageCounterPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "average-rms-under-voltage-counter-phase-c", - Attributes::AverageRmsUnderVoltageCounterPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-over-voltage-period-phase-c", - Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-extreme-under-voltage-period-phase-c", - Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id, credsIssuerConfig), // - make_unique(Id, "rms-voltage-sag-period-phase-c", Attributes::RmsVoltageSagPeriodPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "rms-voltage-swell-period-phase-c", Attributes::RmsVoltageSwellPeriodPhaseC::Id, - credsIssuerConfig), // - make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // - make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // - make_unique(Id, "attribute-list", Attributes::AttributeList::Id, credsIssuerConfig), // - make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // - make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // - // - // Events - // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // - }; - - commands.RegisterCluster(clusterName, clusterCommands); -} void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * credsIssuerConfig) { using namespace chip::app::Clusters::UnitTesting; @@ -28230,9 +26914,7 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterIdentify(commands, credsIssuerConfig); registerClusterGroups(commands, credsIssuerConfig); registerClusterOnOff(commands, credsIssuerConfig); - registerClusterOnOffSwitchConfiguration(commands, credsIssuerConfig); registerClusterLevelControl(commands, credsIssuerConfig); - registerClusterBinaryInputBasic(commands, credsIssuerConfig); registerClusterPulseWidthModulation(commands, credsIssuerConfig); registerClusterDescriptor(commands, credsIssuerConfig); registerClusterBinding(commands, credsIssuerConfig); @@ -28306,7 +26988,6 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterDeviceEnergyManagementMode(commands, credsIssuerConfig); registerClusterDoorLock(commands, credsIssuerConfig); registerClusterWindowCovering(commands, credsIssuerConfig); - registerClusterBarrierControl(commands, credsIssuerConfig); registerClusterServiceArea(commands, credsIssuerConfig); registerClusterPumpConfigurationAndControl(commands, credsIssuerConfig); registerClusterThermostat(commands, credsIssuerConfig); @@ -28349,7 +27030,6 @@ void registerClusters(Commands & commands, CredentialIssuerCommands * credsIssue registerClusterContentAppObserver(commands, credsIssuerConfig); registerClusterEcosystemInformation(commands, credsIssuerConfig); registerClusterCommissionerControl(commands, credsIssuerConfig); - registerClusterElectricalMeasurement(commands, credsIssuerConfig); registerClusterUnitTesting(commands, credsIssuerConfig); registerClusterFaultInjection(commands, credsIssuerConfig); registerClusterSampleMei(commands, credsIssuerConfig); 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 8def02781d4b9a..e51e3eaa80e166 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8727,31 +8727,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("profileCount", indent + 1, value.profileCount)); - ReturnErrorOnFailure(DataModelLogger::LogValue("profileIntervalPeriod", indent + 1, value.profileIntervalPeriod)); - ReturnErrorOnFailure(DataModelLogger::LogValue("maxNumberOfIntervals", indent + 1, value.maxNumberOfIntervals)); - ReturnErrorOnFailure(DataModelLogger::LogValue("listOfAttributes", indent + 1, value.listOfAttributes)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("startTime", indent + 1, value.startTime)); - ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("profileIntervalPeriod", indent + 1, value.profileIntervalPeriod)); - ReturnErrorOnFailure(DataModelLogger::LogValue("numberOfIntervalsDelivered", indent + 1, value.numberOfIntervalsDelivered)); - ReturnErrorOnFailure(DataModelLogger::LogValue("attributeId", indent + 1, value.attributeId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("intervals", indent + 1, value.intervals)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const UnitTesting::Commands::TestSpecificResponse::DecodableType & value) { @@ -9089,52 +9064,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case OnOffSwitchConfiguration::Id: { - switch (path.mAttributeId) - { - case OnOffSwitchConfiguration::Attributes::SwitchType::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("switch type", 1, value); - } - case OnOffSwitchConfiguration::Attributes::SwitchActions::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("switch actions", 1, value); - } - case OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, OnOffSwitchConfiguration::Id); - } - case OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, OnOffSwitchConfiguration::Id); - } - case OnOffSwitchConfiguration::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); - } - case OnOffSwitchConfiguration::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAttributeId("AttributeList", 1, value, OnOffSwitchConfiguration::Id); - } - case OnOffSwitchConfiguration::Attributes::FeatureMap::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); - } - case OnOffSwitchConfiguration::Attributes::ClusterRevision::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } - } - break; - } case LevelControl::Id: { switch (path.mAttributeId) { @@ -9241,87 +9170,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BinaryInputBasic::Id: { - switch (path.mAttributeId) - { - case BinaryInputBasic::Attributes::ActiveText::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active text", 1, value); - } - case BinaryInputBasic::Attributes::Description::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("description", 1, value); - } - case BinaryInputBasic::Attributes::InactiveText::Id: { - chip::CharSpan value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("inactive text", 1, value); - } - case BinaryInputBasic::Attributes::OutOfService::Id: { - bool value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("out of service", 1, value); - } - case BinaryInputBasic::Attributes::Polarity::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("polarity", 1, value); - } - case BinaryInputBasic::Attributes::PresentValue::Id: { - bool value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("present value", 1, value); - } - case BinaryInputBasic::Attributes::Reliability::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reliability", 1, value); - } - case BinaryInputBasic::Attributes::StatusFlags::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("status flags", 1, value); - } - case BinaryInputBasic::Attributes::ApplicationType::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("application type", 1, value); - } - case BinaryInputBasic::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, BinaryInputBasic::Id); - } - case BinaryInputBasic::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, BinaryInputBasic::Id); - } - case BinaryInputBasic::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); - } - case BinaryInputBasic::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAttributeId("AttributeList", 1, value, BinaryInputBasic::Id); - } - case BinaryInputBasic::Attributes::FeatureMap::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); - } - case BinaryInputBasic::Attributes::ClusterRevision::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } - } - break; - } case PulseWidthModulation::Id: { switch (path.mAttributeId) { @@ -14742,92 +14590,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case BarrierControl::Id: { - switch (path.mAttributeId) - { - case BarrierControl::Attributes::BarrierMovingState::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier moving state", 1, value); - } - case BarrierControl::Attributes::BarrierSafetyStatus::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier safety status", 1, value); - } - case BarrierControl::Attributes::BarrierCapabilities::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier capabilities", 1, value); - } - case BarrierControl::Attributes::BarrierOpenEvents::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier open events", 1, value); - } - case BarrierControl::Attributes::BarrierCloseEvents::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier close events", 1, value); - } - case BarrierControl::Attributes::BarrierCommandOpenEvents::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier command open events", 1, value); - } - case BarrierControl::Attributes::BarrierCommandCloseEvents::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier command close events", 1, value); - } - case BarrierControl::Attributes::BarrierOpenPeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier open period", 1, value); - } - case BarrierControl::Attributes::BarrierClosePeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier close period", 1, value); - } - case BarrierControl::Attributes::BarrierPosition::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("barrier position", 1, value); - } - case BarrierControl::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, BarrierControl::Id); - } - case BarrierControl::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, BarrierControl::Id); - } - case BarrierControl::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); - } - case BarrierControl::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAttributeId("AttributeList", 1, value, BarrierControl::Id); - } - case BarrierControl::Attributes::FeatureMap::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); - } - case BarrierControl::Attributes::ClusterRevision::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ClusterRevision", 1, value); - } - } - break; - } case ServiceArea::Id: { switch (path.mAttributeId) { @@ -18246,809 +18008,133 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } break; } - case ElectricalMeasurement::Id: { + case UnitTesting::Id: { switch (path.mAttributeId) { - case ElectricalMeasurement::Attributes::MeasurementType::Id: { - uint32_t value; + case UnitTesting::Attributes::Boolean::Id: { + bool value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measurement type", 1, value); + return DataModelLogger::LogValue("boolean", 1, value); } - case ElectricalMeasurement::Attributes::DcVoltage::Id: { - int16_t value; + case UnitTesting::Attributes::Bitmap8::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc voltage", 1, value); + return DataModelLogger::LogValue("bitmap8", 1, value); } - case ElectricalMeasurement::Attributes::DcVoltageMin::Id: { - int16_t value; + case UnitTesting::Attributes::Bitmap16::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc voltage min", 1, value); + return DataModelLogger::LogValue("bitmap16", 1, value); } - case ElectricalMeasurement::Attributes::DcVoltageMax::Id: { - int16_t value; + case UnitTesting::Attributes::Bitmap32::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc voltage max", 1, value); + return DataModelLogger::LogValue("bitmap32", 1, value); } - case ElectricalMeasurement::Attributes::DcCurrent::Id: { - int16_t value; + case UnitTesting::Attributes::Bitmap64::Id: { + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc current", 1, value); + return DataModelLogger::LogValue("bitmap64", 1, value); } - case ElectricalMeasurement::Attributes::DcCurrentMin::Id: { - int16_t value; + case UnitTesting::Attributes::Int8u::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc current min", 1, value); + return DataModelLogger::LogValue("int8u", 1, value); } - case ElectricalMeasurement::Attributes::DcCurrentMax::Id: { - int16_t value; + case UnitTesting::Attributes::Int16u::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc current max", 1, value); + return DataModelLogger::LogValue("int16u", 1, value); } - case ElectricalMeasurement::Attributes::DcPower::Id: { - int16_t value; + case UnitTesting::Attributes::Int24u::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc power", 1, value); + return DataModelLogger::LogValue("int24u", 1, value); } - case ElectricalMeasurement::Attributes::DcPowerMin::Id: { - int16_t value; + case UnitTesting::Attributes::Int32u::Id: { + uint32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc power min", 1, value); + return DataModelLogger::LogValue("int32u", 1, value); } - case ElectricalMeasurement::Attributes::DcPowerMax::Id: { - int16_t value; + case UnitTesting::Attributes::Int40u::Id: { + uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc power max", 1, value); + return DataModelLogger::LogValue("int40u", 1, value); } - case ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id: { - uint16_t value; + case UnitTesting::Attributes::Int48u::Id: { + uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc voltage multiplier", 1, value); + return DataModelLogger::LogValue("int48u", 1, value); } - case ElectricalMeasurement::Attributes::DcVoltageDivisor::Id: { - uint16_t value; + case UnitTesting::Attributes::Int56u::Id: { + uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc voltage divisor", 1, value); + return DataModelLogger::LogValue("int56u", 1, value); } - case ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id: { - uint16_t value; + case UnitTesting::Attributes::Int64u::Id: { + uint64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc current multiplier", 1, value); + return DataModelLogger::LogValue("int64u", 1, value); } - case ElectricalMeasurement::Attributes::DcCurrentDivisor::Id: { - uint16_t value; + case UnitTesting::Attributes::Int8s::Id: { + int8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc current divisor", 1, value); + return DataModelLogger::LogValue("int8s", 1, value); } - case ElectricalMeasurement::Attributes::DcPowerMultiplier::Id: { - uint16_t value; + case UnitTesting::Attributes::Int16s::Id: { + int16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc power multiplier", 1, value); + return DataModelLogger::LogValue("int16s", 1, value); } - case ElectricalMeasurement::Attributes::DcPowerDivisor::Id: { - uint16_t value; + case UnitTesting::Attributes::Int24s::Id: { + int32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("dc power divisor", 1, value); + return DataModelLogger::LogValue("int24s", 1, value); } - case ElectricalMeasurement::Attributes::AcFrequency::Id: { - uint16_t value; + case UnitTesting::Attributes::Int32s::Id: { + int32_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac frequency", 1, value); + return DataModelLogger::LogValue("int32s", 1, value); } - case ElectricalMeasurement::Attributes::AcFrequencyMin::Id: { - uint16_t value; + case UnitTesting::Attributes::Int40s::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac frequency min", 1, value); + return DataModelLogger::LogValue("int40s", 1, value); } - case ElectricalMeasurement::Attributes::AcFrequencyMax::Id: { - uint16_t value; + case UnitTesting::Attributes::Int48s::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac frequency max", 1, value); + return DataModelLogger::LogValue("int48s", 1, value); } - case ElectricalMeasurement::Attributes::NeutralCurrent::Id: { - uint16_t value; + case UnitTesting::Attributes::Int56s::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("neutral current", 1, value); + return DataModelLogger::LogValue("int56s", 1, value); } - case ElectricalMeasurement::Attributes::TotalActivePower::Id: { - int32_t value; + case UnitTesting::Attributes::Int64s::Id: { + int64_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("total active power", 1, value); + return DataModelLogger::LogValue("int64s", 1, value); } - case ElectricalMeasurement::Attributes::TotalReactivePower::Id: { - int32_t value; + case UnitTesting::Attributes::Enum8::Id: { + uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("total reactive power", 1, value); + return DataModelLogger::LogValue("enum8", 1, value); } - case ElectricalMeasurement::Attributes::TotalApparentPower::Id: { - uint32_t value; + case UnitTesting::Attributes::Enum16::Id: { + uint16_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("total apparent power", 1, value); + return DataModelLogger::LogValue("enum16", 1, value); } - case ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id: { - int16_t value; + case UnitTesting::Attributes::FloatSingle::Id: { + float value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured 1st harmonic current", 1, value); + return DataModelLogger::LogValue("float_single", 1, value); } - case ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id: { - int16_t value; + case UnitTesting::Attributes::FloatDouble::Id: { + double value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured 3rd harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured 5th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured 7th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured 9th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured 11th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured phase 1st harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured phase 3rd harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured phase 5th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured phase 7th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured phase 9th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("measured phase 11th harmonic current", 1, value); - } - case ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac frequency multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac frequency divisor", 1, value); - } - case ElectricalMeasurement::Attributes::PowerMultiplier::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("power multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::PowerDivisor::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("power divisor", 1, value); - } - case ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id: { - int8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("harmonic current multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id: { - int8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("phase harmonic current multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::InstantaneousVoltage::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("instantaneous voltage", 1, value); - } - case ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("instantaneous line current", 1, value); - } - case ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("instantaneous active current", 1, value); - } - case ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("instantaneous reactive current", 1, value); - } - case ElectricalMeasurement::Attributes::InstantaneousPower::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("instantaneous power", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltage::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageMin::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage min", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageMax::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage max", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrent::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentMin::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current min", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentMax::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current max", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePower::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerMin::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power min", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerMax::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power max", 1, value); - } - case ElectricalMeasurement::Attributes::ReactivePower::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reactive power", 1, value); - } - case ElectricalMeasurement::Attributes::ApparentPower::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("apparent power", 1, value); - } - case ElectricalMeasurement::Attributes::PowerFactor::Id: { - int8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("power factor", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms voltage measurement period", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms under voltage counter", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme over voltage period", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme under voltage period", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage sag period", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage swell period", 1, value); - } - case ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac voltage multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::AcVoltageDivisor::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac voltage divisor", 1, value); - } - case ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac current multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::AcCurrentDivisor::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac current divisor", 1, value); - } - case ElectricalMeasurement::Attributes::AcPowerMultiplier::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac power multiplier", 1, value); - } - case ElectricalMeasurement::Attributes::AcPowerDivisor::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac power divisor", 1, value); - } - case ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("overload alarms mask", 1, value); - } - case ElectricalMeasurement::Attributes::VoltageOverload::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("voltage overload", 1, value); - } - case ElectricalMeasurement::Attributes::CurrentOverload::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("current overload", 1, value); - } - case ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac overload alarms mask", 1, value); - } - case ElectricalMeasurement::Attributes::AcVoltageOverload::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac voltage overload", 1, value); - } - case ElectricalMeasurement::Attributes::AcCurrentOverload::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac current overload", 1, value); - } - case ElectricalMeasurement::Attributes::AcActivePowerOverload::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac active power overload", 1, value); - } - case ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("ac reactive power overload", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms over voltage", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms under voltage", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme over voltage", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme under voltage", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSag::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage sag", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSwell::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage swell", 1, value); - } - case ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("line current phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active current phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reactive current phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage min phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage max phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current min phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current max phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power min phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power max phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reactive power phase b", 1, value); - } - case ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("apparent power phase b", 1, value); - } - case ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id: { - int8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("power factor phase b", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms voltage measurement period phase b", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms over voltage counter phase b", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms under voltage counter phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme over voltage period phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme under voltage period phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage sag period phase b", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage swell period phase b", 1, value); - } - case ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("line current phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active current phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reactive current phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage min phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage max phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current min phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms current max phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power min phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("active power max phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("reactive power phase c", 1, value); - } - case ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("apparent power phase c", 1, value); - } - case ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id: { - int8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("power factor phase c", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms voltage measurement period phase c", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms over voltage counter phase c", 1, value); - } - case ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("average rms under voltage counter phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme over voltage period phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms extreme under voltage period phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage sag period phase c", 1, value); - } - case ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("rms voltage swell period phase c", 1, value); - } - case ElectricalMeasurement::Attributes::GeneratedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogGeneratedCommandId("GeneratedCommandList", 1, value, ElectricalMeasurement::Id); - } - case ElectricalMeasurement::Attributes::AcceptedCommandList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAcceptedCommandId("AcceptedCommandList", 1, value, ElectricalMeasurement::Id); - } - case ElectricalMeasurement::Attributes::EventList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("EventList", 1, value); - } - case ElectricalMeasurement::Attributes::AttributeList::Id: { - chip::app::DataModel::DecodableList value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogAttributeId("AttributeList", 1, value, ElectricalMeasurement::Id); - } - case ElectricalMeasurement::Attributes::FeatureMap::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("FeatureMap", 1, value); - } - case ElectricalMeasurement::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) - { - case UnitTesting::Attributes::Boolean::Id: { - bool value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("boolean", 1, value); - } - case UnitTesting::Attributes::Bitmap8::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("bitmap8", 1, value); - } - case UnitTesting::Attributes::Bitmap16::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("bitmap16", 1, value); - } - case UnitTesting::Attributes::Bitmap32::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("bitmap32", 1, value); - } - case UnitTesting::Attributes::Bitmap64::Id: { - chip::BitMask value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("bitmap64", 1, value); - } - case UnitTesting::Attributes::Int8u::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int8u", 1, value); - } - case UnitTesting::Attributes::Int16u::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int16u", 1, value); - } - case UnitTesting::Attributes::Int24u::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int24u", 1, value); - } - case UnitTesting::Attributes::Int32u::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int32u", 1, value); - } - case UnitTesting::Attributes::Int40u::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int40u", 1, value); - } - case UnitTesting::Attributes::Int48u::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int48u", 1, value); - } - case UnitTesting::Attributes::Int56u::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int56u", 1, value); - } - case UnitTesting::Attributes::Int64u::Id: { - uint64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int64u", 1, value); - } - case UnitTesting::Attributes::Int8s::Id: { - int8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int8s", 1, value); - } - case UnitTesting::Attributes::Int16s::Id: { - int16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int16s", 1, value); - } - case UnitTesting::Attributes::Int24s::Id: { - int32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int24s", 1, value); - } - case UnitTesting::Attributes::Int32s::Id: { - int32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int32s", 1, value); - } - case UnitTesting::Attributes::Int40s::Id: { - int64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int40s", 1, value); - } - case UnitTesting::Attributes::Int48s::Id: { - int64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int48s", 1, value); - } - case UnitTesting::Attributes::Int56s::Id: { - int64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int56s", 1, value); - } - case UnitTesting::Attributes::Int64s::Id: { - int64_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("int64s", 1, value); - } - case UnitTesting::Attributes::Enum8::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("enum8", 1, value); - } - case UnitTesting::Attributes::Enum16::Id: { - uint16_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("enum16", 1, value); - } - case UnitTesting::Attributes::FloatSingle::Id: { - float value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("float_single", 1, value); - } - case UnitTesting::Attributes::FloatDouble::Id: { - double value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("float_double", 1, value); + return DataModelLogger::LogValue("float_double", 1, value); } case UnitTesting::Attributes::OctetString::Id: { chip::ByteSpan value; @@ -20098,22 +19184,6 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa } break; } - case ElectricalMeasurement::Id: { - switch (path.mCommandId) - { - case ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::Id: { - ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GetProfileInfoResponseCommand", 1, value); - } - case ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::Id: { - ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GetMeasurementProfileResponseCommand", 1, value); - } - } - break; - } case UnitTesting::Id: { switch (path.mCommandId) { 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 ce1aa0b46f01da..8ac710f0c27a0d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -847,12 +847,6 @@ LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::CommissionerControl::Commands::ReverseOpenCommissioningWindow::DecodableType & value); -static CHIP_ERROR -LogValue(const char * label, size_t indent, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::DecodableType & value); -static CHIP_ERROR -LogValue(const char * label, size_t indent, - const chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::UnitTesting::Commands::TestSpecificResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, 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 8f320e64e682b8..73c5f1ef371fa5 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -31,12 +31,8 @@ char const * ClusterIdToText(chip::ClusterId id) return "Groups"; case chip::app::Clusters::OnOff::Id: return "OnOff"; - case chip::app::Clusters::OnOffSwitchConfiguration::Id: - return "OnOffSwitchConfiguration"; case chip::app::Clusters::LevelControl::Id: return "LevelControl"; - case chip::app::Clusters::BinaryInputBasic::Id: - return "BinaryInputBasic"; case chip::app::Clusters::PulseWidthModulation::Id: return "PulseWidthModulation"; case chip::app::Clusters::Descriptor::Id: @@ -183,8 +179,6 @@ char const * ClusterIdToText(chip::ClusterId id) return "DoorLock"; case chip::app::Clusters::WindowCovering::Id: return "WindowCovering"; - case chip::app::Clusters::BarrierControl::Id: - return "BarrierControl"; case chip::app::Clusters::ServiceArea::Id: return "ServiceArea"; case chip::app::Clusters::PumpConfigurationAndControl::Id: @@ -269,8 +263,6 @@ char const * ClusterIdToText(chip::ClusterId id) return "EcosystemInformation"; case chip::app::Clusters::CommissionerControl::Id: return "CommissionerControl"; - case chip::app::Clusters::ElectricalMeasurement::Id: - return "ElectricalMeasurement"; case chip::app::Clusters::UnitTesting::Id: return "UnitTesting"; case chip::app::Clusters::FaultInjection::Id: @@ -359,29 +351,6 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "Unknown"; } } - case chip::app::Clusters::OnOffSwitchConfiguration::Id: { - switch (id) - { - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id: - return "SwitchType"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id: - return "SwitchActions"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::GeneratedCommandList::Id: - return "GeneratedCommandList"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AcceptedCommandList::Id: - return "AcceptedCommandList"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::EventList::Id: - return "EventList"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::AttributeList::Id: - return "AttributeList"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::FeatureMap::Id: - return "FeatureMap"; - case chip::app::Clusters::OnOffSwitchConfiguration::Attributes::ClusterRevision::Id: - return "ClusterRevision"; - default: - return "Unknown"; - } - } case chip::app::Clusters::LevelControl::Id: { switch (id) { @@ -429,43 +398,6 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "Unknown"; } } - case chip::app::Clusters::BinaryInputBasic::Id: { - switch (id) - { - case chip::app::Clusters::BinaryInputBasic::Attributes::ActiveText::Id: - return "ActiveText"; - case chip::app::Clusters::BinaryInputBasic::Attributes::Description::Id: - return "Description"; - case chip::app::Clusters::BinaryInputBasic::Attributes::InactiveText::Id: - return "InactiveText"; - case chip::app::Clusters::BinaryInputBasic::Attributes::OutOfService::Id: - return "OutOfService"; - case chip::app::Clusters::BinaryInputBasic::Attributes::Polarity::Id: - return "Polarity"; - case chip::app::Clusters::BinaryInputBasic::Attributes::PresentValue::Id: - return "PresentValue"; - case chip::app::Clusters::BinaryInputBasic::Attributes::Reliability::Id: - return "Reliability"; - case chip::app::Clusters::BinaryInputBasic::Attributes::StatusFlags::Id: - return "StatusFlags"; - case chip::app::Clusters::BinaryInputBasic::Attributes::ApplicationType::Id: - return "ApplicationType"; - case chip::app::Clusters::BinaryInputBasic::Attributes::GeneratedCommandList::Id: - return "GeneratedCommandList"; - case chip::app::Clusters::BinaryInputBasic::Attributes::AcceptedCommandList::Id: - return "AcceptedCommandList"; - case chip::app::Clusters::BinaryInputBasic::Attributes::EventList::Id: - return "EventList"; - case chip::app::Clusters::BinaryInputBasic::Attributes::AttributeList::Id: - return "AttributeList"; - case chip::app::Clusters::BinaryInputBasic::Attributes::FeatureMap::Id: - return "FeatureMap"; - case chip::app::Clusters::BinaryInputBasic::Attributes::ClusterRevision::Id: - return "ClusterRevision"; - default: - return "Unknown"; - } - } case chip::app::Clusters::PulseWidthModulation::Id: { switch (id) { @@ -2937,45 +2869,6 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "Unknown"; } } - case chip::app::Clusters::BarrierControl::Id: { - switch (id) - { - case chip::app::Clusters::BarrierControl::Attributes::BarrierMovingState::Id: - return "BarrierMovingState"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierSafetyStatus::Id: - return "BarrierSafetyStatus"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierCapabilities::Id: - return "BarrierCapabilities"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierOpenEvents::Id: - return "BarrierOpenEvents"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierCloseEvents::Id: - return "BarrierCloseEvents"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierCommandOpenEvents::Id: - return "BarrierCommandOpenEvents"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierCommandCloseEvents::Id: - return "BarrierCommandCloseEvents"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierOpenPeriod::Id: - return "BarrierOpenPeriod"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierClosePeriod::Id: - return "BarrierClosePeriod"; - case chip::app::Clusters::BarrierControl::Attributes::BarrierPosition::Id: - return "BarrierPosition"; - case chip::app::Clusters::BarrierControl::Attributes::GeneratedCommandList::Id: - return "GeneratedCommandList"; - case chip::app::Clusters::BarrierControl::Attributes::AcceptedCommandList::Id: - return "AcceptedCommandList"; - case chip::app::Clusters::BarrierControl::Attributes::EventList::Id: - return "EventList"; - case chip::app::Clusters::BarrierControl::Attributes::AttributeList::Id: - return "AttributeList"; - case chip::app::Clusters::BarrierControl::Attributes::FeatureMap::Id: - return "FeatureMap"; - case chip::app::Clusters::BarrierControl::Attributes::ClusterRevision::Id: - return "ClusterRevision"; - default: - return "Unknown"; - } - } case chip::app::Clusters::ServiceArea::Id: { switch (id) { @@ -4526,281 +4419,6 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "Unknown"; } } - case chip::app::Clusters::ElectricalMeasurement::Id: { - switch (id) - { - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasurementType::Id: - return "MeasurementType"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltage::Id: - return "DcVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMin::Id: - return "DcVoltageMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMax::Id: - return "DcVoltageMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrent::Id: - return "DcCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMin::Id: - return "DcCurrentMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMax::Id: - return "DcCurrentMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcPower::Id: - return "DcPower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMin::Id: - return "DcPowerMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMax::Id: - return "DcPowerMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageMultiplier::Id: - return "DcVoltageMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcVoltageDivisor::Id: - return "DcVoltageDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentMultiplier::Id: - return "DcCurrentMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcCurrentDivisor::Id: - return "DcCurrentDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerMultiplier::Id: - return "DcPowerMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::DcPowerDivisor::Id: - return "DcPowerDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequency::Id: - return "AcFrequency"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMin::Id: - return "AcFrequencyMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMax::Id: - return "AcFrequencyMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::NeutralCurrent::Id: - return "NeutralCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::TotalActivePower::Id: - return "TotalActivePower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::TotalReactivePower::Id: - return "TotalReactivePower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::TotalApparentPower::Id: - return "TotalApparentPower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::Measured1stHarmonicCurrent::Id: - return "Measured1stHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::Measured3rdHarmonicCurrent::Id: - return "Measured3rdHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::Measured5thHarmonicCurrent::Id: - return "Measured5thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::Measured7thHarmonicCurrent::Id: - return "Measured7thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::Measured9thHarmonicCurrent::Id: - return "Measured9thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::Measured11thHarmonicCurrent::Id: - return "Measured11thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase1stHarmonicCurrent::Id: - return "MeasuredPhase1stHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase3rdHarmonicCurrent::Id: - return "MeasuredPhase3rdHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase5thHarmonicCurrent::Id: - return "MeasuredPhase5thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase7thHarmonicCurrent::Id: - return "MeasuredPhase7thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase9thHarmonicCurrent::Id: - return "MeasuredPhase9thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::MeasuredPhase11thHarmonicCurrent::Id: - return "MeasuredPhase11thHarmonicCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyMultiplier::Id: - return "AcFrequencyMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcFrequencyDivisor::Id: - return "AcFrequencyDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::PowerMultiplier::Id: - return "PowerMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::PowerDivisor::Id: - return "PowerDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::HarmonicCurrentMultiplier::Id: - return "HarmonicCurrentMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::PhaseHarmonicCurrentMultiplier::Id: - return "PhaseHarmonicCurrentMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousVoltage::Id: - return "InstantaneousVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousLineCurrent::Id: - return "InstantaneousLineCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousActiveCurrent::Id: - return "InstantaneousActiveCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousReactiveCurrent::Id: - return "InstantaneousReactiveCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::InstantaneousPower::Id: - return "InstantaneousPower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltage::Id: - return "RmsVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMin::Id: - return "RmsVoltageMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMax::Id: - return "RmsVoltageMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrent::Id: - return "RmsCurrent"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMin::Id: - return "RmsCurrentMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMax::Id: - return "RmsCurrentMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePower::Id: - return "ActivePower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMin::Id: - return "ActivePowerMin"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMax::Id: - return "ActivePowerMax"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePower::Id: - return "ReactivePower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPower::Id: - return "ApparentPower"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactor::Id: - return "PowerFactor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriod::Id: - return "AverageRmsVoltageMeasurementPeriod"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounter::Id: - return "AverageRmsUnderVoltageCounter"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriod::Id: - return "RmsExtremeOverVoltagePeriod"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriod::Id: - return "RmsExtremeUnderVoltagePeriod"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriod::Id: - return "RmsVoltageSagPeriod"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriod::Id: - return "RmsVoltageSwellPeriod"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageMultiplier::Id: - return "AcVoltageMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageDivisor::Id: - return "AcVoltageDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentMultiplier::Id: - return "AcCurrentMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentDivisor::Id: - return "AcCurrentDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerMultiplier::Id: - return "AcPowerMultiplier"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcPowerDivisor::Id: - return "AcPowerDivisor"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::OverloadAlarmsMask::Id: - return "OverloadAlarmsMask"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::VoltageOverload::Id: - return "VoltageOverload"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::CurrentOverload::Id: - return "CurrentOverload"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcOverloadAlarmsMask::Id: - return "AcOverloadAlarmsMask"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcVoltageOverload::Id: - return "AcVoltageOverload"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcCurrentOverload::Id: - return "AcCurrentOverload"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcActivePowerOverload::Id: - return "AcActivePowerOverload"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcReactivePowerOverload::Id: - return "AcReactivePowerOverload"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltage::Id: - return "AverageRmsOverVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltage::Id: - return "AverageRmsUnderVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltage::Id: - return "RmsExtremeOverVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltage::Id: - return "RmsExtremeUnderVoltage"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSag::Id: - return "RmsVoltageSag"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwell::Id: - return "RmsVoltageSwell"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseB::Id: - return "LineCurrentPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseB::Id: - return "ActiveCurrentPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseB::Id: - return "ReactiveCurrentPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseB::Id: - return "RmsVoltagePhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseB::Id: - return "RmsVoltageMinPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseB::Id: - return "RmsVoltageMaxPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseB::Id: - return "RmsCurrentPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseB::Id: - return "RmsCurrentMinPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseB::Id: - return "RmsCurrentMaxPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseB::Id: - return "ActivePowerPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseB::Id: - return "ActivePowerMinPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseB::Id: - return "ActivePowerMaxPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseB::Id: - return "ReactivePowerPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseB::Id: - return "ApparentPowerPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseB::Id: - return "PowerFactorPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseB::Id: - return "AverageRmsVoltageMeasurementPeriodPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseB::Id: - return "AverageRmsOverVoltageCounterPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseB::Id: - return "AverageRmsUnderVoltageCounterPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseB::Id: - return "RmsExtremeOverVoltagePeriodPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseB::Id: - return "RmsExtremeUnderVoltagePeriodPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseB::Id: - return "RmsVoltageSagPeriodPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseB::Id: - return "RmsVoltageSwellPeriodPhaseB"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::LineCurrentPhaseC::Id: - return "LineCurrentPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActiveCurrentPhaseC::Id: - return "ActiveCurrentPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ReactiveCurrentPhaseC::Id: - return "ReactiveCurrentPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltagePhaseC::Id: - return "RmsVoltagePhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMinPhaseC::Id: - return "RmsVoltageMinPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageMaxPhaseC::Id: - return "RmsVoltageMaxPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentPhaseC::Id: - return "RmsCurrentPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMinPhaseC::Id: - return "RmsCurrentMinPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsCurrentMaxPhaseC::Id: - return "RmsCurrentMaxPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerPhaseC::Id: - return "ActivePowerPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMinPhaseC::Id: - return "ActivePowerMinPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ActivePowerMaxPhaseC::Id: - return "ActivePowerMaxPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ReactivePowerPhaseC::Id: - return "ReactivePowerPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ApparentPowerPhaseC::Id: - return "ApparentPowerPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::PowerFactorPhaseC::Id: - return "PowerFactorPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: - return "AverageRmsVoltageMeasurementPeriodPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsOverVoltageCounterPhaseC::Id: - return "AverageRmsOverVoltageCounterPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: - return "AverageRmsUnderVoltageCounterPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: - return "RmsExtremeOverVoltagePeriodPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: - return "RmsExtremeUnderVoltagePeriodPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSagPeriodPhaseC::Id: - return "RmsVoltageSagPeriodPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::RmsVoltageSwellPeriodPhaseC::Id: - return "RmsVoltageSwellPeriodPhaseC"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::GeneratedCommandList::Id: - return "GeneratedCommandList"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AcceptedCommandList::Id: - return "AcceptedCommandList"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::EventList::Id: - return "EventList"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::AttributeList::Id: - return "AttributeList"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::FeatureMap::Id: - return "FeatureMap"; - case chip::app::Clusters::ElectricalMeasurement::Attributes::ClusterRevision::Id: - return "ClusterRevision"; - default: - return "Unknown"; - } - } case chip::app::Clusters::UnitTesting::Id: { switch (id) { @@ -5780,17 +5398,6 @@ char const * AcceptedCommandIdToText(chip::ClusterId cluster, chip::CommandId id return "Unknown"; } } - case chip::app::Clusters::BarrierControl::Id: { - switch (id) - { - case chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Id: - return "BarrierControlGoToPercent"; - case chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Id: - return "BarrierControlStop"; - default: - return "Unknown"; - } - } case chip::app::Clusters::ServiceArea::Id: { switch (id) { @@ -6105,17 +5712,6 @@ char const * AcceptedCommandIdToText(chip::ClusterId cluster, chip::CommandId id return "Unknown"; } } - case chip::app::Clusters::ElectricalMeasurement::Id: { - switch (id) - { - case chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoCommand::Id: - return "GetProfileInfoCommand"; - case chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Id: - return "GetMeasurementProfileCommand"; - default: - return "Unknown"; - } - } case chip::app::Clusters::UnitTesting::Id: { switch (id) { @@ -6637,17 +6233,6 @@ char const * GeneratedCommandIdToText(chip::ClusterId cluster, chip::CommandId i return "Unknown"; } } - case chip::app::Clusters::ElectricalMeasurement::Id: { - switch (id) - { - case chip::app::Clusters::ElectricalMeasurement::Commands::GetProfileInfoResponseCommand::Id: - return "GetProfileInfoResponseCommand"; - case chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileResponseCommand::Id: - return "GetMeasurementProfileResponseCommand"; - default: - return "Unknown"; - } - } case chip::app::Clusters::UnitTesting::Id: { switch (id) { 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 4cba7d57785f10..0f45b57afaf21c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -40,9 +40,7 @@ | Identify | 0x0003 | | Groups | 0x0004 | | OnOff | 0x0006 | -| OnOffSwitchConfiguration | 0x0007 | | LevelControl | 0x0008 | -| BinaryInputBasic | 0x000F | | PulseWidthModulation | 0x001C | | Descriptor | 0x001D | | Binding | 0x001E | @@ -116,7 +114,6 @@ | DeviceEnergyManagementMode | 0x009F | | DoorLock | 0x0101 | | WindowCovering | 0x0102 | -| BarrierControl | 0x0103 | | ServiceArea | 0x0150 | | PumpConfigurationAndControl | 0x0200 | | Thermostat | 0x0201 | @@ -159,7 +156,6 @@ | ContentAppObserver | 0x0510 | | EcosystemInformation | 0x0750 | | CommissionerControl | 0x0751 | -| ElectricalMeasurement | 0x0B04 | | UnitTesting | 0xFFF1FC05| | FaultInjection | 0xFFF1FC06| | SampleMei | 0xFFF1FC20|