Skip to content

Commit

Permalink
XML only commit for 1.3 Thermostat spec changes. Cluster xml file (#3…
Browse files Browse the repository at this point in the history
…0672)

* XML only commit for 1.3 Thermostat spec changes.  Cluster xml file
generated using Hasty's tool, as a result some of the stuff that didn't
follow our normal standards and norms for matter have also been
corrected (renaming types for example).

* Fixed Types (going blind here since I'm not sure how to compile these)

* Restyled by whitespace

* Restyled by clang-format

* manually adjust to the two's compliment since bad code gen was happening
for some of the builds.

* fixed copypaste typo

* fixing esp build

* didn't fix the build after all, reverted, and fixed another typo.

* Think last commit fixed telink build, lets see if this fixes the rest

* more blind changes using pull requests as a compiler...

* switch is probably better

* would help if I used the right variable...

* more type safety to make it build (not doing all of it, since I can't
actually build locally or test locally)

* more type fixes

* and some more

* and more

* last one?

* on to minimal...

* regenerated with a new JRE, hopefully will pass the codegen check

* Restyled by clang-format

* new xml, new regen.

* apparently we need a reg after this merge :)

* Lets see if this is good enough to get through the chip-repl tests

* Added the queued preset encoding

* Set a sane minimum value for LocalTemperatureCalibration

* Restyled by clang-format

* turned off the new commands for now since the test suite can't handle
them yet and is getting upset that there are commands it isn't expecting
there (why that's a necessary check, I'm really not sure...)

* passing all the TSTAT unit tests now locally, lets see if the remote
tests like it.

* Fixing ameba target

* missed these in the merge

* After inspecting the bits of the xml that didn't conflict, found some
bad merges and reverted them back to master

* Revert this change back since it was decided in the great renaming to
not do it.

* This should get us past the backward incompat test

* Fix the bad merge I did using github directly

* XML changes as requested

* Blew away the zap generated dirs and regenerated again.

Some files stayed deleted.

* missed changing the default response field here

* Update src/app/clusters/thermostat-server/thermostat-server.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml

Co-authored-by: Boris Zbarsky <[email protected]>

* Fixed up the order of the commands and improved the comments.

* ran regen

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
3 people authored Jan 16, 2024
1 parent 71f6a62 commit 4efcd8c
Show file tree
Hide file tree
Showing 71 changed files with 17,128 additions and 34 deletions.
142 changes: 141 additions & 1 deletion examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -4467,6 +4467,16 @@ cluster Thermostat = 513 {
kCoolingAndHeatingWithReheat = 5;
}

enum PresetScenarioEnum : enum8 {
kUnspecified = 0;
kOccupied = 1;
kUnoccupied = 2;
kSleep = 3;
kWake = 4;
kVacation = 5;
kUserDefined = 6;
}

