Skip to content

Commit

Permalink
Access generation in idl (#17282)
Browse files Browse the repository at this point in the history
* Add generation of access privileges in IDL files

* Restyle

* Ran zap regen
  • Loading branch information
andy31415 authored and pull[bot] committed Feb 21, 2024
1 parent 58bbaf0 commit 1503044
Show file tree
Hide file tree
Showing 22 changed files with 1,133 additions and 1,046 deletions.
192 changes: 96 additions & 96 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

Large diffs are not rendered by default.

84 changes: 42 additions & 42 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ client cluster AccessControl = 31 {
fabric_idx fabricIndex = 254;
}

info event AccessControlEntryChanged = 0 {
info event access(read: administer) AccessControlEntryChanged = 0 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlEntry latestValue = 4;
fabric_idx adminFabricIndex = 254;
}

info event AccessControlExtensionChanged = 1 {
info event access(read: administer) AccessControlExtensionChanged = 1 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable ExtensionEntry latestValue = 4;
fabric_idx adminFabricIndex = 254;
}

attribute AccessControlEntry acl[] = 0;
attribute ExtensionEntry extension[] = 1;
attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0;
attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1;
readonly attribute int16u subjectsPerAccessControlEntry = 2;
readonly attribute int16u targetsPerAccessControlEntry = 3;
readonly attribute int16u accessControlEntriesPerFabric = 4;
Expand Down Expand Up @@ -111,24 +111,24 @@ server cluster AccessControl = 31 {
fabric_idx fabricIndex = 254;
}

info event AccessControlEntryChanged = 0 {
info event access(read: administer) AccessControlEntryChanged = 0 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlEntry latestValue = 4;
fabric_idx adminFabricIndex = 254;
}

info event AccessControlExtensionChanged = 1 {
info event access(read: administer) AccessControlExtensionChanged = 1 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable ExtensionEntry latestValue = 4;
fabric_idx adminFabricIndex = 254;
}

attribute AccessControlEntry acl[] = 0;
attribute ExtensionEntry extension[] = 1;
attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0;
attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1;
readonly attribute int16u subjectsPerAccessControlEntry = 2;
readonly attribute int16u targetsPerAccessControlEntry = 3;
readonly attribute int16u accessControlEntriesPerFabric = 4;
Expand Down Expand Up @@ -166,9 +166,9 @@ server cluster AdministratorCommissioning = 60 {
INT16U commissioningTimeout = 0;
}

timed command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0;
timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1;
timed command RevokeCommissioning(): DefaultSuccess = 2;
timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0;
timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1;
timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2;
}

server cluster Basic = 40 {
Expand Down Expand Up @@ -196,8 +196,8 @@ server cluster Basic = 40 {
readonly attribute vendor_id vendorID = 2;
readonly attribute char_string<32> productName = 3;
readonly attribute int16u productID = 4;
attribute char_string<32> nodeLabel = 5;
attribute char_string<2> location = 6;
attribute access(write: manage) char_string<32> nodeLabel = 5;
attribute access(write: administer) char_string<2> location = 6;
readonly attribute int16u hardwareVersion = 7;
readonly attribute char_string<64> hardwareVersionString = 8;
readonly attribute int32u softwareVersion = 9;
Expand All @@ -207,7 +207,7 @@ server cluster Basic = 40 {
readonly attribute long_char_string<256> productURL = 13;
readonly attribute char_string<64> productLabel = 14;
readonly attribute char_string<32> serialNumber = 15;
attribute boolean localConfigDisabled = 16;
attribute access(write: manage) boolean localConfigDisabled = 16;
readonly attribute boolean reachable = 17;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
Expand Down Expand Up @@ -308,7 +308,7 @@ server cluster GeneralCommissioning = 48 {
INT16U failSafeExpiryLengthSeconds = 0;
}

attribute int64u breadcrumb = 0;
attribute access(write: administer) int64u breadcrumb = 0;
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
Expand Down Expand Up @@ -342,9 +342,9 @@ server cluster GeneralCommissioning = 48 {
CHAR_STRING debugText = 1;
}

command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
command CommissioningComplete(): CommissioningCompleteResponse = 4;
command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
}

server cluster GeneralDiagnostics = 51 {
Expand Down Expand Up @@ -468,7 +468,7 @@ server cluster LevelControl = 8 {
attribute nullable int16u onTransitionTime = 18;
attribute nullable int16u offTransitionTime = 19;
attribute nullable int8u defaultMoveRate = 20;
attribute nullable int8u startUpCurrentLevel = 16384;
attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -595,14 +595,14 @@ server cluster NetworkCommissioning = 49 {
INT8U lqi = 7;
}

readonly attribute int8u maxNetworks = 0;
readonly attribute NetworkInfo networks[] = 1;
readonly attribute access(read: administer) int8u maxNetworks = 0;
readonly attribute access(read: administer) NetworkInfo networks[] = 1;
readonly attribute int8u scanMaxTimeSeconds = 2;
readonly attribute int8u connectMaxTimeSeconds = 3;
attribute boolean interfaceEnabled = 4;
readonly attribute nullable NetworkCommissioningStatus lastNetworkingStatus = 5;
readonly attribute nullable octet_string<32> lastNetworkID = 6;
readonly attribute nullable int32s lastConnectErrorValue = 7;
attribute access(write: administer) boolean interfaceEnabled = 4;
readonly attribute access(read: administer) nullable NetworkCommissioningStatus lastNetworkingStatus = 5;
readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6;
readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -657,12 +657,12 @@ server cluster NetworkCommissioning = 49 {
nullable INT32S errorValue = 2;
}

command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0;
command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2;
command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3;
command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4;
command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6;
command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8;
command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0;
command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2;
command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3;
command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4;
command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6;
command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8;
}

server cluster OnOff = 6 {
Expand Down Expand Up @@ -732,7 +732,7 @@ server cluster OperationalCredentials = 62 {
fabric_idx fabricIndex = 254;
}

readonly attribute NOCStruct NOCs[] = 0;
readonly attribute access(read: administer) NOCStruct NOCs[] = 0;
readonly attribute FabricDescriptor fabrics[] = 1;
readonly attribute int8u supportedFabrics = 2;
readonly attribute int8u commissionedFabrics = 3;
Expand Down Expand Up @@ -801,15 +801,15 @@ server cluster OperationalCredentials = 62 {
optional CHAR_STRING debugText = 2;
}

command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
command CSRRequest(CSRRequestRequest): CSRResponse = 4;
command AddNOC(AddNOCRequest): NOCResponse = 6;
command UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
command RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12;
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
command access(invoke: administer) RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12;
}

server cluster SoftwareDiagnostics = 52 {
Expand Down Expand Up @@ -1066,7 +1066,7 @@ server cluster UnitLocalization = 45 {
}

server cluster UserLabel = 65 {
attribute LabelStruct labelList[] = 0;
attribute access(write: manage) LabelStruct labelList[] = 0;
readonly attribute int16u clusterRevision = 65533;
}

Expand Down
Loading

0 comments on commit 1503044

Please sign in to comment.