Skip to content

Commit

Permalink
[Diagnostics]: Add event definitions for diagnostic clusters (#11610)
Browse files Browse the repository at this point in the history
* Add event definitions for diagnostic clusters

* Run codegen
  • Loading branch information
yufengwangca authored and pull[bot] committed Dec 5, 2022
1 parent 862e5ce commit 4345284
Show file tree
Hide file tree
Showing 10 changed files with 908 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,24 @@ limitations under the License.
<attribute side="server" code="0x05" define="ACTIVE_HARDWARE_FAULTS" type="ARRAY" entryType="ENUM8" length="254" writable="false" optional="true">ActiveHardwareFaults</attribute>
<attribute side="server" code="0x06" define="ACTIVE_RADIO_FAULTS" type="ARRAY" entryType="ENUM8" length="254" writable="false" optional="true">ActiveRadioFaults</attribute>
<attribute side="server" code="0x07" define="ACTIVE_NETWORK_FAULTS" type="ARRAY" entryType="ENUM8" length="254" writable="false" optional="true">ActiveNetworkFaults</attribute>
<event side="server" code="0x00" name="HardwareFaultChange" priority="critical" optional="true">
<description>Indicate a change in the set of hardware faults currently detected by the Node.</description>
<field id="0" name="Current" type="HardwareFaultType" array="true"/>
<field id="1" name="Previous" type="HardwareFaultType" array="true"/>
</event>
<event side="server" code="0x01" name="RadioFaultChange" priority="critical" optional="true">
<description>Indicate a change in the set of radio faults currently detected by the Node.</description>
<field id="0" name="Current" type="RadioFaultType" array="true"/>
<field id="1" name="Previous" type="RadioFaultType" array="true"/>
</event>
<event side="server" code="0x02" name="NetworkFaultChange" priority="critical" optional="true">
<description>Indicate a change in the set of network faults currently detected by the Node.</description>
<field id="0" name="Current" type="NetworkFaultType" array="true"/>
<field id="1" name="Previous" type="NetworkFaultType" array="true"/>
</event>
<event side="server" code="0x03" name="BootReason" priority="critical" optional="false">
<description>Indicate the reason that caused the device to start-up.</description>
<field id="0" name="BootReason" type="BootReasonType"/>
</event>
</cluster>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ limitations under the License.
<item name="StackFreeMinimum" type="INT32U"/>
<item name="StackSize" type="INT32U"/>
</struct>
<struct name="SoftwareFault">
<cluster code="0x0034"/>
<item name="Id" type="INT64U"/>
<item name="Name" type="CHAR_STRING" length="8"/>
<item name="FaultRecording" type="OCTET_STRING" length="1024"/>
</struct>
<cluster>
<domain>General</domain>
<name>Software Diagnostics</name>
Expand All @@ -35,7 +41,11 @@ limitations under the License.
<attribute side="server" code="0x02" define="CURRENT_HEAP_USED" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="true">CurrentHeapUsed</attribute>
<attribute side="server" code="0x03" define="CURRENT_HEAP_HIGH_WATERMARK" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="false">CurrentHeapHighWatermark</attribute>
<command source="client" code="0x00" name="ResetWatermarks" optional="false" cli="chip software_diagnostics resetwatermarks">
<description>Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute</description>
<description>Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute.</description>
</command>
<event side="server" code="0x00" name="SoftwareFault" priority="info" optional="true">
<description>Indicate the last software fault that has taken place on the Node.</description>
<field id="0" name="SoftwareFault" type="SoftwareFault"/>
</event>
</cluster>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ limitations under the License.
<item name="Router" value="0x05"/>
<item name="Leader" value="0x06"/>
</enum>
<enum name="ThreadConnectionStatus" type="ENUM8">
<cluster code="0x0035"/>
<item name="Connected" value="0x00"/>
<item name="NotConnected" value="0x01"/>
</enum>
<struct name="NeighborTable">
<cluster code="0x0035"/>
<item name="ExtAddress" type="INT64U"/>
Expand Down Expand Up @@ -159,6 +164,10 @@ limitations under the License.
<attribute side="server" code="0x3E" define="ACTIVE_THREAD_NETWORK_FAULTS" type="ARRAY" entryType="NetworkFault" length="4" writable="false" optional="false">ActiveNetworkFaultsList</attribute>
<command source="client" code="0x00" name="ResetCounts" optional="true" cli="chip thread_network_diagnostics resetcounts">
<description>Reception of this command SHALL reset the OverrunCount attributes to 0</description>
</command>
</command>
<event side="server" code="0x00" name="ConnectionStatus" priority="info" optional="true">
<description>Indicate that a Node’s connection status to a Thread network has changed</description>
<field id="0" name="ConnectionStatus" type="ThreadConnectionStatus"/>
</event>
</cluster>
</configurator>
</configurator>
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,18 @@ limitations under the License.
<item name="802.11n" value="0x03"/>
<item name="802.11ac" value="0x04"/>
<item name="802.11ax" value="0x05"/>
</enum>
<enum name="AssociationFailureCause" type="ENUM8">
<cluster code="0x0036"/>
<item name="Unknown" value="0x00"/>
<item name="AssociationFailed" value="0x01"/>
<item name="AuthenticationFailed" value="0x02"/>
<item name="SsidNotFound" value="0x03"/>
</enum>
<enum name="WiFiConnectionStatus" type="ENUM8">
<cluster code="0x0036"/>
<item name="Connected" value="0x00"/>
<item name="NotConnected" value="0x01"/>
</enum>
<cluster>
<domain>General</domain>
Expand All @@ -55,6 +67,19 @@ limitations under the License.
<attribute side="server" code="0x0C" define="OVERRUN_COUNT" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="true">OverrunCount</attribute>
<command source="client" code="0x00" name="ResetCounts" optional="true" cli="chip wifi_network_diagnostics resetcounts">
<description>Reception of this command SHALL reset the Breacon and Packet related count attributes to 0</description>
</command>
</command>
<event side="server" code="0x00" name="Disconnection" priority="info" optional="true">
<description>Indicate that a Node’s Wi-Fi connection has been disconnected as a result of de-authenticated or dis-association and indicates the reason.</description>
<field id="0" name="ReasonCode" type="INT16U"/>
</event>
<event side="server" code="0x01" name="AssociationFailure" priority="info" optional="true">
<description>Indicate that a Node has failed to connect, or reconnect, to a Wi-Fi access point.</description>
<field id="0" name="AssociationFailure" type="AssociationFailureCause"/>
<field id="1" name="Status" type="INT16U"/>
</event>
<event side="server" code="0x02" name="ConnectionStatus" priority="info" optional="true">
<description>Indicate that a Node’s connection status to a Wi-Fi network has changed.</description>
<field id="0" name="ConnectionStatus" type="WiFiConnectionStatus"/>
</event>
</cluster>
</configurator>
32 changes: 32 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.

Loading

0 comments on commit 4345284

Please sign in to comment.