Skip to content

Commit

Permalink
Align Thread Network Diagnostics XML to the spec. (#26860)
Browse files Browse the repository at this point in the history
* Align Thread Network Diagnostics XML to the spec.

Spec changes happened in
https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6169 and
https://github.com/CHIP-Specifications/connectedhomeip-spec/pull/6338

Fixes #25339

* Auto-update ZAP files.

* Regenerate generated code.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jun 28, 2023
1 parent 085fb12 commit 1091274
Show file tree
Hide file tree
Showing 107 changed files with 2,537 additions and 3,155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1648,14 +1648,14 @@ server cluster ThreadNetworkDiagnostics = 53 {
kNotConnected = 1;
}

enum NetworkFault : ENUM8 {
enum NetworkFaultEnum : ENUM8 {
kUnspecified = 0;
kLinkDown = 1;
kHardwareFailure = 2;
kNetworkJammed = 3;
}

enum RoutingRole : ENUM8 {
enum RoutingRoleEnum : ENUM8 {
kUnspecified = 0;
kUnassigned = 1;
kSleepyEndDevice = 2;
Expand All @@ -1672,7 +1672,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
kMACCounts = 0x8;
}

struct NeighborTable {
struct NeighborTableStruct {
int64u extAddress = 0;
int32u age = 1;
int16u rloc16 = 2;
Expand Down Expand Up @@ -1704,7 +1704,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
boolean channelMaskPresent = 11;
}

struct RouteTable {
struct RouteTableStruct {
int64u extAddress = 0;
int16u rloc16 = 1;
int8u routerId = 2;
Expand All @@ -1727,19 +1727,19 @@ server cluster ThreadNetworkDiagnostics = 53 {
}

info event NetworkFaultChange = 1 {
NetworkFault current[] = 0;
NetworkFault previous[] = 1;
NetworkFaultEnum current[] = 0;
NetworkFaultEnum previous[] = 1;
}

readonly attribute nullable int16u channel = 0;
readonly attribute nullable RoutingRole routingRole = 1;
readonly attribute nullable RoutingRoleEnum 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 neighborTable[] = 7;
readonly attribute RouteTable routeTable[] = 8;
readonly attribute NeighborTableStruct neighborTable[] = 7;
readonly attribute RouteTableStruct routeTable[] = 8;
readonly attribute nullable int32u partitionId = 9;
readonly attribute nullable int8u weighting = 10;
readonly attribute nullable int8u dataVersion = 11;
Expand Down Expand Up @@ -1793,7 +1793,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
readonly attribute nullable SecurityPolicy securityPolicy = 59;
readonly attribute nullable octet_string<4> channelPage0Mask = 60;
readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
readonly attribute NetworkFault activeNetworkFaultsList[] = 62;
readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62;
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 @@ -3882,7 +3882,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down Expand Up @@ -25792,6 +25792,5 @@
"endpointVersion": 1,
"deviceIdentifier": 61442
}
],
"log": []
]
}
10 changes: 5 additions & 5 deletions examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId)
GeneralFaults<kMaxNetworkFaults> current;

// On Linux Simulation, set following radio faults statically.
ReturnOnFailure(previous.add(EMBER_ZCL_NETWORK_FAULT_ENUM_HARDWARE_FAILURE));
ReturnOnFailure(previous.add(EMBER_ZCL_NETWORK_FAULT_ENUM_NETWORK_JAMMED));
ReturnOnFailure(previous.add(to_underlying(Clusters::GeneralDiagnostics::NetworkFaultEnum::kHardwareFailure)));
ReturnOnFailure(previous.add(to_underlying(Clusters::GeneralDiagnostics::NetworkFaultEnum::kNetworkJammed)));

ReturnOnFailure(current.add(EMBER_ZCL_NETWORK_FAULT_ENUM_HARDWARE_FAILURE));
ReturnOnFailure(current.add(EMBER_ZCL_NETWORK_FAULT_ENUM_NETWORK_JAMMED));
ReturnOnFailure(current.add(EMBER_ZCL_NETWORK_FAULT_ENUM_CONNECTION_FAILED));
ReturnOnFailure(current.add(to_underlying(Clusters::GeneralDiagnostics::NetworkFaultEnum::kHardwareFailure)));
ReturnOnFailure(current.add(to_underlying(Clusters::GeneralDiagnostics::NetworkFaultEnum::kNetworkJammed)));
ReturnOnFailure(current.add(to_underlying(Clusters::GeneralDiagnostics::NetworkFaultEnum::kConnectionFailed)));
Clusters::GeneralDiagnosticsServer::Instance().OnNetworkFaultsDetect(previous, current);
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1492,14 +1492,14 @@ server cluster ThreadNetworkDiagnostics = 53 {
kNotConnected = 1;
}

enum NetworkFault : ENUM8 {
enum NetworkFaultEnum : ENUM8 {
kUnspecified = 0;
kLinkDown = 1;
kHardwareFailure = 2;
kNetworkJammed = 3;
}

enum RoutingRole : ENUM8 {
enum RoutingRoleEnum : ENUM8 {
kUnspecified = 0;
kUnassigned = 1;
kSleepyEndDevice = 2;
Expand All @@ -1516,7 +1516,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
kMACCounts = 0x8;
}

struct NeighborTable {
struct NeighborTableStruct {
int64u extAddress = 0;
int32u age = 1;
int16u rloc16 = 2;
Expand Down Expand Up @@ -1548,7 +1548,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
boolean channelMaskPresent = 11;
}

struct RouteTable {
struct RouteTableStruct {
int64u extAddress = 0;
int16u rloc16 = 1;
int8u routerId = 2;
Expand All @@ -1571,18 +1571,18 @@ server cluster ThreadNetworkDiagnostics = 53 {
}

info event NetworkFaultChange = 1 {
NetworkFault current[] = 0;
NetworkFault previous[] = 1;
NetworkFaultEnum current[] = 0;
NetworkFaultEnum previous[] = 1;
}

readonly attribute nullable int16u channel = 0;
readonly attribute nullable RoutingRole routingRole = 1;
readonly attribute nullable RoutingRoleEnum 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 NeighborTable neighborTable[] = 7;
readonly attribute RouteTable routeTable[] = 8;
readonly attribute NeighborTableStruct neighborTable[] = 7;
readonly attribute RouteTableStruct routeTable[] = 8;
readonly attribute nullable int32u partitionId = 9;
readonly attribute nullable int8u weighting = 10;
readonly attribute nullable int8u dataVersion = 11;
Expand All @@ -1591,7 +1591,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
readonly attribute nullable SecurityPolicy securityPolicy = 59;
readonly attribute nullable octet_string<4> channelPage0Mask = 60;
readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
readonly attribute NetworkFault activeNetworkFaultsList[] = 62;
readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62;
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 @@ -3806,7 +3806,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
20 changes: 10 additions & 10 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1034,14 +1034,14 @@ server cluster ThreadNetworkDiagnostics = 53 {
kNotConnected = 1;
}

enum NetworkFault : ENUM8 {
enum NetworkFaultEnum : ENUM8 {
kUnspecified = 0;
kLinkDown = 1;
kHardwareFailure = 2;
kNetworkJammed = 3;
}

enum RoutingRole : ENUM8 {
enum RoutingRoleEnum : ENUM8 {
kUnspecified = 0;
kUnassigned = 1;
kSleepyEndDevice = 2;
Expand All @@ -1058,7 +1058,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
kMACCounts = 0x8;
}

struct NeighborTable {
struct NeighborTableStruct {
int64u extAddress = 0;
int32u age = 1;
int16u rloc16 = 2;
Expand Down Expand Up @@ -1090,7 +1090,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
boolean channelMaskPresent = 11;
}

struct RouteTable {
struct RouteTableStruct {
int64u extAddress = 0;
int16u rloc16 = 1;
int8u routerId = 2;
Expand All @@ -1113,19 +1113,19 @@ server cluster ThreadNetworkDiagnostics = 53 {
}

info event NetworkFaultChange = 1 {
NetworkFault current[] = 0;
NetworkFault previous[] = 1;
NetworkFaultEnum current[] = 0;
NetworkFaultEnum previous[] = 1;
}

readonly attribute nullable int16u channel = 0;
readonly attribute nullable RoutingRole routingRole = 1;
readonly attribute nullable RoutingRoleEnum 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 neighborTable[] = 7;
readonly attribute RouteTable routeTable[] = 8;
readonly attribute NeighborTableStruct neighborTable[] = 7;
readonly attribute RouteTableStruct routeTable[] = 8;
readonly attribute nullable int32u partitionId = 9;
readonly attribute nullable int8u weighting = 10;
readonly attribute nullable int8u dataVersion = 11;
Expand Down Expand Up @@ -1179,7 +1179,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
readonly attribute nullable SecurityPolicy securityPolicy = 59;
readonly attribute nullable octet_string<4> channelPage0Mask = 60;
readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
readonly attribute NetworkFault activeNetworkFaultsList[] = 62;
readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2559,7 +2559,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
20 changes: 10 additions & 10 deletions examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter
Original file line number Diff line number Diff line change
Expand Up @@ -916,14 +916,14 @@ server cluster ThreadNetworkDiagnostics = 53 {
kNotConnected = 1;
}

enum NetworkFault : ENUM8 {
enum NetworkFaultEnum : ENUM8 {
kUnspecified = 0;
kLinkDown = 1;
kHardwareFailure = 2;
kNetworkJammed = 3;
}

enum RoutingRole : ENUM8 {
enum RoutingRoleEnum : ENUM8 {
kUnspecified = 0;
kUnassigned = 1;
kSleepyEndDevice = 2;
Expand All @@ -940,7 +940,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
kMACCounts = 0x8;
}

struct NeighborTable {
struct NeighborTableStruct {
int64u extAddress = 0;
int32u age = 1;
int16u rloc16 = 2;
Expand Down Expand Up @@ -972,7 +972,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
boolean channelMaskPresent = 11;
}

struct RouteTable {
struct RouteTableStruct {
int64u extAddress = 0;
int16u rloc16 = 1;
int8u routerId = 2;
Expand All @@ -995,19 +995,19 @@ server cluster ThreadNetworkDiagnostics = 53 {
}

info event NetworkFaultChange = 1 {
NetworkFault current[] = 0;
NetworkFault previous[] = 1;
NetworkFaultEnum current[] = 0;
NetworkFaultEnum previous[] = 1;
}

readonly attribute nullable int16u channel = 0;
readonly attribute nullable RoutingRole routingRole = 1;
readonly attribute nullable RoutingRoleEnum 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 neighborTable[] = 7;
readonly attribute RouteTable routeTable[] = 8;
readonly attribute NeighborTableStruct neighborTable[] = 7;
readonly attribute RouteTableStruct routeTable[] = 8;
readonly attribute nullable int32u partitionId = 9;
readonly attribute nullable int8u weighting = 10;
readonly attribute nullable int8u dataVersion = 11;
Expand Down Expand Up @@ -1061,7 +1061,7 @@ server cluster ThreadNetworkDiagnostics = 53 {
readonly attribute nullable SecurityPolicy securityPolicy = 59;
readonly attribute nullable octet_string<4> channelPage0Mask = 60;
readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61;
readonly attribute NetworkFault activeNetworkFaultsList[] = 62;
readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62;
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 @@ -3076,7 +3076,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3124,7 +3124,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3076,7 +3076,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_fan_7N2TobIlOX.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3124,7 +3124,7 @@
"code": 1,
"mfgCode": null,
"side": "server",
"type": "RoutingRole",
"type": "RoutingRoleEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
Expand Down
Loading

0 comments on commit 1091274

Please sign in to comment.