enum SetpointChangeSourceEnum : enum8 {
kManual = 0;
kSchedule = 1;
Expand Down Expand Up @@ -4528,6 +4538,10 @@ cluster Thermostat = 513 {
kSetback = 0x10;
kAutoMode = 0x20;
kLocalTemperatureNotExposed = 0x40;
kMatterScheduleConfiguration = 0x80;
kPresets = 0x100;
kSetpoints = 0x200;
kQueuedPresetsSupported = 0x400;
}

bitmap HVACSystemTypeBitmap : bitmap8 {
Expand All @@ -4537,6 +4551,11 @@ cluster Thermostat = 513 {
kHeatingUsesFuel = 0x20;
}

bitmap PresetTypeFeaturesBitmap : bitmap16 {
kAutomatic = 0x1;
kSupportsNames = 0x2;
}

bitmap ProgrammingOperationModeBitmap : bitmap8 {
kScheduleActive = 0x1;
kAutoRecovery = 0x2;
Expand Down Expand Up @@ -4575,6 +4594,62 @@ cluster Thermostat = 513 {
kCoolSetpointPresent = 0x2;
}

bitmap ScheduleTypeFeaturesBitmap : bitmap16 {
kSupportsPresets = 0x1;
kSupportsSetpoints = 0x2;
kSupportsNames = 0x4;
kSupportsOff = 0x8;
}

bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 {
kHoldDurationElapsed = 0x1;
kHoldDurationElapsedOrPresetChanged = 0x2;
}

struct ScheduleTransitionStruct {
ScheduleDayOfWeekBitmap dayOfWeek = 0;
int16u transitionTime = 1;
optional octet_string<16> presetHandle = 2;
optional SystemModeEnum systemMode = 3;
optional temperature coolingSetpoint = 4;
optional temperature heatingSetpoint = 5;
}

struct ScheduleStruct {
nullable octet_string<16> scheduleHandle = 0;
SystemModeEnum systemMode = 1;
optional char_string<64> name = 2;
optional octet_string<16> presetHandle = 3;
ScheduleTransitionStruct transitions[] = 4;
optional nullable boolean builtIn = 5;
}

struct PresetStruct {
nullable octet_string<16> presetHandle = 0;
PresetScenarioEnum presetScenario = 1;
optional nullable char_string<64> name = 2;
optional temperature coolingSetpoint = 3;
optional temperature heatingSetpoint = 4;
nullable boolean builtIn = 5;
}

struct PresetTypeStruct {
PresetScenarioEnum presetScenario = 0;
int8u numberOfPresets = 1;
PresetTypeFeaturesBitmap presetTypeFeatures = 2;
}

struct QueuedPresetStruct {
nullable octet_string<16> presetHandle = 0;
nullable epoch_s transitionTimestamp = 1;
}

struct ScheduleTypeStruct {
SystemModeEnum systemMode = 0;
int8u numberOfSchedules = 1;
ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2;
}

struct WeeklyScheduleTransitionStruct {
int16u transitionTime = 0;
nullable temperature heatSetpoint = 1;
Expand Down Expand Up @@ -4630,6 +4705,20 @@ cluster Thermostat = 513 {
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 optional PresetTypeStruct presetTypes[] = 72;
readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73;
readonly attribute optional int8u numberOfPresets = 74;
readonly attribute optional int8u numberOfSchedules = 75;
readonly attribute optional int8u numberOfScheduleTransitions = 76;
readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77;
readonly attribute optional nullable octet_string<16> activePresetHandle = 78;
readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79;
attribute access(write: manage) optional PresetStruct presets[] = 80;
attribute access(write: manage) optional ScheduleStruct schedules[] = 81;
readonly attribute optional boolean presetsSchedulesEditable = 82;
readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83;
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84;
readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -4661,14 +4750,45 @@ cluster Thermostat = 513 {
ScheduleModeBitmap modeToReturn = 1;
}

request struct SetActiveScheduleRequestRequest {
octet_string<16> scheduleHandle = 0;
}

request struct SetActivePresetRequestRequest {
octet_string<16> presetHandle = 0;
optional int16u delayMinutes = 1;
}

request struct StartPresetsSchedulesEditRequestRequest {
int16u timeoutSeconds = 0;
}

request struct SetTemperatureSetpointHoldPolicyRequest {
TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0;
}

/** Command description for SetpointRaiseLower */
command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0;
/** Command description for SetWeeklySchedule */
command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1;
/** Command description for GetWeeklySchedule */
command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2;
/** The Clear Weekly Schedule command is used to clear the weekly schedule. */
/** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */
command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3;
/** This command is used to set the active schedule. */
command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5;
/** This command is used to set the active preset. */
command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6;
/** This command is used to start editing the presets and schedules. */
command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7;
/** This command is used to cancel editing presets and schedules. */
command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8;
/** This command is used to notify the server that all edits are done and should be committed. */
command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9;
/** This command is sent to cancel a queued preset. */
command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10;
/** This command sets the set point hold policy. */
command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11;
}

/** An interface for controlling a fan in a heating/cooling system. */
Expand Down Expand Up @@ -7750,6 +7870,19 @@ endpoint 1 {
ram attribute minSetpointDeadBand default = 0x19;
ram attribute controlSequenceOfOperation default = 0x04;
ram attribute systemMode default = 0x01;
callback attribute presetTypes;
callback attribute scheduleTypes;
ram attribute numberOfPresets default = 0;
ram attribute numberOfSchedules default = 0;
ram attribute numberOfScheduleTransitionPerDay default = 0xFF;
ram attribute activePresetHandle;
ram attribute activeScheduleHandle;
callback attribute presets;
callback attribute schedules;
ram attribute presetsSchedulesEditable;
ram attribute temperatureSetpointHoldPolicy default = 0;
ram attribute setpointHoldExpiryTimestamp;
callback attribute queuedPreset;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand All @@ -7758,6 +7891,13 @@ endpoint 1 {
ram attribute clusterRevision default = 6;

handle command SetpointRaiseLower;
handle command SetActiveScheduleRequest;
handle command SetActivePresetRequest;
handle command StartPresetsSchedulesEditRequest;
handle command CancelPresetsSchedulesEditRequest;
handle command CommitPresetsSchedulesRequest;
handle command CancelSetActivePresetRequest;
handle command SetTemperatureSetpointHoldPolicy;
}

server cluster FanControl {
Expand Down
Loading

0 comments on commit 4efcd8c

Please sign in to comment.