Skip to content

Commit

Permalink
Remove deprecated RVC items (#31451)
Browse files Browse the repository at this point in the history
* Depricated the OnMode attribute for the RvcRunMode and RvcCleanMode clusters.

* Depricated the OnOff feature for the RvcRunMode and RvcCleanMode clusters.

* Depricated the Start and Stop commands for the RvcOperationalState cluster.

* Removed the depricated OnMode attributes from the attributeAccessInterfaceAttributes.

* Removed the RvcOpState tests for the Start and stop command.

* regenerated zap code.

* Restyled by prettier-json

* Added back the feature map for the RvcClean and RvcRun mode clusters without the OnOff feature.

* Regenerated files.

* Updated the all-clusters-app zap file.

* Regenerated the matter file for the all-clusters-app.

* Removed the setting of the OnOff feature in instances of RvcRunMode and RvcCleanMode in the all-clusters-app

* Regenerated zap files.

* Restyled by clang-format

* The Objects.py template adds a kInternalDoNotUseNone entry if a bitmap has no entryies.

* Replaced the previous solution that fixed the issue in the generated python files canused by the lack of bitmasks by adding a NoFeatures=0 mask.

* Used the new kNoFeatures feature instead of a locally declared constant.

* Readded a valve cluster attributed which was annoyingly removed by zap issues.

* Restyled by clang-format

* Regenerated zap files.

* Fixed missing namesapace call.

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Feb 23, 2024
1 parent 0806b7c commit 1472164
Show file tree
Hide file tree
Showing 45 changed files with 78,468 additions and 2,194 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2929,7 +2929,7 @@ cluster RvcRunMode = 84 {
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
kNoFeatures = 0x0;
}

struct ModeTagStruct {
Expand All @@ -2945,7 +2945,6 @@ cluster RvcRunMode = 84 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -2982,7 +2981,7 @@ cluster RvcCleanMode = 85 {
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
kNoFeatures = 0x0;
}

struct ModeTagStruct {
Expand All @@ -2998,7 +2997,6 @@ cluster RvcCleanMode = 85 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -3480,10 +3478,6 @@ cluster RvcOperationalState = 97 {

/** 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;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
Expand Down Expand Up @@ -7807,9 +7801,9 @@ endpoint 1 {
server cluster RvcRunMode {
callback attribute supportedModes;
callback attribute currentMode;
callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 2;
Expand All @@ -7821,9 +7815,9 @@ endpoint 1 {
server cluster RvcCleanMode {
callback attribute supportedModes;
callback attribute currentMode;
callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 2;
Expand Down Expand Up @@ -7971,6 +7965,7 @@ endpoint 1 {
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;
Expand Down
48 changes: 32 additions & 16 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -9470,11 +9470,11 @@
"reportableChange": 0
},
{
"name": "OnMode",
"code": 3,
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand All @@ -9486,8 +9486,8 @@
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
Expand All @@ -9502,16 +9502,16 @@
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -9626,11 +9626,11 @@
"reportableChange": 0
},
{
"name": "OnMode",
"code": 3,
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand All @@ -9642,8 +9642,8 @@
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
Expand All @@ -9658,16 +9658,16 @@
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -11353,6 +11353,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId)
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr);
gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate;
gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, 0);
gRvcRunModeInstance =
new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures));
gRvcRunModeInstance->Init();
}

Expand Down Expand Up @@ -201,6 +202,7 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId)
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr);
gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate;
gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, 0);
gRvcCleanModeInstance =
new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures));
gRvcCleanModeInstance->Init();
}
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ cluster RvcRunMode = 84 {
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
kNoFeatures = 0x0;
}

struct ModeTagStruct {
Expand All @@ -1036,7 +1036,6 @@ cluster RvcRunMode = 84 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1073,7 +1072,7 @@ cluster RvcCleanMode = 85 {
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
kNoFeatures = 0x0;
}

struct ModeTagStruct {
Expand All @@ -1089,7 +1088,6 @@ cluster RvcCleanMode = 85 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1172,10 +1170,6 @@ cluster RvcOperationalState = 97 {

/** 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;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
Expand Down Expand Up @@ -1410,7 +1404,6 @@ endpoint 1 {
server cluster RvcRunMode {
callback attribute supportedModes;
callback attribute currentMode;
callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand All @@ -1425,7 +1418,6 @@ endpoint 1 {
server cluster RvcCleanMode {
callback attribute supportedModes;
callback attribute currentMode;
callback attribute onMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand Down Expand Up @@ -1454,8 +1446,6 @@ endpoint 1 {
ram attribute clusterRevision default = 1;

handle command Pause;
handle command Stop;
handle command Start;
handle command Resume;
handle command OperationalCommandResponse;
}
Expand Down
10 changes: 2 additions & 8 deletions examples/rvc-app/rvc-common/rvc-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ cluster RvcRunMode = 84 {
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
kNoFeatures = 0x0;
}

struct ModeTagStruct {
Expand All @@ -959,7 +959,6 @@ cluster RvcRunMode = 84 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -996,7 +995,7 @@ cluster RvcCleanMode = 85 {
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
kNoFeatures = 0x0;
}

struct ModeTagStruct {
Expand All @@ -1012,7 +1011,6 @@ cluster RvcCleanMode = 85 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1095,10 +1093,6 @@ cluster RvcOperationalState = 97 {

/** 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;
/** On receipt of this command, the device SHALL start seeking the charging dock, if possible in the current state of the device. */
Expand Down
10 changes: 0 additions & 10 deletions src/app/tests/suites/TestRVCOperationalState.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ tests:
response:
value: 0

- label: "Start Command"
command: "Start"
response:
error: UNSUPPORTED_COMMAND

- label: "Read current Operational State"
command: "readAttribute"
attribute: "OperationalState"
Expand Down Expand Up @@ -110,11 +105,6 @@ tests:
response:
value: 0

- label: "Stop Command"
command: "Stop"
response:
error: UNSUPPORTED_COMMAND

- label: "Read current Operational State"
command: "readAttribute"
attribute: "OperationalState"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ This is because zap does not currently support generating code for clusters that
<!-- <cluster code="0x..."/>-->
<cluster code="0x0051"/> <!-- Laundry Washer Mode -->
<cluster code="0x0052"/> <!-- Refrigerator and temperature controlled cabinet Mode -->
<cluster code="0x0054"/> <!-- RVC Run Mode -->
<cluster code="0x0055"/> <!-- RVC Clean Mode -->
<!-- <cluster code="0x0054"/> RVC Run Mode. This feature map is implemented in rvc-run-mode-cluster.xml -->
<!-- <cluster code="0x0055"/> RVC Clean Mode. This feature map is implemented in rvc-clean-mode-cluster.xml -->
<cluster code="0x0059"/> <!-- Dishwasher Mode -->
<cluster code="0x005E"/> <!-- Microwave Oven Mode -->
<cluster code="0x0049"/> <!-- Oven Mode -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,9 @@ both values from this cluster and from the base cluster.
<description>Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server.</description>
</command>

<command source="client" code="0x01" name="Stop" response="OperationalCommandResponse" optional="true">
<description>Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted.</description>
</command>
<!-- Command Stop with code 0x01 is deprecated -->

<command source="client" code="0x02" name="Start" response="OperationalCommandResponse" optional="true">
<description>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.</description>
</command>
<!-- Command Start with code 0x02 is deprecated -->

<command source="client" code="0x03" name="Resume" response="OperationalCommandResponse" optional="true">
<description>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).</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ limitations under the License.
<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="array" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
<attribute side="server" code="0x0003" define="ON_MODE" type="int8u" writable="true" optional="true" isNullable="true">OnMode</attribute>
<!-- Attribute OnMode with code 0x0003 is deprecated -->

<!-- Commands -->
<command source="client" code="0x00" name="ChangeToMode" response="ChangeToModeResponse" optional="false">
Expand All @@ -60,4 +60,11 @@ limitations under the License.
<arg name="StatusText" type="char_string" lenght="64" optional="true"/>
</command>
</cluster>

<bitmap name="Feature" type="bitmap32">
<cluster code="0x0055"/>
<field name="NoFeatures" mask="0x0"/>
<!-- Feature OnOff with code 0x01 is deprecated -->
</bitmap>

</configurator>
Loading

0 comments on commit 1472164

Please sign in to comment.