Skip to content

Commit

Permalink
Oven: adding OvenCavityOperationalState example (#30898)
Browse files Browse the repository at this point in the history
* Initial OpState work

Adding oven op state

Python regen

Fixing alignment

regenerate with oven device.

regenerated zap and chiptool

oven opState first pass

builds and runs, but running tests results in a lot of failure messages.

tentative updates based on RVC

updated cluster name & fix build

linux builds with oven mode update.

remove duplicate ovencacvity Entries

remove duplicate oven cavity entry

Revert "remove duplicate ovencacvity Entries"

This reverts commit 87e891e.

oven mode is responding appropriately

cleanup for ovenMode

regenerate zap

Removing OvenMode related changes

regen zap

* Fix linter error

* zap regen

* rerun zap tool on data_model

* Restyled by clang-format

* CLEAN zap-regen-all

* cleanup

* cleanup: removing unneeded files.

* Set err in commands, removed function definition for phases, returned NullNullable

* Restyled by clang-format

* regen zap

* Update for changes in PR31176

* fix build errors

* Restyled by clang-format

* zap regen

* zap regen

* Cleanup

* revert unimportant changes

* regen zap

* restore third_party to master

* revert settings change

* reverting whitespace changes.

* regen zap

* removing hard coded array size

* fixed compiler error

* cleaned all-clusters zap

---------

Co-authored-by: abeck-riis <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: OmAmbalkar <[email protected]>
  • Loading branch information
4 people authored Jan 18, 2024
1 parent c83f800 commit 91d3288
Show file tree
Hide file tree
Showing 11 changed files with 1,978 additions and 42,109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2592,6 +2592,72 @@ cluster BooleanState = 69 {
readonly attribute int16u clusterRevision = 65533;
}

/** This cluster supports remotely monitoring and, where supported, changing the operational state of an Oven. */
provisional cluster OvenCavityOperationalState = 72 {
revision 1;

enum ErrorStateEnum : enum8 {
kNoError = 0;
kUnableToStartOrResume = 1;
kUnableToCompleteOperation = 2;
kCommandInvalidInState = 3;
}

enum OperationalStateEnum : enum8 {
kStopped = 0;
kRunning = 1;
kPaused = 2;
kError = 3;
}

struct ErrorStateStruct {
enum8 errorStateID = 0;
optional char_string<64> errorStateLabel = 1;
optional char_string<64> errorStateDetails = 2;
}

struct OperationalStateStruct {
enum8 operationalStateID = 0;
optional char_string<64> operationalStateLabel = 1;
}

critical event OperationalError = 0 {
ErrorStateStruct errorState = 0;
}

info event OperationCompletion = 1 {
enum8 completionErrorCode = 0;
optional nullable elapsed_s totalOperationalTime = 1;
optional nullable elapsed_s pausedTime = 2;
}

readonly attribute nullable char_string phaseList[] = 0;
readonly attribute nullable int8u currentPhase = 1;
readonly attribute optional nullable elapsed_s countdownTime = 2;
readonly attribute OperationalStateStruct operationalStateList[] = 3;
readonly attribute OperationalStateEnum operationalState = 4;
readonly attribute ErrorStateStruct operationalError = 5;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

response struct OperationalCommandResponse = 4 {
ErrorStateStruct commandResponseState = 0;
}

/** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */
command Pause(): OperationalCommandResponse = 0;
/** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */
command Stop(): OperationalCommandResponse = 1;
/** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */
command Start(): OperationalCommandResponse = 2;
/** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */
command Resume(): OperationalCommandResponse = 3;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster OvenMode = 73 {
revision 1;
Expand Down Expand Up @@ -7533,6 +7599,20 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster OvenCavityOperationalState {
callback attribute phaseList;
callback attribute currentPhase;
callback attribute operationalStateList;
callback attribute operationalState;
callback attribute operationalError;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster OvenMode {
callback attribute supportedModes;
ram attribute currentMode;
Expand Down Expand Up @@ -8105,13 +8185,6 @@ 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 91d3288

Please sign in to comment.