Skip to content

Commit

Permalink
Fix spec-compliance of Administrator Commissioning attributes. (#21442)
Browse files Browse the repository at this point in the history
* Move management of the AdminVendorId and AdminFabricIndex to the
  commissioning window opener.
* Fix the types of the attributes in the XML to be nullable.
* Implement the spec provisions about returning null for the fabric
  index when the fabric gets removed.
* Implement the spec provisions about returning "window not open" when
  it was opened via non-cluster means (e.g. boot time.

Fixes #20882
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Oct 10, 2023
1 parent 5c57afc commit 5643041
Show file tree
Hide file tree
Showing 97 changed files with 2,283 additions and 394 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1521,8 +1521,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1208,8 +1208,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1058,8 +1058,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1280,8 +1280,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1306,8 +1306,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1313,8 +1313,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,8 +1372,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1219,8 +1219,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1193,8 +1193,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1169,8 +1169,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,8 +1263,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1209,8 +1209,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1140,8 +1140,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1217,8 +1217,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1217,8 +1217,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/pump-app/pump-common/pump-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/thermostat/thermostat-common/thermostat.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1175,8 +1175,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/tv-app/tv-common/tv-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1217,8 +1217,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down
4 changes: 2 additions & 2 deletions examples/window-app/common/window-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1216,8 +1216,8 @@ server cluster AdministratorCommissioning = 60 {
}

readonly attribute int8u windowStatus = 0;
readonly attribute fabric_idx adminFabricIndex = 1;
readonly attribute int16u adminVendorId = 2;
readonly attribute nullable fabric_idx adminFabricIndex = 1;
readonly attribute nullable int16u adminVendorId = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
Expand Down
Loading

0 comments on commit 5643041

Please sign in to comment.