[RPC tool] Open source Matter RPC tool and test suites.
Change-Id: I57787e0c749bb6e973f535e5fee04d0d273e57ec
diff --git a/rpc_tool/README.md b/rpc_tool/README.md
new file mode 100644
index 0000000..fe7629c
--- /dev/null
+++ b/rpc_tool/README.md
@@ -0,0 +1,192 @@
+# Matter RPC Verification Tool
+
+## Overview
+
+The Matter RPC verification tool can help verify if the Matter SDK (or Matter solution) has the required RPCs defined in the [Matter RPC guidelines document](https://docs.google.com/document/d/1uOFa_xLk7H03BnrTGNE5gV3TtiGoEfIE6Yh2fctSeMc), and offer a free stress test suite to help verify the SDK software quality and robustness.
+
+With RPC implemented in the SDK (or the Matter solution), on-device automation testing becomes feasible, such as regression tests (ex: automatic execution every x hour) and stress tests (ex: 100 times device boot up test) can be easily enabled to catch bugs in an early stage.
+
+
+## Features
+
+1. Provides simple tests to verify if the SDK or the Matter solution contains all the required RPCs.
+2. Provides stress test suites to test the quality and robustness of the SDK or the Matter solution.
+3. Generates test result in compressed file for the above tests.
+
+
+## Prerequisites
+
+Make sure the host meets the following prerequisites before setting up the RPC tool.
+
+
+### Host Minimum Requirements
+
+1. Ubuntu LTS or any other Linux-based environments.
+2. `Python3` installed with version `>=3.7`
+3. Internet access.
+4. Device debug interface (Typically UART over USB)
+
+
+## Setup tool
+
+1. Clone the repository at ```$HOME``` (or any desired place):
+ ```
+ $ cd $HOME
+ $ git clone https://testsuite-smarthome-matter.googlesource.com/matter_rpc_verification
+ ```
+
+2. Change directory to the tool folder:
+ ```
+ $ cd $HOME/matter_rpc_verification/rpc_tool
+ ```
+
+3. Run the script to install packages:
+ ```
+ $ sh verify_rpc.sh build
+ ```
+
+
+## Usage
+
+### Run verification test
+
+To check if the SDK contains the required RPCs: `firmware_version` RPC, `reboot` RPC, `factory_reset` RPC, `descriptor cluster` RPC and `attribute_service` RPC.
+
+1. Connect the device (flashed with the SDK you want to test) to the machine (the host where you installed this tool).
+
+2. Inside the ```rpc_tool``` directory, run the script:
+ ```
+ $ sh verify_rpc.sh run
+ ```
+
+3. The tool will ask you to select the device to test, use arrow keys on the keyboard to select. (The tool only supports running 1 device at a time).
+
+4. The tool will start testing the RPC functionality of the device, a successful test result looks like:
+
+```
+$ sh verify_rpc.sh run
+[RpcTest] 06-09 11:42:34.896 INFO ==========> MatterRpcTest <==========
+[RpcTest] 06-09 11:42:35.578 INFO [Test] test_rpc_attribute_service
+[RpcTest] 06-09 11:42:36.624 INFO [Test] test_rpc_attribute_service PASS
+[RpcTest] 06-09 11:42:36.629 INFO [Test] test_rpc_descriptor_cluster
+[RpcTest] 06-09 11:42:37.657 INFO [Test] test_rpc_descriptor_cluster PASS
+[RpcTest] 06-09 11:42:37.661 INFO [Test] test_rpc_factory_reset
+[RpcTest] 06-09 11:42:38.686 INFO [Test] test_rpc_factory_reset PASS
+[RpcTest] 06-09 11:42:38.691 INFO [Test] test_rpc_firmware_version
+[RpcTest] 06-09 11:42:39.848 WARNING Failed to decode frame: frame check sequence failure; discarded 3962 bytes
+[RpcTest] 06-09 11:42:40.880 INFO [Test] test_rpc_firmware_version PASS
+[RpcTest] 06-09 11:42:40.884 INFO [Test] test_rpc_reboot
+[RpcTest] 06-09 11:42:41.898 INFO [Test] test_rpc_reboot PASS
+[RpcTest] 06-09 11:42:42.722 INFO Summary for test class MatterRpcTest: Error 0, Executed 5, Failed 0, Passed 5, Requested 5, Skipped 0
+[RpcTest] 06-09 11:42:42.723 INFO Summary for test run RpcTest@06-09-2022_11-42-34-895:
+Total time elapsed 7.827033718116581s
+Artifacts are saved in "/tmp/logs/mobly/RpcTest/06-09-2022_11-42-34-895"
+Test results: Error 0, Executed 5, Failed 0, Passed 5, Requested 5, Skipped 0
+```
+
+A failing test result looks like (device is not responsive to some RPCs):
+
+```
+$ sh verify_rpc.sh run
+[RpcTest] 06-09 11:48:32.649 INFO ==========> MatterRpcTest <==========
+[RpcTest] 06-09 11:48:33.251 INFO [Test] test_rpc_attribute_service
+[RpcTest] 06-09 11:48:34.318 INFO [Test] test_rpc_attribute_service PASS
+[RpcTest] 06-09 11:48:34.323 INFO [Test] test_rpc_descriptor_cluster
+[RpcTest] 06-09 11:48:35.354 INFO [Test] test_rpc_descriptor_cluster PASS
+[RpcTest] 06-09 11:48:35.359 INFO [Test] test_rpc_factory_reset
+[RpcTest] 06-09 11:48:36.373 INFO [Test] test_rpc_factory_reset PASS
+[RpcTest] 06-09 11:48:36.374 INFO [Test] test_rpc_firmware_version
+[RpcTest] 06-09 11:48:36.624 WARNING Failed to decode frame: frame check sequence failure; discarded 10 bytes
+[RpcTest] 06-09 11:48:36.739 WARNING Failed to decode frame: frame check sequence failure; discarded 54 bytes
+[RpcTest] 06-09 11:48:39.375 ERROR Exception occurred in test_rpc_firmware_version.
+Traceback (most recent call last):
+ File "/home/user/rpc_tool_venv/lib/python3.9/site-packages/pw_rpc/callback_client/call.py", line 179, in _get_responses
+ response = self._response_queue.get(True, timeout_s)
+_queue.Empty
+
+During handling of the above exception, another exception occurred:
+
+Traceback (most recent call last):
+ File "/home/user/rpc_tool_venv/lib/python3.9/site-packages/mobly/base_test.py", line 756, in exec_one_test
+ test_method()
+ File "/home/user/rainier_agent/rpc_tool/push_code/rainier-engprod/rpc_tool/./verify_rpc/rpc_tool.py", line 131, in test_rpc_firmware_version
+ ack, device_info = self.dut.device_service.GetDeviceInfo()
+ File "/home/user/rpc_tool_venv/lib/python3.9/site-packages/pw_rpc/callback_client/impl.py", line 383, in call
+ return self.invoke(
+ File "/home/user/rpc_tool_venv/lib/python3.9/site-packages/pw_rpc/callback_client/call.py", line 261, in wait
+ return self._unary_wait(timeout_s)
+ File "/home/user/rpc_tool_venv/lib/python3.9/site-packages/pw_rpc/callback_client/call.py", line 142, in _unary_wait
+ for _ in self._get_responses(timeout_s=timeout_s):
+ File "/home/user/rpc_tool_venv/lib/python3.9/site-packages/pw_rpc/callback_client/call.py", line 189, in _get_responses
+ raise RpcTimeout(self._rpc, timeout_s)
+pw_rpc.callback_client.errors.RpcTimeout: No response received for chip.rpc.Device.GetDeviceInfo after 3 s
+[RpcTest] 06-09 11:48:40.380 INFO [Test] test_rpc_firmware_version ERROR
+[RpcTest] 06-09 11:48:40.382 INFO [Test] test_rpc_reboot
+[RpcTest] 06-09 11:48:40.395 WARNING Failed to decode frame: frame check sequence failure; discarded 41 bytes
+[RpcTest] 06-09 11:48:41.457 INFO [Test] test_rpc_reboot PASS
+[RpcTest] 06-09 11:48:42.390 INFO Summary for test class MatterRpcTest: Error 1, Executed 5, Failed 0, Passed 4, Requested 5, Skipped 0
+[RpcTest] 06-09 11:48:42.401 INFO Summary for test run RpcTest@06-09-2022_11-48-32-648:
+Total time elapsed 9.75229246309027s
+Artifacts are saved in "/tmp/logs/mobly/RpcTest/06-09-2022_11-48-32-648"
+Test results: Error 1, Executed 5, Failed 0, Passed 4, Requested 5, Skipped 0
+```
+
+5. The test result will be compressed in a zip file ```(rpc_test_result-xxxx.zip)``` under the same directory, which contains the device's logs and test framework logs during execution.
+
+```
+$ ls
+'rpc_test_result-2022-06-08 14:50:26.499469.zip' verify_rpc verify_rpc.sh
+```
+
+
+### Run stress test
+
+To run stress test suite on the SDK (or Matter solution), verifying the software quality and robustness.
+The tool will run 50 iterations of each RPC tests.
+
+1. Connect the device to the machine.
+
+2. Inside the ```rpc_tool``` directory, run the script:
+ ```
+ $ sh verify_rpc.sh stress
+ ```
+
+3. Select the device you want to test, then the tool will start stress testing. A successful test result looks like:
+
+```
+$ sh verify_rpc.sh stress
+[RpcTest] 06-08 11:58:13.719 INFO ==========> MatterRpcStressTest <==========
+[RpcTest] 06-08 11:58:15.136 INFO [Test] test_rpc_attribute_service
+[RpcTest] 06-08 11:58:16.205 INFO [Test] test_rpc_attribute_service PASS
+[RpcTest] 06-08 11:58:16.209 INFO [Test] test_rpc_descriptor_cluster
+[RpcTest] 06-08 11:58:17.234 INFO [Test] test_rpc_descriptor_cluster PASS
+[RpcTest] 06-08 11:58:17.238 INFO [Test] test_rpc_factory_reset
+[RpcTest] 06-08 11:58:18.255 INFO [Test] test_rpc_factory_reset PASS
+[RpcTest] 06-08 11:58:18.260 INFO [Test] test_rpc_firmware_version
+[RpcTest] 06-08 11:58:19.428 WARNING Failed to decode frame: frame check sequence failure; discarded 3962 bytes
+[RpcTest] 06-08 11:58:20.435 INFO [Test] test_rpc_firmware_version PASS
+[RpcTest] 06-08 11:58:20.441 INFO [Test] test_rpc_reboot
+[RpcTest] 06-08 11:58:21.458 INFO [Test] test_rpc_reboot PASS
+[RpcTest] 06-08 11:58:21.464 INFO [Test] test_reboot_0
+[RpcTest] 06-08 11:58:22.479 INFO [Test] test_reboot_0 PASS
+[RpcTest] 06-08 11:58:22.483 INFO [Test] test_reboot_1
+[RpcTest] 06-08 11:58:23.494 INFO [Test] test_reboot_1 PASS
+[RpcTest] 06-08 11:58:23.498 INFO [Test] test_reboot_2
+[RpcTest] 06-08 11:58:24.516 INFO [Test] test_reboot_2 PASS
+[RpcTest] 06-08 11:58:24.520 INFO [Test] test_reboot_3
+[RpcTest] 06-08 11:58:25.535 INFO [Test] test_reboot_3 PASS
+
+....
+
+[RpcTest] 06-08 12:02:43.830 INFO [Test] test_attribute_service_48
+[RpcTest] 06-08 12:02:44.877 INFO [Test] test_attribute_service_48 PASS
+[RpcTest] 06-08 12:02:44.881 INFO [Test] test_attribute_service_49
+[RpcTest] 06-08 12:02:45.945 INFO [Test] test_attribute_service_49 PASS
+[RpcTest] 06-08 12:02:47.648 INFO Summary for test class MatterRpcStressTest: Error 0, Executed 205, Failed 0, Passed 205, Requested 205, Skipped 0
+[RpcTest] 06-08 12:02:47.648 INFO Summary for test run RpcTest@06-08-2022_11-58-13-700:
+Total time elapsed 273.94792108098045s
+Artifacts are saved in "/tmp/logs/mobly/RpcTest/06-08-2022_11-58-13-700"
+Test results: Error 0, Executed 205, Failed 0, Passed 205, Requested 205, Skipped 0
+```
+
+4. The stress test result will also be compressed as a zip file under the same directory.
diff --git a/rpc_tool/verify_rpc.sh b/rpc_tool/verify_rpc.sh
new file mode 100644
index 0000000..29bb5f9
--- /dev/null
+++ b/rpc_tool/verify_rpc.sh
@@ -0,0 +1,89 @@
+# Copyright 2022 Google LLC
+#
+# 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.
+#!/bin/bash
+
+# Script for building and running Matter RPC tool
+
+RPC_VENV="rpc_tool_venv"
+BASEDIR=$(dirname "$0")
+
+# Install the required packages
+install_packages ()
+{
+ python3 -m venv $HOME/$RPC_VENV
+ source $HOME/$RPC_VENV/bin/activate
+ pip install -r $BASEDIR/verify_rpc/requirements.txt
+}
+
+
+# Run RPC mobly tests
+run_mobly_test ()
+{
+ source $HOME/$RPC_VENV/bin/activate
+ python $BASEDIR/verify_rpc/rpc_tool.py -c $BASEDIR/verify_rpc/test_config.yml
+ deactivate
+}
+
+
+# Run the unit tests
+run_unit_tests ()
+{
+ source $HOME/$RPC_VENV/bin/activate
+ coverage run $BASEDIR/verify_rpc/rpc_tool_test.py && coverage report -m
+ deactivate
+}
+
+
+# Run the stress tests
+run_stress_tests ()
+{
+ source $HOME/$RPC_VENV/bin/activate
+ python $BASEDIR/verify_rpc/stress_test_suite.py -c $BASEDIR/verify_rpc/test_config.yml
+ deactivate
+}
+
+
+usage ()
+{
+ echo "Usage: 'sh $0 build' or 'sh $0 run' or 'sh $0 stress'"
+}
+
+# Exit if the script usage is invalid
+if [ $# -ne 1 ]; then
+ usage
+ exit 1
+fi
+
+
+# Install the packages of the tool
+if [ $1 == "build" ]; then
+ install_packages
+
+# Run the RPC tests for SDK
+elif [ $1 == "run" ]; then
+ run_mobly_test
+
+# Run the unit tests for tool
+elif [ $1 == "unit_test" ]; then
+ run_unit_tests
+
+# Run the stress tests for SDK
+elif [ $1 == "stress" ]; then
+ run_stress_tests
+
+else
+ echo "Invalid option"
+ usage
+
+fi
diff --git a/rpc_tool/verify_rpc/protos/__init__.py b/rpc_tool/verify_rpc/protos/__init__.py
new file mode 100644
index 0000000..bb488a8
--- /dev/null
+++ b/rpc_tool/verify_rpc/protos/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2022 Google LLC
+#
+# 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.
+
diff --git a/rpc_tool/verify_rpc/protos/attributes_service_pb2.py b/rpc_tool/verify_rpc/protos/attributes_service_pb2.py
new file mode 100644
index 0000000..ba3b223
--- /dev/null
+++ b/rpc_tool/verify_rpc/protos/attributes_service_pb2.py
@@ -0,0 +1,1366 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: attributes_service.proto
+# pylint: skip-file
+"""Generated protocol buffer code."""
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from protos import common_pb2 as common__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='attributes_service.proto',
+ package='chip.rpc',
+ syntax='proto3',
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x18\x61ttributes_service.proto\x12\x08\x63hip.rpc\x1a\x0c\x63ommon.proto\"\x8a\x01\n\x11\x41ttributeMetadata\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\r\x12&\n\x07\x63luster\x18\x02 \x01(\x0e\x32\x15.chip.rpc.ClusterType\x12\x14\n\x0c\x61ttribute_id\x18\x03 \x01(\r\x12%\n\x04type\x18\x04 \x01(\x0e\x32\x17.chip.rpc.AttributeType\"\xc7\x01\n\rAttributeData\x12\x13\n\tdata_bool\x18\x01 \x01(\x08H\x00\x12\x14\n\ndata_uint8\x18\x02 \x01(\rH\x00\x12\x15\n\x0b\x64\x61ta_uint16\x18\x03 \x01(\rH\x00\x12\x15\n\x0b\x64\x61ta_uint32\x18\x04 \x01(\rH\x00\x12\x14\n\ndata_bytes\x18\x05 \x01(\x0cH\x00\x12\x13\n\tdata_int8\x18\x06 \x01(\x05H\x00\x12\x14\n\ndata_int16\x18\x07 \x01(\x05H\x00\x12\x14\n\ndata_int32\x18\x08 \x01(\x05H\x00\x42\x06\n\x04\x64\x61ta\"f\n\x0e\x41ttributeWrite\x12-\n\x08metadata\x18\x01 \x01(\x0b\x32\x1b.chip.rpc.AttributeMetadata\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.chip.rpc.AttributeData*\xab\x10\n\rAttributeType\x12\x1e\n\x1aZCL_NO_DATA_ATTRIBUTE_TYPE\x10\x00\x12\x1e\n\x1aZCL_BOOLEAN_ATTRIBUTE_TYPE\x10\x10\x12\x1e\n\x1aZCL_BITMAP8_ATTRIBUTE_TYPE\x10\x18\x12\x1f\n\x1bZCL_BITMAP16_ATTRIBUTE_TYPE\x10\x19\x12\x1f\n\x1bZCL_BITMAP32_ATTRIBUTE_TYPE\x10\x1b\x12\x1f\n\x1bZCL_BITMAP64_ATTRIBUTE_TYPE\x10\x1f\x12\x1c\n\x18ZCL_INT8U_ATTRIBUTE_TYPE\x10 \x12\x1d\n\x19ZCL_INT16U_ATTRIBUTE_TYPE\x10!\x12\x1d\n\x19ZCL_INT24U_ATTRIBUTE_TYPE\x10\"\x12\x1d\n\x19ZCL_INT32U_ATTRIBUTE_TYPE\x10#\x12\x1d\n\x19ZCL_INT40U_ATTRIBUTE_TYPE\x10$\x12\x1d\n\x19ZCL_INT48U_ATTRIBUTE_TYPE\x10%\x12\x1d\n\x19ZCL_INT56U_ATTRIBUTE_TYPE\x10&\x12\x1d\n\x19ZCL_INT64U_ATTRIBUTE_TYPE\x10\'\x12\x1c\n\x18ZCL_INT8S_ATTRIBUTE_TYPE\x10(\x12\x1d\n\x19ZCL_INT16S_ATTRIBUTE_TYPE\x10)\x12\x1d\n\x19ZCL_INT24S_ATTRIBUTE_TYPE\x10*\x12\x1d\n\x19ZCL_INT32S_ATTRIBUTE_TYPE\x10+\x12\x1d\n\x19ZCL_INT40S_ATTRIBUTE_TYPE\x10,\x12\x1d\n\x19ZCL_INT48S_ATTRIBUTE_TYPE\x10-\x12\x1d\n\x19ZCL_INT56S_ATTRIBUTE_TYPE\x10.\x12\x1d\n\x19ZCL_INT64S_ATTRIBUTE_TYPE\x10/\x12\x1c\n\x18ZCL_ENUM8_ATTRIBUTE_TYPE\x10\x30\x12\x1d\n\x19ZCL_ENUM16_ATTRIBUTE_TYPE\x10\x31\x12\x1d\n\x19ZCL_SINGLE_ATTRIBUTE_TYPE\x10\x39\x12\x1d\n\x19ZCL_DOUBLE_ATTRIBUTE_TYPE\x10:\x12#\n\x1fZCL_OCTET_STRING_ATTRIBUTE_TYPE\x10\x41\x12\"\n\x1eZCL_CHAR_STRING_ATTRIBUTE_TYPE\x10\x42\x12(\n$ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE\x10\x43\x12\'\n#ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE\x10\x44\x12\x1c\n\x18ZCL_ARRAY_ATTRIBUTE_TYPE\x10H\x12\x1d\n\x19ZCL_STRUCT_ATTRIBUTE_TYPE\x10L\x12\x1b\n\x16ZCL_TOD_ATTRIBUTE_TYPE\x10\xe0\x01\x12\x1c\n\x17ZCL_DATE_ATTRIBUTE_TYPE\x10\xe1\x01\x12\x1b\n\x16ZCL_UTC_ATTRIBUTE_TYPE\x10\xe2\x01\x12 \n\x1bZCL_EPOCH_US_ATTRIBUTE_TYPE\x10\xe3\x01\x12\x1f\n\x1aZCL_EPOCH_S_ATTRIBUTE_TYPE\x10\xe4\x01\x12\"\n\x1dZCL_SYSTIME_US_ATTRIBUTE_TYPE\x10\xe5\x01\x12\x1f\n\x1aZCL_PERCENT_ATTRIBUTE_TYPE\x10\xe6\x01\x12%\n ZCL_PERCENT100THS_ATTRIBUTE_TYPE\x10\xe7\x01\x12\"\n\x1dZCL_CLUSTER_ID_ATTRIBUTE_TYPE\x10\xe8\x01\x12!\n\x1cZCL_ATTRIB_ID_ATTRIBUTE_TYPE\x10\xe9\x01\x12 \n\x1bZCL_FIELD_ID_ATTRIBUTE_TYPE\x10\xea\x01\x12 \n\x1bZCL_EVENT_ID_ATTRIBUTE_TYPE\x10\xeb\x01\x12\"\n\x1dZCL_COMMAND_ID_ATTRIBUTE_TYPE\x10\xec\x01\x12!\n\x1cZCL_ACTION_ID_ATTRIBUTE_TYPE\x10\xed\x01\x12 \n\x1bZCL_TRANS_ID_ATTRIBUTE_TYPE\x10\xef\x01\x12\x1f\n\x1aZCL_NODE_ID_ATTRIBUTE_TYPE\x10\xf0\x01\x12!\n\x1cZCL_VENDOR_ID_ATTRIBUTE_TYPE\x10\xf1\x01\x12\"\n\x1dZCL_DEVTYPE_ID_ATTRIBUTE_TYPE\x10\xf2\x01\x12!\n\x1cZCL_FABRIC_ID_ATTRIBUTE_TYPE\x10\xf3\x01\x12 \n\x1bZCL_GROUP_ID_ATTRIBUTE_TYPE\x10\xf4\x01\x12\x1e\n\x19ZCL_STATUS_ATTRIBUTE_TYPE\x10\xf5\x01\x12 \n\x1bZCL_DATA_VER_ATTRIBUTE_TYPE\x10\xf6\x01\x12 \n\x1bZCL_EVENT_NO_ATTRIBUTE_TYPE\x10\xf7\x01\x12#\n\x1eZCL_ENDPOINT_NO_ATTRIBUTE_TYPE\x10\xf8\x01\x12\"\n\x1dZCL_FABRIC_IDX_ATTRIBUTE_TYPE\x10\xf9\x01\x12\x1d\n\x18ZCL_IPADR_ATTRIBUTE_TYPE\x10\xfa\x01\x12\x1f\n\x1aZCL_IPV4ADR_ATTRIBUTE_TYPE\x10\xfb\x01\x12\x1f\n\x1aZCL_IPV6ADR_ATTRIBUTE_TYPE\x10\xfc\x01\x12\x1f\n\x1aZCL_IPV6PRE_ATTRIBUTE_TYPE\x10\xfd\x01\x12\x1d\n\x18ZCL_HWADR_ATTRIBUTE_TYPE\x10\xfe\x01\x12\x1f\n\x1aZCL_UNKNOWN_ATTRIBUTE_TYPE\x10\xff\x01*\xc5$\n\x0b\x43lusterType\x12\x1a\n\x16ZCL_INVALID_CLUSTER_ID\x10\x00\x12\x1f\n\x1bZCL_POWER_CONFIG_CLUSTER_ID\x10\x01\x12\x1e\n\x1aZCL_DEVICE_TEMP_CLUSTER_ID\x10\x02\x12\x1b\n\x17ZCL_IDENTIFY_CLUSTER_ID\x10\x03\x12\x19\n\x15ZCL_GROUPS_CLUSTER_ID\x10\x04\x12\x19\n\x15ZCL_SCENES_CLUSTER_ID\x10\x05\x12\x19\n\x15ZCL_ON_OFF_CLUSTER_ID\x10\x06\x12\'\n#ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID\x10\x07\x12 \n\x1cZCL_LEVEL_CONTROL_CLUSTER_ID\x10\x08\x12\x18\n\x14ZCL_ALARM_CLUSTER_ID\x10\t\x12\x17\n\x13ZCL_TIME_CLUSTER_ID\x10\n\x12%\n!ZCL_BINARY_INPUT_BASIC_CLUSTER_ID\x10\x0f\x12 \n\x1cZCL_POWER_PROFILE_CLUSTER_ID\x10\x1a\x12$\n ZCL_APPLIANCE_CONTROL_CLUSTER_ID\x10\x1b\x12\x1d\n\x19ZCL_DESCRIPTOR_CLUSTER_ID\x10\x1d\x12\x1f\n\x1bZCL_POLL_CONTROL_CLUSTER_ID\x10 \x12\"\n\x1eZCL_BRIDGED_ACTIONS_CLUSTER_ID\x10%\x12\x18\n\x14ZCL_BASIC_CLUSTER_ID\x10(\x12\x1f\n\x1bZCL_OTA_PROVIDER_CLUSTER_ID\x10)\x12 \n\x1cZCL_OTA_REQUESTOR_CLUSTER_ID\x10*\x12$\n ZCL_UNIT_LOCALIZATION_CLUSTER_ID\x10-\x12\x1f\n\x1bZCL_POWER_SOURCE_CLUSTER_ID\x10/\x12(\n$ZCL_GENERAL_COMMISSIONING_CLUSTER_ID\x10\x30\x12(\n$ZCL_NETWORK_COMMISSIONING_CLUSTER_ID\x10\x31\x12\"\n\x1eZCL_DIAGNOSTIC_LOGS_CLUSTER_ID\x10\x32\x12&\n\"ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID\x10\x33\x12\'\n#ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID\x10\x34\x12-\n)ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID\x10\x35\x12+\n\'ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID\x10\x36\x12/\n+ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID\x10\x37\x12\'\n#ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID\x10\x39\x12\x19\n\x15ZCL_SWITCH_CLUSTER_ID\x10;\x12.\n*ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID\x10<\x12*\n&ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID\x10>\x12\x1e\n\x1aZCL_FIXED_LABEL_CLUSTER_ID\x10@\x12 \n\x1cZCL_BOOLEAN_STATE_CLUSTER_ID\x10\x45\x12\x1e\n\x1aZCL_MODE_SELECT_CLUSTER_ID\x10P\x12 \n\x1bZCL_SHADE_CONFIG_CLUSTER_ID\x10\x80\x02\x12\x1d\n\x18ZCL_DOOR_LOCK_CLUSTER_ID\x10\x81\x02\x12#\n\x1eZCL_WINDOW_COVERING_CLUSTER_ID\x10\x82\x02\x12#\n\x1eZCL_BARRIER_CONTROL_CLUSTER_ID\x10\x83\x02\x12\'\n\"ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID\x10\x80\x04\x12\x1e\n\x19ZCL_THERMOSTAT_CLUSTER_ID\x10\x81\x04\x12\x1f\n\x1aZCL_FAN_CONTROL_CLUSTER_ID\x10\x82\x04\x12#\n\x1eZCL_DEHUMID_CONTROL_CLUSTER_ID\x10\x83\x04\x12(\n#ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID\x10\x84\x04\x12!\n\x1cZCL_COLOR_CONTROL_CLUSTER_ID\x10\x80\x06\x12)\n$ZCL_BALLAST_CONFIGURATION_CLUSTER_ID\x10\x81\x06\x12+\n&ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID\x10\x80\x08\x12$\n\x1fZCL_TEMP_MEASUREMENT_CLUSTER_ID\x10\x82\x08\x12(\n#ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID\x10\x83\x08\x12$\n\x1fZCL_FLOW_MEASUREMENT_CLUSTER_ID\x10\x84\x08\x12\x31\n,ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID\x10\x85\x08\x12%\n ZCL_OCCUPANCY_SENSING_CLUSTER_ID\x10\x86\x08\x12=\n8ZCL_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x8c\x08\x12<\n7ZCL_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x8d\x08\x12\x36\n1ZCL_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x8e\x08\x12<\n7ZCL_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x8f\x08\x12\x36\n1ZCL_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x90\x08\x12?\n:ZCL_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x91\x08\x12:\n5ZCL_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x92\x08\x12>\n9ZCL_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x93\x08\x12\x34\n/ZCL_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x94\x08\x12\x33\n.ZCL_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x95\x08\x12<\n7ZCL_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x96\x08\x12>\n9ZCL_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x97\x08\x12\x35\n0ZCL_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x98\x08\x12\x39\n4ZCL_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x99\x08\x12\x36\n1ZCL_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x9a\x08\x12G\nBZCL_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x9b\x08\x12\x36\n1ZCL_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x9c\x08\x12>\n9ZCL_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x9d\x08\x12\x43\n>ZCL_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x9e\x08\x12\x45\n@ZCL_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\x9f\x08\x12\x37\n2ZCL_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa0\x08\x12\x34\n/ZCL_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa1\x08\x12\x32\n-ZCL_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa2\x08\x12\x37\n2ZCL_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa3\x08\x12\x35\n0ZCL_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa4\x08\x12\x42\n=ZCL_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa5\x08\x12\x37\n2ZCL_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa6\x08\x12\x42\n=ZCL_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa7\x08\x12\x38\n3ZCL_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa8\x08\x12\x34\n/ZCL_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_ID\x10\xa9\x08\x12\x1c\n\x17ZCL_IAS_ZONE_CLUSTER_ID\x10\x80\n\x12\x1b\n\x16ZCL_IAS_ACE_CLUSTER_ID\x10\x81\n\x12\x1a\n\x15ZCL_IAS_WD_CLUSTER_ID\x10\x82\n\x12\x1f\n\x1aZCL_WAKE_ON_LAN_CLUSTER_ID\x10\x83\n\x12\x1b\n\x16ZCL_CHANNEL_CLUSTER_ID\x10\x84\n\x12$\n\x1fZCL_TARGET_NAVIGATOR_CLUSTER_ID\x10\x85\n\x12\"\n\x1dZCL_MEDIA_PLAYBACK_CLUSTER_ID\x10\x86\n\x12\x1f\n\x1aZCL_MEDIA_INPUT_CLUSTER_ID\x10\x87\n\x12\x1d\n\x18ZCL_LOW_POWER_CLUSTER_ID\x10\x88\n\x12 \n\x1bZCL_KEYPAD_INPUT_CLUSTER_ID\x10\x89\n\x12\"\n\x1dZCL_CONTENT_LAUNCH_CLUSTER_ID\x10\x8a\n\x12 \n\x1bZCL_AUDIO_OUTPUT_CLUSTER_ID\x10\x8b\n\x12(\n#ZCL_APPLICATION_LAUNCHER_CLUSTER_ID\x10\x8c\n\x12%\n ZCL_APPLICATION_BASIC_CLUSTER_ID\x10\x8d\n\x12!\n\x1cZCL_ACCOUNT_LOGIN_CLUSTER_ID\x10\x8e\n\x12\x18\n\x13ZCL_TEST_CLUSTER_ID\x10\x8f\n\x12\x1d\n\x18ZCL_MESSAGING_CLUSTER_ID\x10\x83\x0e\x12,\n\'ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID\x10\x80\x16\x12(\n#ZCL_METER_IDENTIFICATION_CLUSTER_ID\x10\x81\x16\x12.\n)ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID\x10\x82\x16\x12(\n#ZCL_APPLIANCE_STATISTICS_CLUSTER_ID\x10\x83\x16\x12*\n%ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID\x10\x84\x16\x12\x1c\n\x16ZCL_BINDING_CLUSTER_ID\x10\x80\xe0\x03\x12)\n#ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID\x10\x84\xe0\x03\x12(\n\"ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID\x10\x80\xf8\x03\x32\x85\x01\n\nAttributes\x12\x37\n\x05Write\x12\x18.chip.rpc.AttributeWrite\x1a\x12.pw.protobuf.Empty\"\x00\x12>\n\x04Read\x12\x1b.chip.rpc.AttributeMetadata\x1a\x17.chip.rpc.AttributeData\"\x00\x62\x06proto3'
+ ,
+ dependencies=[common__pb2.DESCRIPTOR,])
+
+_ATTRIBUTETYPE = _descriptor.EnumDescriptor(
+ name='AttributeType',
+ full_name='chip.rpc.AttributeType',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_NO_DATA_ATTRIBUTE_TYPE', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BOOLEAN_ATTRIBUTE_TYPE', index=1, number=16,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BITMAP8_ATTRIBUTE_TYPE', index=2, number=24,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BITMAP16_ATTRIBUTE_TYPE', index=3, number=25,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BITMAP32_ATTRIBUTE_TYPE', index=4, number=27,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BITMAP64_ATTRIBUTE_TYPE', index=5, number=31,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT8U_ATTRIBUTE_TYPE', index=6, number=32,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT16U_ATTRIBUTE_TYPE', index=7, number=33,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT24U_ATTRIBUTE_TYPE', index=8, number=34,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT32U_ATTRIBUTE_TYPE', index=9, number=35,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT40U_ATTRIBUTE_TYPE', index=10, number=36,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT48U_ATTRIBUTE_TYPE', index=11, number=37,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT56U_ATTRIBUTE_TYPE', index=12, number=38,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT64U_ATTRIBUTE_TYPE', index=13, number=39,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT8S_ATTRIBUTE_TYPE', index=14, number=40,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT16S_ATTRIBUTE_TYPE', index=15, number=41,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT24S_ATTRIBUTE_TYPE', index=16, number=42,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT32S_ATTRIBUTE_TYPE', index=17, number=43,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT40S_ATTRIBUTE_TYPE', index=18, number=44,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT48S_ATTRIBUTE_TYPE', index=19, number=45,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT56S_ATTRIBUTE_TYPE', index=20, number=46,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INT64S_ATTRIBUTE_TYPE', index=21, number=47,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ENUM8_ATTRIBUTE_TYPE', index=22, number=48,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ENUM16_ATTRIBUTE_TYPE', index=23, number=49,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SINGLE_ATTRIBUTE_TYPE', index=24, number=57,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DOUBLE_ATTRIBUTE_TYPE', index=25, number=58,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OCTET_STRING_ATTRIBUTE_TYPE', index=26, number=65,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CHAR_STRING_ATTRIBUTE_TYPE', index=27, number=66,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE', index=28, number=67,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE', index=29, number=68,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ARRAY_ATTRIBUTE_TYPE', index=30, number=72,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_STRUCT_ATTRIBUTE_TYPE', index=31, number=76,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TOD_ATTRIBUTE_TYPE', index=32, number=224,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DATE_ATTRIBUTE_TYPE', index=33, number=225,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_UTC_ATTRIBUTE_TYPE', index=34, number=226,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_EPOCH_US_ATTRIBUTE_TYPE', index=35, number=227,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_EPOCH_S_ATTRIBUTE_TYPE', index=36, number=228,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SYSTIME_US_ATTRIBUTE_TYPE', index=37, number=229,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_PERCENT_ATTRIBUTE_TYPE', index=38, number=230,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_PERCENT100THS_ATTRIBUTE_TYPE', index=39, number=231,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CLUSTER_ID_ATTRIBUTE_TYPE', index=40, number=232,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ATTRIB_ID_ATTRIBUTE_TYPE', index=41, number=233,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FIELD_ID_ATTRIBUTE_TYPE', index=42, number=234,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_EVENT_ID_ATTRIBUTE_TYPE', index=43, number=235,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_COMMAND_ID_ATTRIBUTE_TYPE', index=44, number=236,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ACTION_ID_ATTRIBUTE_TYPE', index=45, number=237,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TRANS_ID_ATTRIBUTE_TYPE', index=46, number=239,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_NODE_ID_ATTRIBUTE_TYPE', index=47, number=240,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_VENDOR_ID_ATTRIBUTE_TYPE', index=48, number=241,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE', index=49, number=242,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FABRIC_ID_ATTRIBUTE_TYPE', index=50, number=243,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_GROUP_ID_ATTRIBUTE_TYPE', index=51, number=244,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_STATUS_ATTRIBUTE_TYPE', index=52, number=245,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DATA_VER_ATTRIBUTE_TYPE', index=53, number=246,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_EVENT_NO_ATTRIBUTE_TYPE', index=54, number=247,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE', index=55, number=248,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FABRIC_IDX_ATTRIBUTE_TYPE', index=56, number=249,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IPADR_ATTRIBUTE_TYPE', index=57, number=250,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IPV4ADR_ATTRIBUTE_TYPE', index=58, number=251,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IPV6ADR_ATTRIBUTE_TYPE', index=59, number=252,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IPV6PRE_ATTRIBUTE_TYPE', index=60, number=253,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_HWADR_ATTRIBUTE_TYPE', index=61, number=254,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_UNKNOWN_ATTRIBUTE_TYPE', index=62, number=255,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=500,
+ serialized_end=2591,
+)
+_sym_db.RegisterEnumDescriptor(_ATTRIBUTETYPE)
+
+AttributeType = enum_type_wrapper.EnumTypeWrapper(_ATTRIBUTETYPE)
+_CLUSTERTYPE = _descriptor.EnumDescriptor(
+ name='ClusterType',
+ full_name='chip.rpc.ClusterType',
+ filename=None,
+ file=DESCRIPTOR,
+ create_key=_descriptor._internal_create_key,
+ values=[
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_INVALID_CLUSTER_ID', index=0, number=0,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_POWER_CONFIG_CLUSTER_ID', index=1, number=1,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DEVICE_TEMP_CLUSTER_ID', index=2, number=2,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IDENTIFY_CLUSTER_ID', index=3, number=3,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_GROUPS_CLUSTER_ID', index=4, number=4,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SCENES_CLUSTER_ID', index=5, number=5,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ON_OFF_CLUSTER_ID', index=6, number=6,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID', index=7, number=7,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_LEVEL_CONTROL_CLUSTER_ID', index=8, number=8,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ALARM_CLUSTER_ID', index=9, number=9,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TIME_CLUSTER_ID', index=10, number=10,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BINARY_INPUT_BASIC_CLUSTER_ID', index=11, number=15,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_POWER_PROFILE_CLUSTER_ID', index=12, number=26,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_APPLIANCE_CONTROL_CLUSTER_ID', index=13, number=27,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DESCRIPTOR_CLUSTER_ID', index=14, number=29,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_POLL_CONTROL_CLUSTER_ID', index=15, number=32,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BRIDGED_ACTIONS_CLUSTER_ID', index=16, number=37,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BASIC_CLUSTER_ID', index=17, number=40,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OTA_PROVIDER_CLUSTER_ID', index=18, number=41,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OTA_REQUESTOR_CLUSTER_ID', index=19, number=42,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_UNIT_LOCALIZATION_CLUSTER_ID', index=20, number=45,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_POWER_SOURCE_CLUSTER_ID', index=21, number=47,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_GENERAL_COMMISSIONING_CLUSTER_ID', index=22, number=48,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_NETWORK_COMMISSIONING_CLUSTER_ID', index=23, number=49,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID', index=24, number=50,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID', index=25, number=51,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID', index=26, number=52,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID', index=27, number=53,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID', index=28, number=54,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID', index=29, number=55,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID', index=30, number=57,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SWITCH_CLUSTER_ID', index=31, number=59,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID', index=32, number=60,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID', index=33, number=62,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FIXED_LABEL_CLUSTER_ID', index=34, number=64,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BOOLEAN_STATE_CLUSTER_ID', index=35, number=69,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_MODE_SELECT_CLUSTER_ID', index=36, number=80,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SHADE_CONFIG_CLUSTER_ID', index=37, number=256,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DOOR_LOCK_CLUSTER_ID', index=38, number=257,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_WINDOW_COVERING_CLUSTER_ID', index=39, number=258,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BARRIER_CONTROL_CLUSTER_ID', index=40, number=259,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID', index=41, number=512,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_THERMOSTAT_CLUSTER_ID', index=42, number=513,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FAN_CONTROL_CLUSTER_ID', index=43, number=514,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DEHUMID_CONTROL_CLUSTER_ID', index=44, number=515,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID', index=45, number=516,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_COLOR_CONTROL_CLUSTER_ID', index=46, number=768,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BALLAST_CONFIGURATION_CLUSTER_ID', index=47, number=769,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID', index=48, number=1024,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TEMP_MEASUREMENT_CLUSTER_ID', index=49, number=1026,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID', index=50, number=1027,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FLOW_MEASUREMENT_CLUSTER_ID', index=51, number=1028,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID', index=52, number=1029,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OCCUPANCY_SENSING_CLUSTER_ID', index=53, number=1030,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=54, number=1036,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=55, number=1037,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=56, number=1038,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=57, number=1039,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=58, number=1040,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=59, number=1041,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=60, number=1042,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=61, number=1043,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=62, number=1044,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=63, number=1045,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=64, number=1046,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=65, number=1047,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=66, number=1048,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=67, number=1049,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=68, number=1050,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=69, number=1051,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=70, number=1052,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=71, number=1053,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=72, number=1054,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=73, number=1055,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=74, number=1056,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=75, number=1057,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=76, number=1058,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=77, number=1059,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=78, number=1060,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=79, number=1061,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=80, number=1062,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=81, number=1063,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=82, number=1064,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_ID', index=83, number=1065,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IAS_ZONE_CLUSTER_ID', index=84, number=1280,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IAS_ACE_CLUSTER_ID', index=85, number=1281,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_IAS_WD_CLUSTER_ID', index=86, number=1282,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_WAKE_ON_LAN_CLUSTER_ID', index=87, number=1283,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CHANNEL_CLUSTER_ID', index=88, number=1284,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TARGET_NAVIGATOR_CLUSTER_ID', index=89, number=1285,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_MEDIA_PLAYBACK_CLUSTER_ID', index=90, number=1286,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_MEDIA_INPUT_CLUSTER_ID', index=91, number=1287,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_LOW_POWER_CLUSTER_ID', index=92, number=1288,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_KEYPAD_INPUT_CLUSTER_ID', index=93, number=1289,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_CONTENT_LAUNCH_CLUSTER_ID', index=94, number=1290,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_AUDIO_OUTPUT_CLUSTER_ID', index=95, number=1291,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_APPLICATION_LAUNCHER_CLUSTER_ID', index=96, number=1292,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_APPLICATION_BASIC_CLUSTER_ID', index=97, number=1293,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ACCOUNT_LOGIN_CLUSTER_ID', index=98, number=1294,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_TEST_CLUSTER_ID', index=99, number=1295,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_MESSAGING_CLUSTER_ID', index=100, number=1795,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID', index=101, number=2816,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_METER_IDENTIFICATION_CLUSTER_ID', index=102, number=2817,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID', index=103, number=2818,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_APPLIANCE_STATISTICS_CLUSTER_ID', index=104, number=2819,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID', index=105, number=2820,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_BINDING_CLUSTER_ID', index=106, number=61440,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID', index=107, number=61444,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ _descriptor.EnumValueDescriptor(
+ name='ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID', index=108, number=64512,
+ serialized_options=None,
+ type=None,
+ create_key=_descriptor._internal_create_key),
+ ],
+ containing_type=None,
+ serialized_options=None,
+ serialized_start=2594,
+ serialized_end=7271,
+)
+_sym_db.RegisterEnumDescriptor(_CLUSTERTYPE)
+
+ClusterType = enum_type_wrapper.EnumTypeWrapper(_CLUSTERTYPE)
+ZCL_NO_DATA_ATTRIBUTE_TYPE = 0
+ZCL_BOOLEAN_ATTRIBUTE_TYPE = 16
+ZCL_BITMAP8_ATTRIBUTE_TYPE = 24
+ZCL_BITMAP16_ATTRIBUTE_TYPE = 25
+ZCL_BITMAP32_ATTRIBUTE_TYPE = 27
+ZCL_BITMAP64_ATTRIBUTE_TYPE = 31
+ZCL_INT8U_ATTRIBUTE_TYPE = 32
+ZCL_INT16U_ATTRIBUTE_TYPE = 33
+ZCL_INT24U_ATTRIBUTE_TYPE = 34
+ZCL_INT32U_ATTRIBUTE_TYPE = 35
+ZCL_INT40U_ATTRIBUTE_TYPE = 36
+ZCL_INT48U_ATTRIBUTE_TYPE = 37
+ZCL_INT56U_ATTRIBUTE_TYPE = 38
+ZCL_INT64U_ATTRIBUTE_TYPE = 39
+ZCL_INT8S_ATTRIBUTE_TYPE = 40
+ZCL_INT16S_ATTRIBUTE_TYPE = 41
+ZCL_INT24S_ATTRIBUTE_TYPE = 42
+ZCL_INT32S_ATTRIBUTE_TYPE = 43
+ZCL_INT40S_ATTRIBUTE_TYPE = 44
+ZCL_INT48S_ATTRIBUTE_TYPE = 45
+ZCL_INT56S_ATTRIBUTE_TYPE = 46
+ZCL_INT64S_ATTRIBUTE_TYPE = 47
+ZCL_ENUM8_ATTRIBUTE_TYPE = 48
+ZCL_ENUM16_ATTRIBUTE_TYPE = 49
+ZCL_SINGLE_ATTRIBUTE_TYPE = 57
+ZCL_DOUBLE_ATTRIBUTE_TYPE = 58
+ZCL_OCTET_STRING_ATTRIBUTE_TYPE = 65
+ZCL_CHAR_STRING_ATTRIBUTE_TYPE = 66
+ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE = 67
+ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE = 68
+ZCL_ARRAY_ATTRIBUTE_TYPE = 72
+ZCL_STRUCT_ATTRIBUTE_TYPE = 76
+ZCL_TOD_ATTRIBUTE_TYPE = 224
+ZCL_DATE_ATTRIBUTE_TYPE = 225
+ZCL_UTC_ATTRIBUTE_TYPE = 226
+ZCL_EPOCH_US_ATTRIBUTE_TYPE = 227
+ZCL_EPOCH_S_ATTRIBUTE_TYPE = 228
+ZCL_SYSTIME_US_ATTRIBUTE_TYPE = 229
+ZCL_PERCENT_ATTRIBUTE_TYPE = 230
+ZCL_PERCENT100THS_ATTRIBUTE_TYPE = 231
+ZCL_CLUSTER_ID_ATTRIBUTE_TYPE = 232
+ZCL_ATTRIB_ID_ATTRIBUTE_TYPE = 233
+ZCL_FIELD_ID_ATTRIBUTE_TYPE = 234
+ZCL_EVENT_ID_ATTRIBUTE_TYPE = 235
+ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 236
+ZCL_ACTION_ID_ATTRIBUTE_TYPE = 237
+ZCL_TRANS_ID_ATTRIBUTE_TYPE = 239
+ZCL_NODE_ID_ATTRIBUTE_TYPE = 240
+ZCL_VENDOR_ID_ATTRIBUTE_TYPE = 241
+ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE = 242
+ZCL_FABRIC_ID_ATTRIBUTE_TYPE = 243
+ZCL_GROUP_ID_ATTRIBUTE_TYPE = 244
+ZCL_STATUS_ATTRIBUTE_TYPE = 245
+ZCL_DATA_VER_ATTRIBUTE_TYPE = 246
+ZCL_EVENT_NO_ATTRIBUTE_TYPE = 247
+ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE = 248
+ZCL_FABRIC_IDX_ATTRIBUTE_TYPE = 249
+ZCL_IPADR_ATTRIBUTE_TYPE = 250
+ZCL_IPV4ADR_ATTRIBUTE_TYPE = 251
+ZCL_IPV6ADR_ATTRIBUTE_TYPE = 252
+ZCL_IPV6PRE_ATTRIBUTE_TYPE = 253
+ZCL_HWADR_ATTRIBUTE_TYPE = 254
+ZCL_UNKNOWN_ATTRIBUTE_TYPE = 255
+ZCL_INVALID_CLUSTER_ID = 0
+ZCL_POWER_CONFIG_CLUSTER_ID = 1
+ZCL_DEVICE_TEMP_CLUSTER_ID = 2
+ZCL_IDENTIFY_CLUSTER_ID = 3
+ZCL_GROUPS_CLUSTER_ID = 4
+ZCL_SCENES_CLUSTER_ID = 5
+ZCL_ON_OFF_CLUSTER_ID = 6
+ZCL_ON_OFF_SWITCH_CONFIG_CLUSTER_ID = 7
+ZCL_LEVEL_CONTROL_CLUSTER_ID = 8
+ZCL_ALARM_CLUSTER_ID = 9
+ZCL_TIME_CLUSTER_ID = 10
+ZCL_BINARY_INPUT_BASIC_CLUSTER_ID = 15
+ZCL_POWER_PROFILE_CLUSTER_ID = 26
+ZCL_APPLIANCE_CONTROL_CLUSTER_ID = 27
+ZCL_DESCRIPTOR_CLUSTER_ID = 29
+ZCL_POLL_CONTROL_CLUSTER_ID = 32
+ZCL_BRIDGED_ACTIONS_CLUSTER_ID = 37
+ZCL_BASIC_CLUSTER_ID = 40
+ZCL_OTA_PROVIDER_CLUSTER_ID = 41
+ZCL_OTA_REQUESTOR_CLUSTER_ID = 42
+ZCL_UNIT_LOCALIZATION_CLUSTER_ID = 45
+ZCL_POWER_SOURCE_CLUSTER_ID = 47
+ZCL_GENERAL_COMMISSIONING_CLUSTER_ID = 48
+ZCL_NETWORK_COMMISSIONING_CLUSTER_ID = 49
+ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID = 50
+ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID = 51
+ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID = 52
+ZCL_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_ID = 53
+ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID = 54
+ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID = 55
+ZCL_BRIDGED_DEVICE_BASIC_CLUSTER_ID = 57
+ZCL_SWITCH_CLUSTER_ID = 59
+ZCL_ADMINISTRATOR_COMMISSIONING_CLUSTER_ID = 60
+ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID = 62
+ZCL_FIXED_LABEL_CLUSTER_ID = 64
+ZCL_BOOLEAN_STATE_CLUSTER_ID = 69
+ZCL_MODE_SELECT_CLUSTER_ID = 80
+ZCL_SHADE_CONFIG_CLUSTER_ID = 256
+ZCL_DOOR_LOCK_CLUSTER_ID = 257
+ZCL_WINDOW_COVERING_CLUSTER_ID = 258
+ZCL_BARRIER_CONTROL_CLUSTER_ID = 259
+ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID = 512
+ZCL_THERMOSTAT_CLUSTER_ID = 513
+ZCL_FAN_CONTROL_CLUSTER_ID = 514
+ZCL_DEHUMID_CONTROL_CLUSTER_ID = 515
+ZCL_THERMOSTAT_UI_CONFIG_CLUSTER_ID = 516
+ZCL_COLOR_CONTROL_CLUSTER_ID = 768
+ZCL_BALLAST_CONFIGURATION_CLUSTER_ID = 769
+ZCL_ILLUMINANCE_MEASUREMENT_CLUSTER_ID = 1024
+ZCL_TEMP_MEASUREMENT_CLUSTER_ID = 1026
+ZCL_PRESSURE_MEASUREMENT_CLUSTER_ID = 1027
+ZCL_FLOW_MEASUREMENT_CLUSTER_ID = 1028
+ZCL_RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER_ID = 1029
+ZCL_OCCUPANCY_SENSING_CLUSTER_ID = 1030
+ZCL_CARBON_MONOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1036
+ZCL_CARBON_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1037
+ZCL_ETHYLENE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1038
+ZCL_ETHYLENE_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1039
+ZCL_HYDROGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1040
+ZCL_HYDROGEN_SULPHIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1041
+ZCL_NITRIC_OXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1042
+ZCL_NITROGEN_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1043
+ZCL_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1044
+ZCL_OZONE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1045
+ZCL_SULFUR_DIOXIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1046
+ZCL_DISSOLVED_OXYGEN_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1047
+ZCL_BROMATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1048
+ZCL_CHLORAMINES_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1049
+ZCL_CHLORINE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1050
+ZCL_FECAL_COLIFORM_AND_E_COLI_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1051
+ZCL_FLUORIDE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1052
+ZCL_HALOACETIC_ACIDS_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1053
+ZCL_TOTAL_TRIHALOMETHANES_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1054
+ZCL_TOTAL_COLIFORM_BACTERIA_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1055
+ZCL_TURBIDITY_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1056
+ZCL_COPPER_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1057
+ZCL_LEAD_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1058
+ZCL_MANGANESE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1059
+ZCL_SULFATE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1060
+ZCL_BROMODICHLOROMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1061
+ZCL_BROMOFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1062
+ZCL_CHLORODIBROMOMETHANE_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1063
+ZCL_CHLOROFORM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1064
+ZCL_SODIUM_CONCENTRATION_MEASUREMENT_CLUSTER_ID = 1065
+ZCL_IAS_ZONE_CLUSTER_ID = 1280
+ZCL_IAS_ACE_CLUSTER_ID = 1281
+ZCL_IAS_WD_CLUSTER_ID = 1282
+ZCL_WAKE_ON_LAN_CLUSTER_ID = 1283
+ZCL_CHANNEL_CLUSTER_ID = 1284
+ZCL_TARGET_NAVIGATOR_CLUSTER_ID = 1285
+ZCL_MEDIA_PLAYBACK_CLUSTER_ID = 1286
+ZCL_MEDIA_INPUT_CLUSTER_ID = 1287
+ZCL_LOW_POWER_CLUSTER_ID = 1288
+ZCL_KEYPAD_INPUT_CLUSTER_ID = 1289
+ZCL_CONTENT_LAUNCH_CLUSTER_ID = 1290
+ZCL_AUDIO_OUTPUT_CLUSTER_ID = 1291
+ZCL_APPLICATION_LAUNCHER_CLUSTER_ID = 1292
+ZCL_APPLICATION_BASIC_CLUSTER_ID = 1293
+ZCL_ACCOUNT_LOGIN_CLUSTER_ID = 1294
+ZCL_TEST_CLUSTER_ID = 1295
+ZCL_MESSAGING_CLUSTER_ID = 1795
+ZCL_APPLIANCE_IDENTIFICATION_CLUSTER_ID = 2816
+ZCL_METER_IDENTIFICATION_CLUSTER_ID = 2817
+ZCL_APPLIANCE_EVENTS_AND_ALERT_CLUSTER_ID = 2818
+ZCL_APPLIANCE_STATISTICS_CLUSTER_ID = 2819
+ZCL_ELECTRICAL_MEASUREMENT_CLUSTER_ID = 2820
+ZCL_BINDING_CLUSTER_ID = 61440
+ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID = 61444
+ZCL_SAMPLE_MFG_SPECIFIC_CLUSTER_ID = 64512
+
+
+
+_ATTRIBUTEMETADATA = _descriptor.Descriptor(
+ name='AttributeMetadata',
+ full_name='chip.rpc.AttributeMetadata',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='endpoint', full_name='chip.rpc.AttributeMetadata.endpoint', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='cluster', full_name='chip.rpc.AttributeMetadata.cluster', index=1,
+ number=2, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='attribute_id', full_name='chip.rpc.AttributeMetadata.attribute_id', index=2,
+ number=3, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='type', full_name='chip.rpc.AttributeMetadata.type', index=3,
+ number=4, type=14, cpp_type=8, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=53,
+ serialized_end=191,
+)
+
+
+_ATTRIBUTEDATA = _descriptor.Descriptor(
+ name='AttributeData',
+ full_name='chip.rpc.AttributeData',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='data_bool', full_name='chip.rpc.AttributeData.data_bool', index=0,
+ number=1, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_uint8', full_name='chip.rpc.AttributeData.data_uint8', index=1,
+ number=2, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_uint16', full_name='chip.rpc.AttributeData.data_uint16', index=2,
+ number=3, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_uint32', full_name='chip.rpc.AttributeData.data_uint32', index=3,
+ number=4, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_bytes', full_name='chip.rpc.AttributeData.data_bytes', index=4,
+ number=5, type=12, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"",
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_int8', full_name='chip.rpc.AttributeData.data_int8', index=5,
+ number=6, type=5, cpp_type=1, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_int16', full_name='chip.rpc.AttributeData.data_int16', index=6,
+ number=7, type=5, cpp_type=1, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data_int32', full_name='chip.rpc.AttributeData.data_int32', index=7,
+ number=8, type=5, cpp_type=1, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ _descriptor.OneofDescriptor(
+ name='data', full_name='chip.rpc.AttributeData.data',
+ index=0, containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[]),
+ ],
+ serialized_start=194,
+ serialized_end=393,
+)
+
+
+_ATTRIBUTEWRITE = _descriptor.Descriptor(
+ name='AttributeWrite',
+ full_name='chip.rpc.AttributeWrite',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='metadata', full_name='chip.rpc.AttributeWrite.metadata', index=0,
+ number=1, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='data', full_name='chip.rpc.AttributeWrite.data', index=1,
+ number=2, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=395,
+ serialized_end=497,
+)
+
+_ATTRIBUTEMETADATA.fields_by_name['cluster'].enum_type = _CLUSTERTYPE
+_ATTRIBUTEMETADATA.fields_by_name['type'].enum_type = _ATTRIBUTETYPE
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_bool'])
+_ATTRIBUTEDATA.fields_by_name['data_bool'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_uint8'])
+_ATTRIBUTEDATA.fields_by_name['data_uint8'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_uint16'])
+_ATTRIBUTEDATA.fields_by_name['data_uint16'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_uint32'])
+_ATTRIBUTEDATA.fields_by_name['data_uint32'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_bytes'])
+_ATTRIBUTEDATA.fields_by_name['data_bytes'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_int8'])
+_ATTRIBUTEDATA.fields_by_name['data_int8'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_int16'])
+_ATTRIBUTEDATA.fields_by_name['data_int16'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEDATA.oneofs_by_name['data'].fields.append(
+ _ATTRIBUTEDATA.fields_by_name['data_int32'])
+_ATTRIBUTEDATA.fields_by_name['data_int32'].containing_oneof = _ATTRIBUTEDATA.oneofs_by_name['data']
+_ATTRIBUTEWRITE.fields_by_name['metadata'].message_type = _ATTRIBUTEMETADATA
+_ATTRIBUTEWRITE.fields_by_name['data'].message_type = _ATTRIBUTEDATA
+DESCRIPTOR.message_types_by_name['AttributeMetadata'] = _ATTRIBUTEMETADATA
+DESCRIPTOR.message_types_by_name['AttributeData'] = _ATTRIBUTEDATA
+DESCRIPTOR.message_types_by_name['AttributeWrite'] = _ATTRIBUTEWRITE
+DESCRIPTOR.enum_types_by_name['AttributeType'] = _ATTRIBUTETYPE
+DESCRIPTOR.enum_types_by_name['ClusterType'] = _CLUSTERTYPE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+AttributeMetadata = _reflection.GeneratedProtocolMessageType('AttributeMetadata', (_message.Message,), {
+ 'DESCRIPTOR' : _ATTRIBUTEMETADATA,
+ '__module__' : 'attributes_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.AttributeMetadata)
+ })
+_sym_db.RegisterMessage(AttributeMetadata)
+
+AttributeData = _reflection.GeneratedProtocolMessageType('AttributeData', (_message.Message,), {
+ 'DESCRIPTOR' : _ATTRIBUTEDATA,
+ '__module__' : 'attributes_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.AttributeData)
+ })
+_sym_db.RegisterMessage(AttributeData)
+
+AttributeWrite = _reflection.GeneratedProtocolMessageType('AttributeWrite', (_message.Message,), {
+ 'DESCRIPTOR' : _ATTRIBUTEWRITE,
+ '__module__' : 'attributes_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.AttributeWrite)
+ })
+_sym_db.RegisterMessage(AttributeWrite)
+
+
+
+_ATTRIBUTES = _descriptor.ServiceDescriptor(
+ name='Attributes',
+ full_name='chip.rpc.Attributes',
+ file=DESCRIPTOR,
+ index=0,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_start=7274,
+ serialized_end=7407,
+ methods=[
+ _descriptor.MethodDescriptor(
+ name='Write',
+ full_name='chip.rpc.Attributes.Write',
+ index=0,
+ containing_service=None,
+ input_type=_ATTRIBUTEWRITE,
+ output_type=common__pb2._EMPTY,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='Read',
+ full_name='chip.rpc.Attributes.Read',
+ index=1,
+ containing_service=None,
+ input_type=_ATTRIBUTEMETADATA,
+ output_type=_ATTRIBUTEDATA,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+])
+_sym_db.RegisterServiceDescriptor(_ATTRIBUTES)
+
+DESCRIPTOR.services_by_name['Attributes'] = _ATTRIBUTES
+
+# @@protoc_insertion_point(module_scope)
diff --git a/rpc_tool/verify_rpc/protos/common_pb2.py b/rpc_tool/verify_rpc/protos/common_pb2.py
new file mode 100644
index 0000000..37ef8a1
--- /dev/null
+++ b/rpc_tool/verify_rpc/protos/common_pb2.py
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: common.proto
+# pylint: skip-file
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='common.proto',
+ package='pw.protobuf',
+ syntax='proto3',
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x0c\x63ommon.proto\x12\x0bpw.protobuf\"\x07\n\x05\x45mptyb\x06proto3'
+)
+
+
+
+
+_EMPTY = _descriptor.Descriptor(
+ name='Empty',
+ full_name='pw.protobuf.Empty',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=29,
+ serialized_end=36,
+)
+
+DESCRIPTOR.message_types_by_name['Empty'] = _EMPTY
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Empty = _reflection.GeneratedProtocolMessageType('Empty', (_message.Message,), {
+ 'DESCRIPTOR' : _EMPTY,
+ '__module__' : 'common_pb2'
+ # @@protoc_insertion_point(class_scope:pw.protobuf.Empty)
+ })
+_sym_db.RegisterMessage(Empty)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/rpc_tool/verify_rpc/protos/descriptor_service_pb2.py b/rpc_tool/verify_rpc/protos/descriptor_service_pb2.py
new file mode 100644
index 0000000..c600e3e
--- /dev/null
+++ b/rpc_tool/verify_rpc/protos/descriptor_service_pb2.py
@@ -0,0 +1,206 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: descriptor_service.proto
+# pylint: skip-file
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='descriptor_service.proto',
+ package='chip.rpc',
+ syntax='proto3',
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x18\x64\x65scriptor_service.proto\x12\x08\x63hip.rpc\"!\n\nDeviceType\x12\x13\n\x0b\x64\x65vice_type\x18\x01 \x01(\r\"\x1d\n\x07\x43luster\x12\x12\n\ncluster_id\x18\x01 \x01(\r\"\x1c\n\x08\x45ndpoint\x12\x10\n\x08\x65ndpoint\x18\x01 \x01(\r2\xf7\x01\n\nDescriptor\x12>\n\x0e\x44\x65viceTypeList\x12\x12.chip.rpc.Endpoint\x1a\x14.chip.rpc.DeviceType\"\x00\x30\x01\x12\x37\n\nServerList\x12\x12.chip.rpc.Endpoint\x1a\x11.chip.rpc.Cluster\"\x00\x30\x01\x12\x37\n\nClientList\x12\x12.chip.rpc.Endpoint\x1a\x11.chip.rpc.Cluster\"\x00\x30\x01\x12\x37\n\tPartsList\x12\x12.chip.rpc.Endpoint\x1a\x12.chip.rpc.Endpoint\"\x00\x30\x01\x62\x06proto3'
+)
+
+
+
+
+_DEVICETYPE = _descriptor.Descriptor(
+ name='DeviceType',
+ full_name='chip.rpc.DeviceType',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='device_type', full_name='chip.rpc.DeviceType.device_type', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=38,
+ serialized_end=71,
+)
+
+
+_CLUSTER = _descriptor.Descriptor(
+ name='Cluster',
+ full_name='chip.rpc.Cluster',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='cluster_id', full_name='chip.rpc.Cluster.cluster_id', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=73,
+ serialized_end=102,
+)
+
+
+_ENDPOINT = _descriptor.Descriptor(
+ name='Endpoint',
+ full_name='chip.rpc.Endpoint',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='endpoint', full_name='chip.rpc.Endpoint.endpoint', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=104,
+ serialized_end=132,
+)
+
+DESCRIPTOR.message_types_by_name['DeviceType'] = _DEVICETYPE
+DESCRIPTOR.message_types_by_name['Cluster'] = _CLUSTER
+DESCRIPTOR.message_types_by_name['Endpoint'] = _ENDPOINT
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+DeviceType = _reflection.GeneratedProtocolMessageType('DeviceType', (_message.Message,), {
+ 'DESCRIPTOR' : _DEVICETYPE,
+ '__module__' : 'descriptor_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.DeviceType)
+ })
+_sym_db.RegisterMessage(DeviceType)
+
+Cluster = _reflection.GeneratedProtocolMessageType('Cluster', (_message.Message,), {
+ 'DESCRIPTOR' : _CLUSTER,
+ '__module__' : 'descriptor_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.Cluster)
+ })
+_sym_db.RegisterMessage(Cluster)
+
+Endpoint = _reflection.GeneratedProtocolMessageType('Endpoint', (_message.Message,), {
+ 'DESCRIPTOR' : _ENDPOINT,
+ '__module__' : 'descriptor_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.Endpoint)
+ })
+_sym_db.RegisterMessage(Endpoint)
+
+
+
+_DESCRIPTOR = _descriptor.ServiceDescriptor(
+ name='Descriptor',
+ full_name='chip.rpc.Descriptor',
+ file=DESCRIPTOR,
+ index=0,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_start=135,
+ serialized_end=382,
+ methods=[
+ _descriptor.MethodDescriptor(
+ name='DeviceTypeList',
+ full_name='chip.rpc.Descriptor.DeviceTypeList',
+ index=0,
+ containing_service=None,
+ input_type=_ENDPOINT,
+ output_type=_DEVICETYPE,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='ServerList',
+ full_name='chip.rpc.Descriptor.ServerList',
+ index=1,
+ containing_service=None,
+ input_type=_ENDPOINT,
+ output_type=_CLUSTER,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='ClientList',
+ full_name='chip.rpc.Descriptor.ClientList',
+ index=2,
+ containing_service=None,
+ input_type=_ENDPOINT,
+ output_type=_CLUSTER,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='PartsList',
+ full_name='chip.rpc.Descriptor.PartsList',
+ index=3,
+ containing_service=None,
+ input_type=_ENDPOINT,
+ output_type=_ENDPOINT,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+])
+_sym_db.RegisterServiceDescriptor(_DESCRIPTOR)
+
+DESCRIPTOR.services_by_name['Descriptor'] = _DESCRIPTOR
+
+# @@protoc_insertion_point(module_scope)
diff --git a/rpc_tool/verify_rpc/protos/device_service_pb2.py b/rpc_tool/verify_rpc/protos/device_service_pb2.py
new file mode 100644
index 0000000..a26603b
--- /dev/null
+++ b/rpc_tool/verify_rpc/protos/device_service_pb2.py
@@ -0,0 +1,394 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler. DO NOT EDIT!
+# source: device_service.proto
+# pylint: skip-file
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from protos import common_pb2 as common__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+ name='device_service.proto',
+ package='chip.rpc',
+ syntax='proto3',
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_pb=b'\n\x14\x64\x65vice_service.proto\x12\x08\x63hip.rpc\x1a\x0c\x63ommon.proto\"X\n\x0bPairingInfo\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x15\n\rdiscriminator\x18\x02 \x01(\r\x12\x0f\n\x07qr_code\x18\x03 \x01(\t\x12\x13\n\x0bqr_code_url\x18\x04 \x01(\t\"\x91\x01\n\nDeviceInfo\x12\x11\n\tvendor_id\x18\x01 \x01(\r\x12\x12\n\nproduct_id\x18\x02 \x01(\r\x12\x18\n\x10software_version\x18\x03 \x01(\r\x12\x15\n\rserial_number\x18\x04 \x01(\t\x12+\n\x0cpairing_info\x18\x05 \x01(\x0b\x32\x15.chip.rpc.PairingInfo\"0\n\nFabricInfo\x12\x11\n\tfabric_id\x18\x01 \x01(\r\x12\x0f\n\x07node_id\x18\x02 \x01(\x04\"X\n\x0b\x44\x65viceState\x12\x1e\n\x16time_since_boot_millis\x18\x01 \x01(\x04\x12)\n\x0b\x66\x61\x62ric_info\x18\x02 \x03(\x0b\x32\x14.chip.rpc.FabricInfo\"\'\n\x0cPairingState\x12\x17\n\x0fpairing_enabled\x18\x01 \x01(\x08\x32\xeb\x03\n\x06\x44\x65vice\x12\x38\n\x0c\x46\x61\x63toryReset\x12\x12.pw.protobuf.Empty\x1a\x12.pw.protobuf.Empty\"\x00\x12\x32\n\x06Reboot\x12\x12.pw.protobuf.Empty\x1a\x12.pw.protobuf.Empty\"\x00\x12\x36\n\nTriggerOta\x12\x12.pw.protobuf.Empty\x1a\x12.pw.protobuf.Empty\"\x00\x12;\n\rGetDeviceInfo\x12\x12.pw.protobuf.Empty\x1a\x14.chip.rpc.DeviceInfo\"\x00\x12=\n\x0eGetDeviceState\x12\x12.pw.protobuf.Empty\x1a\x15.chip.rpc.DeviceState\"\x00\x12?\n\x0fSetPairingState\x12\x16.chip.rpc.PairingState\x1a\x12.pw.protobuf.Empty\"\x00\x12?\n\x0fGetPairingState\x12\x12.pw.protobuf.Empty\x1a\x16.chip.rpc.PairingState\"\x00\x12=\n\x0eSetPairingInfo\x12\x15.chip.rpc.PairingInfo\x1a\x12.pw.protobuf.Empty\"\x00\x62\x06proto3'
+ ,
+ dependencies=[common__pb2.DESCRIPTOR,])
+
+
+
+
+_PAIRINGINFO = _descriptor.Descriptor(
+ name='PairingInfo',
+ full_name='chip.rpc.PairingInfo',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='code', full_name='chip.rpc.PairingInfo.code', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='discriminator', full_name='chip.rpc.PairingInfo.discriminator', index=1,
+ number=2, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='qr_code', full_name='chip.rpc.PairingInfo.qr_code', index=2,
+ number=3, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='qr_code_url', full_name='chip.rpc.PairingInfo.qr_code_url', index=3,
+ number=4, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=48,
+ serialized_end=136,
+)
+
+
+_DEVICEINFO = _descriptor.Descriptor(
+ name='DeviceInfo',
+ full_name='chip.rpc.DeviceInfo',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='vendor_id', full_name='chip.rpc.DeviceInfo.vendor_id', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='product_id', full_name='chip.rpc.DeviceInfo.product_id', index=1,
+ number=2, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='software_version', full_name='chip.rpc.DeviceInfo.software_version', index=2,
+ number=3, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='serial_number', full_name='chip.rpc.DeviceInfo.serial_number', index=3,
+ number=4, type=9, cpp_type=9, label=1,
+ has_default_value=False, default_value=b"".decode('utf-8'),
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='pairing_info', full_name='chip.rpc.DeviceInfo.pairing_info', index=4,
+ number=5, type=11, cpp_type=10, label=1,
+ has_default_value=False, default_value=None,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=139,
+ serialized_end=284,
+)
+
+
+_FABRICINFO = _descriptor.Descriptor(
+ name='FabricInfo',
+ full_name='chip.rpc.FabricInfo',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='fabric_id', full_name='chip.rpc.FabricInfo.fabric_id', index=0,
+ number=1, type=13, cpp_type=3, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='node_id', full_name='chip.rpc.FabricInfo.node_id', index=1,
+ number=2, type=4, cpp_type=4, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=286,
+ serialized_end=334,
+)
+
+
+_DEVICESTATE = _descriptor.Descriptor(
+ name='DeviceState',
+ full_name='chip.rpc.DeviceState',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='time_since_boot_millis', full_name='chip.rpc.DeviceState.time_since_boot_millis', index=0,
+ number=1, type=4, cpp_type=4, label=1,
+ has_default_value=False, default_value=0,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ _descriptor.FieldDescriptor(
+ name='fabric_info', full_name='chip.rpc.DeviceState.fabric_info', index=1,
+ number=2, type=11, cpp_type=10, label=3,
+ has_default_value=False, default_value=[],
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=336,
+ serialized_end=424,
+)
+
+
+_PAIRINGSTATE = _descriptor.Descriptor(
+ name='PairingState',
+ full_name='chip.rpc.PairingState',
+ filename=None,
+ file=DESCRIPTOR,
+ containing_type=None,
+ create_key=_descriptor._internal_create_key,
+ fields=[
+ _descriptor.FieldDescriptor(
+ name='pairing_enabled', full_name='chip.rpc.PairingState.pairing_enabled', index=0,
+ number=1, type=8, cpp_type=7, label=1,
+ has_default_value=False, default_value=False,
+ message_type=None, enum_type=None, containing_type=None,
+ is_extension=False, extension_scope=None,
+ serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
+ ],
+ extensions=[
+ ],
+ nested_types=[],
+ enum_types=[
+ ],
+ serialized_options=None,
+ is_extendable=False,
+ syntax='proto3',
+ extension_ranges=[],
+ oneofs=[
+ ],
+ serialized_start=426,
+ serialized_end=465,
+)
+
+_DEVICEINFO.fields_by_name['pairing_info'].message_type = _PAIRINGINFO
+_DEVICESTATE.fields_by_name['fabric_info'].message_type = _FABRICINFO
+DESCRIPTOR.message_types_by_name['PairingInfo'] = _PAIRINGINFO
+DESCRIPTOR.message_types_by_name['DeviceInfo'] = _DEVICEINFO
+DESCRIPTOR.message_types_by_name['FabricInfo'] = _FABRICINFO
+DESCRIPTOR.message_types_by_name['DeviceState'] = _DEVICESTATE
+DESCRIPTOR.message_types_by_name['PairingState'] = _PAIRINGSTATE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+PairingInfo = _reflection.GeneratedProtocolMessageType('PairingInfo', (_message.Message,), {
+ 'DESCRIPTOR' : _PAIRINGINFO,
+ '__module__' : 'device_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.PairingInfo)
+ })
+_sym_db.RegisterMessage(PairingInfo)
+
+DeviceInfo = _reflection.GeneratedProtocolMessageType('DeviceInfo', (_message.Message,), {
+ 'DESCRIPTOR' : _DEVICEINFO,
+ '__module__' : 'device_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.DeviceInfo)
+ })
+_sym_db.RegisterMessage(DeviceInfo)
+
+FabricInfo = _reflection.GeneratedProtocolMessageType('FabricInfo', (_message.Message,), {
+ 'DESCRIPTOR' : _FABRICINFO,
+ '__module__' : 'device_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.FabricInfo)
+ })
+_sym_db.RegisterMessage(FabricInfo)
+
+DeviceState = _reflection.GeneratedProtocolMessageType('DeviceState', (_message.Message,), {
+ 'DESCRIPTOR' : _DEVICESTATE,
+ '__module__' : 'device_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.DeviceState)
+ })
+_sym_db.RegisterMessage(DeviceState)
+
+PairingState = _reflection.GeneratedProtocolMessageType('PairingState', (_message.Message,), {
+ 'DESCRIPTOR' : _PAIRINGSTATE,
+ '__module__' : 'device_service_pb2'
+ # @@protoc_insertion_point(class_scope:chip.rpc.PairingState)
+ })
+_sym_db.RegisterMessage(PairingState)
+
+
+
+_DEVICE = _descriptor.ServiceDescriptor(
+ name='Device',
+ full_name='chip.rpc.Device',
+ file=DESCRIPTOR,
+ index=0,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ serialized_start=468,
+ serialized_end=959,
+ methods=[
+ _descriptor.MethodDescriptor(
+ name='FactoryReset',
+ full_name='chip.rpc.Device.FactoryReset',
+ index=0,
+ containing_service=None,
+ input_type=common__pb2._EMPTY,
+ output_type=common__pb2._EMPTY,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='Reboot',
+ full_name='chip.rpc.Device.Reboot',
+ index=1,
+ containing_service=None,
+ input_type=common__pb2._EMPTY,
+ output_type=common__pb2._EMPTY,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='TriggerOta',
+ full_name='chip.rpc.Device.TriggerOta',
+ index=2,
+ containing_service=None,
+ input_type=common__pb2._EMPTY,
+ output_type=common__pb2._EMPTY,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='GetDeviceInfo',
+ full_name='chip.rpc.Device.GetDeviceInfo',
+ index=3,
+ containing_service=None,
+ input_type=common__pb2._EMPTY,
+ output_type=_DEVICEINFO,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='GetDeviceState',
+ full_name='chip.rpc.Device.GetDeviceState',
+ index=4,
+ containing_service=None,
+ input_type=common__pb2._EMPTY,
+ output_type=_DEVICESTATE,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='SetPairingState',
+ full_name='chip.rpc.Device.SetPairingState',
+ index=5,
+ containing_service=None,
+ input_type=_PAIRINGSTATE,
+ output_type=common__pb2._EMPTY,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='GetPairingState',
+ full_name='chip.rpc.Device.GetPairingState',
+ index=6,
+ containing_service=None,
+ input_type=common__pb2._EMPTY,
+ output_type=_PAIRINGSTATE,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+ _descriptor.MethodDescriptor(
+ name='SetPairingInfo',
+ full_name='chip.rpc.Device.SetPairingInfo',
+ index=7,
+ containing_service=None,
+ input_type=_PAIRINGINFO,
+ output_type=common__pb2._EMPTY,
+ serialized_options=None,
+ create_key=_descriptor._internal_create_key,
+ ),
+])
+_sym_db.RegisterServiceDescriptor(_DEVICE)
+
+DESCRIPTOR.services_by_name['Device'] = _DEVICE
+
+# @@protoc_insertion_point(module_scope)
diff --git a/rpc_tool/verify_rpc/requirements.txt b/rpc_tool/verify_rpc/requirements.txt
new file mode 100644
index 0000000..405134e
--- /dev/null
+++ b/rpc_tool/verify_rpc/requirements.txt
@@ -0,0 +1,6 @@
+freezegun==0.3.4
+immutabledict
+pigweed>=0.0.3
+pyserial>=3.5
+mobly
+simple_term_menu
\ No newline at end of file
diff --git a/rpc_tool/verify_rpc/rpc_tool.py b/rpc_tool/verify_rpc/rpc_tool.py
new file mode 100644
index 0000000..d053eb3
--- /dev/null
+++ b/rpc_tool/verify_rpc/rpc_tool.py
@@ -0,0 +1,329 @@
+# Copyright 2022 Google LLC
+#
+# 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.
+
+"""Matter RPC verification tool."""
+import enum
+import datetime
+import immutabledict
+import logging
+import os
+import shutil
+import simple_term_menu
+import sys
+import time
+from typing import Optional
+
+from mobly import asserts
+from mobly import base_test
+from mobly import test_runner
+
+import pw_hdlc.rpc
+import pw_rpc
+
+import serial.tools.list_ports
+import serial
+
+from protos import attributes_service_pb2, descriptor_service_pb2, device_service_pb2
+
+# Menu selection option
+_EXIT_OPTION_TEXT = "exit"
+
+# Matter spec definition
+_ROOT_NODE_ID = 0
+_ON_OFF_CLUSTER_ID = 6
+_ON_OFF_ATTRIBUTE_ID = 0
+_PROTOS = (attributes_service_pb2, descriptor_service_pb2, device_service_pb2)
+
+# Test results and logs.
+_MOBLY_LOG_DIRECTORY = "/tmp/logs/mobly/RpcTest/latest"
+_TEST_RESULT_DIR_PREFIX = "rpc_test_result"
+_PW_HDLC_LOG = "pw_hdlc.log"
+
+# Serial connection.
+_READ_BYTE_SIZE = 4096
+_BAUDRATE = 115200
+_SERIAL_TIMEOUT = 0.01
+
+# Device bootup wait time.
+_BOOTUP_TIMEOUT = 30
+_POLLING_PERIOD = 1
+_CALLBACK_TIMEOUT = 3
+
+# Disable logger to avoid excessive logs.
+_LOGGER = logging.getLogger("pw_rpc.callback_client")
+_LOGGER.disabled = True
+
+
+class MatterAppType(enum.Enum):
+ """Matter application type."""
+ LIGHT = "light"
+ NONE = "none"
+
+
+class MatterDeviceType(enum.Enum):
+ """The supported Matter device types and their IDs in spec."""
+ # Matter device type spec:
+ # https://github.com/CHIP-Specifications/connectedhomeip-spec/tree/master/src/device_types
+ ColorTemperatureLight = 0x010C
+ DimmableLight = 0x0101
+ OnOffLight = 0x0100
+ NoneOfTheAbove = -1
+
+
+# Device type and app type mapping
+# TODO: Add more types mapping
+DeviceTypeToAppType = immutabledict.immutabledict({
+ MatterDeviceType.ColorTemperatureLight: MatterAppType.LIGHT,
+ MatterDeviceType.DimmableLight: MatterAppType.LIGHT,
+ MatterDeviceType.OnOffLight: MatterAppType.LIGHT,
+ MatterDeviceType.NoneOfTheAbove: MatterAppType.NONE
+})
+
+
+class MatterDevice:
+ """Matter device class wrapper."""
+
+ def __init__(self, address: str, device_type: MatterDeviceType):
+ """Device class constructor.
+
+ 1. Open serial connection of the device.
+ 2. Create HDLC RPC client instance of the device
+
+ Args:
+ address: Device serial address.
+ device_type: Device type of the Matter device.
+ """
+ self.serial_inst = serial.Serial(
+ address, _BAUDRATE, timeout=_SERIAL_TIMEOUT)
+
+ callback_client_impl = pw_rpc.callback_client.Impl(
+ default_unary_timeout_s=_CALLBACK_TIMEOUT,
+ default_stream_timeout_s=_CALLBACK_TIMEOUT)
+
+ self.client = pw_hdlc.rpc.HdlcRpcClient(
+ read=lambda: self.serial_inst.read(_READ_BYTE_SIZE),
+ paths_or_modules=_PROTOS,
+ channels=pw_hdlc.rpc.default_channels(self.serial_inst.write),
+ output=self.write_hdlc_log,
+ client_impl=callback_client_impl)
+
+ self._endpoint_id = self._get_endpoint_id_by_device_type(device_type)
+ self._app_type = DeviceTypeToAppType[device_type]
+
+ def _get_endpoint_id_by_device_type(
+ self, device_type: MatterDeviceType) -> int:
+ """Gets the endpoint ID corresponding to the device type."""
+ if device_type == MatterDeviceType.NoneOfTheAbove:
+ return -1
+ _, endpoints = self.descriptor_service.PartsList(endpoint=_ROOT_NODE_ID)
+ for endpoint in endpoints:
+ endpoint_id = endpoint.endpoint
+ _, type_inst = self.descriptor_service.DeviceTypeList(
+ endpoint=endpoint_id)
+ if type_inst[0].device_type == device_type.value:
+ return endpoint_id
+ raise RuntimeError(f"No endpoint corresponding to {device_type.name}.")
+
+ @property
+ def app_type(self) -> MatterAppType:
+ """App type of the device."""
+ return self._app_type
+
+ @property
+ def attribute_service(self) -> pw_rpc.client.ServiceClient:
+ """Returns the attribute RPC service."""
+ return self.client.rpcs().chip.rpc.Attributes
+
+ @property
+ def descriptor_service(self) -> pw_rpc.client.ServiceClient:
+ """Returns the descriptor RPC service."""
+ return self.client.rpcs().chip.rpc.Descriptor
+
+ @property
+ def device_service(self) -> pw_rpc.client.ServiceClient:
+ """Returns the device RPC service."""
+ return self.client.rpcs().chip.rpc.Device
+
+ def close(self) -> None:
+ """Close the serial connection."""
+ self.serial_inst.close()
+
+ @staticmethod
+ def write_hdlc_log(data: bytes) -> None:
+ """Stores HDLC RPC logs."""
+ with open(_PW_HDLC_LOG, "w") as output:
+ output.write(data.decode() + "\n")
+ output.flush()
+
+ def turn_light_on_or_off(self, on: bool) -> None:
+ """Turns on or off the light if applicable."""
+ if self.app_type != MatterAppType.LIGHT:
+ raise RuntimeError("Device is not a light.")
+
+ self.attribute_service.Write(
+ data=attributes_service_pb2.AttributeData(data_bool=on),
+ metadata=attributes_service_pb2.AttributeMetadata(
+ endpoint=self._endpoint_id,
+ cluster=_ON_OFF_CLUSTER_ID,
+ attribute_id=_ON_OFF_ATTRIBUTE_ID,
+ type=attributes_service_pb2.AttributeType.ZCL_BOOLEAN_ATTRIBUTE_TYPE))
+
+ def get_light_state(self) -> bool:
+ """Returns True if the light is currently on. False if off."""
+ if self.app_type != MatterAppType.LIGHT:
+ raise RuntimeError("Device is not a light.")
+
+ _, data = self.attribute_service.Read(
+ endpoint=self._endpoint_id,
+ cluster=_ON_OFF_CLUSTER_ID,
+ attribute_id=_ON_OFF_ATTRIBUTE_ID,
+ type=attributes_service_pb2.AttributeType.ZCL_BOOLEAN_ATTRIBUTE_TYPE)
+
+ return data.data_bool
+
+
+class MatterRpcTest(base_test.BaseTestClass):
+ """Matter RPC Mobly Test.
+
+ Tests include: reboot, factory reset, descriptor cluster service
+ and attribute service RPC tests.
+ """
+
+ def setup_class(self):
+ """Device selection and creation."""
+ self.dut = None
+ self.fw_version = None
+ selected_device = self._device_selection()
+ if selected_device is None:
+ sys.exit(0)
+ device_type = self._device_type_selection()
+ self.dut = MatterDevice(selected_device, device_type)
+
+ def teardown_class(self):
+ """Closes device and generates test result."""
+ if self.dut is not None:
+ self.dut.close()
+ self._generate_test_result()
+
+ def teardown_test(self):
+ """Polls device until it's online."""
+ # Some devices will crash without cooling down first
+ time.sleep(_POLLING_PERIOD)
+ bootup_time = time.time() + _BOOTUP_TIMEOUT
+ while time.time() < bootup_time:
+ try:
+ self.dut.device_service.GetDeviceInfo()
+ return
+ except pw_rpc.callback_client.errors.RpcTimeout:
+ time.sleep(_POLLING_PERIOD)
+ raise RuntimeError(f"Device fails to bootup in {_BOOTUP_TIMEOUT} secs.")
+
+ def test_rpc_firmware_version(self):
+ """Tests firmware_version."""
+ ack, device_info = self.dut.device_service.GetDeviceInfo()
+ asserts.assert_true(ack, "RPC ack value is not True.")
+ asserts.assert_is_not_none(device_info.software_version)
+ self.fw_version = device_info.software_version
+
+ def test_rpc_reboot(self):
+ """Tests reboot method."""
+ ack, _ = self.dut.device_service.Reboot()
+ asserts.assert_true(ack, "RPC ack value is not True.")
+
+ def test_rpc_factory_reset(self):
+ """Tests factory reset method."""
+ ack, _ = self.dut.device_service.FactoryReset()
+ asserts.assert_true(ack, "RPC ack value is not True.")
+
+ def test_rpc_descriptor_cluster(self):
+ """Tests descriptor cluster service"""
+ ack, endpoints = self.dut.descriptor_service.PartsList(endpoint=0)
+ asserts.assert_true(ack, "RPC ack value is not True.")
+ asserts.assert_true(bool(endpoints), "Endpoint list is empty.")
+ for endpoint in endpoints:
+ ack, device_type = self.dut.descriptor_service.DeviceTypeList(endpoint=endpoint.endpoint)
+ asserts.assert_true(ack, "RPC ack value is not True.")
+ asserts.assert_is_instance(device_type[0].device_type, int)
+
+ def test_rpc_attribute_service(self):
+ """Tests attribute service."""
+ # Every endpoint works, so pick the first one
+ _, endpoints = self.dut.descriptor_service.PartsList(endpoint=0)
+ endpoint_id = endpoints[0].endpoint
+
+ # Every cluster works, so pick the first one
+ ack, clusters = self.dut.descriptor_service.ServerList(endpoint=endpoint_id)
+ asserts.assert_true(ack, "RPC ack value is not True.")
+ asserts.assert_true(bool(clusters), "Cluster list is empty.")
+ cluster_id = clusters[0].cluster_id
+
+ # Read the attribute from the endpoint
+ ack, data = self.dut.attribute_service.Read(
+ endpoint=endpoint_id,
+ cluster=cluster_id,
+ attribute_id=0,
+ type=attributes_service_pb2.AttributeType.ZCL_BITMAP32_ATTRIBUTE_TYPE)
+ asserts.assert_true(ack, "RPC ack value is not True.")
+ asserts.assert_is_instance(data.data_uint32, int)
+
+ def test_light_app_type(self):
+ """Tests light on off if device is a light."""
+ if self.dut.app_type == MatterAppType.LIGHT:
+ # Turn on the light
+ self.dut.turn_light_on_or_off(on=True)
+ asserts.assert_true(self.dut.get_light_state(), "The light is not on")
+ # Turn off the light
+ self.dut.turn_light_on_or_off(on=False)
+ asserts.assert_false(self.dut.get_light_state(), "The light is not off")
+ else:
+ asserts.skip("Light test is skipped.")
+
+ @staticmethod
+ def _device_selection() -> Optional[str]:
+ """Selects device via terminal menu.
+
+ Returns:
+ The selected device address. None if "exit" is selected.
+ """
+ devices = serial.tools.list_ports.comports()
+ options = [device.description + f" (serial number {device.serial_number})"
+ for device in devices] + [_EXIT_OPTION_TEXT]
+ menu = simple_term_menu.TerminalMenu(options)
+ selected_index = menu.show()
+ return None if selected_index >= len(devices) else devices[selected_index].device
+
+ @staticmethod
+ def _device_type_selection() -> MatterDeviceType:
+ """Selects the Matter device type of your device."""
+ all_types = list(MatterDeviceType)
+ options = [matter_type.name for matter_type in all_types]
+ menu = simple_term_menu.TerminalMenu(options, title="Select the device type:")
+ selected_index = menu.show()
+ return all_types[selected_index]
+
+ def _generate_test_result(self) -> None:
+ """Generates RPC test result."""
+ fw_version = self.fw_version if self.fw_version is not None else "unknown"
+ test_result_dir = (
+ f"{_TEST_RESULT_DIR_PREFIX}-{fw_version}-"
+ f"{str(datetime.datetime.now())}")
+ shutil.copytree(_MOBLY_LOG_DIRECTORY, test_result_dir)
+ if os.path.exists(_PW_HDLC_LOG):
+ shutil.move(_PW_HDLC_LOG, f"{test_result_dir}/{_PW_HDLC_LOG}")
+ shutil.make_archive(test_result_dir, "zip", test_result_dir)
+ shutil.rmtree(test_result_dir)
+
+
+if __name__ == "__main__":
+ test_runner.main()
diff --git a/rpc_tool/verify_rpc/rpc_tool_test.py b/rpc_tool/verify_rpc/rpc_tool_test.py
new file mode 100644
index 0000000..9a3ac6f
--- /dev/null
+++ b/rpc_tool/verify_rpc/rpc_tool_test.py
@@ -0,0 +1,336 @@
+# Copyright 2022 Google LLC
+#
+# 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.
+
+"""Unit test for Matter RPC verification tool."""
+import os
+import shutil
+import sys
+import time
+import unittest
+from unittest import mock
+
+from freezegun import freeze_time
+
+from mobly import asserts
+from mobly import config_parser
+import pw_hdlc.rpc
+import pw_rpc
+import serial
+import serial.tools.list_ports
+import simple_term_menu
+
+import rpc_tool
+
+_FAKE_DEVICE_ADDRESS = "fake-device-address"
+_FAKE_DESCRIPTION = "fake-description"
+_FAKE_TIME_NOW = "2022-06-01"
+_FAKE_INDEX = 0
+_FAKE_MATTER_DATA = 1
+
+
+class MatterDeviceTest(unittest.TestCase):
+ """Unit tests for MatterDevice."""
+
+ def setUp(self):
+ super().setUp()
+ serial_patcher = mock.patch.object(serial, "Serial")
+ serial_patcher.start()
+ self.addCleanup(serial_patcher.stop)
+ impl_patcher = mock.patch.object(pw_rpc.callback_client, "Impl")
+ impl_patcher.start()
+ self.addCleanup(impl_patcher.stop)
+ client_patcher = mock.patch.object(pw_hdlc.rpc, "HdlcRpcClient")
+ fake_client_class = client_patcher.start()
+ self.fake_client = fake_client_class.return_value
+ self.addCleanup(client_patcher.stop)
+ self.uut = rpc_tool.MatterDevice(
+ address=_FAKE_DEVICE_ADDRESS,
+ device_type=rpc_tool.MatterDeviceType.NoneOfTheAbove)
+
+ def test_attribute_service(self):
+ """Verifies attribute_service on success."""
+ self.assertEqual(
+ self.fake_client.rpcs.return_value.chip.rpc.Attributes,
+ self.uut.attribute_service)
+
+ def test_descriptor_service(self):
+ """Verifies descriptor_service on success."""
+ self.assertEqual(
+ self.fake_client.rpcs.return_value.chip.rpc.Descriptor,
+ self.uut.descriptor_service)
+
+ def test_device_service(self):
+ """Verifies device_service on success."""
+ self.assertEqual(
+ self.fake_client.rpcs.return_value.chip.rpc.Device,
+ self.uut.device_service)
+
+ def test_close(self):
+ """Verifies close method on success."""
+ self.uut.close()
+
+ self.uut.serial_inst.close.assert_called_once()
+
+ @mock.patch.object(rpc_tool, "open")
+ def test_write_hdlc_log(self, mock_open):
+ """Verifies write_hdlc_log method on success."""
+ mock_output = mock.Mock()
+ mock_open.return_value.__enter__.return_value = mock_output
+
+ self.uut.write_hdlc_log(b"")
+
+ mock_output.write.assert_called_once_with("\n")
+ mock_output.flush.assert_called_once()
+
+ def test_get_endpoint_id_by_device_type_none_type(self):
+ """Verifies _get_endpoint_id_by_device_type with NoneOfTheAbove."""
+ self.assertEqual(-1,
+ self.uut._get_endpoint_id_by_device_type(
+ rpc_tool.MatterDeviceType.NoneOfTheAbove))
+
+ def test_get_endpoint_id_by_device_type_normal_type(self):
+ """Verifies _get_endpoint_id_by_device_type with normal type."""
+ fake_endpoints = [mock.Mock(endpoint=_FAKE_MATTER_DATA)]
+ fake_type_inst = [mock.Mock(device_type=_FAKE_MATTER_DATA)]
+ fake_descriptor_service = mock.Mock()
+ fake_descriptor_service.PartsList.return_value = (
+ True, fake_endpoints)
+ fake_descriptor_service.DeviceTypeList.return_value = (
+ True, fake_type_inst)
+ self.fake_client.rpcs.return_value.chip.rpc.Descriptor = (
+ fake_descriptor_service)
+
+ fake_type = mock.Mock(value=_FAKE_MATTER_DATA)
+ self.assertEqual(
+ _FAKE_MATTER_DATA,
+ self.uut._get_endpoint_id_by_device_type(fake_type))
+
+ fake_type_not_exist = mock.Mock(value=0)
+ with self.assertRaisesRegex(RuntimeError, "No endpoint corresponding"):
+ self.uut._get_endpoint_id_by_device_type(fake_type_not_exist)
+
+ def test_app_type(self):
+ """Verifies app_type property."""
+ self.assertEqual(rpc_tool.MatterAppType.NONE, self.uut.app_type)
+
+ def test_turn_light_on_or_off_on_failure(self):
+ """Verifies turn_light_on_or_off on failure."""
+ with self.assertRaisesRegex(RuntimeError, "not a light"):
+ self.uut.turn_light_on_or_off(True)
+
+ def test_turn_light_on_or_off_on_success(self):
+ """Verifies turn_light_on_or_off on success."""
+ self.uut._app_type = rpc_tool.MatterAppType.LIGHT
+ self.uut._endpoint_id = _FAKE_MATTER_DATA
+
+ self.uut.turn_light_on_or_off(True)
+
+ (self.fake_client.rpcs.return_value.chip.rpc.Attributes.
+ Write.assert_called_once())
+
+ def test_get_light_state_on_failure(self):
+ """Verifies get_light_state on failure."""
+ with self.assertRaisesRegex(RuntimeError, "not a light"):
+ self.uut.get_light_state()
+
+ def test_get_light_state_on_success(self):
+ """Verifies get_light_state on success."""
+ self.uut._app_type = rpc_tool.MatterAppType.LIGHT
+ self.uut._endpoint_id = _FAKE_MATTER_DATA
+ self.fake_client.rpcs.return_value.chip.rpc.Attributes.Read.return_value = (
+ True, mock.Mock(data_bool=True))
+
+ self.assertTrue(self.uut.get_light_state())
+
+
+class MatterRpcToolTest(unittest.TestCase):
+ """Unit tests for RPC tool module."""
+
+ def setUp(self):
+ super().setUp()
+ mock_configs = config_parser.TestRunConfig()
+ self.uut = rpc_tool.MatterRpcTest(mock_configs)
+ mock_matter_device = mock.MagicMock(spec=rpc_tool.MatterDevice)
+ matter_device_class_patcher = mock.patch.object(
+ rpc_tool,
+ "MatterDevice",
+ return_value=mock_matter_device)
+ matter_device_class_patcher.start()
+ self.addCleanup(matter_device_class_patcher.stop)
+ self.uut.dut = mock_matter_device
+
+ @mock.patch.object(
+ rpc_tool.MatterRpcTest,
+ "_device_type_selection",
+ return_value=rpc_tool.MatterDeviceType.NoneOfTheAbove)
+ @mock.patch.object(
+ rpc_tool.MatterRpcTest,
+ "_device_selection",
+ return_value=_FAKE_DEVICE_ADDRESS)
+ def test_setup_class_select_device(
+ self, mock_device_selection, mock_type_selection):
+ """Verifies setup class selects a valid device."""
+ self.uut.setup_class()
+
+ self.assertIsNotNone(self.uut.dut)
+
+ @mock.patch.object(
+ rpc_tool.MatterRpcTest,
+ "_device_type_selection",
+ return_value=rpc_tool.MatterDeviceType.NoneOfTheAbove)
+ @mock.patch.object(sys, "exit")
+ @mock.patch.object(
+ rpc_tool.MatterRpcTest, "_device_selection", return_value=None)
+ def test_setup_class_exit(
+ self, mock_device_selection, mock_exit, mock_type_selection):
+ """Verifies setup class exits without selecting device."""
+ self.uut.setup_class()
+
+ mock_exit.assert_called_once()
+
+ @mock.patch.object(rpc_tool.MatterRpcTest, "_generate_test_result")
+ def test_teardown_class(self, mock_generate_test_result):
+ """Verifies teardown_class on success."""
+ self.uut.teardown_class()
+
+ self.uut.dut.close.assert_called_once()
+ mock_generate_test_result.assert_called_once()
+
+ @mock.patch.object(time, "sleep")
+ def test_teardown_test_on_success(self, mock_sleep):
+ """Verifies teardown_test on success."""
+ self.uut.teardown_test()
+
+ mock_sleep.assert_called_once()
+ self.uut.dut.device_service.GetDeviceInfo.assert_called_once()
+
+ @mock.patch.object(time, "sleep")
+ @mock.patch.object(time, "time",
+ side_effect=[0, rpc_tool._BOOTUP_TIMEOUT-1, rpc_tool._BOOTUP_TIMEOUT+1])
+ def test_teardown_test_on_failure(self, mock_time, mock_sleep):
+ """Verifies teardown_test on failure."""
+ fake_rpc = mock.Mock(method='')
+ self.uut.dut.device_service.GetDeviceInfo.side_effect = (
+ pw_rpc.callback_client.errors.RpcTimeout(rpc=fake_rpc, timeout=0))
+
+ with self.assertRaisesRegex(RuntimeError, "fails to bootup"):
+ self.uut.teardown_test()
+
+ def test_rpc_firmware_version_test(self):
+ """Verifies firmware_version test on success."""
+ mock_device_info = mock.Mock(software_version=_FAKE_MATTER_DATA)
+ self.uut.dut.device_service.GetDeviceInfo.return_value = (
+ True, mock_device_info)
+
+ self.uut.test_rpc_firmware_version()
+
+ def test_rpc_reboot_test(self):
+ """Verifies rpc_reboot test on success."""
+ self.uut.dut.device_service.Reboot.return_value = True, None
+
+ self.uut.test_rpc_reboot()
+
+ def test_rpc_factory_reset_test(self):
+ """Verifies rpc_factory_reset test on success."""
+ self.uut.dut.device_service.FactoryReset.return_value = True, None
+
+ self.uut.test_rpc_factory_reset()
+
+ def test_rpc_descriptor_cluster_test(self):
+ """Verifies test_rpc_descriptor_cluster on success."""
+ mock_endpoints = [mock.Mock(endpoint=_FAKE_MATTER_DATA)]
+ mock_device_type = [mock.Mock(device_type=_FAKE_MATTER_DATA)]
+ self.uut.dut.descriptor_service.PartsList.return_value = (
+ True, mock_endpoints)
+ self.uut.dut.descriptor_service.DeviceTypeList.return_value = (
+ True, mock_device_type)
+
+ self.uut.test_rpc_descriptor_cluster()
+
+ def test_rpc_attribute_service_test(self):
+ """Verifies test_rpc_attribute_service on success."""
+ mock_endpoints = [mock.Mock(endpoint=_FAKE_MATTER_DATA)]
+ mock_clusters = [mock.Mock(cluster_id=_FAKE_MATTER_DATA)]
+ mock_data = mock.Mock(data_uint32=_FAKE_MATTER_DATA)
+ self.uut.dut.descriptor_service.PartsList.return_value = (
+ True, mock_endpoints)
+ self.uut.dut.descriptor_service.ServerList.return_value = (
+ True, mock_clusters)
+ self.uut.dut.attribute_service.Read.return_value = (
+ True, mock_data)
+
+ self.uut.test_rpc_attribute_service()
+
+ def test_light_app_type_test(self):
+ """Verifies test_light_app_type on success."""
+ self.uut.dut.app_type = rpc_tool.MatterAppType.LIGHT
+ self.uut.dut.get_light_state.side_effect = [True, False]
+
+ self.uut.test_light_app_type()
+
+ @mock.patch.object(asserts, "skip")
+ def test_light_app_type_test_skip(self, mock_skip):
+ """Verifies test_light_app_type skipping."""
+ self.uut.test_light_app_type()
+
+ mock_skip.assert_called_once()
+
+ @mock.patch.object(simple_term_menu.TerminalMenu, "show")
+ def test_device_type_selection(self, mock_menu_show):
+ """Verifies _device_type_selection on success."""
+ mock_menu_show.return_value = _FAKE_INDEX
+ expected_selected_type = list(rpc_tool.MatterDeviceType)[0]
+
+ self.assertEqual(
+ expected_selected_type,
+ self.uut._device_type_selection())
+
+ @mock.patch.object(simple_term_menu.TerminalMenu, "show")
+ @mock.patch.object(serial.tools.list_ports, "comports")
+ def test_device_selection(self, mock_comports, mock_menu_show):
+ """Verifies device_selection on success."""
+ fake_device = mock.Mock(
+ device=_FAKE_DEVICE_ADDRESS, description=_FAKE_DESCRIPTION)
+ mock_comports.return_value = [fake_device]
+ mock_menu_show.return_value = _FAKE_INDEX
+
+ self.assertEqual(_FAKE_DEVICE_ADDRESS, self.uut._device_selection())
+
+ @freeze_time(_FAKE_TIME_NOW)
+ @mock.patch.object(os.path, "exists", return_value=True)
+ @mock.patch.object(shutil, "rmtree")
+ @mock.patch.object(shutil, "move")
+ @mock.patch.object(shutil, "make_archive")
+ @mock.patch.object(shutil, "copytree")
+ def test_generate_test_result(
+ self, mock_copy, mock_make, mock_move, mock_rm, mock_exists):
+ """Verifies generate_test_result on success."""
+ self.uut.fw_version = None
+ fake_test_dir = (
+ f"{rpc_tool._TEST_RESULT_DIR_PREFIX}-unknown-{_FAKE_TIME_NOW}"
+ " 00:00:00")
+
+ self.uut._generate_test_result()
+
+ mock_copy.assert_called_once_with(
+ rpc_tool._MOBLY_LOG_DIRECTORY, fake_test_dir)
+ mock_make.assert_called_once_with(fake_test_dir, "zip", fake_test_dir)
+ mock_move.assert_called_once_with(
+ rpc_tool._PW_HDLC_LOG, f"{fake_test_dir}/{rpc_tool._PW_HDLC_LOG}")
+ mock_rm.assert_called_once_with(fake_test_dir)
+ mock_exists.assert_called_once_with(rpc_tool._PW_HDLC_LOG)
+
+
+if __name__ == "__main__":
+ unittest.main(failfast=True)
diff --git a/rpc_tool/verify_rpc/stress_test_suite.py b/rpc_tool/verify_rpc/stress_test_suite.py
new file mode 100644
index 0000000..5c95ba3
--- /dev/null
+++ b/rpc_tool/verify_rpc/stress_test_suite.py
@@ -0,0 +1,75 @@
+# Copyright 2022 Google LLC
+#
+# 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.
+
+"""Matter RPC stress test suite."""
+from mobly import test_runner
+
+import rpc_tool
+
+_STRESS_ITERATION = 50
+
+
+class MatterRpcStressTest(rpc_tool.MatterRpcTest):
+ """Matter RPC Mobly Test.
+
+ Tests include: reboot, factory reset, descriptor cluster service
+ and attribute service RPC tests.
+ """
+
+ def setup_generated_tests(self):
+ """Creates stress test targets"""
+ self.generate_tests(
+ test_logic=self.reboot_sdk,
+ name_func=lambda i: "test_reboot_%s" % i,
+ arg_sets=[(i,) for i in range(_STRESS_ITERATION)])
+
+ self.generate_tests(
+ test_logic=self.factory_reset_sdk,
+ name_func=lambda i: "test_factory_reset_%s" % i,
+ arg_sets=[(i,) for i in range(_STRESS_ITERATION)])
+
+ self.generate_tests(
+ test_logic=self.check_descriptor_cluster,
+ name_func=lambda i: "test_descriptor_cluster_%s" % i,
+ arg_sets=[(i,) for i in range(_STRESS_ITERATION)])
+
+ self.generate_tests(
+ test_logic=self.check_attribute_service,
+ name_func=lambda i: "test_attribute_service_%s" % i,
+ arg_sets=[(i,) for i in range(_STRESS_ITERATION)])
+
+
+ def reboot_sdk(self, iteration):
+ """Reboot logic."""
+ del iteration # Unused
+ self.test_rpc_reboot()
+
+ def factory_reset_sdk(self, iteration):
+ """Factory reset logic."""
+ del iteration # Unused
+ self.test_rpc_factory_reset()
+
+ def check_descriptor_cluster(self, iteration):
+ """Descriptor cluster logic."""
+ del iteration # Unused
+ self.test_rpc_descriptor_cluster()
+
+ def check_attribute_service(self, iteration):
+ """Attribute service logic."""
+ del iteration # Unused
+ self.test_rpc_attribute_service()
+
+
+if __name__ == "__main__":
+ test_runner.main()
diff --git a/rpc_tool/verify_rpc/test_config.yml b/rpc_tool/verify_rpc/test_config.yml
new file mode 100644
index 0000000..e2066f3
--- /dev/null
+++ b/rpc_tool/verify_rpc/test_config.yml
@@ -0,0 +1,2 @@
+TestBeds:
+ - Name: RpcTest