Skip to content

Commit

Permalink
xml: Add PDC support to Network Commissioning cluster (#30191)
Browse files Browse the repository at this point in the history
* xml: AddOrUpdateWiFiNetwork.breadcrumb -> Breadcrumb

zap_regen_all does not produce any code changes for this change.

* xml: Add PDC support to Network Commissioning cluster

* QueryIdentityResponse command should be optional

* Fix optionality of other commands

ScanNetworks, RemoveNetwork, ReorderNetwork, and ConnectNetwork are not mandatory.

* Add Darwin availability

* zap_regen_all

* Remove cli attribute for response

* Fix codegen of provisional command fields in darwin-framework-tool

Fixes #29969
  • Loading branch information
ksperling-apple authored and pull[bot] committed Nov 29, 2023
1 parent 2df48fe commit 3273048
Show file tree
Hide file tree
Showing 110 changed files with 2,350 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -499,11 +500,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -550,6 +554,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -584,6 +591,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -493,11 +494,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -544,6 +548,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -578,6 +585,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -1435,11 +1436,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -1486,6 +1490,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -1520,6 +1527,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -1259,11 +1260,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -1310,6 +1314,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -1344,6 +1351,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
9 changes: 9 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -767,11 +768,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -818,6 +822,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -852,6 +859,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -419,11 +420,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -470,6 +474,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -504,6 +511,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -548,11 +549,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -599,6 +603,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -633,6 +640,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -554,11 +555,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -605,6 +609,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -639,6 +646,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ server cluster NetworkCommissioning = 49 {
kWiFiNetworkInterface = 0x1;
kThreadNetworkInterface = 0x2;
kEthernetNetworkInterface = 0x4;
kPerDeviceCredentials = 0x8;
}

bitmap ThreadCapabilitiesBitmap : bitmap16 {
Expand All @@ -731,11 +732,14 @@ server cluster NetworkCommissioning = 49 {
kWPAPersonal = 0x4;
kWPA2Personal = 0x8;
kWPA3Personal = 0x10;
kWPA3MatterPDC = 0x20;
}

struct NetworkInfoStruct {
octet_string<32> networkID = 0;
boolean connected = 1;
optional nullable octet_string<20> networkIdentifier = 2;
optional nullable octet_string<20> clientIdentifier = 3;
}

struct ThreadInterfaceScanResultStruct {
Expand Down Expand Up @@ -782,6 +786,9 @@ server cluster NetworkCommissioning = 49 {
octet_string<32> ssid = 0;
octet_string<64> credentials = 1;
optional int64u breadcrumb = 2;
optional octet_string<140> networkIdentity = 3;
optional octet_string<20> clientIdentifier = 4;
optional octet_string<32> possessionNonce = 5;
}

request struct AddOrUpdateThreadNetworkRequest {
Expand Down Expand Up @@ -816,6 +823,8 @@ server cluster NetworkCommissioning = 49 {
NetworkCommissioningStatusEnum networkingStatus = 0;
optional char_string<512> debugText = 1;
optional int8u networkIndex = 2;
optional octet_string<140> clientIdentity = 3;
optional octet_string<64> possessionSignature = 4;
}

response struct ConnectNetworkResponse = 7 {
Expand Down
Loading

0 comments on commit 3273048

Please sign in to comment.