Skip to content

Commit

Permalink
Remove AverageWearCount attribute from SDK (project-chip#30125)
Browse files Browse the repository at this point in the history
* Remove AverageWearCount

* Regenerated ZAP

* Restyled by whitespace

* Restyled by prettier-json

* Added a comment to attribute access interface re: removal

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed May 7, 2024
1 parent 6c3e248 commit 5940689
Show file tree
Hide file tree
Showing 24 changed files with 12 additions and 262 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a
bool isTestEventTriggersEnabled = IsTestEventTriggerEnabled();
return aEncoder.Encode(isTestEventTriggersEnabled);
}
case AverageWearCount::Id: {
return ReadIfSupported(&DiagnosticDataProvider::GetAverageWearCount, aEncoder);
}
// Note: Attribute ID 0x0009 was removed (#30002).
default: {
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,15 @@ limitations under the License.
<attribute side="server" code="0x06" define="ACTIVE_RADIO_FAULTS" type="ARRAY" entryType="RadioFaultEnum" writable="false" optional="true">ActiveRadioFaults</attribute>
<attribute side="server" code="0x07" define="ACTIVE_NETWORK_FAULTS" type="ARRAY" entryType="NetworkFaultEnum" writable="false" optional="true">ActiveNetworkFaults</attribute>
<attribute side="server" code="0x08" define="TEST_EVENT_TRIGGERS_ENABLED" type="boolean" writable="false" optional="false">TestEventTriggersEnabled</attribute>
<!-- TODO(#30002): Remove AverageWearCount -->
<attribute side="server" code="0x09" define="AVERAGE_WEAR_COUNT" type="int32u" writable="false" default="0x00000000" optional="true">AverageWearCount</attribute>
<!--
WARNING !!!!! Attribute 0x0009 (previously AverageWearCount, see #30002/#29285)
was previously mistakenly added in SDK without being in spec and WAS REMOVED.
Previously (disallowed):
<attribute side="server" code="0x09" define="AVERAGE_WEAR_COUNT" type="int32u" writable="false" default="0x00000000" optional="true">AverageWearCount</attribute>
====== ID 0x0009 is reserved, do not use ======
-->

<command source="client" code="0x00" name="TestEventTrigger" optional="false">
<description>Provide a means for certification tests to trigger some test-plan-specific events</description>
Expand Down
3 changes: 1 addition & 2 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@
"RebootCount",
"UpTime",
"TotalOperationalHours",
"BootReason",
"AverageWearCount"
"BootReason"
],
"Group Key Management": [
"ClusterRevision",
Expand Down
3 changes: 1 addition & 2 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@
"RebootCount",
"UpTime",
"TotalOperationalHours",
"BootReason",
"AverageWearCount"
"BootReason"
],
"Group Key Management": [
"ClusterRevision",
Expand Down
1 change: 0 additions & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1786,7 +1786,6 @@ client cluster GeneralDiagnostics = 51 {
readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6;
readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7;
readonly attribute boolean testEventTriggersEnabled = 8;
readonly attribute optional int32u averageWearCount = 9;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6217,16 +6217,6 @@ public void subscribeTestEventTriggersEnabledAttribute(
subscribeTestEventTriggersEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readAverageWearCountAttribute(
LongAttributeCallback callback) {
readAverageWearCountAttribute(chipClusterPtr, callback);
}

public void subscribeAverageWearCountAttribute(
LongAttributeCallback callback, int minInterval, int maxInterval) {
subscribeAverageWearCountAttribute(chipClusterPtr, callback, minInterval, maxInterval);
}

public void readGeneratedCommandListAttribute(
GeneratedCommandListAttributeCallback callback) {
readGeneratedCommandListAttribute(chipClusterPtr, callback);
Expand Down Expand Up @@ -6323,10 +6313,6 @@ public void subscribeClusterRevisionAttribute(

private native void subscribeTestEventTriggersEnabledAttribute(long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval);

private native void readAverageWearCountAttribute(long chipClusterPtr, LongAttributeCallback callback);

private native void subscribeAverageWearCountAttribute(long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval);

private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback);

private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3752,7 +3752,6 @@ public enum Attribute {
ActiveRadioFaults(6L),
ActiveNetworkFaults(7L),
TestEventTriggersEnabled(8L),
AverageWearCount(9L),
GeneratedCommandList(65528L),
AcceptedCommandList(65529L),
EventList(65530L),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3187,17 +3187,6 @@ private static Map<String, InteractionInfo> readGeneralDiagnosticsInteractionInf
readGeneralDiagnosticsTestEventTriggersEnabledCommandParams
);
result.put("readTestEventTriggersEnabledAttribute", readGeneralDiagnosticsTestEventTriggersEnabledAttributeInteractionInfo);
Map<String, CommandParameterInfo> readGeneralDiagnosticsAverageWearCountCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readGeneralDiagnosticsAverageWearCountAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.GeneralDiagnosticsCluster) cluster).readAverageWearCountAttribute(
(ChipClusters.LongAttributeCallback) callback
);
},
() -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
readGeneralDiagnosticsAverageWearCountCommandParams
);
result.put("readAverageWearCountAttribute", readGeneralDiagnosticsAverageWearCountAttributeInteractionInfo);
Map<String, CommandParameterInfo> readGeneralDiagnosticsGeneratedCommandListCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readGeneralDiagnosticsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
Expand Down
16 changes: 0 additions & 16 deletions src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions src/controller/python/chip/clusters/CHIPClusters.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 0 additions & 18 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/darwin/Framework/CHIP/zap-generated/MTRClusters.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5940689

Please sign in to comment.