From 1122287cb3077f84350e02a828059cc09a5518d4 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 5 Jun 2023 16:57:05 -0400 Subject: [PATCH] Delete dynamic bridge example (#27077) * Delete dynamic bridge * Delete bridge generator * Remove one more bridge usage * Restyled by isort * Also delete valueassign as it is not used anymore (dynamic bridge was using it) --------- Co-authored-by: Restyled.io --- .../workflows/examples-linux-standalone.yaml | 11 - docs/examples/index.md | 9 - .../dynamic-bridge-app/bridge-common/BUILD.gn | 42 - .../bridge-common/bridge-app.matter | 2017 ----- .../bridge-common/bridge-app.zap | 7618 ----------------- .../include/CHIPProjectAppConfig.h | 34 - .../protos/bridge_service.options | 2 - .../bridge-common/protos/bridge_service.proto | 33 - examples/dynamic-bridge-app/linux/.gn | 25 - examples/dynamic-bridge-app/linux/BUILD.gn | 128 - examples/dynamic-bridge-app/linux/Backend.cpp | 62 - .../dynamic-bridge-app/linux/Clusters.cpp | 86 - examples/dynamic-bridge-app/linux/Device.cpp | 51 - examples/dynamic-bridge-app/linux/Dockerfile | 23 - .../linux/DynamicDevice.cpp | 95 - examples/dynamic-bridge-app/linux/README.md | 179 - .../linux/UserInputBackend.cpp | 588 -- examples/dynamic-bridge-app/linux/args.gni | 27 - .../linux/bridge_service.cpp | 73 - .../dynamic-bridge-app/linux/bridge_service.h | 42 - .../linux/bridged-actions-stub.cpp | 136 - examples/dynamic-bridge-app/linux/build | 1 - .../dynamic-bridge-app/linux/build_overrides | 1 - .../dynamic-bridge-app/linux/entrypoint.sh | 12 - .../linux/include/ActionCluster.h | 50 - .../linux/include/Backend.h | 29 - .../linux/include/Clusters.h | 106 - .../dynamic-bridge-app/linux/include/Device.h | 64 - .../linux/include/DynamicDevice.h | 84 - .../linux/include/GeneratedClusters.h | 39 - .../linux/include/data-model/Attribute.h | 104 - .../linux/include/data-model/DataModel.h | 325 - .../dynamic-bridge-app/linux/include/main.h | 66 - examples/dynamic-bridge-app/linux/main.cpp | 576 -- .../linux/third_party/connectedhomeip | 1 - .../dynamic-bridge-app/linux/with_pw_rpc.gni | 45 - integrations/cloudbuild/build-all.yaml | 2 - integrations/cloudbuild/smoke-test.yaml | 2 - scripts/build/build/targets.py | 145 +- scripts/build/builders/host.py | 6 - .../build/testdata/all_targets_linux_x64.txt | 2 +- scripts/pregenerate/__init__.py | 4 +- scripts/pregenerate/using_codegen.py | 15 - scripts/py_matter_idl/BUILD.gn | 11 - scripts/py_matter_idl/files.gni | 4 - .../bridge/BridgeClustersCommon.jinja | 34 - .../generators/bridge/BridgeClustersCpp.jinja | 86 - .../bridge/BridgeClustersGlobalStructs.jinja | 41 - .../bridge/BridgeClustersHeader.jinja | 62 - .../matter_idl/generators/bridge/__init__.py | 181 - .../matter_idl/generators/registry.py | 5 - .../matter_idl/test_generators.py | 3 - .../matter_idl/tests/available_tests.yaml | 24 - .../bridge/BridgeClustersImpl.h | 26 - .../bridge/DemoClusterServer.h | 31 - .../bridge/BridgeClustersImpl.h | 26 - .../cluster_with_commands/bridge/OnOff.h | 48 - .../bridge/BridgeClustersImpl.h | 26 - .../bridge/DemoClusterServer.h | 31 - .../bridge/BridgeClustersImpl.h | 53 - .../several_clusters/bridge/FirstServer.h | 28 - .../several_clusters/bridge/SecondServer.h | 28 - .../outputs/several_clusters/bridge/Third.h | 31 - .../several_clusters/bridge/ThirdServer.h | 31 - .../bridge/BridgeClustersImpl.h | 26 - .../simple_attribute/bridge/MyClusterServer.h | 28 - scripts/py_matter_idl/setup.cfg | 4 - scripts/tools/check_includes_config.py | 1 - src/lib/assign/BUILD.gn | 22 - src/lib/assign/ValueAssign.h | 45 - 70 files changed, 98 insertions(+), 13798 deletions(-) delete mode 100644 examples/dynamic-bridge-app/bridge-common/BUILD.gn delete mode 100644 examples/dynamic-bridge-app/bridge-common/bridge-app.matter delete mode 100644 examples/dynamic-bridge-app/bridge-common/bridge-app.zap delete mode 100644 examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h delete mode 100644 examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options delete mode 100644 examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto delete mode 100644 examples/dynamic-bridge-app/linux/.gn delete mode 100644 examples/dynamic-bridge-app/linux/BUILD.gn delete mode 100644 examples/dynamic-bridge-app/linux/Backend.cpp delete mode 100644 examples/dynamic-bridge-app/linux/Clusters.cpp delete mode 100644 examples/dynamic-bridge-app/linux/Device.cpp delete mode 100644 examples/dynamic-bridge-app/linux/Dockerfile delete mode 100644 examples/dynamic-bridge-app/linux/DynamicDevice.cpp delete mode 100644 examples/dynamic-bridge-app/linux/README.md delete mode 100644 examples/dynamic-bridge-app/linux/UserInputBackend.cpp delete mode 100644 examples/dynamic-bridge-app/linux/args.gni delete mode 100644 examples/dynamic-bridge-app/linux/bridge_service.cpp delete mode 100644 examples/dynamic-bridge-app/linux/bridge_service.h delete mode 100644 examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp delete mode 120000 examples/dynamic-bridge-app/linux/build delete mode 120000 examples/dynamic-bridge-app/linux/build_overrides delete mode 100755 examples/dynamic-bridge-app/linux/entrypoint.sh delete mode 100644 examples/dynamic-bridge-app/linux/include/ActionCluster.h delete mode 100644 examples/dynamic-bridge-app/linux/include/Backend.h delete mode 100644 examples/dynamic-bridge-app/linux/include/Clusters.h delete mode 100644 examples/dynamic-bridge-app/linux/include/Device.h delete mode 100644 examples/dynamic-bridge-app/linux/include/DynamicDevice.h delete mode 100644 examples/dynamic-bridge-app/linux/include/GeneratedClusters.h delete mode 100644 examples/dynamic-bridge-app/linux/include/data-model/Attribute.h delete mode 100644 examples/dynamic-bridge-app/linux/include/data-model/DataModel.h delete mode 100644 examples/dynamic-bridge-app/linux/include/main.h delete mode 100644 examples/dynamic-bridge-app/linux/main.cpp delete mode 120000 examples/dynamic-bridge-app/linux/third_party/connectedhomeip delete mode 100644 examples/dynamic-bridge-app/linux/with_pw_rpc.gni delete mode 100644 scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja delete mode 100644 scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h delete mode 100644 scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h delete mode 100644 src/lib/assign/BUILD.gn delete mode 100644 src/lib/assign/ValueAssign.h diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 204d3f448a1ca1..c291943771c827 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -181,17 +181,6 @@ jobs: linux debug bridge-app \ out/linux-x64-bridge/chip-bridge-app \ /tmp/bloat_reports/ - - name: Build example Dynamic Bridge - timeout-minutes: 10 - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py \ - --target linux-x64-dynamic-bridge-ipv6only \ - build" - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug dynamic-bridge-app-ipv6only \ - out/linux-x64-dynamic-bridge-ipv6only/dynamic-chip-bridge-app \ - /tmp/bloat_reports/ - name: Build example OTA Provider timeout-minutes: 10 run: | diff --git a/docs/examples/index.md b/docs/examples/index.md index 46482fcbe8934e..12a8a82e260da7 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -69,15 +69,6 @@ chip-tool/README darwin-framework-tool/README ``` -## Dynamic bridge example - -```{toctree} -:glob: -:maxdepth: 1 - -dynamic-bridge-app/**/README -``` - ## Java matter controller example ```{toctree} diff --git a/examples/dynamic-bridge-app/bridge-common/BUILD.gn b/examples/dynamic-bridge-app/bridge-common/BUILD.gn deleted file mode 100644 index 584e172b654b7c..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/BUILD.gn +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") - -import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") -import("${chip_root}/src/app/chip_data_model.gni") - -chip_data_model("dynamic-bridge-common") { - zap_file = "bridge-app.zap" - - zap_pregenerated_dir = - "${chip_root}/zzz_generated/dynamic-bridge-app/zap-generated" - - is_server = true - - # TODO: the definition of DYNAMIC_ENDPOINT_COUNT needs find a common home! - cflags = [ "-DDYNAMIC_ENDPOINT_COUNT=16" ] -} - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - IMPORT("$dir_pw_protobuf_compiler/proto.gni") - - pw_proto_library("bridge_service") { - sources = [ "protos/bridge_service.proto" ] - inputs = [ "protos/bridge_service.options" ] - strip_prefix = "protos" - prefix = "bridge_service" - } -} diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter deleted file mode 100644 index 73af44b32f9a84..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ /dev/null @@ -1,2017 +0,0 @@ -// This IDL was generated automatically by ZAP. -// It is for view/code review purposes only. - -struct ModeTagStruct { - optional vendor_id mfgCode = 0; - enum16 value = 1; - optional char_string<64> tagName = 2; -} - -struct ModeOptionStruct { - char_string<64> label = 0; - int8u mode = 1; - ModeTagStruct modeTags[] = 2; -} - -struct ApplicationStruct { - int16u catalogVendorID = 0; - char_string applicationID = 1; -} - -struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; -} - -/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ -server cluster Identify = 3 { - enum EffectIdentifierEnum : ENUM8 { - kBlink = 0; - kBreathe = 1; - kOkay = 2; - kChannelChange = 11; - kFinishEffect = 254; - kStopEffect = 255; - } - - enum EffectVariantEnum : ENUM8 { - kDefault = 0; - } - - enum IdentifyTypeEnum : ENUM8 { - kNone = 0; - kLightOutput = 1; - kVisibleIndicator = 2; - kAudibleBeep = 3; - kDisplay = 4; - kActuator = 5; - } - - attribute int16u identifyTime = 0; - readonly attribute IdentifyTypeEnum identifyType = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct IdentifyRequest { - INT16U identifyTime = 0; - } - - request struct TriggerEffectRequest { - EffectIdentifierEnum effectIdentifier = 0; - EffectVariantEnum effectVariant = 1; - } - - command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; - command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; -} - -/** Attributes and commands for switching devices between 'On' and 'Off' states. */ -server cluster OnOff = 6 { - enum OnOffDelayedAllOffEffectVariant : ENUM8 { - kFadeToOffIn0p8Seconds = 0; - kNoFade = 1; - k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; - } - - enum OnOffDyingLightEffectVariant : ENUM8 { - k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; - } - - enum OnOffEffectIdentifier : ENUM8 { - kDelayedAllOff = 0; - kDyingLight = 1; - } - - enum OnOffStartUpOnOff : ENUM8 { - kOff = 0; - kOn = 1; - kTogglePreviousOnOff = 2; - } - - bitmap Feature : BITMAP32 { - kLighting = 0x1; - } - - bitmap OnOffControl : BITMAP8 { - kAcceptOnlyWhenOn = 0x1; - } - - readonly attribute boolean onOff = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - command Off(): DefaultSuccess = 0; - command On(): DefaultSuccess = 1; - command Toggle(): DefaultSuccess = 2; -} - -/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */ -server cluster LevelControl = 8 { - enum MoveMode : ENUM8 { - kUp = 0; - kDown = 1; - } - - enum StepMode : ENUM8 { - kUp = 0; - kDown = 1; - } - - bitmap Feature : BITMAP32 { - kOnOff = 0x1; - kLighting = 0x2; - kFrequency = 0x4; - } - - bitmap LevelControlOptions : BITMAP8 { - kExecuteIfOff = 0x1; - kCoupleColorTempToLevel = 0x2; - } - - readonly attribute nullable int8u currentLevel = 0; - readonly attribute int16u remainingTime = 1; - readonly attribute int8u minLevel = 2; - readonly attribute int8u maxLevel = 3; - readonly attribute int16u currentFrequency = 4; - readonly attribute int16u minFrequency = 5; - readonly attribute int16u maxFrequency = 6; - attribute LevelControlOptions options = 15; - attribute int16u onOffTransitionTime = 16; - attribute nullable int8u onLevel = 17; - attribute nullable int16u onTransitionTime = 18; - attribute nullable int16u offTransitionTime = 19; - attribute nullable int8u defaultMoveRate = 20; - attribute access(write: manage) nullable int8u startUpCurrentLevel = 16384; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct MoveToLevelRequest { - INT8U level = 0; - nullable INT16U transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct MoveRequest { - MoveMode moveMode = 0; - nullable INT8U rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct StepRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - nullable INT16U transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; - } - - request struct StopRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; - } - - request struct MoveToLevelWithOnOffRequest { - INT8U level = 0; - nullable INT16U transitionTime = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct MoveWithOnOffRequest { - MoveMode moveMode = 0; - nullable INT8U rate = 1; - LevelControlOptions optionsMask = 2; - LevelControlOptions optionsOverride = 3; - } - - request struct StepWithOnOffRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - nullable INT16U transitionTime = 2; - LevelControlOptions optionsMask = 3; - LevelControlOptions optionsOverride = 4; - } - - request struct StopWithOnOffRequest { - LevelControlOptions optionsMask = 0; - LevelControlOptions optionsOverride = 1; - } - - command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; - command Move(MoveRequest): DefaultSuccess = 1; - command Step(StepRequest): DefaultSuccess = 2; - command Stop(StopRequest): DefaultSuccess = 3; - command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; - command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; - command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command StopWithOnOff(StopWithOnOffRequest): DefaultSuccess = 7; -} - -/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ -server cluster Descriptor = 29 { - struct DeviceTypeStruct { - devtype_id deviceType = 0; - int16u revision = 1; - } - - readonly attribute DeviceTypeStruct deviceTypeList[] = 0; - readonly attribute CLUSTER_ID serverList[] = 1; - readonly attribute CLUSTER_ID clientList[] = 2; - readonly attribute ENDPOINT_NO partsList[] = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ -client cluster Binding = 30 { - fabric_scoped 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; - } - - attribute TargetStruct binding[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Access Control Cluster exposes a data model view of a - Node's Access Control List (ACL), which codifies the rules used to manage - and enforce Access Control for the Node's endpoints and their associated - cluster instances. */ -client cluster AccessControl = 31 { - enum AccessControlEntryAuthModeEnum : ENUM8 { - kPase = 1; - kCase = 2; - kGroup = 3; - } - - enum AccessControlEntryPrivilegeEnum : ENUM8 { - kView = 1; - kProxyView = 2; - kOperate = 3; - kManage = 4; - kAdminister = 5; - } - - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - struct AccessControlTargetStruct { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - - fabric_scoped struct AccessControlEntryStruct { - fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; - fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; - nullable fabric_sensitive int64u subjects[] = 3; - nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; - fabric_idx fabricIndex = 254; - } - - fabric_scoped struct AccessControlExtensionStruct { - fabric_sensitive octet_string<128> data = 1; - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { - nullable node_id adminNodeID = 1; - nullable INT16U adminPasscodeID = 2; - ChangeTypeEnum changeType = 3; - nullable AccessControlEntryStruct latestValue = 4; - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { - nullable node_id adminNodeID = 1; - nullable INT16U adminPasscodeID = 2; - ChangeTypeEnum changeType = 3; - nullable AccessControlExtensionStruct latestValue = 4; - fabric_idx fabricIndex = 254; - } - - attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; - readonly attribute int16u subjectsPerAccessControlEntry = 2; - readonly attribute int16u targetsPerAccessControlEntry = 3; - readonly attribute int16u accessControlEntriesPerFabric = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Access Control Cluster exposes a data model view of a - Node's Access Control List (ACL), which codifies the rules used to manage - and enforce Access Control for the Node's endpoints and their associated - cluster instances. */ -server cluster AccessControl = 31 { - enum AccessControlEntryAuthModeEnum : ENUM8 { - kPase = 1; - kCase = 2; - kGroup = 3; - } - - enum AccessControlEntryPrivilegeEnum : ENUM8 { - kView = 1; - kProxyView = 2; - kOperate = 3; - kManage = 4; - kAdminister = 5; - } - - enum ChangeTypeEnum : ENUM8 { - kChanged = 0; - kAdded = 1; - kRemoved = 2; - } - - struct AccessControlTargetStruct { - nullable cluster_id cluster = 0; - nullable endpoint_no endpoint = 1; - nullable devtype_id deviceType = 2; - } - - fabric_scoped struct AccessControlEntryStruct { - fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; - fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; - nullable fabric_sensitive int64u subjects[] = 3; - nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; - fabric_idx fabricIndex = 254; - } - - fabric_scoped struct AccessControlExtensionStruct { - fabric_sensitive octet_string<128> data = 1; - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { - nullable node_id adminNodeID = 1; - nullable INT16U adminPasscodeID = 2; - ChangeTypeEnum changeType = 3; - nullable AccessControlEntryStruct latestValue = 4; - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { - nullable node_id adminNodeID = 1; - nullable INT16U adminPasscodeID = 2; - ChangeTypeEnum changeType = 3; - nullable AccessControlExtensionStruct latestValue = 4; - fabric_idx fabricIndex = 254; - } - - attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; - attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1; - readonly attribute int16u subjectsPerAccessControlEntry = 2; - readonly attribute int16u targetsPerAccessControlEntry = 3; - readonly attribute int16u accessControlEntriesPerFabric = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ -server cluster Actions = 37 { - enum ActionErrorEnum : ENUM8 { - kUnknown = 0; - kInterrupted = 1; - } - - enum ActionStateEnum : ENUM8 { - kInactive = 0; - kActive = 1; - kPaused = 2; - kDisabled = 3; - } - - enum ActionTypeEnum : ENUM8 { - kOther = 0; - kScene = 1; - kSequence = 2; - kAutomation = 3; - kException = 4; - kNotification = 5; - kAlarm = 6; - } - - enum EndpointListTypeEnum : ENUM8 { - kOther = 0; - kRoom = 1; - kZone = 2; - } - - bitmap CommandBits : BITMAP16 { - kInstantAction = 0x1; - kInstantActionWithTransition = 0x2; - kStartAction = 0x4; - kStartActionWithDuration = 0x8; - kStopAction = 0x10; - kPauseAction = 0x20; - kPauseActionWithDuration = 0x40; - kResumeAction = 0x80; - kEnableAction = 0x100; - kEnableActionWithDuration = 0x200; - kDisableAction = 0x400; - kDisableActionWithDuration = 0x800; - } - - struct ActionStruct { - int16u actionID = 0; - char_string<32> name = 1; - ActionTypeEnum type = 2; - int16u endpointListID = 3; - CommandBits supportedCommands = 4; - ActionStateEnum state = 5; - } - - struct EndpointListStruct { - int16u endpointListID = 0; - char_string<32> name = 1; - EndpointListTypeEnum type = 2; - endpoint_no endpoints[] = 3; - } - - info event StateChanged = 0 { - INT16U actionID = 0; - INT32U invokeID = 1; - ActionStateEnum newState = 2; - } - - info event ActionFailed = 1 { - INT16U actionID = 0; - INT32U invokeID = 1; - ActionStateEnum newState = 2; - ActionErrorEnum error = 3; - } - - readonly attribute ActionStruct actionList[] = 0; - readonly attribute EndpointListStruct endpointLists[] = 1; - readonly attribute long_char_string<512> setupURL = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct InstantActionRequest { - INT16U actionID = 0; - optional INT32U invokeID = 1; - } - - command InstantAction(InstantActionRequest): DefaultSuccess = 0; -} - -/** This cluster provides attributes and events for determining basic information about Nodes, which supports both - Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, - which apply to the whole Node. Also allows setting user device information such as location. */ -server cluster BasicInformation = 40 { - enum ColorEnum : ENUM8 { - kBlack = 0; - kNavy = 1; - kGreen = 2; - kTeal = 3; - kMaroon = 4; - kPurple = 5; - kOlive = 6; - kGray = 7; - kBlue = 8; - kLime = 9; - kAqua = 10; - kRed = 11; - kFuchsia = 12; - kYellow = 13; - kWhite = 14; - kNickel = 15; - kChrome = 16; - kBrass = 17; - kCopper = 18; - kSilver = 19; - kGold = 20; - } - - enum ProductFinishEnum : ENUM8 { - kOther = 0; - kMatte = 1; - kSatin = 2; - kPolished = 3; - kRugged = 4; - kFabric = 5; - } - - struct CapabilityMinimaStruct { - int16u caseSessionsPerFabric = 0; - int16u subscriptionsPerFabric = 1; - } - - struct ProductAppearanceStruct { - ProductFinishEnum finish = 0; - nullable ColorEnum primaryColor = 1; - } - - critical event StartUp = 0 { - INT32U softwareVersion = 0; - } - - critical event ShutDown = 1 { - } - - info event Leave = 2 { - fabric_idx fabricIndex = 0; - } - - info event ReachableChanged = 3 { - boolean reachableNewValue = 0; - } - - readonly attribute int16u dataModelRevision = 0; - readonly attribute char_string<32> vendorName = 1; - readonly attribute vendor_id vendorID = 2; - readonly attribute char_string<32> productName = 3; - readonly attribute int16u productID = 4; - attribute access(write: manage) char_string<32> nodeLabel = 5; - attribute access(write: administer) char_string<2> location = 6; - readonly attribute int16u hardwareVersion = 7; - readonly attribute char_string<64> hardwareVersionString = 8; - readonly attribute int32u softwareVersion = 9; - readonly attribute char_string<64> softwareVersionString = 10; - readonly attribute char_string<16> manufacturingDate = 11; - readonly attribute char_string<32> partNumber = 12; - readonly attribute long_char_string<256> productURL = 13; - readonly attribute char_string<64> productLabel = 14; - readonly attribute char_string<32> serialNumber = 15; - attribute access(write: manage) boolean localConfigDisabled = 16; - readonly attribute char_string<32> uniqueID = 18; - readonly attribute CapabilityMinimaStruct capabilityMinima = 19; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -server cluster LocalizationConfiguration = 43 { - attribute char_string<35> activeLocale = 0; - readonly attribute CHAR_STRING supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -server cluster TimeFormatLocalization = 44 { - enum CalendarTypeEnum : ENUM8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - } - - enum HourFormatEnum : ENUM8 { - k12hr = 0; - k24hr = 1; - } - - attribute HourFormatEnum hourFormat = 0; - attribute CalendarTypeEnum activeCalendarType = 1; - readonly attribute CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for the units in which values are conveyed in communication to a - user. As such, Nodes that visually or audibly convey measurable values to the user need a - mechanism by which they can be configured to use a user’s preferred unit. */ -server cluster UnitLocalization = 45 { - enum TempUnitEnum : ENUM8 { - kFahrenheit = 0; - kCelsius = 1; - kKelvin = 2; - } - - bitmap Feature : BITMAP32 { - kTemperatureUnit = 0x1; - } - - attribute TempUnitEnum temperatureUnit = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** This cluster is used to manage global aspects of the Commissioning flow. */ -server cluster GeneralCommissioning = 48 { - enum CommissioningErrorEnum : ENUM8 { - kOk = 0; - kValueOutsideRange = 1; - kInvalidAuthentication = 2; - kNoFailSafe = 3; - kBusyWithOtherAdmin = 4; - } - - enum RegulatoryLocationTypeEnum : ENUM8 { - kIndoor = 0; - kOutdoor = 1; - kIndoorOutdoor = 2; - } - - struct BasicCommissioningInfo { - int16u failSafeExpiryLengthSeconds = 0; - int16u maxCumulativeFailsafeSeconds = 1; - } - - attribute access(write: administer) int64u breadcrumb = 0; - readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; - readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; - readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; - readonly attribute boolean supportsConcurrentConnection = 4; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct ArmFailSafeRequest { - INT16U expiryLengthSeconds = 0; - INT64U breadcrumb = 1; - } - - request struct SetRegulatoryConfigRequest { - RegulatoryLocationTypeEnum newRegulatoryConfig = 0; - CHAR_STRING countryCode = 1; - INT64U breadcrumb = 2; - } - - response struct ArmFailSafeResponse = 1 { - CommissioningErrorEnum errorCode = 0; - CHAR_STRING debugText = 1; - } - - response struct SetRegulatoryConfigResponse = 3 { - CommissioningErrorEnum errorCode = 0; - CHAR_STRING debugText = 1; - } - - response struct CommissioningCompleteResponse = 5 { - CommissioningErrorEnum errorCode = 0; - CHAR_STRING debugText = 1; - } - - command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; - command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; - fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; -} - -/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ -server cluster NetworkCommissioning = 49 { - enum NetworkCommissioningStatusEnum : ENUM8 { - kSuccess = 0; - kOutOfRange = 1; - kBoundsExceeded = 2; - kNetworkIDNotFound = 3; - kDuplicateNetworkID = 4; - kNetworkNotFound = 5; - kRegulatoryError = 6; - kAuthFailure = 7; - kUnsupportedSecurity = 8; - kOtherConnectionFailure = 9; - kIPV6Failed = 10; - kIPBindFailed = 11; - kUnknownError = 12; - } - - enum WiFiBandEnum : ENUM8 { - k2g4 = 0; - k3g65 = 1; - k5g = 2; - k6g = 3; - k60g = 4; - k1g = 5; - } - - bitmap Feature : BITMAP32 { - kWiFiNetworkInterface = 0x1; - kThreadNetworkInterface = 0x2; - kEthernetNetworkInterface = 0x4; - } - - bitmap WiFiSecurityBitmap : BITMAP8 { - kUnencrypted = 0x1; - kWep = 0x2; - kWpaPersonal = 0x4; - kWpa2Personal = 0x8; - kWpa3Personal = 0x10; - } - - struct NetworkInfoStruct { - octet_string<32> networkID = 0; - boolean connected = 1; - } - - struct ThreadInterfaceScanResultStruct { - 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; - } - - struct WiFiInterfaceScanResultStruct { - WiFiSecurityBitmap security = 0; - octet_string<32> ssid = 1; - octet_string<6> bssid = 2; - int16u channel = 3; - WiFiBandEnum wiFiBand = 4; - int8s rssi = 5; - } - - readonly attribute access(read: administer) int8u maxNetworks = 0; - readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; - readonly attribute int8u scanMaxTimeSeconds = 2; - readonly attribute int8u connectMaxTimeSeconds = 3; - attribute access(write: administer) boolean interfaceEnabled = 4; - readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; - readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; - readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct ScanNetworksRequest { - optional nullable OCTET_STRING<32> ssid = 0; - optional INT64U breadcrumb = 1; - } - - request struct AddOrUpdateWiFiNetworkRequest { - OCTET_STRING<32> ssid = 0; - OCTET_STRING<64> credentials = 1; - optional INT64U breadcrumb = 2; - } - - request struct AddOrUpdateThreadNetworkRequest { - OCTET_STRING<254> operationalDataset = 0; - optional INT64U breadcrumb = 1; - } - - request struct RemoveNetworkRequest { - OCTET_STRING<32> networkID = 0; - optional INT64U breadcrumb = 1; - } - - request struct ConnectNetworkRequest { - OCTET_STRING<32> networkID = 0; - optional INT64U breadcrumb = 1; - } - - request struct ReorderNetworkRequest { - OCTET_STRING<32> networkID = 0; - INT8U networkIndex = 1; - optional INT64U breadcrumb = 2; - } - - response struct ScanNetworksResponse = 1 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional CHAR_STRING debugText = 1; - optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; - optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; - } - - response struct NetworkConfigResponse = 5 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional CHAR_STRING<512> debugText = 1; - optional INT8U networkIndex = 2; - } - - response struct ConnectNetworkResponse = 7 { - NetworkCommissioningStatusEnum networkingStatus = 0; - optional CHAR_STRING debugText = 1; - nullable INT32S errorValue = 2; - } - - command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; - command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; - command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; - command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; - command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; - command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; -} - -/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ -server cluster DiagnosticLogs = 50 { - enum IntentEnum : ENUM8 { - kEndUserSupport = 0; - kNetworkDiag = 1; - kCrashLogs = 2; - } - - enum StatusEnum : ENUM8 { - kSuccess = 0; - kExhausted = 1; - kNoLogs = 2; - kBusy = 3; - kDenied = 4; - } - - enum TransferProtocolEnum : ENUM8 { - kResponsePayload = 0; - kBdx = 1; - } - - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct RetrieveLogsRequestRequest { - IntentEnum intent = 0; - TransferProtocolEnum requestedProtocol = 1; - optional CHAR_STRING<32> transferFileDesignator = 2; - } - - command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; -} - -/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster GeneralDiagnostics = 51 { - enum BootReasonEnum : ENUM8 { - kUnspecified = 0; - kPowerOnReboot = 1; - kBrownOutReset = 2; - kSoftwareWatchdogReset = 3; - kHardwareWatchdogReset = 4; - kSoftwareUpdateCompleted = 5; - kSoftwareReset = 6; - } - - enum HardwareFaultEnum : ENUM8 { - kUnspecified = 0; - kRadio = 1; - kSensor = 2; - kResettableOverTemp = 3; - kNonResettableOverTemp = 4; - kPowerSource = 5; - kVisualDisplayFault = 6; - kAudioOutputFault = 7; - kUserInterfaceFault = 8; - kNonVolatileMemoryError = 9; - kTamperDetected = 10; - } - - enum InterfaceTypeEnum : ENUM8 { - kUnspecified = 0; - kWiFi = 1; - kEthernet = 2; - kCellular = 3; - kThread = 4; - } - - enum NetworkFaultEnum : ENUM8 { - kUnspecified = 0; - kHardwareFailure = 1; - kNetworkJammed = 2; - kConnectionFailed = 3; - } - - enum RadioFaultEnum : ENUM8 { - kUnspecified = 0; - kWiFiFault = 1; - kCellularFault = 2; - kThreadFault = 3; - kNFCFault = 4; - kBLEFault = 5; - kEthernetFault = 6; - } - - struct NetworkInterface { - 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; - InterfaceTypeEnum type = 7; - } - - critical event HardwareFaultChange = 0 { - HardwareFaultEnum current[] = 0; - HardwareFaultEnum previous[] = 1; - } - - critical event RadioFaultChange = 1 { - RadioFaultEnum current[] = 0; - RadioFaultEnum previous[] = 1; - } - - critical event NetworkFaultChange = 2 { - NetworkFaultEnum current[] = 0; - NetworkFaultEnum previous[] = 1; - } - - critical event BootReason = 3 { - BootReasonEnum bootReason = 0; - } - - readonly attribute NetworkInterface networkInterfaces[] = 0; - readonly attribute int16u rebootCount = 1; - readonly attribute int64u upTime = 2; - readonly attribute int32u totalOperationalHours = 3; - readonly attribute BootReasonEnum bootReason = 4; - readonly attribute HardwareFaultEnum activeHardwareFaults[] = 5; - readonly attribute RadioFaultEnum activeRadioFaults[] = 6; - readonly attribute NetworkFaultEnum activeNetworkFaults[] = 7; - readonly attribute boolean testEventTriggersEnabled = 8; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct TestEventTriggerRequest { - OCTET_STRING<16> enableKey = 0; - INT64U eventTrigger = 1; - } - - command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; -} - -/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster SoftwareDiagnostics = 52 { - bitmap Feature : BITMAP32 { - kWaterMarks = 0x1; - } - - struct ThreadMetricsStruct { - int64u id = 0; - optional char_string<8> name = 1; - optional int32u stackFreeCurrent = 2; - optional int32u stackFreeMinimum = 3; - optional int32u stackSize = 4; - } - - info event SoftwareFault = 0 { - INT64U id = 0; - optional CHAR_STRING name = 1; - optional OCTET_STRING faultRecording = 2; - } - - readonly attribute ThreadMetricsStruct threadMetrics[] = 0; - readonly attribute int64u currentHeapFree = 1; - readonly attribute int64u currentHeapUsed = 2; - readonly attribute int64u currentHeapHighWatermark = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ -server cluster ThreadNetworkDiagnostics = 53 { - enum ConnectionStatusEnum : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum NetworkFaultEnum : ENUM8 { - kUnspecified = 0; - kLinkDown = 1; - kHardwareFailure = 2; - kNetworkJammed = 3; - } - - enum RoutingRoleEnum : ENUM8 { - kUnspecified = 0; - kUnassigned = 1; - kSleepyEndDevice = 2; - kEndDevice = 3; - kReed = 4; - kRouter = 5; - kLeader = 6; - } - - bitmap Feature : BITMAP32 { - kPacketCounts = 0x1; - kErrorCounts = 0x2; - kMLECounts = 0x4; - kMACCounts = 0x8; - } - - struct NeighborTableStruct { - int64u extAddress = 0; - int32u age = 1; - int16u rloc16 = 2; - int32u linkFrameCounter = 3; - int32u mleFrameCounter = 4; - int8u lqi = 5; - nullable int8s averageRssi = 6; - nullable int8s lastRssi = 7; - int8u frameErrorRate = 8; - int8u messageErrorRate = 9; - boolean rxOnWhenIdle = 10; - boolean fullThreadDevice = 11; - boolean fullNetworkData = 12; - boolean isChild = 13; - } - - 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; - } - - struct RouteTableStruct { - 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; - int16u flags = 1; - } - - info event ConnectionStatus = 0 { - ConnectionStatusEnum connectionStatus = 0; - } - - info event NetworkFaultChange = 1 { - NetworkFaultEnum current[] = 0; - NetworkFaultEnum previous[] = 1; - } - - readonly attribute nullable int16u channel = 0; - readonly attribute nullable RoutingRoleEnum routingRole = 1; - readonly attribute nullable char_string<16> networkName = 2; - readonly attribute nullable int16u panId = 3; - readonly attribute nullable int64u extendedPanId = 4; - readonly attribute nullable octet_string<17> meshLocalPrefix = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute NeighborTableStruct neighborTable[] = 7; - readonly attribute RouteTableStruct routeTable[] = 8; - readonly attribute nullable int32u partitionId = 9; - readonly attribute nullable int8u weighting = 10; - readonly attribute nullable int8u dataVersion = 11; - readonly attribute nullable int8u stableDataVersion = 12; - readonly attribute nullable int8u leaderRouterId = 13; - readonly attribute int16u detachedRoleCount = 14; - readonly attribute int16u childRoleCount = 15; - readonly attribute int16u routerRoleCount = 16; - readonly attribute int16u leaderRoleCount = 17; - readonly attribute int16u attachAttemptCount = 18; - readonly attribute int16u partitionIdChangeCount = 19; - readonly attribute int16u betterPartitionAttachAttemptCount = 20; - readonly attribute int16u parentChangeCount = 21; - readonly attribute int32u txTotalCount = 22; - readonly attribute int32u txUnicastCount = 23; - readonly attribute int32u txBroadcastCount = 24; - readonly attribute int32u txAckRequestedCount = 25; - readonly attribute int32u txAckedCount = 26; - readonly attribute int32u txNoAckRequestedCount = 27; - readonly attribute int32u txDataCount = 28; - readonly attribute int32u txDataPollCount = 29; - readonly attribute int32u txBeaconCount = 30; - readonly attribute int32u txBeaconRequestCount = 31; - readonly attribute int32u txOtherCount = 32; - readonly attribute int32u txRetryCount = 33; - readonly attribute int32u txDirectMaxRetryExpiryCount = 34; - readonly attribute int32u txIndirectMaxRetryExpiryCount = 35; - readonly attribute int32u txErrCcaCount = 36; - readonly attribute int32u txErrAbortCount = 37; - readonly attribute int32u txErrBusyChannelCount = 38; - readonly attribute int32u rxTotalCount = 39; - readonly attribute int32u rxUnicastCount = 40; - readonly attribute int32u rxBroadcastCount = 41; - readonly attribute int32u rxDataCount = 42; - readonly attribute int32u rxDataPollCount = 43; - readonly attribute int32u rxBeaconCount = 44; - readonly attribute int32u rxBeaconRequestCount = 45; - readonly attribute int32u rxOtherCount = 46; - readonly attribute int32u rxAddressFilteredCount = 47; - readonly attribute int32u rxDestAddrFilteredCount = 48; - readonly attribute int32u rxDuplicatedCount = 49; - readonly attribute int32u rxErrNoFrameCount = 50; - readonly attribute int32u rxErrUnknownNeighborCount = 51; - readonly attribute int32u rxErrInvalidSrcAddrCount = 52; - readonly attribute int32u rxErrSecCount = 53; - readonly attribute int32u rxErrFcsCount = 54; - readonly attribute int32u rxErrOtherCount = 55; - readonly attribute nullable int64u activeTimestamp = 56; - readonly attribute nullable int64u pendingTimestamp = 57; - readonly attribute nullable int32u delay = 58; - readonly attribute nullable SecurityPolicy securityPolicy = 59; - readonly attribute nullable octet_string<4> channelPage0Mask = 60; - readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; - readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Wi-Fi Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster WiFiNetworkDiagnostics = 54 { - enum AssociationFailureCauseEnum : ENUM8 { - kUnknown = 0; - kAssociationFailed = 1; - kAuthenticationFailed = 2; - kSsidNotFound = 3; - } - - enum ConnectionStatusEnum : ENUM8 { - kConnected = 0; - kNotConnected = 1; - } - - enum SecurityTypeEnum : ENUM8 { - kUnspecified = 0; - kNone = 1; - kWep = 2; - kWpa = 3; - kWpa2 = 4; - kWpa3 = 5; - } - - enum WiFiVersionEnum : ENUM8 { - kA = 0; - kB = 1; - kG = 2; - kN = 3; - kAc = 4; - kAx = 5; - kAh = 6; - } - - bitmap Feature : BITMAP32 { - kPacketCounts = 0x1; - kErrorCounts = 0x2; - } - - info event Disconnection = 0 { - INT16U reasonCode = 0; - } - - info event AssociationFailure = 1 { - AssociationFailureCauseEnum associationFailure = 0; - INT16U status = 1; - } - - info event ConnectionStatus = 2 { - ConnectionStatusEnum connectionStatus = 0; - } - - readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityTypeEnum securityType = 1; - readonly attribute nullable WiFiVersionEnum wiFiVersion = 2; - readonly attribute nullable int16u channelNumber = 3; - readonly attribute nullable int8s rssi = 4; - readonly attribute nullable int32u beaconLostCount = 5; - readonly attribute nullable int32u beaconRxCount = 6; - readonly attribute nullable int32u packetMulticastRxCount = 7; - readonly attribute nullable int32u packetMulticastTxCount = 8; - readonly attribute nullable int32u packetUnicastRxCount = 9; - readonly attribute nullable int32u packetUnicastTxCount = 10; - readonly attribute nullable int64u currentMaxRate = 11; - readonly attribute nullable int64u overrunCount = 12; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** The Ethernet Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ -server cluster EthernetNetworkDiagnostics = 55 { - enum PHYRateEnum : ENUM8 { - kRate10M = 0; - kRate100M = 1; - kRate1G = 2; - kRate25g = 3; - kRate5G = 4; - kRate10G = 5; - kRate40G = 6; - kRate100G = 7; - kRate200G = 8; - kRate400G = 9; - } - - bitmap Feature : BITMAP32 { - kPacketCounts = 0x1; - kErrorCounts = 0x2; - } - - readonly attribute nullable PHYRateEnum PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - command ResetCounts(): DefaultSuccess = 0; -} - -/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. -Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. -Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ -server cluster Switch = 59 { - bitmap Feature : BITMAP32 { - kLatchingSwitch = 0x1; - kMomentarySwitch = 0x2; - kMomentarySwitchRelease = 0x4; - kMomentarySwitchLongPress = 0x8; - kMomentarySwitchMultiPress = 0x10; - } - - info event SwitchLatched = 0 { - INT8U newPosition = 0; - } - - info event InitialPress = 1 { - INT8U newPosition = 0; - } - - info event LongPress = 2 { - INT8U newPosition = 0; - } - - info event ShortRelease = 3 { - INT8U previousPosition = 0; - } - - info event LongRelease = 4 { - INT8U previousPosition = 0; - } - - info event MultiPressOngoing = 5 { - INT8U newPosition = 0; - INT8U currentNumberOfPressesCounted = 1; - } - - info event MultiPressComplete = 6 { - INT8U previousPosition = 0; - INT8U totalNumberOfPressesCounted = 1; - } - - readonly attribute int8u numberOfPositions = 0; - readonly attribute int8u currentPosition = 1; - readonly attribute int8u multiPressMax = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Commands to trigger a Node to allow a new Administrator to commission it. */ -server cluster AdministratorCommissioning = 60 { - enum CommissioningWindowStatusEnum : ENUM8 { - kWindowNotOpen = 0; - kEnhancedWindowOpen = 1; - kBasicWindowOpen = 2; - } - - enum StatusCode : ENUM8 { - kBusy = 2; - kPAKEParameterError = 3; - kWindowNotOpen = 4; - } - - readonly attribute CommissioningWindowStatusEnum windowStatus = 0; - readonly attribute nullable fabric_idx adminFabricIndex = 1; - readonly attribute nullable int16u adminVendorId = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct OpenCommissioningWindowRequest { - INT16U commissioningTimeout = 0; - OCTET_STRING PAKEPasscodeVerifier = 1; - INT16U discriminator = 2; - INT32U iterations = 3; - OCTET_STRING salt = 4; - } - - request struct OpenBasicCommissioningWindowRequest { - INT16U commissioningTimeout = 0; - } - - timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; - timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; - timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; -} - -/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ -server cluster OperationalCredentials = 62 { - enum CertificateChainTypeEnum : ENUM8 { - kDACCertificate = 1; - kPAICertificate = 2; - } - - enum NodeOperationalCertStatusEnum : ENUM8 { - kOk = 0; - kInvalidPublicKey = 1; - kInvalidNodeOpId = 2; - kInvalidNOC = 3; - kMissingCsr = 4; - kTableFull = 5; - kInvalidAdminSubject = 6; - kFabricConflict = 9; - kLabelConflict = 10; - kInvalidFabricIndex = 11; - } - - fabric_scoped struct FabricDescriptorStruct { - 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; - } - - fabric_scoped struct NOCStruct { - fabric_sensitive octet_string noc = 1; - nullable fabric_sensitive octet_string icac = 2; - fabric_idx fabricIndex = 254; - } - - readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptorStruct fabrics[] = 1; - readonly attribute int8u supportedFabrics = 2; - readonly attribute int8u commissionedFabrics = 3; - readonly attribute OCTET_STRING trustedRootCertificates[] = 4; - readonly attribute int8u currentFabricIndex = 5; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct AttestationRequestRequest { - OCTET_STRING attestationNonce = 0; - } - - request struct CertificateChainRequestRequest { - CertificateChainTypeEnum certificateType = 0; - } - - request struct CSRRequestRequest { - OCTET_STRING CSRNonce = 0; - optional boolean isForUpdateNOC = 1; - } - - request struct AddNOCRequest { - OCTET_STRING NOCValue = 0; - optional OCTET_STRING ICACValue = 1; - OCTET_STRING IPKValue = 2; - Int64u caseAdminSubject = 3; - VENDOR_ID adminVendorId = 4; - } - - request struct UpdateNOCRequest { - OCTET_STRING NOCValue = 0; - optional OCTET_STRING ICACValue = 1; - } - - request struct UpdateFabricLabelRequest { - CHAR_STRING<32> label = 0; - } - - request struct RemoveFabricRequest { - fabric_idx fabricIndex = 0; - } - - request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCACertificate = 0; - } - - response struct AttestationResponse = 1 { - OCTET_STRING attestationElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct CertificateChainResponse = 3 { - OCTET_STRING certificate = 0; - } - - response struct CSRResponse = 5 { - OCTET_STRING NOCSRElements = 0; - OCTET_STRING attestationSignature = 1; - } - - response struct NOCResponse = 8 { - NodeOperationalCertStatusEnum statusCode = 0; - optional fabric_idx fabricIndex = 1; - optional CHAR_STRING debugText = 2; - } - - command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; - command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; - command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; - command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; - fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; - fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; - command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; - command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; -} - -/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ -server cluster GroupKeyManagement = 63 { - enum GroupKeySecurityPolicyEnum : ENUM8 { - kTrustFirst = 0; - kCacheAndSync = 1; - } - - fabric_scoped struct GroupInfoMapStruct { - group_id groupId = 1; - endpoint_no endpoints[] = 2; - optional char_string<16> groupName = 3; - fabric_idx fabricIndex = 254; - } - - fabric_scoped struct GroupKeyMapStruct { - group_id groupId = 1; - int16u groupKeySetID = 2; - fabric_idx fabricIndex = 254; - } - - struct GroupKeySetStruct { - int16u groupKeySetID = 0; - GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; - nullable octet_string<16> epochKey0 = 2; - nullable epoch_us epochStartTime0 = 3; - nullable octet_string<16> epochKey1 = 4; - nullable epoch_us epochStartTime1 = 5; - nullable octet_string<16> epochKey2 = 6; - nullable epoch_us epochStartTime2 = 7; - } - - attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; - readonly attribute GroupInfoMapStruct groupTable[] = 1; - readonly attribute int16u maxGroupsPerFabric = 2; - readonly attribute int16u maxGroupKeysPerFabric = 3; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct KeySetWriteRequest { - GroupKeySetStruct groupKeySet = 0; - } - - request struct KeySetReadRequest { - INT16U groupKeySetID = 0; - } - - request struct KeySetRemoveRequest { - INT16U groupKeySetID = 0; - } - - request struct KeySetReadAllIndicesRequest { - INT16U groupKeySetIDs[] = 0; - } - - response struct KeySetReadResponse = 2 { - GroupKeySetStruct groupKeySet = 0; - } - - response struct KeySetReadAllIndicesResponse = 5 { - INT16U groupKeySetIDs[] = 0; - } - - fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; - fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; -} - -/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ -server cluster UserLabel = 65 { - struct LabelStruct { - char_string<16> label = 0; - char_string<16> value = 1; - } - - attribute access(write: manage) LabelStruct labelList[] = 0; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Attributes and commands for configuring the measurement of temperature, and reporting temperature measurements. */ -server cluster TemperatureMeasurement = 1026 { - readonly attribute nullable int16s measuredValue = 0; - readonly attribute nullable int16s minMeasuredValue = 1; - readonly attribute nullable int16s maxMeasuredValue = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -endpoint 0 { - device type bridge = 22, version 1; - binding cluster AccessControl; - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } - - server cluster AccessControl { - emits event AccessControlEntryChanged; - emits event AccessControlExtensionChanged; - callback attribute acl; - callback attribute extension; - callback attribute subjectsPerAccessControlEntry default = 4; - callback attribute targetsPerAccessControlEntry default = 3; - callback attribute accessControlEntriesPerFabric default = 4; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster BasicInformation { - emits event StartUp; - emits event ShutDown; - emits event Leave; - callback attribute dataModelRevision default = 10; - callback attribute vendorName; - callback attribute vendorID; - callback attribute productName; - callback attribute productID; - persist attribute nodeLabel; - callback attribute location default = "XX"; - callback attribute hardwareVersion default = 0; - callback attribute hardwareVersionString; - callback attribute softwareVersion default = 0; - callback attribute softwareVersionString; - callback attribute manufacturingDate default = "20210614123456ZZ"; - callback attribute partNumber; - callback attribute productURL; - callback attribute productLabel; - callback attribute serialNumber; - persist attribute localConfigDisabled default = 0; - callback attribute uniqueID; - callback attribute capabilityMinima; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster UnitLocalization { - persist attribute temperatureUnit default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0x1; - ram attribute clusterRevision default = 1; - } - - server cluster GeneralCommissioning { - ram attribute breadcrumb default = 0x0000000000000000; - callback attribute basicCommissioningInfo; - callback attribute regulatoryConfig default = 0; - callback attribute locationCapability default = 0; - callback attribute supportsConcurrentConnection default = 1; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster NetworkCommissioning { - ram attribute maxNetworks; - callback attribute networks; - ram attribute scanMaxTimeSeconds; - ram attribute connectMaxTimeSeconds; - ram attribute interfaceEnabled; - ram attribute lastNetworkingStatus; - ram attribute lastNetworkID; - ram attribute lastConnectErrorValue; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 2; - ram attribute clusterRevision default = 1; - } - - server cluster DiagnosticLogs { - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster GeneralDiagnostics { - emits event BootReason; - callback attribute networkInterfaces; - callback attribute rebootCount default = 0x0000; - callback attribute upTime default = 0x0000000000000000; - callback attribute totalOperationalHours default = 0x00000000; - callback attribute bootReason; - callback attribute activeHardwareFaults; - callback attribute activeRadioFaults; - callback attribute activeNetworkFaults; - callback attribute testEventTriggersEnabled default = false; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster SoftwareDiagnostics { - callback attribute threadMetrics; - callback attribute currentHeapFree default = 0x0000000000000000; - callback attribute currentHeapUsed default = 0x0000000000000000; - callback attribute currentHeapHighWatermark default = 0x0000000000000000; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 1; - } - - server cluster ThreadNetworkDiagnostics { - callback attribute channel; - callback attribute routingRole; - callback attribute networkName default = "0"; - callback attribute panId default = 0x0000; - callback attribute extendedPanId default = 0x0000000000000000; - callback attribute meshLocalPrefix; - callback attribute overrunCount default = 0x0000000000000000; - callback attribute neighborTable; - callback attribute routeTable; - callback attribute partitionId; - callback attribute weighting; - callback attribute dataVersion; - callback attribute stableDataVersion; - callback attribute leaderRouterId; - callback attribute detachedRoleCount default = 0x0000; - callback attribute childRoleCount default = 0x0000; - callback attribute routerRoleCount default = 0x0000; - callback attribute leaderRoleCount default = 0x0000; - callback attribute attachAttemptCount default = 0x0000; - callback attribute partitionIdChangeCount default = 0x0000; - callback attribute betterPartitionAttachAttemptCount default = 0x0000; - callback attribute parentChangeCount default = 0x0000; - callback attribute txTotalCount default = 0x0000; - callback attribute txUnicastCount default = 0x0000; - callback attribute txBroadcastCount default = 0x0000; - callback attribute txAckRequestedCount default = 0x0000; - callback attribute txAckedCount default = 0x0000; - callback attribute txNoAckRequestedCount default = 0x0000; - callback attribute txDataCount default = 0x0000; - callback attribute txDataPollCount default = 0x0000; - callback attribute txBeaconCount default = 0x0000; - callback attribute txBeaconRequestCount default = 0x0000; - callback attribute txOtherCount default = 0x0000; - callback attribute txRetryCount default = 0x0000; - callback attribute txDirectMaxRetryExpiryCount default = 0x0000; - callback attribute txIndirectMaxRetryExpiryCount default = 0x0000; - callback attribute txErrCcaCount default = 0x0000; - callback attribute txErrAbortCount default = 0x0000; - callback attribute txErrBusyChannelCount default = 0x0000; - callback attribute rxTotalCount default = 0x0000; - callback attribute rxUnicastCount default = 0x0000; - callback attribute rxBroadcastCount default = 0x0000; - callback attribute rxDataCount default = 0x0000; - callback attribute rxDataPollCount default = 0x0000; - callback attribute rxBeaconCount default = 0x0000; - callback attribute rxBeaconRequestCount default = 0x0000; - callback attribute rxOtherCount default = 0x0000; - callback attribute rxAddressFilteredCount default = 0x0000; - callback attribute rxDestAddrFilteredCount default = 0x0000; - callback attribute rxDuplicatedCount default = 0x0000; - callback attribute rxErrNoFrameCount default = 0x0000; - callback attribute rxErrUnknownNeighborCount default = 0x0000; - callback attribute rxErrInvalidSrcAddrCount default = 0x0000; - callback attribute rxErrSecCount default = 0x0000; - callback attribute rxErrFcsCount default = 0x0000; - callback attribute rxErrOtherCount default = 0x0000; - callback attribute activeTimestamp default = 0x0000000000000000; - callback attribute pendingTimestamp default = 0x0000000000000000; - callback attribute delay default = 0x0000; - callback attribute securityPolicy; - callback attribute channelPage0Mask default = "0x0000"; - callback attribute operationalDatasetComponents; - callback attribute activeNetworkFaultsList; - ram attribute featureMap default = 15; - ram attribute clusterRevision default = 1; - } - - server cluster WiFiNetworkDiagnostics { - emits event Disconnection; - emits event AssociationFailure; - emits event ConnectionStatus; - callback attribute bssid; - callback attribute securityType; - callback attribute wiFiVersion; - callback attribute channelNumber default = 0x0000; - callback attribute rssi default = 0x00; - callback attribute beaconLostCount default = 0x00000000; - callback attribute beaconRxCount default = 0x00000000; - callback attribute packetMulticastRxCount default = 0x00000000; - callback attribute packetMulticastTxCount default = 0x00000000; - callback attribute packetUnicastRxCount default = 0x00000000; - callback attribute packetUnicastTxCount default = 0x00000000; - callback attribute currentMaxRate default = 0x0000000000000000; - callback attribute overrunCount default = 0x0000000000000000; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster EthernetNetworkDiagnostics { - callback attribute PHYRate; - callback attribute fullDuplex default = 0x00; - callback attribute packetRxCount default = 0x0000000000000000; - callback attribute packetTxCount default = 0x0000000000000000; - callback attribute txErrCount default = 0x0000000000000000; - callback attribute collisionCount default = 0x0000000000000000; - callback attribute overrunCount default = 0x0000000000000000; - callback attribute carrierDetect default = 0x00; - callback attribute timeSinceReset default = 0x0000000000000000; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 1; - } - - server cluster AdministratorCommissioning { - callback attribute windowStatus default = 0; - callback attribute adminFabricIndex default = 1; - callback attribute adminVendorId default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster OperationalCredentials { - callback attribute NOCs; - callback attribute fabrics; - callback attribute supportedFabrics; - callback attribute commissionedFabrics; - callback attribute trustedRootCertificates; - callback attribute currentFabricIndex; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster GroupKeyManagement { - callback attribute groupKeyMap; - callback attribute groupTable; - callback attribute maxGroupsPerFabric; - callback attribute maxGroupKeysPerFabric; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster UserLabel { - callback attribute labelList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } -} -endpoint 1 { - device type anonymousEndpointType = 14, version 1; - binding cluster Binding; - - server cluster Identify { - ram attribute identifyTime default = 0x0; - ram attribute identifyType default = 0x0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 2; - } - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster Actions { - callback attribute actionList; - callback attribute endpointLists; - ram attribute setupURL default = "https://example.com"; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } -} -endpoint 2 { - device type dimmablelight = 257, version 1; - - server cluster OnOff { - ram attribute onOff default = 0x00; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 4; - } - - server cluster LevelControl { - persist attribute currentLevel default = 0x00; - ram attribute remainingTime default = 0x0000; - ram attribute minLevel default = 0x01; - ram attribute maxLevel default = 0xFE; - ram attribute currentFrequency default = 0x0000; - ram attribute minFrequency default = 0x0000; - ram attribute maxFrequency default = 0x0000; - ram attribute options default = 0x00; - ram attribute onOffTransitionTime default = 0x0000; - ram attribute onLevel default = 0xFE; - ram attribute onTransitionTime; - ram attribute offTransitionTime; - ram attribute defaultMoveRate; - persist attribute startUpCurrentLevel default = 255; - ram attribute featureMap default = 3; - ram attribute clusterRevision default = 5; - } - - server cluster Descriptor { - callback attribute deviceTypeList; - callback attribute serverList; - callback attribute clientList; - callback attribute partsList; - ram attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } - - server cluster Switch { - ram attribute numberOfPositions default = 2; - ram attribute currentPosition default = 1; - ram attribute multiPressMax default = 2; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TemperatureMeasurement { - callback attribute measuredValue; - callback attribute minMeasuredValue default = 0x954D; - callback attribute maxMeasuredValue default = 0x7FFF; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - callback attribute featureMap default = 0; - callback attribute clusterRevision default = 1; - } -} - - diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap b/examples/dynamic-bridge-app/bridge-common/bridge-app.zap deleted file mode 100644 index 12cd73afba6aba..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.zap +++ /dev/null @@ -1,7618 +0,0 @@ -{ - "featureLevel": 96, - "creator": "zap", - "keyValuePairs": [ - { - "key": "commandDiscovery", - "value": "1" - }, - { - "key": "defaultResponsePolicy", - "value": "always" - }, - { - "key": "manufacturerCodes", - "value": "0x1002" - } - ], - "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/zcl/zcl.json", - "type": "zcl-properties", - "category": "matter", - "version": 1, - "description": "Matter SDK ZCL data" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" - } - ], - "endpointTypes": [ - { - "name": "MA-bridge", - "deviceTypeName": "MA-rootdevice", - "deviceTypeCode": 22, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "DeviceTypeList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ServerList", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClientList", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartsList", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Access Control", - "code": 31, - "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Access Control", - "code": 31, - "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ACL", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Extension", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SubjectsPerAccessControlEntry", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "TargetsPerAccessControlEntry", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AccessControlEntriesPerFabric", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "AccessControlEntryChanged", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AccessControlExtensionChanged", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "DataModelRevision", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "vendor_id", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "XX", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "20210614123456ZZ", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "type": "long_char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalConfigDisabled", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 0, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UniqueID", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CapabilityMinima", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "CapabilityMinimaStruct", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Unit Localization", - "code": 45, - "mfgCode": null, - "define": "UNIT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "TemperatureUnit", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "TempUnitEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "CommissioningComplete", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "CommissioningCompleteResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "Breadcrumb", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BasicCommissioningInfo", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "BasicCommissioningInfo", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RegulatoryConfig", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "RegulatoryLocationTypeEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LocationCapability", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "RegulatoryLocationTypeEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportsConcurrentConnection", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ScanNetworks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddOrUpdateWiFiNetwork", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddOrUpdateThreadNetwork", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveNetwork", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ConnectNetwork", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ReorderNetwork", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ScanNetworksResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NetworkConfigResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ConnectNetworkResponse", - "code": 7, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "MaxNetworks", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Networks", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ScanMaxTimeSeconds", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ConnectMaxTimeSeconds", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "InterfaceEnabled", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastNetworkingStatus", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "NetworkCommissioningStatusEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastNetworkID", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "LastConnectErrorValue", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int32s", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Diagnostic Logs", - "code": 50, - "mfgCode": null, - "define": "DIAGNOSTIC_LOGS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "RetrieveLogsRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "TestEventTrigger", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Diagnostics", - "code": 51, - "mfgCode": null, - "define": "GENERAL_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "TestEventTrigger", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "NetworkInterfaces", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RebootCount", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UpTime", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "TotalOperationalHours", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BootReason", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "BootReasonEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveHardwareFaults", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveRadioFaults", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveNetworkFaults", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "TestEventTriggersEnabled", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "false", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "BootReason", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetWatermarks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Software Diagnostics", - "code": 52, - "mfgCode": null, - "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ThreadMetrics", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapFree", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapUsed", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentHeapHighWatermark", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Thread Network Diagnostics", - "code": 53, - "mfgCode": null, - "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "Channel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RoutingRole", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "RoutingRoleEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NetworkName", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PanId", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ExtendedPanId", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MeshLocalPrefix", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OverrunCount", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NeighborTable", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RouteTable", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartitionId", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Weighting", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DataVersion", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "StableDataVersion", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LeaderRouterId", - "code": 13, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "DetachedRoleCount", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChildRoleCount", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RouterRoleCount", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LeaderRoleCount", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "AttachAttemptCount", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartitionIdChangeCount", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BetterPartitionAttachAttemptCount", - "code": 20, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ParentChangeCount", - "code": 21, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxTotalCount", - "code": 22, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxUnicastCount", - "code": 23, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBroadcastCount", - "code": 24, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxAckRequestedCount", - "code": 25, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxAckedCount", - "code": 26, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxNoAckRequestedCount", - "code": 27, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDataCount", - "code": 28, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDataPollCount", - "code": 29, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBeaconCount", - "code": 30, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxBeaconRequestCount", - "code": 31, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxOtherCount", - "code": 32, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxRetryCount", - "code": 33, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxDirectMaxRetryExpiryCount", - "code": 34, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxIndirectMaxRetryExpiryCount", - "code": 35, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrCcaCount", - "code": 36, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrAbortCount", - "code": 37, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrBusyChannelCount", - "code": 38, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxTotalCount", - "code": 39, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxUnicastCount", - "code": 40, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBroadcastCount", - "code": 41, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDataCount", - "code": 42, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDataPollCount", - "code": 43, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBeaconCount", - "code": 44, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxBeaconRequestCount", - "code": 45, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxOtherCount", - "code": 46, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxAddressFilteredCount", - "code": 47, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDestAddrFilteredCount", - "code": 48, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxDuplicatedCount", - "code": 49, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrNoFrameCount", - "code": 50, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrUnknownNeighborCount", - "code": 51, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrInvalidSrcAddrCount", - "code": 52, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrSecCount", - "code": 53, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrFcsCount", - "code": 54, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RxErrOtherCount", - "code": 55, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ActiveTimestamp", - "code": 56, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PendingTimestamp", - "code": 57, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Delay", - "code": 58, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SecurityPolicy", - "code": 59, - "mfgCode": null, - "side": "server", - "type": "SecurityPolicy", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChannelPage0Mask", - "code": 60, - "mfgCode": null, - "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OperationalDatasetComponents", - "code": 61, - "mfgCode": null, - "side": "server", - "type": "OperationalDatasetComponents", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ActiveNetworkFaultsList", - "code": 62, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "15", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "BSSID", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "octet_string", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SecurityType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "SecurityTypeEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "WiFiVersion", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "WiFiVersionEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ChannelNumber", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RSSI", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int8s", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "BeaconLostCount", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "BeaconRxCount", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketMulticastRxCount", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketMulticastTxCount", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketUnicastRxCount", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketUnicastTxCount", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentMaxRate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OverrunCount", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ], - "events": [ - { - "name": "Disconnection", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "AssociationFailure", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1 - }, - { - "name": "ConnectionStatus", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1 - } - ] - }, - { - "name": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ResetCounts", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "PHYRate", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "PHYRateEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FullDuplex", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PacketRxCount", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PacketTxCount", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TxErrCount", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CollisionCount", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OverrunCount", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CarrierDetect", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "TimeSinceReset", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "int64u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000000000000000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "OpenCommissioningWindow", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "OpenBasicCommissioningWindow", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RevokeCommissioning", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Administrator Commissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "WindowStatus", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "CommissioningWindowStatusEnum", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AdminFabricIndex", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "fabric_idx", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AdminVendorId", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Operational Credentials", - "code": 62, - "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AttestationRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddNOC", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UpdateNOC", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "UpdateFabricLabel", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveFabric", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddTrustedRootCertificate", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Operational Credentials", - "code": 62, - "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NOCs", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Fabrics", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SupportedFabrics", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CommissionedFabrics", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "TrustedRootCertificates", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentFabricIndex", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 63, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "KeySetWrite", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "KeySetRead", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "KeySetRemove", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "KeySetReadAllIndices", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 63, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "KeySetReadResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "KeySetReadAllIndicesResponse", - "code": 5, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "GroupKeyMap", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GroupTable", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxGroupsPerFabric", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxGroupKeysPerFabric", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "LabelList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "client", - "enabled": 0 - }, - { - "name": "User Label", - "code": 65, - "mfgCode": null, - "define": "USER_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "LabelList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "MA-aggregator", - "deviceTypeCode": 14, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "TriggerEffect", - "code": 64, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "IdentifyType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "IdentifyTypeEnum", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "DeviceTypeList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ServerList", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClientList", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PartsList", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "client", - "enabled": 1, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 30, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "Binding", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Actions", - "code": 37, - "mfgCode": null, - "define": "ACTIONS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "InstantAction", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Actions", - "code": 37, - "mfgCode": null, - "define": "ACTIONS_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActionList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EndpointLists", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SetupURL", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "long_char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "https://example.com", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "MA-dimmablelight", - "deviceTypeName": "MA-dimmablelight", - "deviceTypeCode": 257, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "IdentifyTime", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "NameSupport", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "NameSupportBitmap", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "SceneCount", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentScene", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentGroup", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "group_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SceneValid", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NameSupport", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "bitmap8", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "OnOff", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "4", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "CurrentLevel", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RemainingTime", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinLevel", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxLevel", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "CurrentFrequency", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinFrequency", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxFrequency", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Options", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "LevelControlOptions", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnOffTransitionTime", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnLevel", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFE", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnTransitionTime", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OffTransitionTime", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "DefaultMoveRate", - "code": 20, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "StartUpCurrentLevel", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "255", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "DeviceTypeList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ServerList", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClientList", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "PartsList", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic Information", - "code": 40, - "mfgCode": null, - "define": "BASIC_INFORMATION_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "DataModelRevision", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "vendor_id", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "NodeLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "XX", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "type": "int32u", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ManufacturingDate", - "code": 11, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "20210614123456ZZ", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PartNumber", - "code": 12, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductURL", - "code": 13, - "mfgCode": null, - "side": "server", - "type": "long_char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductLabel", - "code": 14, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SerialNumber", - "code": 15, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "LocalConfigDisabled", - "code": 16, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "NVM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Reachable", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UniqueID", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CapabilityMinima", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "CapabilityMinimaStruct", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Switch", - "code": 59, - "mfgCode": null, - "define": "SWITCH_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "NumberOfPositions", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "CurrentPosition", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MultiPressMax", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 0, - "attributes": [ - { - "name": "LabelList", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMPERATURE_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMPERATURE_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x954D", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int16s", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x7FFF", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Tolerance", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - } - ] - } - ], - "endpoints": [ - { - "endpointTypeName": "MA-bridge", - "endpointTypeIndex": 0, - "profileId": 259, - "endpointId": 0, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 22 - }, - { - "endpointTypeName": "Anonymous Endpoint Type", - "endpointTypeIndex": 1, - "profileId": 259, - "endpointId": 1, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 14 - }, - { - "endpointTypeName": "MA-dimmablelight", - "endpointTypeIndex": 2, - "profileId": 259, - "endpointId": 2, - "networkId": 0, - "endpointVersion": 1, - "deviceIdentifier": 257 - } - ] -} \ No newline at end of file diff --git a/examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h b/examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h deleted file mode 100644 index 036cbda81ad736..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/include/CHIPProjectAppConfig.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * Example project configuration file for CHIP. - * - * This is a place to put application or project-specific overrides - * to the default configuration values for general CHIP features. - * - */ - -#pragma once - -// overrides CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT in CHIPProjectConfig -#define CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT 16 - -// include the CHIPProjectConfig from config/standalone -#include diff --git a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options b/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options deleted file mode 100644 index 11b8dfc097fba5..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.options +++ /dev/null @@ -1,2 +0,0 @@ -chip.rpc.bridge.AddDevice.device_types max_count:32 -chip.rpc.bridge.AddDevice.clusters max_count:64 diff --git a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto b/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto deleted file mode 100644 index 1917ba1f0c4c00..00000000000000 --- a/examples/dynamic-bridge-app/bridge-common/protos/bridge_service.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; - -package chip.rpc.bridge; - -message Empty {} - -message RemoveDevice { - uint32 id = 1; -} - -message Cluster { - uint32 cluster_id = 1; -} - -message DeviceType { - uint32 id = 1; - uint32 version = 2; -} - -message AddDevice { - repeated Cluster clusters = 1; - repeated DeviceType device_types = 2; - uint32 parent_endpoint = 3; -} - -message AddDeviceResponse { - uint32 id = 1; -} - -service Bridge { - rpc Add(AddDevice) returns (AddDeviceResponse){}; - rpc Remove(RemoveDevice) returns (Empty){}; -} diff --git a/examples/dynamic-bridge-app/linux/.gn b/examples/dynamic-bridge-app/linux/.gn deleted file mode 100644 index 70728706ea4a14..00000000000000 --- a/examples/dynamic-bridge-app/linux/.gn +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") - -# The location of the build configuration file. -buildconfig = "${build_root}/config/BUILDCONFIG.gn" - -# CHIP uses angle bracket includes. -check_system_includes = true - -default_args = { - import("//args.gni") -} diff --git a/examples/dynamic-bridge-app/linux/BUILD.gn b/examples/dynamic-bridge-app/linux/BUILD.gn deleted file mode 100644 index 08c718915eb7e3..00000000000000 --- a/examples/dynamic-bridge-app/linux/BUILD.gn +++ /dev/null @@ -1,128 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") - -import("${chip_root}/build/chip/chip_codegen.gni") -import("${chip_root}/build/chip/tools.gni") -import("${chip_root}/src/app/common_flags.gni") - -import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") - -if (chip_enable_pw_rpc) { - import("//build_overrides/pigweed.gni") - import("$dir_pw_build/target_types.gni") -} - -assert(chip_build_tools) - -chip_codegen("chip-bridge-codegen") { - input = - "${chip_root}/examples/dynamic-bridge-app/bridge-common/bridge-app.matter" - generator = "bridge" - - outputs = [ - "bridge/OnOff.h", - "bridge/LevelControl.h", - "bridge/Descriptor.h", - "bridge/Switch.h", - "bridge/TemperatureMeasurement.h", - "bridge/BridgeClustersImpl.h", - ] -} - -executable("dynamic-chip-bridge-app") { - sources = [ - "Backend.cpp", - "Clusters.cpp", - "Device.cpp", - "DynamicDevice.cpp", - "UserInputBackend.cpp", - "bridged-actions-stub.cpp", - "main.cpp", - ] - - deps = [ - ":chip-bridge-codegen", - "${chip_root}/examples/dynamic-bridge-app/bridge-common:dynamic-bridge-common", - "${chip_root}/examples/platform/linux:app-main", - "${chip_root}/src/app/tests/suites/credentials:dac_provider", - "${chip_root}/src/lib", - "${chip_root}/src/lib/assign", - ] - - include_dirs = [ - "include", - target_gen_dir, - ] - - if (chip_enable_pw_rpc) { - defines = [ - "PW_RPC_ENABLED", - "PW_RPC_ATTRIBUTE_SERVICE=1", - "PW_RPC_DESCRIPTOR_SERVICE=1", - "PW_RPC_DEVICE_SERVICE=1", - "PW_RPC_TRACING_SERVICE=1", - ] - - sources += [ - "${chip_root}/examples/platform/linux/Rpc.cpp", - "${chip_root}/examples/platform/linux/system_rpc_server.cc", - "bridge_service.cpp", - ] - - deps += [ - "$dir_pw_hdlc:pw_rpc", - "$dir_pw_hdlc:rpc_channel_output", - "$dir_pw_log", - "$dir_pw_rpc:server", - "$dir_pw_rpc/system_server:facade", - "$dir_pw_stream:socket_stream", - "$dir_pw_stream:sys_io_stream", - "$dir_pw_sync:mutex", - "$dir_pw_trace", - "$dir_pw_trace_tokenized", - "$dir_pw_trace_tokenized:trace_rpc_service", - "${chip_root}/config/linux/lib/pw_rpc:pw_rpc", - "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc", - "${chip_root}/examples/common/pigweed:rpc_services", - "${chip_root}/examples/dynamic-bridge-app/bridge-common:bridge_service.nanopb_rpc", - ] - - deps += pw_build_LINK_DEPS - - include_dirs += [ "${chip_root}/examples/common" ] - } else { - # The system_rpc_server.cc file is in pigweed and doesn't compile with - # -Wconversion, remove check for RPC build only. - cflags = [ "-Wconversion" ] - } - - output_dir = root_out_dir - - configs += [ "${chip_root}/src:includes" ] -} - -group("linux") { - deps = [ ":dynamic-chip-bridge-app" ] -} - -group("default") { - deps = [ ":linux" ] -} diff --git a/examples/dynamic-bridge-app/linux/Backend.cpp b/examples/dynamic-bridge-app/linux/Backend.cpp deleted file mode 100644 index 6b7c0628e709c2..00000000000000 --- a/examples/dynamic-bridge-app/linux/Backend.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Backend.h" - -#include "main.h" - -std::vector> g_devices; -std::vector> g_device_impls; - -bool RemoveDeviceAt(uint32_t index) -{ - if (index >= g_devices.size() || !g_devices[index]) - { - return false; - } - - RemoveDeviceEndpoint(g_devices[index].get()); - - for (auto & room : gRooms) - room.RemoveEndpoint(g_devices[index]->GetEndpointId()); - - g_devices[index] = nullptr; - g_device_impls[index] = nullptr; - - return true; -} - -int AddDevice(std::unique_ptr device) -{ - auto dev = std::make_unique(device->CreateDevice()); - int ep = AddDeviceEndpoint(dev.get()); - if (ep < 0) - { - return -1; - } - - size_t index = (size_t) ep; - if (g_devices.size() <= index) - { - g_devices.resize(index + 1); - g_device_impls.resize(index + 1); - } - g_devices[index] = std::move(dev); - g_device_impls[index] = std::move(device); - return ep; -} diff --git a/examples/dynamic-bridge-app/linux/Clusters.cpp b/examples/dynamic-bridge-app/linux/Clusters.cpp deleted file mode 100644 index 016526c3dfb7ef..00000000000000 --- a/examples/dynamic-bridge-app/linux/Clusters.cpp +++ /dev/null @@ -1,86 +0,0 @@ -#include "GeneratedClusters.h" - -#include "Device.h" - -CommonCluster::CommonCluster(std::unique_ptr cluster) : - mAttributes(cluster->GetAttributes()), mStorage(std::move(cluster)) -{} -CommonCluster::~CommonCluster() = default; - -chip::ClusterId CommonCluster::GetClusterId() -{ - return mStorage->GetClusterId(); -} - -void CommonCluster::SetEndpointId(chip::EndpointId id) -{ - mEndpoint = id; -} - -chip::EndpointId CommonCluster::GetEndpointId() const -{ - return mEndpoint; -} - -void CommonCluster::SetCallback(PropagateWriteCB * cb) -{ - mCallback = cb; -} - -bool CommonCluster::active() const -{ - return mEndpoint < 0xFFFF; -} - -CHIP_ERROR CommonCluster::ForwardWriteToBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder) -{ - if (mCallback) - return (*mCallback)(this, aPath, aDecoder); - return WriteFromBridge(aPath, aDecoder); -} - -CHIP_ERROR CommonCluster::WriteFromBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder) -{ - AttributeInterface * a = FindAttribute(aPath.mAttributeId); - if (!a) - return CHIP_ERROR_NOT_IMPLEMENTED; - return a->Write(aPath, aDecoder); -} - -chip::Span CommonCluster::GetAllAttributes() -{ - return chip::Span(mAttributes.data(), mAttributes.size()); -} - -AttributeInterface * CommonCluster::FindAttribute(chip::AttributeId id) -{ - for (auto * attr : mAttributes) - if (attr->GetId() == id) - return attr; - return nullptr; -} - -AttributeInterface * CommonCluster::FindAttributeByName(chip::CharSpan name) -{ - for (auto * attr : mAttributes) - if (name.data_equal(attr->GetName())) - return attr; - return nullptr; -} - -void CommonCluster::OnUpdated(chip::AttributeId attr) -{ - if (active()) - MatterReportingAttributeChangeCallback(GetEndpointId(), GetClusterId(), attr); -} - -bool CommonCluster::Write(chip::AttributeId attr, chip::TLV::TLVReader & reader) -{ - chip::app::AttributeValueDecoder decoder(reader, chip::Access::SubjectDescriptor()); - if (WriteFromBridge(chip::app::ConcreteDataAttributePath(GetEndpointId(), GetClusterId(), attr), decoder) != CHIP_NO_ERROR) - return false; - OnUpdated(attr); - return true; -} diff --git a/examples/dynamic-bridge-app/linux/Device.cpp b/examples/dynamic-bridge-app/linux/Device.cpp deleted file mode 100644 index c749f9bb5babd4..00000000000000 --- a/examples/dynamic-bridge-app/linux/Device.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Device.h" - -#include -#include - -Device::Device(chip::Span dataVersions, chip::Span clusters, - chip::Span clusterImpl, const chip::Span & deviceTypeList, - chip::EndpointId parentId) : - mParentEndpointId(parentId), - mDataVersions(dataVersions), mClusters(clusters), mClusterImpl(clusterImpl), mDeviceTypeList(deviceTypeList) -{ - mEndpointType.cluster = clusters.data(); - mEndpointType.clusterCount = (uint8_t) clusters.size(); - mEndpointType.endpointSize = 0; -} - -void Device::SetEndpointId(chip::EndpointId id) -{ - mEndpointId = id; - for (auto * c : mClusterImpl) - c->SetEndpointId(id); -} - -const char * Device::GetName() -{ - return mDeviceName.c_str(); -} - -void Device::SetName(const char * name) -{ - mDeviceName = name; -} diff --git a/examples/dynamic-bridge-app/linux/Dockerfile b/examples/dynamic-bridge-app/linux/Dockerfile deleted file mode 100644 index 8578398312602b..00000000000000 --- a/examples/dynamic-bridge-app/linux/Dockerfile +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (c) 2020-2021 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM connectedhomeip/chip-cirque-device-base:latest - -COPY out/debug/dynamic-chip-bridge-app /usr/bin/ -COPY entrypoint.sh / - -ENTRYPOINT ["/entrypoint.sh", "server"] diff --git a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp b/examples/dynamic-bridge-app/linux/DynamicDevice.cpp deleted file mode 100644 index 9842715547b19d..00000000000000 --- a/examples/dynamic-bridge-app/linux/DynamicDevice.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#include "DynamicDevice.h" - -#define DEVICE_TYPE_BRIDGED_NODE 0x0013 -// Device Version for dynamic endpoints: -#define DEVICE_VERSION_DEFAULT 1 - -namespace { -static const int kDescriptorAttributeArraySize = 254; - -DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(descriptorAttrs) -DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* device list */ - DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::ServerList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* server list */ - DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::ClientList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* client list */ - DECLARE_DYNAMIC_ATTRIBUTE(chip::app::Clusters::Descriptor::Attributes::PartsList::Id, ARRAY, kDescriptorAttributeArraySize, - 0), /* parts list */ - DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); -} // namespace - -DynamicDevice::DynamicDevice() {} - -void DynamicDevice::AddDeviceType(EmberAfDeviceType type) -{ - mDeviceTypes.push_back(type); -} - -Device DynamicDevice::CreateDevice() -{ - // All nodes are bridged devices. - mDeviceTypes.push_back(EmberAfDeviceType{ DEVICE_TYPE_BRIDGED_NODE, DEVICE_VERSION_DEFAULT }); - mVersions.resize(mClusterRawPtrs.size() + 1); // +1 for the descriptor cluster - for (auto * c : mClusterRawPtrs) - mClusterBaseRawPtrs.push_back(c); - - // Force a default descriptor cluster to be present. - mClusterDecls.emplace_back( - EmberAfCluster DECLARE_DYNAMIC_CLUSTER(chip::app::Clusters::Descriptor::Id, descriptorAttrs, nullptr, nullptr)); - - return Device(chip::Span(mVersions.data(), mVersions.size()), - chip::Span(mClusterDecls.data(), mClusterDecls.size()), - chip::Span(mClusterBaseRawPtrs.data(), mClusterBaseRawPtrs.size()), - chip::Span(mDeviceTypes.data(), mDeviceTypes.size()), mParentEndpointId); -} - -DynamicDevice & DynamicDevice::AddCluster(std::unique_ptr cluster, - const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands) -{ - AddCluster(cluster.get(), attribs, incomingCommands, outgoingCommands); - mClusters.emplace_back(std::move(cluster)); - return *this; -} - -DynamicDevice & DynamicDevice::AddCluster(CommonCluster * cluster, const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands) -{ - // Do what DECLARE_DYNAMIC_CLUSTER does. - mClusterDecls.emplace_back(EmberAfCluster{ cluster->GetClusterId(), attribs.data(), (uint16_t) attribs.size(), 0, - ZAP_CLUSTER_MASK(SERVER), nullptr, incomingCommands, outgoingCommands }); - mClusterRawPtrs.emplace_back(cluster); - return *this; -} - -DynamicDevice & DynamicDevice::AddCluster(std::unique_ptr cluster) -{ - auto ptr = cluster.get(); - return AddCluster(std::move(cluster), - chip::Span(ptr->mAttributeDecls.data(), ptr->mAttributeDecls.size()), - ptr->mIncomingCommands, ptr->mOutgoingCommands); -} diff --git a/examples/dynamic-bridge-app/linux/README.md b/examples/dynamic-bridge-app/linux/README.md deleted file mode 100644 index cefae9a466f5c7..00000000000000 --- a/examples/dynamic-bridge-app/linux/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Matter Linux Dynamic Endpoints Bridge Example - -An example demonstrating a simple lighting bridge and the use of dynamic -endpoints. The document will describe the theory of operation and how to build -and run Matter Linux Bridge Example on Raspberry Pi. This doc is tested on -**Ubuntu for Raspberry Pi Server 20.04 LTS (aarch64)** and **Ubuntu for -Raspberry Pi Desktop 20.10 (aarch64)** - -
- -- [Matter Linux Dynamic Endpoints Bridge Example](#matter-linux-dynamic-endpoints-bridge-example) - - [Theory of Operation](#theory-of-operation) - - [Building](#building) - - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) - -
- -## Theory of Operation - -### Dynamic Endpoints - -The Bridge Example makes use of Dynamic Endpoints. Current SDK support is -limited for dynamic endpoints, since endpoints are typically defined (along with -the clusters and attributes they contain) in a .zap file which then generates -code and static structures to define the endpoints. - -To support endpoints that are not statically defined, the ZCL attribute storage -mechanisms will hold additional endpoint information for `NUM_DYNAMIC_ENDPOINTS` -additional endpoints. These additional endpoint structures must be defined by -the application and can change at runtime. - -To facilitate the creation of these endpoint structures, several macros are -defined: - -`DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(attrListName)` -`DECLARE_DYNAMIC_ATTRIBUTE(attId, attType, attSizeBytes, attrMask)` -`DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(clusterRevision)` - -- These three macros are used to declare a list of attributes for use within a - cluster. The declaration must begin with the - `DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN` macro which will define the name of - the allocated attribute structure. Each attribute is then added by the - `DECLARE_DYNAMIC_ATTRIBUTE` macro. Finally, - `DECLARE_DYNAMIC_ATTRIBUTE_LIST_END` macro should be used to close the - definition. - -- All attributes defined with these macros will be configured as - `ATTRIBUTE_MASK_EXTERNAL_STORAGE` in the ZCL database and therefore will - rely on the application to maintain storage for the attribute. Consequently, - reads or writes to these attributes must be handled within the application - by the `emberAfExternalAttributeWriteCallback` and - `emberAfExternalAttributeReadCallback` functions. See the bridge - application's `main.cpp` for an example of this implementation. - -`DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN(clusterListName)` -`DECLARE_DYNAMIC_CLUSTER(clusterId, clusterAttrs, incomingCommands, outgoingCommands)` -`DECLARE_DYNAMIC_CLUSTER_LIST_END` - -- These three macros are used to declare a list of clusters for use within a - endpoint. The declaration must begin with the - `DECLARE_DYNAMIC_CLUSTER_LIST_BEGIN` macro which will define the name of the - allocated cluster structure. Each cluster is then added by the - `DECLARE_DYNAMIC_CLUSTER` macro referencing attribute list previously - defined by the `DECLARE_DYNAMIC_ATTRIBUTE...` macros and the lists of - incoming/outgoing commands terminated by kInvalidCommandId (or nullptr if - there aren't any commands in the list). Finally, - `DECLARE_DYNAMIC_CLUSTER_LIST_END` macro should be used to close the - definition. - -`DECLARE_DYNAMIC_ENDPOINT(endpointName, clusterList)` - -- This macro is used to declare an endpoint and its associated cluster list, - which must be previously defined by the `DECLARE_DYNAMIC_CLUSTER...` macros. - -### Limitations - -Because code generation is dependent upon the clusters and attributes defined in -the .zap file (for static endpoint generation), it is necessary to include a -defined endpoint within the .zap that contains _all_ the clusters that may be -used on dynamic endpoints. On the bridge example, this is done on endpoint 1, -which is used as a 'dummy' endpoint that will be disabled at runtime. Endpoint 0 -is also defined in the .zap and contains the bridge basic and configuration -clusters as well as the root descriptor cluster. - -### Bridge Implementation Example - -The example demonstrates the use of dynamic endpoints and the concept of adding -and removing endpoints at runtime. First, the example declares a -`bridgedLightEndpoint` data structure for a Light endpoint with `OnOff`, -`Descriptor`, `BridgedDeviceBasicInformation`, and `FixedLabel` clusters. - -Using this declared endpoint structure, three endpoints for three bridged lights -are dynamically added at endpoint ID's `2`, `3`, and `4`, representing -`Light 1`, `Light 2`, and `Light 3` respectively. - -Then, endpoint `3` is removed, simulating the deletion of `Light 2`. - -A fourth light, `Light 4`, is then added occupying endpoint ID `5`. - -Finally, `Light 2` is re-added, and will occupy endpoint ID `6`. - -All endpoints populate the `Bridged Device Basic Information` and `Fixed Label` -clusters. In the `Bridged Device Basic Information` cluster, the `reachable` -attribute is simulated. In the `Fixed Label` cluster, the `LabelList` attribute -is simulated with the value/label pair `"room"`/`[light name]`. - -## Building - -- Install tool chain - - ``` - $ sudo apt-get install git gcc g++ python pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip - ``` - -- Build the example application: - - ``` - $ cd ~/connectedhomeip/examples/dynamic-bridge-app/linux - $ git submodule update --init - $ source third_party/connectedhomeip/scripts/activate.sh - $ gn gen out/debug - $ ninja -C out/debug - ``` - -- To delete generated executable, libraries and object files use: - - ``` - $ cd ~/connectedhomeip/examples/dynamic-bridge-app/linux - $ rm -rf out/ - ``` - -## Running the Complete Example on Raspberry Pi 4 - -- Prerequisites - - 1. A Raspberry Pi 4 board - 2. A USB Bluetooth Dongle, Ubuntu desktop will send Bluetooth advertisement, - which will block CHIP from connecting via BLE. On Ubuntu server, you need - to install `pi-bluetooth` via APT. - 3. Ubuntu 20.04 or newer image for ARM64 platform. - -- Building - - Follow [Building](#building) section of this document. - -- Running - - - [Optional] Plug USB Bluetooth dongle - - - Plug USB Bluetooth dongle and find its bluetooth device number. The - number after `hci` is the bluetooth device number, `1` in this - example. - - ``` - $ hciconfig - hci1: Type: Primary Bus: USB - BD Address: 00:1A:7D:AA:BB:CC ACL MTU: 310:10 SCO MTU: 64:8 - UP RUNNING PSCAN ISCAN - RX bytes:20942 acl:1023 sco:0 events:1140 errors:0 - TX bytes:16559 acl:1011 sco:0 commands:121 errors:0 - - hci0: Type: Primary Bus: UART - BD Address: B8:27:EB:AA:BB:CC ACL MTU: 1021:8 SCO MTU: 64:1 - UP RUNNING PSCAN ISCAN - RX bytes:8609495 acl:14 sco:0 events:217484 errors:0 - TX bytes:92185 acl:20 sco:0 commands:5259 errors:0 - ``` - - - Run Linux Bridge Example App - - ``` - $ cd ~/connectedhomeip/examples/dynamic-bridge-app/linux - $ sudo out/debug/dynamic-chip-bridge-app --ble-device [bluetooth device number] - # In this example, the device we want to use is hci1 - $ sudo out/debug/chip-bridge-app --ble-device 1 - ``` - - - Test the device using ChipDeviceController on your laptop / - workstation etc. diff --git a/examples/dynamic-bridge-app/linux/UserInputBackend.cpp b/examples/dynamic-bridge-app/linux/UserInputBackend.cpp deleted file mode 100644 index 5347919a552d30..00000000000000 --- a/examples/dynamic-bridge-app/linux/UserInputBackend.cpp +++ /dev/null @@ -1,588 +0,0 @@ -#include "Backend.h" -#include "DynamicDevice.h" -#include "main.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace { - -std::unique_ptr g_pending; - -// Pseudo-index representing the device being built. -static constexpr int kPendingDeviceIndex = -1; - -PropagateWriteCB g_write_cb = [](CommonCluster * cluster, const chip::app::ConcreteDataAttributePath & path, - chip::app::AttributeValueDecoder & decoder) -> CHIP_ERROR { - CHIP_ERROR ret = cluster->WriteFromBridge(path, decoder); - printf("Write to ep %d cluster %d attribute %d ret %" CHIP_ERROR_FORMAT "\n", path.mEndpointId, path.mClusterId, - path.mAttributeId, ret.Format()); - return ret; -}; - -const char * ParseValue(const std::vector & tokens, size_t index, std::string * v) -{ - if (index >= tokens.size()) - return "Missing argument"; - *v = tokens[index]; - return nullptr; -} -const char * ParseValue(const std::vector & tokens, size_t index, chip::Optional * v) -{ - if (index < tokens.size()) - v->SetValue(tokens[index]); - return nullptr; -} - -template ::value>> -const char * ParseValue(const std::vector & tokens, size_t index, T * v) -{ - if (index >= tokens.size()) - return "Missing argument"; - const char * start = tokens[index].data(); - const char * end = start + tokens[index].size(); - auto ret = std::from_chars(start, end, *v); - if (ret.ptr != end) - return "Cannot parse as integer"; - return nullptr; -} - -template ::value>> -const char * ParseValue(const std::vector & tokens, size_t index, chip::Optional * v) -{ - uint32_t temp; - if (!ParseValue(tokens, index, &temp)) - v->SetValue(temp); - return nullptr; -} - -const char * Parse(const std::vector & tokens, size_t index) -{ - if (index >= tokens.size()) - return nullptr; - return "Unexpected extra tokens"; -} - -template -const char * Parse(const std::vector & tokens, size_t index, T arg0, Args... args) -{ - auto ret = ParseValue(tokens, index, arg0); - return ret ? ret : Parse(tokens, index + 1, args...); -} - -void NewDevice(const std::vector & tokens) -{ - if (g_pending) - { - printf("Already pending device!\n"); - return; - } - - chip::Optional type; - const char * err = Parse(tokens, 0, &type); - if (err) - { - printf("Error: %s\nExpected [prebuilt-device-type]\n", err); - } - else if (!type.HasValue()) - { - g_pending = std::make_unique(); - } - else - { - printf("Unknown device type %s\nSupported types: switch\n", type.Value().c_str()); - } -} - -void AddCluster(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - std::string cluster_name; - const char * err = Parse(tokens, 0, &cluster_name); - if (err) - { - printf("Error: %s\n", err); - return; - } - - auto c = CreateCluster(cluster_name.c_str()); - if (c) - { - g_pending->AddCluster( - std::make_unique(std::move(c), c->GetIncomingCommandList(), c->GetOutgoingCommandList())); - } - else - { - printf("No such cluster '%s'\n", cluster_name.c_str()); - } -} - -void CancelDevice(const std::vector & tokens) -{ - const char * err = Parse(tokens, 0); - if (err) - { - printf("Error: %s\n", err); - return; - } - - g_pending.reset(nullptr); -} - -void FinishDevice(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - - const char * err = Parse(tokens, 0); - if (err) - { - printf("Error: %s\n", err); - return; - } - - for (auto * c : g_pending->clusters()) - c->SetCallback(&g_write_cb); - - int ep = AddDevice(std::move(g_pending)); - - if (ep < 0) - { - printf("Failed to add device\n"); - } - else - { - printf("Added device at index %d\n", ep); - } -} - -void RemoveDevice(const std::vector & tokens) -{ - uint32_t index; - const char * err = Parse(tokens, 0, &index); - if (err) - { - printf("Error: %s.\nExpected index of a device\n", err); - return; - } - if (!RemoveDeviceAt(index)) - { - printf("%d is an invalid index\n", index); - } -} - -void AddType(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - uint32_t type; - chip::Optional version; - const char * err = Parse(tokens, 0, &type, &version); - if (err) - { - printf("Error: %s.\nExpected: type [version]\n", err); - return; - } - EmberAfDeviceType devType = { (uint16_t) type, (uint8_t) version.ValueOr(1u) }; - printf("Adding device type %d ver %d\n", devType.deviceId, devType.deviceVersion); - - g_pending->AddDeviceType(devType); -} - -DynamicDevice * FindDevice(int32_t index) -{ - if (index == kPendingDeviceIndex) - { - return g_pending.get(); - } - else if ((uint32_t) index < g_device_impls.size()) - { - return g_device_impls[(uint32_t) index].get(); - } - else - { - return nullptr; - } -} - -Device * FindEndpoint(int32_t index) -{ - if (index >= 0 && (uint32_t) index < g_device_impls.size()) - { - return g_devices[(uint32_t) index].get(); - } - else - { - return nullptr; - } -} - -ClusterInterface * FindCluster(DynamicDevice * dev, const std::string & clusterId) -{ - uint32_t id; - const char * start = clusterId.data(); - const char * end = start + clusterId.size(); - if (std::from_chars(start, end, id).ptr != end) - { - auto r = LookupClusterByName(clusterId.c_str()); - if (r.HasValue()) - { - return nullptr; - } - id = r.Value(); - } - - for (auto * c : dev->clusters()) - { - if (c->GetClusterId() == id) - { - return c; - } - } - return nullptr; -} - -const EmberAfAttributeMetadata * FindAttrib(ClusterInterface * cluster, const std::string & attrId) -{ - AttributeInterface * attr = nullptr; - uint32_t id; - const char * start = attrId.data(); - const char * end = start + attrId.size(); - if (std::from_chars(start, end, id).ptr == end) - { - attr = cluster->FindAttribute(id); - } - if (!attr) - { - attr = cluster->FindAttributeByName(chip::CharSpan(attrId.data(), attrId.size())); - } - - return attr ? &attr->GetMetadata() : nullptr; -} - -void ParseValue(std::vector * data, uint16_t size, const std::string & str, EmberAfAttributeType type) -{ - chip::TLV::TLVWriter wr; - wr.Init(data->data(), data->size()); - switch (type) - { - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: - wr.PutString(chip::TLV::AnonymousTag(), str.data(), (uint32_t) str.size()); - break; - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - wr.PutBytes(chip::TLV::AnonymousTag(), (const uint8_t *) str.data(), (uint32_t) str.size()); - break; - case ZCL_STRUCT_ATTRIBUTE_TYPE: - // Writing structs not supported yet - break; - case ZCL_SINGLE_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), (float) atof(str.c_str())); - break; - case ZCL_DOUBLE_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), atof(str.c_str())); - break; - case ZCL_INT8S_ATTRIBUTE_TYPE: - case ZCL_INT16S_ATTRIBUTE_TYPE: - case ZCL_INT24S_ATTRIBUTE_TYPE: - case ZCL_INT32S_ATTRIBUTE_TYPE: - case ZCL_INT40S_ATTRIBUTE_TYPE: - case ZCL_INT48S_ATTRIBUTE_TYPE: - case ZCL_INT56S_ATTRIBUTE_TYPE: - case ZCL_INT64S_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), (int64_t) strtoll(str.c_str(), nullptr, 10)); - break; - - case ZCL_INT8U_ATTRIBUTE_TYPE: - case ZCL_INT16U_ATTRIBUTE_TYPE: - case ZCL_INT24U_ATTRIBUTE_TYPE: - case ZCL_INT32U_ATTRIBUTE_TYPE: - case ZCL_INT40U_ATTRIBUTE_TYPE: - case ZCL_INT48U_ATTRIBUTE_TYPE: - case ZCL_INT56U_ATTRIBUTE_TYPE: - case ZCL_INT64U_ATTRIBUTE_TYPE: - wr.Put(chip::TLV::AnonymousTag(), (uint64_t) strtoll(str.c_str(), nullptr, 10)); - break; - - default: - // Assume integer - wr.Put(chip::TLV::AnonymousTag(), (int64_t) strtoll(str.c_str(), nullptr, 10)); - break; - } - wr.Finalize(); - data->resize(wr.GetLengthWritten()); -} - -void SetValue(const std::vector & tokens) -{ - std::string attrId; - int32_t index; - std::string clusterId; - std::string value; - const char * err = Parse(tokens, 0, &index, &clusterId, &attrId, &value); - if (err) - { - printf("Error: %s.\nExpected: deviceIndex clusterId attributeId value\nUse deviceIndex -1 for pending device.\n", err); - return; - } - - DynamicDevice * dev = FindDevice(index); - if (!dev) - { - printf("Could not find device at index %d\n", index); - return; - } - - ClusterInterface * cluster = FindCluster(dev, clusterId); - if (!cluster) - { - printf("Device does not implement cluster %s\nSupported clusters: ", clusterId.c_str()); - for (auto * c : dev->clusters()) - { - printf("%d ", c->GetClusterId()); - } - printf("\n"); - return; - } - - const EmberAfAttributeMetadata * attr = FindAttrib(cluster, attrId); - if (!attr) - { - printf("Cluster does not implement attr %s\nSupported attributes: ", attrId.c_str()); - for (auto attrMeta : cluster->GetAllAttributes()) - { - printf("%d ", attrMeta->GetId()); - } - printf("\n"); - return; - } - - std::vector data(attr->size + 64); - ParseValue(&data, attr->size, value, attr->attributeType); - - chip::TLV::TLVReader rd; - rd.Init(data.data(), data.size()); - rd.Next(); - - if (!cluster->Write(attr->attributeId, rd)) - { - printf("Write failed\n"); - } -} - -void AddRoom(const std::vector & tokens) -{ - if (tokens.size() != 1) - { - printf("Expected exactly one string\n"); - return; - } - auto room = FindRoom(tokens[0]); - if (room) - { - printf("Room already exists\n"); - return; - } -} - -void DelRoom(const std::vector & tokens) -{ - if (tokens.size() != 1) - { - printf("Expected exactly one string\n"); - return; - } - auto room = FindRoom(tokens[0]); - if (!room) - { - printf("No such room\n"); - return; - } - - room->SetName(std::string()); - while (room->GetEndpointListSize() > 0) - room->RemoveEndpoint(*room->GetEndpointListData()); -} - -void AddToRoom(const std::vector & tokens) -{ - int32_t index; - std::string room; - const char * err = Parse(tokens, 0, &room, &index); - if (err) - { - printf("Error: %s.\nExpected: room index.\n", err); - return; - } - auto roomPtr = FindRoom(tokens[0]); - if (!roomPtr) - { - printf("No such room\n"); - return; - } - auto dev = FindEndpoint(index); - if (!dev) - { - printf("No such device\n"); - return; - } - roomPtr->AddEndpoint(dev->GetEndpointId()); -} - -void DelFromRoom(const std::vector & tokens) -{ - int32_t index; - std::string room; - const char * err = Parse(tokens, 0, &room, &index); - if (err) - { - printf("Error: %s.\nExpected: room index.\n", err); - return; - } - auto roomPtr = FindRoom(tokens[0]); - if (!roomPtr) - { - printf("No such room\n"); - return; - } - auto dev = FindEndpoint(index); - if (!dev) - { - printf("No such device\n"); - return; - } - roomPtr->RemoveEndpoint(dev->GetEndpointId()); -} - -void SetParentId(const std::vector & tokens) -{ - if (!g_pending) - { - printf("Expected pending device! Run new-device\n"); - return; - } - - int32_t index; - const char * err = Parse(tokens, 0, &index); - if (err) - { - printf("Error: %s.\nExpected: deviceIndex\n", err); - return; - } - auto dev = FindEndpoint(index); - if (!dev) - { - printf("No such device\n"); - return; - } - g_pending->SetParentEndpointId(dev->GetEndpointId()); -} - -void Help(const std::vector & tokens); - -struct Command -{ - const char * name; - const char * desc; - void (*fn)(const std::vector & tokens); -} const commands[] = { - { "help", "", &Help }, - { "new-device", "[type] - Begin adding a new device. Add device types and clusters, then finish", &NewDevice }, - { "del-device", "index - Remove a device at the specified index", &RemoveDevice }, - { "add-cluster", "name - Add a cluster by name, eg FixedLabel", &AddCluster }, - { "finish-device", "Finish the currently pending device. Clusters and device types are immutable.", &FinishDevice }, - { "cancel-device", "Abort adding a new device", &CancelDevice }, - { "add-type", "id [version] - Add a device type by ID, optionally with a version", &AddType }, - { "set", "deviceIndex clusterId attributeId value - Set a value. deviceIndex -1 for adding device", &SetValue }, - { "set-parent-id", "deviceIndex - Set the parent endpoint ID to the specified device", &SetParentId }, - { "add-room", "name - Add a new named room", &AddRoom }, - { "del-room", "name - Remove an existing named room", &DelRoom }, - { "add-to-room", "name index - Add a device to a named room", &AddToRoom }, - { "del-from-room", "name index - Remove a device from a named room", &DelFromRoom }, -}; - -void Help(const std::vector & tokens) -{ - for (auto & cmd : commands) - { - printf("%s %s\n", cmd.name, cmd.desc); - } -} - -struct Op -{ - std::vector * tokens; - const Command * command; - std::promise lock; -}; -void ProcessLineOnMatterThread(intptr_t arg) -{ - Op * op = reinterpret_cast(arg); - op->command->fn(*op->tokens); - op->lock.set_value(); -} - -void ProcessLine(std::vector & tokens) -{ - for (auto & cmd : commands) - { - if (tokens[0] == cmd.name) - { - tokens.erase(tokens.begin()); - - Op op{ &tokens, &cmd }; - chip::DeviceLayer::PlatformMgr().ScheduleWork(&ProcessLineOnMatterThread, reinterpret_cast(&op)); - // Wait for command completion - op.lock.get_future().wait(); - return; - } - } - printf("Unknown command '%s'\n", tokens[0].c_str()); -} - -void * UserInputThread(void *) -{ - std::string line; - while (true) - { - printf("? "); - std::cin >> std::ws; - std::getline(std::cin, line); - if (std::cin.eof()) - break; - - std::istringstream iss(line); - std::vector tokens{ std::istream_iterator{ iss }, std::istream_iterator{} }; - - ProcessLine(tokens); - } - return nullptr; -} - -} // namespace - -void StartUserInput() -{ - pthread_t thread; - pthread_create(&thread, nullptr, &UserInputThread, nullptr); -} diff --git a/examples/dynamic-bridge-app/linux/args.gni b/examples/dynamic-bridge-app/linux/args.gni deleted file mode 100644 index 21ee92ef761b4d..00000000000000 --- a/examples/dynamic-bridge-app/linux/args.gni +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") - -import("${chip_root}/config/standalone/args.gni") - -chip_device_project_config_include = "" -chip_project_config_include = "" -chip_system_project_config_include = "" - -chip_project_config_include_dirs = - [ "${chip_root}/examples/dynamic-bridge-app/bridge-common/include" ] -chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] - -cpp_standard="c++17" diff --git a/examples/dynamic-bridge-app/linux/bridge_service.cpp b/examples/dynamic-bridge-app/linux/bridge_service.cpp deleted file mode 100644 index 9a45fbd36c49d0..00000000000000 --- a/examples/dynamic-bridge-app/linux/bridge_service.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "bridge_service.h" - -#include "Backend.h" -#include "main.h" - -namespace chip { -namespace rpc { - -::pw::Status Bridge::Add(const ::chip_rpc_bridge_AddDevice & request, ::chip_rpc_bridge_AddDeviceResponse & response) -{ - std::unique_ptr pending; - - pending = std::make_unique(); - pending->SetParentEndpointId(request.parent_endpoint); - - for (pb_size_t i = 0; i < request.clusters_count; i++) - { - const chip_rpc_bridge_Cluster & c = request.clusters[i]; - - auto cluster = CreateCluster(c.cluster_id); - if (!cluster) - { - return pw::Status::InvalidArgument(); - } - - pending->AddCluster(std::make_unique(std::move(cluster))); - } - - for (pb_size_t i = 0; i < request.device_types_count; i++) - { - EmberAfDeviceType devType = { (uint16_t) request.device_types[i].id, (uint8_t) request.device_types[i].version }; - pending->AddDeviceType(devType); - } - - int ret = AddDevice(std::move(pending)); - if (ret < 0) - { - return pw::Status::Aborted(); - } - response.id = ret; - return pw::OkStatus(); -} - -::pw::Status Bridge::Remove(const ::chip_rpc_bridge_RemoveDevice & request, ::chip_rpc_bridge_Empty & response) -{ - if (!RemoveDeviceAt(request.id)) - { - return pw::Status::NotFound(); - } - - return pw::OkStatus(); -} - -} // namespace rpc -} // namespace chip diff --git a/examples/dynamic-bridge-app/linux/bridge_service.h b/examples/dynamic-bridge-app/linux/bridge_service.h deleted file mode 100644 index 4e5cc1e057b4dc..00000000000000 --- a/examples/dynamic-bridge-app/linux/bridge_service.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "app/util/attribute-storage.h" -#include "bridge_service/bridge_service.rpc.pb.h" -#include "pigweed/rpc_services/internal/StatusUtils.h" -#include - -namespace chip { -namespace rpc { - -class Bridge : public bridge::pw_rpc::nanopb::Bridge::Service -{ -public: - Bridge() = default; - - virtual ~Bridge() = default; - - ::pw::Status Add(const ::chip_rpc_bridge_AddDevice & request, ::chip_rpc_bridge_AddDeviceResponse & response); - - ::pw::Status Remove(const ::chip_rpc_bridge_RemoveDevice & request, ::chip_rpc_bridge_Empty & response); -}; - -} // namespace rpc -} // namespace chip diff --git a/examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp b/examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp deleted file mode 100644 index 3a1e3be9ac7829..00000000000000 --- a/examples/dynamic-bridge-app/linux/bridged-actions-stub.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "ActionCluster.h" -#include "main.h" - -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::Actions::Attributes; - -namespace { - -class ActionsAttrAccess : public AttributeAccessInterface -{ -public: - // Register for the Actions cluster on all endpoints. - ActionsAttrAccess() : AttributeAccessInterface(Optional::Missing(), Actions::Id) {} - - CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; - -private: - static constexpr uint16_t ClusterRevision = 1; - - CHIP_ERROR ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadSetupUrlAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder); -}; - -constexpr uint16_t ActionsAttrAccess::ClusterRevision; - -CHIP_ERROR ActionsAttrAccess::ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - CHIP_ERROR err = aEncoder.EncodeList([&endpoint](const auto & encoder) -> CHIP_ERROR { - chip::Span actionList = GetActionListInfo(endpoint); - - for (auto action : actionList) - { - if (action->getIsVisible()) - { - Actions::Structs::ActionStruct::Type actionStruct = { action->getActionId(), - CharSpan::fromCharString(action->getName().c_str()), - action->getType(), - action->getEndpointListId(), - action->getSupportedCommands(), - action->getStatus() }; - ReturnErrorOnFailure(encoder.Encode(actionStruct)); - } - } - - return CHIP_NO_ERROR; - }); - return err; -} - -CHIP_ERROR ActionsAttrAccess::ReadEndpointListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - CHIP_ERROR err = aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { - for (auto & room : gRooms) - { - if (room.GetEndpointListSize() == 0) - continue; - Actions::Structs::EndpointListStruct::Type endpointListStruct = { - room.GetEndpointListId(), CharSpan::fromCharString(room.GetName().c_str()), room.GetType(), - DataModel::List(room.GetEndpointListData(), room.GetEndpointListSize()) - }; - ReturnErrorOnFailure(encoder.Encode(endpointListStruct)); - } - return CHIP_NO_ERROR; - }); - return err; -} - -CHIP_ERROR ActionsAttrAccess::ReadSetupUrlAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - const char SetupUrl[] = "https://example.com"; - return aEncoder.Encode(chip::CharSpan::fromCharString(SetupUrl)); -} - -CHIP_ERROR ActionsAttrAccess::ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder) -{ - return aEncoder.Encode(ClusterRevision); -} - -ActionsAttrAccess gAttrAccess; - -CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) -{ - VerifyOrDie(aPath.mClusterId == Actions::Id); - - switch (aPath.mAttributeId) - { - case ActionList::Id: - return ReadActionListAttribute(aPath.mEndpointId, aEncoder); - case EndpointLists::Id: - return ReadEndpointListAttribute(aPath.mEndpointId, aEncoder); - case SetupURL::Id: - return ReadSetupUrlAttribute(aPath.mEndpointId, aEncoder); - case ClusterRevision::Id: - return ReadClusterRevision(aPath.mEndpointId, aEncoder); - default: - break; - } - return CHIP_NO_ERROR; -} -} // anonymous namespace - -void MatterActionsPluginServerInitCallback(void) -{ - registerAttributeAccessOverride(&gAttrAccess); -} diff --git a/examples/dynamic-bridge-app/linux/build b/examples/dynamic-bridge-app/linux/build deleted file mode 120000 index d56ed62ae4d1ff..00000000000000 --- a/examples/dynamic-bridge-app/linux/build +++ /dev/null @@ -1 +0,0 @@ -third_party/connectedhomeip/build \ No newline at end of file diff --git a/examples/dynamic-bridge-app/linux/build_overrides b/examples/dynamic-bridge-app/linux/build_overrides deleted file mode 120000 index e578e73312ebd1..00000000000000 --- a/examples/dynamic-bridge-app/linux/build_overrides +++ /dev/null @@ -1 +0,0 @@ -../../build_overrides \ No newline at end of file diff --git a/examples/dynamic-bridge-app/linux/entrypoint.sh b/examples/dynamic-bridge-app/linux/entrypoint.sh deleted file mode 100755 index 6551db22f262ef..00000000000000 --- a/examples/dynamic-bridge-app/linux/entrypoint.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -service dbus start -sleep 1 -service avahi-daemon start -/usr/sbin/otbr-agent -I wpan0 spinel+hdlc+uart:///dev/ttyUSB0 & -sleep 1 -ot-ctl panid 0x1234 -ot-ctl ifconfig up -ot-ctl thread start - -dynamic-chip-bridge-app diff --git a/examples/dynamic-bridge-app/linux/include/ActionCluster.h b/examples/dynamic-bridge-app/linux/include/ActionCluster.h deleted file mode 100644 index a5a830c044710d..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/ActionCluster.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include - -class Action -{ -public: - Action(uint16_t actionId, std::string name, chip::app::Clusters::Actions::ActionTypeEnum type, uint16_t endpointListId, - uint16_t supportedCommands, chip::app::Clusters::Actions::ActionStateEnum status, bool isVisible); - inline void setName(std::string name) { mName = name; }; - inline std::string getName() { return mName; }; - inline chip::app::Clusters::Actions::ActionTypeEnum getType() { return mType; }; - inline chip::app::Clusters::Actions::ActionStateEnum getStatus() { return mStatus; }; - inline uint16_t getActionId() { return mActionId; }; - inline uint16_t getEndpointListId() { return mEndpointListId; }; - inline uint16_t getSupportedCommands() { return mSupportedCommands; }; - inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; }; - inline bool getIsVisible() { return mIsVisible; }; - -private: - std::string mName; - chip::app::Clusters::Actions::ActionTypeEnum mType; - chip::app::Clusters::Actions::ActionStateEnum mStatus; - uint16_t mActionId; - uint16_t mEndpointListId; - uint16_t mSupportedCommands; - bool mIsVisible; -}; diff --git a/examples/dynamic-bridge-app/linux/include/Backend.h b/examples/dynamic-bridge-app/linux/include/Backend.h deleted file mode 100644 index d709bf17b74937..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/Backend.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "DynamicDevice.h" - -void StartUserInput(); - -extern std::vector> g_devices; -extern std::vector> g_device_impls; - -bool RemoveDeviceAt(uint32_t index); -int AddDevice(std::unique_ptr device); diff --git a/examples/dynamic-bridge-app/linux/include/Clusters.h b/examples/dynamic-bridge-app/linux/include/Clusters.h deleted file mode 100644 index 18bfbbaf07b71b..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/Clusters.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include "GeneratedClusters.h" -#include "data-model/Attribute.h" - -// This is the interface to cluster implementations, providing access to manipulate attributes. -class ClusterInterface -{ -public: - virtual ~ClusterInterface() = default; - - // Set the endpoint for this cluster. - virtual void SetEndpointId(chip::EndpointId id) = 0; - // Get the ID for this cluster. - virtual chip::ClusterId GetClusterId() = 0; - // Gets the list of enabled attributes for this cluster. - virtual chip::Span GetAllAttributes() = 0; - // Find an attribute of this cluster, if present. - virtual AttributeInterface * FindAttribute(chip::AttributeId id) = 0; - // Find an attribute of this cluster, if present, given its name. - virtual AttributeInterface * FindAttributeByName(chip::CharSpan name) = 0; - // Write the given TLV encoded value to the given attribute. Can write - // normally read-only values. Nofitied matter that the value has changed. - virtual bool Write(chip::AttributeId attr, chip::TLV::TLVReader & reader) = 0; -}; - -struct CommonCluster; -typedef std::function - PropagateWriteCB; - -// This provides the backend access to implementation details. -struct CommonCluster : public ClusterInterface -{ - CommonCluster(std::unique_ptr cluster); - ~CommonCluster(); - - void SetEndpointId(chip::EndpointId id) override; - chip::EndpointId GetEndpointId() const; - - chip::ClusterId GetClusterId() override; - - void SetCallback(PropagateWriteCB * cb); - - bool active() const; - - // Implemented by generated code. Valid writes should be forwarded to ForwardWriteToBridge. - virtual CHIP_ERROR WriteFromBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder); - - // Calls the registered callback if one exists, otherwise triggers a write of the actual - // stored value. - CHIP_ERROR ForwardWriteToBridge(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder); - - chip::Span GetAllAttributes() override; - AttributeInterface * FindAttribute(chip::AttributeId id) override; - AttributeInterface * FindAttributeByName(chip::CharSpan name) override; - - // Force a write of a given attribute. Can write normally read-only values. - // Calls OnUpdated after the write finishes. - bool Write(chip::AttributeId attr, chip::TLV::TLVReader & reader) override; - - // Push an attribute update notification to the matter stack. - void OnUpdated(chip::AttributeId attr); - - template - void OnUpdated(const T & attr) - { - OnUpdated(attr.GetId()); - } - -protected: - chip::EndpointId mEndpoint = 0xFFFF; - PropagateWriteCB * mCallback = nullptr; - std::vector mAttributes; - std::unique_ptr mStorage; -}; diff --git a/examples/dynamic-bridge-app/linux/include/Device.h b/examples/dynamic-bridge-app/linux/include/Device.h deleted file mode 100644 index 1ecf4d6bac4f2e..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/Device.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include -#include - -#include -#include - -#include "Clusters.h" - -// This represents a single logical device occupying one endpoint. A composed device consists of multiple -// Device objects that reference a tree. -class Device -{ -public: - Device(chip::Span dataVersions, chip::Span clusters, - chip::Span clusterImpl, const chip::Span & deviceTypeList, - chip::EndpointId parentId); - ~Device() = default; - - const chip::Span & versions() { return mDataVersions; } - const chip::Span & deviceTypes() { return mDeviceTypeList; } - const EmberAfEndpointType * endpointType() { return &mEndpointType; } - const chip::Span & clusters() { return mClusterImpl; } - - void SetEndpointId(chip::EndpointId id); - chip::EndpointId GetEndpointId() { return mEndpointId; } - chip::EndpointId GetParentEndpointId() { return mParentEndpointId; } - - const char * GetName(); - void SetName(const char * name); - -private: - chip::EndpointId mParentEndpointId; - chip::EndpointId mEndpointId; - chip::Span mDataVersions; - chip::Span mClusters; - chip::Span mClusterImpl; - chip::Span mDeviceTypeList; - EmberAfEndpointType mEndpointType; - std::string mDeviceName; -}; - -int AddDeviceEndpoint(Device * dev); -int RemoveDeviceEndpoint(Device * dev); -Device * FindDeviceEndpoint(chip::EndpointId id); diff --git a/examples/dynamic-bridge-app/linux/include/DynamicDevice.h b/examples/dynamic-bridge-app/linux/include/DynamicDevice.h deleted file mode 100644 index 07bddb237e76ae..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/DynamicDevice.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include "Device.h" -#include "GeneratedClusters.h" - -#include -#include - -// This file provides implementations that use dynamic storage -struct DynamicCluster : public CommonCluster -{ - DynamicCluster(std::unique_ptr impl, const chip::CommandId * incomingCommands = nullptr, - const chip::CommandId * outgoingCommands = nullptr) : - CommonCluster(std::move(impl)), - mIncomingCommands(incomingCommands), mOutgoingCommands(outgoingCommands) - { - for (auto & attr : mAttributes) - mAttributeDecls.push_back(attr->GetMetadata()); - } - - std::vector mAttributeDecls; - const chip::CommandId * mIncomingCommands; - const chip::CommandId * mOutgoingCommands; -}; - -class DynamicDevice -{ -public: - DynamicDevice(); - - template - DynamicDevice(Types &... clusters) - {} - - virtual ~DynamicDevice() = default; - - void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; } - - void AddDeviceType(EmberAfDeviceType type); - - // Add each cluster that the device will ever use. - DynamicDevice & AddCluster(std::unique_ptr cluster, const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands); - DynamicDevice & AddCluster(CommonCluster * cluster, const chip::Span & attribs, - const chip::CommandId * incomingCommands, const chip::CommandId * outgoingCommands); - - DynamicDevice & AddCluster(std::unique_ptr cluster); - - // After setting all options, create the device. - Device CreateDevice(); - - const std::vector & clusters() const { return mClusterRawPtrs; } - -private: - std::vector> mClusters; - std::vector mClusterRawPtrs; - std::vector mClusterBaseRawPtrs; - - std::vector mClusterDecls; - - std::vector mVersions; - - std::vector mDeviceTypes; - - chip::EndpointId mParentEndpointId = 1; -}; diff --git a/examples/dynamic-bridge-app/linux/include/GeneratedClusters.h b/examples/dynamic-bridge-app/linux/include/GeneratedClusters.h deleted file mode 100644 index 02ad1aaeaf7423..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/GeneratedClusters.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include -#include - -#include - -#include "data-model/Attribute.h" - -// Required for default initialization of cluster revisions. -static constexpr uint16_t ZCL_DESCRIPTOR_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_FIXED_LABEL_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_ON_OFF_CLUSTER_REVISION = 4; -static constexpr uint16_t ZCL_SWITCH_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_LEVEL_CONTROL_CLUSTER_REVISION = 1; -static constexpr uint16_t ZCL_TEMPERATURE_MEASUREMENT_CLUSTER_REVISION = 1; - -class GeneratedCluster -{ -public: - virtual ~GeneratedCluster() = default; - // Get the ID for this cluster. - virtual chip::ClusterId GetClusterId() = 0; - // Gets the list of available attributes for this cluster. - virtual std::vector GetAttributes() = 0; - - // Returns a list of client to server commands. Can be nullptr or terminated by 0xFFFF_FFFF. - // The returned list mirrors the `acceptedCommandList` field in `EmberAfCluster` - // This function is used to pass a command list when creating a `DynamicCluster` and its underlying `EmberAfCluster`. See - // `AddCluster` in `UserInputBackend`. - virtual const chip::CommandId * GetIncomingCommandList() { return nullptr; } - - // Returns a list of server generated commands (responses to client commands). Can be nullptr or terminated by 0xFFFF_FFFF. - // The returned list mirrors the `generatedCommandList` field in `EmberAfCluster` - // This function is used to pass a command list when creating a `DynamicCluster` and its underlying `EmberAfCluster`. See - // `AddCluster` in `UserInputBackend`. - virtual const chip::CommandId * GetOutgoingCommandList() { return nullptr; } -}; diff --git a/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h b/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h deleted file mode 100644 index aad7f9f65a68b0..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/data-model/Attribute.h +++ /dev/null @@ -1,104 +0,0 @@ -#pragma once - -#include -#include - -#include "DataModel.h" - -// This is the interface to the attribute implementation that permits retrieval of metadata about -// the attribute as well as set/get the underlying value. -class AttributeInterface -{ -public: - virtual ~AttributeInterface() = default; - - // Get the ID of this attribute. Shortcut for GetMetadata().attributeId - virtual chip::AttributeId GetId() = 0; - // Get the metadata of this attribute, suitable for advertising. - virtual const EmberAfAttributeMetadata & GetMetadata() = 0; - - virtual chip::CharSpan GetName() = 0; - - // List attribes should override these to get list write notifications. - virtual void ListWriteBegin(const chip::app::ConcreteAttributePath & aPath) {} - virtual void ListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) {} - - // Write a single value to the attribute. - virtual CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) = 0; - - // Read the contents of the attribute. - virtual CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) = 0; - - virtual CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer) = 0; -}; - -// This is the base type for implementing an attribute -template -struct Attribute : public AttributeInterface -{ - Attribute(chip::CharSpan name, chip::AttributeId id, EmberAfAttributeMask mask, EmberAfAttributeType type, size_t size, - Type value = Type()) : - mMetadata(EmberAfAttributeMetadata{ ZAP_EMPTY_DEFAULT(), id, (uint16_t) size, type, mask }), - mData(value), mName(name) - {} - - chip::AttributeId GetId() override { return mMetadata.attributeId; } - const EmberAfAttributeMetadata & GetMetadata() override { return mMetadata; } - chip::CharSpan GetName() override { return mName; } - - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override - { - return chip::app::DataModel::Decode(aPath, aDecoder, mData); - } - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override - { - return chip::app::DataModel::Encode(aPath, aEncoder, mData); - } - - template >::value, bool> = true> - CHIP_ERROR ReadValue(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer, Type & value) - { - return chip::app::DataModel::Encode(aPath, writer, chip::TLV::AnonymousTag(), value); - } - - template >::value, bool> = true> - CHIP_ERROR ReadValue(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer, Type & value) - { - return chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), value); - } - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer) override - { - return ReadValue(aPath, writer, mData); - } - - void operator=(const Type & value) { mData = value; } - const Type & Peek() const { return mData; } - -protected: - EmberAfAttributeMetadata mMetadata; - Type mData; - chip::CharSpan mName; -}; - -// This specialization handles list writes and reverts if the write fails. -template -struct ListAttribute : public Attribute -{ - using Attribute::Attribute; - - void ListWriteBegin(const chip::app::ConcreteAttributePath & aPath) override { mBackup = this->mData; } - void ListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) override - { - if (aWriteWasSuccessful) - { - mBackup = Type(); - } - else - { - this->mData = std::move(mBackup); - } - } - - Type mBackup; -}; diff --git a/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h b/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h deleted file mode 100644 index 053cd785aac472..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/data-model/DataModel.h +++ /dev/null @@ -1,325 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include -#include - -namespace chip { -namespace app { -namespace DataModel { - -// Container requirements. -// To encode and decode as a list the following must be present -// void clear(); -// size_type size(); -// T& back(); -// void emplace_back(); -// iterator_type begin(); -// iterator_type end(); -// iterator_type must conform to LegacyForwardIterator -// The contained type must be default-constructible -template -class IsList -{ - typedef char yes; - typedef long no; - - template - static yes test(decltype(&U::size)); - template - static no test(...); - -public: - static constexpr bool value = sizeof(test(0)) == sizeof(yes); -}; - -template -struct IsOptionalOrNullable -{ - static constexpr bool value = false; -}; -template -struct IsOptionalOrNullable> -{ - static constexpr bool value = true; -}; -template -struct IsOptionalOrNullable> -{ - static constexpr bool value = true; -}; - -static_assert(IsList>::value, "Vector of chars must be a list"); - -template >::value && !IsList>::value, bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath &, AttributeValueEncoder & aEncoder, const X & x) -{ - return aEncoder.Encode(x); -} - -/* - * @brief - * Lists that are string-like should be encoded as char/byte spans. - * Encode using a given AttributeValueEncoder. - */ -template < - typename X, - std::enable_if_t>::value && sizeof(std::decay_t) == sizeof(char), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const X & x) -{ - return aEncoder.Encode(Span>(x.data(), x.size())); -} - -/* - * @brief - * Lists that are string-like should be encoded as char/byte spans. - * Encode using a given TLVWriter. - */ -template < - typename X, - std::enable_if_t>::value && sizeof(std::decay_t) == sizeof(char), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, TLV::TLVWriter & writer, TLV::Tag tag, const X & x) -{ - return writer.Put(tag, Span>(x.data(), x.size())); -} - -/* - * @brief - * - * If an item is requested from a list, encode just that single item, or the entire list otherwise. - * - * Encodes items using a given AttributeValueEncoder. - * - * The object must satisfy the following constraints - * size() must return an integer - * begin() must return a type conforming to LegacyRandomAccessIterator - * - * This is const X& instead of X&& because it is "more specialized" and so this overload will - * be chosen if possible. - */ -template < - typename X, - std::enable_if_t>::value && (sizeof(std::decay_t) > sizeof(char)), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const X & x) -{ - if (aPath.mListIndex.HasValue()) - { - uint16_t index = aPath.mListIndex.Value(); - if (index >= x.size()) - return CHIP_ERROR_INVALID_ARGUMENT; - - auto it = x.begin(); - std::advance(it, index); - return aEncoder.Encode(*it); - } - return aEncoder.EncodeList([x](const auto & encoder) { - CHIP_ERROR err = CHIP_NO_ERROR; - for (auto & v : x) - { - err = encoder.Encode(v); - if (err != CHIP_NO_ERROR) - break; - } - return err; - }); -} - -/* - * @brief - * - * If an item is requested from a list, encode just that single item, or the entire list otherwise. - * - * Encodes items using a given TLVWriter. - * - * The object must satisfy the following constraints - * size() must return an integer - * begin() must return a type conforming to LegacyRandomAccessIterator - * - * This is const X& instead of X&& because it is "more specialized" and so this overload will - * be chosen if possible. - */ -template < - typename X, - std::enable_if_t>::value && (sizeof(std::decay_t) > sizeof(char)), bool> = true> -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, TLV::TLVWriter & writer, TLV::Tag tag, const X & x) -{ - if (aPath.mListIndex.HasValue()) - { - uint16_t index = aPath.mListIndex.Value(); - if (index >= x.size()) - return CHIP_ERROR_INVALID_ARGUMENT; - - auto it = x.begin(); - std::advance(it, index); - return Encode(writer, tag, *it); - } - TLV::TLVType type; - - ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Array, type)); - for (auto & item : x) - { - ReturnErrorOnFailure(Encode(writer, tag, item)); - } - ReturnErrorOnFailure(writer.EndContainer(type)); - return CHIP_NO_ERROR; -} - -/* - * @brief - * Set of overloaded encode methods that can be called from AttributeAccessInterface::Read - */ -template -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const Optional & x) -{ - if (x.HasValue()) - { - return Encode(aPath, aEncoder, x.Value()); - } - // If no value, just do nothing. - return CHIP_NO_ERROR; -} - -/* - * @brief - * - * Encodes a nullable value. - */ -template -CHIP_ERROR Encode(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder, const Nullable & x) -{ - if (x.IsNull()) - { - return aEncoder.EncodeNull(); - } - - // Allow sending invalid values for nullables when - // CONFIG_BUILD_FOR_HOST_UNIT_TEST is true, so we can test how the other side - // responds. -#if !CONFIG_BUILD_FOR_HOST_UNIT_TEST - if (!x.ExistingValueInEncodableRange()) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } -#endif // !CONFIG_BUILD_FOR_HOST_UNIT_TEST - - // The -Wmaybe-uninitialized warning gets confused about the fact - // that x.mValue is always initialized if x.IsNull() is not - // true, so suppress it for our access to x.Value(). -#pragma GCC diagnostic push -#if !defined(__clang__) -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif // !defined(__clang__) - return Encode(aPath, aEncoder, x.Value()); -#pragma GCC diagnostic pop -} - -template >::value && !IsList>::value, bool> = true> -CHIP_ERROR Decode(const ConcreteDataAttributePath &, AttributeValueDecoder & aDecoder, X & x) -{ - return aDecoder.Decode(x); -} - -/* - * @brief - * Lists that are string-like should be decoded as char/byte spans. - */ -template < - typename X, - std::enable_if_t>::value && sizeof(std::decay_t) == sizeof(char), bool> = true> -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, X & x) -{ - Span> span; - CHIP_ERROR err = aDecoder.Decode(span); - if (err == CHIP_NO_ERROR) - { - x = X(span.data(), span.size()); - } - return err; -} - -template < - typename X, - std::enable_if_t>::value && (sizeof(std::decay_t) > sizeof(char)), bool> = true> -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, X & x) -{ - switch (aPath.mListOp) - { - case ConcreteDataAttributePath::ListOperation::DeleteItem: - if (aPath.mListIndex >= x.size()) - { - return CHIP_ERROR_INVALID_LIST_LENGTH; - } - else - { - auto it = x.begin(); - std::advance(it, aPath.mListIndex); - x.erase(it); - return CHIP_NO_ERROR; - } - - case ConcreteDataAttributePath::ListOperation::ReplaceItem: - if (aPath.mListIndex >= x.size()) - { - return CHIP_ERROR_INVALID_LIST_LENGTH; - } - else - { - auto it = x.begin(); - std::advance(it, aPath.mListIndex); - return aDecoder.Decode(*it); - } - - case ConcreteDataAttributePath::ListOperation::ReplaceAll: - x.clear(); - FALLTHROUGH; - default: - x.emplace_back(); - return aDecoder.Decode(x.back()); - } -} - -/* - * @brief - * - * Decodes an optional value (struct field, command field, event field). - */ -template -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, Optional & x) -{ - // If we are calling this, it means we found the right tag, so just decode - // the item. - return Decode(aPath, aDecoder, x.HasValue() ? x.Value() : x.Emplace()); -} - -/* - * @brief - * - * Decodes a nullable value. - */ -template -CHIP_ERROR Decode(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder, Nullable & x) -{ - if (aDecoder.WillDecodeNull()) - { - x.SetNull(); - return CHIP_NO_ERROR; - } - - // We have a value; decode it. - ReturnErrorOnFailure(Decode(aPath, aDecoder, x.SetNonNull())); - if (!x.ExistingValueInEncodableRange()) - { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); - } - return CHIP_NO_ERROR; -} - -} // namespace DataModel -} // namespace app -} // namespace chip diff --git a/examples/dynamic-bridge-app/linux/include/main.h b/examples/dynamic-bridge-app/linux/include/main.h deleted file mode 100644 index d11982d85fbc55..00000000000000 --- a/examples/dynamic-bridge-app/linux/include/main.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include - -#include "ActionCluster.h" -#include "Device.h" -#include "GeneratedClusters.h" - -#include - -class Room -{ -public: - Room() = default; - void SetName(std::string name) { mName = name; } - const std::string & GetName() { return mName; } - chip::app::Clusters::Actions::EndpointListTypeEnum GetType() { return mType; }; - uint16_t GetEndpointListId() { return mEndpointListId; }; - chip::EndpointId * GetEndpointListData() { return mEndpoints.data(); }; - size_t GetEndpointListSize() { return mEndpoints.size(); }; - - void AddEndpoint(chip::EndpointId ep) { mEndpoints.push_back(ep); } - void RemoveEndpoint(chip::EndpointId ep) - { - auto it = std::find(mEndpoints.begin(), mEndpoints.end(), ep); - if (it != mEndpoints.end()) - mEndpoints.erase(it); - } - -private: - std::string mName; - uint16_t mEndpointListId = 0; - chip::app::Clusters::Actions::EndpointListTypeEnum mType; - std::vector mEndpoints; -}; - -static constexpr uint32_t kMaxRooms = 16; -extern Room gRooms[kMaxRooms]; - -Room * FindRoom(const std::string & name); - -chip::Span GetActionListInfo(chip::EndpointId parentId); - -chip::Optional LookupClusterByName(const char * name); -std::unique_ptr CreateCluster(const char * name); -std::unique_ptr CreateCluster(chip::ClusterId id); -EmberAfStatus HandleReadOnOffAttribute(Attribute * attribute, uint8_t * buffer, uint16_t maxReadLength); -EmberAfStatus HandleWriteOnOffAttribute(Attribute * attribute, uint8_t * buffer); diff --git a/examples/dynamic-bridge-app/linux/main.cpp b/examples/dynamic-bridge-app/linux/main.cpp deleted file mode 100644 index e91f8d4d4e95ee..00000000000000 --- a/examples/dynamic-bridge-app/linux/main.cpp +++ /dev/null @@ -1,576 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "ActionCluster.h" -#include "Backend.h" -#include "CommissionableInit.h" -#include "Device.h" -#include "main.h" -#include - -#include "AppMain.h" - -#include "bridge/BridgeClustersImpl.h" - -#ifdef PW_RPC_ENABLED -#include "Rpc.h" -#include "bridge_service.h" -#include "pw_rpc_system_server/rpc_server.h" -static chip::rpc::Bridge bridge_service; -#endif - -#include -#include -#include - -using namespace chip; -using namespace chip::Credentials; -using namespace chip::Inet; -using namespace chip::Transport; -using namespace chip::DeviceLayer; -using namespace chip::app::Clusters; - -static EndpointId gCurrentEndpointId; -static EndpointId gFirstDynamicEndpointId; -static Device * gDevices[CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT]; -Room gRooms[kMaxRooms]; - -struct CommonAttributeAccessInterface : public chip::app::AttributeAccessInterface -{ - using chip::app::AttributeAccessInterface::AttributeAccessInterface; - - // Find a cluster given a specific endpoint/cluster. Returns nullptr if no such - // cluster exists at that path. - static CommonCluster * FindCluster(const chip::app::ConcreteClusterPath & path); - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, TLV::TLVWriter & writer); - - void OnListWriteBegin(const chip::app::ConcreteAttributePath & aPath) override; - void OnListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) override; -}; - -CommonCluster * CommonAttributeAccessInterface::FindCluster(const chip::app::ConcreteClusterPath & path) -{ - Device * dev = FindDeviceEndpoint(path.mEndpointId); - if (dev) - { - for (auto c : dev->clusters()) - { - if (c->GetClusterId() == path.mClusterId) - { - return static_cast(c); - } - } - } - return nullptr; -} - -CHIP_ERROR CommonAttributeAccessInterface::Read(const chip::app::ConcreteReadAttributePath & aPath, - chip::app::AttributeValueEncoder & aEncoder) -{ - CommonCluster * c = FindCluster(aPath); - if (!c) - { - return CHIP_ERROR_NOT_FOUND; - } - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (!a) - { - return CHIP_ERROR_NOT_FOUND; - } - return a->Read(aPath, aEncoder); -} - -CHIP_ERROR CommonAttributeAccessInterface::Write(const chip::app::ConcreteDataAttributePath & aPath, - chip::app::AttributeValueDecoder & aDecoder) -{ - CommonCluster * c = FindCluster(aPath); - if (!c) - { - return CHIP_ERROR_NOT_FOUND; - } - return c->ForwardWriteToBridge(aPath, aDecoder); -} - -CHIP_ERROR CommonAttributeAccessInterface::Read(const chip::app::ConcreteReadAttributePath & aPath, chip::TLV::TLVWriter & writer) -{ - CommonCluster * c = FindCluster(aPath); - if (!c) - { - return CHIP_ERROR_NOT_FOUND; - } - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (!a) - { - return CHIP_ERROR_NOT_FOUND; - } - return a->Read(aPath, writer); -} - -void CommonAttributeAccessInterface::OnListWriteBegin(const chip::app::ConcreteAttributePath & aPath) -{ - CommonCluster * c = FindCluster(aPath); - if (c) - { - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (a) - { - a->ListWriteBegin(aPath); - } - } -} - -void CommonAttributeAccessInterface::OnListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) -{ - CommonCluster * c = FindCluster(aPath); - if (c) - { - AttributeInterface * a = c->FindAttribute(aPath.mAttributeId); - if (a) - { - a->ListWriteEnd(aPath, aWriteWasSuccessful); - } - } -} - -chip::Optional LookupClusterByName(const char * name) -{ - for (const auto & cluster : clusters::kKnownClusters) - { - if (!strcmp(name, cluster.name)) - { - return chip::Optional(cluster.id); - } - } - return chip::Optional(); -} - -std::unique_ptr CreateCluster(chip::ClusterId id) -{ - for (const auto & cluster : clusters::kKnownClusters) - { - if (id == cluster.id) - { - return std::unique_ptr(cluster.ctor(::operator new(cluster.size))); - } - } - return nullptr; -} - -std::unique_ptr CreateCluster(const char * name) -{ - auto id = LookupClusterByName(name); - return id.HasValue() ? CreateCluster(id.Value()) : nullptr; -} - -CHIP_ERROR TLVWriteValue(chip::TLV::TLVWriter & wr, const Span & v) -{ - return wr.PutString(chip::TLV::AnonymousTag(), v); -} - -CHIP_ERROR TLVWriteValue(chip::TLV::TLVWriter & wr, const bool & v) -{ - return wr.PutBoolean(chip::TLV::AnonymousTag(), v); -} - -template -CHIP_ERROR TLVWriteValue(chip::TLV::TLVWriter & wr, const T & v) -{ - return wr.Put(chip::TLV::AnonymousTag(), v); -} - -CHIP_ERROR WriteValueToBuffer(const bool & value, chip::Span buffer) -{ - if (buffer.size() != 1) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - *(buffer.data()) = value ? 1 : 0; - return CHIP_NO_ERROR; -} - -template -CHIP_ERROR WriteValueToBuffer(const T & value, chip::Span buffer) -{ - size_t value_size = sizeof(value); - if (buffer.size() != value_size) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - memcpy(buffer.data(), &value, value_size); - return CHIP_NO_ERROR; -} - -template -CHIP_ERROR WriteValueToBuffer(chip::TLV::TLVReader & reader, chip::Span buffer) -{ - T v; - ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, v)); - return WriteValueToBuffer(v, buffer); -} - -// Describes a conversion direction between: -// - A binary buffer (passed from ember internals) -// - A TLV data buffer (used by TLVWriter and TLVReader) -enum ConversionDirection -{ - BUFFER_TO_TLV, - TLV_TO_BUFFER -}; - -template -CHIP_ERROR PerformTLVBufferConversion(std::vector * tlvData, chip::Span buffer, - ConversionDirection convert_direction) -{ - CHIP_ERROR err; - if (convert_direction == BUFFER_TO_TLV) - { - // buffer.size() is ignored here, because it was called from the external write ember callback, - // which does not provide a buffer size - chip::TLV::TLVWriter wr; - wr.Init(tlvData->data(), tlvData->size()); - T value; - memcpy(&value, buffer.data(), sizeof(T)); - err = TLVWriteValue(wr, value); - wr.Finalize(); - tlvData->resize(wr.GetLengthWritten()); - } - else - { - chip::TLV::TLVReader rd; - rd.Init(tlvData->data(), tlvData->size()); - rd.Next(); - err = WriteValueToBuffer(rd, buffer); - } - return err; -} - -CHIP_ERROR PerformTLVBufferConversionForType(std::vector * tlvData, chip::Span buffer, EmberAfAttributeType type, - ConversionDirection convert_direction) -{ - switch (type) - { - case ZCL_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_CHAR_STRING_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion>(tlvData, buffer, convert_direction); - case ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE: - case ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_STRUCT_ATTRIBUTE_TYPE: - // structs not supported yet - return CHIP_ERROR_NOT_IMPLEMENTED; - case ZCL_SINGLE_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_DOUBLE_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_INT8S_ATTRIBUTE_TYPE: - case ZCL_INT16S_ATTRIBUTE_TYPE: - case ZCL_INT24S_ATTRIBUTE_TYPE: - case ZCL_INT32S_ATTRIBUTE_TYPE: - case ZCL_INT40S_ATTRIBUTE_TYPE: - case ZCL_INT48S_ATTRIBUTE_TYPE: - case ZCL_INT56S_ATTRIBUTE_TYPE: - case ZCL_INT64S_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_INT8U_ATTRIBUTE_TYPE: - case ZCL_INT16U_ATTRIBUTE_TYPE: - case ZCL_INT24U_ATTRIBUTE_TYPE: - case ZCL_INT32U_ATTRIBUTE_TYPE: - case ZCL_INT40U_ATTRIBUTE_TYPE: - case ZCL_INT48U_ATTRIBUTE_TYPE: - case ZCL_INT56U_ATTRIBUTE_TYPE: - case ZCL_INT64U_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_BOOLEAN_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - case ZCL_BITMAP32_ATTRIBUTE_TYPE: - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - default: - // Assume integer - return PerformTLVBufferConversion(tlvData, buffer, convert_direction); - } -} - -bool emberAfActionsClusterInstantActionCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, - const Actions::Commands::InstantAction::DecodableType & commandData) -{ - // No actions are implemented, just return status NotFound. - commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::NotFound); - return true; -} - -EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, - uint16_t maxReadLength) -{ - uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - - if ((endpointIndex >= CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) || (gDevices[endpointIndex] == nullptr)) - { - ChipLogError(DeviceLayer, "Could not find dynamic endpoint: %d", endpoint); - return EMBER_ZCL_STATUS_UNSUPPORTED_ENDPOINT; - } - - chip::app::AttributeAccessInterface * accessInterface = chip::app::GetAttributeAccessOverride(endpoint, clusterId); - - if (accessInterface == nullptr) - { - ChipLogError(DeviceLayer, "Cluster %d has no attribute access override", clusterId); - return EMBER_ZCL_STATUS_FAILURE; - } - - // adding 64 bytes as padding to include the staging buffer used by - // TLVReader and TLVWriter, which is 17 bytes - std::vector tlvData(attributeMetadata->size + 64); - - // read the attribute and write it to `data` - chip::TLV::TLVWriter writer; - writer.Init(tlvData.data(), tlvData.size()); - - // this cast is safe because all the registered attribute accessors are of type `CommonAttributeAccessInterface`. See `main()` - CHIP_ERROR err = static_cast(accessInterface) - ->Read(chip::app::ConcreteDataAttributePath(endpoint, clusterId, attributeMetadata->attributeId), writer); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, "Attribute access interface failed to read attribute %d, for endpoint %d cluster %d", - attributeMetadata->attributeId, endpoint, clusterId); - return EMBER_ZCL_STATUS_FAILURE; - } - writer.Finalize(); - tlvData.resize(writer.GetLengthWritten()); - - // read from `data` and write to `buffer` - - // maxReadLength here is the maximum number of bytes to read from the attribute value and to write into the buffer. - err = PerformTLVBufferConversionForType(&tlvData, chip::Span(buffer, maxReadLength), attributeMetadata->attributeType, - TLV_TO_BUFFER); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, "Failed to write attribute to buffer. Endpoint %d, Cluster %d, Attribute %d", endpoint, clusterId, - attributeMetadata->attributeId); - return EMBER_ZCL_STATUS_FAILURE; - } - - return EMBER_ZCL_STATUS_SUCCESS; -} - -EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) -{ - uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); - - if ((endpointIndex >= CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) || (gDevices[endpointIndex] == nullptr)) - { - ChipLogError(DeviceLayer, "Could not find dynamic endpoint: %d", endpoint); - return EMBER_ZCL_STATUS_FAILURE; - } - - chip::app::AttributeAccessInterface * accessInterface = chip::app::GetAttributeAccessOverride(endpoint, clusterId); - - if (accessInterface == nullptr) - { - ChipLogError(DeviceLayer, "Cluster %d has no attribute access override", clusterId); - return EMBER_ZCL_STATUS_FAILURE; - } - - // adding 64 bytes as padding to include the staging buffer used by - // TLVReader and TLVWriter, which is 17 bytes - std::vector tlvData(attributeMetadata->size + 64); - - // read from `buffer` and write to `data` - - // buffer size will not be used in this code path, so we set it to 0. See `PerformTLVBufferConversion` - CHIP_ERROR err = PerformTLVBufferConversionForType(&tlvData, chip::Span(buffer, 0), attributeMetadata->attributeType, - BUFFER_TO_TLV); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, "Failed to read value from buffer: Endpoint %d, Cluster %d, Attribute %d", endpoint, clusterId, - attributeMetadata->attributeId); - return EMBER_ZCL_STATUS_FAILURE; - } - - // read from `data` and write to attribute - chip::TLV::TLVReader reader; - reader.Init(tlvData.data(), tlvData.size()); - reader.Next(); - chip::app::AttributeValueDecoder decoder(reader, chip::Access::SubjectDescriptor()); - err = - accessInterface->Write(chip::app::ConcreteReadAttributePath(endpoint, clusterId, attributeMetadata->attributeId), decoder); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "%" CHIP_ERROR_FORMAT, err.Format()); - ChipLogError(DeviceLayer, - "Attribute access interface failed to write attribute value. Endpoint %d, Cluster %d, Attribute %d", endpoint, - clusterId, attributeMetadata->attributeId); - return EMBER_ZCL_STATUS_FAILURE; - } - - return EMBER_ZCL_STATUS_SUCCESS; -} - -Device * FindDeviceEndpoint(chip::EndpointId id) -{ - for (auto dev : gDevices) - { - if (dev && dev->GetEndpointId() == id) - { - return dev; - } - } - return nullptr; -} - -int AddDeviceEndpoint(Device * dev) -{ - uint8_t index = 0; - while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) - { - if (nullptr == gDevices[index]) - { - gDevices[index] = dev; - EmberAfStatus ret; - while (true) - { - // Todo: Update this to schedule the work rather than use this lock - dev->SetEndpointId(gCurrentEndpointId); - ret = - emberAfSetDynamicEndpoint(index, gCurrentEndpointId, dev->endpointType(), dev->versions(), dev->deviceTypes()); - if (ret == EMBER_ZCL_STATUS_SUCCESS) - { - ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(), - gCurrentEndpointId, index); - return index; - } - if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS) - { - ChipLogProgress(DeviceLayer, "Failed to add dynamic endpoint: %d!", ret); - gDevices[index] = nullptr; - return -1; - } - // Handle wrap condition - if (++gCurrentEndpointId < gFirstDynamicEndpointId) - { - gCurrentEndpointId = gFirstDynamicEndpointId; - } - } - } - index++; - } - ChipLogProgress(DeviceLayer, "Failed to add dynamic endpoint: No endpoints available!"); - return -1; -} - -int RemoveDeviceEndpoint(Device * dev) -{ - uint8_t index = 0; - while (index < CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT) - { - if (gDevices[index] == dev) - { - // Todo: Update this to schedule the work rather than use this lock - DeviceLayer::StackLock lock; - EndpointId ep = emberAfClearDynamicEndpoint(index); - gDevices[index] = nullptr; - ChipLogProgress(DeviceLayer, "Removed device %s from dynamic endpoint %d (index=%d)", dev->GetName(), ep, index); - // Silence complaints about unused ep when progress logging - // disabled. - UNUSED_VAR(ep); - return index; - } - index++; - } - return -1; -} - -Room * FindRoom(const std::string & name) -{ - for (auto & room : gRooms) - { - if (room.GetName() == name) - { - return &room; - } - } - return nullptr; -} - -chip::Span GetActionListInfo(chip::EndpointId parentId) -{ - return chip::Span(); -} - -void ApplicationInit() -{ -#ifdef PW_RPC_ENABLED - chip::rpc::Init(); - - pw::rpc::system_server::Server().RegisterService(bridge_service); -#endif - - gFirstDynamicEndpointId = static_cast( - static_cast(emberAfEndpointFromIndex(static_cast(emberAfFixedEndpointCount() - 1))) + 1); - gCurrentEndpointId = gFirstDynamicEndpointId; - StartUserInput(); -} - -int main(int argc, char * argv[]) -{ - VerifyOrDie(ChipLinuxAppInit(argc, argv) == 0); - - std::vector clusterAccess; - clusterAccess.reserve(std::extent::value); - for (auto & entry : clusters::kKnownClusters) - { - // Desciptor clusters should not be overridden. - if (entry.id != chip::app::Clusters::Descriptor::Id) - { - clusterAccess.emplace_back(chip::Optional(), entry.id); - registerAttributeAccessOverride(&clusterAccess.back()); - } - } - - ChipLinuxAppMainLoop(); - return 0; -} diff --git a/examples/dynamic-bridge-app/linux/third_party/connectedhomeip b/examples/dynamic-bridge-app/linux/third_party/connectedhomeip deleted file mode 120000 index 11a54ed360106c..00000000000000 --- a/examples/dynamic-bridge-app/linux/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../../ \ No newline at end of file diff --git a/examples/dynamic-bridge-app/linux/with_pw_rpc.gni b/examples/dynamic-bridge-app/linux/with_pw_rpc.gni deleted file mode 100644 index 6d90e3da2c7ac7..00000000000000 --- a/examples/dynamic-bridge-app/linux/with_pw_rpc.gni +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# add this gni as import in your build args to use pigweed in the example -# 'import("//with_pw_rpc.gni")' - -import("//build_overrides/chip.gni") - -import("${chip_root}/config/standalone/args.gni") - -import("//build_overrides/pigweed.gni") - -cpp_standard = "gnu++17" - -pw_log_BACKEND = "$dir_pw_log_basic" -pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" -pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio" -pw_trace_BACKEND = "$dir_pw_trace_tokenized" -pw_unit_test_MAIN = "$dir_pw_unit_test:logging_main" -pw_rpc_system_server_BACKEND = "${chip_root}/config/linux/lib/pw_rpc:pw_rpc" -dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo" -pw_chrono_SYSTEM_CLOCK_BACKEND = "$dir_pw_chrono_stl:system_clock" -pw_sync_MUTEX_BACKEND = "$dir_pw_sync_stl:mutex_backend" -pw_thread_YIELD_BACKEND = "$dir_pw_thread_stl:yield" -pw_thread_SLEEP_BACKEND = "$dir_pw_thread_stl:sleep" - -pw_build_LINK_DEPS = [ - "$dir_pw_assert:impl", - "$dir_pw_log:impl", -] - -chip_enable_pw_rpc = true -chip_build_pw_trace_lib = true -chip_use_pw_logging = true diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index fdc77e8a58aae1..38430a4d3016ad 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -101,7 +101,6 @@ steps: --target linux-arm64-chip-tool-ipv6only-clang --target linux-arm64-chip-tool-nodeps --target linux-arm64-chip-tool-nodeps-ipv6only - --target linux-arm64-dynamic-bridge-ipv6only-clang --target linux-arm64-light-clang --target linux-arm64-light-ipv6only-clang --target linux-arm64-light-rpc-clang @@ -131,7 +130,6 @@ steps: --target linux-x64-chip-tool-coverage --target linux-x64-chip-tool-nodeps-ipv6only --target linux-x64-chip-tool-nodeps-ipv6only-minmdns-verbose - --target linux-x64-dynamic-bridge-ipv6only --target linux-x64-efr32-test-runner --target linux-x64-light-rpc-ipv6only --target linux-x64-light-rpc-ipv6only-minmdns-verbose diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 5c1d09c5f555ad..e951a4d9b23cb4 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -99,7 +99,6 @@ steps: --target linux-arm64-bridge-ipv6only-clang --target linux-arm64-chip-tool-ipv6only-clang --target linux-arm64-chip-tool-nodeps-ipv6only - --target linux-arm64-dynamic-bridge-ipv6only-clang --target linux-arm64-light-clang-rpc-ipv6only --target linux-arm64-light-clang-rpc-ipv6only-minmdns-verbose --target linux-arm64-lock-ipv6only-clang @@ -119,7 +118,6 @@ steps: --target linux-x64-chip-tool-ipv6only --target linux-x64-chip-tool-ipv6only-minmdns-verbose --target linux-x64-contact-sensor-no-ble-with-ui - --target linux-x64-dynamic-bridge-ipv6only --target linux-x64-efr32-test-runner --target linux-x64-light-no-ble-with-ui --target linux-x64-light-rpc-ipv6only diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index 5104ced2d0fff7..d2024c46209733 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -64,14 +64,19 @@ def BuildHostFakeTarget(): TargetPart('tests', app=HostApp.TESTS), ]) - target.AppendModifier("mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') - target.AppendModifier("boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') + target.AppendModifier( + "mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') + target.AppendModifier( + "boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') target.AppendModifier("asan", use_asan=True).ExceptIfRe("-tsan") target.AppendModifier("tsan", use_tsan=True).ExceptIfRe("-asan") target.AppendModifier("ubsan", use_ubsan=True) - target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe("-clang").ExceptIfRe('-ossfuzz') - target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe("-clang").ExceptIfRe('-libfuzzer') - target.AppendModifier('coverage', use_coverage=True).OnlyIfRe('-(chip-tool|all-clusters)') + target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe( + "-clang").ExceptIfRe('-ossfuzz') + target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe( + "-clang").ExceptIfRe('-libfuzzer') + target.AppendModifier('coverage', use_coverage=True).OnlyIfRe( + '-(chip-tool|all-clusters)') target.AppendModifier('dmalloc', use_dmalloc=True) target.AppendModifier('clang', use_clang=True) @@ -80,7 +85,8 @@ def BuildHostFakeTarget(): def BuildHostTarget(): native_board_name = HostBoard.NATIVE.BoardName() - cross_compile = (HostBoard.NATIVE.PlatformName() == 'linux') and (native_board_name != HostBoard.ARM64.BoardName()) + cross_compile = (HostBoard.NATIVE.PlatformName() == 'linux') and ( + native_board_name != HostBoard.ARM64.BoardName()) target = BuildTarget(HostBoard.NATIVE.PlatformName(), HostBuilder) @@ -89,31 +95,36 @@ def BuildHostTarget(): ] if cross_compile: - board_parts.append(TargetPart('arm64', board=HostBoard.ARM64).OnlyIfRe('-(clang|nodeps)')) + board_parts.append(TargetPart( + 'arm64', board=HostBoard.ARM64).OnlyIfRe('-(clang|nodeps)')) target.AppendFixedTargets(board_parts) # Add all the applications app_parts = [ - TargetPart('rpc-console', app=HostApp.RPC_CONSOLE).OnlyIfRe(f'{native_board_name}-'), + TargetPart('rpc-console', + app=HostApp.RPC_CONSOLE).OnlyIfRe(f'{native_board_name}-'), TargetPart('all-clusters', app=HostApp.ALL_CLUSTERS), TargetPart('all-clusters-minimal', app=HostApp.ALL_CLUSTERS_MINIMAL), TargetPart('chip-tool', app=HostApp.CHIP_TOOL), TargetPart('thermostat', app=HostApp.THERMOSTAT), - TargetPart('java-matter-controller', app=HostApp.JAVA_MATTER_CONTROLLER), + TargetPart('java-matter-controller', + app=HostApp.JAVA_MATTER_CONTROLLER), TargetPart('minmdns', app=HostApp.MIN_MDNS), TargetPart('light', app=HostApp.LIGHT), TargetPart('lock', app=HostApp.LOCK), TargetPart('shell', app=HostApp.SHELL), TargetPart('ota-provider', app=HostApp.OTA_PROVIDER, enable_ble=False), - TargetPart('ota-requestor', app=HostApp.OTA_REQUESTOR, enable_ble=False), - TargetPart('simulated-app1', app=HostApp.SIMULATED_APP1, enable_ble=False), - TargetPart('simulated-app2', app=HostApp.SIMULATED_APP2, enable_ble=False), + TargetPart('ota-requestor', app=HostApp.OTA_REQUESTOR, + enable_ble=False), + TargetPart('simulated-app1', app=HostApp.SIMULATED_APP1, + enable_ble=False), + TargetPart('simulated-app2', app=HostApp.SIMULATED_APP2, + enable_ble=False), TargetPart('python-bindings', app=HostApp.PYTHON_BINDINGS), TargetPart('tv-app', app=HostApp.TV_APP), TargetPart('tv-casting-app', app=HostApp.TV_CASTING), TargetPart('bridge', app=HostApp.BRIDGE), - TargetPart('dynamic-bridge', app=HostApp.DYNAMIC_BRIDGE), TargetPart('tests', app=HostApp.TESTS), TargetPart('chip-cert', app=HostApp.CERT_TOOL), TargetPart('address-resolve-tool', app=HostApp.ADDRESS_RESOLVE), @@ -121,7 +132,8 @@ def BuildHostTarget(): ] if (HostBoard.NATIVE.PlatformName() == 'darwin'): - app_parts.append(TargetPart('darwin-framework-tool', app=HostApp.CHIP_TOOL_DARWIN)) + app_parts.append(TargetPart('darwin-framework-tool', + app=HostApp.CHIP_TOOL_DARWIN)) target.AppendFixedTargets(app_parts) @@ -131,20 +143,27 @@ def BuildHostTarget(): target.AppendModifier('platform-mdns', use_platform_mdns=True) target.AppendModifier('minmdns-verbose', minmdns_high_verbosity=True) target.AppendModifier('libnl', minmdns_address_policy="libnl") - target.AppendModifier('same-event-loop', separate_event_loop=False).OnlyIfRe('-(chip-tool|darwin-framework-tool)') - target.AppendModifier('no-interactive', interactive_mode=False).OnlyIfRe('-chip-tool') + target.AppendModifier( + 'same-event-loop', separate_event_loop=False).OnlyIfRe('-(chip-tool|darwin-framework-tool)') + target.AppendModifier( + 'no-interactive', interactive_mode=False).OnlyIfRe('-chip-tool') target.AppendModifier("ipv6only", enable_ipv4=False) target.AppendModifier("no-ble", enable_ble=False) target.AppendModifier("no-wifi", enable_wifi=False) target.AppendModifier("no-thread", enable_thread=False) - target.AppendModifier("mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') - target.AppendModifier("boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') + target.AppendModifier( + "mbedtls", crypto_library=HostCryptoLibrary.MBEDTLS).ExceptIfRe('-boringssl') + target.AppendModifier( + "boringssl", crypto_library=HostCryptoLibrary.BORINGSSL).ExceptIfRe('-mbedtls') target.AppendModifier("asan", use_asan=True).ExceptIfRe("-tsan") target.AppendModifier("tsan", use_tsan=True).ExceptIfRe("-asan") target.AppendModifier("ubsan", use_ubsan=True) - target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe("-clang").ExceptIfRe('-ossfuzz') - target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe("-clang").ExceptIfRe('-libfuzzer') - target.AppendModifier('coverage', use_coverage=True).OnlyIfRe('-(chip-tool|all-clusters)') + target.AppendModifier("libfuzzer", fuzzing_type=HostFuzzingType.LIB_FUZZER).OnlyIfRe( + "-clang").ExceptIfRe('-ossfuzz') + target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe( + "-clang").ExceptIfRe('-libfuzzer') + target.AppendModifier('coverage', use_coverage=True).OnlyIfRe( + '-(chip-tool|all-clusters)') target.AppendModifier('dmalloc', use_dmalloc=True) target.AppendModifier('clang', use_clang=True) target.AppendModifier('test', extra_tests=True) @@ -175,7 +194,8 @@ def BuildEsp32Target(): TargetPart('light', app=Esp32App.LIGHT), TargetPart('lock', app=Esp32App.LOCK), TargetPart('bridge', app=Esp32App.BRIDGE), - TargetPart('temperature-measurement', app=Esp32App.TEMPERATURE_MEASUREMENT), + TargetPart('temperature-measurement', + app=Esp32App.TEMPERATURE_MEASUREMENT), TargetPart('ota-requestor', app=Esp32App.OTA_REQUESTOR), TargetPart('tests', app=Esp32App.TESTS).OnlyIfRe('-qemu-'), ]) @@ -220,16 +240,21 @@ def BuildEfr32Target(): target.AppendModifier('shell', chip_build_libshell=True) target.AppendModifier('no_logging', chip_logging=False) target.AppendModifier('openthread_mtd', chip_openthread_ftd=False) - target.AppendModifier('enable_heap_monitoring', enable_heap_monitoring=True) + target.AppendModifier('enable_heap_monitoring', + enable_heap_monitoring=True) target.AppendModifier('no_openthread_cli', enable_openthread_cli=False) - target.AppendModifier('show_qr_code', show_qr_code=True).ExceptIfRe('-low-power') + target.AppendModifier( + 'show_qr_code', show_qr_code=True).ExceptIfRe('-low-power') target.AppendModifier('wifi', enable_wifi=True) target.AppendModifier('rs911x', enable_rs911x=True).OnlyIfRe('-wifi') target.AppendModifier('wf200', enable_wf200=True).OnlyIfRe('-wifi') target.AppendModifier('wifi_ipv4', enable_wifi_ipv4=True).OnlyIfRe('-wifi') - target.AppendModifier('additional_data_advertising', enable_additional_data_advertising=True) - target.AppendModifier('use_ot_lib', enable_ot_lib=True).ExceptIfRe('-(wifi|use_ot_coap_lib)') - target.AppendModifier('use_ot_coap_lib', enable_ot_coap_lib=True).ExceptIfRe('-(wifi|use_ot_lib)') + target.AppendModifier('additional_data_advertising', + enable_additional_data_advertising=True) + target.AppendModifier('use_ot_lib', enable_ot_lib=True).ExceptIfRe( + '-(wifi|use_ot_coap_lib)') + target.AppendModifier('use_ot_coap_lib', enable_ot_coap_lib=True).ExceptIfRe( + '-(wifi|use_ot_lib)') target.AppendModifier('no-version', no_version=True) return target @@ -239,7 +264,8 @@ def BuildNrfNativeTarget(): target = BuildTarget('nrf', NrfConnectBuilder) target.AppendFixedTargets([ - TargetPart('native-posix-64-tests', board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS), + TargetPart('native-posix-64-tests', + board=NrfBoard.NATIVE_POSIX_64, app=NrfApp.UNIT_TESTS), ]) return target @@ -282,10 +308,14 @@ def BuildAndroidTarget(): TargetPart('arm64', board=AndroidBoard.ARM64), TargetPart('x86', board=AndroidBoard.X86), TargetPart('x64', board=AndroidBoard.X64), - TargetPart('androidstudio-arm', board=AndroidBoard.AndroidStudio_ARM).OnlyIfRe('chip-tool'), - TargetPart('androidstudio-arm64', board=AndroidBoard.AndroidStudio_ARM64).OnlyIfRe('chip-tool'), - TargetPart('androidstudio-x86', board=AndroidBoard.AndroidStudio_X86).OnlyIfRe('chip-tool'), - TargetPart('androidstudio-x64', board=AndroidBoard.AndroidStudio_X64).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-arm', + board=AndroidBoard.AndroidStudio_ARM).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-arm64', + board=AndroidBoard.AndroidStudio_ARM64).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-x86', + board=AndroidBoard.AndroidStudio_X86).OnlyIfRe('chip-tool'), + TargetPart('androidstudio-x64', + board=AndroidBoard.AndroidStudio_X64).OnlyIfRe('chip-tool'), ]) # apps @@ -294,7 +324,8 @@ def BuildAndroidTarget(): TargetPart('chip-test', app=AndroidApp.CHIP_TEST), TargetPart('tv-server', app=AndroidApp.TV_SERVER), TargetPart('tv-casting-app', app=AndroidApp.TV_CASTING_APP), - TargetPart('java-matter-controller', app=AndroidApp.JAVA_MATTER_CONTROLLER), + TargetPart('java-matter-controller', + app=AndroidApp.JAVA_MATTER_CONTROLLER), ]) # Modifiers @@ -322,9 +353,12 @@ def BuildMbedTarget(): ]) # Modifiers - target.AppendModifier('release', profile=MbedProfile.RELEASE).ExceptIfRe('-(develop|debug)') - target.AppendModifier('develop', profile=MbedProfile.DEVELOP).ExceptIfRe('-(release|debug)') - target.AppendModifier('debug', profile=MbedProfile.DEBUG).ExceptIfRe('-(release|develop)') + target.AppendModifier('release', profile=MbedProfile.RELEASE).ExceptIfRe( + '-(develop|debug)') + target.AppendModifier('develop', profile=MbedProfile.DEVELOP).ExceptIfRe( + '-(release|debug)') + target.AppendModifier('debug', profile=MbedProfile.DEBUG).ExceptIfRe( + '-(release|develop)') return target @@ -342,7 +376,8 @@ def BuildInfineonTarget(): TargetPart('lock', app=InfineonApp.LOCK), TargetPart('light', app=InfineonApp.LIGHT), TargetPart('all-clusters', app=InfineonApp.ALL_CLUSTERS), - TargetPart('all-clusters-minimal', app=InfineonApp.ALL_CLUSTERS_MINIMAL), + TargetPart('all-clusters-minimal', + app=InfineonApp.ALL_CLUSTERS_MINIMAL), ]) # modifiers @@ -411,7 +446,8 @@ def BuildK32WTarget(): target.AppendModifier(name="low-power", low_power=True).OnlyIfRe("-nologs") target.AppendModifier(name="nologs", disable_logs=True) target.AppendModifier(name="crypto-platform", crypto_platform=True) - target.AppendModifier(name="tokenizer", tokenizer=True).ExceptIfRe("-nologs") + target.AppendModifier( + name="tokenizer", tokenizer=True).ExceptIfRe("-nologs") return target @@ -448,7 +484,8 @@ def BuildCC13x4Target(): TargetPart('lighting', app=TIApp.LIGHTING), TargetPart('lock', app=TIApp.LOCK, openthread_ftd=True), TargetPart('pump', app=TIApp.PUMP, openthread_ftd=False), - TargetPart('pump-controller', app=TIApp.PUMP_CONTROLLER, openthread_ftd=False), + TargetPart('pump-controller', app=TIApp.PUMP_CONTROLLER, + openthread_ftd=False), ]) target.AppendModifier(name="mtd", openthread_ftd=False) @@ -537,12 +574,18 @@ def BuildBouffalolabTarget(): # Boards target.AppendFixedTargets([ - TargetPart('BL602-IoT-Matter-V1', board=BouffalolabBoard.BL602_IoT_Matter_V1, module_type="BL602"), - TargetPart('BL602-IOT-DVK-3S', board=BouffalolabBoard.BL602_IOT_DVK_3S, module_type="BL602"), - TargetPart('BL602-NIGHT-LIGHT', board=BouffalolabBoard.BL602_NIGHT_LIGHT, module_type="BL602"), - TargetPart('XT-ZB6-DevKit', board=BouffalolabBoard.XT_ZB6_DevKit, module_type="BL706C-22"), - TargetPart('BL706-IoT-DVK', board=BouffalolabBoard.BL706_IoT_DVK, module_type="BL706C-22"), - TargetPart('BL706-NIGHT-LIGHT', board=BouffalolabBoard.BL706_NIGHT_LIGHT, module_type="BL706C-22"), + TargetPart('BL602-IoT-Matter-V1', + board=BouffalolabBoard.BL602_IoT_Matter_V1, module_type="BL602"), + TargetPart('BL602-IOT-DVK-3S', + board=BouffalolabBoard.BL602_IOT_DVK_3S, module_type="BL602"), + TargetPart('BL602-NIGHT-LIGHT', + board=BouffalolabBoard.BL602_NIGHT_LIGHT, module_type="BL602"), + TargetPart('XT-ZB6-DevKit', board=BouffalolabBoard.XT_ZB6_DevKit, + module_type="BL706C-22"), + TargetPart('BL706-IoT-DVK', board=BouffalolabBoard.BL706_IoT_DVK, + module_type="BL706C-22"), + TargetPart('BL706-NIGHT-LIGHT', + board=BouffalolabBoard.BL706_NIGHT_LIGHT, module_type="BL706C-22"), ]) # Apps @@ -566,7 +609,8 @@ def BuildIMXTarget(): TargetPart('lighting-app', app=IMXApp.LIGHT), TargetPart('thermostat', app=IMXApp.THERMOSTAT), TargetPart('all-clusters-app', app=IMXApp.ALL_CLUSTERS), - TargetPart('all-clusters-minimal-app', app=IMXApp.ALL_CLUSTERS_MINIMAL), + TargetPart('all-clusters-minimal-app', + app=IMXApp.ALL_CLUSTERS_MINIMAL), TargetPart('ota-provider-app', app=IMXApp.OTA_PROVIDER), ]) @@ -577,7 +621,8 @@ def BuildIMXTarget(): def BuildMW320Target(): target = BuildTarget('mw320', MW320Builder) - target.AppendFixedTargets([TargetPart('all-clusters-app', app=MW320App.ALL_CLUSTERS)]) + target.AppendFixedTargets( + [TargetPart('all-clusters-app', app=MW320App.ALL_CLUSTERS)]) return target @@ -589,7 +634,8 @@ def BuildGenioTarget(): def BuildTelinkTarget(): target = BuildTarget('telink', TelinkBuilder) - target.AppendFixedTargets([TargetPart('tlsr9518adk80d', board=TelinkBoard.TLSR9518ADK80D)]) + target.AppendFixedTargets( + [TargetPart('tlsr9518adk80d', board=TelinkBoard.TLSR9518ADK80D)]) target.AppendFixedTargets([ TargetPart('all-clusters', app=TelinkApp.ALL_CLUSTERS), @@ -602,7 +648,8 @@ def BuildTelinkTarget(): TargetPart('ota-requestor', app=TelinkApp.OTA_REQUESTOR), TargetPart('pump', app=TelinkApp.PUMP), TargetPart('pump-controller', app=TelinkApp.PUMP_CONTROLLER), - TargetPart('temperature-measurement', app=TelinkApp.TEMPERATURE_MEASUREMENT), + TargetPart('temperature-measurement', + app=TelinkApp.TEMPERATURE_MEASUREMENT), TargetPart('thermostat', app=TelinkApp.THERMOSTAT), TargetPart('window-covering', app=TelinkApp.WINDOW_COVERING), ]) diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 4ee845ea7fd969..80b86765877b3b 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -66,7 +66,6 @@ class HostApp(Enum): EFR32_TEST_RUNNER = auto() TV_CASTING = auto() BRIDGE = auto() - DYNAMIC_BRIDGE = auto() JAVA_MATTER_CONTROLLER = auto() CONTACT_SENSOR = auto() @@ -109,8 +108,6 @@ def ExamplePath(self): return 'tv-casting-app/linux' elif self == HostApp.BRIDGE: return 'bridge-app/linux' - elif self == HostApp.DYNAMIC_BRIDGE: - return 'dynamic-bridge-app/linux' elif self == HostApp.JAVA_MATTER_CONTROLLER: return 'java-matter-controller' elif self == HostApp.CONTACT_SENSOR: @@ -188,9 +185,6 @@ def OutputNames(self): elif self == HostApp.BRIDGE: yield 'chip-bridge-app' yield 'chip-bridge-app.map' - elif self == HostApp.DYNAMIC_BRIDGE: - yield 'dynamic-chip-bridge-app' - yield 'dynamic-chip-bridge-app.map' elif self == HostApp.JAVA_MATTER_CONTROLLER: yield 'java-matter-controller' yield 'java-matter-controller.map' diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 5d462bfad9b35d..821e9a84f04bc7 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -10,7 +10,7 @@ efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,b esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,dynamic-bridge,tests,chip-cert,address-resolve-tool,contact-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,minmdns,light,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,tests,chip-cert,address-resolve-tool,contact-sensor}[-nodeps][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage] diff --git a/scripts/pregenerate/__init__.py b/scripts/pregenerate/__init__.py index 8cdf56719f28a6..53c1e658176b19 100644 --- a/scripts/pregenerate/__init__.py +++ b/scripts/pregenerate/__init__.py @@ -20,8 +20,7 @@ from typing import Iterator, List, Optional from .types import IdlFileType, InputIdlFile -from .using_codegen import (CodegenBridgePregenerator, CodegenCppAppPregenerator, CodegenJavaClassPregenerator, - CodegenJavaJNIPregenerator) +from .using_codegen import CodegenCppAppPregenerator, CodegenJavaClassPregenerator, CodegenJavaJNIPregenerator from .using_zap import ZapApplicationPregenerator @@ -92,7 +91,6 @@ def FindPregenerationTargets(sdk_root: str, external_roots: Optional[List[str]], generators = [ # Jinja-based codegen - CodegenBridgePregenerator(sdk_root), CodegenJavaJNIPregenerator(sdk_root), CodegenJavaClassPregenerator(sdk_root), CodegenCppAppPregenerator(sdk_root), diff --git a/scripts/pregenerate/using_codegen.py b/scripts/pregenerate/using_codegen.py index 13e5b71b388661..5d790d808d40b6 100644 --- a/scripts/pregenerate/using_codegen.py +++ b/scripts/pregenerate/using_codegen.py @@ -58,21 +58,6 @@ def Generate(self, output_root: str): self.runner.run(cmd) -class CodegenBridgePregenerator: - """Pregeneration logic for "bridge" codegen.py outputs""" - - def __init__(self, sdk_root): - self.sdk_root = sdk_root - - def Accept(self, idl: InputIdlFile): - # Bridge is highly specific, a single path is acceptable for dynamic - # bridge codegen - return idl.relative_path == "examples/dynamic-bridge-app/bridge-common/bridge-app.matter" - - def CreateTarget(self, idl: InputIdlFile, runner): - return CodegenTarget(sdk_root=self.sdk_root, idl=idl, generator="bridge", runner=runner) - - class CodegenJavaJNIPregenerator: """Pregeneration logic for "java" codegen.py outputs""" diff --git a/scripts/py_matter_idl/BUILD.gn b/scripts/py_matter_idl/BUILD.gn index 06bdb3da4a673b..bd1975afe3b4c0 100644 --- a/scripts/py_matter_idl/BUILD.gn +++ b/scripts/py_matter_idl/BUILD.gn @@ -38,21 +38,12 @@ pw_python_package("matter_idl") { "matter_idl/tests/inputs/optional_argument.matter", "matter_idl/tests/inputs/several_clusters.matter", "matter_idl/tests/inputs/simple_attribute.matter", - "matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h", "matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/cluster_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h", "matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/global_struct_attribute/jni/DemoClusterClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/optional_argument/jni/MyClusterClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h", - "matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h", - "matter_idl/tests/outputs/several_clusters/bridge/Third.h", - "matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h", "matter_idl/tests/outputs/several_clusters/java/ClusterIDMapping.java", "matter_idl/tests/outputs/several_clusters/java/ClusterWriteMapping.java", "matter_idl/tests/outputs/several_clusters/jni/FirstClient-ReadImpl.cpp", @@ -61,8 +52,6 @@ pw_python_package("matter_idl") { "matter_idl/tests/outputs/several_clusters/jni/FirstClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/several_clusters/jni/SecondClient-InvokeSubscribeImpl.cpp", "matter_idl/tests/outputs/several_clusters/jni/ThirdClient-InvokeSubscribeImpl.cpp", - "matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h", - "matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h", "matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-ReadImpl.cpp", "matter_idl/tests/outputs/simple_attribute/jni/MyClusterClient-InvokeSubscribeImpl.cpp", ] diff --git a/scripts/py_matter_idl/files.gni b/scripts/py_matter_idl/files.gni index 986b1953377b43..0118c1aa7a3909 100644 --- a/scripts/py_matter_idl/files.gni +++ b/scripts/py_matter_idl/files.gni @@ -3,9 +3,6 @@ import("//build_overrides/chip.gni") # Templates used for generation matter_idl_generator_templates = [ - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersCpp.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ChipClustersRead.jinja", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/ClusterWriteMapping.jinja", @@ -17,7 +14,6 @@ matter_idl_generator_templates = [ matter_idl_generator_sources = [ "${chip_root}/scripts/py_matter_idl/matter_idl/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/__init__.py", - "${chip_root}/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/cpp/application/__init__.py", "${chip_root}/scripts/py_matter_idl/matter_idl/generators/filters.py", diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja deleted file mode 100644 index 9313cb4dffbba7..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCommon.jinja +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include - -{%- for cluster in clusters %} -{%- if cluster | dynamicCluster(idl) %} -#include "bridge/{{cluster.name}}.h" -{%- endif %} -{%- endfor %} - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { -{% for cluster in clusters %} -{%- if cluster | dynamicCluster(idl) %} - { - {{cluster.code}}, - "{{cluster.name}}", - sizeof({{cluster.name}}Cluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) {{cluster.name}}Cluster(); - }, - }, -{%- endif %} -{%- endfor %} -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja deleted file mode 100644 index 4a6514bed3e421..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersCpp.jinja +++ /dev/null @@ -1,86 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct {{cluster.name}}Cluster : public GeneratedCluster -{ - {%- for struct in cluster.structs %} - {%- if struct.tag == None %} - struct {{struct.name}} - { - CHIP_ERROR Decode(chip::TLV::TLVReader & reader) - { - chip::app::Clusters::{{cluster.name}}::Structs::{{struct.name}}::DecodableType t; - CHIP_ERROR err = t.Decode(reader); - if(err == CHIP_NO_ERROR) { - {%- for field in struct.fields %} - {{field.name}} = t.{{field.name}}; - {%- endfor %} - } - return err; - } - - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const - { - chip::app::Clusters::{{cluster.name}}::Structs::{{struct.name}}::Type t; - {%- for field in struct.fields %} - t.{{field.name}} = {{field.name}}; - {%- endfor %} - return t.Encode(writer, tag); - } - - static constexpr bool kIsFabricScoped = false; - - {%- for field in struct.fields %} - {{field | getField(cluster, idl)}} {{field.name}}; - {%- endfor %} - }; - {%- endif %} - {%- endfor %} - - {{cluster.name}}Cluster() : - {%- for attr in cluster.attributes %} - m{{attr.definition.name | capitalcase}}(chip::CharSpan("{{attr.definition.name}}"), {{attr.definition.code}}, {{attr | getMask(cluster, idl)}} | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), {{attr | getRawSizeAndType(cluster, idl)}}{{attr | getInit(cluster, idl)}}){{"," if not loop.last}} - {%- endfor %} - { - } - - static constexpr uint32_t kClusterId ={{cluster.code}}; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - {%- for attr in cluster.attributes %} - static_cast(&m{{attr.definition.name | capitalcase}}), - {%- endfor %} - }); - } - -{% for attr in cluster.attributes %} - {{"List" if attr.definition.is_list}}Attribute<{{attr | getType(cluster, idl)}}> m{{attr.definition.name | capitalcase}}; -{%- endfor %} - -{%- if cluster.commands | length > 0 %} - static const chip::CommandId mIncomingCommandList[]; - const chip::CommandId * GetIncomingCommandList() override - { - return mIncomingCommandList; - } -{%- endif %} -}; - -{%- if cluster.commands | length > 0 %} -#ifndef {{cluster.name | constcase}}_CLUSTER_INCOMING_COMMANDS -#define {{cluster.name | constcase}}_CLUSTER_INCOMING_COMMANDS -const chip::CommandId {{cluster.name}}Cluster::mIncomingCommandList[] = { -{%- for command in cluster.commands %} - {{command.code}}, -{%- endfor %} - chip::kInvalidCommandId -}; -#endif -{%- endif %} - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja deleted file mode 100644 index 548f8af5fc71e7..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersGlobalStructs.jinja +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include -#include - -#include -#include - -namespace clusters { - -{% for struct in structs %} -struct {{struct.name}} -{ - CHIP_ERROR Decode(chip::TLV::TLVReader & reader) - { - chip::app::Clusters::detail::Structs::{{struct.name}}::DecodableType t; - CHIP_ERROR err = t.Decode(reader); - if(err == CHIP_NO_ERROR) { - {%- for field in struct.fields %} - chip::Value::Assign({{field.name}}, t.{{field.name}}); - {%- endfor %} - } - return err; - } - - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const - { - chip::app::Clusters::detail::Structs::{{struct.name}}::Type t; - {%- for field in struct.fields %} - chip::Value::Assign(t.{{field.name}}, {{field.name}}); - {%- endfor %} - return t.Encode(writer, tag); - } - - {%- for field in struct.fields %} - {{field | getField(None, idl)}} {{field.name}}; - {%- endfor %} -}; -{%- endfor %} - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja b/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja deleted file mode 100644 index 452cdb845916a6..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/BridgeClustersHeader.jinja +++ /dev/null @@ -1,62 +0,0 @@ -#include - -namespace clusters { - -{%- for cluster in clusters %} -{%- if cluster | dynamicCluster(idl) %} -struct {{cluster.name}}Cluster : public CommonCluster -{ - {%- for struct in cluster.structs %} - {%- if struct.tag == None %} - struct {{struct.name}} - { - CHIP_ERROR Decode(chip::TLV::TLVReader & reader); - CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const; - - {%- for field in struct.fields %} - {{field | getField(cluster, idl)}} {{field.name}}; - {%- endfor %} - }; - {%- endif %} - {%- endfor %} - - static constexpr chip::ClusterId kClusterId = {{cluster.code}}; - - chip::ClusterId GetClusterId() override { return kClusterId; } - - CHIP_ERROR WriteFromBridge(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - - template - void AddAllAttributes(T *list) - { - {%- for attr in cluster.attributes %} - list->Add(m{{attr.definition.name | capitalcase}}); - {%- endfor %} - } - - chip::Span GetAllAttributes() override; - -{% for attr in cluster.attributes %} - Attribute<{{attr.definition.code}}, {{attr | getMask(cluster, idl)}}, {{attr | getType(cluster, idl)}}> m{{attr.definition.name | capitalcase}}{{attr | getInit(cluster, idl)}}; -{%- endfor %} -}; - -struct {{cluster.name}}Access : public CommonAttributeAccessInterface -{ - {{cluster.name}}Access(); - - {{cluster.name}}Cluster* GetCluster(const chip::app::ConcreteClusterPath & aPath) - { - CommonCluster * cluster = FindCluster(aPath); - return cluster ? static_cast<{{cluster.name}}Cluster*>(cluster) : nullptr; - } - - CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & aPath, chip::app::AttributeValueEncoder & aEncoder) override; - CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & aPath, chip::app::AttributeValueDecoder & aDecoder) override; - void OnListWriteBegin(const chip::app::ConcreteAttributePath & aPath) override; - void OnListWriteEnd(const chip::app::ConcreteAttributePath & aPath, bool aWriteWasSuccessful) override; -}; -{%- endif %} -{%- endfor %} - -} diff --git a/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py b/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py deleted file mode 100644 index ef6f812de35def..00000000000000 --- a/scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py +++ /dev/null @@ -1,181 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2022 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os -import re -from typing import Tuple, Union - -from matter_idl.generators import CodeGenerator, GeneratorStorage -from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType, - ParseDataType, TypeLookupContext) -from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Field, Idl - - -def camel_to_const(s): - return re.sub("([a-z])([A-Z])", lambda y: y.group(1) + "_" + y.group(2), s).upper() - - -def create_lookup_context(idl: Idl, cluster: Cluster) -> TypeLookupContext: - """ - A filter to mark a lookup context to be within a specific cluster. - - This is used to specify how structure/enum/other names are looked up. - Generally one looks up within the specific cluster then if cluster does - not contain a definition, we loop at global namespacing. - """ - return TypeLookupContext(idl, cluster) - - -def get_field_info(definition: Field, cluster: Cluster, idl: Idl) -> Tuple[str, str, Union[str, int, None], str]: - context = create_lookup_context(idl, cluster) - actual = ParseDataType(definition.data_type, context) - - if isinstance(actual, (IdlEnumType, IdlBitmapType)): - actual = actual.base_type - - if isinstance(actual, BasicString): - return 'OctetString', 'char', actual.max_length, \ - 'ZCL_%s_ATTRIBUTE_TYPE' % actual.idl_name.upper() - - if isinstance(actual, BasicInteger): - name = actual.idl_name.upper() - ty = "int%d_t" % actual.power_of_two_bits - if not actual.is_signed: - ty = "u" + ty - return "", ty, actual.byte_count, "ZCL_%s_ATTRIBUTE_TYPE" % name - if isinstance(actual, FundamentalType): - if actual == FundamentalType.BOOL: - return "", "bool", 1, "ZCL_BOOLEAN_ATTRIBUTE_TYPE" - elif actual == FundamentalType.FLOAT: - return "", "float", 4, "ZCL_SINGLE_ATTRIBUTE_TYPE" - elif actual == FundamentalType.DOUBLE: - return "", "double", 8, "ZCL_DOUBLE_ATTRIBUTE_TYPE" - else: - raise Exception('Unknown fundamental type: %r' % actual) - if isinstance(actual, IdlType): - return '', actual.idl_name, 'sizeof(%s)' % actual.idl_name, \ - 'ZCL_STRUCT_ATTRIBUTE_TYPE' - raise Exception('UNKNOWN TYPE: %s' % actual) - - -def get_raw_size_and_type(attr: Attribute, cluster: Cluster, idl: Idl) -> str: - container, cType, size, matterType = get_field_info( - attr.definition, cluster, idl) - if attr.definition.is_list: - return 'ZCL_ARRAY_ATTRIBUTE_TYPE, {}'.format(size) - return '{}, {}'.format(matterType, size) - - -def get_field_type(definition: Field, cluster: Cluster, idl: Idl): - container, cType, size, matterType = get_field_info( - definition, cluster, idl) - if container == 'OctetString': - return 'std::string' - if definition.is_list: - cType = 'std::vector<{}>'.format(cType) - if definition.is_nullable: - cType = '::chip::app::DataModel::Nullable<{}>'.format(cType) - if definition.is_optional: - cType = '::chip::Optional<{}>'.format(cType) - return cType - - -def get_attr_type(attr: Attribute, cluster: Cluster, idl: Idl): - return get_field_type(attr.definition, cluster, idl) - - -def get_attr_init(attr: Attribute, cluster: Cluster, idl: Idl): - if attr.definition.name == 'clusterRevision': - return ', ZCL_' + camel_to_const(cluster.name) + '_CLUSTER_REVISION' - return '' - - -def get_attr_mask(attr: Attribute, cluster: Cluster, idl: Idl): - masks = [] - if attr.is_writable: - masks.append('ATTRIBUTE_MASK_WRITABLE') - if masks: - return ' | '.join(masks) - return '0' - - -def get_dynamic_endpoint(idl: Idl): - for ep in idl.endpoints: - if ep.number == 2: - return ep - - -def is_dynamic_cluster(cluster: Cluster, idl: Idl): - ep = get_dynamic_endpoint(idl) - if not ep: - return True - for c in ep.server_clusters: - if cluster.name == c.name: - return True - return False - - -class BridgeGenerator(CodeGenerator): - """ - Generation of bridge cpp code for matter. - """ - - def __init__(self, storage: GeneratorStorage, idl: Idl, **kargs): - """ - Inintialization is specific for cpp generation and will add - filters as required by the cpp .jinja templates to function. - """ - super().__init__(storage, idl, fs_loader_searchpath=os.path.dirname(__file__)) - - self.jinja_env.filters['getType'] = get_attr_type - self.jinja_env.filters['getRawSizeAndType'] = get_raw_size_and_type - self.jinja_env.filters['getField'] = get_field_type - self.jinja_env.filters['getMask'] = get_attr_mask - self.jinja_env.filters['getInit'] = get_attr_init - self.jinja_env.filters['dynamicCluster'] = is_dynamic_cluster - # constcase will transform ID to I_D which is not what we want - # instead make the requirement a transition from lower to upper - self.jinja_env.filters['cameltoconst'] = camel_to_const - - def internal_render_all(self): - """ - Renders C++ - """ - for cluster in self.idl.clusters: - if not is_dynamic_cluster(cluster, self.idl): - continue - - if cluster.side != ClusterSide.SERVER: - output_file_name = "bridge/%sServer.h" % cluster.name - else: - output_file_name = "bridge/%s.h" % cluster.name - - self.internal_render_one_output( - template_path="BridgeClustersCpp.jinja", - output_file_name=output_file_name, - vars={ - 'cluster': cluster, - 'idl': self.idl, - } - ) - - self.internal_render_one_output( - template_path="BridgeClustersCommon.jinja", - output_file_name="bridge/BridgeClustersImpl.h", - vars={ - 'clusters': self.idl.clusters, - 'idl': self.idl, - } - ) diff --git a/scripts/py_matter_idl/matter_idl/generators/registry.py b/scripts/py_matter_idl/matter_idl/generators/registry.py index 8caf84c8fded9f..7f1e17bc4d05a7 100644 --- a/scripts/py_matter_idl/matter_idl/generators/registry.py +++ b/scripts/py_matter_idl/matter_idl/generators/registry.py @@ -15,7 +15,6 @@ import enum import importlib -from matter_idl.generators.bridge import BridgeGenerator from matter_idl.generators.cpp.application import CppApplicationGenerator from matter_idl.generators.java import JavaClassGenerator, JavaJNIGenerator @@ -28,7 +27,6 @@ class CodeGenerator(enum.Enum): """ JAVA_JNI = enum.auto() JAVA_CLASS = enum.auto() - BRIDGE = enum.auto() CPP_APPLICATION = enum.auto() CUSTOM = enum.auto() @@ -37,8 +35,6 @@ def Create(self, *args, **kargs): return JavaJNIGenerator(*args, **kargs) elif self == CodeGenerator.JAVA_CLASS: return JavaClassGenerator(*args, **kargs) - elif self == CodeGenerator.BRIDGE: - return BridgeGenerator(*args, **kargs) elif self == CodeGenerator.CPP_APPLICATION: return CppApplicationGenerator(*args, **kargs) elif self == CodeGenerator.CUSTOM: @@ -68,7 +64,6 @@ def FromString(name): GENERATORS = { 'java-jni': CodeGenerator.JAVA_JNI, 'java-class': CodeGenerator.JAVA_CLASS, - 'bridge': CodeGenerator.BRIDGE, 'cpp-app': CodeGenerator.CPP_APPLICATION, 'custom': CodeGenerator.CUSTOM, } diff --git a/scripts/py_matter_idl/matter_idl/test_generators.py b/scripts/py_matter_idl/matter_idl/test_generators.py index 5cb6729e19cb9b..146b6244de6cb2 100755 --- a/scripts/py_matter_idl/matter_idl/test_generators.py +++ b/scripts/py_matter_idl/matter_idl/test_generators.py @@ -31,7 +31,6 @@ from matter_idl.matter_idl_parser import CreateParser from matter_idl.generators import GeneratorStorage -from matter_idl.generators.bridge import BridgeGenerator from matter_idl.generators.cpp.application import CppApplicationGenerator from matter_idl.generators.java import JavaClassGenerator, JavaJNIGenerator from matter_idl.matter_idl_types import Idl @@ -120,8 +119,6 @@ def _create_generator(self, storage: GeneratorStorage, idl: Idl): return JavaJNIGenerator(storage, idl) if self.generator_name.lower() == 'java-class': return JavaClassGenerator(storage, idl) - if self.generator_name.lower() == 'bridge': - return BridgeGenerator(storage, idl) if self.generator_name.lower() == 'cpp-app': return CppApplicationGenerator(storage, idl) if self.generator_name.lower() == 'custom-example-proto': diff --git a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml index 7646b1d3d14a06..c16e97b5dba7d4 100644 --- a/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml +++ b/scripts/py_matter_idl/matter_idl/tests/available_tests.yaml @@ -51,30 +51,6 @@ java-class: java/chip/devicecontroller/ClusterReadMapping.java: outputs/several_clusters/java/ClusterReadMapping.java java/chip/devicecontroller/ClusterIDMapping.java: outputs/several_clusters/java/ClusterIDMapping.java -bridge: - inputs/simple_attribute.matter: - bridge/BridgeClustersImpl.h: outputs/simple_attribute/bridge/BridgeClustersImpl.h - bridge/MyClusterServer.h: outputs/simple_attribute/bridge/MyClusterServer.h - - inputs/global_struct_attribute.matter: - bridge/BridgeClustersImpl.h: outputs/global_struct_attribute/bridge/BridgeClustersImpl.h - bridge/DemoClusterServer.h: outputs/global_struct_attribute/bridge/DemoClusterServer.h - - inputs/cluster_struct_attribute.matter: - bridge/BridgeClustersImpl.h: outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h - bridge/DemoClusterServer.h: outputs/cluster_struct_attribute/bridge/DemoClusterServer.h - - inputs/several_clusters.matter: - bridge/BridgeClustersImpl.h: outputs/several_clusters/bridge/BridgeClustersImpl.h - bridge/FirstServer.h: outputs/several_clusters/bridge/FirstServer.h - bridge/SecondServer.h: outputs/several_clusters/bridge/SecondServer.h - bridge/ThirdServer.h: outputs/several_clusters/bridge/ThirdServer.h - bridge/Third.h: outputs/several_clusters/bridge/Third.h - - inputs/cluster_with_commands.matter: - bridge/BridgeClustersImpl.h: outputs/cluster_with_commands/bridge/BridgeClustersImpl.h - bridge/OnOff.h: outputs/cluster_with_commands/bridge/OnOff.h - cpp-app: inputs/several_clusters.matter: app/PluginApplicationCallbacks.h: outputs/several_clusters/cpp-app/PluginApplicationCallbacks.h diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h deleted file mode 100644 index 31cb340dd7e8a5..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/DemoCluster.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 10, - "DemoCluster", - sizeof(DemoClusterCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) DemoClusterCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h deleted file mode 100644 index b6abee142e78ce..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_struct_attribute/bridge/DemoClusterServer.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct DemoClusterCluster : public GeneratedCluster -{ - - DemoClusterCluster() : - mSingleFailSafe(chip::CharSpan("singleFailSafe"), 5, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_STRUCT_ATTRIBUTE_TYPE, sizeof(ArmFailSafeRequest)), - mArmFailsafes(chip::CharSpan("armFailsafes"), 100, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ARRAY_ATTRIBUTE_TYPE, sizeof(ArmFailSafeRequest)) - { - } - - static constexpr uint32_t kClusterId =10; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSingleFailSafe), - static_cast(&mArmFailsafes), - }); - } - - - Attribute mSingleFailSafe; - ListAttribute> mArmFailsafes; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h deleted file mode 100644 index 0484909c914739..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/OnOff.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 6, - "OnOff", - sizeof(OnOffCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) OnOffCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h b/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h deleted file mode 100644 index 383751db0cd325..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/cluster_with_commands/bridge/OnOff.h +++ /dev/null @@ -1,48 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct OnOffCluster : public GeneratedCluster -{ - - OnOffCluster() : - mOnOff(chip::CharSpan("onOff"), 0, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_BOOLEAN_ATTRIBUTE_TYPE, 1), - mFeatureMap(chip::CharSpan("featureMap"), 65532, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_BITMAP32_ATTRIBUTE_TYPE, 4), - mClusterRevision(chip::CharSpan("clusterRevision"), 65533, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2, ZCL_ON_OFF_CLUSTER_REVISION) - { - } - - static constexpr uint32_t kClusterId =6; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mOnOff), - static_cast(&mFeatureMap), - static_cast(&mClusterRevision), - }); - } - - - Attribute mOnOff; - Attribute mFeatureMap; - Attribute mClusterRevision; - static const chip::CommandId mIncomingCommandList[]; - const chip::CommandId * GetIncomingCommandList() override - { - return mIncomingCommandList; - } -}; -#ifndef ON_OFF_CLUSTER_INCOMING_COMMANDS -#define ON_OFF_CLUSTER_INCOMING_COMMANDS -const chip::CommandId OnOffCluster::mIncomingCommandList[] = { - 0, - 1, - 2, - chip::kInvalidCommandId -}; -#endif - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h deleted file mode 100644 index fb63878646d529..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/DemoCluster.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 18, - "DemoCluster", - sizeof(DemoClusterCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) DemoClusterCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h deleted file mode 100644 index a449dc374a0862..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/global_struct_attribute/bridge/DemoClusterServer.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct DemoClusterCluster : public GeneratedCluster -{ - - DemoClusterCluster() : - mSingleLabel(chip::CharSpan("singleLabel"), 32, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_STRUCT_ATTRIBUTE_TYPE, sizeof(LabelStruct)), - mSomeLabels(chip::CharSpan("someLabels"), 33, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ARRAY_ATTRIBUTE_TYPE, sizeof(LabelStruct)) - { - } - - static constexpr uint32_t kClusterId =18; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSingleLabel), - static_cast(&mSomeLabels), - }); - } - - - Attribute mSingleLabel; - ListAttribute> mSomeLabels; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h deleted file mode 100644 index e94ca747c56970..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#include -#include "bridge/First.h" -#include "bridge/Second.h" -#include "bridge/Third.h" -#include "bridge/Third.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 1, - "First", - sizeof(FirstCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) FirstCluster(); - }, - }, - { - 2, - "Second", - sizeof(SecondCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) SecondCluster(); - }, - }, - { - 3, - "Third", - sizeof(ThirdCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) ThirdCluster(); - }, - }, - { - 3, - "Third", - sizeof(ThirdCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) ThirdCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h deleted file mode 100644 index 5cb389e01564d1..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/FirstServer.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct FirstCluster : public GeneratedCluster -{ - - FirstCluster() : - mSomeInteger(chip::CharSpan("someInteger"), 1, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2) - { - } - - static constexpr uint32_t kClusterId =1; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeInteger), - }); - } - - - Attribute mSomeInteger; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h deleted file mode 100644 index a0d24591b94c62..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/SecondServer.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct SecondCluster : public GeneratedCluster -{ - - SecondCluster() : - mSomeBytes(chip::CharSpan("someBytes"), 123, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_OCTET_STRING_ATTRIBUTE_TYPE, 32) - { - } - - static constexpr uint32_t kClusterId =2; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeBytes), - }); - } - - - Attribute mSomeBytes; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h deleted file mode 100644 index 55344700f7814d..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/Third.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct ThirdCluster : public GeneratedCluster -{ - - ThirdCluster() : - mSomeEnum(chip::CharSpan("someEnum"), 10, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ENUM8_ATTRIBUTE_TYPE, 1), - mClusterRevision(chip::CharSpan("clusterRevision"), 65533, 0 | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2, ZCL_THIRD_CLUSTER_REVISION) - { - } - - static constexpr uint32_t kClusterId =3; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeEnum), - static_cast(&mClusterRevision), - }); - } - - - Attribute mSomeEnum; - Attribute mClusterRevision; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h deleted file mode 100644 index 67176424a52608..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/several_clusters/bridge/ThirdServer.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct ThirdCluster : public GeneratedCluster -{ - - ThirdCluster() : - mSomeEnum(chip::CharSpan("someEnum"), 10, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_ENUM8_ATTRIBUTE_TYPE, 1), - mOptions(chip::CharSpan("options"), 20, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_BITMAP8_ATTRIBUTE_TYPE, 1) - { - } - - static constexpr uint32_t kClusterId =3; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mSomeEnum), - static_cast(&mOptions), - }); - } - - - Attribute mSomeEnum; - Attribute mOptions; -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h deleted file mode 100644 index daf5c1bcee41fe..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/BridgeClustersImpl.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include -#include "bridge/MyCluster.h" - -namespace clusters { - -struct ClusterInfo -{ - chip::ClusterId id; - const char *name; - uint16_t size; - GeneratedCluster* (*ctor)(void*); -} static const kKnownClusters[] = { - - { - 123, - "MyCluster", - sizeof(MyClusterCluster), - [](void *mem) -> GeneratedCluster* { - return new(mem) MyClusterCluster(); - }, - }, -}; - -} diff --git a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h b/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h deleted file mode 100644 index 47445252f41f77..00000000000000 --- a/scripts/py_matter_idl/matter_idl/tests/outputs/simple_attribute/bridge/MyClusterServer.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "GeneratedClusters.h" - -namespace clusters { -struct MyClusterCluster : public GeneratedCluster -{ - - MyClusterCluster() : - mClusterAttr(chip::CharSpan("clusterAttr"), 1, ATTRIBUTE_MASK_WRITABLE | ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZCL_INT16U_ATTRIBUTE_TYPE, 2) - { - } - - static constexpr uint32_t kClusterId =123; - chip::ClusterId GetClusterId() override { return kClusterId; } - - std::vector GetAttributes() override - { - return std::vector({ - static_cast(&mClusterAttr), - }); - } - - - Attribute mClusterAttr; -}; - -} diff --git a/scripts/py_matter_idl/setup.cfg b/scripts/py_matter_idl/setup.cfg index 91e84f82ca8990..fec72b8fc14017 100644 --- a/scripts/py_matter_idl/setup.cfg +++ b/scripts/py_matter_idl/setup.cfg @@ -30,7 +30,3 @@ matter_idl = generators/java/ChipClustersCpp.jinja generators/cpp/application/CallbackStubSource.jinja generators/cpp/application/PluginApplicationCallbacksHeader.jinja - generators/bridge/BridgeClustersHeader.jinja - generators/bridge/BridgeClustersCommon.jinja - generators/bridge/BridgeClustersCpp.jinja - generators/bridge/BridgeClustersGlobalStructs.jinja diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index e2ec38e223c16a..e7fc6b1b5b72bd 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -33,7 +33,6 @@ '/Test', '/tests/', '/tools/', - r'/lib/assign/ValueAssign\.h', # Platforms can opt in or out. '/darwin/', diff --git a/src/lib/assign/BUILD.gn b/src/lib/assign/BUILD.gn deleted file mode 100644 index 12eec411187142..00000000000000 --- a/src/lib/assign/BUILD.gn +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") - -static_library("assign") { - sources = [ "ValueAssign.h" ] - - public_deps = [ "${chip_root}/src/lib/support" ] -} diff --git a/src/lib/assign/ValueAssign.h b/src/lib/assign/ValueAssign.h deleted file mode 100644 index c188c152866aef..00000000000000 --- a/src/lib/assign/ValueAssign.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2023 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#pragma once - -#include -#include - -namespace chip { -namespace Value { - -template -DEST & Assign(DEST & dest, const SRC & src) -{ - return dest = src; -} - -template <> -std::string & Assign(std::string & dest, const CharSpan & src) -{ - dest = std::string(src.begin(), src.end()); - return dest; -} - -template <> -CharSpan & Assign(CharSpan & dest, const std::string & src) -{ - dest = CharSpan(src.c_str(), src.size()); - return dest; -} - -} // namespace Value -} // namespace chip