diff --git a/examples/chip-tool/templates/tests.js b/examples/chip-tool/templates/tests.js index 8961aea870e187..bbd36ec72f3340 100644 --- a/examples/chip-tool/templates/tests.js +++ b/examples/chip-tool/templates/tests.js @@ -20,6 +20,7 @@ function getTests() const BinaryInput = [ 'Test_TC_BI_1_1', 'Test_TC_BI_2_1', + 'Test_TC_BI_2_2', ]; const BooleanState = [ @@ -132,6 +133,7 @@ function getTests() const Thermostat = [ 'Test_TC_TSTAT_1_1', + 'Test_TC_TSTAT_2_1', ]; const ThermostatUserConfiguration = [ @@ -142,6 +144,7 @@ function getTests() const ThreadNetworkDiagnostics = [ 'Test_TC_DIAGTH_1_1', + 'Test_TC_DIAGSW_3_2', ]; const WindowCovering = [ diff --git a/src/app/tests/suites/certification/Test_TC_BI_2_2.yaml b/src/app/tests/suites/certification/Test_TC_BI_2_2.yaml new file mode 100644 index 00000000000000..38b76e30fc9a62 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_BI_2_2.yaml @@ -0,0 +1,134 @@ +# 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: 18.2.2. [TC-BI-2.2] Primary functionality with server as DUT + +config: + cluster: "Binary Input (Basic)" + endpoint: 1 + +tests: + - label: "Reads PresentValue attribute from DUT" + command: "readAttribute" + attribute: "present value" + response: + value: 0 + + - label: "Reads OutOfService attribute from DUT" + command: "readAttribute" + attribute: "out of service" + response: + value: 0 + + - label: "Reads StatusFlags attribute from DUT" + command: "readAttribute" + attribute: "status flags" + response: + value: 0 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to change the sensor value to TRUE" + disabled: true + + - label: "Reads PresentValue attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "present value" + response: + value: 1 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to change the sensor value to FALSE" + disabled: true + + - label: "Reads PresentValue attribute from DUT" + command: "readAttribute" + attribute: "present value" + response: + value: 0 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to Trigger an OutOfService state" + disabled: true + + - label: "Reads OutOfService attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "out of service" + response: + value: 1 + + - label: "Reads StatusFlags attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "status flags" + response: + value: 4 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to Clear the OutOfService state if possible" + disabled: true + + - label: "Reads OutOfService attribute from DUT" + command: "readAttribute" + attribute: "out of service" + response: + value: 0 + + - label: "Reads StatusFlags attribute from DUT" + command: "readAttribute" + attribute: "status flags" + response: + value: 0 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to Trigger an Alarm state" + disabled: true + + - label: "Reads StatusFlags attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "status flags" + response: + value: 1 + + - label: "Operate on device to Clear the Alarm state if possible" + disabled: true + + - label: "Reads StatusFlags attribute from DUT" + command: "readAttribute" + attribute: "status flags" + response: + value: 0 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to Trigger an Fault state" + disabled: true + + - label: "Reads StatusFlags attribute from DUT" + disabled: true + command: "readAttribute" + attribute: "status flags" + response: + value: 2 + + #issue #11475 User action needed, need to implement in YAML framework + - label: "Operate on device to Clear the Fault state if possible" + disabled: true + + - label: "Reads StatusFlags attribute from DUT" + command: "readAttribute" + attribute: "status flags" + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_DIAGSW_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DIAGSW_3_2.yaml new file mode 100644 index 00000000000000..3764d42123622d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DIAGSW_3_2.yaml @@ -0,0 +1,46 @@ +# 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: 48.1.4. [TC-DIAGSW-3.2] Command received functionality with server as DUT + +config: + cluster: "Software Diagnostics" + endpoint: 1 + +tests: + #issue #11578 ResetWatermarks command is Failing + - label: "Sends ResetWatermarks to DUT" + disabled: true + command: "ResetWatermarks" + + - label: "Reads a list of ThreadMetrics struct attribute from DUT." + disabled: true + command: "readAttribute" + attribute: "ThreadMetrics" + response: + value: 0 + + - label: "Reads CurrentHeapUsed attribute value from DUT" + disabled: true + command: "readAttribute" + attribute: "CurrentHeapUsed" + response: + value: 0 + + - label: "Reads CurrentHeapHighWaterMark attribute value from DUT" + disabled: true + command: "readAttribute" + attribute: "CurrentHeapHighWatermark" + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml new file mode 100644 index 00000000000000..128e085d00f0d3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -0,0 +1,1682 @@ +# 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: 42.2.1. [TC-TSTAT-2.1] Attributes with server as DUT + +config: + cluster: "Thermostat" + endpoint: 1 + +tests: + #issue #11524 disabled steps are for attributes not supported in YAML framework + - label: "Reads mandatory attributes from DUT: LocalTemperature" + disabled: true + command: "readAttribute" + attribute: "local temperature" + response: + value: null + + - label: + "Reads constraints of mandatory attributes from DUT: LocalTemperature" + command: "readAttribute" + attribute: "local temperature" + response: + constraints: + type: int16 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + LocalTemperature" + disabled: true + command: "writeAttribute" + attribute: "local temperature" + arguments: + value: null + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: LocalTemperature" + disabled: true + command: "readAttribute" + attribute: "local temperature" + response: + value: null + + - label: "Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit" + command: "readAttribute" + attribute: "abs min heat setpoint limit" + response: + value: 700 + + - label: + "Reads constraints of mandatory attributes from DUT: + AbsMinHeatSetpointLimit" + command: "readAttribute" + attribute: "abs min heat setpoint limit" + response: + constraints: + type: int16 + minValue: 700 + maxValue: 3000 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + AbsMinHeatSetpointLimit" + command: "writeAttribute" + attribute: "abs min heat setpoint limit" + arguments: + value: 700 + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit" + command: "readAttribute" + attribute: "abs min heat setpoint limit" + response: + value: 700 + + - label: "Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit" + command: "readAttribute" + attribute: "abs max heat setpoint limit" + response: + value: 3000 + + - label: + "Reads constraints of mandatory attributes from DUT: + AbsMaxHeatSetpointLimit" + command: "readAttribute" + attribute: "abs max heat setpoint limit" + response: + constraints: + type: int16 + minValue: 700 + maxValue: 3000 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + AbsMaxHeatSetpointLimit" + command: "writeAttribute" + attribute: "abs max heat setpoint limit" + arguments: + value: 3000 + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit" + command: "readAttribute" + attribute: "abs max heat setpoint limit" + response: + value: 3000 + + - label: "Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit" + command: "readAttribute" + attribute: "abs min cool setpoint limit" + response: + value: 1600 + + - label: + "Reads constraints of mandatory attributes from DUT: + AbsMinCoolSetpointLimit" + command: "readAttribute" + attribute: "abs min cool setpoint limit" + response: + constraints: + type: int16 + minValue: 1600 + maxValue: 3200 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + AbsMinCoolSetpointLimit" + command: "writeAttribute" + attribute: "abs min cool setpoint limit" + arguments: + value: 1600 + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit" + command: "readAttribute" + attribute: "abs min cool setpoint limit" + response: + value: 1600 + + - label: "Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit" + command: "readAttribute" + attribute: "abs max cool setpoint limit" + response: + value: 3200 + + - label: + "Reads constraints of mandatory attributes from DUT: + AbsMaxCoolSetpointLimit" + command: "readAttribute" + attribute: "abs max cool setpoint limit" + response: + constraints: + type: int16 + minValue: 1600 + maxValue: 3200 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + AbsMaxCoolSetpointLimit" + command: "writeAttribute" + attribute: "abs max cool setpoint limit" + arguments: + value: 3200 + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit" + command: "readAttribute" + attribute: "abs max cool setpoint limit" + response: + value: 3200 + + - label: + "Reads constraints of mandatory attributes from DUT: PICoolingDemand" + disabled: true + command: "readAttribute" + attribute: "PICoolingDemand" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 100 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + PICoolingDemand" + disabled: true + command: "writeAttribute" + attribute: "PICoolingDemand" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: PICoolingDemand" + disabled: true + command: "readAttribute" + attribute: "PICoolingDemand" + response: + value: 0 + + - label: + "Reads constraints of mandatory attributes from DUT: PIHeatingDemand" + disabled: true + command: "readAttribute" + attribute: "PIHeatingDemand" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 100 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + PIHeatingDemand" + disabled: true + command: "writeAttribute" + attribute: "PIHeatingDemand" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back mandatory attributes from DUT: PIHeatingDemand" + disabled: true + command: "readAttribute" + attribute: "PIHeatingDemand" + response: + value: 0 + + - label: "Reads mandatory attributes from DUT: OccupiedCoolingSetpoint" + command: "readAttribute" + attribute: "occupied cooling setpoint" + response: + value: 2600 + + - label: + "Reads constraints of mandatory attributes from DUT: + OccupiedCoolingSetpoint" + command: "readAttribute" + attribute: "occupied cooling setpoint" + response: + constraints: + type: int16 + minValue: 1600 + maxValue: 2600 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + OccupiedCoolingSetpoint" + command: "writeAttribute" + attribute: "occupied cooling setpoint" + arguments: + value: 2600 + + - label: "Read back mandatory attributes from DUT: OccupiedCoolingSetpoint" + command: "readAttribute" + attribute: "occupied cooling setpoint" + response: + value: 2600 + + - label: "Reads mandatory attributes from DUT: OccupiedHeatingSetpoint" + command: "readAttribute" + attribute: "occupied heating setpoint" + response: + value: 2000 + + - label: + "Reads constraints of mandatory attributes from DUT: + OccupiedHeatingSetpoint" + command: "readAttribute" + attribute: "occupied heating setpoint" + response: + constraints: + type: int16 + minValue: 700 + maxValue: 2600 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + OccupiedHeatingSetpoint" + command: "writeAttribute" + attribute: "occupied heating setpoint" + arguments: + value: 2000 + + - label: "Read back mandatory attributes from DUT: OccupiedHeatingSetpoint" + command: "readAttribute" + attribute: "occupied heating setpoint" + response: + value: 2000 + + - label: "Reads mandatory attributes from DUT: UnoccupiedCoolingSetpoint" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + response: + value: 2600 + + - label: + "Reads constraints of mandatory attributes from DUT: + UnoccupiedCoolingSetpoint" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + response: + constraints: + type: int16 + minValue: 1600 + maxValue: 2600 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + UnoccupiedCoolingSetpoint" + disabled: true + command: "writeAttribute" + attribute: "UnoccupiedCoolingSetpoint" + arguments: + value: 2600 + + - label: + "Read back mandatory attributes from DUT: UnoccupiedCoolingSetpoint" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedCoolingSetpoint" + response: + value: 2600 + + - label: "Reads mandatory attributes from DUT: UnoccupiedHeatingSetpoint" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedHeatingSetpoint" + response: + value: 2000 + + - label: + "Reads constraints of mandatory attributes from DUT: + UnoccupiedHeatingSetpoint" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedHeatingSetpoint" + response: + constraints: + type: int16 + minValue: 700 + maxValue: 2000 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + UnoccupiedHeatingSetpoint" + disabled: true + command: "writeAttribute" + attribute: "UnoccupiedHeatingSetpoint" + arguments: + value: 2000 + + - label: + "Read back mandatory attributes from DUT: UnoccupiedHeatingSetpoint" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedHeatingSetpoint" + response: + value: 2000 + + - label: "Reads mandatory attributes from DUT: MinHeatSetpointLimit" + command: "readAttribute" + attribute: "min heat setpoint limit" + response: + value: 700 + + - label: + "Reads constraints of mandatory attributes from DUT: + MinHeatSetpointLimit" + command: "readAttribute" + attribute: "min heat setpoint limit" + response: + constraints: + type: int16 + minValue: 700 + maxValue: 3000 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + MinHeatSetpointLimit" + command: "writeAttribute" + attribute: "min heat setpoint limit" + arguments: + value: 700 + + - label: "Read back mandatory attributes from DUT: MinHeatSetpointLimit" + command: "readAttribute" + attribute: "min heat setpoint limit" + response: + value: 700 + + - label: "Reads mandatory attributes from DUT: MaxHeatSetpointLimit" + command: "readAttribute" + attribute: "max heat setpoint limit" + response: + value: 3000 + + - label: + "Reads constraints of mandatory attributes from DUT: + MaxHeatSetpointLimit" + command: "readAttribute" + attribute: "max heat setpoint limit" + response: + constraints: + type: int16 + minValue: 700 + maxValue: 3000 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + MaxHeatSetpointLimit" + command: "writeAttribute" + attribute: "max heat setpoint limit" + arguments: + value: 3000 + + - label: "Read back mandatory attributes from DUT: MaxHeatSetpointLimit" + command: "readAttribute" + attribute: "max heat setpoint limit" + response: + value: 3000 + + - label: "Reads mandatory attributes from DUT: MinCoolSetpointLimit" + command: "readAttribute" + attribute: "min cool setpoint limit" + response: + value: 1600 + + - label: + "Reads constraints of mandatory attributes from DUT: + MinCoolSetpointLimit" + command: "readAttribute" + attribute: "min cool setpoint limit" + response: + constraints: + type: int16 + minValue: 1600 + maxValue: 3200 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + MinCoolSetpointLimit" + command: "writeAttribute" + attribute: "min cool setpoint limit" + arguments: + value: 1600 + + - label: "Read back mandatory attributes from DUT: MinCoolSetpointLimit" + command: "readAttribute" + attribute: "min cool setpoint limit" + response: + value: 1600 + + - label: "Reads mandatory attributes from DUT: MaxCoolSetpointLimit" + command: "readAttribute" + attribute: "max cool setpoint limit" + response: + value: 3200 + + - label: + "Reads constraints of mandatory attributes from DUT: + MaxCoolSetpointLimit" + command: "readAttribute" + attribute: "max cool setpoint limit" + response: + constraints: + type: int16 + minValue: 1600 + maxValue: 3200 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + MaxCoolSetpointLimit" + command: "writeAttribute" + attribute: "max cool setpoint limit" + arguments: + value: 3200 + + - label: "Read back mandatory attributes from DUT: MaxCoolSetpointLimit" + command: "readAttribute" + attribute: "max cool setpoint limit" + response: + value: 3200 + + - label: "Reads mandatory attributes from DUT: ControlSequenceOfOperation" + command: "readAttribute" + attribute: "control sequence of operation" + response: + value: 4 + + - label: + "Reads constraints of mandatory attributes from DUT: + ControlSequenceOfOperation" + command: "readAttribute" + attribute: "control sequence of operation" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 5 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + ControlSequenceOfOperation" + command: "writeAttribute" + attribute: "control sequence of operation" + arguments: + value: 4 + + - label: + "Read back mandatory attributes from DUT: ControlSequenceOfOperation" + command: "readAttribute" + attribute: "control sequence of operation" + response: + value: 4 + + - label: "Reads mandatory attributes from DUT: SystemMode" + command: "readAttribute" + attribute: "system mode" + response: + value: 1 + + - label: "Reads constraints of mandatory attributes from DUT: SystemMode" + command: "readAttribute" + attribute: "system mode" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: + "Writes the respective default value to mandatory attributes to DUT: + SystemMode" + command: "writeAttribute" + attribute: "system mode" + arguments: + value: 1 + + - label: "Read back mandatory attributes from DUT: SystemMode" + command: "readAttribute" + attribute: "system mode" + response: + value: 1 + + - label: "Reads optional attributes from DUT: OutdoorTemperature" + disabled: true + command: "readAttribute" + attribute: "OutdoorTemperature" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: OutdoorTemperature" + disabled: true + command: "readAttribute" + attribute: "OutdoorTemperature" + response: + constraints: + type: int16 + + - label: + "Writes the respective default value to optional attributes to DUT: + OutdoorTemperature" + disabled: true + command: "writeAttribute" + attribute: "OutdoorTemperature" + arguments: + value: null + + - label: "Read back optional attributes from DUT: OutdoorTemperature" + disabled: true + command: "readAttribute" + attribute: "OutdoorTemperature" + response: + value: null + + - label: "Reads optional attributes from DUT: Occupancy" + disabled: true + command: "readAttribute" + attribute: "Occupancy" + response: + value: 1 + + - label: "Reads constraints of optional attributes from DUT: Occupancy" + disabled: true + command: "readAttribute" + attribute: "Occupancy" + response: + constraints: + type: map8 + minValue: 0 + maxValue: 1 + + - label: + "Writes the respective default value to optional attributes to DUT: + Occupancy" + disabled: true + command: "writeAttribute" + attribute: "Occupancy" + arguments: + value: 1 + + - label: "Read back optional attributes from DUT: Occupancy" + disabled: true + command: "readAttribute" + attribute: "Occupancy" + response: + value: 1 + + - label: "Reads optionl attributes from DUT: HVACSystemTypeConfiguration" + disabled: true + command: "readAttribute" + attribute: "HVACSystemTypeConfiguration" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + HVACSystemTypeConfiguration" + disabled: true + command: "readAttribute" + attribute: "HVACSystemTypeConfiguration" + response: + constraints: + type: map8 + minValue: 0 + maxValue: 5 + + - label: + "Writes the respective default value to optional attributes to DUT: + HVACSystemTypeConfiguration" + disabled: true + command: "writeAttribute" + attribute: "HVACSystemTypeConfiguration" + arguments: + value: 0 + + - label: + "Read back optional attributes from DUT: HVACSystemTypeConfiguration" + disabled: true + command: "readAttribute" + attribute: "HVACSystemTypeConfiguration" + response: + value: 0 + + - label: "Reads optional attributes from DUT: LocalTemperatureCalibration" + disabled: true + command: "readAttribute" + attribute: "LocalTemperatureCalibration" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + LocalTemperatureCalibration" + disabled: true + command: "readAttribute" + attribute: "LocalTemperatureCalibration" + response: + constraints: + type: int8 + minValue: -25 + maxValue: 25 + + - label: + "Writes the respective default value to optional attributes to DUT: + LocalTemperatureCalibration" + disabled: true + command: "writeAttribute" + attribute: "LocalTemperatureCalibration" + arguments: + value: 0 + + - label: + "Read back optional attributes from DUT: LocalTemperatureCalibration" + disabled: true + command: "readAttribute" + attribute: "LocalTemperatureCalibration" + response: + value: 0 + + - label: "Reads optional attributes from DUT: MinSetpointDeadBand" + command: "readAttribute" + attribute: "min setpoint dead band" + response: + value: 25 + + - label: + "Reads constraints of optional attributes from DUT: + MinSetpointDeadBand" + command: "readAttribute" + attribute: "min setpoint dead band" + response: + constraints: + type: int8 + minValue: 0 + maxValue: 25 + + - label: + "Writes the respective default value to optional attributes to DUT: + MinSetpointDeadBand" + command: "writeAttribute" + attribute: "min setpoint dead band" + arguments: + value: 25 + + - label: "Read back optional attributes from DUT: MinSetpointDeadBand" + command: "readAttribute" + attribute: "min setpoint dead band" + response: + value: 25 + + - label: "Reads optional attributes from DUT: RemoteSensing" + disabled: true + command: "readAttribute" + attribute: "RemoteSensing" + response: + value: 0 + + - label: "Reads constraints of optional attributes from DUT: RemoteSensing" + disabled: true + command: "readAttribute" + attribute: "RemoteSensing" + response: + constraints: + type: map8 + + - label: + "Writes the respective default value to optional attributes to DUT: + RemoteSensing" + disabled: true + command: "writeAttribute" + attribute: "RemoteSensing" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: RemoteSensing" + disabled: true + command: "readAttribute" + attribute: "RemoteSensing" + response: + value: 0 + + - label: "Reads optional attributes from DUT: AlarmMask" + disabled: true + command: "readAttribute" + attribute: "AlarmMask" + response: + value: 0 + + - label: "Reads constraints of optional attributes from DUT: AlarmMask" + disabled: true + command: "readAttribute" + attribute: "AlarmMask" + response: + constraints: + type: map8 + minValue: 0 + maxValue: 2 + + - label: + "Writes the respective default value to optional attributes to DUT: + AlarmMask" + disabled: true + command: "writeAttribute" + attribute: "AlarmMask" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: AlarmMask" + disabled: true + command: "readAttribute" + attribute: "AlarmMask" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ThermostatRunningMode" + disabled: true + command: "readAttribute" + attribute: "ThermostatRunningMode" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + ThermostatRunningMode" + disabled: true + command: "readAttribute" + attribute: "ThermostatRunningMode" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 9 + + - label: + "Writes the respective default value to optional attributes to DUT: + ThermostatRunningMode" + disabled: true + command: "writeAttribute" + attribute: "ThermostatRunningMode" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: ThermostatRunningMode" + disabled: true + command: "readAttribute" + attribute: "ThermostatRunningMode" + response: + value: 0 + + - label: "Reads constraints of optional attributes from DUT: StartOfWeek" + command: "readAttribute" + attribute: "start of week" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 6 + + - label: + "Writes the respective default value to optional attributes to DUT: + StartOfWeek" + command: "writeAttribute" + attribute: "start of week" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: StartOfWeek" + command: "readAttribute" + attribute: "start of week" + response: + value: 0 + + #issue #11625 default value is 0 as per spec but expecting 7 + - label: "Reads optional attributes from DUT: NumberOfWeeklyTransitions" + disabled: true + command: "readAttribute" + attribute: "number of weekly transitions" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + NumberOfWeeklyTransitions" + command: "readAttribute" + attribute: "number of weekly transitions" + response: + constraints: + type: uint8 + + - label: + "Writes the respective default value to optional attributes to DUT: + NumberOfWeeklyTransitions" + command: "writeAttribute" + attribute: "number of weekly transitions" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: NumberOfWeeklyTransitions" + disabled: true + command: "readAttribute" + attribute: "number of weekly transitions" + response: + value: 0 + + #issue #11625 default value is 0 as per spec but expecting 4 + - label: "Reads optional attributes from DUT: NumberOfDailyTransitions" + disabled: true + command: "readAttribute" + attribute: "number of daily transitions" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + NumberOfDailyTransitions" + command: "readAttribute" + attribute: "number of daily transitions" + response: + constraints: + type: uint8 + + - label: + "Writes the respective default value to optional attributes to DUT: + NumberOfDailyTransitions" + command: "writeAttribute" + attribute: "number of daily transitions" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: NumberOfDailyTransitions" + disabled: true + command: "readAttribute" + attribute: "number of daily transitions" + response: + value: 0 + + - label: "Reads optional attributes from DUT: TemperatureSetpointHold" + disabled: true + command: "readAttribute" + attribute: "TemperatureSetpointHold" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + TemperatureSetpointHold" + disabled: true + command: "readAttribute" + attribute: "TemperatureSetpointHold" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 1 + + - label: + "Writes the respective default value to optional attributes to DUT: + TemperatureSetpointHold" + disabled: true + command: "writeAttribute" + attribute: "TemperatureSetpointHold" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: TemperatureSetpointHold" + disabled: true + command: "readAttribute" + attribute: "TemperatureSetpointHold" + response: + value: 0 + + - label: + "Reads optional attributes from DUT: TemperatureSetpointHoldDuration" + disabled: true + command: "readAttribute" + attribute: "TemperatureSetpointHoldDuration" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: + TemperatureSetpointHoldDuration" + disabled: true + command: "readAttribute" + attribute: "TemperatureSetpointHoldDuration" + response: + constraints: + type: uint16 + minValue: 0 + maxValue: 1440 + + - label: + "Writes the respective default value to optional attributes to DUT: + TemperatureSetpointHoldDuration" + disabled: true + command: "writeAttribute" + attribute: "TemperatureSetpointHoldDuration" + arguments: + value: null + + - label: + "Read back optional attributes from DUT: + TemperatureSetpointHoldDuration" + disabled: true + command: "readAttribute" + attribute: "TemperatureSetpointHoldDuration" + response: + value: null + + - label: + "Reads optional attributes from DUT: + ThermostatProgrammingOperationMode" + disabled: true + command: "readAttribute" + attribute: "ThermostatProgrammingOperationMode" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + ThermostatProgrammingOperationMode" + disabled: true + command: "readAttribute" + attribute: "ThermostatProgrammingOperationMode" + response: + constraints: + type: map8 + minValue: 0 + maxValue: 2 + + - label: + "Writes the respective default value to optional attributes to DUT: + ThermostatProgrammingOperationMode" + disabled: true + command: "writeAttribute" + attribute: "ThermostatProgrammingOperationMode" + arguments: + value: 0 + + - label: + "Read back optional attributes from DUT: + ThermostatProgrammingOperationMode" + disabled: true + command: "readAttribute" + attribute: "ThermostatProgrammingOperationMode" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + ThermostatRunningState" + disabled: true + command: "readAttribute" + attribute: "ThermostatRunningState" + response: + constraints: + type: map16 + minValue: 0 + maxValue: 6 + + - label: + "Writes the respective default value to optional attributes to DUT: + ThermostatRunningState" + disabled: true + command: "writeAttribute" + attribute: "ThermostatRunningState" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: ThermostatRunningState" + disabled: true + command: "readAttribute" + attribute: "ThermostatRunningState" + response: + value: 0 + + - label: "Reads optional attributes from DUT: SetpointChangeSource" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeSource" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + SetpointChangeSource" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeSource" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 2 + + - label: + "Writes the respective default value to optional attributes to DUT: + SetpointChangeSource" + disabled: true + command: "writeAttribute" + attribute: "SetpointChangeSource" + arguments: + value: 0 + response: + error: 1 + + - label: "Read back optional attributes from DUT: SetpointChangeSource" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeSource" + response: + value: 0 + + - label: "Reads optional attributes from DUT: SetpointChangeAmount" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeAmount" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: + SetpointChangeAmount" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeAmount" + response: + constraints: + type: int16 + + - label: + "Writes the respective default value to optional attributes to DUT: + SetpointChangeAmount" + disabled: true + command: "writeAttribute" + attribute: "SetpointChangeAmount" + arguments: + value: null + response: + error: 1 + + - label: "Read back optional attributes from DUT: SetpointChangeAmount" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeAmount" + response: + value: null + + - label: "Reads optional attributes from DUT: SetpointChangeSourceTimestamp" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeSourceTimestamp" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: + SetpointChangeSourceTimestamp" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeSourceTimestamp" + response: + constraints: + type: utc + + - label: + "Writes the respective default value to optional attributes to DUT: + SetpointChangeSourceTimestamp" + disabled: true + command: "writeAttribute" + attribute: "SetpointChangeSourceTimestamp" + arguments: + value: 0 + response: + error: 1 + + - label: + "Read back optional attributes from DUT: SetpointChangeSourceTimestamp" + disabled: true + command: "readAttribute" + attribute: "SetpointChangeSourceTimestamp" + response: + value: 0 + + - label: "Reads optional attributes from DUT: OccupiedSetback" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetback" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: OccupiedSetback" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetback" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 254 + + - label: + "Writes the respective default value to optional attributes to DUT: + OccupiedSetback" + disabled: true + command: "writeAttribute" + attribute: "OccupiedSetback" + arguments: + value: null + response: + error: 1 + + - label: "Read back optional attributes from DUT: OccupiedSetback" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetback" + response: + value: null + + - label: "Reads optional attributes from DUT: OccupiedSetbackMin" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetbackMin" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: OccupiedSetbackMin" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetbackMin" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 254 + + - label: + "Writes the respective default value to optional attributes to DUT: + OccupiedSetbackMin" + disabled: true + command: "writeAttribute" + attribute: "OccupiedSetbackMin" + arguments: + value: null + + - label: "Read back optional attributes from DUT: OccupiedSetbackMin" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetbackMin" + response: + value: null + + - label: "Reads optional attributes from DUT: OccupiedSetbackMax" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetbackMax" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: OccupiedSetbackMax" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetbackMax" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 254 + + - label: + "Writes the respective default value to optional attributes to DUT: + OccupiedSetbackMax" + disabled: true + command: "writeAttribute" + attribute: "OccupiedSetbackMax" + arguments: + value: null + + - label: "Read back optional attributes from DUT: OccupiedSetbackMax" + disabled: true + command: "readAttribute" + attribute: "OccupiedSetbackMax" + response: + value: null + + - label: "Reads optional attributes from DUT: UnoccupiedSetback" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetback" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: UnoccupiedSetback" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetback" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 254 + + - label: + "Writes the respective default value to optional attributes to DUT: + UnoccupiedSetback" + disabled: true + command: "writeAttribute" + attribute: "UnoccupiedSetback" + arguments: + value: null + response: + error: 1 + + - label: "Read back optional attributes from DUT: UnoccupiedSetback" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetback" + response: + value: null + + - label: "Reads optional attributes from DUT: UnoccupiedSetbackMin" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetbackMin" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: + UnoccupiedSetbackMin" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetbackMin" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 254 + + - label: + "Writes the respective default value to optional attributes to DUT: + UnoccupiedSetbackMin" + disabled: true + command: "writeAttribute" + attribute: "UnoccupiedSetbackMin" + arguments: + value: null + + - label: "Read back optional attributes from DUT: UnoccupiedSetbackMin" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetbackMin" + response: + value: null + + - label: "Reads optional attributes from DUT: UnoccupiedSetbackMax" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetbackMax" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: + UnoccupiedSetbackMax" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetbackMax" + response: + constraints: + type: uint8 + minValue: 0 + maxValue: 254 + + - label: + "Writes the respective default value to optional attributes to DUT: + UnoccupiedSetbackMax" + disabled: true + command: "writeAttribute" + attribute: "UnoccupiedSetbackMax" + arguments: + value: null + + - label: "Read back optional attributes from DUT: UnoccupiedSetbackMax" + disabled: true + command: "readAttribute" + attribute: "UnoccupiedSetbackMax" + response: + value: null + + - label: "Reads optional attributes from DUT: EmergencyHeatDelta" + disabled: true + command: "readAttribute" + attribute: "EmergencyHeatDelta" + response: + value: 255OccupiedSetbackMin + + - label: + "Reads constraints of optional attributes from DUT: EmergencyHeatDelta" + disabled: true + command: "readAttribute" + attribute: "EmergencyHeatDelta" + response: + constraints: + type: uint8 + + - label: + "Writes the respective default value to optional attributes to DUT: + EmergencyHeatDelta" + disabled: true + command: "writeAttribute" + attribute: "EmergencyHeatDelta" + arguments: + value: 255 + + - label: "Read back optional attributes from DUT: EmergencyHeatDelta" + disabled: true + command: "readAttribute" + attribute: "EmergencyHeatDelta" + response: + value: 255 + + - label: "Reads optional attributes from DUT: ACType" + disabled: true + command: "readAttribute" + attribute: "ACType" + response: + value: 0 + + - label: "Reads constraints of optional attributes from DUT: ACType" + disabled: true + command: "readAttribute" + attribute: "ACType" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 4 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACType" + disabled: true + command: "writeAttribute" + attribute: "ACType" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACType" + disabled: true + command: "readAttribute" + attribute: "ACType" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ACCapacity" + disabled: true + command: "readAttribute" + attribute: "ACCapacity" + response: + value: 0 + + - label: "Reads constraints of optional attributes from DUT: ACCapacity" + disabled: true + command: "readAttribute" + attribute: "ACCapacity" + response: + constraints: + type: uint16 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACCapacity" + disabled: true + command: "writeAttribute" + attribute: "ACCapacity" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACCapacity" + disabled: true + command: "readAttribute" + attribute: "ACCapacity" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ACRefrigerantType" + disabled: true + command: "readAttribute" + attribute: "ACRefrigerantType" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: ACRefrigerantType" + disabled: true + command: "readAttribute" + attribute: "ACRefrigerantType" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 3 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACRefrigerantType" + disabled: true + command: "writeAttribute" + attribute: "ACRefrigerantType" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACRefrigerantType" + disabled: true + command: "readAttribute" + attribute: "ACRefrigerantType" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ACCompressorType" + disabled: true + command: "readAttribute" + attribute: "ACCompressorType" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: ACCompressorType" + disabled: true + command: "readAttribute" + attribute: "ACCompressorType" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 3 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACCompressorType" + disabled: true + command: "writeAttribute" + attribute: "ACCompressorType" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACCompressorType" + disabled: true + command: "readAttribute" + attribute: "ACCompressorType" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ACErrorCode" + disabled: true + command: "readAttribute" + attribute: "ACErrorCode" + response: + value: 0 + + - label: "Reads constraints of optional attributes from DUT: ACErrorCode" + disabled: true + command: "readAttribute" + attribute: "ACErrorCode" + response: + constraints: + type: map32 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACErrorCode" + disabled: true + command: "writeAttribute" + attribute: "ACErrorCode" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACErrorCode" + disabled: true + command: "readAttribute" + attribute: "ACErrorCode" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ACLouverPosition" + disabled: true + command: "readAttribute" + attribute: "ACLouverPosition" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: ACLouverPosition" + disabled: true + command: "readAttribute" + attribute: "ACLouverPosition" + response: + constraints: + type: enum8 + minValue: 0 + maxValue: 5 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACLouverPosition" + disabled: true + command: "writeAttribute" + attribute: "ACLouverPosition" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACLouverPosition" + disabled: true + command: "readAttribute" + attribute: "ACLouverPosition" + response: + value: 0 + + - label: "Reads optional attributes from DUT: ACCoilTemperature" + disabled: true + command: "readAttribute" + attribute: "ACCoilTemperature" + response: + value: null + + - label: + "Reads constraints of optional attributes from DUT: ACCoilTemperature" + disabled: true + command: "readAttribute" + attribute: "ACCoilTemperature" + response: + constraints: + type: int16 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACCoilTemperature" + disabled: true + command: "writeAttribute" + attribute: "ACCoilTemperature" + arguments: + value: null + response: + error: 1 + + - label: "Read back optional attributes from DUT: ACCoilTemperature" + disabled: true + command: "readAttribute" + attribute: "ACCoilTemperature" + response: + value: null + + - label: "Reads optional attributes from DUT: ACCapacityFormat" + disabled: true + command: "readAttribute" + attribute: "ACCapacityFormat" + response: + value: 0 + + - label: + "Reads constraints of optional attributes from DUT: ACCapacityFormat" + disabled: true + command: "readAttribute" + attribute: "ACCapacityFormat" + response: + constraints: + type: enum8 + + - label: + "Writes the respective default value to optional attributes to DUT: + ACCapacityFormat" + disabled: true + command: "writeAttribute" + attribute: "ACCapacityFormat" + arguments: + value: 0 + + - label: "Read back optional attributes from DUT: ACCapacityFormat" + disabled: true + command: "readAttribute" + attribute: "ACCapacityFormat" + response: + value: 0 diff --git a/src/darwin/Framework/CHIP/templates/tests.js b/src/darwin/Framework/CHIP/templates/tests.js index 1e92e9cf8d6623..bd69f944f666c9 100644 --- a/src/darwin/Framework/CHIP/templates/tests.js +++ b/src/darwin/Framework/CHIP/templates/tests.js @@ -20,6 +20,7 @@ function getTests() const BinaryInput = [ 'Test_TC_BI_1_1', 'Test_TC_BI_2_1', + 'Test_TC_BI_2_2', ]; const BooleanState = [ @@ -131,6 +132,7 @@ function getTests() const Thermostat = [ 'Test_TC_TSTAT_1_1', + 'Test_TC_TSTAT_2_1', ]; const ThermostatUserConfiguration = [ @@ -166,6 +168,7 @@ function getTests() const SoftwareDiagnostics = [ 'Test_TC_DIAGSW_1_1', + 'Test_TC_DIAGSW_3_2', ]; const Subscriptions = [ diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 450c41139ba5bd..13032a89fc6552 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -488,6 +488,175 @@ - (void)testSendClusterTest_TC_BI_2_1_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_BI_2_2_000000_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads PresentValue attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributePresentValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads PresentValue attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads OutOfService attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOutOfServiceWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads OutOfService attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000002_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads StatusFlags attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000003_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads PresentValue attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributePresentValueWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads PresentValue attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads OutOfService attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOutOfServiceWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads OutOfService attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] boolValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads StatusFlags attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000006_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads StatusFlags attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_BI_2_2_000007_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads StatusFlags attribute from DUT"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestBinaryInputBasic * cluster = [[CHIPTestBinaryInputBasic alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeStatusFlagsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads StatusFlags attribute from DUT Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_BOOL_1_1_000000_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; @@ -12376,6 +12545,1353 @@ - (void)testSendClusterTest_TC_TSTAT_1_1_000000_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_TSTAT_2_1_000000_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: LocalTemperature"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeLocalTemperatureWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: LocalTemperature Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMinHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 700); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000002_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMinHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 700); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000003_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t absMinHeatSetpointLimitArgument = 700; + [cluster writeAttributeAbsMinHeatSetpointLimitWithValue:absMinHeatSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"AbsMinHeatSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMinHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 700); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMaxHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000006_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMaxHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 700); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000007_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t absMaxHeatSetpointLimitArgument = 3000; + [cluster writeAttributeAbsMaxHeatSetpointLimitWithValue:absMaxHeatSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"AbsMaxHeatSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000008_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMaxHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000009_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMinCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 1600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000010_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMinCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 1600); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000011_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t absMinCoolSetpointLimitArgument = 1600; + [cluster writeAttributeAbsMinCoolSetpointLimitWithValue:absMinCoolSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"AbsMinCoolSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000012_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMinCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 1600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000013_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMaxCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000014_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMaxCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 1600); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000015_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: AbsMaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t absMaxCoolSetpointLimitArgument = 3200; + [cluster writeAttributeAbsMaxCoolSetpointLimitWithValue:absMaxCoolSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"AbsMaxCoolSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000016_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeAbsMaxCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000017_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: OccupiedCoolingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOccupiedCoolingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 2600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000018_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOccupiedCoolingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 1600); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 2600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000019_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: OccupiedCoolingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t occupiedCoolingSetpointArgument = 2600; + [cluster writeAttributeOccupiedCoolingSetpointWithValue:occupiedCoolingSetpointArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"OccupiedCoolingSetpoint Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000020_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: OccupiedCoolingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOccupiedCoolingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: OccupiedCoolingSetpoint Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 2600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000021_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOccupiedHeatingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 2000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000022_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOccupiedHeatingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 700); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 2600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000023_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: OccupiedHeatingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t occupiedHeatingSetpointArgument = 2000; + [cluster writeAttributeOccupiedHeatingSetpointWithValue:occupiedHeatingSetpointArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"OccupiedHeatingSetpoint Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000024_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: OccupiedHeatingSetpoint"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeOccupiedHeatingSetpointWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: OccupiedHeatingSetpoint Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 2000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000025_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: MinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 700); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000026_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 700); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000027_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t minHeatSetpointLimitArgument = 700; + [cluster writeAttributeMinHeatSetpointLimitWithValue:minHeatSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"MinHeatSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000028_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: MinHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: MinHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 700); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000029_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000030_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 700); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000031_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t maxHeatSetpointLimitArgument = 3000; + [cluster writeAttributeMaxHeatSetpointLimitWithValue:maxHeatSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"MaxHeatSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000032_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: MaxHeatSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxHeatSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: MaxHeatSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3000); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000033_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: MinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 1600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000034_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 1600); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000035_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t minCoolSetpointLimitArgument = 1600; + [cluster writeAttributeMinCoolSetpointLimitWithValue:minCoolSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"MinCoolSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000036_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: MinCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: MinCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 1600); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000037_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: MaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000038_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertGreaterThanOrEqual([values[@"value"] shortValue], 1600); + XCTAssertLessThanOrEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000039_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int16_t maxCoolSetpointLimitArgument = 3200; + [cluster writeAttributeMaxCoolSetpointLimitWithValue:maxCoolSetpointLimitArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"MaxCoolSetpointLimit Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000040_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: MaxCoolSetpointLimit"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMaxCoolSetpointLimitWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: MaxCoolSetpointLimit Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] shortValue], 3200); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000041_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads mandatory attributes from DUT: ControlSequenceOfOperation"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeControlSequenceOfOperationWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 4); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000042_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeControlSequenceOfOperationWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertLessThanOrEqual([values[@"value"] unsignedCharValue], 5); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000043_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription: + @"Writes the respective default value to mandatory attributes to DUT: ControlSequenceOfOperation"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t controlSequenceOfOperationArgument = 4; + [cluster writeAttributeControlSequenceOfOperationWithValue:controlSequenceOfOperationArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to mandatory attributes to DUT: " + @"ControlSequenceOfOperation Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000044_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back mandatory attributes from DUT: ControlSequenceOfOperation"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeControlSequenceOfOperationWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: ControlSequenceOfOperation Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 4); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000045_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads mandatory attributes from DUT: SystemMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSystemModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads mandatory attributes from DUT: SystemMode Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000046_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of mandatory attributes from DUT: SystemMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSystemModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of mandatory attributes from DUT: SystemMode Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertLessThanOrEqual([values[@"value"] unsignedCharValue], 9); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000047_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Writes the respective default value to mandatory attributes to DUT: SystemMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t systemModeArgument = 1; + [cluster + writeAttributeSystemModeWithValue:systemModeArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog( + @"Writes the respective default value to mandatory attributes to DUT: SystemMode Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000048_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back mandatory attributes from DUT: SystemMode"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeSystemModeWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back mandatory attributes from DUT: SystemMode Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 1); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000049_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Reads optional attributes from DUT: MinSetpointDeadBand"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinSetpointDeadBandWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] charValue], 25); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000050_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinSetpointDeadBandWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertLessThanOrEqual([values[@"value"] charValue], 25); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000051_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + int8_t minSetpointDeadBandArgument = 25; + [cluster writeAttributeMinSetpointDeadBandWithValue:minSetpointDeadBandArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to optional attributes to DUT: " + @"MinSetpointDeadBand Error: %@", + err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000052_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Read back optional attributes from DUT: MinSetpointDeadBand"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeMinSetpointDeadBandWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back optional attributes from DUT: MinSetpointDeadBand Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] charValue], 25); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000053_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: StartOfWeek"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeStartOfWeekWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of optional attributes from DUT: StartOfWeek Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertLessThanOrEqual([values[@"value"] unsignedCharValue], 6); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000054_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: StartOfWeek"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t startOfWeekArgument = 0; + [cluster + writeAttributeStartOfWeekWithValue:startOfWeekArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to optional attributes to DUT: StartOfWeek Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000055_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read back optional attributes from DUT: StartOfWeek"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeStartOfWeekWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Read back optional attributes from DUT: StartOfWeek Error: %@", err); + + XCTAssertEqual(err.code, 0); + + XCTAssertEqual([values[@"value"] unsignedCharValue], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000056_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNumberOfWeeklyTransitionsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000057_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: NumberOfWeeklyTransitions"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t numberOfWeeklyTransitionsArgument = 0; + [cluster writeAttributeNumberOfWeeklyTransitionsWithValue:numberOfWeeklyTransitionsArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to optional attributes to DUT: " + @"NumberOfWeeklyTransitions Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000058_ReadAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"Reads constraints of optional attributes from DUT: NumberOfDailyTransitions"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeNumberOfDailyTransitionsWithResponseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Reads constraints of optional attributes from DUT: NumberOfDailyTransitions Error: %@", err); + + XCTAssertEqual(err.code, 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_TSTAT_2_1_000059_WriteAttribute +{ + XCTestExpectation * expectation = [self + expectationWithDescription:@"Writes the respective default value to optional attributes to DUT: NumberOfDailyTransitions"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestThermostat * cluster = [[CHIPTestThermostat alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + uint8_t numberOfDailyTransitionsArgument = 0; + [cluster writeAttributeNumberOfDailyTransitionsWithValue:numberOfDailyTransitionsArgument + responseHandler:^(NSError * err, NSDictionary * values) { + NSLog(@"Writes the respective default value to optional attributes to DUT: " + @"NumberOfDailyTransitions Error: %@", + err); + + XCTAssertEqual(err.code, 1); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterTest_TC_TSUIC_1_1_000000_WriteAttribute { XCTestExpectation * expectation = diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index e97915bca48643..3289ab7e2bbd2f 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -552,6 +552,311 @@ class Test_TC_BI_2_1 : public TestCommand } }; +class Test_TC_BI_2_2 : public TestCommand +{ +public: + Test_TC_BI_2_2() : TestCommand("Test_TC_BI_2_2"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_BI_2_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BI_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Reads PresentValue attribute from DUT\n"); + err = TestReadsPresentValueAttributeFromDut_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads OutOfService attribute from DUT\n"); + err = TestReadsOutOfServiceAttributeFromDut_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Reads StatusFlags attribute from DUT\n"); + err = TestReadsStatusFlagsAttributeFromDut_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads PresentValue attribute from DUT\n"); + err = TestReadsPresentValueAttributeFromDut_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads OutOfService attribute from DUT\n"); + err = TestReadsOutOfServiceAttributeFromDut_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads StatusFlags attribute from DUT\n"); + err = TestReadsStatusFlagsAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads StatusFlags attribute from DUT\n"); + err = TestReadsStatusFlagsAttributeFromDut_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads StatusFlags attribute from DUT\n"); + err = TestReadsStatusFlagsAttributeFromDut_7(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 8; + + chip::Callback::Callback mOnFailureCallback_0{ OnFailureCallback_0, this }; + chip::Callback::Callback mOnSuccessCallback_0{ OnSuccessCallback_0, this }; + chip::Callback::Callback mOnFailureCallback_1{ OnFailureCallback_1, this }; + chip::Callback::Callback mOnSuccessCallback_1{ OnSuccessCallback_1, this }; + chip::Callback::Callback mOnFailureCallback_2{ OnFailureCallback_2, this }; + chip::Callback::Callback mOnSuccessCallback_2{ OnSuccessCallback_2, this }; + chip::Callback::Callback mOnFailureCallback_3{ OnFailureCallback_3, this }; + chip::Callback::Callback mOnSuccessCallback_3{ OnSuccessCallback_3, this }; + chip::Callback::Callback mOnFailureCallback_4{ OnFailureCallback_4, this }; + chip::Callback::Callback mOnSuccessCallback_4{ OnSuccessCallback_4, this }; + chip::Callback::Callback mOnFailureCallback_5{ OnFailureCallback_5, this }; + chip::Callback::Callback mOnSuccessCallback_5{ OnSuccessCallback_5, this }; + chip::Callback::Callback mOnFailureCallback_6{ OnFailureCallback_6, this }; + chip::Callback::Callback mOnSuccessCallback_6{ OnSuccessCallback_6, this }; + chip::Callback::Callback mOnFailureCallback_7{ OnFailureCallback_7, this }; + chip::Callback::Callback mOnSuccessCallback_7{ OnSuccessCallback_7, this }; + + static void OnFailureCallback_0(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_0(status); + } + + static void OnSuccessCallback_0(void * context, bool presentValue) + { + (static_cast(context))->OnSuccessResponse_0(presentValue); + } + + static void OnFailureCallback_1(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, bool outOfService) + { + (static_cast(context))->OnSuccessResponse_1(outOfService); + } + + static void OnFailureCallback_2(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, uint8_t statusFlags) + { + (static_cast(context))->OnSuccessResponse_2(statusFlags); + } + + static void OnFailureCallback_3(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context, bool presentValue) + { + (static_cast(context))->OnSuccessResponse_3(presentValue); + } + + static void OnFailureCallback_4(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, bool outOfService) + { + (static_cast(context))->OnSuccessResponse_4(outOfService); + } + + static void OnFailureCallback_5(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint8_t statusFlags) + { + (static_cast(context))->OnSuccessResponse_5(statusFlags); + } + + static void OnFailureCallback_6(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, uint8_t statusFlags) + { + (static_cast(context))->OnSuccessResponse_6(statusFlags); + } + + static void OnFailureCallback_7(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_7(status); + } + + static void OnSuccessCallback_7(void * context, uint8_t statusFlags) + { + (static_cast(context))->OnSuccessResponse_7(statusFlags); + } + + // + // Tests methods + // + + CHIP_ERROR TestReadsPresentValueAttributeFromDut_0() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributePresentValue(mOnSuccessCallback_0.Cancel(), mOnFailureCallback_0.Cancel()); + } + + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_0(bool presentValue) + { + VerifyOrReturn(CheckValue("presentValue", presentValue, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_1() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOutOfService(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + } + + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(bool outOfService) + { + VerifyOrReturn(CheckValue("outOfService", outOfService, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_2() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); + } + + void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint8_t statusFlags) + { + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsPresentValueAttributeFromDut_3() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributePresentValue(mOnSuccessCallback_3.Cancel(), mOnFailureCallback_3.Cancel()); + } + + void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_3(bool presentValue) + { + VerifyOrReturn(CheckValue("presentValue", presentValue, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsOutOfServiceAttributeFromDut_4() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOutOfService(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel()); + } + + void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(bool outOfService) + { + VerifyOrReturn(CheckValue("outOfService", outOfService, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_5() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_5.Cancel(), mOnFailureCallback_5.Cancel()); + } + + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint8_t statusFlags) + { + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_6() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_6.Cancel(), mOnFailureCallback_6.Cancel()); + } + + void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(uint8_t statusFlags) + { + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsStatusFlagsAttributeFromDut_7() + { + chip::Controller::BinaryInputBasicClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeStatusFlags(mOnSuccessCallback_7.Cancel(), mOnFailureCallback_7.Cancel()); + } + + void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_7(uint8_t statusFlags) + { + VerifyOrReturn(CheckValue("statusFlags", statusFlags, 0)); + NextTest(); + } +}; + class Test_TC_BOOL_1_1 : public TestCommand { public: @@ -20863,10 +21168,10 @@ class Test_TC_TSTAT_1_1 : public TestCommand void OnSuccessResponse_0() { ThrowSuccessResponse(); } }; -class Test_TC_TSUIC_1_1 : public TestCommand +class Test_TC_TSTAT_2_1 : public TestCommand { public: - Test_TC_TSUIC_1_1() : TestCommand("Test_TC_TSUIC_1_1"), mTestIndex(0) {} + Test_TC_TSTAT_2_1() : TestCommand("Test_TC_TSTAT_2_1"), mTestIndex(0) {} /////////// TestCommand Interface ///////// void NextTest() override @@ -20875,12 +21180,12 @@ class Test_TC_TSUIC_1_1 : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSTAT_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSTAT_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -20895,22 +21200,2024 @@ class Test_TC_TSUIC_1_1 : public TestCommand { case 0: ChipLogProgress(chipTool, - " ***** Test Step 0 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_0(); + " ***** Test Step 0 : Reads constraints of mandatory attributes from DUT: LocalTemperature\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_0(); break; - } - - if (CHIP_NO_ERROR != err) - { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 1; - + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : Reads mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_1(); + break; + case 2: + ChipLogProgress(chipTool, + " ***** Test Step 2 : Reads constraints of mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2(); + break; + case 3: + ChipLogProgress(chipTool, + " ***** Test Step 3 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMinHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : Read back mandatory attributes from DUT: AbsMinHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5(); + break; + case 6: + ChipLogProgress(chipTool, + " ***** Test Step 6 : Reads constraints of mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6(); + break; + case 7: + ChipLogProgress(chipTool, + " ***** Test Step 7 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMaxHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Read back mandatory attributes from DUT: AbsMaxHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_9(); + break; + case 10: + ChipLogProgress(chipTool, + " ***** Test Step 10 : Reads constraints of mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10(); + break; + case 11: + ChipLogProgress(chipTool, + " ***** Test Step 11 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMinCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : Read back mandatory attributes from DUT: AbsMinCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_13(); + break; + case 14: + ChipLogProgress(chipTool, + " ***** Test Step 14 : Reads constraints of mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14(); + break; + case 15: + ChipLogProgress(chipTool, + " ***** Test Step 15 : Writes the respective default value to mandatory attributes to DUT: " + "AbsMaxCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Read back mandatory attributes from DUT: AbsMaxCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : Reads mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_17(); + break; + case 18: + ChipLogProgress(chipTool, + " ***** Test Step 18 : Reads constraints of mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_18(); + break; + case 19: + ChipLogProgress(chipTool, + " ***** Test Step 19 : Writes the respective default value to mandatory attributes to DUT: " + "OccupiedCoolingSetpoint\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Read back mandatory attributes from DUT: OccupiedCoolingSetpoint\n"); + err = TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : Reads mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_21(); + break; + case 22: + ChipLogProgress(chipTool, + " ***** Test Step 22 : Reads constraints of mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_22(); + break; + case 23: + ChipLogProgress(chipTool, + " ***** Test Step 23 : Writes the respective default value to mandatory attributes to DUT: " + "OccupiedHeatingSetpoint\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_23(); + break; + case 24: + ChipLogProgress(chipTool, " ***** Test Step 24 : Read back mandatory attributes from DUT: OccupiedHeatingSetpoint\n"); + err = TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_24(); + break; + case 25: + ChipLogProgress(chipTool, " ***** Test Step 25 : Reads mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_25(); + break; + case 26: + ChipLogProgress(chipTool, + " ***** Test Step 26 : Reads constraints of mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_26(); + break; + case 27: + ChipLogProgress( + chipTool, + " ***** Test Step 27 : Writes the respective default value to mandatory attributes to DUT: MinHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_27(); + break; + case 28: + ChipLogProgress(chipTool, " ***** Test Step 28 : Read back mandatory attributes from DUT: MinHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_28(); + break; + case 29: + ChipLogProgress(chipTool, " ***** Test Step 29 : Reads mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_29(); + break; + case 30: + ChipLogProgress(chipTool, + " ***** Test Step 30 : Reads constraints of mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_30(); + break; + case 31: + ChipLogProgress( + chipTool, + " ***** Test Step 31 : Writes the respective default value to mandatory attributes to DUT: MaxHeatSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_31(); + break; + case 32: + ChipLogProgress(chipTool, " ***** Test Step 32 : Read back mandatory attributes from DUT: MaxHeatSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_32(); + break; + case 33: + ChipLogProgress(chipTool, " ***** Test Step 33 : Reads mandatory attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_33(); + break; + case 34: + ChipLogProgress(chipTool, + " ***** Test Step 34 : Reads constraints of mandatory attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_34(); + break; + case 35: + ChipLogProgress( + chipTool, + " ***** Test Step 35 : Writes the respective default value to mandatory attributes to DUT: MinCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_35(); + break; + case 36: + ChipLogProgress(chipTool, " ***** Test Step 36 : Read back mandatory attributes from DUT: MinCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_36(); + break; + case 37: + ChipLogProgress(chipTool, " ***** Test Step 37 : Reads mandatory attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_37(); + break; + case 38: + ChipLogProgress(chipTool, + " ***** Test Step 38 : Reads constraints of mandatory attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_38(); + break; + case 39: + ChipLogProgress( + chipTool, + " ***** Test Step 39 : Writes the respective default value to mandatory attributes to DUT: MaxCoolSetpointLimit\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_39(); + break; + case 40: + ChipLogProgress(chipTool, " ***** Test Step 40 : Read back mandatory attributes from DUT: MaxCoolSetpointLimit\n"); + err = TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_40(); + break; + case 41: + ChipLogProgress(chipTool, " ***** Test Step 41 : Reads mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_41(); + break; + case 42: + ChipLogProgress( + chipTool, " ***** Test Step 42 : Reads constraints of mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_42(); + break; + case 43: + ChipLogProgress(chipTool, + " ***** Test Step 43 : Writes the respective default value to mandatory attributes to DUT: " + "ControlSequenceOfOperation\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_43(); + break; + case 44: + ChipLogProgress(chipTool, + " ***** Test Step 44 : Read back mandatory attributes from DUT: ControlSequenceOfOperation\n"); + err = TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_44(); + break; + case 45: + ChipLogProgress(chipTool, " ***** Test Step 45 : Reads mandatory attributes from DUT: SystemMode\n"); + err = TestReadsMandatoryAttributesFromDutSystemMode_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : Reads constraints of mandatory attributes from DUT: SystemMode\n"); + err = TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_46(); + break; + case 47: + ChipLogProgress( + chipTool, " ***** Test Step 47 : Writes the respective default value to mandatory attributes to DUT: SystemMode\n"); + err = TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_47(); + break; + case 48: + ChipLogProgress(chipTool, " ***** Test Step 48 : Read back mandatory attributes from DUT: SystemMode\n"); + err = TestReadBackMandatoryAttributesFromDutSystemMode_48(); + break; + case 49: + ChipLogProgress(chipTool, " ***** Test Step 49 : Reads optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadsOptionalAttributesFromDutMinSetpointDeadBand_49(); + break; + case 50: + ChipLogProgress(chipTool, + " ***** Test Step 50 : Reads constraints of optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_50(); + break; + case 51: + ChipLogProgress( + chipTool, + " ***** Test Step 51 : Writes the respective default value to optional attributes to DUT: MinSetpointDeadBand\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_51(); + break; + case 52: + ChipLogProgress(chipTool, " ***** Test Step 52 : Read back optional attributes from DUT: MinSetpointDeadBand\n"); + err = TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_52(); + break; + case 53: + ChipLogProgress(chipTool, " ***** Test Step 53 : Reads constraints of optional attributes from DUT: StartOfWeek\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_53(); + break; + case 54: + ChipLogProgress( + chipTool, " ***** Test Step 54 : Writes the respective default value to optional attributes to DUT: StartOfWeek\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_54(); + break; + case 55: + ChipLogProgress(chipTool, " ***** Test Step 55 : Read back optional attributes from DUT: StartOfWeek\n"); + err = TestReadBackOptionalAttributesFromDutStartOfWeek_55(); + break; + case 56: + ChipLogProgress(chipTool, + " ***** Test Step 56 : Reads constraints of optional attributes from DUT: NumberOfWeeklyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_56(); + break; + case 57: + ChipLogProgress(chipTool, + " ***** Test Step 57 : Writes the respective default value to optional attributes to DUT: " + "NumberOfWeeklyTransitions\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_57(); + break; + case 58: + ChipLogProgress(chipTool, + " ***** Test Step 58 : Reads constraints of optional attributes from DUT: NumberOfDailyTransitions\n"); + err = TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_58(); + break; + case 59: + ChipLogProgress(chipTool, + " ***** Test Step 59 : Writes the respective default value to optional attributes to DUT: " + "NumberOfDailyTransitions\n"); + err = TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_59(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 60; + + chip::Callback::Callback mOnFailureCallback_0{ OnFailureCallback_0, this }; + chip::Callback::Callback mOnSuccessCallback_0{ OnSuccessCallback_0, this }; + chip::Callback::Callback mOnFailureCallback_1{ OnFailureCallback_1, this }; + chip::Callback::Callback mOnSuccessCallback_1{ OnSuccessCallback_1, + this }; + chip::Callback::Callback mOnFailureCallback_2{ OnFailureCallback_2, this }; + chip::Callback::Callback mOnSuccessCallback_2{ OnSuccessCallback_2, + this }; + chip::Callback::Callback mOnFailureCallback_4{ OnFailureCallback_4, this }; + chip::Callback::Callback mOnSuccessCallback_4{ OnSuccessCallback_4, + this }; + chip::Callback::Callback mOnFailureCallback_5{ OnFailureCallback_5, this }; + chip::Callback::Callback mOnSuccessCallback_5{ OnSuccessCallback_5, + this }; + chip::Callback::Callback mOnFailureCallback_6{ OnFailureCallback_6, this }; + chip::Callback::Callback mOnSuccessCallback_6{ OnSuccessCallback_6, + this }; + chip::Callback::Callback mOnFailureCallback_8{ OnFailureCallback_8, this }; + chip::Callback::Callback mOnSuccessCallback_8{ OnSuccessCallback_8, + this }; + chip::Callback::Callback mOnFailureCallback_9{ OnFailureCallback_9, this }; + chip::Callback::Callback mOnSuccessCallback_9{ OnSuccessCallback_9, + this }; + chip::Callback::Callback mOnFailureCallback_10{ OnFailureCallback_10, this }; + chip::Callback::Callback mOnSuccessCallback_10{ OnSuccessCallback_10, + this }; + chip::Callback::Callback mOnFailureCallback_12{ OnFailureCallback_12, this }; + chip::Callback::Callback mOnSuccessCallback_12{ OnSuccessCallback_12, + this }; + chip::Callback::Callback mOnFailureCallback_13{ OnFailureCallback_13, this }; + chip::Callback::Callback mOnSuccessCallback_13{ OnSuccessCallback_13, + this }; + chip::Callback::Callback mOnFailureCallback_14{ OnFailureCallback_14, this }; + chip::Callback::Callback mOnSuccessCallback_14{ OnSuccessCallback_14, + this }; + chip::Callback::Callback mOnFailureCallback_16{ OnFailureCallback_16, this }; + chip::Callback::Callback mOnSuccessCallback_16{ OnSuccessCallback_16, + this }; + chip::Callback::Callback mOnFailureCallback_17{ OnFailureCallback_17, this }; + chip::Callback::Callback mOnSuccessCallback_17{ OnSuccessCallback_17, + this }; + chip::Callback::Callback mOnFailureCallback_18{ OnFailureCallback_18, this }; + chip::Callback::Callback mOnSuccessCallback_18{ OnSuccessCallback_18, + this }; + chip::Callback::Callback mOnFailureCallback_20{ OnFailureCallback_20, this }; + chip::Callback::Callback mOnSuccessCallback_20{ OnSuccessCallback_20, + this }; + chip::Callback::Callback mOnFailureCallback_21{ OnFailureCallback_21, this }; + chip::Callback::Callback mOnSuccessCallback_21{ OnSuccessCallback_21, + this }; + chip::Callback::Callback mOnFailureCallback_22{ OnFailureCallback_22, this }; + chip::Callback::Callback mOnSuccessCallback_22{ OnSuccessCallback_22, + this }; + chip::Callback::Callback mOnFailureCallback_24{ OnFailureCallback_24, this }; + chip::Callback::Callback mOnSuccessCallback_24{ OnSuccessCallback_24, + this }; + chip::Callback::Callback mOnFailureCallback_25{ OnFailureCallback_25, this }; + chip::Callback::Callback mOnSuccessCallback_25{ OnSuccessCallback_25, + this }; + chip::Callback::Callback mOnFailureCallback_26{ OnFailureCallback_26, this }; + chip::Callback::Callback mOnSuccessCallback_26{ OnSuccessCallback_26, + this }; + chip::Callback::Callback mOnFailureCallback_28{ OnFailureCallback_28, this }; + chip::Callback::Callback mOnSuccessCallback_28{ OnSuccessCallback_28, + this }; + chip::Callback::Callback mOnFailureCallback_29{ OnFailureCallback_29, this }; + chip::Callback::Callback mOnSuccessCallback_29{ OnSuccessCallback_29, + this }; + chip::Callback::Callback mOnFailureCallback_30{ OnFailureCallback_30, this }; + chip::Callback::Callback mOnSuccessCallback_30{ OnSuccessCallback_30, + this }; + chip::Callback::Callback mOnFailureCallback_32{ OnFailureCallback_32, this }; + chip::Callback::Callback mOnSuccessCallback_32{ OnSuccessCallback_32, + this }; + chip::Callback::Callback mOnFailureCallback_33{ OnFailureCallback_33, this }; + chip::Callback::Callback mOnSuccessCallback_33{ OnSuccessCallback_33, + this }; + chip::Callback::Callback mOnFailureCallback_34{ OnFailureCallback_34, this }; + chip::Callback::Callback mOnSuccessCallback_34{ OnSuccessCallback_34, + this }; + chip::Callback::Callback mOnFailureCallback_36{ OnFailureCallback_36, this }; + chip::Callback::Callback mOnSuccessCallback_36{ OnSuccessCallback_36, + this }; + chip::Callback::Callback mOnFailureCallback_37{ OnFailureCallback_37, this }; + chip::Callback::Callback mOnSuccessCallback_37{ OnSuccessCallback_37, + this }; + chip::Callback::Callback mOnFailureCallback_38{ OnFailureCallback_38, this }; + chip::Callback::Callback mOnSuccessCallback_38{ OnSuccessCallback_38, + this }; + chip::Callback::Callback mOnFailureCallback_40{ OnFailureCallback_40, this }; + chip::Callback::Callback mOnSuccessCallback_40{ OnSuccessCallback_40, + this }; + chip::Callback::Callback mOnFailureCallback_41{ OnFailureCallback_41, this }; + chip::Callback::Callback mOnSuccessCallback_41{ + OnSuccessCallback_41, this + }; + chip::Callback::Callback mOnFailureCallback_42{ OnFailureCallback_42, this }; + chip::Callback::Callback mOnSuccessCallback_42{ + OnSuccessCallback_42, this + }; + chip::Callback::Callback mOnFailureCallback_44{ OnFailureCallback_44, this }; + chip::Callback::Callback mOnSuccessCallback_44{ + OnSuccessCallback_44, this + }; + chip::Callback::Callback mOnFailureCallback_45{ OnFailureCallback_45, this }; + chip::Callback::Callback mOnSuccessCallback_45{ OnSuccessCallback_45, this }; + chip::Callback::Callback mOnFailureCallback_46{ OnFailureCallback_46, this }; + chip::Callback::Callback mOnSuccessCallback_46{ OnSuccessCallback_46, this }; + chip::Callback::Callback mOnFailureCallback_48{ OnFailureCallback_48, this }; + chip::Callback::Callback mOnSuccessCallback_48{ OnSuccessCallback_48, this }; + chip::Callback::Callback mOnFailureCallback_49{ OnFailureCallback_49, this }; + chip::Callback::Callback mOnSuccessCallback_49{ OnSuccessCallback_49, + this }; + chip::Callback::Callback mOnFailureCallback_50{ OnFailureCallback_50, this }; + chip::Callback::Callback mOnSuccessCallback_50{ OnSuccessCallback_50, + this }; + chip::Callback::Callback mOnFailureCallback_52{ OnFailureCallback_52, this }; + chip::Callback::Callback mOnSuccessCallback_52{ OnSuccessCallback_52, + this }; + chip::Callback::Callback mOnFailureCallback_53{ OnFailureCallback_53, this }; + chip::Callback::Callback mOnSuccessCallback_53{ OnSuccessCallback_53, this }; + chip::Callback::Callback mOnFailureCallback_55{ OnFailureCallback_55, this }; + chip::Callback::Callback mOnSuccessCallback_55{ OnSuccessCallback_55, this }; + chip::Callback::Callback mOnFailureCallback_56{ OnFailureCallback_56, this }; + chip::Callback::Callback mOnSuccessCallback_56{ + OnSuccessCallback_56, this + }; + chip::Callback::Callback mOnFailureCallback_58{ OnFailureCallback_58, this }; + chip::Callback::Callback mOnSuccessCallback_58{ + OnSuccessCallback_58, this + }; + + static void OnFailureCallback_0(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_0(status); + } + + static void OnSuccessCallback_0(void * context, int16_t localTemperature) + { + (static_cast(context))->OnSuccessResponse_0(localTemperature); + } + + static void OnFailureCallback_1(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_1(status); + } + + static void OnSuccessCallback_1(void * context, int16_t absMinHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_1(absMinHeatSetpointLimit); + } + + static void OnFailureCallback_2(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_2(status); + } + + static void OnSuccessCallback_2(void * context, int16_t absMinHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_2(absMinHeatSetpointLimit); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(chip::to_underlying(status)); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, int16_t absMinHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_4(absMinHeatSetpointLimit); + } + + static void OnFailureCallback_5(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, int16_t absMaxHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_5(absMaxHeatSetpointLimit); + } + + static void OnFailureCallback_6(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context, int16_t absMaxHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_6(absMaxHeatSetpointLimit); + } + + static void OnFailureCallback_7(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_7(chip::to_underlying(status)); + } + + static void OnSuccessCallback_7(void * context) { (static_cast(context))->OnSuccessResponse_7(); } + + static void OnFailureCallback_8(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_8(status); + } + + static void OnSuccessCallback_8(void * context, int16_t absMaxHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_8(absMaxHeatSetpointLimit); + } + + static void OnFailureCallback_9(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_9(status); + } + + static void OnSuccessCallback_9(void * context, int16_t absMinCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_9(absMinCoolSetpointLimit); + } + + static void OnFailureCallback_10(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_10(status); + } + + static void OnSuccessCallback_10(void * context, int16_t absMinCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_10(absMinCoolSetpointLimit); + } + + static void OnFailureCallback_11(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_11(chip::to_underlying(status)); + } + + static void OnSuccessCallback_11(void * context) { (static_cast(context))->OnSuccessResponse_11(); } + + static void OnFailureCallback_12(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_12(status); + } + + static void OnSuccessCallback_12(void * context, int16_t absMinCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_12(absMinCoolSetpointLimit); + } + + static void OnFailureCallback_13(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_13(status); + } + + static void OnSuccessCallback_13(void * context, int16_t absMaxCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_13(absMaxCoolSetpointLimit); + } + + static void OnFailureCallback_14(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_14(status); + } + + static void OnSuccessCallback_14(void * context, int16_t absMaxCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_14(absMaxCoolSetpointLimit); + } + + static void OnFailureCallback_15(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_15(chip::to_underlying(status)); + } + + static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } + + static void OnFailureCallback_16(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_16(status); + } + + static void OnSuccessCallback_16(void * context, int16_t absMaxCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_16(absMaxCoolSetpointLimit); + } + + static void OnFailureCallback_17(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_17(status); + } + + static void OnSuccessCallback_17(void * context, int16_t occupiedCoolingSetpoint) + { + (static_cast(context))->OnSuccessResponse_17(occupiedCoolingSetpoint); + } + + static void OnFailureCallback_18(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_18(status); + } + + static void OnSuccessCallback_18(void * context, int16_t occupiedCoolingSetpoint) + { + (static_cast(context))->OnSuccessResponse_18(occupiedCoolingSetpoint); + } + + static void OnFailureCallback_19(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_19(chip::to_underlying(status)); + } + + static void OnSuccessCallback_19(void * context) { (static_cast(context))->OnSuccessResponse_19(); } + + static void OnFailureCallback_20(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_20(status); + } + + static void OnSuccessCallback_20(void * context, int16_t occupiedCoolingSetpoint) + { + (static_cast(context))->OnSuccessResponse_20(occupiedCoolingSetpoint); + } + + static void OnFailureCallback_21(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_21(status); + } + + static void OnSuccessCallback_21(void * context, int16_t occupiedHeatingSetpoint) + { + (static_cast(context))->OnSuccessResponse_21(occupiedHeatingSetpoint); + } + + static void OnFailureCallback_22(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_22(status); + } + + static void OnSuccessCallback_22(void * context, int16_t occupiedHeatingSetpoint) + { + (static_cast(context))->OnSuccessResponse_22(occupiedHeatingSetpoint); + } + + static void OnFailureCallback_23(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_23(chip::to_underlying(status)); + } + + static void OnSuccessCallback_23(void * context) { (static_cast(context))->OnSuccessResponse_23(); } + + static void OnFailureCallback_24(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_24(status); + } + + static void OnSuccessCallback_24(void * context, int16_t occupiedHeatingSetpoint) + { + (static_cast(context))->OnSuccessResponse_24(occupiedHeatingSetpoint); + } + + static void OnFailureCallback_25(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_25(status); + } + + static void OnSuccessCallback_25(void * context, int16_t minHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_25(minHeatSetpointLimit); + } + + static void OnFailureCallback_26(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_26(status); + } + + static void OnSuccessCallback_26(void * context, int16_t minHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_26(minHeatSetpointLimit); + } + + static void OnFailureCallback_27(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_27(chip::to_underlying(status)); + } + + static void OnSuccessCallback_27(void * context) { (static_cast(context))->OnSuccessResponse_27(); } + + static void OnFailureCallback_28(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_28(status); + } + + static void OnSuccessCallback_28(void * context, int16_t minHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_28(minHeatSetpointLimit); + } + + static void OnFailureCallback_29(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_29(status); + } + + static void OnSuccessCallback_29(void * context, int16_t maxHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_29(maxHeatSetpointLimit); + } + + static void OnFailureCallback_30(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_30(status); + } + + static void OnSuccessCallback_30(void * context, int16_t maxHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_30(maxHeatSetpointLimit); + } + + static void OnFailureCallback_31(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_31(chip::to_underlying(status)); + } + + static void OnSuccessCallback_31(void * context) { (static_cast(context))->OnSuccessResponse_31(); } + + static void OnFailureCallback_32(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_32(status); + } + + static void OnSuccessCallback_32(void * context, int16_t maxHeatSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_32(maxHeatSetpointLimit); + } + + static void OnFailureCallback_33(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_33(status); + } + + static void OnSuccessCallback_33(void * context, int16_t minCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_33(minCoolSetpointLimit); + } + + static void OnFailureCallback_34(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_34(status); + } + + static void OnSuccessCallback_34(void * context, int16_t minCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_34(minCoolSetpointLimit); + } + + static void OnFailureCallback_35(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_35(chip::to_underlying(status)); + } + + static void OnSuccessCallback_35(void * context) { (static_cast(context))->OnSuccessResponse_35(); } + + static void OnFailureCallback_36(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_36(status); + } + + static void OnSuccessCallback_36(void * context, int16_t minCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_36(minCoolSetpointLimit); + } + + static void OnFailureCallback_37(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_37(status); + } + + static void OnSuccessCallback_37(void * context, int16_t maxCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_37(maxCoolSetpointLimit); + } + + static void OnFailureCallback_38(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_38(status); + } + + static void OnSuccessCallback_38(void * context, int16_t maxCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_38(maxCoolSetpointLimit); + } + + static void OnFailureCallback_39(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_39(chip::to_underlying(status)); + } + + static void OnSuccessCallback_39(void * context) { (static_cast(context))->OnSuccessResponse_39(); } + + static void OnFailureCallback_40(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_40(status); + } + + static void OnSuccessCallback_40(void * context, int16_t maxCoolSetpointLimit) + { + (static_cast(context))->OnSuccessResponse_40(maxCoolSetpointLimit); + } + + static void OnFailureCallback_41(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_41(status); + } + + static void OnSuccessCallback_41(void * context, uint8_t controlSequenceOfOperation) + { + (static_cast(context))->OnSuccessResponse_41(controlSequenceOfOperation); + } + + static void OnFailureCallback_42(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_42(status); + } + + static void OnSuccessCallback_42(void * context, uint8_t controlSequenceOfOperation) + { + (static_cast(context))->OnSuccessResponse_42(controlSequenceOfOperation); + } + + static void OnFailureCallback_43(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_43(chip::to_underlying(status)); + } + + static void OnSuccessCallback_43(void * context) { (static_cast(context))->OnSuccessResponse_43(); } + + static void OnFailureCallback_44(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_44(status); + } + + static void OnSuccessCallback_44(void * context, uint8_t controlSequenceOfOperation) + { + (static_cast(context))->OnSuccessResponse_44(controlSequenceOfOperation); + } + + static void OnFailureCallback_45(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_45(status); + } + + static void OnSuccessCallback_45(void * context, uint8_t systemMode) + { + (static_cast(context))->OnSuccessResponse_45(systemMode); + } + + static void OnFailureCallback_46(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_46(status); + } + + static void OnSuccessCallback_46(void * context, uint8_t systemMode) + { + (static_cast(context))->OnSuccessResponse_46(systemMode); + } + + static void OnFailureCallback_47(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_47(chip::to_underlying(status)); + } + + static void OnSuccessCallback_47(void * context) { (static_cast(context))->OnSuccessResponse_47(); } + + static void OnFailureCallback_48(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_48(status); + } + + static void OnSuccessCallback_48(void * context, uint8_t systemMode) + { + (static_cast(context))->OnSuccessResponse_48(systemMode); + } + + static void OnFailureCallback_49(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_49(status); + } + + static void OnSuccessCallback_49(void * context, int8_t minSetpointDeadBand) + { + (static_cast(context))->OnSuccessResponse_49(minSetpointDeadBand); + } + + static void OnFailureCallback_50(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_50(status); + } + + static void OnSuccessCallback_50(void * context, int8_t minSetpointDeadBand) + { + (static_cast(context))->OnSuccessResponse_50(minSetpointDeadBand); + } + + static void OnFailureCallback_51(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_51(chip::to_underlying(status)); + } + + static void OnSuccessCallback_51(void * context) { (static_cast(context))->OnSuccessResponse_51(); } + + static void OnFailureCallback_52(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_52(status); + } + + static void OnSuccessCallback_52(void * context, int8_t minSetpointDeadBand) + { + (static_cast(context))->OnSuccessResponse_52(minSetpointDeadBand); + } + + static void OnFailureCallback_53(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_53(status); + } + + static void OnSuccessCallback_53(void * context, uint8_t startOfWeek) + { + (static_cast(context))->OnSuccessResponse_53(startOfWeek); + } + + static void OnFailureCallback_54(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_54(chip::to_underlying(status)); + } + + static void OnSuccessCallback_54(void * context) { (static_cast(context))->OnSuccessResponse_54(); } + + static void OnFailureCallback_55(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_55(status); + } + + static void OnSuccessCallback_55(void * context, uint8_t startOfWeek) + { + (static_cast(context))->OnSuccessResponse_55(startOfWeek); + } + + static void OnFailureCallback_56(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_56(status); + } + + static void OnSuccessCallback_56(void * context, uint8_t numberOfWeeklyTransitions) + { + (static_cast(context))->OnSuccessResponse_56(numberOfWeeklyTransitions); + } + + static void OnFailureCallback_57(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_57(chip::to_underlying(status)); + } + + static void OnSuccessCallback_57(void * context) { (static_cast(context))->OnSuccessResponse_57(); } + + static void OnFailureCallback_58(void * context, uint8_t status) + { + (static_cast(context))->OnFailureResponse_58(status); + } + + static void OnSuccessCallback_58(void * context, uint8_t numberOfDailyTransitions) + { + (static_cast(context))->OnSuccessResponse_58(numberOfDailyTransitions); + } + + static void OnFailureCallback_59(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_59(chip::to_underlying(status)); + } + + static void OnSuccessCallback_59(void * context) { (static_cast(context))->OnSuccessResponse_59(); } + + // + // Tests methods + // + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutLocalTemperature_0() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeLocalTemperature(mOnSuccessCallback_0.Cancel(), mOnFailureCallback_0.Cancel()); + } + + void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_0(int16_t localTemperature) + { + VerifyOrReturn(CheckConstraintType("localTemperature", "", "int16")); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinHeatSetpointLimit_1() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMinHeatSetpointLimit(mOnSuccessCallback_1.Cancel(), mOnFailureCallback_1.Cancel()); + } + + void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_1(int16_t absMinHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinHeatSetpointLimit_2() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMinHeatSetpointLimit(mOnSuccessCallback_2.Cancel(), mOnFailureCallback_2.Cancel()); + } + + void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(int16_t absMinHeatSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("absMinHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinHeatSetpointLimit_3() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t absMinHeatSetpointLimitArgument; + absMinHeatSetpointLimitArgument = 700; + + return cluster.WriteAttribute( + absMinHeatSetpointLimitArgument, this, OnSuccessCallback_3, OnFailureCallback_3); + } + + void OnFailureResponse_3(uint8_t status) { NextTest(); } + + void OnSuccessResponse_3() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinHeatSetpointLimit_4() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMinHeatSetpointLimit(mOnSuccessCallback_4.Cancel(), mOnFailureCallback_4.Cancel()); + } + + void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(int16_t absMinHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("absMinHeatSetpointLimit", absMinHeatSetpointLimit, 700)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_5() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMaxHeatSetpointLimit(mOnSuccessCallback_5.Cancel(), mOnFailureCallback_5.Cancel()); + } + + void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(int16_t absMaxHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_6() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMaxHeatSetpointLimit(mOnSuccessCallback_6.Cancel(), mOnFailureCallback_6.Cancel()); + } + + void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_6(int16_t absMaxHeatSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("absMaxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxHeatSetpointLimit_7() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t absMaxHeatSetpointLimitArgument; + absMaxHeatSetpointLimitArgument = 3000; + + return cluster.WriteAttribute( + absMaxHeatSetpointLimitArgument, this, OnSuccessCallback_7, OnFailureCallback_7); + } + + void OnFailureResponse_7(uint8_t status) { NextTest(); } + + void OnSuccessResponse_7() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxHeatSetpointLimit_8() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMaxHeatSetpointLimit(mOnSuccessCallback_8.Cancel(), mOnFailureCallback_8.Cancel()); + } + + void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_8(int16_t absMaxHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("absMaxHeatSetpointLimit", absMaxHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMinCoolSetpointLimit_9() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMinCoolSetpointLimit(mOnSuccessCallback_9.Cancel(), mOnFailureCallback_9.Cancel()); + } + + void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_9(int16_t absMinCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMinCoolSetpointLimit_10() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMinCoolSetpointLimit(mOnSuccessCallback_10.Cancel(), mOnFailureCallback_10.Cancel()); + } + + void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_10(int16_t absMinCoolSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("absMinCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMinCoolSetpointLimit_11() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t absMinCoolSetpointLimitArgument; + absMinCoolSetpointLimitArgument = 1600; + + return cluster.WriteAttribute( + absMinCoolSetpointLimitArgument, this, OnSuccessCallback_11, OnFailureCallback_11); + } + + void OnFailureResponse_11(uint8_t status) { NextTest(); } + + void OnSuccessResponse_11() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMinCoolSetpointLimit_12() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMinCoolSetpointLimit(mOnSuccessCallback_12.Cancel(), mOnFailureCallback_12.Cancel()); + } + + void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_12(int16_t absMinCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("absMinCoolSetpointLimit", absMinCoolSetpointLimit, 1600)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_13() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMaxCoolSetpointLimit(mOnSuccessCallback_13.Cancel(), mOnFailureCallback_13.Cancel()); + } + + void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_13(int16_t absMaxCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_14() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMaxCoolSetpointLimit(mOnSuccessCallback_14.Cancel(), mOnFailureCallback_14.Cancel()); + } + + void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_14(int16_t absMaxCoolSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("absMaxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutAbsMaxCoolSetpointLimit_15() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t absMaxCoolSetpointLimitArgument; + absMaxCoolSetpointLimitArgument = 3200; + + return cluster.WriteAttribute( + absMaxCoolSetpointLimitArgument, this, OnSuccessCallback_15, OnFailureCallback_15); + } + + void OnFailureResponse_15(uint8_t status) { NextTest(); } + + void OnSuccessResponse_15() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutAbsMaxCoolSetpointLimit_16() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeAbsMaxCoolSetpointLimit(mOnSuccessCallback_16.Cancel(), mOnFailureCallback_16.Cancel()); + } + + void OnFailureResponse_16(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_16(int16_t absMaxCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("absMaxCoolSetpointLimit", absMaxCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedCoolingSetpoint_17() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOccupiedCoolingSetpoint(mOnSuccessCallback_17.Cancel(), mOnFailureCallback_17.Cancel()); + } + + void OnFailureResponse_17(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_17(int16_t occupiedCoolingSetpoint) + { + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedCoolingSetpoint_18() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOccupiedCoolingSetpoint(mOnSuccessCallback_18.Cancel(), mOnFailureCallback_18.Cancel()); + } + + void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_18(int16_t occupiedCoolingSetpoint) + { + VerifyOrReturn(CheckConstraintType("occupiedCoolingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedCoolingSetpoint_19() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t occupiedCoolingSetpointArgument; + occupiedCoolingSetpointArgument = 2600; + + return cluster.WriteAttribute( + occupiedCoolingSetpointArgument, this, OnSuccessCallback_19, OnFailureCallback_19); + } + + void OnFailureResponse_19(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_19() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedCoolingSetpoint_20() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOccupiedCoolingSetpoint(mOnSuccessCallback_20.Cancel(), mOnFailureCallback_20.Cancel()); + } + + void OnFailureResponse_20(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_20(int16_t occupiedCoolingSetpoint) + { + VerifyOrReturn(CheckValue("occupiedCoolingSetpoint", occupiedCoolingSetpoint, 2600)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutOccupiedHeatingSetpoint_21() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOccupiedHeatingSetpoint(mOnSuccessCallback_21.Cancel(), mOnFailureCallback_21.Cancel()); + } + + void OnFailureResponse_21(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_21(int16_t occupiedHeatingSetpoint) + { + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutOccupiedHeatingSetpoint_22() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOccupiedHeatingSetpoint(mOnSuccessCallback_22.Cancel(), mOnFailureCallback_22.Cancel()); + } + + void OnFailureResponse_22(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_22(int16_t occupiedHeatingSetpoint) + { + VerifyOrReturn(CheckConstraintType("occupiedHeatingSetpoint", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 700)); + VerifyOrReturn(CheckConstraintMaxValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2600)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutOccupiedHeatingSetpoint_23() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t occupiedHeatingSetpointArgument; + occupiedHeatingSetpointArgument = 2000; + + return cluster.WriteAttribute( + occupiedHeatingSetpointArgument, this, OnSuccessCallback_23, OnFailureCallback_23); + } + + void OnFailureResponse_23(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_23() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutOccupiedHeatingSetpoint_24() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeOccupiedHeatingSetpoint(mOnSuccessCallback_24.Cancel(), mOnFailureCallback_24.Cancel()); + } + + void OnFailureResponse_24(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_24(int16_t occupiedHeatingSetpoint) + { + VerifyOrReturn(CheckValue("occupiedHeatingSetpoint", occupiedHeatingSetpoint, 2000)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutMinHeatSetpointLimit_25() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinHeatSetpointLimit(mOnSuccessCallback_25.Cancel(), mOnFailureCallback_25.Cancel()); + } + + void OnFailureResponse_25(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_25(int16_t minHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinHeatSetpointLimit_26() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinHeatSetpointLimit(mOnSuccessCallback_26.Cancel(), mOnFailureCallback_26.Cancel()); + } + + void OnFailureResponse_26(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_26(int16_t minHeatSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("minHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("minHeatSetpointLimit", minHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinHeatSetpointLimit_27() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t minHeatSetpointLimitArgument; + minHeatSetpointLimitArgument = 700; + + return cluster.WriteAttribute( + minHeatSetpointLimitArgument, this, OnSuccessCallback_27, OnFailureCallback_27); + } + + void OnFailureResponse_27(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_27() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinHeatSetpointLimit_28() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinHeatSetpointLimit(mOnSuccessCallback_28.Cancel(), mOnFailureCallback_28.Cancel()); + } + + void OnFailureResponse_28(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_28(int16_t minHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("minHeatSetpointLimit", minHeatSetpointLimit, 700)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxHeatSetpointLimit_29() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxHeatSetpointLimit(mOnSuccessCallback_29.Cancel(), mOnFailureCallback_29.Cancel()); + } + + void OnFailureResponse_29(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_29(int16_t maxHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxHeatSetpointLimit_30() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxHeatSetpointLimit(mOnSuccessCallback_30.Cancel(), mOnFailureCallback_30.Cancel()); + } + + void OnFailureResponse_30(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_30(int16_t maxHeatSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("maxHeatSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 700)); + VerifyOrReturn(CheckConstraintMaxValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxHeatSetpointLimit_31() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t maxHeatSetpointLimitArgument; + maxHeatSetpointLimitArgument = 3000; + + return cluster.WriteAttribute( + maxHeatSetpointLimitArgument, this, OnSuccessCallback_31, OnFailureCallback_31); + } + + void OnFailureResponse_31(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_31() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxHeatSetpointLimit_32() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxHeatSetpointLimit(mOnSuccessCallback_32.Cancel(), mOnFailureCallback_32.Cancel()); + } + + void OnFailureResponse_32(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_32(int16_t maxHeatSetpointLimit) + { + VerifyOrReturn(CheckValue("maxHeatSetpointLimit", maxHeatSetpointLimit, 3000)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutMinCoolSetpointLimit_33() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinCoolSetpointLimit(mOnSuccessCallback_33.Cancel(), mOnFailureCallback_33.Cancel()); + } + + void OnFailureResponse_33(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_33(int16_t minCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMinCoolSetpointLimit_34() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinCoolSetpointLimit(mOnSuccessCallback_34.Cancel(), mOnFailureCallback_34.Cancel()); + } + + void OnFailureResponse_34(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_34(int16_t minCoolSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("minCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("minCoolSetpointLimit", minCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMinCoolSetpointLimit_35() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t minCoolSetpointLimitArgument; + minCoolSetpointLimitArgument = 1600; + + return cluster.WriteAttribute( + minCoolSetpointLimitArgument, this, OnSuccessCallback_35, OnFailureCallback_35); + } + + void OnFailureResponse_35(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_35() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutMinCoolSetpointLimit_36() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinCoolSetpointLimit(mOnSuccessCallback_36.Cancel(), mOnFailureCallback_36.Cancel()); + } + + void OnFailureResponse_36(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_36(int16_t minCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("minCoolSetpointLimit", minCoolSetpointLimit, 1600)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutMaxCoolSetpointLimit_37() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxCoolSetpointLimit(mOnSuccessCallback_37.Cancel(), mOnFailureCallback_37.Cancel()); + } + + void OnFailureResponse_37(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_37(int16_t maxCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutMaxCoolSetpointLimit_38() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxCoolSetpointLimit(mOnSuccessCallback_38.Cancel(), mOnFailureCallback_38.Cancel()); + } + + void OnFailureResponse_38(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_38(int16_t maxCoolSetpointLimit) + { + VerifyOrReturn(CheckConstraintType("maxCoolSetpointLimit", "", "int16")); + VerifyOrReturn(CheckConstraintMinValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 1600)); + VerifyOrReturn(CheckConstraintMaxValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutMaxCoolSetpointLimit_39() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int16_t maxCoolSetpointLimitArgument; + maxCoolSetpointLimitArgument = 3200; + + return cluster.WriteAttribute( + maxCoolSetpointLimitArgument, this, OnSuccessCallback_39, OnFailureCallback_39); + } + + void OnFailureResponse_39(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_39() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutMaxCoolSetpointLimit_40() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMaxCoolSetpointLimit(mOnSuccessCallback_40.Cancel(), mOnFailureCallback_40.Cancel()); + } + + void OnFailureResponse_40(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_40(int16_t maxCoolSetpointLimit) + { + VerifyOrReturn(CheckValue("maxCoolSetpointLimit", maxCoolSetpointLimit, 3200)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutControlSequenceOfOperation_41() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeControlSequenceOfOperation(mOnSuccessCallback_41.Cancel(), mOnFailureCallback_41.Cancel()); + } + + void OnFailureResponse_41(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_41(uint8_t controlSequenceOfOperation) + { + VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutControlSequenceOfOperation_42() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeControlSequenceOfOperation(mOnSuccessCallback_42.Cancel(), mOnFailureCallback_42.Cancel()); + } + + void OnFailureResponse_42(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_42(uint8_t controlSequenceOfOperation) + { + VerifyOrReturn(CheckConstraintType("controlSequenceOfOperation", "", "enum8")); + VerifyOrReturn(CheckConstraintMaxValue("controlSequenceOfOperation", controlSequenceOfOperation, 5)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutControlSequenceOfOperation_43() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t controlSequenceOfOperationArgument; + controlSequenceOfOperationArgument = static_cast(4); + + return cluster.WriteAttribute( + controlSequenceOfOperationArgument, this, OnSuccessCallback_43, OnFailureCallback_43); + } + + void OnFailureResponse_43(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_43() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutControlSequenceOfOperation_44() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeControlSequenceOfOperation(mOnSuccessCallback_44.Cancel(), mOnFailureCallback_44.Cancel()); + } + + void OnFailureResponse_44(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_44(uint8_t controlSequenceOfOperation) + { + VerifyOrReturn(CheckValue("controlSequenceOfOperation", controlSequenceOfOperation, 4)); + NextTest(); + } + + CHIP_ERROR TestReadsMandatoryAttributesFromDutSystemMode_45() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeSystemMode(mOnSuccessCallback_45.Cancel(), mOnFailureCallback_45.Cancel()); + } + + void OnFailureResponse_45(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_45(uint8_t systemMode) + { + VerifyOrReturn(CheckValue("systemMode", systemMode, 1)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfMandatoryAttributesFromDutSystemMode_46() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeSystemMode(mOnSuccessCallback_46.Cancel(), mOnFailureCallback_46.Cancel()); + } + + void OnFailureResponse_46(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_46(uint8_t systemMode) + { + VerifyOrReturn(CheckConstraintType("systemMode", "", "enum8")); + VerifyOrReturn(CheckConstraintMaxValue("systemMode", systemMode, 9)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToMandatoryAttributesToDutSystemMode_47() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t systemModeArgument; + systemModeArgument = static_cast(1); + + return cluster.WriteAttribute( + systemModeArgument, this, OnSuccessCallback_47, OnFailureCallback_47); + } + + void OnFailureResponse_47(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_47() { NextTest(); } + + CHIP_ERROR TestReadBackMandatoryAttributesFromDutSystemMode_48() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeSystemMode(mOnSuccessCallback_48.Cancel(), mOnFailureCallback_48.Cancel()); + } + + void OnFailureResponse_48(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_48(uint8_t systemMode) + { + VerifyOrReturn(CheckValue("systemMode", systemMode, 1)); + NextTest(); + } + + CHIP_ERROR TestReadsOptionalAttributesFromDutMinSetpointDeadBand_49() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinSetpointDeadBand(mOnSuccessCallback_49.Cancel(), mOnFailureCallback_49.Cancel()); + } + + void OnFailureResponse_49(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_49(int8_t minSetpointDeadBand) + { + VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand, 25)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutMinSetpointDeadBand_50() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinSetpointDeadBand(mOnSuccessCallback_50.Cancel(), mOnFailureCallback_50.Cancel()); + } + + void OnFailureResponse_50(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_50(int8_t minSetpointDeadBand) + { + VerifyOrReturn(CheckConstraintType("minSetpointDeadBand", "", "int8")); + VerifyOrReturn(CheckConstraintMaxValue("minSetpointDeadBand", minSetpointDeadBand, 25)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutMinSetpointDeadBand_51() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + int8_t minSetpointDeadBandArgument; + minSetpointDeadBandArgument = 25; + + return cluster.WriteAttribute( + minSetpointDeadBandArgument, this, OnSuccessCallback_51, OnFailureCallback_51); + } + + void OnFailureResponse_51(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_51() { NextTest(); } + + CHIP_ERROR TestReadBackOptionalAttributesFromDutMinSetpointDeadBand_52() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeMinSetpointDeadBand(mOnSuccessCallback_52.Cancel(), mOnFailureCallback_52.Cancel()); + } + + void OnFailureResponse_52(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_52(int8_t minSetpointDeadBand) + { + VerifyOrReturn(CheckValue("minSetpointDeadBand", minSetpointDeadBand, 25)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutStartOfWeek_53() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeStartOfWeek(mOnSuccessCallback_53.Cancel(), mOnFailureCallback_53.Cancel()); + } + + void OnFailureResponse_53(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_53(uint8_t startOfWeek) + { + VerifyOrReturn(CheckConstraintType("startOfWeek", "", "enum8")); + VerifyOrReturn(CheckConstraintMaxValue("startOfWeek", startOfWeek, 6)); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutStartOfWeek_54() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t startOfWeekArgument; + startOfWeekArgument = static_cast(0); + + return cluster.WriteAttribute( + startOfWeekArgument, this, OnSuccessCallback_54, OnFailureCallback_54); + } + + void OnFailureResponse_54(uint8_t status) { NextTest(); } + + void OnSuccessResponse_54() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadBackOptionalAttributesFromDutStartOfWeek_55() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeStartOfWeek(mOnSuccessCallback_55.Cancel(), mOnFailureCallback_55.Cancel()); + } + + void OnFailureResponse_55(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_55(uint8_t startOfWeek) + { + VerifyOrReturn(CheckValue("startOfWeek", startOfWeek, 0)); + NextTest(); + } + + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfWeeklyTransitions_56() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeNumberOfWeeklyTransitions(mOnSuccessCallback_56.Cancel(), mOnFailureCallback_56.Cancel()); + } + + void OnFailureResponse_56(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_56(uint8_t numberOfWeeklyTransitions) + { + VerifyOrReturn(CheckConstraintType("numberOfWeeklyTransitions", "", "uint8")); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfWeeklyTransitions_57() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t numberOfWeeklyTransitionsArgument; + numberOfWeeklyTransitionsArgument = 0; + + return cluster.WriteAttribute( + numberOfWeeklyTransitionsArgument, this, OnSuccessCallback_57, OnFailureCallback_57); + } + + void OnFailureResponse_57(uint8_t status) { NextTest(); } + + void OnSuccessResponse_57() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsConstraintsOfOptionalAttributesFromDutNumberOfDailyTransitions_58() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + return cluster.ReadAttributeNumberOfDailyTransitions(mOnSuccessCallback_58.Cancel(), mOnFailureCallback_58.Cancel()); + } + + void OnFailureResponse_58(uint8_t status) { ThrowFailureResponse(); } + + void OnSuccessResponse_58(uint8_t numberOfDailyTransitions) + { + VerifyOrReturn(CheckConstraintType("numberOfDailyTransitions", "", "uint8")); + NextTest(); + } + + CHIP_ERROR TestWritesTheRespectiveDefaultValueToOptionalAttributesToDutNumberOfDailyTransitions_59() + { + chip::Controller::ThermostatClusterTest cluster; + cluster.Associate(mDevice, 1); + + uint8_t numberOfDailyTransitionsArgument; + numberOfDailyTransitionsArgument = 0; + + return cluster.WriteAttribute( + numberOfDailyTransitionsArgument, this, OnSuccessCallback_59, OnFailureCallback_59); + } + + void OnFailureResponse_59(uint8_t status) { NextTest(); } + + void OnSuccessResponse_59() { ThrowSuccessResponse(); } +}; + +class Test_TC_TSUIC_1_1 : public TestCommand +{ +public: + Test_TC_TSUIC_1_1() : TestCommand("Test_TC_TSUIC_1_1"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_TSUIC_1_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_TSUIC_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + case 0: + ChipLogProgress(chipTool, + " ***** Test Step 0 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_0(); + break; + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 1; + static void OnFailureCallback_0(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(chip::to_underlying(status)); @@ -21940,6 +24247,54 @@ class Test_TC_DIAGTH_1_1 : public TestCommand } }; +class Test_TC_DIAGSW_3_2 : public TestCommand +{ +public: + Test_TC_DIAGSW_3_2() : TestCommand("Test_TC_DIAGSW_3_2"), mTestIndex(0) {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAGSW_3_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAGSW_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + // + // Tests methods + // +}; + class Test_TC_WNCV_1_1 : public TestCommand { public: @@ -31062,6 +33417,7 @@ void registerCommandsTests(Commands & commands) commands_list clusterCommands = { make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), @@ -31132,10 +33488,12 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),