Skip to content

Commit

Permalink
Update Ethernet Diagnostics Cluster to match the spec (#30064)
Browse files Browse the repository at this point in the history
* Add manage restriction to ResetCounts to EthDiag

* Zap regen
  • Loading branch information
andy31415 authored and pull[bot] committed Dec 11, 2023
1 parent 62cdf4e commit 2938689
Show file tree
Hide file tree
Showing 21 changed files with 28 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1979,7 +1979,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1487,7 +1487,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1491,7 +1491,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
Expand Down
2 changes: 1 addition & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on
Expand Down
2 changes: 1 addition & 1 deletion examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
2 changes: 1 addition & 1 deletion examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,7 @@ server cluster EthernetNetworkDiagnostics = 55 {
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Commands to trigger a Node to allow a new Administrator to commission it. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@
0x00000031, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0x00000033, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0x00000037, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
Expand Down Expand Up @@ -462,6 +463,7 @@
0x00000006, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
0x00000008, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0x00000000, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0x00000000, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \
0x00000000, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
0x00000001, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
0x00000002, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
Expand Down Expand Up @@ -514,6 +516,7 @@
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
0x00000031, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
0x00000031, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0x00000033, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0x00000037, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
0x0000003C, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
Expand Down Expand Up @@ -207,6 +208,7 @@
0x00000006, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
0x00000008, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
0x00000000, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
0x00000000, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \
0x00000000, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
0x00000001, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
0x00000002, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
Expand Down Expand Up @@ -242,6 +244,7 @@
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \
kMatterAccessPrivilegeManage, /* Cluster: General Diagnostics, Command: TestEventTrigger, Privilege: manage */ \
kMatterAccessPrivilegeManage, /* Cluster: Ethernet Network Diagnostics, Command: ResetCounts, Privilege: manage */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \
kMatterAccessPrivilegeAdminister, /* Cluster: Administrator Commissioning, Command: RevokeCommissioning, Privilege: administer */ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ limitations under the License.
<item name="Rate40G" value="0x06"/>
<item name="Rate100G" value="0x07"/>
<item name="Rate200G" value="0x08"/>
<item name="Rate400G" value="0x09"/>
<item name="Rate400G" value="0x09"/>
</enum>
<bitmap name="Feature" type="bitmap32">
<cluster code="0x0037"/>
<field name="PacketCounts" mask="0x1"/>
<field name="ErrorCounts" mask="0x2"/>
</bitmap>
</bitmap>
<cluster>
<domain>General</domain>
<name>Ethernet Network Diagnostics</name>
Expand All @@ -51,6 +51,7 @@ limitations under the License.
<attribute side="server" code="0x08" define="TIME_SINCE_RESET" type="int64u" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="true">TimeSinceReset</attribute>
<command source="client" code="0x00" name="ResetCounts" optional="false" cli="chip ethernet_network_diagnostics resetcounts">
<description>Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0</description>
</command>
<access op="invoke" role="manage"/>
</command>
</cluster>
</configurator>
2 changes: 1 addition & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,7 @@ client cluster EthernetNetworkDiagnostics = 55 {
readonly attribute int16u clusterRevision = 65533;

/** Reception of this command SHALL reset the attributes: PacketRxCount, PacketTxCount, TxErrCount, CollisionCount, OverrunCount to 0 */
command ResetCounts(): DefaultSuccess = 0;
command access(invoke: manage) ResetCounts(): DefaultSuccess = 0;
}

/** Accurate time is required for a number of reasons, including scheduling, display and validating security materials. */
Expand Down

0 comments on commit 2938689

Please sign in to comment.