Skip to content

Commit 1661308

Browse files
drempelgrestyled-commitsbzbarsky-apple
authored andcommitted
Doing the great thermostat renaming. (#30758)
* Doing the great thermostat renaming. * Fixed a bad merge * and missed this rename * Restyled by whitespace * Restyled by clang-format * Adjust Darwin availability for the renames. * Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky <[email protected]> * Bunch of changes related to review * restored the min/max's for the writable attributes * Reverted the min/max's to int16s again. Using temperature was causing the test suite to fail when writing to them. Temperature is the only type defined in chip-types.xml as signed (even signed int's aren't) and it looks like the min/max checking in attribute-table.cpp didn't like that. * Removed log line again (guess I didn't add/commit again before pushing) * Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky <[email protected]> * fixed some white space issues and restored defaults --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
1 parent c54d3da commit 1661308

File tree

65 files changed

+3846
-1437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3846
-1437
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+147-54
Original file line numberDiff line numberDiff line change
@@ -3961,13 +3961,41 @@ cluster PumpConfigurationAndControl = 512 {
39613961
cluster Thermostat = 513 {
39623962
revision 6;
39633963

3964-
enum SetpointAdjustMode : enum8 {
3965-
kHeat = 0;
3966-
kCool = 1;
3967-
kBoth = 2;
3964+
enum ACCapacityFormatEnum : enum8 {
3965+
kBTUh = 0;
3966+
}
3967+
3968+
enum ACCompressorTypeEnum : enum8 {
3969+
kUnknown = 0;
3970+
kT1 = 1;
3971+
kT2 = 2;
3972+
kT3 = 3;
3973+
}
3974+
3975+
enum ACLouverPositionEnum : enum8 {
3976+
kClosed = 1;
3977+
kOpen = 2;
3978+
kQuarter = 3;
3979+
kHalf = 4;
3980+
kThreeQuarters = 5;
39683981
}
39693982

3970-
enum ThermostatControlSequence : enum8 {
3983+
enum ACRefrigerantTypeEnum : enum8 {
3984+
kUnknown = 0;
3985+
kR22 = 1;
3986+
kR410a = 2;
3987+
kR407c = 3;
3988+
}
3989+
3990+
enum ACTypeEnum : enum8 {
3991+
kUnknown = 0;
3992+
kCoolingFixed = 1;
3993+
kHeatPumpFixed = 2;
3994+
kCoolingInverter = 3;
3995+
kHeatPumpInverter = 4;
3996+
}
3997+
3998+
enum ControlSequenceOfOperationEnum : enum8 {
39713999
kCoolingOnly = 0;
39724000
kCoolingWithReheat = 1;
39734001
kHeatingOnly = 2;
@@ -3976,13 +4004,29 @@ cluster Thermostat = 513 {
39764004
kCoolingAndHeatingWithReheat = 5;
39774005
}
39784006

3979-
enum ThermostatRunningMode : enum8 {
3980-
kOff = 0;
3981-
kCool = 3;
3982-
kHeat = 4;
4007+
enum SetpointChangeSourceEnum : enum8 {
4008+
kManual = 0;
4009+
kSchedule = 1;
4010+
kExternal = 2;
4011+
}
4012+
4013+
enum SetpointRaiseLowerModeEnum : enum8 {
4014+
kHeat = 0;
4015+
kCool = 1;
4016+
kBoth = 2;
39834017
}
39844018

3985-
enum ThermostatSystemMode : enum8 {
4019+
enum StartOfWeekEnum : enum8 {
4020+
kSunday = 0;
4021+
kMonday = 1;
4022+
kTuesday = 2;
4023+
kWednesday = 3;
4024+
kThursday = 4;
4025+
kFriday = 5;
4026+
kSaturday = 6;
4027+
}
4028+
4029+
enum SystemModeEnum : enum8 {
39864030
kOff = 0;
39874031
kAuto = 1;
39884032
kCool = 3;
@@ -3994,15 +4038,23 @@ cluster Thermostat = 513 {
39944038
kSleep = 9;
39954039
}
39964040

3997-
bitmap DayOfWeek : bitmap8 {
3998-
kSunday = 0x1;
3999-
kMonday = 0x2;
4000-
kTuesday = 0x4;
4001-
kWednesday = 0x8;
4002-
kThursday = 0x10;
4003-
kFriday = 0x20;
4004-
kSaturday = 0x40;
4005-
kAway = 0x80;
4041+
enum TemperatureSetpointHoldEnum : enum8 {
4042+
kSetpointHoldOff = 0;
4043+
kSetpointHoldOn = 1;
4044+
}
4045+
4046+
enum ThermostatRunningModeEnum : enum8 {
4047+
kOff = 0;
4048+
kCool = 3;
4049+
kHeat = 4;
4050+
}
4051+
4052+
bitmap ACErrorCodeBitmap : bitmap32 {
4053+
kCompressorFail = 0x1;
4054+
kRoomSensorFail = 0x2;
4055+
kOutdoorSensorFail = 0x4;
4056+
kCoilSensorFail = 0x8;
4057+
kFanFail = 0x10;
40064058
}
40074059

40084060
bitmap Feature : bitmap32 {
@@ -4015,24 +4067,64 @@ cluster Thermostat = 513 {
40154067
kLocalTemperatureNotExposed = 0x40;
40164068
}
40174069

4018-
bitmap ModeForSequence : bitmap8 {
4070+
bitmap HVACSystemTypeBitmap : bitmap8 {
4071+
kCoolingStage = 0x3;
4072+
kHeatingStage = 0xC;
4073+
kHeatingIsHeatPump = 0x10;
4074+
kHeatingUsesFuel = 0x20;
4075+
}
4076+
4077+
bitmap ProgrammingOperationModeBitmap : bitmap8 {
4078+
kScheduleActive = 0x1;
4079+
kAutoRecovery = 0x2;
4080+
kEconomy = 0x4;
4081+
}
4082+
4083+
bitmap RelayStateBitmap : bitmap16 {
4084+
kHeat = 0x1;
4085+
kCool = 0x2;
4086+
kFan = 0x4;
4087+
kHeatStage2 = 0x8;
4088+
kCoolStage2 = 0x10;
4089+
kFanStage2 = 0x20;
4090+
kFanStage3 = 0x40;
4091+
}
4092+
4093+
bitmap RemoteSensingBitmap : bitmap8 {
4094+
kLocalTemperature = 0x1;
4095+
kOutdoorTemperature = 0x2;
4096+
kOccupancy = 0x4;
4097+
}
4098+
4099+
bitmap ScheduleDayOfWeekBitmap : bitmap8 {
4100+
kSunday = 0x1;
4101+
kMonday = 0x2;
4102+
kTuesday = 0x4;
4103+
kWednesday = 0x8;
4104+
kThursday = 0x10;
4105+
kFriday = 0x20;
4106+
kSaturday = 0x40;
4107+
kAway = 0x80;
4108+
}
4109+
4110+
bitmap ScheduleModeBitmap : bitmap8 {
40194111
kHeatSetpointPresent = 0x1;
40204112
kCoolSetpointPresent = 0x2;
40214113
}
40224114

4023-
struct ThermostatScheduleTransition {
4115+
struct WeeklyScheduleTransitionStruct {
40244116
int16u transitionTime = 0;
4025-
nullable int16s heatSetpoint = 1;
4026-
nullable int16s coolSetpoint = 2;
4117+
nullable temperature heatSetpoint = 1;
4118+
nullable temperature coolSetpoint = 2;
40274119
}
40284120

4029-
readonly attribute nullable int16s localTemperature = 0;
4030-
readonly attribute optional nullable int16s outdoorTemperature = 1;
4121+
readonly attribute nullable temperature localTemperature = 0;
4122+
readonly attribute optional nullable temperature outdoorTemperature = 1;
40314123
readonly attribute optional bitmap8 occupancy = 2;
4032-
readonly attribute optional int16s absMinHeatSetpointLimit = 3;
4033-
readonly attribute optional int16s absMaxHeatSetpointLimit = 4;
4034-
readonly attribute optional int16s absMinCoolSetpointLimit = 5;
4035-
readonly attribute optional int16s absMaxCoolSetpointLimit = 6;
4124+
readonly attribute optional temperature absMinHeatSetpointLimit = 3;
4125+
readonly attribute optional temperature absMaxHeatSetpointLimit = 4;
4126+
readonly attribute optional temperature absMinCoolSetpointLimit = 5;
4127+
readonly attribute optional temperature absMaxCoolSetpointLimit = 6;
40364128
readonly attribute optional int8u PICoolingDemand = 7;
40374129
readonly attribute optional int8u PIHeatingDemand = 8;
40384130
attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9;
@@ -4046,18 +4138,18 @@ cluster Thermostat = 513 {
40464138
attribute access(write: manage) optional int16s minCoolSetpointLimit = 23;
40474139
attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24;
40484140
attribute access(write: manage) optional int8s minSetpointDeadBand = 25;
4049-
attribute access(write: manage) optional bitmap8 remoteSensing = 26;
4050-
attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27;
4051-
attribute access(write: manage) enum8 systemMode = 28;
4052-
readonly attribute optional enum8 thermostatRunningMode = 30;
4053-
readonly attribute optional enum8 startOfWeek = 32;
4141+
attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26;
4142+
attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27;
4143+
attribute access(write: manage) SystemModeEnum systemMode = 28;
4144+
readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30;
4145+
readonly attribute optional StartOfWeekEnum startOfWeek = 32;
40544146
readonly attribute optional int8u numberOfWeeklyTransitions = 33;
40554147
readonly attribute optional int8u numberOfDailyTransitions = 34;
4056-
attribute access(write: manage) optional enum8 temperatureSetpointHold = 35;
4148+
attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35;
40574149
attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36;
4058-
attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37;
4059-
readonly attribute optional bitmap16 thermostatRunningState = 41;
4060-
readonly attribute optional enum8 setpointChangeSource = 48;
4150+
attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37;
4151+
readonly attribute optional RelayStateBitmap thermostatRunningState = 41;
4152+
readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48;
40614153
readonly attribute optional nullable int16s setpointChangeAmount = 49;
40624154
readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50;
40634155
attribute access(write: manage) optional nullable int8u occupiedSetback = 52;
@@ -4067,14 +4159,14 @@ cluster Thermostat = 513 {
40674159
readonly attribute optional nullable int8u unoccupiedSetbackMin = 56;
40684160
readonly attribute optional nullable int8u unoccupiedSetbackMax = 57;
40694161
attribute access(write: manage) optional int8u emergencyHeatDelta = 58;
4070-
attribute access(write: manage) optional enum8 ACType = 64;
4162+
attribute access(write: manage) optional ACTypeEnum ACType = 64;
40714163
attribute access(write: manage) optional int16u ACCapacity = 65;
4072-
attribute access(write: manage) optional enum8 ACRefrigerantType = 66;
4073-
attribute access(write: manage) optional enum8 ACCompressorType = 67;
4074-
attribute access(write: manage) optional bitmap32 ACErrorCode = 68;
4075-
attribute access(write: manage) optional enum8 ACLouverPosition = 69;
4076-
readonly attribute optional nullable int16s ACCoilTemperature = 70;
4077-
attribute access(write: manage) optional enum8 ACCapacityformat = 71;
4164+
attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66;
4165+
attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67;
4166+
attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68;
4167+
attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69;
4168+
readonly attribute optional nullable temperature ACCoilTemperature = 70;
4169+
attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71;
40784170
readonly attribute command_id generatedCommandList[] = 65528;
40794171
readonly attribute command_id acceptedCommandList[] = 65529;
40804172
readonly attribute event_id eventList[] = 65530;
@@ -4083,27 +4175,27 @@ cluster Thermostat = 513 {
40834175
readonly attribute int16u clusterRevision = 65533;
40844176

40854177
request struct SetpointRaiseLowerRequest {
4086-
SetpointAdjustMode mode = 0;
4178+
SetpointRaiseLowerModeEnum mode = 0;
40874179
int8s amount = 1;
40884180
}
40894181

40904182
response struct GetWeeklyScheduleResponse = 0 {
40914183
int8u numberOfTransitionsForSequence = 0;
4092-
DayOfWeek dayOfWeekForSequence = 1;
4093-
ModeForSequence modeForSequence = 2;
4094-
ThermostatScheduleTransition transitions[] = 3;
4184+
ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1;
4185+
ScheduleModeBitmap modeForSequence = 2;
4186+
WeeklyScheduleTransitionStruct transitions[] = 3;
40954187
}
40964188

40974189
request struct SetWeeklyScheduleRequest {
40984190
int8u numberOfTransitionsForSequence = 0;
4099-
DayOfWeek dayOfWeekForSequence = 1;
4100-
ModeForSequence modeForSequence = 2;
4101-
ThermostatScheduleTransition transitions[] = 3;
4191+
ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1;
4192+
ScheduleModeBitmap modeForSequence = 2;
4193+
WeeklyScheduleTransitionStruct transitions[] = 3;
41024194
}
41034195

41044196
request struct GetWeeklyScheduleRequest {
4105-
DayOfWeek daysToReturn = 0;
4106-
ModeForSequence modeToReturn = 1;
4197+
ScheduleDayOfWeekBitmap daysToReturn = 0;
4198+
ScheduleModeBitmap modeToReturn = 1;
41074199
}
41084200

41094201
/** Command description for SetpointRaiseLower */
@@ -7049,6 +7141,7 @@ endpoint 1 {
70497141
ram attribute systemMode default = 0x01;
70507142
callback attribute generatedCommandList;
70517143
callback attribute acceptedCommandList;
7144+
callback attribute eventList;
70527145
callback attribute attributeList;
70537146
ram attribute featureMap default = 0x0023;
70547147
ram attribute clusterRevision default = 6;

0 commit comments

Comments
 (0)