Skip to content

Commit

Permalink
Mark attributes nullable as needed for Thread Network Diagnostics clu…
Browse files Browse the repository at this point in the history
…ster (#18531)

* Mark attributes nullable as needed for Thread Network Diagnostics cluster

* Run codegen
  • Loading branch information
yufengwangca authored and pull[bot] committed Jan 19, 2024
1 parent 49065d1 commit 8ef1823
Show file tree
Hide file tree
Showing 46 changed files with 1,429 additions and 472 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3398,8 +3398,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -3445,12 +3445,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -955,12 +955,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1491,12 +1491,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1431,8 +1431,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1478,12 +1478,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1593,8 +1593,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1640,12 +1640,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/pump-app/pump-common/pump-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1447,12 +1447,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1127,8 +1127,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1174,12 +1174,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/thermostat/thermostat-common/thermostat.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1136,8 +1136,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1183,12 +1183,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1813,12 +1813,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/tv-casting-app/tv-casting-common/tv-casting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1943,8 +1943,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1990,12 +1990,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
16 changes: 8 additions & 8 deletions examples/window-app/common/window-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1164,8 +1164,8 @@ server cluster ThreadNetworkDiagnostics = 53 {
int32u linkFrameCounter = 3;
int32u mleFrameCounter = 4;
int8u lqi = 5;
int8s averageRssi = 6;
int8s lastRssi = 7;
nullable int8s averageRssi = 6;
nullable int8s lastRssi = 7;
int8u frameErrorRate = 8;
int8u messageErrorRate = 9;
boolean rxOnWhenIdle = 10;
Expand Down Expand Up @@ -1211,12 +1211,12 @@ server cluster ThreadNetworkDiagnostics = 53 {
ThreadConnectionStatus connectionStatus = 0;
}

readonly attribute int16u channel = 0;
readonly attribute enum8 routingRole = 1;
readonly attribute char_string<16> networkName = 2;
readonly attribute int16u panId = 3;
readonly attribute int64u extendedPanId = 4;
readonly attribute octet_string<17> meshLocalPrefix = 5;
readonly attribute nullable int16u channel = 0;
readonly attribute nullable enum8 routingRole = 1;
readonly attribute nullable char_string<16> networkName = 2;
readonly attribute nullable int16u panId = 3;
readonly attribute nullable int64u extendedPanId = 4;
readonly attribute nullable octet_string<17> meshLocalPrefix = 5;
readonly attribute int64u overrunCount = 6;
readonly attribute NeighborTable neighborTableList[] = 7;
readonly attribute RouteTable routeTableList[] = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ tests:
command: "readAttribute"
attribute: "NetworkName"
response:
constraints:
type: string
maxLength: 16
value: ""

- label:
"read NetworkName attribute from DUT and verify response value, If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ limitations under the License.
<item name="LinkFrameCounter" type="INT32U"/>
<item name="MleFrameCounter" type="INT32U"/>
<item name="LQI" type="INT8U"/>
<item name="AverageRssi" type="INT8S"/>
<item name="LastRssi" type="INT8S"/>
<item name="AverageRssi" type="INT8S" isNullable="true"/>
<item name="LastRssi" type="INT8S" isNullable="true"/>
<item name="FrameErrorRate" type="INT8U"/>
<item name="MessageErrorRate" type="INT8U"/>
<item name="RxOnWhenIdle" type="BOOLEAN"/>
Expand Down Expand Up @@ -91,12 +91,12 @@ limitations under the License.
<code>0x0035</code>
<define>THREAD_NETWORK_DIAGNOSTICS_CLUSTER</define>
<description>The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems</description>
<attribute side="server" code="0x00" define="CHANNEL" type="INT16U" min="0x00" max="0xFFFF" writable="false" optional="false">channel</attribute>
<attribute side="server" code="0x01" define="ROUTING_ROLE" type="ENUM8" writable="false" optional="false">RoutingRole</attribute>
<attribute side="server" code="0x02" define="NETWORK_NAME" type="CHAR_STRING" length="16" writable="false" default="" optional="false">NetworkName</attribute>
<attribute side="server" code="0x03" define="DIAG_PAN_ID" type="INT16U" min="0x0000" max="0xFFFF" writable="false" default="0x0000" optional="false">PanId</attribute>
<attribute side="server" code="0x04" define="DIAG_EXTENDED_PAN_ID" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="false">ExtendedPanId</attribute>
<attribute side="server" code="0x05" define="MESH_LOCAL_PREFIX" type="OCTET_STRING" length="17" writable="false" optional="false">MeshLocalPrefix</attribute>
<attribute side="server" code="0x00" define="CHANNEL" type="INT16U" min="0x00" max="0xFFFF" writable="false" isNullable="true" optional="false">channel</attribute>
<attribute side="server" code="0x01" define="ROUTING_ROLE" type="ENUM8" writable="false" isNullable="true" optional="false">RoutingRole</attribute>
<attribute side="server" code="0x02" define="NETWORK_NAME" type="CHAR_STRING" length="16" writable="false" default="" isNullable="true" optional="false">NetworkName</attribute>
<attribute side="server" code="0x03" define="DIAG_PAN_ID" type="INT16U" min="0x0000" max="0xFFFF" writable="false" default="0x0000" isNullable="true" optional="false">PanId</attribute>
<attribute side="server" code="0x04" define="DIAG_EXTENDED_PAN_ID" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" isNullable="true" optional="false">ExtendedPanId</attribute>
<attribute side="server" code="0x05" define="MESH_LOCAL_PREFIX" type="OCTET_STRING" length="17" writable="false" isNullable="true" optional="false">MeshLocalPrefix</attribute>
<!-- OVERRUN_COUNT Conformance feature [ERRCNT] - for now mandatory -->
<attribute side="server" code="0x06" define="DIAG_OVERRUN_COUNT" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="true">OverrunCount</attribute>
<attribute side="server" code="0x07" define="NEIGHBOR_TABLE" type="ARRAY" entryType="NeighborTable" length="254" writable="false" optional="false">NeighborTableList</attribute>
Expand Down
Loading

0 comments on commit 8ef1823

Please sign in to comment.