From f59dbe1ecf7085adf0b57434cec833cd6f7a7643 Mon Sep 17 00:00:00 2001 From: Bharat Raju Date: Wed, 11 May 2022 18:51:53 -0400 Subject: [PATCH] Update zap data type schema (#17645) * Clean up for the new data type schema rework - Getting rid of StringHelper.js file from the chip repo into the zap repo and modifying the templates.json files accordingly - Updating the zcl.json files to include the definition of ZCL data types - Updating the xml files such that we do not have like named data types of the same type with a separate definition. - Updating the xml files with the removal of cluster code references which are no longer defined - JIRA: ZAPP-757 * rebasing chip repos master into my masster fork * Changes for cleaner regen - Making changes to ClusterHelper.js such that we return the correct enum and bitmap ItemTypes for enums and bitmaps based on size - In ClusterHelper.js , made changes to the handleString call in enhancedItem because I ran into some unresolved promise issue. Rest of the changes are a result of formatting using restyle-diff script - Some cleanup in ClusterTestGeneration.js - Moved StringHelper.js from outside the chip repo into the zap repo. Will need to do this for all the files eventually. This lead to a changes in a couple of files in the requires - Some changes to structure-member.zapt for displaying the type - Changes to cluster-enums.zapt, enums.zapt since the enuma dn bitmap tables no longer have type. Just the name. - Made changes to MatterIDL.zapt based on size - Made changes o channel-cluster.xml and ha.xml to avoid renaming of enums with different definitions. - The changes to the .h, cpp, .mm files is a result of the detection of enums, bitmaps correctly for attributes types and command args. - Updating the pointer to the zap repo - Changes made from some isString helper calls to if_is_string helper calls in zapt files because they were causing some application regens to pass successfully without generating - JIRA: ZAPP-757 * Updating the zap repo pointer JIRA: ZAPP-757 * Regening after rebase JIRA: ZAPP-757 * Reverting the changes on StringHelper and putting it back in the matter repo. JIRA: ZAPP-757 * Reverting the template changes for 2 apps and doing a regen Updating the pointer to zap JIRA: ZAPP-757 * Reverting the template changes for an app and doing a regen JIRA: ZAPP-757 * Reverting the changes to the zapt template files JIRA: ZAPP-757 * Reverting the changes to ClustersHelper.js and structure_member.zapt template JIRA: ZAPP-757 * Update helper.js Reverting the restyle diff changes * Update helper.js Removing unused require * Running a restyle diff on ClusterHelper.js * xml cleanup, Regen and zap repo update - Updating the cluster codes in types.xml. These were removed for some reason due the those cluster codes not existing for some meta data files. However I am not seeing that now so adding them back. - Doing a regen with the above change - Updating the zap repo - JIRA: ZAPP-757 * Cleaning up ClustersHelper.js JIRa: ZAPP-757 * running a restyle-diff on the js file JIRA: ZAPP-757 * cleanup JIRA: ZAPP-757 * cleanup JIRA: ZAPP-757 * Reverting the change in zll.xml on a cluster extension code which doesn't exist. This will be done on a spearate PR JIRa: ZAPP-757 * Regening after rebasing JIRA: ZAPP-757 * Renaming StatusEnums with cluster name prefix JIRA: ZAPP-757 * Regening after rebase JIRA: ZAPP-757 * minor clean up and defining Status in the types.xml because it is not determining the item referring to status type for ReadAttributeStatusRecord struct JIRA: ZAPP-757 * Rebasing upstream/master and regeing JIRA: ZAPP-757 * Returning the right c type when the data type is an enum or bitmap in src/app/zap-templates/templates/app/helper.js#zapTypeToClusterObjectType Regening all the apps with the above change JIRA: ZAPP-757 * Regen after rebase * Cleaning up for enum and bitmap size of 3 and 6 because they do not have equivalent c data types JIRA: ZAPP-757 * minor cleanup * Cleaning up the decodable_value.zapt templates to remove .Raw() for bitmaps JIRA: ZAPP-757 * Reverting the previous change JIRA: ZAPP-757 * Rebasing and regening JIRa: ZAPP-757 * Updating the zap repo and cleaning up a merge conflict I missed JIRA: ZAPP-757 * Cleaning up the Accessors by making sure the right ZCL attribute types are referred too. The corresponding change for this was made in the determineType helper in zcl-util.js(zap repo) JIRA: ZAPP-757 * Reverting the changes to helper.js such that baseline/atomic enums and bitmaps return uint and non-atomic/not-baseline enums and bitmaps return like they used to before Regening with the changes in helper.js JIRA: ZAPP-757 * Reverting the change in cluster-objects-struct.zapt which was not needed Cleaning up the helper.js to return the bitmaps correctly for not-baseline/non-atomic bitmaps Regening JIRA: ZAPP-757 * Making changes to helper.js such that baseline/atomic enums and bitmaps return uint and non-atomic/not-baseline enums and bitmaps return like they used to before Regening with the changes in helper.js JIRA: ZAPP-757 * Cleaning up atomic enums and bitmaps for generation JIRA: ZAPP-757 * - Cleaning up the atomic enums and bitmaps in the zapt templates > - Also taking an exception for vendor_id which is an enum and not a number in the case of cpp implementation > - Regening the sample apps > - JIRA: ZAPP-757 * Cleanup the atomic enum generation for python JIRa: ZAPP-757 * Cleaning up atomic enum generation JIRA: ZAPP-757 * Cleaning up atomic enum generation JIRA: ZAPP-757 * updating pigweed to the right commit. Changed by mistake during rebase JIRa: ZAPP-757 * Regening after rebase JIRa: ZAPP-757 * Reverting a change which may have happened by some formatting I do not know JIRa: ZAPP-757 * Cleaning up templates with newer helpers JIRa: ZAPP-757 * Minor cleanup JIRA: ZAPP-757 * Cleaning up the templates JIRA: ZAPP-757 * Moving the matter helpers from zap repo into helper.js for better visibility Cleaning up regex updating the zap repo JIRA: ZAPP-757 * Cleaning up naming and description JIRa: ZAPP-757 * Regening after rebase JIRA: ZAPP-757 * Regening after rebase JIRa: ZAPP-757 * Point efr32_sdk to where the main chip repo points too * Cleaning up the ChipCallbackBridge generated files so that we do get unnecessary diff JIRA: ZAPP-757 * Cleaning up the ChipTestCluster and ChipCallback generated files so that we do not get unnecessary diff JIRA: ZAPP-757 * Cleaning up the Command generated file so that we do not get unnecessary diff JIRA: ZAPP-757 * Cleaning up the Command generated file so that we do not get unnecessary diff JIRA: ZAPP-757 * Minor cleanup JIRa: ZAPP-757 * Regening after rebase JIRA: ZAPP-757 * Updating the zap repo after rebasing zap JIRA: ZAPP-757 * Cleanup by removing helpers which are not needed and adding comments as well as semicolons JIRa: ZAPP-757 * Cleaning up based on the new data type schema JIRa: ZAPP-757 --- .../all-clusters-app.matter | 302 ++++++++--------- .../bridge-common/bridge-app.matter | 166 ++++----- .../tests/partials/command_value.zapt | 16 +- .../light-switch-app.matter | 190 +++++------ .../lighting-common/lighting-app.matter | 174 +++++----- examples/lock-app/lock-common/lock-app.matter | 164 ++++----- .../log-source-common/log-source-app.matter | 40 +-- .../ota-provider-app.matter | 56 +-- .../ota-requestor-app.matter | 52 +-- .../placeholder/linux/apps/app1/config.matter | 164 ++++----- .../placeholder/linux/apps/app2/config.matter | 164 ++++----- examples/pump-app/pump-common/pump-app.matter | 180 +++++----- .../pump-controller-app.matter | 174 +++++----- .../esp32/main/temperature-measurement.matter | 70 ++-- .../thermostat-common/thermostat.matter | 176 +++++----- examples/tv-app/tv-common/tv-app.matter | 286 ++++++++-------- .../tv-casting-common/tv-casting-app.matter | 242 ++++++------- examples/window-app/common/window-app.matter | 174 +++++----- .../common/ClusterTestGeneration.js | 2 +- .../zap-templates/common/ClustersHelper.js | 4 +- src/app/zap-templates/common/override.js | 2 - .../templates/app/MatterIDL.zapt | 4 +- .../templates/app/cluster-enums.zapt | 4 +- .../zap-templates/templates/app/enums.zapt | 2 +- src/app/zap-templates/templates/app/helper.js | 14 + .../zap-templates/templates/chip/helper.js | 84 +++++ .../zcl/data-model/silabs/types.xml | 50 +++ src/app/zap-templates/zcl/zcl.json | 3 +- .../data_model/controller-clusters.matter | 318 +++++++++--------- .../java/templates/partials/decode_value.zapt | 8 +- .../templates/CHIPCallbackBridge-src.zapt | 4 +- .../CHIPCallbackBridge_internal.zapt | 8 +- .../CHIP/templates/CHIPClustersObjc.zapt | 4 +- .../attribute_data_callback_name.zapt | 8 +- .../CHIP/templates/partials/decode_value.zapt | 10 +- .../CHIP/templates/partials/encode_value.zapt | 8 +- third_party/zap/repo | 2 +- .../app-common/zap-generated/af-structs.h | 6 +- 38 files changed, 1741 insertions(+), 1594 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 9dc395e4720836..367ceff0c3ed67 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -139,8 +139,8 @@ server cluster ApplicationLauncher = 1292 { } struct Application { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute INT16U catalogList[] = 0; @@ -162,9 +162,9 @@ server cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 0; + int8u index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING<32> name = 2; + char_string<32> name = 2; } readonly attribute OutputInfo outputList[] = 0; @@ -239,11 +239,11 @@ server cluster BinaryInputBasic = 15 { server cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -304,19 +304,19 @@ server cluster BridgedActions = 37 { } struct ActionStruct { - INT16U actionID = 0; - CHAR_STRING<32> name = 1; + int16u actionID = 0; + char_string<32> name = 1; ActionTypeEnum type = 2; - INT16U endpointListID = 3; - INT16U supportedCommands = 4; + int16u endpointListID = 3; + int16u supportedCommands = 4; ActionStateEnum status = 5; } struct EndpointListStruct { - INT16U endpointListID = 0; - CHAR_STRING<32> name = 1; + int16u endpointListID = 0; + char_string<32> name = 1; EndpointListTypeEnum type = 2; - ENDPOINT_NO endpoints[] = 3; + endpoint_no endpoints[] = 3; } info event StateChanged = 0 { @@ -355,11 +355,11 @@ server cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 0; - INT16U minorNumber = 1; - optional CHAR_STRING<32> name = 2; - optional CHAR_STRING<32> callSign = 3; - optional CHAR_STRING<32> affiliateCallSign = 4; + int16u majorNumber = 0; + int16u minorNumber = 1; + optional char_string<32> name = 2; + optional char_string<32> callSign = 3; + optional char_string<32> affiliateCallSign = 4; } readonly attribute ChannelInfo channelList[] = 0; @@ -704,17 +704,17 @@ server cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -723,8 +723,8 @@ server cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -741,8 +741,8 @@ server cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -1121,7 +1121,7 @@ server cluster DoorLock = 257 { struct DlCredential { DlCredentialType credentialType = 0; - INT16U credentialIndex = 1; + int16u credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -1446,7 +1446,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -1539,13 +1539,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -1587,25 +1587,25 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -2051,10 +2051,10 @@ server cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 0; + int8u index = 0; InputTypeEnum inputType = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> description = 3; + char_string<32> name = 2; + char_string<32> description = 3; } readonly attribute InputInfo inputList[] = 0; @@ -2094,9 +2094,9 @@ server cluster ModeSelect = 80 { } struct ModeOptionStruct { - CHAR_STRING<32> label = 0; - INT8U mode = 1; - INT32U semanticTag = 2; + char_string<32> label = 0; + int8u mode = 1; + int32u semanticTag = 2; } readonly attribute char_string<32> description = 0; @@ -2158,28 +2158,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -2383,17 +2383,17 @@ server cluster OccupancySensing = 1030 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -2460,17 +2460,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -2768,9 +2768,9 @@ server cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -2868,11 +2868,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -2935,8 +2935,8 @@ server cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; @@ -2995,17 +2995,17 @@ server cluster TestCluster = 1295 { } struct TestListStructOctet { - INT64U fabricIndex = 0; - OCTET_STRING<32> operationalCert = 1; + int64u fabricIndex = 0; + octet_string<32> operationalCert = 1; } struct NullablesAndOptionalsStruct { - nullable INT16U nullableInt = 0; - optional INT16U optionalInt = 1; - optional nullable INT16U nullableOptionalInt = 2; - nullable CHAR_STRING nullableString = 3; - optional CHAR_STRING optionalString = 4; - optional nullable CHAR_STRING nullableOptionalString = 5; + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; nullable SimpleStruct nullableStruct = 6; optional SimpleStruct optionalStruct = 7; optional nullable SimpleStruct nullableOptionalStruct = 8; @@ -3015,40 +3015,40 @@ server cluster TestCluster = 1295 { } struct SimpleStruct { - INT8U a = 0; - BOOLEAN b = 1; + int8u a = 0; + boolean b = 1; SimpleEnum c = 2; - OCTET_STRING d = 3; - CHAR_STRING e = 4; + octet_string d = 3; + char_string e = 4; SimpleBitmap f = 5; single g = 6; double h = 7; } struct TestFabricScoped { - INT8U fabricSensitiveInt8u = 1; - optional INT8U optionalFabricSensitiveInt8u = 2; - nullable INT8U nullableFabricSensitiveInt8u = 3; - optional nullable INT8U nullableOptionalFabricSensitiveInt8u = 4; - CHAR_STRING fabricSensitiveCharString = 5; + int8u fabricSensitiveInt8u = 1; + optional int8u optionalFabricSensitiveInt8u = 2; + nullable int8u nullableFabricSensitiveInt8u = 3; + optional nullable int8u nullableOptionalFabricSensitiveInt8u = 4; + char_string fabricSensitiveCharString = 5; SimpleStruct fabricSensitiveStruct = 6; - INT8U fabricSensitiveInt8uList[] = 7; + int8u fabricSensitiveInt8uList[] = 7; fabric_idx fabricIndex = 254; } struct NestedStructList { - INT8U a = 0; - BOOLEAN b = 1; + int8u a = 0; + boolean b = 1; SimpleStruct c = 2; SimpleStruct d[] = 3; - INT32U e[] = 4; - OCTET_STRING f[] = 5; - INT8U g[] = 6; + int32u e[] = 4; + octet_string f[] = 5; + int8u g[] = 6; } struct NestedStruct { - INT8U a = 0; - BOOLEAN b = 1; + int8u a = 0; + boolean b = 1; SimpleStruct c = 2; } @@ -3379,53 +3379,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 1b61aad7fd83f5..5ec4e7b49e3840 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } client cluster AccessControl = 31 { @@ -30,7 +30,7 @@ client cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ client cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -95,7 +95,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -107,7 +107,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -216,8 +216,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -305,7 +305,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -398,13 +398,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -571,28 +571,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -666,17 +666,17 @@ server cluster NetworkCommissioning = 49 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -718,17 +718,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -814,11 +814,11 @@ server cluster OperationalCredentials = 62 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -902,53 +902,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/chip-tool/templates/tests/partials/command_value.zapt b/examples/chip-tool/templates/tests/partials/command_value.zapt index 307ac83a5748c8..7a5b9e0a23230e 100644 --- a/examples/chip-tool/templates/tests/partials/command_value.zapt +++ b/examples/chip-tool/templates/tests/partials/command_value.zapt @@ -41,33 +41,33 @@ {{definedValue}}; {{else if (chip_tests_config_has definedValue)}} m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : - {{~#if_chip_enum type~}} + {{~#if_is_strongly_typed_chip_enum type~}} static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{chip_tests_config_get_default_value definedValue}}); {{else if (isCharString type)}} chip::Span("{{chip_tests_config_get_default_value definedValue}}", {{utf8StringLength (chip_tests_config_get_default_value definedValue)}}); {{else if (isOctetString type)}} {{!-- TODO Extract the length of the default value for ByteSpan--}} {{else}} - {{#if_is_bitmap type}} + {{#if_is_strongly_typed_bitmap type}} static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{asTypedLiteral (chip_tests_config_get_default_value definedValue) type}}); {{else}} {{asTypedExpression (chip_tests_config_get_default_value definedValue) type}}; - {{/if_is_bitmap}} - {{/if_chip_enum~}} + {{/if_is_strongly_typed_bitmap}} + {{/if_is_strongly_typed_chip_enum~}} {{else~}} - {{~#if_chip_enum type~}} + {{~#if_is_strongly_typed_chip_enum type~}} static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{definedValue}}); {{else if (isCharString type)}} chip::Span("{{definedValue}}garbage: not in length on purpose", {{utf8StringLength definedValue}}); {{else if (isOctetString type)}} chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral definedValue}}garbage: not in length on purpose"), {{definedValue.length}}); {{else}} - {{#if_is_bitmap type}} + {{#if_is_strongly_typed_bitmap type}} static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{asTypedLiteral definedValue type}}); {{else}} {{asTypedExpression definedValue type}}; - {{/if_is_bitmap}} - {{/if_chip_enum~}} + {{/if_is_strongly_typed_bitmap}} + {{/if_is_strongly_typed_chip_enum~}} {{~/if~}} {{/if_is_struct}} diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 0845f9fe1e83bb..ae7f4a3b6a2064 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -151,11 +151,11 @@ server cluster Basic = 40 { server cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -399,8 +399,8 @@ client cluster ColorControl = 768 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -491,7 +491,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -584,13 +584,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -632,25 +632,25 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -865,28 +865,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1094,17 +1094,17 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } client cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1152,17 +1152,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1252,9 +1252,9 @@ client cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -1353,11 +1353,11 @@ client cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1438,53 +1438,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 59d00e338aa382..64d5c442f65718 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -414,8 +414,8 @@ server cluster ColorControl = 768 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -505,7 +505,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -598,13 +598,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -646,25 +646,25 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -937,28 +937,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1173,17 +1173,17 @@ server cluster OccupancySensing = 1030 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1244,17 +1244,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1340,11 +1340,11 @@ server cluster OperationalCredentials = 62 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1425,53 +1425,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index d851d8b5faad19..47e132f8a9dca3 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -151,8 +151,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -531,7 +531,7 @@ server cluster DoorLock = 257 { struct DlCredential { DlCredentialType credentialType = 0; - INT16U credentialIndex = 1; + int16u credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -794,7 +794,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -887,13 +887,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -1066,28 +1066,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1295,17 +1295,17 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1352,17 +1352,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1531,11 +1531,11 @@ server cluster PowerSourceConfiguration = 46 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1583,53 +1583,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 79649e4e6ee02e..42ade04e5db523 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -25,7 +25,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -37,7 +37,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -141,7 +141,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -221,22 +221,22 @@ server cluster NetworkCommissioning = 49 { struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute int16u clusterRevision = 65533; @@ -315,11 +315,11 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 1d391c6fbf7537..604daa25ad0445 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } client cluster AccessControl = 31 { @@ -30,7 +30,7 @@ client cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ client cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -95,7 +95,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -107,7 +107,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -200,7 +200,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -288,28 +288,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -462,17 +462,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 2a6682bce72345..089a26b2482fca 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -170,7 +170,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -258,28 +258,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -501,17 +501,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index f895391d069eab..d22222cc3e184d 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -45,8 +45,8 @@ client cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute char_string<32> vendorName = 0; @@ -72,8 +72,8 @@ server cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute char_string<32> vendorName = 0; @@ -187,19 +187,19 @@ server cluster BridgedActions = 37 { } struct ActionStruct { - INT16U actionID = 0; - CHAR_STRING<32> name = 1; + int16u actionID = 0; + char_string<32> name = 1; ActionTypeEnum type = 2; - INT16U endpointListID = 3; - INT16U supportedCommands = 4; + int16u endpointListID = 3; + int16u supportedCommands = 4; ActionStateEnum status = 5; } struct EndpointListStruct { - INT16U endpointListID = 0; - CHAR_STRING<32> name = 1; + int16u endpointListID = 0; + char_string<32> name = 1; EndpointListTypeEnum type = 2; - ENDPOINT_NO endpoints[] = 3; + endpoint_no endpoints[] = 3; } info event StateChanged = 0 { @@ -370,17 +370,17 @@ client cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -389,8 +389,8 @@ client cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -472,17 +472,17 @@ server cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -491,8 +491,8 @@ server cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -532,8 +532,8 @@ server cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -596,7 +596,7 @@ client cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -642,7 +642,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -738,13 +738,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -1201,9 +1201,9 @@ client cluster ModeSelect = 80 { } struct ModeOptionStruct { - CHAR_STRING<32> label = 0; - INT8U mode = 1; - INT32U semanticTag = 2; + char_string<32> label = 0; + int8u mode = 1; + int32u semanticTag = 2; } readonly attribute char_string<32> description = 0; @@ -1230,9 +1230,9 @@ server cluster ModeSelect = 80 { } struct ModeOptionStruct { - CHAR_STRING<32> label = 0; - INT8U mode = 1; - INT32U semanticTag = 2; + char_string<32> label = 0; + int8u mode = 1; + int32u semanticTag = 2; } readonly attribute char_string<32> description = 0; @@ -1293,28 +1293,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1388,17 +1388,17 @@ server cluster NetworkCommissioning = 49 { } client cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1445,17 +1445,17 @@ client cluster OnOff = 6 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1516,11 +1516,11 @@ client cluster OperationalCredentials = 62 { } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1598,11 +1598,11 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1944,9 +1944,9 @@ server cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -2044,11 +2044,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -2155,8 +2155,8 @@ client cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; @@ -2187,8 +2187,8 @@ server cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index f895391d069eab..d22222cc3e184d 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -45,8 +45,8 @@ client cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute char_string<32> vendorName = 0; @@ -72,8 +72,8 @@ server cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute char_string<32> vendorName = 0; @@ -187,19 +187,19 @@ server cluster BridgedActions = 37 { } struct ActionStruct { - INT16U actionID = 0; - CHAR_STRING<32> name = 1; + int16u actionID = 0; + char_string<32> name = 1; ActionTypeEnum type = 2; - INT16U endpointListID = 3; - INT16U supportedCommands = 4; + int16u endpointListID = 3; + int16u supportedCommands = 4; ActionStateEnum status = 5; } struct EndpointListStruct { - INT16U endpointListID = 0; - CHAR_STRING<32> name = 1; + int16u endpointListID = 0; + char_string<32> name = 1; EndpointListTypeEnum type = 2; - ENDPOINT_NO endpoints[] = 3; + endpoint_no endpoints[] = 3; } info event StateChanged = 0 { @@ -370,17 +370,17 @@ client cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -389,8 +389,8 @@ client cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -472,17 +472,17 @@ server cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -491,8 +491,8 @@ server cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -532,8 +532,8 @@ server cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -596,7 +596,7 @@ client cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -642,7 +642,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -738,13 +738,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -1201,9 +1201,9 @@ client cluster ModeSelect = 80 { } struct ModeOptionStruct { - CHAR_STRING<32> label = 0; - INT8U mode = 1; - INT32U semanticTag = 2; + char_string<32> label = 0; + int8u mode = 1; + int32u semanticTag = 2; } readonly attribute char_string<32> description = 0; @@ -1230,9 +1230,9 @@ server cluster ModeSelect = 80 { } struct ModeOptionStruct { - CHAR_STRING<32> label = 0; - INT8U mode = 1; - INT32U semanticTag = 2; + char_string<32> label = 0; + int8u mode = 1; + int32u semanticTag = 2; } readonly attribute char_string<32> description = 0; @@ -1293,28 +1293,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1388,17 +1388,17 @@ server cluster NetworkCommissioning = 49 { } client cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1445,17 +1445,17 @@ client cluster OnOff = 6 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1516,11 +1516,11 @@ client cluster OperationalCredentials = 62 { } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1598,11 +1598,11 @@ server cluster OperationalCredentials = 62 { } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1944,9 +1944,9 @@ server cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -2044,11 +2044,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -2155,8 +2155,8 @@ client cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; @@ -2187,8 +2187,8 @@ server cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index a69a782d7db41f..40a0d8db05a608 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -154,8 +154,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -245,7 +245,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -338,13 +338,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -387,25 +387,25 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -682,28 +682,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -907,17 +907,17 @@ client cluster OccupancySensing = 1030 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -978,17 +978,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1223,9 +1223,9 @@ server cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -1324,11 +1324,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1394,53 +1394,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index c1907971fae34c..665ffb827fa0f0 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -154,8 +154,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -237,7 +237,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -330,13 +330,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -382,25 +382,25 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -590,28 +590,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -812,17 +812,17 @@ server cluster OtaSoftwareUpdateRequestor = 42 { } client cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -864,17 +864,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1062,11 +1062,11 @@ client cluster PumpConfigurationAndControl = 512 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1121,53 +1121,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 433064b8e59bca..a98bace7d9391b 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -151,8 +151,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -240,7 +240,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -333,13 +333,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -419,28 +419,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -522,17 +522,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 548a65ec4b78cc..1eada967c076b2 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -151,11 +151,11 @@ server cluster Basic = 40 { server cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -164,8 +164,8 @@ server cluster Binding = 30 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -253,7 +253,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -346,13 +346,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -394,14 +394,14 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } @@ -589,28 +589,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -763,17 +763,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -863,9 +863,9 @@ server cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -963,11 +963,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1130,53 +1130,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 18e120e4f80856..57e7e1088b28e7 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -136,8 +136,8 @@ server cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute char_string<32> vendorName = 0; @@ -164,12 +164,12 @@ server cluster ApplicationLauncher = 1292 { struct ApplicationEP { Application application = 0; - optional ENDPOINT_NO endpoint = 1; + optional endpoint_no endpoint = 1; } struct Application { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute INT16U catalogList[] = 0; @@ -215,9 +215,9 @@ server cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 0; + int8u index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING<32> name = 2; + char_string<32> name = 2; } readonly attribute OutputInfo outputList[] = 0; @@ -283,11 +283,11 @@ server cluster Basic = 40 { client cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -296,11 +296,11 @@ client cluster Binding = 30 { server cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -324,17 +324,17 @@ server cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 0; - INT16U minorNumber = 1; - optional CHAR_STRING<32> name = 2; - optional CHAR_STRING<32> callSign = 3; - optional CHAR_STRING<32> affiliateCallSign = 4; + int16u majorNumber = 0; + int16u minorNumber = 1; + optional char_string<32> name = 2; + optional char_string<32> callSign = 3; + optional char_string<32> affiliateCallSign = 4; } struct LineupInfo { - CHAR_STRING operatorName = 0; - optional CHAR_STRING lineupName = 1; - optional CHAR_STRING postalCode = 2; + char_string operatorName = 0; + optional char_string lineupName = 1; + optional char_string postalCode = 2; LineupInfoTypeEnum lineupInfoType = 3; } @@ -411,17 +411,17 @@ server cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -430,8 +430,8 @@ server cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -469,8 +469,8 @@ server cluster ContentLauncher = 1290 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -558,7 +558,7 @@ client cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -616,7 +616,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -709,13 +709,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -757,14 +757,14 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } @@ -1005,10 +1005,10 @@ server cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 0; + int8u index = 0; InputTypeEnum inputType = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> description = 3; + char_string<32> name = 2; + char_string<32> description = 3; } readonly attribute InputInfo inputList[] = 0; @@ -1049,8 +1049,8 @@ server cluster MediaPlayback = 1286 { } struct PlaybackPosition { - INT64U updatedAt = 0; - nullable INT64U position = 1; + int64u updatedAt = 0; + nullable int64u position = 1; } readonly attribute PlaybackStateEnum currentState = 0; @@ -1132,28 +1132,28 @@ client cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1266,28 +1266,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1426,17 +1426,17 @@ server cluster OtaSoftwareUpdateProvider = 41 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1478,17 +1478,17 @@ client cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1576,17 +1576,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1679,11 +1679,11 @@ server cluster RelativeHumidityMeasurement = 1029 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1706,8 +1706,8 @@ server cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; @@ -1759,53 +1759,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 23f21976f19ed8..40675062acbbb8 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -152,8 +152,8 @@ client cluster ApplicationLauncher = 1292 { } struct Application { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute INT16U catalogList[] = 0; @@ -192,9 +192,9 @@ client cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 0; + int8u index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING<32> name = 2; + char_string<32> name = 2; } readonly attribute OutputInfo outputList[] = 0; @@ -280,11 +280,11 @@ server cluster BinaryInputBasic = 15 { server cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -308,17 +308,17 @@ client cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 0; - INT16U minorNumber = 1; - optional CHAR_STRING<32> name = 2; - optional CHAR_STRING<32> callSign = 3; - optional CHAR_STRING<32> affiliateCallSign = 4; + int16u majorNumber = 0; + int16u minorNumber = 1; + optional char_string<32> name = 2; + optional char_string<32> callSign = 3; + optional char_string<32> affiliateCallSign = 4; } struct LineupInfo { - CHAR_STRING operatorName = 0; - optional CHAR_STRING lineupName = 1; - optional CHAR_STRING postalCode = 2; + char_string operatorName = 0; + optional char_string lineupName = 1; + optional char_string postalCode = 2; LineupInfoTypeEnum lineupInfoType = 3; } @@ -389,17 +389,17 @@ client cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -408,8 +408,8 @@ client cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -441,8 +441,8 @@ client cluster ContentLauncher = 1290 { client cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -454,8 +454,8 @@ client cluster Descriptor = 29 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -543,7 +543,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -636,13 +636,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -684,14 +684,14 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } @@ -1170,10 +1170,10 @@ client cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 0; + int8u index = 0; InputTypeEnum inputType = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> description = 3; + char_string<32> name = 2; + char_string<32> description = 3; } readonly attribute InputInfo inputList[] = 0; @@ -1278,28 +1278,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -1438,17 +1438,17 @@ server cluster OtaSoftwareUpdateProvider = 41 { } client cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1481,17 +1481,17 @@ client cluster OnOff = 6 { } server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -1538,17 +1538,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1638,9 +1638,9 @@ server cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -1738,11 +1738,11 @@ server cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1801,8 +1801,8 @@ client cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; @@ -1859,8 +1859,8 @@ server cluster TestCluster = 1295 { } struct TestListStructOctet { - INT64U fabricIndex = 0; - OCTET_STRING<32> operationalCert = 1; + int64u fabricIndex = 0; + octet_string<32> operationalCert = 1; } info event TestEvent = 1 { @@ -1937,53 +1937,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index cd35eca723f452..e0eae79e025b0f 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } server cluster AccessControl = 31 { @@ -30,7 +30,7 @@ server cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -159,8 +159,8 @@ server cluster Basic = 40 { server cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -221,7 +221,7 @@ server cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -316,13 +316,13 @@ server cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -367,25 +367,25 @@ server cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -577,28 +577,28 @@ server cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -823,17 +823,17 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -1005,9 +1005,9 @@ client cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -1106,11 +1106,11 @@ client cluster Scenes = 5 { server cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -1158,53 +1158,53 @@ server cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/src/app/zap-templates/common/ClusterTestGeneration.js b/src/app/zap-templates/common/ClusterTestGeneration.js index 0018fc5f6a1639..071eed18bfaafa 100644 --- a/src/app/zap-templates/common/ClusterTestGeneration.js +++ b/src/app/zap-templates/common/ClusterTestGeneration.js @@ -846,7 +846,7 @@ function if_include_struct_item_value(structValue, name, options) } if (!this.isOptional) { - throw new Error(`Value not provided for ${name} where one is expected`); + throw new Error(`Value not provided for ${name} where one is expected in ` + JSON.stringify(structValue)); } return options.inverse(this); diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index 9b12eb5491f9ae..320478ff0c4b0b 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -419,13 +419,13 @@ function handleBasic(item, [ atomics, enums, bitmaps, structs ]) const enumItem = getEnum(enums, itemType); if (enumItem) { item.isEnum = true; - itemType = enumItem.type; + itemType = 'enum' + enumItem.size * 8; } const bitmap = getBitmap(bitmaps, itemType); if (bitmap) { item.isBitmap = true; - itemType = bitmap.type; + itemType = 'bitmap' + bitmap.size * 8; } const atomic = getAtomic(atomics, itemType); diff --git a/src/app/zap-templates/common/override.js b/src/app/zap-templates/common/override.js index 4d85a223874f9b..429c37c9d4f41c 100644 --- a/src/app/zap-templates/common/override.js +++ b/src/app/zap-templates/common/override.js @@ -58,8 +58,6 @@ function atomicType(arg) return 'chip::EventNumber'; case 'fabric_idx': return 'chip::FabricIndex'; - case 'status': - return 'chip::Protocols::InteractionModel::Status'; case 'octet_string': case 'long_octet_string': return 'chip::ByteSpan'; diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt index d9e3d5483c62a6..2e6df5aec7bb9a 100644 --- a/src/app/zap-templates/templates/app/MatterIDL.zapt +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -10,7 +10,7 @@ {{#all_user_clusters}} {{~side}} cluster {{asUpperCamelCase name}} = {{code}} { {{#zcl_enums}} - enum {{asUpperCamelCase name}} : {{type}} { + enum {{asUpperCamelCase name}} : ENUM{{multiply size 8}} { {{#zcl_enum_items}} k{{asUpperCamelCase label}} = {{value}}; {{/zcl_enum_items}} @@ -18,7 +18,7 @@ {{/zcl_enums}} {{#zcl_bitmaps}} - bitmap {{name}} : {{type}} { + bitmap {{name}} : BITMAP{{multiply size 8}} { {{#zcl_bitmap_items}} k{{asUpperCamelCase label}} = {{asHex mask}}; {{/zcl_bitmap_items}} diff --git a/src/app/zap-templates/templates/app/cluster-enums.zapt b/src/app/zap-templates/templates/app/cluster-enums.zapt index 6ead04c5e693e4..b03ba4ec0d054f 100644 --- a/src/app/zap-templates/templates/app/cluster-enums.zapt +++ b/src/app/zap-templates/templates/app/cluster-enums.zapt @@ -20,7 +20,7 @@ namespace {{asUpperCamelCase name}} { #ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM {{/if}} // Enum for {{label}} -enum class {{asType label}} : {{asUnderlyingZclType type}} { +enum class {{asType label}} : {{asUnderlyingZclType name}} { {{#zcl_enum_items}} k{{asUpperCamelCase label}} = {{asHex value 2}}, {{/zcl_enum_items}} @@ -34,7 +34,7 @@ using {{asType label}} = EmberAf{{asType label}}; {{#zcl_bitmaps}} // Bitmap for {{label}} -enum class {{asType label}} : {{asUnderlyingZclType type}} { +enum class {{asType label}} : {{asUnderlyingZclType name}} { {{#zcl_bitmap_items}} k{{asUpperCamelCase label}} = {{asHex mask}}, {{/zcl_bitmap_items}} diff --git a/src/app/zap-templates/templates/app/enums.zapt b/src/app/zap-templates/templates/app/enums.zapt index 9046d6c9f7c425..0f70f759c4aeeb 100644 --- a/src/app/zap-templates/templates/app/enums.zapt +++ b/src/app/zap-templates/templates/app/enums.zapt @@ -13,7 +13,7 @@ {{#if (isWeaklyTypedEnum label)}} // Enum for {{label}} -enum EmberAf{{asType label}} : {{asUnderlyingZclType type}} { +enum EmberAf{{asType label}} : {{asUnderlyingZclType name}} { {{#zcl_enum_items}} {{ident}}EMBER_ZCL_{{asDelimitedMacro parent.label}}_{{asDelimitedMacro label}} = {{value}}, {{/zcl_enum_items}} diff --git a/src/app/zap-templates/templates/app/helper.js b/src/app/zap-templates/templates/app/helper.js index 924262c4758d11..eff38382b64d73 100644 --- a/src/app/zap-templates/templates/app/helper.js +++ b/src/app/zap-templates/templates/app/helper.js @@ -462,10 +462,20 @@ async function zapTypeToClusterObjectType(type, isDecodable, options) } if (types.isEnum) { + // Catching baseline enums and converting them into 'uint[size]_t' + let s = type.toLowerCase().match(/^enum(\d+)$/); + if (s) { + return 'uint' + s[1] + '_t'; + } return ns + type; } if (types.isBitmap) { + // Catching baseline bitmaps and converting them into 'uint[size]_t' + let s = type.toLowerCase().match(/^bitmap(\d+)$/); + if (s) { + return 'uint' + s[1] + '_t'; + } return 'chip::BitFlags<' + ns + type + '>'; } @@ -537,6 +547,10 @@ async function _zapTypeToPythonClusterObjectType(type, options) const typeChecker = async (method) => zclHelper[method](this.global.db, type, pkgId).then(zclType => zclType != 'unknown'); if (await typeChecker('isEnum')) { + // Catching baseline enums and converting them into 'uint' + if (type.toLowerCase().match(/^enum\d+$/g)) { + return 'uint'; + } return ns + '.Enums.' + type; } diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index 99f1b63d1ba670..ccb6164df4df85 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -21,6 +21,7 @@ const templateUtil = require(zapPath + 'generator/template-util.js'); const zclHelper = require(zapPath + 'generator/helper-zcl.js'); const iteratorUtil = require(zapPath + 'util/iterator-util.js'); const queryAccess = require(zapPath + 'db/query-access') +const queryZcl = require(zapPath + 'db/query-zcl'); const { asBlocks, ensureClusters } = require('../../common/ClustersHelper.js'); const StringHelper = require('../../common/StringHelper.js'); @@ -445,6 +446,87 @@ async function chip_endpoint_clusters(options) return templateUtil.collectBlocks(clusters, options, this); } +/** + * Helper checks if the type for the bitmap is BitFlags. This generally includes + * all bitmaps apart from + * bitmap8/16/32 (generally defined in types.xml) + * example: + * {{#if_is_strongly_typed_bitmap type}} + * strongly typed bitmap + * {{else}} + * not a strongly typed bitmap + * {{/if_is_strongly_typed_bitmap}} + * + * @param {*} type + * @returns Promise of content. + */ +async function if_is_strongly_typed_bitmap(type, options) +{ + let packageId = await templateUtil.ensureZclPackageId(this); + let bitmap; + if (type && typeof type === 'string') { + bitmap = await queryZcl.selectBitmapByName(this.global.db, packageId, type); + } else { + bitmap = await queryZcl.selectBitmapById(this.global.db, type); + } + + if (bitmap) { + let a = await queryZcl.selectAtomicType(this.global.db, packageId, bitmap.name); + if (a) { + // If this is an atomic type, it's a generic, weakly typed, bitmap. + return options.inverse(this); + } else { + return options.fn(this); + } + } + return options.inverse(this); +} + +/** + * Handlebar helper function which checks if an enum is a strongly typed enum or + * not. This generally includes all enums apart from + * enum8/16/32 (generally defined in types.xml) + * example for if_is_strongly_typed_chip_enum: + * {{#if_is_strongly_typed_chip_enum type}} + * strongly typed enum + * {{else}} + * not a strongly typed enum + * {{/if_is_strongly_typed_chip_enum}} + * + * @param {*} type + * @param {*} options + * @returns Promise of content. + */ +async function if_is_strongly_typed_chip_enum(type, options) +{ + // There are certain exceptions. + if (type.toLowerCase() == 'vendor_id') { + return options.fn(this); + } else { + let packageId = await templateUtil.ensureZclPackageId(this); + let enumRes; + // Retrieving the enum from the enum table + if (type && typeof type === 'string') { + enumRes = await queryZcl.selectEnumByName(this.global.db, type, packageId); + } else { + enumRes = await queryZcl.selectEnumById(this.global.db, type); + } + + // Checking if an enum is atomic. If an enum is not atomic then the enum + // is a strongly typed enum + if (enumRes) { + let a = await queryZcl.selectAtomicType(this.global.db, packageId, enumRes.name); + if (a) { + // if an enum has an atomic type that means it's a weakly-typed enum. + return options.inverse(this); + } else { + return options.fn(this); + } + } + return options.inverse(this); + } +} + /** * Checks whether a type is an enum for purposes of its chipType. That includes * both spec-defined enum types and types that we map to enum types in our code. @@ -589,3 +671,5 @@ exports.if_basic_global_response = if_basic_global_r exports.chip_cluster_specific_structs = chip_cluster_specific_structs; exports.chip_shared_structs = chip_shared_structs; exports.chip_access_elements = chip_access_elements +exports.if_is_strongly_typed_chip_enum = if_is_strongly_typed_chip_enum +exports.if_is_strongly_typed_bitmap = if_is_strongly_typed_bitmap diff --git a/src/app/zap-templates/zcl/data-model/silabs/types.xml b/src/app/zap-templates/zcl/data-model/silabs/types.xml index 71ed616ff91a55..87309a97f5a54c 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/types.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/types.xml @@ -402,6 +402,56 @@ limitations under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index fc167d209a0858..feb969bedc5b92 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -188,5 +188,6 @@ "OverrunCount" ] }, - "defaultReportingPolicy": "mandatory" + "defaultReportingPolicy": "mandatory", + "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"] } diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 9ffa786aa2ae44..7190bb67b313d5 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -2,8 +2,8 @@ // It is for view/code review purposes only. struct LabelStruct { - CHAR_STRING<16> label = 0; - CHAR_STRING<16> value = 1; + char_string<16> label = 0; + char_string<16> value = 1; } client cluster AccessControl = 31 { @@ -30,7 +30,7 @@ client cluster AccessControl = 31 { struct AccessControlEntry { Privilege privilege = 1; AuthMode authMode = 2; - nullable INT64U subjects[] = 3; + nullable int64u subjects[] = 3; nullable Target targets[] = 4; fabric_idx fabricIndex = 254; } @@ -42,7 +42,7 @@ client cluster AccessControl = 31 { } struct ExtensionEntry { - OCTET_STRING<128> data = 1; + octet_string<128> data = 1; fabric_idx fabricIndex = 254; } @@ -144,8 +144,8 @@ client cluster ApplicationBasic = 1293 { } struct ApplicationBasicApplication { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute char_string<32> vendorName = 0; @@ -175,12 +175,12 @@ client cluster ApplicationLauncher = 1292 { struct ApplicationEP { Application application = 0; - optional ENDPOINT_NO endpoint = 1; + optional endpoint_no endpoint = 1; } struct Application { - INT16U catalogVendorId = 0; - CHAR_STRING applicationId = 1; + int16u catalogVendorId = 0; + char_string applicationId = 1; } readonly attribute INT16U catalogList[] = 0; @@ -228,9 +228,9 @@ client cluster AudioOutput = 1291 { } struct OutputInfo { - INT8U index = 0; + int8u index = 0; OutputTypeEnum outputType = 1; - CHAR_STRING<32> name = 2; + char_string<32> name = 2; } readonly attribute OutputInfo outputList[] = 0; @@ -329,11 +329,11 @@ client cluster BinaryInputBasic = 15 { client cluster Binding = 30 { struct TargetStruct { - optional NODE_ID node = 1; - optional GROUP_ID group = 2; - optional ENDPOINT_NO endpoint = 3; - optional CLUSTER_ID cluster = 4; - FABRIC_IDX fabricIndex = 254; + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; } attribute TargetStruct binding[] = 0; @@ -400,19 +400,19 @@ client cluster BridgedActions = 37 { } struct ActionStruct { - INT16U actionID = 0; - CHAR_STRING<32> name = 1; + int16u actionID = 0; + char_string<32> name = 1; ActionTypeEnum type = 2; - INT16U endpointListID = 3; - INT16U supportedCommands = 4; + int16u endpointListID = 3; + int16u supportedCommands = 4; ActionStateEnum status = 5; } struct EndpointListStruct { - INT16U endpointListID = 0; - CHAR_STRING<32> name = 1; + int16u endpointListID = 0; + char_string<32> name = 1; EndpointListTypeEnum type = 2; - ENDPOINT_NO endpoints[] = 3; + endpoint_no endpoints[] = 3; } info event StateChanged = 0 { @@ -568,17 +568,17 @@ client cluster Channel = 1284 { } struct ChannelInfo { - INT16U majorNumber = 0; - INT16U minorNumber = 1; - optional CHAR_STRING<32> name = 2; - optional CHAR_STRING<32> callSign = 3; - optional CHAR_STRING<32> affiliateCallSign = 4; + int16u majorNumber = 0; + int16u minorNumber = 1; + optional char_string<32> name = 2; + optional char_string<32> callSign = 3; + optional char_string<32> affiliateCallSign = 4; } struct LineupInfo { - CHAR_STRING operatorName = 0; - optional CHAR_STRING lineupName = 1; - optional CHAR_STRING postalCode = 2; + char_string operatorName = 0; + optional char_string lineupName = 1; + optional char_string postalCode = 2; LineupInfoTypeEnum lineupInfoType = 3; } @@ -953,17 +953,17 @@ client cluster ContentLauncher = 1290 { struct Parameter { ParameterEnum type = 0; - CHAR_STRING value = 1; + char_string value = 1; optional AdditionalInfo externalIDList[] = 2; } struct AdditionalInfo { - CHAR_STRING name = 0; - CHAR_STRING value = 1; + char_string name = 0; + char_string value = 1; } struct BrandingInformation { - CHAR_STRING providerName = 0; + char_string providerName = 0; optional StyleInformation background = 1; optional StyleInformation logo = 2; optional StyleInformation progressBar = 3; @@ -972,8 +972,8 @@ client cluster ContentLauncher = 1290 { } struct StyleInformation { - optional CHAR_STRING imageUrl = 0; - optional CHAR_STRING color = 1; + optional char_string imageUrl = 0; + optional char_string color = 1; optional Dimension size = 2; } @@ -1013,8 +1013,8 @@ client cluster ContentLauncher = 1290 { client cluster Descriptor = 29 { struct DeviceType { - DEVTYPE_ID type = 0; - INT16U revision = 1; + devtype_id type = 0; + int16u revision = 1; } readonly attribute DeviceType deviceList[] = 0; @@ -1406,7 +1406,7 @@ client cluster DoorLock = 257 { struct DlCredential { DlCredentialType credentialType = 0; - INT16U credentialIndex = 1; + int16u credentialIndex = 1; } critical event DoorLockAlarm = 0 { @@ -1798,7 +1798,7 @@ client cluster GeneralCommissioning = 48 { } struct BasicCommissioningInfo { - INT16U failSafeExpiryLengthSeconds = 0; + int16u failSafeExpiryLengthSeconds = 0; } attribute access(write: administer) int64u breadcrumb = 0; @@ -1893,13 +1893,13 @@ client cluster GeneralDiagnostics = 51 { } struct NetworkInterfaceType { - CHAR_STRING<32> name = 0; - BOOLEAN isOperational = 1; - nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; - nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; - OCTET_STRING<8> hardwareAddress = 4; - OCTET_STRING IPv4Addresses[] = 5; - OCTET_STRING IPv6Addresses[] = 6; + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; InterfaceType type = 7; } @@ -1944,25 +1944,25 @@ client cluster GroupKeyManagement = 63 { struct GroupKeyMapStruct { group_id groupId = 1; - INT16U groupKeySetID = 2; + int16u groupKeySetID = 2; fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { group_id groupId = 1; endpoint_no endpoints[] = 2; - optional CHAR_STRING<16> groupName = 3; + optional char_string<16> groupName = 3; fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { - INT16U groupKeySetID = 0; + int16u groupKeySetID = 0; GroupKeySecurityPolicy groupKeySecurityPolicy = 1; - nullable OCTET_STRING<16> epochKey0 = 2; + nullable octet_string<16> epochKey0 = 2; nullable epoch_us epochStartTime0 = 3; - nullable OCTET_STRING<16> epochKey1 = 4; + nullable octet_string<16> epochKey1 = 4; nullable epoch_us epochStartTime1 = 5; - nullable OCTET_STRING<16> epochKey2 = 6; + nullable octet_string<16> epochKey2 = 6; nullable epoch_us epochStartTime2 = 7; } @@ -2374,10 +2374,10 @@ client cluster MediaInput = 1287 { } struct InputInfo { - INT8U index = 0; + int8u index = 0; InputTypeEnum inputType = 1; - CHAR_STRING<32> name = 2; - CHAR_STRING<32> description = 3; + char_string<32> name = 2; + char_string<32> description = 3; } readonly attribute InputInfo inputList[] = 0; @@ -2420,8 +2420,8 @@ client cluster MediaPlayback = 1286 { } struct PlaybackPosition { - INT64U updatedAt = 0; - nullable INT64U position = 1; + int64u updatedAt = 0; + nullable int64u position = 1; } readonly attribute PlaybackStateEnum currentState = 0; @@ -2472,9 +2472,9 @@ client cluster ModeSelect = 80 { } struct ModeOptionStruct { - CHAR_STRING<32> label = 0; - INT8U mode = 1; - INT32U semanticTag = 2; + char_string<32> label = 0; + int8u mode = 1; + int32u semanticTag = 2; } readonly attribute char_string<32> description = 0; @@ -2536,28 +2536,28 @@ client cluster NetworkCommissioning = 49 { } struct NetworkInfo { - OCTET_STRING<32> networkID = 0; - BOOLEAN connected = 1; + octet_string<32> networkID = 0; + boolean connected = 1; } struct WiFiInterfaceScanResult { WiFiSecurity security = 0; - OCTET_STRING<32> ssid = 1; - OCTET_STRING<6> bssid = 2; - INT16U channel = 3; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; WiFiBand wiFiBand = 4; - INT8S rssi = 5; + int8s rssi = 5; } struct ThreadInterfaceScanResult { - INT16U panId = 0; - INT64U extendedPanId = 1; - CHAR_STRING<16> networkName = 2; - INT16U channel = 3; - INT8U version = 4; - OCTET_STRING<8> extendedAddress = 5; - INT8S rssi = 6; - INT8U lqi = 7; + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; } readonly attribute access(read: administer) int8u maxNetworks = 0; @@ -2779,17 +2779,17 @@ client cluster OccupancySensing = 1030 { } client cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : enum8 { + enum OnOffDelayedAllOffEffectVariant : ENUM8 { kFadeToOffIn0p8Seconds = 0; kNoFade = 1; k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; } - enum OnOffDyingLightEffectVariant : enum8 { + enum OnOffDyingLightEffectVariant : ENUM8 { k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; } - enum OnOffEffectIdentifier : enum8 { + enum OnOffEffectIdentifier : ENUM8 { kDelayedAllOff = 0; kDyingLight = 1; } @@ -2862,17 +2862,17 @@ client cluster OperationalCredentials = 62 { } struct NOCStruct { - OCTET_STRING noc = 1; - nullable OCTET_STRING icac = 2; + octet_string noc = 1; + nullable octet_string icac = 2; fabric_idx fabricIndex = 254; } struct FabricDescriptor { - OCTET_STRING<65> rootPublicKey = 1; - VENDOR_ID vendorId = 2; - FABRIC_ID fabricId = 3; - NODE_ID nodeId = 4; - CHAR_STRING<32> label = 5; + octet_string<65> rootPublicKey = 1; + vendor_id vendorId = 2; + fabric_id fabricId = 3; + node_id nodeId = 4; + char_string<32> label = 5; fabric_idx fabricIndex = 254; } @@ -3217,9 +3217,9 @@ client cluster Scenes = 5 { } struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; + cluster_id clusterId = 0; + int8u length = 1; + int8u value = 2; } readonly attribute int8u sceneCount = 0; @@ -3320,11 +3320,11 @@ client cluster Scenes = 5 { client cluster SoftwareDiagnostics = 52 { struct ThreadMetrics { - INT64U id = 0; - CHAR_STRING<8> name = 1; - INT32U stackFreeCurrent = 2; - INT32U stackFreeMinimum = 3; - INT32U stackSize = 4; + int64u id = 0; + char_string<8> name = 1; + int32u stackFreeCurrent = 2; + int32u stackFreeMinimum = 3; + int32u stackSize = 4; } info event SoftwareFault = 0 { @@ -3393,8 +3393,8 @@ client cluster TargetNavigator = 1285 { } struct TargetInfo { - INT8U identifier = 0; - CHAR_STRING<32> name = 1; + int8u identifier = 0; + char_string<32> name = 1; } readonly attribute TargetInfo targetList[] = 0; @@ -3469,17 +3469,17 @@ client cluster TestCluster = 1295 { } struct TestListStructOctet { - INT64U fabricIndex = 0; - OCTET_STRING<32> operationalCert = 1; + int64u fabricIndex = 0; + octet_string<32> operationalCert = 1; } struct NullablesAndOptionalsStruct { - nullable INT16U nullableInt = 0; - optional INT16U optionalInt = 1; - optional nullable INT16U nullableOptionalInt = 2; - nullable CHAR_STRING nullableString = 3; - optional CHAR_STRING optionalString = 4; - optional nullable CHAR_STRING nullableOptionalString = 5; + nullable int16u nullableInt = 0; + optional int16u optionalInt = 1; + optional nullable int16u nullableOptionalInt = 2; + nullable char_string nullableString = 3; + optional char_string optionalString = 4; + optional nullable char_string nullableOptionalString = 5; nullable SimpleStruct nullableStruct = 6; optional SimpleStruct optionalStruct = 7; optional nullable SimpleStruct nullableOptionalStruct = 8; @@ -3489,40 +3489,40 @@ client cluster TestCluster = 1295 { } struct SimpleStruct { - INT8U a = 0; - BOOLEAN b = 1; + int8u a = 0; + boolean b = 1; SimpleEnum c = 2; - OCTET_STRING d = 3; - CHAR_STRING e = 4; + octet_string d = 3; + char_string e = 4; SimpleBitmap f = 5; single g = 6; double h = 7; } struct TestFabricScoped { - INT8U fabricSensitiveInt8u = 1; - optional INT8U optionalFabricSensitiveInt8u = 2; - nullable INT8U nullableFabricSensitiveInt8u = 3; - optional nullable INT8U nullableOptionalFabricSensitiveInt8u = 4; - CHAR_STRING fabricSensitiveCharString = 5; + int8u fabricSensitiveInt8u = 1; + optional int8u optionalFabricSensitiveInt8u = 2; + nullable int8u nullableFabricSensitiveInt8u = 3; + optional nullable int8u nullableOptionalFabricSensitiveInt8u = 4; + char_string fabricSensitiveCharString = 5; SimpleStruct fabricSensitiveStruct = 6; - INT8U fabricSensitiveInt8uList[] = 7; + int8u fabricSensitiveInt8uList[] = 7; fabric_idx fabricIndex = 254; } struct NestedStructList { - INT8U a = 0; - BOOLEAN b = 1; + int8u a = 0; + boolean b = 1; SimpleStruct c = 2; SimpleStruct d[] = 3; - INT32U e[] = 4; - OCTET_STRING f[] = 5; - INT8U g[] = 6; + int32u e[] = 4; + octet_string f[] = 5; + int8u g[] = 6; } struct NestedStruct { - INT8U a = 0; - BOOLEAN b = 1; + int8u a = 0; + boolean b = 1; SimpleStruct c = 2; } @@ -3896,53 +3896,53 @@ client cluster ThreadNetworkDiagnostics = 53 { } struct NeighborTable { - INT64U extAddress = 0; - INT32U age = 1; - INT16U rloc16 = 2; - INT32U linkFrameCounter = 3; - INT32U mleFrameCounter = 4; - INT8U lqi = 5; - INT8S averageRssi = 6; - INT8S lastRssi = 7; - INT8U frameErrorRate = 8; - INT8U messageErrorRate = 9; - BOOLEAN rxOnWhenIdle = 10; - BOOLEAN fullThreadDevice = 11; - BOOLEAN fullNetworkData = 12; - BOOLEAN isChild = 13; + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + int8s averageRssi = 6; + int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; } struct RouteTable { - INT64U extAddress = 0; - INT16U rloc16 = 1; - INT8U routerId = 2; - INT8U nextHop = 3; - INT8U pathCost = 4; - INT8U LQIIn = 5; - INT8U LQIOut = 6; - INT8U age = 7; - BOOLEAN allocated = 8; - BOOLEAN linkEstablished = 9; + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; } struct SecurityPolicy { - INT16U rotationTime = 0; - BITMAP16 flags = 1; + int16u rotationTime = 0; + bitmap16 flags = 1; } struct OperationalDatasetComponents { - BOOLEAN activeTimestampPresent = 0; - BOOLEAN pendingTimestampPresent = 1; - BOOLEAN masterKeyPresent = 2; - BOOLEAN networkNamePresent = 3; - BOOLEAN extendedPanIdPresent = 4; - BOOLEAN meshLocalPrefixPresent = 5; - BOOLEAN delayPresent = 6; - BOOLEAN panIdPresent = 7; - BOOLEAN channelPresent = 8; - BOOLEAN pskcPresent = 9; - BOOLEAN securityPolicyPresent = 10; - BOOLEAN channelMaskPresent = 11; + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; } info event ConnectionStatus = 0 { diff --git a/src/controller/java/templates/partials/decode_value.zapt b/src/controller/java/templates/partials/decode_value.zapt index 9517214e4fa579..60c179152dcee8 100644 --- a/src/controller/java/templates/partials/decode_value.zapt +++ b/src/controller/java/templates/partials/decode_value.zapt @@ -50,7 +50,7 @@ if ({{source}}.IsNull()) { {{/zcl_struct_items_by_struct_name}} ); {{else}} - {{#if_chip_enum type}} + {{#if_is_strongly_typed_chip_enum type}} std::string {{target}}ClassName = "{{asJniClassName type null cluster}}"; std::string {{target}}CtorSignature = "({{asJniSignature type null cluster false}})V"; chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), static_cast<{{asUnderlyingBasicType type}}>({{source}}), {{target}}); @@ -64,12 +64,12 @@ if ({{source}}.IsNull()) { {{else}} std::string {{target}}ClassName = "{{asJniClassName type null cluster}}"; std::string {{target}}CtorSignature = "({{asJniSignature type null cluster false}})V"; - {{#if_is_bitmap type}} + {{#if_is_strongly_typed_bitmap type}} chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{source}}.Raw(), {{target}}); {{else}} chip::JniReferences::GetInstance().CreateBoxedObject<{{asUnderlyingBasicType type}}>({{target}}ClassName.c_str(), {{target}}CtorSignature.c_str(), {{source}}, {{target}}); - {{/if_is_bitmap}} + {{/if_is_strongly_typed_bitmap}} {{/if}} - {{/if_chip_enum}} + {{/if_is_strongly_typed_chip_enum}} {{/if_is_struct}} {{/if}} \ No newline at end of file diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt index 5bbb973730d956..fdf3d8243a6998 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt @@ -45,9 +45,9 @@ {{#if_is_struct type}} {{#>CHIPCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}StructAttributeCallback{{/CHIPCallbackBridge}} {{/if_is_struct}} - {{#if_is_bitmap type}} + {{#if_is_strongly_typed_bitmap type}} {{#>CHIPCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}AttributeCallback{{/CHIPCallbackBridge}} - {{/if_is_bitmap}} + {{/if_is_strongly_typed_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt index 4399b9d12d88d9..494a5b938a0c66 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt @@ -35,9 +35,9 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}ListAttr {{#if_is_struct type}} typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}StructAttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); {{/if_is_struct}} -{{#if_is_bitmap type}} +{{#if_is_strongly_typed_bitmap type}} typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); -{{/if_is_bitmap}} +{{/if_is_strongly_typed_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} @@ -81,9 +81,9 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Attribut {{#if_is_struct type}} {{#>CHIPCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}StructAttributeCallback{{/CHIPCallbackBridge}} {{/if_is_struct}} - {{#if_is_bitmap type}} + {{#if_is_strongly_typed_bitmap type}} {{#>CHIPCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}AttributeCallback{{/CHIPCallbackBridge}} - {{/if_is_bitmap}} + {{/if_is_strongly_typed_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt index 4923c251c16112..ac55e2eeb5cf00 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPClustersObjc.zapt @@ -63,7 +63,7 @@ subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEs {{#zcl_clusters}} {{#zcl_enums}} -typedef NS_ENUM({{asUnderlyingZclType type}}, {{objCEnumName ../name label}}) { +typedef NS_ENUM({{asUnderlyingZclType name}}, {{objCEnumName ../name label}}) { {{#zcl_enum_items}} {{objCEnumName ../../name ../label}}{{objCEnumItemLabel label}} = {{asHex value 2}}, {{/zcl_enum_items}} @@ -71,7 +71,7 @@ typedef NS_ENUM({{asUnderlyingZclType type}}, {{objCEnumName ../name label}}) { {{/zcl_enums}} {{#zcl_bitmaps}} -typedef NS_OPTIONS({{asUnderlyingZclType type}}, {{objCEnumName ../name label}}) { +typedef NS_OPTIONS({{asUnderlyingZclType name}}, {{objCEnumName ../name label}}) { {{#zcl_bitmap_items}} {{objCEnumName ../../name ../label}}{{objCEnumItemLabel label}} = {{asHex mask}}, {{/zcl_bitmap_items}} diff --git a/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt b/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt index f852aac380a31f..385e4afb338ee9 100644 --- a/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt @@ -6,14 +6,14 @@ less code to generate the callbacks on a per-attribute basis than a per-struct-type basis. ~}} {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Struct - {{~else if_is_bitmap type~}} - {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}} + {{~else if_is_strongly_typed_bitmap type~}} + {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}} {{~else~}} {{~#if isNullable}}Nullable{{/if~}} {{~#if (isStrEqual (asUpperCamelCase type) (asUpperCamelCase "vendor_id"))~}} VendorId - {{~else if isEnum~}} - {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase type}} + {{~else if_is_strongly_typed_chip_enum type~}} + {{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase type}} {{~else~}} {{chipCallback.name}} {{~/if~}} diff --git a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt index 30395188422f3b..50477cd01d70a4 100644 --- a/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/decode_value.zapt @@ -33,18 +33,18 @@ {{>decode_value target=(concat ../target "." (asStructPropertyName label)) source=(concat ../source "." (asLowerCamelCase label)) cluster=../cluster errorCode=../errorCode depth=(incrementDepth ../depth) }} {{/zcl_struct_items_by_struct_name}} {{else}} - {{#if_chip_enum type}} + {{#if_is_strongly_typed_chip_enum type}} {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:chip::to_underlying({{source}})]; {{else}} - {{#if_is_bitmap type}} - {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; + {{#if_is_strongly_typed_bitmap type}} + {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}.Raw()]; {{else if (isOctetString type)}} {{target}} = [NSData dataWithBytes:{{source}}.data() length:{{source}}.size()]; {{else if (isCharString type)}} {{target}} = [[NSString alloc] initWithBytes:{{source}}.data() length:{{source}}.size() encoding:NSUTF8StringEncoding]; {{else}} {{target}} = [NSNumber numberWith{{asObjectiveCNumberType "" type false}}:{{source}}]; - {{/if_is_bitmap}} - {{/if_chip_enum}} + {{/if_is_strongly_typed_bitmap}} + {{/if_is_strongly_typed_chip_enum}} {{/if_is_struct}} {{/if}} diff --git a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt index fb3bfea4be65e2..51b1625bd7e082 100644 --- a/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/encode_value.zapt @@ -49,14 +49,14 @@ {{>encode_value target=(concat ../target "." (asLowerCamelCase label)) source=(concat ../source "." (asStructPropertyName label)) cluster=../cluster errorCode=../errorCode depth=(incrementDepth ../depth)}} {{/zcl_struct_items_by_struct_name}} {{else}} - {{#if_chip_enum type}} + {{#if_is_strongly_typed_chip_enum type}} {{target}} = static_cast>({{source}}.{{asObjectiveCNumberType source type true}}Value); {{else}} - {{#if_is_bitmap type}} + {{#if_is_strongly_typed_bitmap type}} {{target}} = static_cast>({{source}}.{{asObjectiveCNumberType source type true}}Value); {{else}} {{target}} = {{source}}.{{asObjectiveCNumberType source type true}}Value; - {{/if_is_bitmap}} - {{/if_chip_enum}} + {{/if_is_strongly_typed_bitmap}} + {{/if_is_strongly_typed_chip_enum}} {{/if_is_struct}} {{/if}} diff --git a/third_party/zap/repo b/third_party/zap/repo index 268547c0b0ce33..e9277b989f1d12 160000 --- a/third_party/zap/repo +++ b/third_party/zap/repo @@ -1 +1 @@ -Subproject commit 268547c0b0ce33e0fb46a83991b850c7b4da2671 +Subproject commit e9277b989f1d128bc881e88ecbf7a3353c841c39 diff --git a/zzz_generated/app-common/app-common/zap-generated/af-structs.h b/zzz_generated/app-common/app-common/zap-generated/af-structs.h index c034671b834a3c..c5f0e03560121b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/af-structs.h +++ b/zzz_generated/app-common/app-common/zap-generated/af-structs.h @@ -450,7 +450,7 @@ typedef struct _ProviderLocation typedef struct _ReadAttributeStatusRecord { chip::AttributeId attributeId; - chip::Protocols::InteractionModel::Status status; + uint8_t status; uint8_t attributeType; uint8_t * attributeLocation; } ReadAttributeStatusRecord; @@ -609,7 +609,7 @@ typedef struct _WriteAttributeRecord // Struct for WriteAttributeStatusRecord typedef struct _WriteAttributeStatusRecord { - chip::Protocols::InteractionModel::Status status; + uint8_t status; chip::AttributeId attributeId; } WriteAttributeStatusRecord; @@ -626,7 +626,7 @@ typedef struct _WriteStructuredAttributeRecord // Struct for WriteStructuredAttributeStatusRecord typedef struct _WriteStructuredAttributeStatusRecord { - chip::Protocols::InteractionModel::Status status; + uint8_t status; chip::AttributeId attributeId; uint8_t indicator; /* TYPE WARNING: array array defaults to */ uint8_t * indicies;