Skip to content

Commit

Permalink
Thread Diagnostic cluster - Encode structs and list attributes and fi…
Browse files Browse the repository at this point in the history
…x issues (#12181)

* Fix thread Diag ResetCounts to only reset overruns. TODO track in some way overruns

* Encode missing list and struct attributes, Tally Overrun Errors and fix reset, Fix RoutingRole to match Matter spec. Fix channel attribute type in the xlm

* regen

* Fix Shadow parameter error, when using encoder for the lists encoding

* Fix getting a Route table for Thread_MTD

* rebase regen

* remove commented code

* Regen again due to generated issue with bridge code

* rebase&regen

* address requested change for REED detection

* Fix FTD/REED logic

* rebase regen to fix conflicts again
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed Nov 30, 2021
1 parent 937a96a commit 1308223
Show file tree
Hide file tree
Showing 28 changed files with 268 additions and 147 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,8 @@ bool emberAfThreadNetworkDiagnosticsClusterResetCountsCallback(app::CommandHandl
const app::ConcreteCommandPath & commandPath,
const Commands::ResetCounts::DecodableType & commandData)
{
EmberAfStatus status = ThreadNetworkDiagnostics::Attributes::OverrunCount::Set(commandPath.mEndpointId, 0);
if (status != EMBER_ZCL_STATUS_SUCCESS)
{
ChipLogError(Zcl, "Failed to reset OverrunCount attribute");
}

ConnectivityMgr().ResetThreadNetworkDiagnosticsCounts();

emberAfSendImmediateDefaultResponse(status);
emberAfSendImmediateDefaultResponse(EMBER_ZCL_STATUS_SUCCESS);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ 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="INT8U" min="0x00" max="0xFF" writable="false" optional="false">channel</attribute>
<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="OCTET_STRING" length="16" writable="false" default="0" 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>
<!-- MESH_LOCAL_PREFIX See ipv6pre in the sepc for the String encoding -->
<attribute side="server" code="0x05" define="MESH_LOCAL_PREFIX" type="OCTET_STRING" length="17" writable="false" 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="false">OverrunCount</attribute>
Expand Down Expand Up @@ -154,11 +153,9 @@ limitations under the License.
<attribute side="server" code="0x38" define="ACTIVE_TIMESTAMP" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="true">ActiveTimestamp</attribute>
<attribute side="server" code="0x39" define="PENDING_TIMESTAMP" type="INT64U" min="0x0000000000000000" max="0xFFFFFFFFFFFFFFFF" writable="false" default="0x0000000000000000" optional="true">PendingTimestamp</attribute>
<attribute side="server" code="0x3A" define="DELAY" type="INT32U" min="0x00000000" max="0xFFFFFFFF" writable="false" default="0x0000" optional="true">delay</attribute>
<!--TODO Attribute with struct as type is not currently supported. See attr 0x3B - SECURITY_POLICY and 0x3D OPERATIONAL_DATASET_COMPONENTS -->
<!-- SECURITY_POLICY Length = 2 + (arraysize(1) * Size of Struct (4b))-->
<attribute side="server" code="0x3B" define="SECURITY_POLICY" type="ARRAY" entryType="SecurityPolicy" length="6" writable="false" optional="false">SecurityPolicy</attribute>
<attribute side="server" code="0x3C" define="DIAG_CHANNEL_MASK" type="OCTET_STRING" length="4" writable="false" optional="false">ChannelMask</attribute>
<!-- Attribute with struct as type is not currently supported -->
<!-- OPERATIONAL_DATASET_COMPONENTS Length = 2 + (arraysize(1) * Size of Struct (12b))-->
<attribute side="server" code="0x3D" define="OPERATIONAL_DATASET_COMPONENTS" type="ARRAY" entryType="OperationalDatasetComponents" length="14" writable="false" optional="false">OperationalDatasetComponents</attribute>
<attribute side="server" code="0x3E" define="ACTIVE_THREAD_NETWORK_FAULTS" type="ARRAY" entryType="NetworkFault" length="4" writable="false" optional="false">ActiveNetworkFaultsList</attribute>
Expand Down
4 changes: 2 additions & 2 deletions src/controller/java/zap-generated/CHIPClusters-JNI.cpp

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

4 changes: 2 additions & 2 deletions src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp

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

4 changes: 2 additions & 2 deletions src/controller/python/chip/clusters/CHIPClusters.cpp

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

8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.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 1308223

Please sign in to comment.