diff --git a/docs/examples/index.md b/docs/examples/index.md index 03835b1c41ca37..f45808c5a059dc 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -320,3 +320,12 @@ air-purifier-app/**/README network-manager-app/README ``` + +## Lit ICD example + +```{toctree} +:glob: +:maxdepth: 1 + +lit-icd-app/**/README +``` diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index 345413f90f2942..f525e4053bc2c7 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -708,7 +708,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index de5fd0936d6a32..4c04b0d2e25945 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -661,7 +661,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index f5e513014fb578..f405eed37f7c9c 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -466,7 +466,7 @@ cluster OnOff = 6 { } /** Attributes and commands for configuring On/Off switching devices. */ -cluster OnOffSwitchConfiguration = 7 { +deprecated cluster OnOffSwitchConfiguration = 7 { revision 1; // NOTE: Default/not specifically set readonly attribute enum8 switchType = 0; @@ -605,7 +605,7 @@ cluster LevelControl = 8 { } /** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -cluster BinaryInputBasic = 15 { +deprecated cluster BinaryInputBasic = 15 { revision 1; // NOTE: Default/not specifically set attribute optional char_string<16> activeText = 4; @@ -1839,7 +1839,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -3792,7 +3792,7 @@ cluster WindowCovering = 258 { } /** This cluster provides control of a barrier (garage door). */ -cluster BarrierControl = 259 { +deprecated cluster BarrierControl = 259 { revision 1; // NOTE: Default/not specifically set bitmap BarrierControlCapabilities : bitmap8 { @@ -3961,13 +3961,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -3976,13 +4004,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -3994,15 +4038,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4015,24 +4067,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4046,18 +4138,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4067,14 +4159,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4083,27 +4175,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -5323,7 +5415,7 @@ cluster LowPower = 1288 { } /** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -cluster ElectricalMeasurement = 2820 { +deprecated cluster ElectricalMeasurement = 2820 { revision 3; readonly attribute optional bitmap32 measurementType = 0; @@ -7049,6 +7141,7 @@ endpoint 1 { ram attribute systemMode default = 0x01; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0023; ram attribute clusterRevision default = 6; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 84ef5e05e26b4c..9d8216013aa144 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -12581,7 +12581,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12597,7 +12597,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12613,7 +12613,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12629,7 +12629,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12645,7 +12645,7 @@ "code": 6, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12661,7 +12661,7 @@ "code": 17, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12677,7 +12677,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12693,7 +12693,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12709,7 +12709,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12725,7 +12725,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12741,7 +12741,7 @@ "code": 24, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12773,7 +12773,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12789,7 +12789,7 @@ "code": 28, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "SystemModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12832,6 +12832,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -21724,5 +21740,6 @@ "endpointId": 65534, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h b/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h index 31ff5098869680..7d6c77af81ef1e 100644 --- a/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h +++ b/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h @@ -154,7 +154,7 @@ void ProcessThermostatUnicastBindingCommand(BindingCommandData * data, const Emb switch (data->commandId) { case Clusters::Thermostat::Commands::SetpointRaiseLower::Id: - setpointRaiseLowerCommand.mode = static_cast(data->args[0]); + setpointRaiseLowerCommand.mode = static_cast(data->args[0]); setpointRaiseLowerCommand.amount = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, setpointRaiseLowerCommand, onSuccess, onFailure); @@ -171,7 +171,7 @@ void ProcessThermostatGroupBindingCommand(BindingCommandData * data, const Ember switch (data->commandId) { case Clusters::Thermostat::Commands::SetpointRaiseLower::Id: - setpointRaiseLowerCommand.mode = static_cast(data->args[0]); + setpointRaiseLowerCommand.mode = static_cast(data->args[0]); setpointRaiseLowerCommand.amount = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, setpointRaiseLowerCommand); break; diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 621ee8f6d2ce0a..0668411a9bfbd3 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -141,14 +141,14 @@ class EditAttributeListModel : public TouchesMatterStackModel // false otherwise. bool isValidThermostatSystemMode(uint8_t systemMode) { - chip::app::Clusters::Thermostat::ThermostatSystemMode mode = - static_cast(systemMode); + chip::app::Clusters::Thermostat::SystemModeEnum mode = + static_cast(systemMode); switch (mode) { - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kOff: - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kAuto: - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kCool: - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kHeat: + case chip::app::Clusters::Thermostat::SystemModeEnum::kOff: + case chip::app::Clusters::Thermostat::SystemModeEnum::kAuto: + case chip::app::Clusters::Thermostat::SystemModeEnum::kCool: + case chip::app::Clusters::Thermostat::SystemModeEnum::kHeat: return true; default: return false; @@ -157,13 +157,13 @@ class EditAttributeListModel : public TouchesMatterStackModel bool isValidThermostatRunningMode(uint8_t runningMode) { - chip::app::Clusters::Thermostat::ThermostatRunningMode mode = - static_cast(runningMode); + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum mode = + static_cast(runningMode); switch (mode) { - case chip::app::Clusters::Thermostat::ThermostatRunningMode::kOff: - case chip::app::Clusters::Thermostat::ThermostatRunningMode::kCool: - case chip::app::Clusters::Thermostat::ThermostatRunningMode::kHeat: + case chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff: + case chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kCool: + case chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat: return true; default: return false; @@ -233,24 +233,77 @@ class EditAttributeListModel : public TouchesMatterStackModel else if (name == "SystemMode") { // System modes - Off, Auto, Cool and Heat are currently supported. + chip::app::Clusters::Thermostat::SystemModeEnum modeEnum = + chip::app::Clusters::Thermostat::SystemModeEnum::kUnknownEnumValue; uint8_t mode = n; + + switch (n) + { + case 0: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kOff; + break; + case 1: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kAuto; + break; + case 3: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kCool; + break; + case 4: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kHeat; + break; + case 5: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kEmergencyHeat; + break; + case 6: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kPrecooling; + break; + case 7: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kFanOnly; + break; + case 8: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kDry; + break; + case 9: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kSleep; + break; + default: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kUnknownEnumValue; + break; + } + // Update the system mode here for hardcoded endpoint 1 if (isValidThermostatSystemMode(mode)) { ESP_LOGI(TAG, "System Mode changed to : %d", mode); - app::Clusters::Thermostat::Attributes::SystemMode::Set(1, static_cast(mode)); + app::Clusters::Thermostat::Attributes::SystemMode::Set(1, modeEnum); // If system mode is auto set running mode to off otherwise set it to what the system mode is set to - if (mode == static_cast(chip::app::Clusters::Thermostat::ThermostatSystemMode::kAuto)) + if (modeEnum == chip::app::Clusters::Thermostat::SystemModeEnum::kAuto) { app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set( - 1, static_cast(chip::app::Clusters::Thermostat::ThermostatRunningMode::kOff)); + 1, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff); } else { if (isValidThermostatRunningMode(mode)) { ESP_LOGI(TAG, "Running Mode changed to : %d", mode); - app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, static_cast(mode)); + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum runningModeEnum; + switch (mode) + { + case 0: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff; + break; + case 3: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kCool; + break; + case 4: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat; + break; + default: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kUnknownEnumValue; + break; + } + app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, runningModeEnum); } else { @@ -266,20 +319,38 @@ class EditAttributeListModel : public TouchesMatterStackModel else if (name == "RunningMode") { // Get the system mode - uint8_t systemMode = static_cast(chip::app::Clusters::Thermostat::ThermostatRunningMode::kOff); - app::Clusters::Thermostat::Attributes::SystemMode::Get(1, static_cast(&systemMode)); - if (systemMode != static_cast(chip::app::Clusters::Thermostat::ThermostatSystemMode::kAuto)) + chip::app::Clusters::Thermostat::SystemModeEnum systemMode = chip::app::Clusters::Thermostat::SystemModeEnum::kOff; + app::Clusters::Thermostat::Attributes::SystemMode::Get(1, &systemMode); + if (systemMode != chip::app::Clusters::Thermostat::SystemModeEnum::kAuto) { - ESP_LOGI(TAG, "Running mode can be changed only for system mode auto. Current system mode %d", systemMode); + ESP_LOGI(TAG, "Running mode can be changed only for system mode auto. Current system mode %d", + static_cast(systemMode)); } else { uint8_t mode = n; + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum modeEnum = + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kUnknownEnumValue; // update the running mode here for hardcoded endpoint 1 if (isValidThermostatRunningMode(mode)) { ESP_LOGI(TAG, "Running Mode changed to : %d", mode); - app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, static_cast(mode)); + switch (n) + { + case 0: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff; + break; + case 3: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kCool; + break; + case 4: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat; + break; + default: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kUnknownEnumValue; + break; + } + app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, modeEnum); } else { @@ -607,15 +678,15 @@ void SetupPretendDevices() app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Set(1, static_cast(21 * 100)); app::Clusters::Thermostat::Attributes::LocalTemperature::Set(1, static_cast(21 * 100)); AddAttribute("SystemMode", "4"); - app::Clusters::Thermostat::Attributes::SystemMode::Set( - 1, static_cast(chip::app::Clusters::Thermostat::ThermostatSystemMode::kHeat)); + app::Clusters::Thermostat::Attributes::SystemMode::Set(1, chip::app::Clusters::Thermostat::SystemModeEnum::kHeat); + AddAttribute("CoolSetpoint", "19"); app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Set(1, static_cast(19 * 100)); AddAttribute("HeatSetpoint", "25"); app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Set(1, static_cast(25 * 100)); AddAttribute("RunningMode", "4"); app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set( - 1, static_cast(chip::app::Clusters::Thermostat::ThermostatRunningMode::kHeat)); + 1, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat); AddDevice("Humidity Sensor"); AddEndpoint("External"); diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 3254c32d6deb89..3cc36229c8b746 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1719,7 +1719,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -3492,13 +3492,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -3507,13 +3535,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -3525,15 +3569,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -3546,24 +3598,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -3577,18 +3669,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -3598,14 +3690,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3614,27 +3706,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 12d5c94c6c5ab8..f8242628a7b01e 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -6883,7 +6883,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index 9ed8fc733deca2..c588c84bcff2d0 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp @@ -544,7 +544,7 @@ void SetupPretendDevices() app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Set(1, static_cast(21 * 100)); app::Clusters::Thermostat::Attributes::LocalTemperature::Set(1, static_cast(21 * 100)); AddAttribute("SystemMode", "4"); - app::Clusters::Thermostat::Attributes::SystemMode::Set(1, 4); + app::Clusters::Thermostat::Attributes::SystemMode::Set(1, app::Clusters::Thermostat::SystemModeEnum::kHeat); AddAttribute("OccupiedCoolingSetpoint", "19"); app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Set(1, static_cast(19 * 100)); AddAttribute("OccupiedHeatingSetpoint", "25"); diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 4801c8e25b4f32..97835a68cb1efd 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1111,7 +1111,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 5b6320a272dea3..9a8957be4b3670 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -884,7 +884,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 8a22d48b7236db..e7e8616c9d9bd1 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -631,7 +631,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1134,13 +1134,41 @@ cluster ActivatedCarbonFilterMonitoring = 114 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1149,13 +1177,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1167,15 +1211,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1188,24 +1240,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1219,18 +1311,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1240,14 +1332,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1256,27 +1348,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index f6a7cb27aa01bf..ddf9888809e6e9 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -7705,7 +7705,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index e5aae718206ab2..87d3a47668ce5f 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -769,7 +769,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 06c8b4e71afdb9..81e68dad0a1e58 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -791,7 +791,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 7da5fe1677e97a..fdab8c257d64b9 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -982,7 +982,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index 9689712c18bafa..004879bd53966b 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index b1203f6eb8f47e..4c2f346d5dbddc 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1064,7 +1064,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index 6c62d7e1a7b47c..e170f74b0ef1be 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -594,7 +594,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 1e3022f72afe51..e3ba613c365a8c 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index ab7d1e65d34046..60530d635550ac 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -1064,7 +1064,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 0a55395a7b561b..db2240bd6e89ff 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -846,7 +846,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 3c9ff99195385f..5be1a384367de2 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 38b82e1514b9b4..f35a8a6cdddd35 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -554,7 +554,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index c972cef32145f1..8de16d77b55736 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1064,7 +1064,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1491,13 +1491,41 @@ cluster FixedLabel = 64 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1506,13 +1534,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1524,15 +1568,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1545,24 +1597,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1576,18 +1668,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1597,14 +1689,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1613,27 +1705,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index 2644b85edd5ce6..02f89ad33648f1 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 74e0b685ae2de2..2b4eb985e1554a 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -594,7 +594,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index 2f04d6e365d0cd..bbf46a02affd29 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 8a84b0997b1050..39b2401d020e77 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index ac981c17369262..27fa6bf8c16855 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -1064,7 +1064,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 1928718682d743..9910342d11e89d 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -1064,7 +1064,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index e9eaa1a4c31b3a..31a458ed0dd416 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -1011,7 +1011,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index ea8786c871c413..8776586620c6b4 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -939,7 +939,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 201adf6b167317..e53da0bf3b722b 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index ca66401b5fac06..7c82d569fbd94a 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -666,7 +666,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 4cb577280f581d..2df56e9b77056d 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -666,7 +666,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 19fbe732cf71ba..f5fcbfcea5b280 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -594,7 +594,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index 761967b72943c8..427a490da9d9ef 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -631,7 +631,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 96d1c16d25be15..6ff79435719b1f 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -703,7 +703,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1074,13 +1074,41 @@ cluster GroupKeyManagement = 63 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; } - enum ThermostatControlSequence : enum8 { + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1089,13 +1117,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1107,15 +1151,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1128,24 +1180,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1159,18 +1251,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1180,14 +1272,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1196,27 +1288,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index 2c97a55da45253..2feee5a947ccf4 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -2728,7 +2728,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 71bcbbca8aabea..113d1060bb9d1c 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -890,7 +890,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index ad8832d7430e0f..ce60f0890559a5 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -987,7 +987,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index de90e7ef0c2550..7a56d226aba1c0 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 3afc8aa2d9f902..c2f9fd89f0446c 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1294,13 +1294,41 @@ cluster FixedLabel = 64 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1309,13 +1337,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1327,15 +1371,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1348,24 +1400,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1379,18 +1471,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1400,14 +1492,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1416,27 +1508,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index bf2babfd7a107b..a63173975d4c2b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -3367,7 +3367,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index db355969e1d136..853a7cf73626d8 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -867,7 +867,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 8c39b27debc585..1eff36e286d8cb 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -846,7 +846,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index dd070de6ebc8c2..1d81957ca8e3c7 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -692,7 +692,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 11c0112157a50d..16944fb7b66def 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1182,7 +1182,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index 8a8c6601e346cb..28a9cab82191e4 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter @@ -1043,7 +1043,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index e29db0742bb9b2..4476951b9adaa1 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -1043,7 +1043,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 9fd644a087e709..a5bb2dea68150b 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1043,7 +1043,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 3179ec1ba829e4..de9d08ce214ff1 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1236,7 +1236,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 93b2e2c485ee98..6dd34ba0c3f896 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -935,7 +935,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 53208bb5b38692..672fd44a070d8e 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.matter @@ -982,7 +982,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index 2d34e1df0722cb..c3cbc87075c515 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter @@ -1495,7 +1495,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 3efe467fd0b7fa..46fe5c76ea62ff 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter @@ -1495,7 +1495,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index 888955efe55360..9b570517ab0835 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -687,7 +687,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1596,13 +1596,14 @@ endpoint 0 { server cluster GeneralDiagnostics { callback attribute networkInterfaces; callback attribute rebootCount; + callback attribute upTime; callback attribute testEventTriggersEnabled; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; + ram attribute clusterRevision default = 2; handle command TestEventTrigger; handle command TimeSnapshot; diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap index be399ce5b5bb62..8c4b29e926b2c7 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap @@ -1771,6 +1771,22 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "TestEventTriggersEnabled", "code": 8, @@ -1877,7 +1893,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lit-icd-app/silabs/BUILD.gn b/examples/lit-icd-app/silabs/BUILD.gn new file mode 100644 index 00000000000000..d547ddec637678 --- /dev/null +++ b/examples/lit-icd-app/silabs/BUILD.gn @@ -0,0 +1,213 @@ +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/efr32_sdk.gni") +import("//build_overrides/pigweed.gni") + +import("${build_root}/config/defaults.gni") +import("${efr32_sdk_build_root}/silabs_executable.gni") + +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +import("${chip_root}/src/platform/device.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") + +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +silabs_project_dir = "${chip_root}/examples/lit-icd-app/silabs" +examples_common_plat_dir = "${chip_root}/examples/platform/silabs" + +if (wifi_soc) { + import("${chip_root}/third_party/silabs/SiWx917_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/SiWx917" +} else { + import("${efr32_sdk_build_root}/efr32_sdk.gni") + examples_plat_dir = "${chip_root}/examples/platform/silabs/efr32" +} + +import("${examples_common_plat_dir}/args.gni") + +declare_args() { + # Dump memory usage at link time. + chip_print_memory_usage = false +} + +if (wifi_soc) { + siwx917_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/SiWx917", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} else { + efr32_sdk("sdk") { + sources = [ + "${examples_common_plat_dir}/FreeRTOSConfig.h", + "${silabs_project_dir}/include/CHIPProjectConfig.h", + ] + + include_dirs = [ + "${chip_root}/src/platform/silabs/efr32", + "${silabs_project_dir}/include", + "${examples_plat_dir}", + "${chip_root}/src/lib", + "${examples_common_plat_dir}", + ] + + if (use_wf200) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ "${examples_plat_dir}/wf200" ] + } + + if (chip_enable_ble_rs911x) { + # TODO efr32_sdk should not need a header from this location + include_dirs += [ + "${chip_root}/src/platform/silabs/efr32/rs911x", + "${examples_plat_dir}/rs911x", + "${examples_plat_dir}/rs911x/hal", + ] + } + + defines = [] + if (chip_enable_pw_rpc) { + defines += [ + "HAL_VCOM_ENABLE=1", + "PW_RPC_ENABLED", + ] + } + } +} + +silabs_executable("lit_icd_app") { + output_name = "matter-silabs-lit-icd-example.out" + include_dirs = [ "include" ] + defines = [] + + sources = [ + "${examples_common_plat_dir}/main.cpp", + "src/AppTask.cpp", + "src/ZclCallbacks.cpp", + ] + + deps = [ + ":sdk", + app_data_model, + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}:siwx917-common" ] + } else { + deps += [ "${examples_plat_dir}:efr32-common" ] + } + + if (chip_build_libshell) { + sources += [ "src/ShellCommands.cpp" ] + } + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ENABLED", + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DESCRIPTOR_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LIGHTING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/efr32/PigweedLoggerMutex.cpp", + "${examples_common_plat_dir}/PigweedLogger.cpp", + "${examples_common_plat_dir}/Rpc.cpp", + ] + + deps += [ + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", + ] + + if (wifi_soc) { + deps += [ "${examples_plat_dir}/pw_sys_io:pw_sys_io_siwx917" ] + } else { + deps += [ "${examples_common_plat_dir}/pw_sys_io:pw_sys_io_silabs" ] + } + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/efr32", + ] + } + + ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + if (chip_print_memory_usage) { + ldflags += [ + "-Wl,--print-memory-usage", + "-fstack-usage", + ] + } + + # WiFi Settings + if (chip_enable_wifi) { + ldflags += [ + "-Wl,--defsym", + "-Wl,SILABS_WIFI=1", + ] + } + + output_dir = root_out_dir +} + +group("silabs") { + deps = [ ":lit_icd_app" ] +} + +group("default") { + deps = [ ":silabs" ] +} diff --git a/examples/lit-icd-app/silabs/README.md b/examples/lit-icd-app/silabs/README.md new file mode 100644 index 00000000000000..4a5b6b35851581 --- /dev/null +++ b/examples/lit-icd-app/silabs/README.md @@ -0,0 +1,366 @@ +# Matter EFR32 Lit ICD Example + +An example showing the use of CHIP on the Silicon Labs EFR32 MG12 and MG24. + +
+ +- [Matter EFR32 LIT ICD Example](#matter-efr32-lit-icd-example) + - [Introduction](#introduction) + - [Building](#building) + - [Linux](#linux) + - [Mac OS X](#mac-os-x) + - [Flashing the Application](#flashing-the-application) + - [Viewing Logging Output](#viewing-logging-output) + - [Running the Complete Example](#running-the-complete-example) + - [Notes](#notes) + - [On Border Router:](#on-border-router) + - [On PC(Linux):](#on-pclinux) + - [Running RPC console](#running-rpc-console) + - [Memory settings](#memory-settings) + - [OTA Software Update](#ota-software-update) + - [Building options](#building-options) + - [Disabling logging](#disabling-logging) + - [Debug build / release build](#debug-build--release-build) + - [Disabling LCD](#disabling-lcd) + - [KVS maximum entry count](#kvs-maximum-entry-count) + +
+ +> **NOTE:** Silicon Laboratories now maintains a public matter GitHub repo with +> frequent releases thoroughly tested and validated. Developers looking to +> develop matter products with silabs hardware are encouraged to use our latest +> release with added tools and documentation. +> [Silabs Matter Github](https://github.com/SiliconLabs/matter/releases) + +## Introduction + +The EFR32 lit icd example provides a baseline demonstration of a on-off lit icd +device, built using Matter and the Silicon Labs gecko SDK. It can be controlled +by a Chip controller over an Openthread or Wifi network. + +The EFR32 device can be commissioned over Bluetooth Low Energy where the device +and the Chip controller will exchange security information with the Rendez-vous +procedure. If using Thread, Thread Network credentials are then provided to the +EFR32 device which will then join the network. + +If the LCD is enabled, the LCD on the Silabs WSTK shows a QR Code containing the +needed commissioning information for the BLE connection and starting the +Rendez-vous procedure. + +The lit icd example is intended to serve both as a means to explore the workings +of Matter as well as a template for creating real products based on the Silicon +Labs platform. + +## Building + +- Download the + [Simplicity Commander](https://www.silabs.com/mcu/programming-options) + command line tool, and ensure that `commander` is your shell search path. + (For Mac OS X, `commander` is located inside + `Commander.app/Contents/MacOS/`.) + +- Download and install a suitable ARM gcc tool chain: + [GNU Arm Embedded Toolchain 9-2019-q4-major](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) + +- Install some additional tools(likely already present for CHIP developers): + +#### Linux + + $ sudo apt-get install git ninja-build + +#### Mac OS X + + $ brew install ninja + +- Supported hardware: + + - > For the latest supported hardware please refer to the + > [Hardware Requirements](https://github.com/SiliconLabs/matter/blob/latest/docs/silabs/general/HARDWARE_REQUIREMENTS.md) + > in the Silicon Labs Matter Github Repo + + MG12 boards: + + - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4162A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4163A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm, + 868MHz@19dBm + - BRD4164A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm + - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm + - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, + 915MHz@19dBm + - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm + + MG21 boards: Currently not supported due to RAM limitation. + + - BRD4180A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + + MG24 boards : + + - BRD2601B / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD2703A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4186C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@10dBm + - BRD4187A / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + - BRD4187C / SLWSTK6006A / Wireless Starter Kit / 2.4GHz@20dBm + +* Build the example application: + + cd ~/connectedhomeip + ./scripts/examples/gn_silabs_example.sh ./examples/lit-icd-app/silabs/ ./out/lit-icd-app BRD4187C + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip + $ rm -rf ./out/ + + OR use GN/Ninja directly + + $ cd ~/connectedhomeip/examples/lit-icd-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug + $ ninja -C out/debug + +- To delete generated executable, libraries and object files use: + + $ cd ~/connectedhomeip/examples/lit-icd-app/silabs + $ rm -rf out/ + +* Build the example with Matter shell + + ./scripts/examples/gn_silabs_example.sh examples/lit-icd-app/silabs/ out/lit-icd-app BRD4187C chip_build_libshell=true + +* Build the example with pigweed RCP + + $ ./scripts/examples/gn_silabs_example.sh examples/lit-icd-app/silabs/ out/lit-icd-app_rpc BRD4187C 'import("//with_pw_rpc.gni")' + + or use GN/Ninja Directly + + $ cd ~/connectedhomeip/examples/lit-icd-app/silabs + $ git submodule update --init + $ source third_party/connectedhomeip/scripts/activate.sh + $ export SILABS_BOARD=BRD4187C + $ gn gen out/debug --args='import("//with_pw_rpc.gni")' + $ ninja -C out/debug + +For more build options, help is provided when running the build script without +arguments + + ./scripts/examples/gn_silabs_example.sh + +## Flashing the Application + +- On the command line: + + $ cd ~/connectedhomeip/examples/lit-icd-app/silabs + $ python3 out/debug/matter-silabs-lit-icd-example.flash.py + +- Or with the Ozone debugger, just load the .out file. + +All EFR32 boards require a bootloader, see Silicon Labs documentation for more +info. Pre-built bootloader binaries are available in the Assets section of the +Releases page on +[Silabs Matter Github](https://github.com/SiliconLabs/matter/releases). + +- On the command line: + + $ commander flash bootloader_binaries/bootloader-storage-internal-single-512k-BRD4187C-gsdk4.1.s37 + +## Viewing Logging Output + +The example application is built to use the SEGGER Real Time Transfer (RTT) +facility for log output. RTT is a feature built-in to the J-Link Interface MCU +on the WSTK development board. It allows bi-directional communication with an +embedded application without the need for a dedicated UART. + +Using the RTT facility requires downloading and installing the _SEGGER J-Link +Software and Documentation Pack_ +([web site](https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack)). + +Alternatively, SEGGER Ozone J-Link debugger can be used to view RTT logs too +after flashing the .out file. + +- Download the J-Link installer by navigating to the appropriate URL and + agreeing to the license agreement. + +- [JLink_Linux_x86_64.deb](https://www.segger.com/downloads/jlink/JLink_Linux_x86_64.deb) +- [JLink_MacOSX.pkg](https://www.segger.com/downloads/jlink/JLink_MacOSX.pkg) + +* Install the J-Link software + + $ cd ~/Downloads + $ sudo dpkg -i JLink_Linux_V*_x86_64.deb + +* In Linux, grant the logged in user the ability to talk to the development + hardware via the linux tty device (/dev/ttyACMx) by adding them to the + dialout group. + + $ sudo usermod -a -G dialout ${USER} + +Once the above is complete, log output can be viewed using the JLinkExe tool in +combination with JLinkRTTClient as follows: + +- Run the JLinkExe tool with arguments to autoconnect to the WSTK board: + + For MG12 use: + + $ JLinkExe -device EFR32MG12PXXXF1024 -if JTAG -speed 4000 -autoconnect 1 + + For MG21 use: + + $ JLinkExe -device EFR32MG21AXXXF1024 -if SWD -speed 4000 -autoconnect 1 + + For MG24 use: + + $ JLinkExe -device EFR32MG24AXXXF1536 -if SWD -speed 4000 -autoconnect 1 + +- In a second terminal, run the JLinkRTTClient to view logs: + + $ JLinkRTTClient + +## Running the Complete Example + +- It is assumed here that you already have an OpenThread border router + configured and running. If not see the following guide + [Openthread_border_router](https://github.com/project-chip/connectedhomeip/blob/master/docs/guides/openthread_border_router_pi.md) + for more information on how to setup a border router on a raspberryPi. + + Take note that the RCP code is available directly through + [Simplicity Studio 5](https://www.silabs.com/products/development-tools/software/simplicity-studio/simplicity-studio-5) + under File->New->Project Wizard->Examples->Thread : ot-rcp + +- User interface : **LCD** The LCD on Silabs WSTK shows a QR Code. This QR + Code is be scanned by the CHIP Tool app For the Rendez-vous procedure over + BLE + + * On devices that do not have or support the LCD Display like the BRD4166A Thunderboard Sense 2, + a URL can be found in the RTT logs. + + [SVR] Copy/paste the below URL in a browser to see the QR Code: + [SVR] https://project-chip.github.io/connectedhomeip/qrcode.html?data=CH%3AI34NM%20-00%200C9SS0 + + **LED 0** shows the overall state of the device and its connectivity. The + following states are possible: + + - Short Flash On (50 ms on/950 ms off): The device is in the + unprovisioned (unpaired) state and is waiting for a commissioning + application to connect. + + - Rapid Even Flashing (100 ms on/100 ms off): The device is in the + unprovisioned state and a commissioning application is connected through + Bluetooth LE. + + - Short Flash Off (950ms on/50ms off): The device is fully + provisioned, but does not yet have full Thread network or service + connectivity. + + - Solid On: The device is fully provisioned and has full Thread + network and service connectivity. + + **Push Button 0** + + - _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode + for 30 seconds. The device will then switch to a slower interval advertisement. + After 15 minutes, the advertisement stops. + + - _Pressed and hold for 6 s_ : Initiates the factory reset of the device. + Releasing the button within the 6-second window cancels the factory reset + procedure. **LEDs** blink in unison when the factory reset procedure is + initiated. + + **Push Button 1** + + - Triggers a User action event to transition the ICD to Active mode. + +### Notes + +- Depending on your network settings your router might not provide native ipv6 + addresses to your devices (Border router / PC). If this is the case, you + need to add a static ipv6 addresses on both device and then an ipv6 route to + the border router on your PC + +#### On Border Router: + +`$ sudo ip addr add dev 2002::2/64` + +#### On PC(Linux): + +`$ sudo ip addr add dev 2002::1/64` + +#Add Ipv6 route on PC(Linux) \$ sudo ip route add /64 +via 2002::2 + +## Running RPC console + +- As part of building the example with RPCs enabled the chip_rpc python + interactive console is installed into your venv. The python wheel files are + also created in the output folder: out/debug/chip_rpc_console_wheels. To + install the wheel files without rebuilding: + + `pip3 install out/debug/chip_rpc_console_wheels/*.whl` + +- To use the chip-rpc console after it has been installed run: + + `chip-console --device /dev/tty. -b 115200 -o //pw_log.out` + +- Then you can simulate a button press or release using the following command + where : idx = 0 or 1 for Button PB0 or PB1 action = 0 for PRESSED, 1 for + RELEASE Test toggling the LED with + + `rpcs.chip.rpc.Button.Event(idx=1, pushed=True)` + +## Memory settings + +While most of the RAM usage in CHIP is static, allowing easier debugging and +optimization with symbols analysis, we still need some HEAP for the crypto and +OpenThread. Size of the HEAP can be modified by changing the value of the +`configTOTAL_HEAP_SIZE` define inside of the FreeRTOSConfig.h file of this +example. Please take note that a HEAP size smaller than 13k can and will cause a +Mbedtls failure during the BLE rendez-vous or CASE session + +To track memory usage you can set `enable_heap_monitoring = true` either in the +BUILD.gn file or pass it as a build argument to gn. This will print on the RTT +console the RAM usage of each individual task and the number of Memory +allocation and Free. While this is not extensive monitoring you're welcome to +modify `examples/platform/silabs/MemMonitoring.cpp` to add your own memory +tracking code inside the `trackAlloc` and `trackFree` function + +## OTA Software Update + +For the description of Software Update process with EFR32 example applications +see +[EFR32 OTA Software Update](../../../docs/guides/silabs_efr32_software_update.md) + +## Building options + +All of Silabs's examples within the Matter repo have all the features enabled by +default, as to provide the best end user experience. However some of those +features can easily be toggled on or off. Here is a short list of options : + +### Disabling logging + +chip_progress_logging, chip_detail_logging, chip_automation_logging + + $ ./scripts/examples/gn_silabs_example.sh ./examples/lit-icd-app/silabs ./out/lit-icd-app BRD4164A "chip_detail_logging=false chip_automation_logging=false chip_progress_logging=false" + +### Debug build / release build + +is_debug + + $ ./scripts/examples/gn_silabs_example.sh ./examples/lit-icd-app/silabs ./out/lit-icd-app BRD4164A "is_debug=false" + +### Disabling LCD + +show_qr_code + + $ ./scripts/examples/gn_silabs_example.sh ./examples/lit-icd-app/silabs ./out/lit-icd-app BRD4164A "show_qr_code=false" + +### KVS maximum entry count + +kvs_max_entries + + Set the maximum Kvs entries that can be stored in NVM (Default 75) + Thresholds: 30 <= kvs_max_entries <= 255 + + $ ./scripts/examples/gn_silabs_example.sh ./examples/lit-icd-app/silabs ./out/lit-icd-app BRD4164A kvs_max_entries=50 diff --git a/examples/lit-icd-app/silabs/build_for_wifi_args.gni b/examples/lit-icd-app/silabs/build_for_wifi_args.gni new file mode 100644 index 00000000000000..630cb65b53f45d --- /dev/null +++ b/examples/lit-icd-app/silabs/build_for_wifi_args.gni @@ -0,0 +1,35 @@ +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") +chip_enable_openthread = false +import("${chip_root}/src/platform/silabs/wifi_args.gni") + +chip_enable_ota_requestor = true +app_data_model = "${chip_root}/examples/lit-icd-app/lit-icd-common" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true +icd_enforce_sit_slow_poll_limit = true + +# ICD Matter Configuration flags +sl_idle_mode_interval_s = 3600 # 60min Idle Mode Interval +sl_active_mode_interval_ms = 0 # 0 Active Mode Interval +sl_active_mode_threshold_ms = 30000 # 30s Active Mode Threshold diff --git a/examples/lit-icd-app/silabs/build_for_wifi_gnfile.gn b/examples/lit-icd-app/silabs/build_for_wifi_gnfile.gn new file mode 100644 index 00000000000000..e00da045338f58 --- /dev/null +++ b/examples/lit-icd-app/silabs/build_for_wifi_gnfile.gn @@ -0,0 +1,29 @@ +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_enable_wifi = true + import("//build_for_wifi_args.gni") +} diff --git a/examples/lit-icd-app/silabs/build_overrides b/examples/lit-icd-app/silabs/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/lit-icd-app/silabs/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/lit-icd-app/silabs/include/AppConfig.h b/examples/lit-icd-app/silabs/include/AppConfig.h new file mode 100644 index 00000000000000..2ab78077e22261 --- /dev/null +++ b/examples/lit-icd-app/silabs/include/AppConfig.h @@ -0,0 +1,84 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "silabs_utils.h" + +// ---- Long Ilde Time ICD Example App Config ---- + +#define APP_TASK_NAME "Lit" + +#define BLE_DEV_NAME "SiLabs-LIT-ICD" + +// APP Logo, boolean only. must be 64x64 +#define ON_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0x7F, 0xFC, 0xFF, 0xFF, 0xFF, \ + 0x1F, 0x00, 0xE0, 0x3F, 0xF0, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0x7F, \ + 0xC0, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0x01, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x1F, 0xF0, 0xFF, 0x03, 0xFE, 0xFF, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, \ + 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0x1F, 0xF8, 0x07, 0x00, 0xFF, 0x03, 0xFE, 0xFF, 0x3F, 0xE0, 0x07, 0x00, \ + 0xFF, 0x01, 0xFF, 0xFF, 0x7F, 0xC0, 0x0F, 0x00, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0x80, 0x1F, 0x00, 0x7F, 0xC0, 0xFF, 0xFF, \ + 0xFF, 0x01, 0x3F, 0x00, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0x03, 0x7F, 0x00, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x80, \ + 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x0F, 0xF8, 0xC1, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x1F, 0xF0, 0xC3, 0x1F, 0x00, 0xE0, 0xFF, \ + 0xFF, 0x3F, 0xE0, 0xE7, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0x7F, 0xC0, 0xFF, 0x1F, 0x00, 0xE0, 0x07, 0x00, 0xF8, 0x80, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x03, 0xFE, 0xFF, 0xFF, 0xFF, 0x07, \ + 0x00, 0xF8, 0x03, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x01, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x00, 0xF0, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xFE, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0x01, 0xFF, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x7F, 0xC0, 0xFF, 0x00, 0x00, \ + 0xFE, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0x1F, \ + 0xF0, 0xFF, 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0x7F, \ + 0xC0, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, 0x80, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, 0x01, 0xFF, 0xFF, 0x07, \ + 0x00, 0xF8, 0xFF, 0xFF, 0x03, 0xFE, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, \ + 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xF9, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF + +#define OFF_DEMO_BITMAP \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0x1F, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x03, 0xFE, 0xFF, 0xFF, 0xFF, 0x00, 0x00, \ + 0xFF, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x7F, 0xC0, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0x00, 0x00, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, \ + 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x7F, 0xC0, 0x1F, 0x00, 0xE0, 0xFF, \ + 0xFF, 0xFF, 0x3F, 0xE0, 0x1F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x1F, 0xF0, 0x1F, 0x00, 0xE0, 0x07, 0x00, 0xF8, 0x0F, 0xF8, \ + 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x07, 0xFC, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x03, 0xFE, 0xFF, 0xFF, 0xFF, 0x07, \ + 0x00, 0xF8, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0xFE, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0x01, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x7F, 0xC0, 0xFF, 0x00, 0x00, \ + 0xFF, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, \ + 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, \ + 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF8, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, \ + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF diff --git a/examples/lit-icd-app/silabs/include/AppEvent.h b/examples/lit-icd-app/silabs/include/AppEvent.h new file mode 100644 index 00000000000000..4831f93aa19402 --- /dev/null +++ b/examples/lit-icd-app/silabs/include/AppEvent.h @@ -0,0 +1,52 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + struct + { + uint8_t Action; + int32_t Actor; + } LightEvent; + }; + + EventHandler Handler; +}; diff --git a/examples/lit-icd-app/silabs/include/AppTask.h b/examples/lit-icd-app/silabs/include/AppTask.h new file mode 100644 index 00000000000000..e653f3680defc2 --- /dev/null +++ b/examples/lit-icd-app/silabs/include/AppTask.h @@ -0,0 +1,106 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +/********************************************************** + * Includes + *********************************************************/ + +#include +#include + +#include "AppEvent.h" +#include "BaseApplication.h" +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support +#include +#include +#include + +/********************************************************** + * Defines + *********************************************************/ + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_EVENT_QUEUE_FAILED CHIP_APPLICATION_ERROR(0x01) +#define APP_ERROR_CREATE_TASK_FAILED CHIP_APPLICATION_ERROR(0x02) +#define APP_ERROR_UNHANDLED_EVENT CHIP_APPLICATION_ERROR(0x03) +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x04) +#define APP_ERROR_START_TIMER_FAILED CHIP_APPLICATION_ERROR(0x05) +#define APP_ERROR_STOP_TIMER_FAILED CHIP_APPLICATION_ERROR(0x06) + +/********************************************************** + * AppTask Declaration + *********************************************************/ + +class AppTask : public BaseApplication +{ + +public: + AppTask() = default; + + static AppTask & GetAppTask() { return sAppTask; } + + /** + * @brief AppTask task main loop function + * + * @param pvParameter FreeRTOS task parameter + */ + static void AppTaskMain(void * pvParameter); + + CHIP_ERROR StartAppTask(); + + /** + * @brief Event handler when a button is pressed + * Function posts an event for button processing + * + * @param buttonHandle APP_USER_ACTION or APP_FUNCTION_BUTTON + * @param btnAction button action - SL_SIMPLE_BUTTON_PRESSED, + * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED + */ + static void ButtonEventHandler(uint8_t button, uint8_t btnAction); + +private: + static AppTask sAppTask; + + /** + * @brief AppTask initialisation function + * + * @return CHIP_ERROR + */ + CHIP_ERROR Init(); + + /** + * @brief PB0 Button event processing function + * Press and hold will trigger a factory reset timer start + * Press and release will restart BLEAdvertising if not commisionned + * + * @param aEvent button event being processed + */ + static void ButtonHandler(AppEvent * aEvent); + + /** + * @brief PB1 Button event processing function + * Function triggers a application action sent to the CHIP task + * + * @param aEvent button event being processed + */ + static void ApplicationEventHandler(AppEvent * aEvent); +}; diff --git a/examples/lit-icd-app/silabs/include/CHIPProjectConfig.h b/examples/lit-icd-app/silabs/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..0a57cdfdcebb83 --- /dev/null +++ b/examples/lit-icd-app/silabs/include/CHIPProjectConfig.h @@ -0,0 +1,88 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// Use a default pairing code if one hasn't been provisioned in flash. +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#endif + +#ifndef CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 +#endif + +// For convenience, Chip Security Test Mode can be enabled and the +// requirement for authentication in various protocols can be disabled. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID + * + * 0xFFF1: Test vendor + */ +#define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0xFFF1 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID + * + * 0x8005: example lighting app + */ +#define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x8004 + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER + * + * Enables the use of a hard-coded default serial number if none + * is found in Chip NV storage. + */ +#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS + * + * Enable recording UTC timestamps. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1 + +/** + * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE + * + * A size, in bytes, of the individual debug event logging buffer. + */ +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) diff --git a/examples/lit-icd-app/silabs/include/ShellCommands.h b/examples/lit-icd-app/silabs/include/ShellCommands.h new file mode 100644 index 00000000000000..8817c41bfbf3a6 --- /dev/null +++ b/examples/lit-icd-app/silabs/include/ShellCommands.h @@ -0,0 +1,29 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#ifdef ENABLE_CHIP_SHELL + +namespace LitICDCommands { + +void RegisterLitICDCommands(); + +} // namespace LitICDCommands + +#endif // ENABLE_CHIP_SHELL diff --git a/examples/lit-icd-app/silabs/openthread.gn b/examples/lit-icd-app/silabs/openthread.gn new file mode 100644 index 00000000000000..2e47a621117885 --- /dev/null +++ b/examples/lit-icd-app/silabs/openthread.gn @@ -0,0 +1,30 @@ +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + chip_openthread_ftd = false + + import("//openthread.gni") +} diff --git a/examples/lit-icd-app/silabs/openthread.gni b/examples/lit-icd-app/silabs/openthread.gni new file mode 100644 index 00000000000000..8bebcdea95e283 --- /dev/null +++ b/examples/lit-icd-app/silabs/openthread.gni @@ -0,0 +1,42 @@ +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at + +# http://www.apache.org/licenses/LICENSE-2.0 + +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/src/platform/silabs/efr32/args.gni") + +silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +app_data_model = "${chip_root}/examples/lit-icd-app/lit-icd-common" +chip_enable_ota_requestor = true +chip_enable_openthread = true + +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" + +# ICD Default configurations +chip_enable_icd_server = true +chip_subscription_timeout_resumption = false +sl_use_subscription_synching = true +icd_enforce_sit_slow_poll_limit = true + +# Openthread Configuration flags +sl_ot_idle_interval_ms = 3600000 # 60mins Idle Polling Interval +sl_ot_active_interval_ms = 1000 # 1000ms Active Polling Interval + +# ICD Matter Configuration flags +sl_idle_mode_interval_s = 3600 # 60min Idle Mode Interval +sl_active_mode_interval_ms = 0 # 0 Active Mode Interval +sl_active_mode_threshold_ms = 30000 # 30s Active Mode Threshold diff --git a/examples/lit-icd-app/silabs/src/AppTask.cpp b/examples/lit-icd-app/silabs/src/AppTask.cpp new file mode 100644 index 00000000000000..f960375dab2b16 --- /dev/null +++ b/examples/lit-icd-app/silabs/src/AppTask.cpp @@ -0,0 +1,144 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +/********************************************************** + * Includes + *********************************************************/ + +#include "AppTask.h" +#include "AppConfig.h" +#include "AppEvent.h" + +#include "LEDWidget.h" + +#ifdef DISPLAY_ENABLED +#include "lcd.h" +#ifdef QR_CODE_ENABLED +#include "qrcodegen.h" +#endif // QR_CODE_ENABLED +#endif // DISPLAY_ENABLED + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/********************************************************** + * Defines and Constants + *********************************************************/ + +#define SYSTEM_STATE_LED &sl_led_led0 + +#define APP_FUNCTION_BUTTON 0 +#define APP_USER_ACTION 1 + +using namespace chip; +using namespace chip::app; +using namespace ::chip::DeviceLayer; +using namespace ::chip::DeviceLayer::Silabs; + +using namespace chip::TLV; +using namespace ::chip::DeviceLayer; + +/********************************************************** + * AppTask Definitions + *********************************************************/ + +AppTask AppTask::sAppTask; + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + chip::DeviceLayer::Silabs::GetPlatform().SetButtonsCb(AppTask::ButtonEventHandler); + +#ifdef DISPLAY_ENABLED + GetLCD().Init((uint8_t *) "LIT ICD"); +#endif + + err = BaseApplication::Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("BaseApplication::Init() failed"); + appError(err); + } + + return err; +} + +CHIP_ERROR AppTask::StartAppTask() +{ + return BaseApplication::StartAppTask(AppTaskMain); +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + QueueHandle_t sAppEventQueue = *(static_cast(pvParameter)); + + CHIP_ERROR err = sAppTask.Init(); + if (err != CHIP_NO_ERROR) + { + SILABS_LOG("AppTask.Init() failed"); + appError(err); + } + +#if !(defined(CHIP_CONFIG_ENABLE_ICD_SERVER) && CHIP_CONFIG_ENABLE_ICD_SERVER) + sAppTask.StartStatusLEDTimer(); +#endif + + SILABS_LOG("App Task started"); + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + } +} + +void AppTask::ApplicationEventHandler(AppEvent * aEvent) +{ + VerifyOrReturn(aEvent->Type == AppEvent::kEventType_Button); + // TODO - trigger some application event +} + +void AppTask::ButtonEventHandler(uint8_t button, uint8_t btnAction) +{ + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.Action = btnAction; + + if (button == APP_USER_ACTION) + { + button_event.Handler = ApplicationEventHandler; + sAppTask.PostEvent(&button_event); + } + else if (button == APP_FUNCTION_BUTTON) + { + button_event.Handler = BaseApplication::ButtonHandler; + sAppTask.PostEvent(&button_event); + } +} diff --git a/examples/lit-icd-app/silabs/src/ShellCommands.cpp b/examples/lit-icd-app/silabs/src/ShellCommands.cpp new file mode 100644 index 00000000000000..0d898dc26b319f --- /dev/null +++ b/examples/lit-icd-app/silabs/src/ShellCommands.cpp @@ -0,0 +1,51 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ +#if defined(ENABLE_CHIP_SHELL) + +#include "ShellCommands.h" +#include "BindingHandler.h" + +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; + +namespace LitICDCommands { + +using Shell::Engine; +using Shell::shell_command_t; +using Shell::streamer_get; +using Shell::streamer_printf; + +/** + * @brief configures lit icd matter shell + */ +void RegisterSwitchCommands() +{ + // Blank structure for now + static const shell_command_t sLitICDCommand = {}; + + Engine::Root().RegisterCommands(&sLitICDCommand, 1); +} + +} // namespace LitICDCommands + +#endif // ENABLE_CHIP_SHELL diff --git a/examples/lit-icd-app/silabs/src/ZclCallbacks.cpp b/examples/lit-icd-app/silabs/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..3df8fbd83e2f61 --- /dev/null +++ b/examples/lit-icd-app/silabs/src/ZclCallbacks.cpp @@ -0,0 +1,46 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * 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. + */ + +/** + * @file + * This file implements the handler for data model messages. + */ + +#include "AppConfig.h" + +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + ChipLogProgress(Zcl, "Cluster callback: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); + + if (clusterId == Identify::Id) + { + ChipLogProgress(Zcl, "Identify attribute ID: " ChipLogFormatMEI " Type: %u Value: %u, length %u", + ChipLogValueMEI(attributeId), type, *value, size); + } +} diff --git a/examples/lit-icd-app/silabs/third_party/connectedhomeip b/examples/lit-icd-app/silabs/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/lit-icd-app/silabs/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 2625ffd451b270..10263f5c0caabe 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1010,7 +1010,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index 7fdfe292c4b946..840efb325a6090 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-app.matter @@ -507,7 +507,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index dde505851acef8..ad2dc792d753b0 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.matter @@ -785,7 +785,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 39ff5ab68cc720..1a20c7523f90e9 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -507,7 +507,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index d27c5536318a73..e4ec469a4e94d1 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -669,7 +669,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index d12b7476aea0cc..bd8d7db682d25a 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -871,7 +871,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 9aad9b3db0277e..dd7a80c0e82c2c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1856,7 +1856,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -4708,13 +4708,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4723,13 +4751,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4741,15 +4785,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4762,24 +4814,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4793,18 +4885,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4814,14 +4906,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4830,27 +4922,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4867,13 +4959,41 @@ cluster Thermostat = 513 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4882,13 +5002,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4900,15 +5036,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4921,24 +5065,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4952,18 +5136,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4973,14 +5157,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4989,27 +5173,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 4c256254cb0aac..11f85e323bcf83 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -8244,7 +8244,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index eef0d4bc5acaa6..08fdcf436ee5c4 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1813,7 +1813,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -4665,13 +4665,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4680,13 +4708,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4698,15 +4742,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4719,24 +4771,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4750,18 +4842,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4771,14 +4863,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4787,27 +4879,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4824,13 +4916,41 @@ cluster Thermostat = 513 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4839,13 +4959,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4857,15 +4993,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4878,24 +5022,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4909,18 +5093,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4930,14 +5114,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4946,27 +5130,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index ec6b823927ebc6..85b3958dde6f7e 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -8318,7 +8318,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index 48f4d1a6760ea1..4a9c3e81af6cb0 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -879,7 +879,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index 5a5517baaf22d2..a9a2c74ef80ddc 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-app.matter @@ -879,7 +879,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index 5a5517baaf22d2..a9a2c74ef80ddc 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-app.matter @@ -879,7 +879,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 1636bc769a1a39..45af3d224111a3 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -754,7 +754,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index a3979f56223366..4d43b58978f0d2 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -544,7 +544,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 120945d791429d..55377548f672fd 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -554,7 +554,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index c1fcadaf99bae6..e92c57ffe44531 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -1105,7 +1105,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 7cfe342186a458..7fa16486e7743f 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -745,7 +745,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/thermostat/asr/src/TemperatureManager.cpp b/examples/thermostat/asr/src/TemperatureManager.cpp index 219f428e85e781..b560e5c22970f7 100644 --- a/examples/thermostat/asr/src/TemperatureManager.cpp +++ b/examples/thermostat/asr/src/TemperatureManager.cpp @@ -24,6 +24,7 @@ using namespace chip; using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; @@ -33,7 +34,7 @@ CHIP_ERROR TemperatureManager::Init() { app::DataModel::Nullable temp; int16_t heatingSetpoint, coolingSetpoint; - uint8_t systemMode; + SystemModeEnum systemMode; PlatformMgr().LockChipStack(); ThermAttr::LocalTemperature::Get(kThermostatEndpoint, temp); @@ -45,7 +46,39 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - mThermMode = systemMode; + switch (systemMode) + { + case SystemModeEnum::kOff: + mThermMode = 0; + break; + case SystemModeEnum::kAuto: + mThermMode = 1; + break; + case SystemModeEnum::kCool: + mThermMode = 3; + break; + case SystemModeEnum::kHeat: + mThermMode = 4; + break; + case SystemModeEnum::kEmergencyHeat: + mThermMode = 5; + break; + case SystemModeEnum::kPrecooling: + mThermMode = 6; + break; + case SystemModeEnum::kFanOnly: + mThermMode = 7; + break; + case SystemModeEnum::kDry: + mThermMode = 8; + break; + case SystemModeEnum::kSleep: + mThermMode = 9; + break; + default: + mThermMode = 2; + break; // unknown value; + } GetAppTask().UpdateThermoStatUI(); diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 7b9caf9d4c0961..fc8fad99aaecf5 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1348,7 +1348,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1922,13 +1922,41 @@ cluster UserLabel = 65 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1937,13 +1965,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1955,15 +1999,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1976,24 +2028,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -2007,18 +2099,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -2028,14 +2120,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2044,27 +2136,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 4ab13650744b73..d5927370f28635 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -4791,7 +4791,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 31a5bd3f0032b6..4791f4bdef41a3 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1348,7 +1348,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1833,13 +1833,41 @@ cluster UserLabel = 65 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1848,13 +1876,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1866,15 +1910,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1887,24 +1939,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1918,18 +2010,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1939,14 +2031,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1955,27 +2047,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 8c2c487c092685..a4b725903ac7a1 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -3933,7 +3933,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thermostat/silabs/src/TemperatureManager.cpp b/examples/thermostat/silabs/src/TemperatureManager.cpp index 7bff7a7907cb96..f858e438a7449f 100644 --- a/examples/thermostat/silabs/src/TemperatureManager.cpp +++ b/examples/thermostat/silabs/src/TemperatureManager.cpp @@ -36,6 +36,7 @@ using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; /********************************************************** * Variable declarations @@ -47,7 +48,7 @@ CHIP_ERROR TemperatureManager::Init() { app::DataModel::Nullable temp; int16_t heatingSetpoint, coolingSetpoint; - uint8_t systemMode; + SystemModeEnum systemMode; PlatformMgr().LockChipStack(); ThermAttr::LocalTemperature::Get(kThermostatEndpoint, temp); @@ -59,7 +60,40 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp((temp.IsNull()) ? static_cast(0.0) : temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - mThermMode = systemMode; + + switch (systemMode) + { + case SystemModeEnum::kOff: + mThermMode = 0; + break; + case SystemModeEnum::kAuto: + mThermMode = 1; + break; + case SystemModeEnum::kCool: + mThermMode = 3; + break; + case SystemModeEnum::kHeat: + mThermMode = 4; + break; + case SystemModeEnum::kEmergencyHeat: + mThermMode = 5; + break; + case SystemModeEnum::kPrecooling: + mThermMode = 6; + break; + case SystemModeEnum::kFanOnly: + mThermMode = 7; + break; + case SystemModeEnum::kDry: + mThermMode = 8; + break; + case SystemModeEnum::kSleep: + mThermMode = 9; + break; + default: + mThermMode = 2; + break; // unknown value; + } AppTask::GetAppTask().UpdateThermoStatUI(); diff --git a/examples/thermostat/telink/src/TemperatureManager.cpp b/examples/thermostat/telink/src/TemperatureManager.cpp index ca8b0eb4d98cb4..ee52427d95c5bc 100644 --- a/examples/thermostat/telink/src/TemperatureManager.cpp +++ b/examples/thermostat/telink/src/TemperatureManager.cpp @@ -28,6 +28,7 @@ using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; TemperatureManager TemperatureManager::sTempMgr; @@ -36,7 +37,7 @@ CHIP_ERROR TemperatureManager::Init() { app::DataModel::Nullable temp; int16_t heatingSetpoint, coolingSetpoint; - uint8_t systemMode; + SystemModeEnum systemMode; PlatformMgr().LockChipStack(); ThermAttr::LocalTemperature::Get(kThermostatEndpoint, temp); @@ -48,7 +49,40 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - mThermMode = systemMode; + + switch (systemMode) + { + case SystemModeEnum::kOff: + mThermMode = 0; + break; + case SystemModeEnum::kAuto: + mThermMode = 1; + break; + case SystemModeEnum::kCool: + mThermMode = 3; + break; + case SystemModeEnum::kHeat: + mThermMode = 4; + break; + case SystemModeEnum::kEmergencyHeat: + mThermMode = 5; + break; + case SystemModeEnum::kPrecooling: + mThermMode = 6; + break; + case SystemModeEnum::kFanOnly: + mThermMode = 7; + break; + case SystemModeEnum::kDry: + mThermMode = 8; + break; + case SystemModeEnum::kSleep: + mThermMode = 9; + break; + default: + mThermMode = 2; + break; // unknown value; + } GetAppTask().UpdateThermoStatUI(); diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 4256e6e3bcde0d..92a13b7f8e0f35 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -943,7 +943,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -1673,13 +1673,41 @@ cluster UserLabel = 65 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1688,13 +1716,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1706,15 +1750,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1727,24 +1779,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1758,18 +1850,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1779,14 +1871,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1795,27 +1887,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 3ec9b3bd280bf7..51d93649dce726 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -4842,7 +4842,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 9173d165936878..6a2e39c61d94aa 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1155,7 +1155,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 9225e5bc56bf32..6e305470fa07af 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -326,7 +326,7 @@ cluster LevelControl = 8 { } /** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -cluster BinaryInputBasic = 15 { +deprecated cluster BinaryInputBasic = 15 { revision 1; // NOTE: Default/not specifically set attribute optional char_string<16> activeText = 4; @@ -943,7 +943,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 560b1fd65610a4..d658c052a20f2d 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -1339,7 +1339,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 01ef06dd0bcc98..c5258a2c9c781b 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1084,7 +1084,7 @@ cluster NetworkCommissioning = 49 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 7dbc442eb1e503..c62d16a6db7703 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -10005,7 +10005,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index a8ba20d854ac53..837dc58d560ca0 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -68,13 +68,6 @@ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinSetpointDeadBand, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: ControlSequenceOfOperation, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: SystemMode, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: KeypadLockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: ScheduleProgrammingVisibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: WhitePointX, Privilege: view */ \ @@ -133,13 +126,6 @@ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinSetpointDeadBand, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: ControlSequenceOfOperation, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: SystemMode, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: KeypadLockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: ScheduleProgrammingVisibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: WhitePointX, Privilege: view */ \ @@ -198,13 +184,6 @@ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinSetpointDeadBand, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: ControlSequenceOfOperation, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: SystemMode, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: KeypadLockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: ScheduleProgrammingVisibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: WhitePointX, Privilege: view */ \ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index b17b1f10b542f0..c761ccbbcedbca 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -310,7 +310,7 @@ { (uint16_t) 0xC80, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxCoolSetpointLimit */ \ { (uint16_t) 0x19, (uint16_t) 0x0, (uint16_t) 0x19 }, /* MinSetpointDeadBand */ \ { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* ControlSequenceOfOperation */ \ - { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* SystemMode */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x9 }, /* SystemMode */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ @@ -1005,11 +1005,11 @@ { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(INT16S), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LocalTemperature */ \ - { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000003, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMinHeatSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000004, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMaxHeatSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000005, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMinCoolSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000006, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMaxCoolSetpointLimit */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(TEMPERATURE), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LocalTemperature */ \ + { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000003, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMinHeatSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000004, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMaxHeatSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000005, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMinCoolSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000006, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMaxCoolSetpointLimit */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(12), 0x00000011, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000012, 2, ZAP_TYPE(INT16S), \ diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 6c3504c6bea270..85ed4f14d5b6e3 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -97,14 +97,14 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A case RemoteSensing::Id: if (localTemperatureNotExposedSupported) { - uint8_t valueRemoteSensing; + BitMask valueRemoteSensing; EmberAfStatus status = RemoteSensing::Get(aPath.mEndpointId, &valueRemoteSensing); if (status != EMBER_ZCL_STATUS_SUCCESS) { StatusIB statusIB(ToInteractionModelStatus(status)); return statusIB.ToChipError(); } - valueRemoteSensing &= 0xFE; // clear bit 1 (LocalTemperature RemoteSensing bit) + valueRemoteSensing.Clear(RemoteSensingBitmap::kLocalTemperature); return aEncoder.Encode(valueRemoteSensing); } break; @@ -395,37 +395,37 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr case ControlSequenceOfOperation::Id: { uint8_t requestedCSO; requestedCSO = *value; - if (requestedCSO > to_underlying(ThermostatControlSequence::kCoolingAndHeatingWithReheat)) + if (requestedCSO > to_underlying(ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat)) return imcode::InvalidValue; return imcode::Success; } case SystemMode::Id: { - ThermostatControlSequence ControlSequenceOfOperation; + ControlSequenceOfOperationEnum ControlSequenceOfOperation; EmberAfStatus status = ControlSequenceOfOperation::Get(endpoint, &ControlSequenceOfOperation); if (status != EMBER_ZCL_STATUS_SUCCESS) { return imcode::InvalidValue; } - auto RequestedSystemMode = static_cast(*value); - if (ControlSequenceOfOperation > ThermostatControlSequence::kCoolingAndHeatingWithReheat || - RequestedSystemMode > ThermostatSystemMode::kFanOnly) + auto RequestedSystemMode = static_cast(*value); + if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat || + RequestedSystemMode > SystemModeEnum::kFanOnly) { return imcode::InvalidValue; } switch (ControlSequenceOfOperation) { - case ThermostatControlSequence::kCoolingOnly: - case ThermostatControlSequence::kCoolingWithReheat: - if (RequestedSystemMode == ThermostatSystemMode::kHeat || RequestedSystemMode == ThermostatSystemMode::kEmergencyHeat) + case ControlSequenceOfOperationEnum::kCoolingOnly: + case ControlSequenceOfOperationEnum::kCoolingWithReheat: + if (RequestedSystemMode == SystemModeEnum::kHeat || RequestedSystemMode == SystemModeEnum::kEmergencyHeat) return imcode::InvalidValue; else return imcode::Success; - case ThermostatControlSequence::kHeatingOnly: - case ThermostatControlSequence::kHeatingWithReheat: - if (RequestedSystemMode == ThermostatSystemMode::kCool || RequestedSystemMode == ThermostatSystemMode::kPrecooling) + case ControlSequenceOfOperationEnum::kHeatingOnly: + case ControlSequenceOfOperationEnum::kHeatingWithReheat: + if (RequestedSystemMode == SystemModeEnum::kCool || RequestedSystemMode == SystemModeEnum::kPrecooling) return imcode::InvalidValue; else return imcode::Success; @@ -644,7 +644,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co switch (mode) { - case SetpointAdjustMode::kBoth: + case SetpointRaiseLowerModeEnum::kBoth: if (HeatSupported && CoolSupported) { int16_t DesiredCoolingSetpoint, CoolLimit, DesiredHeatingSetpoint, HeatLimit; @@ -724,7 +724,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co status = EMBER_ZCL_STATUS_SUCCESS; break; - case SetpointAdjustMode::kCool: + case SetpointRaiseLowerModeEnum::kCool: if (CoolSupported) { if (OccupiedCoolingSetpoint::Get(aEndpointId, &CoolingSetpoint) == EMBER_ZCL_STATUS_SUCCESS) @@ -777,7 +777,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co status = EMBER_ZCL_STATUS_INVALID_COMMAND; break; - case SetpointAdjustMode::kHeat: + case SetpointRaiseLowerModeEnum::kHeat: if (HeatSupported) { if (OccupiedHeatingSetpoint::Get(aEndpointId, &HeatingSetpoint) == EMBER_ZCL_STATUS_SUCCESS) diff --git a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp index af13619a85365c..25e0edc034a855 100644 --- a/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp +++ b/src/app/clusters/thermostat-user-interface-configuration-server/thermostat-user-interface-configuration-server.cpp @@ -26,10 +26,7 @@ using namespace chip::app::Clusters::ThermostatUserInterfaceConfiguration; using chip::Protocols::InteractionModel::Status; namespace { -// -// Those types are defined as drafts in -// src/app/zap-templates/zcl/data-model/draft/types/thermostat-user-interface-configuration.xml -// + enum class TemperatureDisplayMode : uint8_t { kCelsius = 0x0, diff --git a/src/app/icd/ICDCheckInSender.cpp b/src/app/icd/ICDCheckInSender.cpp index 173a1df50ac037..ea827c2c7ac6c1 100644 --- a/src/app/icd/ICDCheckInSender.cpp +++ b/src/app/icd/ICDCheckInSender.cpp @@ -61,7 +61,7 @@ CHIP_ERROR ICDCheckInSender::SendCheckInMsg(const Transport::PeerAddress & addr) VerifyOrReturnError(!buffer.IsNull(), CHIP_ERROR_NO_MEMORY); MutableByteSpan output{ buffer->Start(), buffer->MaxDataLength() }; - ReturnErrorOnFailure(CheckinMessage::GenerateCheckinMessagePayload(mKey, mICDCounter, ByteSpan(), output)); + ReturnErrorOnFailure(CheckinMessage::GenerateCheckinMessagePayload(mAesKeyHandle, mICDCounter, ByteSpan(), output)); buffer->SetDataLength(static_cast(output.size())); VerifyOrReturnError(mExchangeManager->GetSessionManager() != nullptr, CHIP_ERROR_INTERNAL); @@ -89,8 +89,8 @@ CHIP_ERROR ICDCheckInSender::RequestResolve(ICDMonitoringEntry & entry, FabricTa AddressResolve::NodeLookupRequest request(peerId); - memcpy(mKey.AsMutable(), entry.key.As(), - sizeof(Crypto::Symmetric128BitsKeyByteArray)); + memcpy(mAesKeyHandle.AsMutable(), + entry.aesKeyHandle.As(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); CHIP_ERROR err = AddressResolve::Resolver::Instance().LookupNode(request, mAddressLookupHandle); diff --git a/src/app/icd/ICDCheckInSender.h b/src/app/icd/ICDCheckInSender.h index 0055d66804d0fb..b6e2dfa2212f92 100644 --- a/src/app/icd/ICDCheckInSender.h +++ b/src/app/icd/ICDCheckInSender.h @@ -50,7 +50,7 @@ class ICDCheckInSender : public AddressResolve::NodeListener Messaging::ExchangeManager * mExchangeManager = nullptr; - Crypto::Aes128KeyHandle mKey = Crypto::Aes128KeyHandle(); + Crypto::Aes128KeyHandle mAesKeyHandle = Crypto::Aes128KeyHandle(); uint32_t mICDCounter = 0; }; diff --git a/src/app/icd/ICDMonitoringTable.cpp b/src/app/icd/ICDMonitoringTable.cpp index 83a06c4f35ad80..57e6fa265821f1 100644 --- a/src/app/icd/ICDMonitoringTable.cpp +++ b/src/app/icd/ICDMonitoringTable.cpp @@ -25,7 +25,8 @@ enum class Fields : uint8_t { kCheckInNodeID = 1, kMonitoredSubject = 2, - kKey = 3, + kAesKeyHandle = 3, + kHmacKeyHandle = 4, }; CHIP_ERROR ICDMonitoringEntry::UpdateKey(StorageKeyName & skey) @@ -42,8 +43,12 @@ CHIP_ERROR ICDMonitoringEntry::Serialize(TLV::TLVWriter & writer) const ReturnErrorOnFailure(writer.Put(TLV::ContextTag(Fields::kCheckInNodeID), checkInNodeID)); ReturnErrorOnFailure(writer.Put(TLV::ContextTag(Fields::kMonitoredSubject), monitoredSubject)); - ByteSpan buf(key.As()); - ReturnErrorOnFailure(writer.Put(TLV::ContextTag(Fields::kKey), buf)); + ByteSpan aesKeybuf(aesKeyHandle.As()); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(Fields::kAesKeyHandle), aesKeybuf)); + + ByteSpan hmacKeybuf(hmacKeyHandle.As()); + ReturnErrorOnFailure(writer.Put(TLV::ContextTag(Fields::kHmacKeyHandle), hmacKeybuf)); + ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -69,18 +74,38 @@ CHIP_ERROR ICDMonitoringEntry::Deserialize(TLV::TLVReader & reader) case to_underlying(Fields::kMonitoredSubject): ReturnErrorOnFailure(reader.Get(monitoredSubject)); break; - case to_underlying(Fields::kKey): { - ByteSpan buf(key.AsMutable()); + case to_underlying(Fields::kAesKeyHandle): { + ByteSpan buf; ReturnErrorOnFailure(reader.Get(buf)); // Since we are storing either the raw key or a key ID, we must // simply copy the data as is in the keyHandle. - // Calling SetKey here would create another key in storage and will cause - // key leakage in some implementation. - memcpy(key.AsMutable(), buf.data(), + // Calling SetKey here would create another keyHandle in storage and will cause + // key leaks in some implementations. + memcpy(aesKeyHandle.AsMutable(), buf.data(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); keyHandleValid = true; } break; + case to_underlying(Fields::kHmacKeyHandle): { + ByteSpan buf; + CHIP_ERROR error = reader.Get(buf); + + if (error != CHIP_NO_ERROR) + { + // If retreiving the hmac key handle failed, we need to set an invalid key handle + // even if the AesKeyHandle is valid. + keyHandleValid = false; + return error; + } + + // Since we are storing either the raw key or a key ID, we must + // simply copy the data as is in the keyHandle. + // Calling SetKey here would create another keyHandle in storage and will cause + // key leaks in some implementations. + memcpy(hmacKeyHandle.AsMutable(), buf.data(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)); + } + break; default: break; } @@ -108,16 +133,29 @@ CHIP_ERROR ICDMonitoringEntry::SetKey(ByteSpan keyData) Crypto::Symmetric128BitsKeyByteArray keyMaterial; memcpy(keyMaterial, keyData.data(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); - ReturnErrorOnFailure(symmetricKeystore->CreateKey(keyMaterial, key)); - keyHandleValid = true; + // TODO - Add function to set PSA key lifetime + ReturnErrorOnFailure(symmetricKeystore->CreateKey(keyMaterial, aesKeyHandle)); + CHIP_ERROR error = symmetricKeystore->CreateKey(keyMaterial, hmacKeyHandle); - return CHIP_NO_ERROR; + if (error == CHIP_NO_ERROR) + { + // If the creation of the HmacKeyHandle succeeds, both key handles are valid + keyHandleValid = true; + } + else + { + // Creation of the HmacKeyHandle failed, we need to delete the AesKeyHandle to avoid a key leak + symmetricKeystore->DestroyKey(this->aesKeyHandle); + } + + return error; } CHIP_ERROR ICDMonitoringEntry::DeleteKey() { VerifyOrReturnError(symmetricKeystore != nullptr, CHIP_ERROR_INTERNAL); - symmetricKeystore->DestroyKey(this->key); + symmetricKeystore->DestroyKey(this->aesKeyHandle); + symmetricKeystore->DestroyKey(this->hmacKeyHandle); keyHandleValid = false; return CHIP_NO_ERROR; } @@ -141,7 +179,7 @@ bool ICDMonitoringEntry::IsKeyEquivalent(ByteSpan keyData) uint64_t data = Crypto::GetRandU64(), validation, encrypted; validation = data; - err = Crypto::AES_CCM_encrypt(reinterpret_cast(&data), sizeof(data), nullptr, 0, tempEntry.key, aead, + err = Crypto::AES_CCM_encrypt(reinterpret_cast(&data), sizeof(data), nullptr, 0, tempEntry.aesKeyHandle, aead, Crypto::CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, reinterpret_cast(&encrypted), mic, Crypto::CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES); @@ -149,7 +187,7 @@ bool ICDMonitoringEntry::IsKeyEquivalent(ByteSpan keyData) if (err == CHIP_NO_ERROR) { err = Crypto::AES_CCM_decrypt(reinterpret_cast(&encrypted), sizeof(encrypted), nullptr, 0, mic, - Crypto::CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, key, aead, + Crypto::CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, aesKeyHandle, aead, Crypto::CHIP_CRYPTO_AEAD_NONCE_LENGTH_BYTES, reinterpret_cast(&data)); } tempEntry.DeleteKey(); @@ -175,7 +213,11 @@ ICDMonitoringEntry & ICDMonitoringEntry::operator=(const ICDMonitoringEntry & ic index = icdMonitoringEntry.index; keyHandleValid = icdMonitoringEntry.keyHandleValid; symmetricKeystore = icdMonitoringEntry.symmetricKeystore; - memcpy(key.AsMutable(), icdMonitoringEntry.key.As(), + memcpy(aesKeyHandle.AsMutable(), + icdMonitoringEntry.aesKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)); + memcpy(hmacKeyHandle.AsMutable(), + icdMonitoringEntry.hmacKeyHandle.As(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); return *this; @@ -211,12 +253,16 @@ CHIP_ERROR ICDMonitoringTable::Set(uint16_t index, const ICDMonitoringEntry & en VerifyOrReturnError(kUndefinedNodeId != entry.checkInNodeID, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(kUndefinedNodeId != entry.monitoredSubject, CHIP_ERROR_INVALID_ARGUMENT); VerifyOrReturnError(entry.keyHandleValid, CHIP_ERROR_INVALID_ARGUMENT); + ICDMonitoringEntry e(this->mFabric, index); e.checkInNodeID = entry.checkInNodeID; e.monitoredSubject = entry.monitoredSubject; e.index = index; - memcpy(e.key.AsMutable(), entry.key.As(), - sizeof(Crypto::Symmetric128BitsKeyByteArray)); + + memcpy(e.aesKeyHandle.AsMutable(), + entry.aesKeyHandle.As(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); + memcpy(e.hmacKeyHandle.AsMutable(), + entry.hmacKeyHandle.As(), sizeof(Crypto::Symmetric128BitsKeyByteArray)); return e.Save(this->mStorage); } @@ -225,8 +271,8 @@ CHIP_ERROR ICDMonitoringTable::Remove(uint16_t index) { ICDMonitoringEntry entry(mSymmetricKeystore, this->mFabric); - // Retrieve entry and delete the key first as to not - // cause any key leakage. + // Retrieve entry and delete the keyHandle first as to not + // cause any key leaks. this->Get(index, entry); ReturnErrorOnFailure(entry.DeleteKey()); diff --git a/src/app/icd/ICDMonitoringTable.h b/src/app/icd/ICDMonitoringTable.h index c97703b226aa75..e996d0c757cc23 100644 --- a/src/app/icd/ICDMonitoringTable.h +++ b/src/app/icd/ICDMonitoringTable.h @@ -33,7 +33,7 @@ using SymmetricKeystore = SessionKeystore; namespace chip { -inline constexpr size_t kICDMonitoringBufferSize = 40; +inline constexpr size_t kICDMonitoringBufferSize = 60; struct ICDMonitoringEntry : public PersistentData { @@ -104,7 +104,8 @@ struct ICDMonitoringEntry : public PersistentData chip::FabricIndex fabricIndex = kUndefinedFabricIndex; chip::NodeId checkInNodeID = kUndefinedNodeId; uint64_t monitoredSubject = static_cast(0); - Crypto::Aes128KeyHandle key = Crypto::Aes128KeyHandle(); + Crypto::Aes128KeyHandle aesKeyHandle = Crypto::Aes128KeyHandle(); + Crypto::Hmac128KeyHandle hmacKeyHandle = Crypto::Hmac128KeyHandle(); bool keyHandleValid = false; uint16_t index = 0; Crypto::SymmetricKeystore * symmetricKeystore = nullptr; diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 78802f9b629a43..eb9b5835dd23d5 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -203,6 +203,7 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) #endif ); + SuccessOrExit(err); err = mListener.Init(this); SuccessOrExit(err); mGroupsProvider->SetListener(&mListener); diff --git a/src/app/tests/AppTestContext.cpp b/src/app/tests/AppTestContext.cpp index 995bfac46cdfea..6f22097d7d11e8 100644 --- a/src/app/tests/AppTestContext.cpp +++ b/src/app/tests/AppTestContext.cpp @@ -41,10 +41,8 @@ namespace Test { CHIP_ERROR AppContext::SetUpTestSuite() { CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrExit((err = chip::Platform::MemoryInit()) == CHIP_NO_ERROR, - ChipLogError(AppServer, "Init CHIP memory failed: %" CHIP_ERROR_FORMAT, err.Format())); - VerifyOrExit((err = LoopbackTransportManager::Init()) == CHIP_NO_ERROR, - ChipLogError(AppServer, "Init LoopbackTransportManager failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = LoopbackMessagingContext::SetUpTestSuite()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "SetUpTestSuite lo messaging context failed: %" CHIP_ERROR_FORMAT, err.Format())); VerifyOrExit((err = chip::DeviceLayer::PlatformMgr().InitChipStack()) == CHIP_NO_ERROR, ChipLogError(AppServer, "Init CHIP stack failed: %" CHIP_ERROR_FORMAT, err.Format())); exit: @@ -54,15 +52,14 @@ CHIP_ERROR AppContext::SetUpTestSuite() void AppContext::TearDownTestSuite() { chip::DeviceLayer::PlatformMgr().Shutdown(); - LoopbackTransportManager::Shutdown(); - chip::Platform::MemoryShutdown(); + LoopbackMessagingContext::TearDownTestSuite(); } CHIP_ERROR AppContext::SetUp() { CHIP_ERROR err = CHIP_NO_ERROR; - VerifyOrExit((err = MessagingContext::Init(&GetTransportMgr(), &GetIOContext())) == CHIP_NO_ERROR, - ChipLogError(AppServer, "Init MessagingContext failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = LoopbackMessagingContext::SetUp()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "SetUp lo messaging context failed: %" CHIP_ERROR_FORMAT, err.Format())); VerifyOrExit((err = app::InteractionModelEngine::GetInstance()->Init( &GetExchangeManager(), &GetFabricTable(), app::reporting::GetDefaultReportScheduler())) == CHIP_NO_ERROR, ChipLogError(AppServer, "Init InteractionModelEngine failed: %" CHIP_ERROR_FORMAT, err.Format())); @@ -79,7 +76,7 @@ void AppContext::TearDown() Access::GetAccessControl().Finish(); Access::ResetAccessControlToDefault(); chip::app::InteractionModelEngine::GetInstance()->Shutdown(); - MessagingContext::Shutdown(); + LoopbackMessagingContext::TearDown(); } } // namespace Test diff --git a/src/app/tests/AppTestContext.h b/src/app/tests/AppTestContext.h index e4a1691f32382b..40605f237db7ab 100644 --- a/src/app/tests/AppTestContext.h +++ b/src/app/tests/AppTestContext.h @@ -28,39 +28,13 @@ class AppContext : public LoopbackMessagingContext { public: // Performs shared setup for all tests in the test suite - virtual CHIP_ERROR SetUpTestSuite(); + CHIP_ERROR SetUpTestSuite() override; // Performs shared teardown for all tests in the test suite - virtual void TearDownTestSuite(); + void TearDownTestSuite() override; // Performs setup for each individual test in the test suite - virtual CHIP_ERROR SetUp(); + CHIP_ERROR SetUp() override; // Performs teardown for each individual test in the test suite - virtual void TearDown(); - - // Helpers that can be used directly by the nlTestSuite - - static int nlTestSetUpTestSuite(void * context) - { - auto err = static_cast(context)->SetUpTestSuite(); - return err == CHIP_NO_ERROR ? SUCCESS : FAILURE; - } - - static int nlTestTearDownTestSuite(void * context) - { - static_cast(context)->TearDownTestSuite(); - return SUCCESS; - } - - static int nlTestSetUp(void * context) - { - auto err = static_cast(context)->SetUp(); - return err == CHIP_NO_ERROR ? SUCCESS : FAILURE; - } - - static int nlTestTearDown(void * context) - { - static_cast(context)->TearDown(); - return SUCCESS; - } + void TearDown() override; }; } // namespace Test diff --git a/src/app/tests/TestAclAttribute.cpp b/src/app/tests/TestAclAttribute.cpp index 9632062a0838fe..16766caf02bb8e 100644 --- a/src/app/tests/TestAclAttribute.cpp +++ b/src/app/tests/TestAclAttribute.cpp @@ -82,24 +82,14 @@ class TestDeviceTypeResolver : public AccessControl::DeviceTypeResolver class TestAccessContext : public chip::Test::AppContext { public: - static int Initialize(void * context) + // Performs setup for each individual test in the test suite + CHIP_ERROR SetUp() override { - if (AppContext::Initialize(context) != SUCCESS) - return FAILURE; + ReturnErrorOnFailure(chip::Test::AppContext::SetUp()); Access::GetAccessControl().Finish(); Access::GetAccessControl().Init(GetTestAccessControlDelegate(), gDeviceTypeResolver); - return SUCCESS; - } - - static int Finalize(void * context) - { - if (AppContext::Finalize(context) != SUCCESS) - return FAILURE; - return SUCCESS; + return CHIP_NO_ERROR; } - -private: - chip::MonotonicallyIncreasingCounter mEventCounter; }; class MockInteractionModelApp : public chip::app::ReadClient::Callback @@ -264,27 +254,19 @@ void TestAclAttribute::TestACLDeniedAttribute(nlTestSuite * apSuite, void * apCo namespace { -/** - * Test Suite. It lists all the test functions. - */ - -// clang-format off -const nlTest sTests[] = -{ +const nlTest sTests[] = { NL_TEST_DEF("TestACLDeniedAttribute", chip::app::TestAclAttribute::TestACLDeniedAttribute), - NL_TEST_SENTINEL() + NL_TEST_SENTINEL(), }; -// clang-format on -// clang-format off -nlTestSuite sSuite = -{ +nlTestSuite sSuite = { "TestAclAttribute", &sTests[0], - TestAccessContext::Initialize, - TestAccessContext::Finalize + TestAccessContext::nlTestSetUpTestSuite, + TestAccessContext::nlTestTearDownTestSuite, + TestAccessContext::nlTestSetUp, + TestAccessContext::nlTestTearDown, }; -// clang-format on } // namespace diff --git a/src/app/tests/TestICDMonitoringTable.cpp b/src/app/tests/TestICDMonitoringTable.cpp index 170ece20e1778d..1a6460e31640e3 100644 --- a/src/app/tests/TestICDMonitoringTable.cpp +++ b/src/app/tests/TestICDMonitoringTable.cpp @@ -155,11 +155,16 @@ void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) // Retrieve first entry err = loading.Get(0, entry); + NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry1.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Retrieve second entry err = loading.Get(1, entry); @@ -168,6 +173,10 @@ void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer2a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry2.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // No more entries err = loading.Get(2, entry); @@ -176,6 +185,7 @@ void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) // Remove first entry saving.Remove(0); + ICDMonitoringEntry entry4(&keystore); entry4.checkInNodeID = kClientNodeId13; entry4.monitoredSubject = kClientNodeId11; @@ -190,6 +200,10 @@ void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer2a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry2.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Retrieve second entry err = loading.Get(1, entry); @@ -198,6 +212,10 @@ void TestSaveAndLoadRegistrationValue(nlTestSuite * aSuite, void * aContext) NL_TEST_ASSERT(aSuite, kClientNodeId13 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1b))); + NL_TEST_ASSERT(aSuite, + memcmp(entry4.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); } void TestSaveAllInvalidRegistrationValues(nlTestSuite * aSuite, void * aContext) @@ -296,14 +314,22 @@ void TestSaveLoadRegistrationValueForMultipleFabrics(nlTestSuite * aSuite, void NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry1.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); - // Retrieve fabric2, second entry + // Retrieve fabric1, second entry err = table1.Get(1, entry); NL_TEST_ASSERT(aSuite, CHIP_NO_ERROR == err); NL_TEST_ASSERT(aSuite, kTestFabricIndex1 == entry.fabricIndex); NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1b))); + NL_TEST_ASSERT(aSuite, + memcmp(entry2.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Retrieve fabric2, first entry err = table2.Get(0, entry); @@ -312,6 +338,10 @@ void TestSaveLoadRegistrationValueForMultipleFabrics(nlTestSuite * aSuite, void NL_TEST_ASSERT(aSuite, kClientNodeId21 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId22 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer2a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry3.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); } void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) @@ -358,6 +388,10 @@ void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry1.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Retrieve second entry (not modified) err = table1.Get(1, entry); @@ -366,6 +400,10 @@ void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer2a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry2.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Remove (existing) err = table1.Remove(0); @@ -381,6 +419,10 @@ void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) NL_TEST_ASSERT(aSuite, kClientNodeId12 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId11 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer2a))); + NL_TEST_ASSERT(aSuite, + memcmp(entry2.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Retrieve fabric2, first entry err = table2.Get(0, entry); @@ -389,6 +431,10 @@ void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) NL_TEST_ASSERT(aSuite, kClientNodeId21 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId22 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1b))); + NL_TEST_ASSERT(aSuite, + memcmp(entry3.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Remove all (fabric 1) err = table1.RemoveAll(); @@ -404,6 +450,10 @@ void TestDeleteValidEntryFromStorage(nlTestSuite * aSuite, void * context) NL_TEST_ASSERT(aSuite, kClientNodeId21 == entry.checkInNodeID); NL_TEST_ASSERT(aSuite, kClientNodeId22 == entry.monitoredSubject); NL_TEST_ASSERT(aSuite, entry.IsKeyEquivalent(ByteSpan(kKeyBuffer1b))); + NL_TEST_ASSERT(aSuite, + memcmp(entry3.hmacKeyHandle.As(), + entry.hmacKeyHandle.As(), + sizeof(Crypto::Symmetric128BitsKeyByteArray)) == 0); // Remove all (fabric 2) err = table2.RemoveAll(); diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index 7fb2ebc4387dad..a8347a57ce3f46 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -83,6 +83,7 @@ limitations under the License. 0x0033 GENERAL_DIAGNOSTICS_CLUSTER The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. + NetworkInterfaces RebootCount diff --git a/src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml index ba31ad6d185b85..dcd0acd3c4d4ff 100644 --- a/src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml @@ -17,7 +17,8 @@ limitations under the License. - + + General Pulse Width Modulation 0x001c diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index 1c15c5fc8b7fc8..567216018d07ff 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -16,7 +16,6 @@ limitations under the License. --> - @@ -28,7 +27,49 @@ limitations under the License. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,33 +81,34 @@ limitations under the License. - + - + - - - - - - - - - + + + + + + + + + - + - + + @@ -76,55 +118,103 @@ limitations under the License. - + - - - - - - + + + + + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - + + + + + + + + + + + + + + + + + - - - + + + Thermostat - HVAC + HVAC An interface for configuring and controlling the functionality of a thermostat. 0x0201 THERMOSTAT_CLUSTER true true - LocalTemperature - OutdoorTemperature - Occupancy + LocalTemperature + OutdoorTemperature + Occupancy - AbsMinHeatSetpointLimit - AbsMaxHeatSetpointLimit - AbsMinCoolSetpointLimit - AbsMaxCoolSetpointLimit - PICoolingDemand - PIHeatingDemand + + AbsMinHeatSetpointLimit + AbsMaxHeatSetpointLimit + AbsMinCoolSetpointLimit + AbsMaxCoolSetpointLimit + PICoolingDemand + PIHeatingDemand HVACSystemTypeConfiguration @@ -132,7 +222,6 @@ limitations under the License. LocalTemperatureCalibration - OccupiedCoolingSetpoint @@ -141,145 +230,124 @@ limitations under the License. UnoccupiedHeatingSetpoint MinHeatSetpointLimit - MaxHeatSetpointLimit - MinCoolSetpointLimit - MaxCoolSetpointLimit - MinSetpointDeadBand - - + RemoteSensing - - + ControlSequenceOfOperation - - + SystemMode - - ThermostatRunningMode - StartOfWeek - NumberOfWeeklyTransitions - NumberOfDailyTransitions - + ThermostatRunningMode + StartOfWeek + NumberOfWeeklyTransitions + NumberOfDailyTransitions + TemperatureSetpointHold - TemperatureSetpointHoldDuration - - + ThermostatProgrammingOperationMode - - ThermostatRunningState - SetpointChangeSource + ThermostatRunningState + SetpointChangeSource SetpointChangeAmount SetpointChangeSourceTimestamp OccupiedSetback - OccupiedSetbackMin OccupiedSetbackMax UnoccupiedSetback - UnoccupiedSetbackMin UnoccupiedSetbackMax - + EmergencyHeatDelta - - + ACType - - + ACCapacity - - + ACRefrigerantType - - + ACCompressorType - - + ACErrorCode - - + ACLouverPosition - - ACCoilTemperature - + ACCoilTemperature + ACCapacityformat - Command description for SetpointRaiseLower - + Command description for SetWeeklySchedule - - - - + + + + Command description for GetWeeklySchedule - - + + @@ -292,9 +360,10 @@ limitations under the License. The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. - - - + + + - + + \ No newline at end of file diff --git a/src/app/zap-templates/zcl/data-model/draft/EN50523-appliance-identification.xml b/src/app/zap-templates/zcl/data-model/draft/EN50523-appliance-identification.xml deleted file mode 100644 index 3e18ec7343171b..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/EN50523-appliance-identification.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml index ce3f7494c76d2d..282cb205020935 100644 --- a/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml @@ -30,7 +30,8 @@ limitations under the License. - + + Barrier Control Closures 0x0103 diff --git a/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml index 3fca4504c4fcbe..e9246a1e3ff84d 100644 --- a/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml @@ -17,7 +17,11 @@ limitations under the License. - + + Electrical Measurement Home Automation Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. diff --git a/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml b/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml index dc52fd7c90532a..132de384def242 100644 --- a/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml +++ b/src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml @@ -17,7 +17,8 @@ limitations under the License. - + + Binary Input (Basic) General An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. diff --git a/src/app/zap-templates/zcl/data-model/draft/meter-identification.xml b/src/app/zap-templates/zcl/data-model/draft/meter-identification.xml deleted file mode 100644 index 7cd304194793e0..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/meter-identification.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml b/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml index 1662b2b442cf01..eb74be7c600b06 100644 --- a/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml @@ -17,7 +17,8 @@ limitations under the License. - + + On/off Switch Configuration General Attributes and commands for configuring On/Off switching devices. diff --git a/src/app/zap-templates/zcl/data-model/draft/types/ballast-configuration.xml b/src/app/zap-templates/zcl/data-model/draft/types/ballast-configuration.xml deleted file mode 100644 index c31350d60223e9..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/ballast-configuration.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/dehumidification-control.xml b/src/app/zap-templates/zcl/data-model/draft/types/dehumidification-control.xml deleted file mode 100644 index 2f5d6b5d960963..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/dehumidification-control.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/door-lock.xml b/src/app/zap-templates/zcl/data-model/draft/types/door-lock.xml deleted file mode 100644 index f54aa998c937e0..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/door-lock.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/illuminance-level-sensing.xml b/src/app/zap-templates/zcl/data-model/draft/types/illuminance-level-sensing.xml deleted file mode 100644 index 04eedca71a1038..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/illuminance-level-sensing.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/onoff-switch-configuration.xml b/src/app/zap-templates/zcl/data-model/draft/types/onoff-switch-configuration.xml deleted file mode 100644 index 6e696a6bfb5bc2..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/onoff-switch-configuration.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/power-profile.xml b/src/app/zap-templates/zcl/data-model/draft/types/power-profile.xml deleted file mode 100644 index 5e68d974fa182e..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/power-profile.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/thermostat-user-interface-configuration.xml b/src/app/zap-templates/zcl/data-model/draft/types/thermostat-user-interface-configuration.xml deleted file mode 100644 index 060490580fb268..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/thermostat-user-interface-configuration.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/draft/types/thermostat.xml b/src/app/zap-templates/zcl/data-model/draft/types/thermostat.xml deleted file mode 100644 index 9264e13176db0d..00000000000000 --- a/src/app/zap-templates/zcl/data-model/draft/types/thermostat.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 050d626a8ad1af..5730434edcc351 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -394,7 +394,7 @@ cluster OnOff = 6 { } /** Attributes and commands for configuring On/Off switching devices. */ -cluster OnOffSwitchConfiguration = 7 { +deprecated cluster OnOffSwitchConfiguration = 7 { revision 1; // NOTE: Default/not specifically set readonly attribute enum8 switchType = 0; @@ -533,7 +533,7 @@ cluster LevelControl = 8 { } /** An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. */ -cluster BinaryInputBasic = 15 { +deprecated cluster BinaryInputBasic = 15 { revision 1; // NOTE: Default/not specifically set attribute optional char_string<16> activeText = 4; @@ -554,7 +554,7 @@ cluster BinaryInputBasic = 15 { } /** Cluster to control pulse width modulation */ -provisional cluster PulseWidthModulation = 28 { +deprecated cluster PulseWidthModulation = 28 { revision 1; // NOTE: Default/not specifically set readonly attribute command_id generatedCommandList[] = 65528; @@ -1779,7 +1779,7 @@ cluster DiagnosticLogs = 50 { /** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ cluster GeneralDiagnostics = 51 { - revision 1; // NOTE: Default/not specifically set + revision 2; enum BootReasonEnum : enum8 { kUnspecified = 0; @@ -5439,7 +5439,7 @@ cluster WindowCovering = 258 { } /** This cluster provides control of a barrier (garage door). */ -cluster BarrierControl = 259 { +deprecated cluster BarrierControl = 259 { revision 1; // NOTE: Default/not specifically set bitmap BarrierControlCapabilities : bitmap8 { @@ -5608,13 +5608,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; } - enum ThermostatControlSequence : enum8 { + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -5623,13 +5651,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -5641,15 +5685,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -5662,24 +5714,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -5693,18 +5785,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -5714,14 +5806,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5730,27 +5822,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -7975,7 +8067,7 @@ cluster ContentAppObserver = 1296 { } /** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */ -cluster ElectricalMeasurement = 2820 { +deprecated cluster ElectricalMeasurement = 2820 { revision 3; readonly attribute optional bitmap32 measurementType = 0; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 5f62096b3ac315..1eed51794fad6f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -34915,11 +34915,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { setWeeklySchedule(callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, 0); } - public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions, int timedInvokeTimeoutMs) { + public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); @@ -34974,7 +34974,7 @@ public void onResponse(StructType invokeStructValue) { final long modeForSequenceFieldID = 2L; Integer modeForSequence = null; final long transitionsFieldID = 3L; - ArrayList transitions = null; + ArrayList transitions = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == numberOfTransitionsForSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -34994,7 +34994,7 @@ public void onResponse(StructType invokeStructValue) { } else if (element.contextTagNum() == transitionsFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterThermostatScheduleTransition.decodeTlv(elementcastingValue)); + transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterWeeklyScheduleTransitionStruct.decodeTlv(elementcastingValue)); } } } @@ -35019,7 +35019,7 @@ public void onResponse(StructType invokeStructValue) { } public interface GetWeeklyScheduleResponseCallback extends BaseClusterCallback { - void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); + void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); } public interface LocalTemperatureAttributeCallback extends BaseAttributeCallback { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 0ec9d77140e3f2..ba1b077bbf57b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -7049,7 +7049,7 @@ public String toString() { return output.toString(); } } -public static class ThermostatClusterThermostatScheduleTransition { +public static class ThermostatClusterWeeklyScheduleTransitionStruct { public Integer transitionTime; public @Nullable Integer heatSetpoint; public @Nullable Integer coolSetpoint; @@ -7057,7 +7057,7 @@ public static class ThermostatClusterThermostatScheduleTransition { private static final long HEAT_SETPOINT_ID = 1L; private static final long COOL_SETPOINT_ID = 2L; - public ThermostatClusterThermostatScheduleTransition( + public ThermostatClusterWeeklyScheduleTransitionStruct( Integer transitionTime, @Nullable Integer heatSetpoint, @Nullable Integer coolSetpoint @@ -7076,7 +7076,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVType tlvValue) { + public static ThermostatClusterWeeklyScheduleTransitionStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -7101,7 +7101,7 @@ public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVTyp } } } - return new ThermostatClusterThermostatScheduleTransition( + return new ThermostatClusterWeeklyScheduleTransitionStruct( transitionTime, heatSetpoint, coolSetpoint @@ -7111,7 +7111,7 @@ public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVTyp @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThermostatClusterThermostatScheduleTransition {\n"); + output.append("ThermostatClusterWeeklyScheduleTransitionStruct {\n"); output.append("\ttransitionTime: "); output.append(transitionTime); output.append("\n"); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index a7d630abca1b50..db477f41ca12bd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -11768,7 +11768,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo numberOfTransitionsForSequenceResponseValue = new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); @@ -11777,7 +11777,7 @@ public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekF responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); responseValues.put(modeForSequenceResponseValue, modeForSequence); - // transitions: ThermostatScheduleTransition + // transitions: WeeklyScheduleTransitionStruct // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); @@ -23477,7 +23477,7 @@ public Map> getCommandMap() { commandArguments.get("dayOfWeekForSequence") , (Integer) commandArguments.get("modeForSequence") - , (ArrayList) + , (ArrayList) commandArguments.get("transitions") ); }, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 0f77afec3d37a8..f231cd305c2e37 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -100,7 +100,7 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt new file mode 100644 index 00000000000000..343952b9a54a79 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterWeeklyScheduleTransitionStruct( + val transitionTime: UInt, + val heatSetpoint: Int?, + val coolSetpoint: Int? +) { + override fun toString(): String = buildString { + append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThermostatClusterWeeklyScheduleTransitionStruct { + tlvReader.enterStructure(tlvTag) + val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterWeeklyScheduleTransitionStruct( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt index 1e451858dabaf1..6eeddc77e8fb7f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt @@ -25,7 +25,7 @@ class ThermostatCluster(private val controller: MatterController, private val en val numberOfTransitionsForSequence: UByte, val dayOfWeekForSequence: UInt, val modeForSequence: UInt, - val transitions: List + val transitions: List ) class LocalTemperatureAttribute(val value: Short?) @@ -72,7 +72,7 @@ class ThermostatCluster(private val controller: MatterController, private val en numberOfTransitionsForSequence: UByte, dayOfWeekForSequence: UInt, modeForSequence: UInt, - transitions: List, + transitions: List, timedInvokeTimeoutMs: Int? = null ) { val commandId = 1L diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni index b12d23f039fa29..66ea78282f44c2 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -100,7 +100,7 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt new file mode 100644 index 00000000000000..5f93367f7ea4e3 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterWeeklyScheduleTransitionStruct( + val transitionTime: UShort, + val heatSetpoint: Short?, + val coolSetpoint: Short? +) { + override fun toString(): String = buildString { + append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThermostatClusterWeeklyScheduleTransitionStruct { + tlvReader.enterStructure(tlvTag) + val transitionTime = tlvReader.getUShort(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getShort(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getShort(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterWeeklyScheduleTransitionStruct( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 6879d8659a759e..aee716ee76a3f3 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -24661,7 +24661,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -24812,7 +24812,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -24828,7 +24828,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -25117,7 +25117,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); + jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index e55f6a63f9297c..c8b407678f3d20 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -5934,8 +5934,8 @@ JNI_METHOD(void, ThermostatCluster, writeRemoteSensingAttribute) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6202,8 +6202,8 @@ JNI_METHOD(void, ThermostatCluster, writeThermostatProgrammingOperationModeAttri std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6634,7 +6634,8 @@ JNI_METHOD(void, ThermostatCluster, writeACErrorCodeAttribute) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().LongToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 6b14927999f48a..1c361f0c6f7546 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -4947,24 +4947,24 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); } - jclass thermostatScheduleTransitionStructClass_1; + jclass weeklyScheduleTransitionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterThermostatScheduleTransition", - thermostatScheduleTransitionStructClass_1); + env, "chip/devicecontroller/ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct", + weeklyScheduleTransitionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterThermostatScheduleTransition"); + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct"); return; } - jmethodID thermostatScheduleTransitionStructCtor_1 = env->GetMethodID( - thermostatScheduleTransitionStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (thermostatScheduleTransitionStructCtor_1 == nullptr) + jmethodID weeklyScheduleTransitionStructStructCtor_1 = env->GetMethodID( + weeklyScheduleTransitionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (weeklyScheduleTransitionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterThermostatScheduleTransition constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct constructor"); return; } - newElement_0 = env->NewObject(thermostatScheduleTransitionStructClass_1, thermostatScheduleTransitionStructCtor_1, + newElement_0 = env->NewObject(weeklyScheduleTransitionStructStructClass_1, weeklyScheduleTransitionStructStructCtor_1, newElement_0_transitionTime, newElement_0_heatSetpoint, newElement_0_coolSetpoint); chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 394088dc6a4ff4..ceaa6c58fc82fa 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7841,7 +7841,7 @@ class ChipClusters: "numberOfTransitionsForSequence": "int", "dayOfWeekForSequence": "int", "modeForSequence": "int", - "transitions": "ThermostatScheduleTransition", + "transitions": "WeeklyScheduleTransitionStruct", }, }, 0x00000002: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 59915a932abb75..aea06752bbcd60 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -28166,17 +28166,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maxCoolSetpointLimit", Tag=0x00000018, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="minSetpointDeadBand", Tag=0x00000019, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="remoteSensing", Tag=0x0000001A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="controlSequenceOfOperation", Tag=0x0000001B, Type=Thermostat.Enums.ThermostatControlSequence), - ClusterObjectFieldDescriptor(Label="systemMode", Tag=0x0000001C, Type=uint), - ClusterObjectFieldDescriptor(Label="thermostatRunningMode", Tag=0x0000001E, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startOfWeek", Tag=0x00000020, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="controlSequenceOfOperation", Tag=0x0000001B, Type=Thermostat.Enums.ControlSequenceOfOperationEnum), + ClusterObjectFieldDescriptor(Label="systemMode", Tag=0x0000001C, Type=Thermostat.Enums.SystemModeEnum), + ClusterObjectFieldDescriptor(Label="thermostatRunningMode", Tag=0x0000001E, Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]), + ClusterObjectFieldDescriptor(Label="startOfWeek", Tag=0x00000020, Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]), ClusterObjectFieldDescriptor(Label="numberOfWeeklyTransitions", Tag=0x00000021, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="numberOfDailyTransitions", Tag=0x00000022, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="temperatureSetpointHold", Tag=0x00000023, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="temperatureSetpointHold", Tag=0x00000023, Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]), ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldDuration", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="thermostatProgrammingOperationMode", Tag=0x00000025, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="thermostatRunningState", Tag=0x00000029, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="setpointChangeSource", Tag=0x00000030, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="setpointChangeSource", Tag=0x00000030, Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]), ClusterObjectFieldDescriptor(Label="setpointChangeAmount", Tag=0x00000031, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="setpointChangeSourceTimestamp", Tag=0x00000032, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="occupiedSetback", Tag=0x00000034, Type=typing.Union[None, Nullable, uint]), @@ -28186,14 +28186,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMin", Tag=0x00000038, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMax", Tag=0x00000039, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="emergencyHeatDelta", Tag=0x0000003A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACType", Tag=0x00000040, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACType", Tag=0x00000040, Type=typing.Optional[Thermostat.Enums.ACTypeEnum]), ClusterObjectFieldDescriptor(Label="ACCapacity", Tag=0x00000041, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACRefrigerantType", Tag=0x00000042, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACCompressorType", Tag=0x00000043, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACRefrigerantType", Tag=0x00000042, Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]), + ClusterObjectFieldDescriptor(Label="ACCompressorType", Tag=0x00000043, Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]), ClusterObjectFieldDescriptor(Label="ACErrorCode", Tag=0x00000044, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]), ClusterObjectFieldDescriptor(Label="ACCoilTemperature", Tag=0x00000046, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -28223,17 +28223,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: maxCoolSetpointLimit: 'typing.Optional[int]' = None minSetpointDeadBand: 'typing.Optional[int]' = None remoteSensing: 'typing.Optional[uint]' = None - controlSequenceOfOperation: 'Thermostat.Enums.ThermostatControlSequence' = None - systemMode: 'uint' = None - thermostatRunningMode: 'typing.Optional[uint]' = None - startOfWeek: 'typing.Optional[uint]' = None + controlSequenceOfOperation: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = None + systemMode: 'Thermostat.Enums.SystemModeEnum' = None + thermostatRunningMode: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None + startOfWeek: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None numberOfWeeklyTransitions: 'typing.Optional[uint]' = None numberOfDailyTransitions: 'typing.Optional[uint]' = None - temperatureSetpointHold: 'typing.Optional[uint]' = None + temperatureSetpointHold: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None temperatureSetpointHoldDuration: 'typing.Union[None, Nullable, uint]' = None thermostatProgrammingOperationMode: 'typing.Optional[uint]' = None thermostatRunningState: 'typing.Optional[uint]' = None - setpointChangeSource: 'typing.Optional[uint]' = None + setpointChangeSource: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None setpointChangeAmount: 'typing.Union[None, Nullable, int]' = None setpointChangeSourceTimestamp: 'typing.Optional[uint]' = None occupiedSetback: 'typing.Union[None, Nullable, uint]' = None @@ -28243,14 +28243,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: unoccupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None unoccupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None emergencyHeatDelta: 'typing.Optional[uint]' = None - ACType: 'typing.Optional[uint]' = None + ACType: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None ACCapacity: 'typing.Optional[uint]' = None - ACRefrigerantType: 'typing.Optional[uint]' = None - ACCompressorType: 'typing.Optional[uint]' = None + ACRefrigerantType: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None + ACCompressorType: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None ACErrorCode: 'typing.Optional[uint]' = None - ACLouverPosition: 'typing.Optional[uint]' = None + ACLouverPosition: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None ACCoilTemperature: 'typing.Union[None, Nullable, int]' = None - ACCapacityformat: 'typing.Optional[uint]' = None + ACCapacityformat: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -28259,17 +28259,61 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class SetpointAdjustMode(MatterIntEnum): - kHeat = 0x00 - kCool = 0x01 - kBoth = 0x02 + class ACCapacityFormatEnum(MatterIntEnum): + kBTUh = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 1, + + class ACCompressorTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kT1 = 0x01 + kT2 = 0x02 + kT3 = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class ACLouverPositionEnum(MatterIntEnum): + kClosed = 0x01 + kOpen = 0x02 + kQuarter = 0x03 + kHalf = 0x04 + kThreeQuarters = 0x05 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class ACRefrigerantTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kR22 = 0x01 + kR410a = 0x02 + kR407c = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class ACTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kCoolingFixed = 0x01 + kHeatPumpFixed = 0x02 + kCoolingInverter = 0x03 + kHeatPumpInverter = 0x04 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, - class ThermostatControlSequence(MatterIntEnum): + class ControlSequenceOfOperationEnum(MatterIntEnum): kCoolingOnly = 0x00 kCoolingWithReheat = 0x01 kHeatingOnly = 0x02 @@ -28282,17 +28326,41 @@ class ThermostatControlSequence(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 6, - class ThermostatRunningMode(MatterIntEnum): - kOff = 0x00 - kCool = 0x03 - kHeat = 0x04 + class SetpointChangeSourceEnum(MatterIntEnum): + kManual = 0x00 + kSchedule = 0x01 + kExternal = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 3, - class ThermostatSystemMode(MatterIntEnum): + class SetpointRaiseLowerModeEnum(MatterIntEnum): + kHeat = 0x00 + kCool = 0x01 + kBoth = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class StartOfWeekEnum(MatterIntEnum): + kSunday = 0x00 + kMonday = 0x01 + kTuesday = 0x02 + kWednesday = 0x03 + kThursday = 0x04 + kFriday = 0x05 + kSaturday = 0x06 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 7, + + class SystemModeEnum(MatterIntEnum): kOff = 0x00 kAuto = 0x01 kCool = 0x03 @@ -28308,16 +28376,32 @@ class ThermostatSystemMode(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, + class TemperatureSetpointHoldEnum(MatterIntEnum): + kSetpointHoldOff = 0x00 + kSetpointHoldOn = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, + + class ThermostatRunningModeEnum(MatterIntEnum): + kOff = 0x00 + kCool = 0x03 + kHeat = 0x04 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, + class Bitmaps: - class DayOfWeek(IntFlag): - kSunday = 0x1 - kMonday = 0x2 - kTuesday = 0x4 - kWednesday = 0x8 - kThursday = 0x10 - kFriday = 0x20 - kSaturday = 0x40 - kAway = 0x80 + class ACErrorCodeBitmap(IntFlag): + kCompressorFail = 0x1 + kRoomSensorFail = 0x2 + kOutdoorSensorFail = 0x4 + kCoilSensorFail = 0x8 + kFanFail = 0x10 class Feature(IntFlag): kHeating = 0x1 @@ -28328,13 +28412,48 @@ class Feature(IntFlag): kAutoMode = 0x20 kLocalTemperatureNotExposed = 0x40 - class ModeForSequence(IntFlag): + class HVACSystemTypeBitmap(IntFlag): + kCoolingStage = 0x3 + kHeatingStage = 0xC + kHeatingIsHeatPump = 0x10 + kHeatingUsesFuel = 0x20 + + class ProgrammingOperationModeBitmap(IntFlag): + kScheduleActive = 0x1 + kAutoRecovery = 0x2 + kEconomy = 0x4 + + class RelayStateBitmap(IntFlag): + kHeat = 0x1 + kCool = 0x2 + kFan = 0x4 + kHeatStage2 = 0x8 + kCoolStage2 = 0x10 + kFanStage2 = 0x20 + kFanStage3 = 0x40 + + class RemoteSensingBitmap(IntFlag): + kLocalTemperature = 0x1 + kOutdoorTemperature = 0x2 + kOccupancy = 0x4 + + class ScheduleDayOfWeekBitmap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + kAway = 0x80 + + class ScheduleModeBitmap(IntFlag): kHeatSetpointPresent = 0x1 kCoolSetpointPresent = 0x2 class Structs: @dataclass - class ThermostatScheduleTransition(ClusterObject): + class WeeklyScheduleTransitionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -28360,11 +28479,11 @@ class SetpointRaiseLower(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointAdjustMode), + ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointRaiseLowerModeEnum), ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), ]) - mode: 'Thermostat.Enums.SetpointAdjustMode' = 0 + mode: 'Thermostat.Enums.SetpointRaiseLowerModeEnum' = 0 amount: 'int' = 0 @dataclass @@ -28381,13 +28500,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.ThermostatScheduleTransition]), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) numberOfTransitionsForSequence: 'uint' = 0 dayOfWeekForSequence: 'uint' = 0 modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.ThermostatScheduleTransition]' = field(default_factory=lambda: []) + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @dataclass class SetWeeklySchedule(ClusterCommand): @@ -28403,13 +28522,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.ThermostatScheduleTransition]), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) numberOfTransitionsForSequence: 'uint' = 0 dayOfWeekForSequence: 'uint' = 0 modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.ThermostatScheduleTransition]' = field(default_factory=lambda: []) + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @dataclass class GetWeeklySchedule(ClusterCommand): @@ -28791,9 +28910,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ThermostatControlSequence) + return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ControlSequenceOfOperationEnum) - value: 'Thermostat.Enums.ThermostatControlSequence' = 0 + value: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = 0 @dataclass class SystemMode(ClusterAttributeDescriptor): @@ -28807,9 +28926,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.SystemModeEnum) - value: 'uint' = 0 + value: 'Thermostat.Enums.SystemModeEnum' = 0 @dataclass class ThermostatRunningMode(ClusterAttributeDescriptor): @@ -28823,9 +28942,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None @dataclass class StartOfWeek(ClusterAttributeDescriptor): @@ -28839,9 +28958,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None @dataclass class NumberOfWeeklyTransitions(ClusterAttributeDescriptor): @@ -28887,9 +29006,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None @dataclass class TemperatureSetpointHoldDuration(ClusterAttributeDescriptor): @@ -28951,9 +29070,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None @dataclass class SetpointChangeAmount(ClusterAttributeDescriptor): @@ -29111,9 +29230,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None @dataclass class ACCapacity(ClusterAttributeDescriptor): @@ -29143,9 +29262,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None @dataclass class ACCompressorType(ClusterAttributeDescriptor): @@ -29159,9 +29278,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None @dataclass class ACErrorCode(ClusterAttributeDescriptor): @@ -29191,9 +29310,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None @dataclass class ACCoilTemperature(ClusterAttributeDescriptor): @@ -29223,9 +29342,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/crypto/SessionKeystore.h b/src/crypto/SessionKeystore.h index dbf0ea3996bfe2..b5d1a26e30e6a9 100644 --- a/src/crypto/SessionKeystore.h +++ b/src/crypto/SessionKeystore.h @@ -29,12 +29,20 @@ namespace Crypto { * The session keystore interface provides an abstraction that allows the application to store * session keys in a secure environment. It uses the concept of key handles that isolate the * application from the actual key material. + * + * @note Refactor has begun to refactor this API into two disctinct APIs : SymmetrycKeyStore & SessionKeyDerivation + * Work has not been completed so the SessionKeystore has APIs that shouldn't go together for the time being + * The SessionKeystore APIs are split into two sections, one for each futur API. */ class SessionKeystore { public: virtual ~SessionKeystore() {} + /**************************** + * SymmetricKeyStore APIs + *****************************/ + /** * @brief Import raw key material and return a key handle for a key that be used to do AES 128 encryption. * @@ -59,6 +67,18 @@ class SessionKeystore */ virtual CHIP_ERROR CreateKey(const Symmetric128BitsKeyByteArray & keyMaterial, Hmac128KeyHandle & key) = 0; + /** + * @brief Destroy key. + * + * The method can take an uninitialized handle in which case it is a no-op. + * As a result of calling this method, the handle is put in the uninitialized state. + */ + virtual void DestroyKey(Symmetric128BitsKeyHandle & key) = 0; + + /**************************** + * SessionKeyDerivation APIs + *****************************/ + /** * @brief Derive key from a shared secret. * @@ -83,14 +103,6 @@ class SessionKeystore virtual CHIP_ERROR DeriveSessionKeys(const ByteSpan & secret, const ByteSpan & salt, const ByteSpan & info, Aes128KeyHandle & i2rKey, Aes128KeyHandle & r2iKey, AttestationChallenge & attestationChallenge) = 0; - - /** - * @brief Destroy key. - * - * The method can take an uninitialized handle in which case it is a no-op. - * As a result of calling this method, the handle is put in the uninitialized state. - */ - virtual void DestroyKey(Symmetric128BitsKeyHandle & key) = 0; }; /** diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 46b8a46e08f0ac..23672a12d84896 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -3223,8 +3223,16 @@ Thermostat: - SetpointAdjustMode - ThermostatControlSequence - - ThermostatRunningMode - - ThermostatSystemMode + # ThermostatRunningModeEnum was originally named + # ThermostatRunningMode, but we generate the same API for the + # names with/without "Enum" at the end, so the name can just + # change here. + - ThermostatRunningModeEnum + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + - SystemModeEnum FanControl: - FanModeSequenceType - FanModeType @@ -3935,11 +3943,19 @@ - HeatingWithReheat - CoolingAndHeating - CoolingAndHeatingWithReheat - ThermostatRunningMode: + # ThermostatRunningModeEnum was originally named + # ThermostatRunningMode, but we generate the same API for the + # names with/without "Enum" at the end, so the name can just + # change here. + ThermostatRunningModeEnum: - Off - Cool - Heat - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: - Off - Auto - Cool @@ -5899,7 +5915,11 @@ ParameterEnum: - Video Thermostat: - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: - EmergencyHeat - Dry - Sleep @@ -6319,7 +6339,11 @@ - PIXELS - PERCENTAGE Thermostat: - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: - EmergencyHeating SetpointAdjustMode: - HeatSetpoint @@ -6715,7 +6739,11 @@ Pixels: PIXELS Percentage: PERCENTAGE Thermostat: - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: EmergencyHeat: EmergencyHeating SetpointAdjustMode: Heat: HeatSetpoint @@ -7839,6 +7867,8 @@ RVCCleanMode: - ModeTagStruct - ModeOptionStruct + Thermostat: + - WeeklyScheduleTransitionStruct struct fields: RVCOperationalState: OperationalStateStruct: @@ -7864,6 +7894,11 @@ - label - mode - modeTags + Thermostat: + WeeklyScheduleTransitionStruct: + - transitionTime + - heatSetpoint + - coolSetpoint events: RVCOperationalState: - OperationalError @@ -7897,6 +7932,9 @@ RVCCleanMode: - ModeTag - StatusCode + Thermostat: + - ControlSequenceOfOperationEnum + - SetpointRaiseLowerModeEnum enum values: ContentLauncher: StatusEnum: @@ -8043,6 +8081,18 @@ - Mop StatusCode: - CleaningInProgress + Thermostat: + ControlSequenceOfOperationEnum: + - CoolingOnly + - CoolingWithReheat + - HeatingOnly + - HeatingWithReheat + - CoolingAndHeating + - CoolingAndHeatingWithReheat + SetpointRaiseLowerModeEnum: + - Heat + - Cool + - Both bitmaps: Scenes: - CopyModeBitmap @@ -8056,6 +8106,9 @@ - Feature RVCCleanMode: - Feature + Thermostat: + - ScheduleDayOfWeekBitmap + - ScheduleModeBitmap bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: @@ -8083,7 +8136,23 @@ RVCCleanMode: Feature: - OnOff + Thermostat: + ScheduleDayOfWeekBitmap: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Away + ScheduleModeBitmap: + - HeatSetpointPresent + - CoolSetpointPresent deprecated: + structs: + Thermostat: + - ThermostatScheduleTransition event fields: WiFiNetworkDiagnostics: AssociationFailure: @@ -8093,6 +8162,9 @@ - ContentLaunchStatusEnum KeypadInput: - CecKeyCode + Thermostat: + - ThermostatControlSequence + - SetpointAdjustMode enum values: FanControl: FanModeSequenceEnum: @@ -8105,6 +8177,9 @@ - SupportedStreamingProtocol LevelControl: - LevelControlOptions + Thermostat: + - DayOfWeek + - ModeForSequence bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: @@ -8246,6 +8321,16 @@ # Targeting Spring 2024 Matter release - TargetUpdated enums: + Thermostat: + # Targeting Spring 2024 Matter release + - StartOfWeekEnum + - TemperatureSetpointHoldEnum + - ACCapacityFormatEnum + - ACCompressorTypeEnum + - ACLouverPositionEnum + - ACRefrigerantTypeEnum + - ACTypeEnum + - SetpointChangeSourceEnum Channel: # Targeting Spring 2024 Matter release - ChannelTypeEnum @@ -8277,6 +8362,13 @@ Scenes: # Targeting Spring 2024 Matter release - NameSupportBitmap + Thermostat: + # Targeting Spring 2024 Matter release + - ACErrorCodeBitmap + - HVACSystemTypeBitmap + - ProgrammingOperationModeBitmap + - RelayStateBitmap + - RemoteSensingBitmap Channel: # Targeting Spring 2024 Matter release - RecordingFlagBitmap @@ -8311,6 +8403,9 @@ - TextTracks - AudioTracks renames: + structs: + Thermostat: + WeeklyScheduleTransitionStruct: ThermostatScheduleTransition event fields: WiFiNetworkDiagnostics: AssociationFailure: @@ -8320,6 +8415,9 @@ StatusEnum: ContentLaunchStatusEnum KeypadInput: CECKeyCodeEnum: CecKeyCode + Thermostat: + ControlSequenceOfOperationEnum: ThermostatControlSequence + SetpointRaiseLowerModeEnum: SetpointAdjustMode enum values: ContentLauncher: # The URLNotAvailable value got renamed at the same time @@ -8345,6 +8443,9 @@ SupportedProtocolsBitmap: SupportedStreamingProtocol LevelControl: OptionsBitmap: LevelControlOptions + Thermostat: + ScheduleDayOfWeekBitmap: DayOfWeek + ScheduleModeBitmap: ModeForSequence bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 0c496ccb3e2eec..068658d831aeac 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9944,7 +9944,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::ControlSequenceOfOperation::Id: { @@ -9966,7 +9966,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ThermostatRunningMode::Id: { @@ -9977,7 +9977,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::StartOfWeek::Id: { @@ -9988,7 +9988,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::NumberOfWeeklyTransitions::Id: { @@ -10021,7 +10021,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::TemperatureSetpointHoldDuration::Id: { @@ -10047,7 +10047,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::ThermostatRunningState::Id: { @@ -10058,7 +10058,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } case Attributes::SetpointChangeSource::Id: { @@ -10069,7 +10069,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::SetpointChangeAmount::Id: { @@ -10207,7 +10207,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCapacity::Id: { @@ -10229,7 +10229,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCompressorType::Id: { @@ -10240,7 +10240,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACErrorCode::Id: { @@ -10251,7 +10251,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } case Attributes::ACLouverPosition::Id: { @@ -10262,7 +10262,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCoilTemperature::Id: { @@ -10288,7 +10288,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } default: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 0ff039c1057447..1db156e4c1428c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17573,29 +17573,108 @@ typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatus) { MTRPumpConfigurationAndControlPumpStatusRemoteTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x100, } MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmap", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { - MTRThermostatSetpointAdjustModeHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRThermostatSetpointAdjustModeCool MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRThermostatSetpointAdjustModeBoth MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRThermostatACCapacityFormat) { + MTRThermostatACCapacityFormatBTUh MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACCompressorType) { + MTRThermostatACCompressorTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACCompressorTypeT1 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACCompressorTypeT2 MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACCompressorTypeT3 MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACLouverPosition) { + MTRThermostatACLouverPositionClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACLouverPositionOpen MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACLouverPositionQuarter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACLouverPositionHalf MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatACLouverPositionThreeQuarters MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACRefrigerantType) { + MTRThermostatACRefrigerantTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACRefrigerantTypeR22 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACRefrigerantTypeR410a MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACRefrigerantTypeR407c MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACType) { + MTRThermostatACTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACTypeCoolingFixed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACTypeHeatPumpFixed MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACTypeCoolingInverter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACTypeHeatPumpInverter MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatControlSequenceOfOperation) { + MTRThermostatControlSequenceOfOperationCoolingOnly MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatControlSequenceOfOperationHeatingOnly MTR_NEWLY_AVAILABLE = 0x02, + MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_NEWLY_AVAILABLE = 0x03, + MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_NEWLY_AVAILABLE = 0x04, + MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { - MTRThermostatControlSequenceCoolingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatControlSequenceCoolingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThermostatControlSequenceHeatingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRThermostatControlSequenceHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatControlSequenceCoolingAndHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRThermostatControlSequenceCoolingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingOnly") + = 0x00, + MTRThermostatControlSequenceCoolingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingWithReheat") + = 0x01, + MTRThermostatControlSequenceHeatingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingOnly") + = 0x02, + MTRThermostatControlSequenceHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingWithReheat") + = 0x03, + MTRThermostatControlSequenceCoolingAndHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeating") + = 0x04, + MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat") + = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperation"); -typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { - MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { + MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatSetpointChangeSourceSchedule MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatSetpointChangeSourceExternal MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatSetpointRaiseLowerMode) { + MTRThermostatSetpointRaiseLowerModeHeat MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatSetpointRaiseLowerModeCool MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatSetpointRaiseLowerModeBoth MTR_NEWLY_AVAILABLE = 0x02, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { + MTRThermostatSetpointAdjustModeHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat") + = 0x00, + MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRThermostatSetpointAdjustModeCool MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool") + = 0x01, + MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRThermostatSetpointAdjustModeBoth MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth") + = 0x02, + MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerMode"); + +typedef NS_ENUM(uint8_t, MTRThermostatStartOfWeek) { + MTRThermostatStartOfWeekSunday MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatStartOfWeekMonday MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatStartOfWeekTuesday MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatStartOfWeekWednesday MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatStartOfWeekThursday MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatStartOfWeekFriday MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatStartOfWeekSaturday MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, @@ -17610,18 +17689,25 @@ typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeSleep MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { - MTRThermostatDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRThermostatDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRThermostatDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRThermostatDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRThermostatDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRThermostatDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRThermostatDayOfWeekAway MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x80, - MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatDayOfWeekAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +typedef NS_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { + MTRThermostatTemperatureSetpointHoldSetpointHoldOff MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatTemperatureSetpointHoldSetpointHoldOn MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { + MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRThermostatACErrorCodeBitmap) { + MTRThermostatACErrorCodeBitmapCompressorFail MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatACErrorCodeBitmapRoomSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatACErrorCodeBitmapOutdoorSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatACErrorCodeBitmapCoilSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatACErrorCodeBitmapFanFail MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRThermostatFeatureCooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, @@ -17634,12 +17720,91 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureLocalTemperatureNotExposed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { + MTRThermostatHVACSystemTypeBitmapCoolingStage MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRThermostatHVACSystemTypeBitmapHeatingStage MTR_PROVISIONALLY_AVAILABLE = 0xC, + MTRThermostatHVACSystemTypeBitmapHeatingIsHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatHVACSystemTypeBitmapHeatingUsesFuel MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatProgrammingOperationModeBitmap) { + MTRThermostatProgrammingOperationModeBitmapScheduleActive MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatProgrammingOperationModeBitmapAutoRecovery MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatProgrammingOperationModeBitmapEconomy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRThermostatRelayStateBitmap) { + MTRThermostatRelayStateBitmapHeat MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRelayStateBitmapCool MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRelayStateBitmapFan MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatRelayStateBitmapHeatStage2 MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatRelayStateBitmapCoolStage2 MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatRelayStateBitmapFanStage2 MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRThermostatRelayStateBitmapFanStage3 MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatRemoteSensingBitmap) { + MTRThermostatRemoteSensingBitmapLocalTemperature MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRemoteSensingBitmapOutdoorTemperature MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRemoteSensingBitmapOccupancy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleDayOfWeekBitmap) { + MTRThermostatScheduleDayOfWeekBitmapSunday MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatScheduleDayOfWeekBitmapMonday MTR_NEWLY_AVAILABLE = 0x2, + MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_NEWLY_AVAILABLE = 0x4, + MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_NEWLY_AVAILABLE = 0x8, + MTRThermostatScheduleDayOfWeekBitmapThursday MTR_NEWLY_AVAILABLE = 0x10, + MTRThermostatScheduleDayOfWeekBitmapFriday MTR_NEWLY_AVAILABLE = 0x20, + MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_NEWLY_AVAILABLE = 0x40, + MTRThermostatScheduleDayOfWeekBitmapAway MTR_NEWLY_AVAILABLE = 0x80, +} MTR_NEWLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { + MTRThermostatDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSunday") + = 0x1, + MTRThermostatDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapMonday") + = 0x2, + MTRThermostatDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapTuesday") + = 0x4, + MTRThermostatDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapWednesday") + = 0x8, + MTRThermostatDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapThursday") + = 0x10, + MTRThermostatDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapFriday") + = 0x20, + MTRThermostatDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSaturday") + = 0x40, + MTRThermostatDayOfWeekAway MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway") + = 0x80, + MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmap"); + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleModeBitmap) { + MTRThermostatScheduleModeBitmapHeatSetpointPresent MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { - MTRThermostatModeForSequenceHeatSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatModeForSequenceHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRThermostatModeForSequenceCoolSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatModeForSequenceCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRThermostatModeForSequenceHeatSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent") + = 0x1, + MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRThermostatModeForSequenceCoolSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent") + = 0x2, + MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmap"); typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { MTRFanControlAirflowDirectionForward MTR_PROVISIONALLY_AVAILABLE = 0x00, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 49ea2821d06254..447b836708be5c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -64216,7 +64216,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:( ListFreer listFreer; using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64344,7 +64344,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTR ListFreer listFreer; using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64552,7 +64552,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu ListFreer listFreer; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64685,7 +64685,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65239,7 +65239,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWrit ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65367,7 +65367,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value para ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65431,7 +65431,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65495,7 +65495,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MT ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = static_cast>(value.unsignedIntValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65559,7 +65559,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65659,7 +65659,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 222f8213226deb..319c22ab6ecc41 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -20941,8 +20941,8 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermost auto iter_0 = decodableStruct.transitions.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; if (entry_0.heatSetpoint.IsNull()) { newElement_0.heatSetpoint = nil; @@ -21034,11 +21034,11 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < self.transitions.count; ++i_0) { - if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { + if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterWeeklyScheduleTransitionStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) self.transitions[i_0]; + auto element_0 = (MTRThermostatClusterWeeklyScheduleTransitionStruct *) self.transitions[i_0]; listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; if (element_0.heatSetpoint == nil) { listHolder_0->mList[i_0].heatSetpoint.SetNull(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index f66c4b1c35f391..69fe111006c2a4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1402,11 +1402,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject @end +MTR_NEWLY_AVAILABLE +@interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_NEWLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterThermostatScheduleTransition : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct") +@interface MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); @end MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 1abf92201f66ab..28d308386a5828 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -5855,7 +5855,7 @@ - (NSString *)description @end -@implementation MTRThermostatClusterThermostatScheduleTransition +@implementation MTRThermostatClusterWeeklyScheduleTransitionStruct - (instancetype)init { if (self = [super init]) { @@ -5871,7 +5871,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; + auto other = [[MTRThermostatClusterWeeklyScheduleTransitionStruct alloc] init]; other.transitionTime = self.transitionTime; other.heatSetpoint = self.heatSetpoint; @@ -5888,6 +5888,12 @@ - (NSString *)description @end +@implementation MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@dynamic transitionTime; +@dynamic heatSetpoint; +@dynamic coolSetpoint; +@end + @implementation MTRChannelClusterProgramCastStruct - (instancetype)init { diff --git a/src/messaging/tests/MessagingContext.h b/src/messaging/tests/MessagingContext.h index ed6ead5d2da3ae..a6a6d34fa1c36c 100644 --- a/src/messaging/tests/MessagingContext.h +++ b/src/messaging/tests/MessagingContext.h @@ -208,35 +208,61 @@ class LoopbackMessagingContext : public LoopbackTransportManager, public Messagi public: virtual ~LoopbackMessagingContext() {} - /// Initialize the underlying layers. - virtual CHIP_ERROR Init() + // Performs shared setup for all tests in the test suite + virtual CHIP_ERROR SetUpTestSuite() { - ReturnErrorOnFailure(chip::Platform::MemoryInit()); - ReturnErrorOnFailure(LoopbackTransportManager::Init()); - ReturnErrorOnFailure(MessagingContext::Init(&GetTransportMgr(), &GetIOContext())); - return CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrExit((err = chip::Platform::MemoryInit()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init CHIP memory failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = LoopbackTransportManager::Init()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init LoopbackTransportManager failed: %" CHIP_ERROR_FORMAT, err.Format())); + exit: + return err; } - // Shutdown all layers, finalize operations - virtual void Shutdown() + // Performs shared teardown for all tests in the test suite + virtual void TearDownTestSuite() { - MessagingContext::Shutdown(); LoopbackTransportManager::Shutdown(); chip::Platform::MemoryShutdown(); } - // Init/Shutdown Helpers that can be used directly as the nlTestSuite - // initialize/finalize function. - static int Initialize(void * context) + // Performs setup for each individual test in the test suite + virtual CHIP_ERROR SetUp() + { + CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrExit((err = MessagingContext::Init(&GetTransportMgr(), &GetIOContext())) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init MessagingContext failed: %" CHIP_ERROR_FORMAT, err.Format())); + exit: + return err; + } + + // Performs teardown for each individual test in the test suite + virtual void TearDown() { MessagingContext::Shutdown(); } + + // Helpers that can be used directly by the nlTestSuite + + static int nlTestSetUpTestSuite(void * context) + { + auto err = static_cast(context)->SetUpTestSuite(); + return err == CHIP_NO_ERROR ? SUCCESS : FAILURE; + } + + static int nlTestTearDownTestSuite(void * context) + { + static_cast(context)->TearDownTestSuite(); + return SUCCESS; + } + + static int nlTestSetUp(void * context) { - auto * ctx = static_cast(context); - return ctx->Init() == CHIP_NO_ERROR ? SUCCESS : FAILURE; + auto err = static_cast(context)->SetUp(); + return err == CHIP_NO_ERROR ? SUCCESS : FAILURE; } - static int Finalize(void * context) + static int nlTestTearDown(void * context) { - auto * ctx = static_cast(context); - ctx->Shutdown(); + static_cast(context)->TearDown(); return SUCCESS; } @@ -249,35 +275,61 @@ class UDPMessagingContext : public UDPTransportManager, public MessagingContext public: virtual ~UDPMessagingContext() {} - /// Initialize the underlying layers. - virtual CHIP_ERROR Init() + // Performs shared setup for all tests in the test suite + virtual CHIP_ERROR SetUpTestSuite() { - ReturnErrorOnFailure(chip::Platform::MemoryInit()); - ReturnErrorOnFailure(UDPTransportManager::Init()); - ReturnErrorOnFailure(MessagingContext::Init(&GetTransportMgr(), &GetIOContext())); - return CHIP_NO_ERROR; + CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrExit((err = chip::Platform::MemoryInit()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init CHIP memory failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = UDPTransportManager::Init()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init UDPTransportManager failed: %" CHIP_ERROR_FORMAT, err.Format())); + exit: + return err; } - // Shutdown all layers, finalize operations - virtual void Shutdown() + // Performs shared teardown for all tests in the test suite + virtual void TearDownTestSuite() { - MessagingContext::Shutdown(); UDPTransportManager::Shutdown(); chip::Platform::MemoryShutdown(); } - // Init/Shutdown Helpers that can be used directly as the nlTestSuite - // initialize/finalize function. - static int Initialize(void * context) + // Performs setup for each individual test in the test suite + virtual CHIP_ERROR SetUp() + { + CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrExit((err = MessagingContext::Init(&GetTransportMgr(), &GetIOContext())) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init MessagingContext failed: %" CHIP_ERROR_FORMAT, err.Format())); + exit: + return err; + } + + // Performs teardown for each individual test in the test suite + virtual void TearDown() { MessagingContext::Shutdown(); } + + // Helpers that can be used directly by the nlTestSuite + + static int nlTestSetUpTestSuite(void * context) + { + auto err = static_cast(context)->SetUpTestSuite(); + return err == CHIP_NO_ERROR ? SUCCESS : FAILURE; + } + + static int nlTestTearDownTestSuite(void * context) + { + static_cast(context)->TearDownTestSuite(); + return SUCCESS; + } + + static int nlTestSetUp(void * context) { - auto * ctx = static_cast(context); - return ctx->Init() == CHIP_NO_ERROR ? SUCCESS : FAILURE; + auto err = static_cast(context)->SetUp(); + return err == CHIP_NO_ERROR ? SUCCESS : FAILURE; } - static int Finalize(void * context) + static int nlTestTearDown(void * context) { - auto * ctx = static_cast(context); - ctx->Shutdown(); + static_cast(context)->TearDown(); return SUCCESS; } diff --git a/src/messaging/tests/TestAbortExchangesForFabric.cpp b/src/messaging/tests/TestAbortExchangesForFabric.cpp index 5354ee4cbde781..4c2d682441ab82 100644 --- a/src/messaging/tests/TestAbortExchangesForFabric.cpp +++ b/src/messaging/tests/TestAbortExchangesForFabric.cpp @@ -258,12 +258,16 @@ const nlTest sTests[] = { NL_TEST_SENTINEL(), }; +// clang-format off nlTestSuite sSuite = { "Test-AbortExchangesForFabric", &sTests[0], - TestContext::Initialize, - TestContext::Finalize, + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; +// clang-format on } // namespace diff --git a/src/messaging/tests/TestExchangeHolder.cpp b/src/messaging/tests/TestExchangeHolder.cpp index 611e2039b886b5..9325350d262e1b 100644 --- a/src/messaging/tests/TestExchangeHolder.cpp +++ b/src/messaging/tests/TestExchangeHolder.cpp @@ -821,8 +821,10 @@ nlTestSuite sSuite = { "Test-TestExchangeHolder", &sTests[0], - TestContext::Initialize, - TestContext::Finalize + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; // clang-format on diff --git a/src/messaging/tests/TestExchangeMgr.cpp b/src/messaging/tests/TestExchangeMgr.cpp index b3fbba2f1b98bc..69e1fbaa8f9afa 100644 --- a/src/messaging/tests/TestExchangeMgr.cpp +++ b/src/messaging/tests/TestExchangeMgr.cpp @@ -285,8 +285,10 @@ nlTestSuite sSuite = { "Test-CHIP-ExchangeManager", &sTests[0], - TestContext::Initialize, - TestContext::Finalize + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; // clang-format on diff --git a/src/messaging/tests/TestMessagingLayer.cpp b/src/messaging/tests/TestMessagingLayer.cpp index 7e0285d6f27170..2c05c067989e42 100644 --- a/src/messaging/tests/TestMessagingLayer.cpp +++ b/src/messaging/tests/TestMessagingLayer.cpp @@ -162,8 +162,10 @@ nlTestSuite sSuite = { "Test-CHIP-MessagingLayer", &sTests[0], - TestContext::Initialize, - TestContext::Finalize + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; // clang-format on diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 8c8443fd81d59e..db5dc144b0c2ae 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -58,8 +58,6 @@ using namespace chip::Messaging; using namespace chip::Protocols; using namespace chip::System::Clock::Literals; -using TestContext = Test::LoopbackMessagingContext; - const char PAYLOAD[] = "Hello!"; // The CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST can be set to non-zero value @@ -70,6 +68,19 @@ const char PAYLOAD[] = "Hello!"; // CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST for more details. constexpr auto retryBoosterTimeout = CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS * CHIP_CONFIG_MRP_RETRY_INTERVAL_SENDER_BOOST; +class TestContext : public chip::Test::LoopbackMessagingContext +{ +public: + // Performs setup for each individual test in the test suite + CHIP_ERROR SetUp() override + { + ReturnErrorOnFailure(chip::Test::LoopbackMessagingContext::SetUp()); + GetSessionAliceToBob()->AsSecureSession()->SetRemoteSessionParameters(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); + GetSessionBobToAlice()->AsSecureSession()->SetRemoteSessionParameters(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); + return CHIP_NO_ERROR; + } +}; + class MockAppDelegate : public UnsolicitedMessageHandler, public ExchangeDelegate { public: @@ -326,7 +337,6 @@ class TestReliableMessageProtocol static void CheckGetBackoff(nlTestSuite * inSuite, void * inContext); static void CheckApplicationResponseDelayed(nlTestSuite * inSuite, void * inContext); static void CheckApplicationResponseNeverComes(nlTestSuite * inSuite, void * inContext); - static int InitializeTestCase(void * inContext); }; void TestReliableMessageProtocol::CheckAddClearRetrans(nlTestSuite * inSuite, void * inContext) @@ -2134,14 +2144,6 @@ void TestReliableMessageProtocol::CheckApplicationResponseNeverComes(nlTestSuite NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); } -int TestReliableMessageProtocol::InitializeTestCase(void * inContext) -{ - TestContext & ctx = *static_cast(inContext); - ctx.GetSessionAliceToBob()->AsSecureSession()->SetRemoteSessionParameters(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); - ctx.GetSessionBobToAlice()->AsSecureSession()->SetRemoteSessionParameters(GetLocalMRPConfig().ValueOr(GetDefaultMRPConfig())); - return SUCCESS; -} - /** * TODO: A test that we should have but can't write with the existing * infrastructure we have: @@ -2203,9 +2205,10 @@ const nlTest sTests[] = { nlTestSuite sSuite = { "Test-CHIP-ReliableMessageProtocol", &sTests[0], - TestContext::Initialize, - TestContext::Finalize, - TestReliableMessageProtocol::InitializeTestCase, + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; // clang-format on diff --git a/src/protocols/secure_channel/tests/TestCASESession.cpp b/src/protocols/secure_channel/tests/TestCASESession.cpp index b4e090d3eb6b93..e72da8af1cbad7 100644 --- a/src/protocols/secure_channel/tests/TestCASESession.cpp +++ b/src/protocols/secure_channel/tests/TestCASESession.cpp @@ -53,11 +53,18 @@ using namespace chip::Transport; using namespace chip::Messaging; using namespace chip::Protocols; -using TestContext = Test::LoopbackMessagingContext; - namespace chip { namespace { +class TestContext : public Test::LoopbackMessagingContext +{ +public: + // Performs shared setup for all tests in the test suite + CHIP_ERROR SetUpTestSuite() override; + // Performs shared teardown for all tests in the test suite + void TearDownTestSuite() override; +}; + void ServiceEvents(TestContext & ctx) { // Takes a few rounds of this because handling IO messages may schedule work, @@ -155,6 +162,11 @@ class TestOperationalKeystore : public chip::Crypto::OperationalKeystore mSingleFabricIndex = fabricIndex; mKeypair = std::move(keypair); } + void Shutdown() + { + mSingleFabricIndex = kUndefinedFabricIndex; + mKeypair = nullptr; + } bool HasPendingOpKeypair() const override { return false; } bool HasOpKeypairForFabric(FabricIndex fabricIndex) const override { return mSingleFabricIndex != kUndefinedFabricIndex; } @@ -215,6 +227,8 @@ Crypto::DefaultSessionKeystore gDeviceSessionKeystore; Credentials::PersistentStorageOpCertStore gCommissionerOpCertStore; Credentials::PersistentStorageOpCertStore gDeviceOpCertStore; +CASEServer gPairingServer; + NodeId Node01_01 = 0xDEDEDEDE00010001; NodeId Node01_02 = 0xDEDEDEDE00010002; @@ -312,6 +326,37 @@ CHIP_ERROR InitCredentialSets() return CHIP_NO_ERROR; } +CHIP_ERROR TestContext::SetUpTestSuite() +{ + ConfigInitializeNodes(false); + CHIP_ERROR err = CHIP_NO_ERROR; + VerifyOrExit((err = LoopbackMessagingContext::SetUpTestSuite()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "SetUpTestSuite lo messaging context failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = chip::DeviceLayer::PlatformMgr().InitChipStack()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "Init CHIP stack failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = InitFabricTable(gCommissionerFabrics, &gCommissionerStorageDelegate, /* opKeyStore = */ nullptr, + &gCommissionerOpCertStore)) == CHIP_NO_ERROR, + ChipLogError(AppServer, "InitFabricTable failed: %" CHIP_ERROR_FORMAT, err.Format())); + VerifyOrExit((err = InitCredentialSets()) == CHIP_NO_ERROR, + ChipLogError(AppServer, "InitCredentialSets failed: %" CHIP_ERROR_FORMAT, err.Format())); + chip::DeviceLayer::SetSystemLayerForTesting(&GetSystemLayer()); +exit: + return err; +} + +void TestContext::TearDownTestSuite() +{ + chip::DeviceLayer::SetSystemLayerForTesting(nullptr); + gDeviceOperationalKeystore.Shutdown(); + gPairingServer.Shutdown(); + gCommissionerStorageDelegate.ClearStorage(); + gDeviceStorageDelegate.ClearStorage(); + gCommissionerFabrics.DeleteAllFabrics(); + gDeviceFabrics.DeleteAllFabrics(); + chip::DeviceLayer::PlatformMgr().Shutdown(); + LoopbackMessagingContext::TearDownTestSuite(); +} + } // anonymous namespace // Specifically for SimulateUpdateNOCInvalidatePendingEstablishment, we need it to be static so that the class below can @@ -492,8 +537,6 @@ void TestCASESession::SecurePairingHandshakeTest(nlTestSuite * inSuite, void * i SecurePairingHandshakeTestCommon(inSuite, inContext, sessionManager, pairingCommissioner, delegateCommissioner); } -CASEServer gPairingServer; - void TestCASESession::SecurePairingHandshakeServerTest(nlTestSuite * inSuite, void * inContext) { // TODO: Add cases for mismatching IPK config between initiator/responder @@ -1193,76 +1236,18 @@ static const nlTest sTests[] = }; // clang-format on -int CASE_TestSecurePairing_Setup(void * inContext); -int CASE_TestSecurePairing_Teardown(void * inContext); - // clang-format off static nlTestSuite sSuite = { "Test-CHIP-SecurePairing-CASE", &sTests[0], - CASE_TestSecurePairing_Setup, - CASE_TestSecurePairing_Teardown, + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; // clang-format on -namespace { -/* - * Set up the test suite. - */ -CHIP_ERROR CASETestSecurePairingSetup(void * inContext) -{ - TestContext & ctx = *reinterpret_cast(inContext); - - ctx.ConfigInitializeNodes(false); - ReturnErrorOnFailure(ctx.Init()); - - ReturnErrorOnFailure(InitFabricTable(gCommissionerFabrics, &gCommissionerStorageDelegate, /* opKeyStore = */ nullptr, - &gCommissionerOpCertStore)); - - return InitCredentialSets(); -} -} // anonymous namespace - -/** - * Set up the test suite. - */ -int CASE_TestSecurePairing_Setup(void * inContext) -{ - chip::Platform::MemoryInit(); - - chip::DeviceLayer::PlatformMgr().InitChipStack(); - - CHIP_ERROR err = CASETestSecurePairingSetup(inContext); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Support, "Failed to init tests %" CHIP_ERROR_FORMAT, err.Format()); - return FAILURE; - } - - TestContext & ctx = *reinterpret_cast(inContext); - chip::DeviceLayer::SetSystemLayerForTesting(&ctx.GetSystemLayer()); - - return SUCCESS; -} - -/** - * Tear down the test suite. - */ -int CASE_TestSecurePairing_Teardown(void * inContext) -{ - chip::DeviceLayer::SetSystemLayerForTesting(nullptr); - - gPairingServer.Shutdown(); - gCommissionerStorageDelegate.ClearStorage(); - gDeviceStorageDelegate.ClearStorage(); - gCommissionerFabrics.DeleteAllFabrics(); - gDeviceFabrics.DeleteAllFabrics(); - static_cast(inContext)->Shutdown(); - chip::DeviceLayer::PlatformMgr().Shutdown(); - return SUCCESS; -} - /** * Main */ diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index c7c350fc3c80df..01e987d425446b 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -83,6 +83,17 @@ constexpr Spake2pVerifierSerialized sTestSpake2p01_SerializedVerifier = { 0xB7, 0xC0, 0x7F, 0xCC, 0x06, 0x27, 0xA1, 0xB8, 0x57, 0x3A, 0x14, 0x9F, 0xCD, 0x1F, 0xA4, 0x66, 0xCF }; +class TestContext : public chip::Test::LoopbackMessagingContext +{ +public: + // Performs shared setup for all tests in the test suite + CHIP_ERROR SetUpTestSuite() override + { + ConfigInitializeNodes(false); + return chip::Test::LoopbackMessagingContext::SetUpTestSuite(); + } +}; + class PASETestLoopbackTransportDelegate : public Test::LoopbackTransportDelegate { public: @@ -90,8 +101,6 @@ class PASETestLoopbackTransportDelegate : public Test::LoopbackTransportDelegate bool mMessageDropped = false; }; -using TestContext = chip::Test::LoopbackMessagingContext; - class TestSecurePairingDelegate : public SessionEstablishmentDelegate { public: @@ -509,62 +518,31 @@ void PASEVerifierSerializeTest(nlTestSuite * inSuite, void * inContext) // Test Suite -/** - * Test Suite that lists all the test functions. - */ -// clang-format off -static const nlTest sTests[] = -{ - NL_TEST_DEF("WaitInit", SecurePairingWaitTest), - NL_TEST_DEF("Start", SecurePairingStartTest), - NL_TEST_DEF("Handshake", SecurePairingHandshakeTest), +static const nlTest sTests[] = { + NL_TEST_DEF("WaitInit", SecurePairingWaitTest), + NL_TEST_DEF("Start", SecurePairingStartTest), + NL_TEST_DEF("Handshake", SecurePairingHandshakeTest), NL_TEST_DEF("Handshake with Commissioner MRP Parameters", SecurePairingHandshakeWithCommissionerMRPTest), NL_TEST_DEF("Handshake with Device MRP Parameters", SecurePairingHandshakeWithDeviceMRPTest), NL_TEST_DEF("Handshake with Both MRP Parameters", SecurePairingHandshakeWithAllMRPTest), NL_TEST_DEF("Handshake with packet loss", SecurePairingHandshakeWithPacketLossTest), NL_TEST_DEF("Failed Handshake", SecurePairingFailedHandshake), NL_TEST_DEF("PASE Verifier Serialize", PASEVerifierSerializeTest), - - NL_TEST_SENTINEL() + NL_TEST_SENTINEL(), }; -int TestSecurePairing_Setup(void * inContext); -int TestSecurePairing_Teardown(void * inContext); - // clang-format off static nlTestSuite sSuite = { "Test-CHIP-SecurePairing-PASE", &sTests[0], - TestSecurePairing_Setup, - TestSecurePairing_Teardown, + TestContext::nlTestSetUpTestSuite, + TestContext::nlTestTearDownTestSuite, + TestContext::nlTestSetUp, + TestContext::nlTestTearDown, }; // clang-format on -// clang-format on -// -/** - * Set up the test suite. - */ -int TestSecurePairing_Setup(void * inContext) -{ - auto & ctx = *static_cast(inContext); - - // Initialize System memory and resources - ctx.ConfigInitializeNodes(false); - VerifyOrReturnError(TestContext::Initialize(inContext) == SUCCESS, FAILURE); - - return SUCCESS; -} - -/** - * Tear down the test suite. - */ -int TestSecurePairing_Teardown(void * inContext) -{ - return TestContext::Finalize(inContext); -} - } // anonymous namespace /** diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index a2c2c50e52c268..8a37b3770fe22c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -15425,7 +15425,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -15434,7 +15434,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -15478,7 +15478,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -15487,7 +15487,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -15559,7 +15559,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMinHeatSetpointLimit @@ -15590,7 +15590,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMaxHeatSetpointLimit @@ -15621,7 +15621,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMinCoolSetpointLimit @@ -15652,7 +15652,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMaxCoolSetpointLimit @@ -16062,9 +16062,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16076,9 +16076,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16093,9 +16093,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ControlSequenceOfOperation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16107,9 +16107,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::Th *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16124,9 +16124,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::Th namespace SystemMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16138,9 +16138,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16155,9 +16155,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ThermostatRunningMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16169,9 +16169,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16186,9 +16186,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16200,9 +16200,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16279,9 +16279,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16293,9 +16293,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16363,9 +16363,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16377,9 +16377,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16394,9 +16394,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ThermostatRunningState { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16408,9 +16408,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16425,9 +16425,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16439,9 +16439,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16889,9 +16889,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16903,9 +16903,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16951,9 +16951,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace ACRefrigerantType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16965,9 +16965,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16982,9 +16982,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACCompressorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16996,9 +16996,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17013,9 +17013,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17027,9 +17027,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17044,9 +17044,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace ACLouverPosition { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17058,9 +17058,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17102,7 +17102,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -17111,7 +17111,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -17128,9 +17128,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17142,9 +17142,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 259cc40d0c46f4..616148bb9327fa 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2806,14 +2806,14 @@ namespace Thermostat { namespace Attributes { namespace LocalTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LocalTemperature namespace OutdoorTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); @@ -2825,22 +2825,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Occupancy namespace AbsMinHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMinHeatSetpointLimit namespace AbsMaxHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMaxHeatSetpointLimit namespace AbsMinCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMinCoolSetpointLimit namespace AbsMaxCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMaxCoolSetpointLimit @@ -2910,29 +2910,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); } // namespace MinSetpointDeadBand namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // RemoteSensingBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace RemoteSensing namespace ControlSequenceOfOperation { EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ThermostatControlSequence * value); // ThermostatControlSequence -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence value); + chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value); // ControlSequenceOfOperationEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value); } // namespace ControlSequenceOfOperation namespace SystemMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value); // SystemModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value); } // namespace SystemMode namespace ThermostatRunningMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value); // ThermostatRunningModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value); } // namespace ThermostatRunningMode namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value); // StartOfWeekEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value); } // namespace StartOfWeek namespace NumberOfWeeklyTransitions { @@ -2946,8 +2948,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfDailyTransitions namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value); // TemperatureSetpointHoldEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value); } // namespace TemperatureSetpointHold namespace TemperatureSetpointHoldDuration { @@ -2958,18 +2961,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace TemperatureSetpointHoldDuration namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + chip::BitMask * value); // ProgrammingOperationModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ThermostatProgrammingOperationMode namespace ThermostatRunningState { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // RelayStateBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ThermostatRunningState namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value); // SetpointChangeSourceEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value); } // namespace SetpointChangeSource namespace SetpointChangeAmount { @@ -3032,8 +3039,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace EmergencyHeatDelta namespace ACType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value); // ACTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value); } // namespace ACType namespace ACCapacity { @@ -3042,35 +3049,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ACCapacity namespace ACRefrigerantType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value); // ACRefrigerantTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value); } // namespace ACRefrigerantType namespace ACCompressorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value); // ACCompressorTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value); } // namespace ACCompressorType namespace ACErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // ACErrorCodeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ACErrorCode namespace ACLouverPosition { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value); // ACLouverPositionEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value); } // namespace ACLouverPosition namespace ACCoilTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace ACCoilTemperature namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value); // ACCapacityFormatEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); } // namespace ACCapacityformat namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index e55aa6b0c1426d..7ef15603b1df39 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2170,22 +2170,78 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PumpConfigurationAndCon } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointAdjustMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACCapacityFormatEnum val) { - using EnumType = Thermostat::SetpointAdjustMode; + using EnumType = Thermostat::ACCapacityFormatEnum; switch (val) { - case EnumType::kHeat: - case EnumType::kCool: - case EnumType::kBoth: + case EnumType::kBTUh: return val; default: - return static_cast(3); + return static_cast(1); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACCompressorTypeEnum val) +{ + using EnumType = Thermostat::ACCompressorTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kT1: + case EnumType::kT2: + case EnumType::kT3: + return val; + default: + return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatControlSequence val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACLouverPositionEnum val) { - using EnumType = Thermostat::ThermostatControlSequence; + using EnumType = Thermostat::ACLouverPositionEnum; + switch (val) + { + case EnumType::kClosed: + case EnumType::kOpen: + case EnumType::kQuarter: + case EnumType::kHalf: + case EnumType::kThreeQuarters: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACRefrigerantTypeEnum val) +{ + using EnumType = Thermostat::ACRefrigerantTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kR22: + case EnumType::kR410a: + case EnumType::kR407c: + return val; + default: + return static_cast(4); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACTypeEnum val) +{ + using EnumType = Thermostat::ACTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kCoolingFixed: + case EnumType::kHeatPumpFixed: + case EnumType::kCoolingInverter: + case EnumType::kHeatPumpInverter: + return val; + default: + return static_cast(5); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ControlSequenceOfOperationEnum val) +{ + using EnumType = Thermostat::ControlSequenceOfOperationEnum; switch (val) { case EnumType::kCoolingOnly: @@ -2199,22 +2255,52 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatC return static_cast(6); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointChangeSourceEnum val) { - using EnumType = Thermostat::ThermostatRunningMode; + using EnumType = Thermostat::SetpointChangeSourceEnum; + switch (val) + { + case EnumType::kManual: + case EnumType::kSchedule: + case EnumType::kExternal: + return val; + default: + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointRaiseLowerModeEnum val) +{ + using EnumType = Thermostat::SetpointRaiseLowerModeEnum; switch (val) { - case EnumType::kOff: - case EnumType::kCool: case EnumType::kHeat: + case EnumType::kCool: + case EnumType::kBoth: return val; default: - return static_cast(1); + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::StartOfWeekEnum val) +{ + using EnumType = Thermostat::StartOfWeekEnum; + switch (val) + { + case EnumType::kSunday: + case EnumType::kMonday: + case EnumType::kTuesday: + case EnumType::kWednesday: + case EnumType::kThursday: + case EnumType::kFriday: + case EnumType::kSaturday: + return val; + default: + return static_cast(7); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatSystemMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SystemModeEnum val) { - using EnumType = Thermostat::ThermostatSystemMode; + using EnumType = Thermostat::SystemModeEnum; switch (val) { case EnumType::kOff: @@ -2231,6 +2317,31 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatS return static_cast(2); } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::TemperatureSetpointHoldEnum val) +{ + using EnumType = Thermostat::TemperatureSetpointHoldEnum; + switch (val) + { + case EnumType::kSetpointHoldOff: + case EnumType::kSetpointHoldOn: + return val; + default: + return static_cast(2); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningModeEnum val) +{ + using EnumType = Thermostat::ThermostatRunningModeEnum; + switch (val) + { + case EnumType::kOff: + case EnumType::kCool: + case EnumType::kHeat: + return val; + default: + return static_cast(1); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::AirflowDirectionEnum val) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index edf7ad13dc3cc8..bd815d7b2bdebe 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -3191,21 +3191,77 @@ enum class PumpStatusBitmap : uint16_t namespace Thermostat { -// Enum for SetpointAdjustMode -enum class SetpointAdjustMode : uint8_t +// Enum for ACCapacityFormatEnum +enum class ACCapacityFormatEnum : uint8_t { - kHeat = 0x00, - kCool = 0x01, - kBoth = 0x02, + kBTUh = 0x00, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 1, +}; + +// Enum for ACCompressorTypeEnum +enum class ACCompressorTypeEnum : uint8_t +{ + kUnknown = 0x00, + kT1 = 0x01, + kT2 = 0x02, + kT3 = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; + +// Enum for ACLouverPositionEnum +enum class ACLouverPositionEnum : uint8_t +{ + kClosed = 0x01, + kOpen = 0x02, + kQuarter = 0x03, + kHalf = 0x04, + kThreeQuarters = 0x05, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Enum for ACRefrigerantTypeEnum +enum class ACRefrigerantTypeEnum : uint8_t +{ + kUnknown = 0x00, + kR22 = 0x01, + kR410a = 0x02, + kR407c = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; + +// Enum for ACTypeEnum +enum class ACTypeEnum : uint8_t +{ + kUnknown = 0x00, + kCoolingFixed = 0x01, + kHeatPumpFixed = 0x02, + kCoolingInverter = 0x03, + kHeatPumpInverter = 0x04, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, }; -// Enum for ThermostatControlSequence -enum class ThermostatControlSequence : uint8_t +// Enum for ControlSequenceOfOperationEnum +enum class ControlSequenceOfOperationEnum : uint8_t { kCoolingOnly = 0x00, kCoolingWithReheat = 0x01, @@ -3220,21 +3276,51 @@ enum class ThermostatControlSequence : uint8_t kUnknownEnumValue = 6, }; -// Enum for ThermostatRunningMode -enum class ThermostatRunningMode : uint8_t +// Enum for SetpointChangeSourceEnum +enum class SetpointChangeSourceEnum : uint8_t { - kOff = 0x00, - kCool = 0x03, - kHeat = 0x04, + kManual = 0x00, + kSchedule = 0x01, + kExternal = 0x02, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 3, }; -// Enum for ThermostatSystemMode -enum class ThermostatSystemMode : uint8_t +// Enum for SetpointRaiseLowerModeEnum +enum class SetpointRaiseLowerModeEnum : uint8_t +{ + kHeat = 0x00, + kCool = 0x01, + kBoth = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +// Enum for StartOfWeekEnum +enum class StartOfWeekEnum : uint8_t +{ + kSunday = 0x00, + kMonday = 0x01, + kTuesday = 0x02, + kWednesday = 0x03, + kThursday = 0x04, + kFriday = 0x05, + kSaturday = 0x06, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 7, +}; + +// Enum for SystemModeEnum +enum class SystemModeEnum : uint8_t { kOff = 0x00, kAuto = 0x01, @@ -3252,17 +3338,39 @@ enum class ThermostatSystemMode : uint8_t kUnknownEnumValue = 2, }; -// Bitmap for DayOfWeek -enum class DayOfWeek : uint8_t +// Enum for TemperatureSetpointHoldEnum +enum class TemperatureSetpointHoldEnum : uint8_t { - kSunday = 0x1, - kMonday = 0x2, - kTuesday = 0x4, - kWednesday = 0x8, - kThursday = 0x10, - kFriday = 0x20, - kSaturday = 0x40, - kAway = 0x80, + kSetpointHoldOff = 0x00, + kSetpointHoldOn = 0x01, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, +}; + +// Enum for ThermostatRunningModeEnum +enum class ThermostatRunningModeEnum : uint8_t +{ + kOff = 0x00, + kCool = 0x03, + kHeat = 0x04, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, +}; + +// Bitmap for ACErrorCodeBitmap +enum class ACErrorCodeBitmap : uint32_t +{ + kCompressorFail = 0x1, + kRoomSensorFail = 0x2, + kOutdoorSensorFail = 0x4, + kCoilSensorFail = 0x8, + kFanFail = 0x10, }; // Bitmap for Feature @@ -3277,8 +3385,58 @@ enum class Feature : uint32_t kLocalTemperatureNotExposed = 0x40, }; -// Bitmap for ModeForSequence -enum class ModeForSequence : uint8_t +// Bitmap for HVACSystemTypeBitmap +enum class HVACSystemTypeBitmap : uint8_t +{ + kCoolingStage = 0x3, + kHeatingStage = 0xC, + kHeatingIsHeatPump = 0x10, + kHeatingUsesFuel = 0x20, +}; + +// Bitmap for ProgrammingOperationModeBitmap +enum class ProgrammingOperationModeBitmap : uint8_t +{ + kScheduleActive = 0x1, + kAutoRecovery = 0x2, + kEconomy = 0x4, +}; + +// Bitmap for RelayStateBitmap +enum class RelayStateBitmap : uint16_t +{ + kHeat = 0x1, + kCool = 0x2, + kFan = 0x4, + kHeatStage2 = 0x8, + kCoolStage2 = 0x10, + kFanStage2 = 0x20, + kFanStage3 = 0x40, +}; + +// Bitmap for RemoteSensingBitmap +enum class RemoteSensingBitmap : uint8_t +{ + kLocalTemperature = 0x1, + kOutdoorTemperature = 0x2, + kOccupancy = 0x4, +}; + +// Bitmap for ScheduleDayOfWeekBitmap +enum class ScheduleDayOfWeekBitmap : uint8_t +{ + kSunday = 0x1, + kMonday = 0x2, + kTuesday = 0x4, + kWednesday = 0x8, + kThursday = 0x10, + kFriday = 0x20, + kSaturday = 0x40, + kAway = 0x80, +}; + +// Bitmap for ScheduleModeBitmap +enum class ScheduleModeBitmap : uint8_t { kHeatSetpointPresent = 0x1, kCoolSetpointPresent = 0x2, diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 8bee9da375dcc3..95c90f55c328e6 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -18465,7 +18465,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Thermostat { namespace Structs { -namespace ThermostatScheduleTransition { +namespace WeeklyScheduleTransitionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -18509,7 +18509,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace ThermostatScheduleTransition +} // namespace WeeklyScheduleTransitionStruct } // namespace Structs namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 4432f901d12b1b..815b945b5ab9ef 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -26102,7 +26102,7 @@ struct DecodableType } // namespace PumpConfigurationAndControl namespace Thermostat { namespace Structs { -namespace ThermostatScheduleTransition { +namespace WeeklyScheduleTransitionStruct { enum class Fields : uint8_t { kTransitionTime = 0, @@ -26126,7 +26126,7 @@ struct Type using DecodableType = Type; -} // namespace ThermostatScheduleTransition +} // namespace WeeklyScheduleTransitionStruct } // namespace Structs namespace Commands { @@ -26174,8 +26174,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointAdjustMode mode = static_cast(0); - int8_t amount = static_cast(0); + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26190,8 +26190,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointAdjustMode mode = static_cast(0); - int8_t amount = static_cast(0); + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetpointRaiseLower @@ -26211,10 +26211,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26229,10 +26229,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklyScheduleResponse @@ -26252,10 +26252,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26270,10 +26270,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetWeeklySchedule @@ -26291,8 +26291,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26307,8 +26307,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklySchedule @@ -26587,9 +26587,9 @@ struct TypeInfo namespace RemoteSensing { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::RemoteSensing::Id; } @@ -26599,9 +26599,9 @@ struct TypeInfo namespace ControlSequenceOfOperation { struct TypeInfo { - using Type = chip::app::Clusters::Thermostat::ThermostatControlSequence; - using DecodableType = chip::app::Clusters::Thermostat::ThermostatControlSequence; - using DecodableArgType = chip::app::Clusters::Thermostat::ThermostatControlSequence; + using Type = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; + using DecodableType = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ControlSequenceOfOperation::Id; } @@ -26611,9 +26611,9 @@ struct TypeInfo namespace SystemMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::SystemModeEnum; + using DecodableType = chip::app::Clusters::Thermostat::SystemModeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::SystemModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SystemMode::Id; } @@ -26623,9 +26623,9 @@ struct TypeInfo namespace ThermostatRunningMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningMode::Id; } @@ -26635,9 +26635,9 @@ struct TypeInfo namespace StartOfWeek { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::StartOfWeekEnum; + using DecodableType = chip::app::Clusters::Thermostat::StartOfWeekEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::StartOfWeekEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartOfWeek::Id; } @@ -26671,9 +26671,9 @@ struct TypeInfo namespace TemperatureSetpointHold { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; + using DecodableType = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHold::Id; } @@ -26695,9 +26695,9 @@ struct TypeInfo namespace ThermostatProgrammingOperationMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatProgrammingOperationMode::Id; } @@ -26707,9 +26707,9 @@ struct TypeInfo namespace ThermostatRunningState { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningState::Id; } @@ -26719,9 +26719,9 @@ struct TypeInfo namespace SetpointChangeSource { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; + using DecodableType = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeSource::Id; } @@ -26839,9 +26839,9 @@ struct TypeInfo namespace ACType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACType::Id; } @@ -26863,9 +26863,9 @@ struct TypeInfo namespace ACRefrigerantType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACRefrigerantType::Id; } @@ -26875,9 +26875,9 @@ struct TypeInfo namespace ACCompressorType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACCompressorType::Id; } @@ -26887,9 +26887,9 @@ struct TypeInfo namespace ACErrorCode { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACErrorCode::Id; } @@ -26899,9 +26899,9 @@ struct TypeInfo namespace ACLouverPosition { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACLouverPositionEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACLouverPosition::Id; } @@ -26923,9 +26923,9 @@ struct TypeInfo namespace ACCapacityformat { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACCapacityformat::Id; } @@ -26997,20 +26997,27 @@ struct TypeInfo Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType minCoolSetpointLimit = static_cast(0); Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType maxCoolSetpointLimit = static_cast(0); Attributes::MinSetpointDeadBand::TypeInfo::DecodableType minSetpointDeadBand = static_cast(0); - Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = static_cast(0); + Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = + static_cast>(0); Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType controlSequenceOfOperation = - static_cast(0); - Attributes::SystemMode::TypeInfo::DecodableType systemMode = static_cast(0); - Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = static_cast(0); - Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = static_cast(0); + static_cast(0); + Attributes::SystemMode::TypeInfo::DecodableType systemMode = + static_cast(0); + Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = + static_cast(0); + Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = + static_cast(0); Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableType numberOfWeeklyTransitions = static_cast(0); Attributes::NumberOfDailyTransitions::TypeInfo::DecodableType numberOfDailyTransitions = static_cast(0); - Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = static_cast(0); + Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = + static_cast(0); Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType temperatureSetpointHoldDuration; Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType thermostatProgrammingOperationMode = - static_cast(0); - Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = static_cast(0); - Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = static_cast(0); + static_cast>(0); + Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = + static_cast>(0); + Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = + static_cast(0); Attributes::SetpointChangeAmount::TypeInfo::DecodableType setpointChangeAmount; Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableType setpointChangeSourceTimestamp = static_cast(0); Attributes::OccupiedSetback::TypeInfo::DecodableType occupiedSetback; @@ -27020,14 +27027,19 @@ struct TypeInfo Attributes::UnoccupiedSetbackMin::TypeInfo::DecodableType unoccupiedSetbackMin; Attributes::UnoccupiedSetbackMax::TypeInfo::DecodableType unoccupiedSetbackMax; Attributes::EmergencyHeatDelta::TypeInfo::DecodableType emergencyHeatDelta = static_cast(0); - Attributes::ACType::TypeInfo::DecodableType ACType = static_cast(0); - Attributes::ACCapacity::TypeInfo::DecodableType ACCapacity = static_cast(0); - Attributes::ACRefrigerantType::TypeInfo::DecodableType ACRefrigerantType = static_cast(0); - Attributes::ACCompressorType::TypeInfo::DecodableType ACCompressorType = static_cast(0); - Attributes::ACErrorCode::TypeInfo::DecodableType ACErrorCode = static_cast(0); - Attributes::ACLouverPosition::TypeInfo::DecodableType ACLouverPosition = static_cast(0); + Attributes::ACType::TypeInfo::DecodableType ACType = static_cast(0); + Attributes::ACCapacity::TypeInfo::DecodableType ACCapacity = static_cast(0); + Attributes::ACRefrigerantType::TypeInfo::DecodableType ACRefrigerantType = + static_cast(0); + Attributes::ACCompressorType::TypeInfo::DecodableType ACCompressorType = + static_cast(0); + Attributes::ACErrorCode::TypeInfo::DecodableType ACErrorCode = + static_cast>(0); + Attributes::ACLouverPosition::TypeInfo::DecodableType ACLouverPosition = + static_cast(0); Attributes::ACCoilTemperature::TypeInfo::DecodableType ACCoilTemperature; - Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = static_cast(0); + Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 0795307c52b200..66c4f61ede9bf3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8870,7 +8870,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand private: chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; TypedComplexArgument< - chip::app::DataModel::List> + chip::app::DataModel::List> mComplex_Transitions; }; @@ -20605,35 +20605,39 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c Attributes::MaxCoolSetpointLimit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "min-setpoint-dead-band", INT8_MIN, INT8_MAX, Attributes::MinSetpointDeadBand::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( + make_unique>>( + Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( Id, "control-sequence-of-operation", 0, UINT8_MAX, Attributes::ControlSequenceOfOperation::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "thermostat-running-mode", 0, UINT8_MAX, Attributes::ThermostatRunningMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "start-of-week", 0, UINT8_MAX, Attributes::StartOfWeek::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "thermostat-running-mode", 0, UINT8_MAX, Attributes::ThermostatRunningMode::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "start-of-week", 0, UINT8_MAX, Attributes::StartOfWeek::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "number-of-weekly-transitions", 0, UINT8_MAX, Attributes::NumberOfWeeklyTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "number-of-daily-transitions", 0, UINT8_MAX, Attributes::NumberOfDailyTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>( Id, "temperature-setpoint-hold-duration", 0, UINT16_MAX, Attributes::TemperatureSetpointHoldDuration::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, - Attributes::ThermostatProgrammingOperationMode::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "thermostat-running-state", 0, UINT16_MAX, Attributes::ThermostatRunningState::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "setpoint-change-source", 0, UINT8_MAX, Attributes::SetpointChangeSource::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, Attributes::ThermostatProgrammingOperationMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "thermostat-running-state", 0, UINT16_MAX, Attributes::ThermostatRunningState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "setpoint-change-source", 0, UINT8_MAX, Attributes::SetpointChangeSource::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>(Id, "setpoint-change-amount", INT16_MIN, INT16_MAX, Attributes::SetpointChangeAmount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20659,23 +20663,26 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "emergency-heat-delta", 0, UINT8_MAX, Attributes::EmergencyHeatDelta::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "accapacity", 0, UINT16_MAX, Attributes::ACCapacity::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>( + Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>(Id, "accoil-temperature", INT16_MIN, INT16_MAX, Attributes::ACCoilTemperature::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 19e50685722e60..0a6a0757b2bf82 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -3085,7 +3085,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::DoorLock::Structs::Cre } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request, + chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); @@ -3093,11 +3093,11 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThermostatScheduleTransition.transitionTime", "transitionTime", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WeeklyScheduleTransitionStruct.transitionTime", "transitionTime", value.isMember("transitionTime"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThermostatScheduleTransition.heatSetpoint", "heatSetpoint", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WeeklyScheduleTransitionStruct.heatSetpoint", "heatSetpoint", value.isMember("heatSetpoint"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThermostatScheduleTransition.coolSetpoint", "coolSetpoint", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WeeklyScheduleTransitionStruct.coolSetpoint", "coolSetpoint", value.isMember("coolSetpoint"))); char labelWithMember[kMaxLabelLength]; @@ -3116,7 +3116,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } -void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request) { ComplexArgumentParser::Finalize(request.transitionTime); ComplexArgumentParser::Finalize(request.heatSetpoint); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index ef7483fc069ea5..8c5b30bd425cd8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -365,10 +365,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::DoorLock::Struc static void Finalize(chip::app::Clusters::DoorLock::Structs::CredentialStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request, +static CHIP_ERROR Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request); +static void Finalize(chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Structs::ProgramCastStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index a33e413d1fb045..3b93c648c9aea4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2743,7 +2743,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value) + const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -12490,27 +12490,27 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("MinSetpointDeadBand", 1, value); } case Thermostat::Attributes::RemoteSensing::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RemoteSensing", 1, value); } case Thermostat::Attributes::ControlSequenceOfOperation::Id: { - chip::app::Clusters::Thermostat::ThermostatControlSequence value; + chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ControlSequenceOfOperation", 1, value); } case Thermostat::Attributes::SystemMode::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::SystemModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SystemMode", 1, value); } case Thermostat::Attributes::ThermostatRunningMode::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatRunningMode", 1, value); } case Thermostat::Attributes::StartOfWeek::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::StartOfWeekEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StartOfWeek", 1, value); } @@ -12525,7 +12525,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("NumberOfDailyTransitions", 1, value); } case Thermostat::Attributes::TemperatureSetpointHold::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TemperatureSetpointHold", 1, value); } @@ -12535,17 +12535,17 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("TemperatureSetpointHoldDuration", 1, value); } case Thermostat::Attributes::ThermostatProgrammingOperationMode::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatProgrammingOperationMode", 1, value); } case Thermostat::Attributes::ThermostatRunningState::Id: { - uint16_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatRunningState", 1, value); } case Thermostat::Attributes::SetpointChangeSource::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SetpointChangeSource", 1, value); } @@ -12595,7 +12595,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("EmergencyHeatDelta", 1, value); } case Thermostat::Attributes::ACType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACType", 1, value); } @@ -12605,22 +12605,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ACCapacity", 1, value); } case Thermostat::Attributes::ACRefrigerantType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACRefrigerantType", 1, value); } case Thermostat::Attributes::ACCompressorType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACCompressorTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCompressorType", 1, value); } case Thermostat::Attributes::ACErrorCode::Id: { - uint32_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACErrorCode", 1, value); } case Thermostat::Attributes::ACLouverPosition::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACLouverPositionEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACLouverPosition", 1, value); } @@ -12630,7 +12630,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ACCoilTemperature", 1, value); } case Thermostat::Attributes::ACCapacityformat::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACCapacityFormatEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCapacityformat", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 506e26f03dc1eb..3265347dfed29c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -230,7 +230,7 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value); + const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::ProgramCastStruct::DecodableType & value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 816f1b656a11a4..0e9787d9ff24ae 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -94936,8 +94936,8 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; if (entry_0.heatSetpoint.IsNull()) { newElement_0.heatSetpoint = nil; @@ -94974,7 +94974,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { private: chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument> mComplex_Transitions; + TypedComplexArgument> mComplex_Transitions; }; /*