Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data-model] Add general diagnostics average wear count #29285

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a
bool isTestEventTriggersEnabled = IsTestEventTriggerEnabled();
return aEncoder.Encode(isTestEventTriggersEnabled);
}
case AverageWearCount::Id: {
return ReadIfSupported(&DiagnosticDataProvider::GetAverageWearCount, aEncoder);
}
default: {
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ 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>
<attribute side="server" code="0x09" define="AVERAGE_WEAR_COUNT" type="INT32U" min="0x00000000" max="0xFFFFFFFF" writable="false" default="0x00000000" optional="true">AverageWearCount</attribute>

<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: 2 additions & 1 deletion src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@
"RebootCount",
"UpTime",
"TotalOperationalHours",
"BootReason"
"BootReason",
"AverageWearCount"
],
"Group Key Management": [
"ClusterRevision",
Expand Down
3 changes: 2 additions & 1 deletion src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
"RebootCount",
"UpTime",
"TotalOperationalHours",
"BootReason"
"BootReason",
"AverageWearCount"
],
"Group Key Management": [
"ClusterRevision",
Expand Down
1 change: 1 addition & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,7 @@ 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 @@ -3746,6 +3746,7 @@ 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 @@ -3154,6 +3154,17 @@ 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: 16 additions & 0 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.

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

6 changes: 6 additions & 0 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: 18 additions & 0 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.

12 changes: 12 additions & 0 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.

44 changes: 44 additions & 0 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: 2 additions & 0 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.

8 changes: 8 additions & 0 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.

Loading