diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9065e984b..8d076cf00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,11 +13,22 @@ variables: .setup_idf: &setup_idf # - cd $REPOS_PATH # IDF_PATH is set to something else already? # using release/v4.4 branch of espressif/esp-idf github repo - - git clone --recursive --single-branch -b release/v4.4 --reference-if-able /local_references/github/ https://github.com/espressif/esp-idf.git + - git clone --recursive -b release/v4.4 --reference-if-able /local_references/github/ https://github.com/espressif/esp-idf.git - cd esp-idf - ./install.sh - . export.sh +.setup_idf_v5_0: &setup_idf_v5_0 + # - cd $REPOS_PATH # IDF_PATH is set to something else already? + # using commit 047903c612 of espressif/esp-idf github repo + # idf_v5_0 is used for bridge_zigbee_example and examples of ESP32-H2 + - git clone --recursive --reference-if-able /local_references/github/ https://github.com/espressif/esp-idf.git + - cd esp-idf + - git checkout 047903c612e2c7212693c0861966bf7c83430ebf + - git submodule update --init --recursive + - ./install.sh + - . ./export.sh + .setup_matter: &setup_matter - cd $ESP_MATTER_PATH - source connectedhomeip/connectedhomeip/scripts/bootstrap.sh @@ -56,14 +67,9 @@ variables: - idf.py build .build_bridge_zigbee_app: &build_bridge_zigbee_app - - idf.py build - - cd $IDF_PATH - - git checkout b05b70c7f39a45b9bb8d09498b45edbe3b7bfc22 - - git submodule update --init --recursive - - rm -rf $HOME/.espressif/python_env - - ./install.sh - - . ./export.sh - cd $ESP_MATTER_PATH/examples/bridge_zigbee +# pyparsing in python_env created by matter is version 2.4.0 IDF v5.0 requires 3.0.8 + - pip install pyparsing==3.0.8 - idf.py set-target esp32 - idf.py build @@ -81,6 +87,20 @@ build_esp_matter_examples: - *setup_idf - *setup_matter - *build_examples + +build_esp_matter_examples_idf_v5_0: + stage: build + image: $CI_DOCKER_REGISTRY/esp32-ci-env:matter + tags: + - build + + script: + - export ESP_MATTER_PATH=$PWD + - mkdir repos + - export REPOS_PATH=$PWD/repos + - *chip_submodule_update + - *setup_idf_v5_0 + - *setup_matter - *build_bridge_zigbee_app build_upstream_examples: diff --git a/components/esp_matter/CMakeLists.txt b/components/esp_matter/CMakeLists.txt index 746f83050..63ecd56c1 100644 --- a/components/esp_matter/CMakeLists.txt +++ b/components/esp_matter/CMakeLists.txt @@ -86,3 +86,5 @@ idf_component_register( SRC_DIRS ${SRC_DIRS_LIST} # esp-matter/connectedhomeip/connectedhomeip/src/app/EventManagement.cpp:467:23: error: 'writer' is # used uninitialized in this function idf_build_set_property(COMPILE_OPTIONS "-Wno-error=uninitialized;-Wno-error=maybe-uninitialized;-Wno-missing-field-initializers;" APPEND) +target_compile_options(${COMPONENT_LIB} PUBLIC + "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=") diff --git a/components/esp_matter/esp_matter.h b/components/esp_matter/esp_matter.h index 9aa67fbfd..9f0510621 100644 --- a/components/esp_matter/esp_matter.h +++ b/components/esp_matter/esp_matter.h @@ -43,6 +43,8 @@ typedef enum endpoint_flags { ENDPOINT_FLAG_NONE = 0x00, /** The endpoint can be destroyed using `endpoint::destroy()` */ ENDPOINT_FLAG_DESTROYABLE = 0x01, + /** The endpoint is a bridged node */ + ENDPOINT_FLAG_BRIDGE = 0x02, } endpoint_flags_t; /** Cluster flags */ @@ -97,9 +99,9 @@ typedef enum command_flags { /** The command is not a standard command */ COMMAND_FLAG_CUSTOM = 0x01, /** The command is client generated */ - COMMAND_FLAG_CLIENT_GENERATED = 0x02, + COMMAND_FLAG_ACCEPTED = 0x02, /** The command is server generated */ - COMMAND_FLAG_SERVER_GENERATED = 0x04, + COMMAND_FLAG_GENERATED = 0x04, } command_flags_t; } /* esp_matter */ diff --git a/components/esp_matter/esp_matter_command.cpp b/components/esp_matter/esp_matter_command.cpp index 5e2fe7035..0654ca5a9 100644 --- a/components/esp_matter/esp_matter_command.cpp +++ b/components/esp_matter/esp_matter_command.cpp @@ -871,39 +871,38 @@ namespace command { command_t *create_key_set_write(cluster_t *cluster) { - return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetWrite::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_key_set_write); + return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetWrite::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_key_set_write); } command_t *create_key_set_read(cluster_t *cluster) { - return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetRead::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_key_set_read); + return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetRead::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_key_set_read); } command_t *create_key_set_remove(cluster_t *cluster) { - return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetRemove::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_key_set_remove); + return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetRemove::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_key_set_remove); } command_t *create_key_set_read_all_indices(cluster_t *cluster) { return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetReadAllIndices::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_key_set_read_all_indices); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_key_set_read_all_indices); } command_t *create_key_set_read_response(cluster_t *cluster) { return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetReadResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_key_set_read_all_indices_response(cluster_t *cluster) { return esp_matter::command::create(cluster, GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } } /* command */ @@ -914,40 +913,38 @@ namespace command { command_t *create_arm_fail_safe(cluster_t *cluster) { - return esp_matter::command::create(cluster, GeneralCommissioning::Commands::ArmFailSafe::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_arm_fail_safe); + return esp_matter::command::create(cluster, GeneralCommissioning::Commands::ArmFailSafe::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_arm_fail_safe); } command_t *create_set_regulatory_config(cluster_t *cluster) { return esp_matter::command::create(cluster, GeneralCommissioning::Commands::SetRegulatoryConfig::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_set_regulatory_config); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_set_regulatory_config); } command_t *create_commissioning_complete(cluster_t *cluster) { return esp_matter::command::create(cluster, GeneralCommissioning::Commands::CommissioningComplete::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_commissioning_complete); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_commissioning_complete); } command_t *create_arm_fail_safe_response(cluster_t *cluster) { return esp_matter::command::create(cluster, GeneralCommissioning::Commands::ArmFailSafeResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_set_regulatory_config_response(cluster_t *cluster) { return esp_matter::command::create(cluster, GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_commissioning_complete_response(cluster_t *cluster) { return esp_matter::command::create(cluster, GeneralCommissioning::Commands::CommissioningCompleteResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } } /* command */ @@ -958,58 +955,56 @@ namespace command { command_t *create_scan_networks(cluster_t *cluster) { - return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ScanNetworks::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_scan_networks); + return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ScanNetworks::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_scan_networks); } command_t *create_add_or_update_wifi_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_add_or_update_wifi_network); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_or_update_wifi_network); } command_t *create_add_or_update_thread_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_add_or_update_thread_network); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_or_update_thread_network); } command_t *create_remove_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::RemoveNetwork::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_remove_network); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_network); } command_t *create_connect_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ConnectNetwork::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_connect_network); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_connect_network); } command_t *create_reorder_network(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ReorderNetwork::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_reorder_network); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_reorder_network); } command_t *create_scan_networks_response(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ScanNetworksResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_network_config_response(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::NetworkConfigResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_connect_network_response(cluster_t *cluster) { return esp_matter::command::create(cluster, NetworkCommissioning::Commands::ConnectNetworkResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } } /* command */ @@ -1021,21 +1016,20 @@ namespace command { command_t *create_open_commissioning_window(cluster_t *cluster) { return esp_matter::command::create(cluster, AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_open_commissioning_window); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_open_commissioning_window); } command_t *create_open_basic_commissioning_window(cluster_t *cluster) { return esp_matter::command::create(cluster, AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, - COMMAND_FLAG_CLIENT_GENERATED, + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_open_basic_commissioning_window); } command_t *create_revoke_commissioning(cluster_t *cluster) { return esp_matter::command::create(cluster, AdministratorCommissioning::Commands::RevokeCommissioning::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_revoke_commissioning); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_revoke_commissioning); } } /* command */ @@ -1047,82 +1041,80 @@ namespace command { command_t *create_attestation_request(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::AttestationRequest::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_attestation_request); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_attestation_request); } command_t *create_certificate_chain_request(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::CertificateChainRequest::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_certificate_chain_request); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_certificate_chain_request); } command_t *create_csr_request(cluster_t *cluster) { - return esp_matter::command::create(cluster, OperationalCredentials::Commands::CSRRequest::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_csr_request); + return esp_matter::command::create(cluster, OperationalCredentials::Commands::CSRRequest::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_csr_request); } command_t *create_add_noc(cluster_t *cluster) { - return esp_matter::command::create(cluster, OperationalCredentials::Commands::AddNOC::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_add_noc); + return esp_matter::command::create(cluster, OperationalCredentials::Commands::AddNOC::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_add_noc); } command_t *create_update_noc(cluster_t *cluster) { - return esp_matter::command::create(cluster, OperationalCredentials::Commands::UpdateNOC::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_update_noc); + return esp_matter::command::create(cluster, OperationalCredentials::Commands::UpdateNOC::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_update_noc); } command_t *create_update_fabric_label(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::UpdateFabricLabel::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_update_fabric_label); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_update_fabric_label); } command_t *create_remove_fabric(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::RemoveFabric::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_remove_fabric); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_fabric); } command_t *create_add_trusted_root_certificate(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::AddTrustedRootCertificate::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_add_trusted_root_certificate); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_trusted_root_certificate); } command_t *create_remove_trusted_root_certificate(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::RemoveTrustedRootCertificate::Id, - COMMAND_FLAG_CLIENT_GENERATED, + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_trusted_root_certificate); } command_t *create_attestation_response(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::AttestationResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_certificate_chain_response(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::CertificateChainResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_csr_response(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::CSRResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_noc_response(cluster_t *cluster) { return esp_matter::command::create(cluster, OperationalCredentials::Commands::NOCResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } } /* command */ @@ -1134,32 +1126,31 @@ namespace command { command_t *create_query_image(cluster_t *cluster) { return esp_matter::command::create(cluster, OtaSoftwareUpdateProvider::Commands::QueryImage::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_query_image); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_query_image); } command_t *create_apply_update_request(cluster_t *cluster) { return esp_matter::command::create(cluster, OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_apply_update_request); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_apply_update_request); } command_t *create_notify_update_applied(cluster_t *cluster) { return esp_matter::command::create(cluster, OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_notify_update_applied); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_notify_update_applied); } command_t *create_query_image_response(cluster_t *cluster) { return esp_matter::command::create(cluster, OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_apply_update_response(cluster_t *cluster) { return esp_matter::command::create(cluster, OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } } /* command */ @@ -1171,8 +1162,7 @@ namespace command { command_t *create_announce_ota_provider(cluster_t *cluster) { return esp_matter::command::create(cluster, OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_announce_ota_provider); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_announce_ota_provider); } } /* command */ @@ -1183,20 +1173,20 @@ namespace command { command_t *create_identify(cluster_t *cluster) { - return esp_matter::command::create(cluster, Identify::Commands::Identify::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Identify::Commands::Identify::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_identify); } command_t *create_identify_query(cluster_t *cluster) { - return esp_matter::command::create(cluster, Identify::Commands::IdentifyQuery::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Identify::Commands::IdentifyQuery::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_identify_query); } command_t *create_identify_query_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Identify::Commands::IdentifyQueryResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + return esp_matter::command::create(cluster, Identify::Commands::IdentifyQueryResponse::Id, COMMAND_FLAG_GENERATED, + NULL); } } /* command */ @@ -1207,63 +1197,60 @@ namespace command { command_t *create_add_group(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::AddGroup::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Groups::Commands::AddGroup::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_group); } command_t *create_view_group(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::ViewGroup::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Groups::Commands::ViewGroup::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_view_group); } command_t *create_get_group_membership(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::GetGroupMembership::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Groups::Commands::GetGroupMembership::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_get_group_membership); } command_t *create_remove_group(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::RemoveGroup::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Groups::Commands::RemoveGroup::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_group); } command_t *create_remove_all_groups(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::RemoveAllGroups::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Groups::Commands::RemoveAllGroups::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_all_groups); } command_t *create_add_group_if_identifying(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::AddGroupIfIdentifying::Id, - COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Groups::Commands::AddGroupIfIdentifying::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_group_if_identifying); } command_t *create_add_group_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::AddGroupResponse::Id, COMMAND_FLAG_SERVER_GENERATED, - NULL); + return esp_matter::command::create(cluster, Groups::Commands::AddGroupResponse::Id, COMMAND_FLAG_GENERATED, NULL); } command_t *create_view_group_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::ViewGroupResponse::Id, COMMAND_FLAG_SERVER_GENERATED, - NULL); + return esp_matter::command::create(cluster, Groups::Commands::ViewGroupResponse::Id, COMMAND_FLAG_GENERATED, NULL); } command_t *create_get_group_membership_response(cluster_t *cluster) { return esp_matter::command::create(cluster, Groups::Commands::GetGroupMembershipResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } command_t *create_remove_group_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Groups::Commands::RemoveGroupResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + return esp_matter::command::create(cluster, Groups::Commands::RemoveGroupResponse::Id, COMMAND_FLAG_GENERATED, + NULL); } } /* command */ @@ -1274,80 +1261,77 @@ namespace command { command_t *create_add_scene(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::AddScene::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::AddScene::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_add_scene); } command_t *create_view_scene(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::ViewScene::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::ViewScene::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_view_scene); } command_t *create_remove_scene(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::RemoveScene::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::RemoveScene::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_scene); } command_t *create_remove_all_scenes(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::RemoveAllScenes::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::RemoveAllScenes::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_remove_all_scenes); } command_t *create_store_scene(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::StoreScene::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::StoreScene::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_store_scene); } command_t *create_recall_scene(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::RecallScene::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::RecallScene::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_recall_scene); } command_t *create_get_scene_membership(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::GetSceneMembership::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, Scenes::Commands::GetSceneMembership::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_get_scene_membership); } command_t *create_add_scene_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::AddSceneResponse::Id, COMMAND_FLAG_SERVER_GENERATED, - NULL); + return esp_matter::command::create(cluster, Scenes::Commands::AddSceneResponse::Id, COMMAND_FLAG_GENERATED, NULL); } command_t *create_view_scene_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::ViewSceneResponse::Id, COMMAND_FLAG_SERVER_GENERATED, - NULL); + return esp_matter::command::create(cluster, Scenes::Commands::ViewSceneResponse::Id, COMMAND_FLAG_GENERATED, NULL); } command_t *create_remove_scene_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::RemoveSceneResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + return esp_matter::command::create(cluster, Scenes::Commands::RemoveSceneResponse::Id, COMMAND_FLAG_GENERATED, + NULL); } command_t *create_remove_all_scenes_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::RemoveAllScenesResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + return esp_matter::command::create(cluster, Scenes::Commands::RemoveAllScenesResponse::Id, COMMAND_FLAG_GENERATED, + NULL); } command_t *create_store_scene_response(cluster_t *cluster) { - return esp_matter::command::create(cluster, Scenes::Commands::StoreSceneResponse::Id, COMMAND_FLAG_SERVER_GENERATED, - NULL); + return esp_matter::command::create(cluster, Scenes::Commands::StoreSceneResponse::Id, COMMAND_FLAG_GENERATED, NULL); } command_t *create_get_scene_membership_response(cluster_t *cluster) { return esp_matter::command::create(cluster, Scenes::Commands::GetSceneMembershipResponse::Id, - COMMAND_FLAG_SERVER_GENERATED, NULL); + COMMAND_FLAG_GENERATED, NULL); } } /* command */ @@ -1358,38 +1342,37 @@ namespace command { command_t *create_off(cluster_t *cluster) { - return esp_matter::command::create(cluster, OnOff::Commands::Off::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, OnOff::Commands::Off::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_off); } command_t *create_on(cluster_t *cluster) { - return esp_matter::command::create(cluster, OnOff::Commands::On::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, OnOff::Commands::On::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_on); } command_t *create_toggle(cluster_t *cluster) { - return esp_matter::command::create(cluster, OnOff::Commands::Toggle::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, OnOff::Commands::Toggle::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_toggle); } command_t *create_off_with_effect(cluster_t *cluster) { - return esp_matter::command::create(cluster, OnOff::Commands::OffWithEffect::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, OnOff::Commands::OffWithEffect::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_off_with_effect); } command_t *create_on_with_recall_global_scene(cluster_t *cluster) { - return esp_matter::command::create(cluster, OnOff::Commands::OnWithRecallGlobalScene::Id, - COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, OnOff::Commands::OnWithRecallGlobalScene::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_on_with_recall_global_scene); } command_t *create_on_with_timed_off(cluster_t *cluster) { - return esp_matter::command::create(cluster, OnOff::Commands::OnWithTimedOff::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, OnOff::Commands::OnWithTimedOff::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_on_with_timed_off); } @@ -1401,51 +1384,50 @@ namespace command { command_t *create_move_to_level(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::MoveToLevel::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, LevelControl::Commands::MoveToLevel::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_level); } command_t *create_move(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::Move::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, LevelControl::Commands::Move::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move); } command_t *create_step(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::Step::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, LevelControl::Commands::Step::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_step); } command_t *create_stop(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::Stop::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, LevelControl::Commands::Stop::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_stop); } command_t *create_move_to_level_with_on_off(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::MoveToLevelWithOnOff::Id, - COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, LevelControl::Commands::MoveToLevelWithOnOff::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_level_with_on_off); } command_t *create_move_with_on_off(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::MoveWithOnOff::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_move_with_on_off); + return esp_matter::command::create(cluster, LevelControl::Commands::MoveWithOnOff::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_move_with_on_off); } command_t *create_step_with_on_off(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::StepWithOnOff::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_step_with_on_off); + return esp_matter::command::create(cluster, LevelControl::Commands::StepWithOnOff::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_step_with_on_off); } command_t *create_stop_with_on_off(cluster_t *cluster) { - return esp_matter::command::create(cluster, LevelControl::Commands::StopWithOnOff::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_stop_with_on_off); + return esp_matter::command::create(cluster, LevelControl::Commands::StopWithOnOff::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_stop_with_on_off); } } /* command */ @@ -1456,50 +1438,49 @@ namespace command { command_t *create_move_to_hue(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::MoveToHue::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, ColorControl::Commands::MoveToHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_hue); } command_t *create_move_hue(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::MoveHue::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, ColorControl::Commands::MoveHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_hue); } command_t *create_step_hue(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::StepHue::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, ColorControl::Commands::StepHue::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_step_hue); } command_t *create_move_to_saturation(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::MoveToSaturation::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_move_to_saturation); + return esp_matter::command::create(cluster, ColorControl::Commands::MoveToSaturation::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_move_to_saturation); } command_t *create_move_saturation(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::MoveSaturation::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_move_saturation); + return esp_matter::command::create(cluster, ColorControl::Commands::MoveSaturation::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_move_saturation); } command_t *create_step_saturation(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::StepSaturation::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_step_saturation); + return esp_matter::command::create(cluster, ColorControl::Commands::StepSaturation::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_step_saturation); } command_t *create_move_to_hue_and_saturation(cluster_t *cluster) { return esp_matter::command::create(cluster, ColorControl::Commands::MoveToHueAndSaturation::Id, - COMMAND_FLAG_CLIENT_GENERATED, - esp_matter_command_callback_move_to_hue_and_saturation); + COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_move_to_hue_and_saturation); } command_t *create_stop_move_step(cluster_t *cluster) { - return esp_matter::command::create(cluster, ColorControl::Commands::StopMoveStep::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, ColorControl::Commands::StopMoveStep::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_stop_move_step); } @@ -1511,8 +1492,8 @@ namespace command { command_t *create_setpoint_raise_lower(cluster_t *cluster) { - return esp_matter::command::create(cluster, Thermostat::Commands::SetpointRaiseLower::Id, - COMMAND_FLAG_CLIENT_GENERATED, esp_matter_command_callback_setpoint_raise_lower); + return esp_matter::command::create(cluster, Thermostat::Commands::SetpointRaiseLower::Id, COMMAND_FLAG_ACCEPTED, + esp_matter_command_callback_setpoint_raise_lower); } } /* command */ @@ -1523,13 +1504,13 @@ namespace command { command_t *create_lock_door(cluster_t *cluster) { - return esp_matter::command::create(cluster, DoorLock::Commands::LockDoor::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, DoorLock::Commands::LockDoor::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_lock_door); } command_t *create_unlock_door(cluster_t *cluster) { - return esp_matter::command::create(cluster, DoorLock::Commands::UnlockDoor::Id, COMMAND_FLAG_CLIENT_GENERATED, + return esp_matter::command::create(cluster, DoorLock::Commands::UnlockDoor::Id, COMMAND_FLAG_ACCEPTED, esp_matter_command_callback_unlock_door); } diff --git a/components/esp_matter/esp_matter_core.cpp b/components/esp_matter/esp_matter_core.cpp index 2c048b034..80e9cd86b 100644 --- a/components/esp_matter/esp_matter_core.cpp +++ b/components/esp_matter/esp_matter_core.cpp @@ -91,6 +91,7 @@ typedef struct _endpoint { _cluster_t *cluster_list; EmberAfEndpointType *endpoint_type; DataVersion *data_versions_ptr; + EmberAfDeviceType *device_types_ptr; struct _endpoint *next; } _endpoint_t; @@ -294,11 +295,11 @@ static esp_err_t disable(endpoint_t *endpoint) /* Free attributes */ free((void *)endpoint_type->cluster[cluster_index].attributes); /* Free commands */ - if (endpoint_type->cluster[cluster_index].clientGeneratedCommandList) { - free((void *)endpoint_type->cluster[cluster_index].clientGeneratedCommandList); + if (endpoint_type->cluster[cluster_index].acceptedCommandList) { + free((void *)endpoint_type->cluster[cluster_index].acceptedCommandList); } - if (endpoint_type->cluster[cluster_index].serverGeneratedCommandList) { - free((void *)endpoint_type->cluster[cluster_index].serverGeneratedCommandList); + if (endpoint_type->cluster[cluster_index].generatedCommandList) { + free((void *)endpoint_type->cluster[cluster_index].generatedCommandList); } } free((void *)endpoint_type->cluster); @@ -309,6 +310,12 @@ static esp_err_t disable(endpoint_t *endpoint) current_endpoint->data_versions_ptr = NULL; } + /* Free device types */ + if (current_endpoint->device_types_ptr) { + free(current_endpoint->device_types_ptr); + current_endpoint->device_types_ptr = NULL; + } + /* Free endpoint type */ free(endpoint_type); current_endpoint->endpoint_type = NULL; @@ -332,6 +339,32 @@ esp_err_t enable(endpoint_t *endpoint) } current_endpoint->endpoint_type = endpoint_type; + /* Device types */ + /** TODO: This assumes only 1 device type per endpoint. Also, it is hardcoded for bridge device types. Change it. */ + int default_device_version = 1; + int device_type_count = 1; + if (current_endpoint->flags & ENDPOINT_FLAG_BRIDGE) { + device_type_count++; + } + EmberAfDeviceType *device_types_ptr = (EmberAfDeviceType *)calloc(device_type_count, sizeof(EmberAfDeviceType)); + if (!device_types_ptr) { + ESP_LOGE(TAG, "Couldn't allocate device_types"); + free(endpoint_type); + current_endpoint->endpoint_type = NULL; + /* goto cleanup is not used here to avoid 'crosses initialization' of device_types below */ + return ESP_ERR_NO_MEM; + } + device_types_ptr[0].deviceId = current_endpoint->device_type_id; + device_types_ptr[0].deviceVersion = default_device_version; + if (current_endpoint->flags & ENDPOINT_FLAG_BRIDGE) { + device_types_ptr[1].deviceId = current_endpoint->endpoint_id == 0 ? + endpoint::bridge::get_device_type_id() : + endpoint::bridged_node::get_device_type_id(); + device_types_ptr[1].deviceVersion = default_device_version; + } + chip::Span device_types(device_types_ptr, device_type_count); + current_endpoint->device_types_ptr = device_types_ptr; + /* Clusters */ _cluster_t *cluster = current_endpoint->cluster_list; int cluster_count = cluster::get_count(cluster); @@ -340,7 +373,9 @@ esp_err_t enable(endpoint_t *endpoint) DataVersion *data_versions_ptr = (DataVersion *)calloc(1, cluster_count * sizeof(DataVersion)); if (!data_versions_ptr) { ESP_LOGE(TAG, "Couldn't allocate data_versions"); + free(data_versions_ptr); free(endpoint_type); + current_endpoint->data_versions_ptr = NULL; current_endpoint->endpoint_type = NULL; /* goto cleanup is not used here to avoid 'crosses initialization' of data_versions below */ return ESP_ERR_NO_MEM; @@ -358,14 +393,13 @@ esp_err_t enable(endpoint_t *endpoint) int attribute_count = 0; int attribute_index = 0; EmberAfAttributeMetadata *matter_attributes = NULL; - CommandId *client_generated_command_ids = NULL; - CommandId *server_generated_command_ids = NULL; + CommandId *accepted_command_ids = NULL; + CommandId *generated_command_ids = NULL; _command_t *command = NULL; int command_count = 0; int command_index = 0; int command_flag = COMMAND_FLAG_NONE; int endpoint_index = 0; - int default_device_version = 1; matter_clusters = (EmberAfCluster *)calloc(1, cluster_count * sizeof(EmberAfCluster)); if (!matter_clusters) { @@ -403,51 +437,51 @@ esp_err_t enable(endpoint_t *endpoint) command_count = 0; command_index = 0; command_flag = COMMAND_FLAG_NONE; - client_generated_command_ids = NULL; - server_generated_command_ids = NULL; + accepted_command_ids = NULL; + generated_command_ids = NULL; /* Client Generated Commands */ - command_flag = COMMAND_FLAG_CLIENT_GENERATED; + command_flag = COMMAND_FLAG_ACCEPTED; command = cluster->command_list; command_count = command::get_count(command, command_flag); if (command_count > 0) { command_index = 0; - client_generated_command_ids = (CommandId *)calloc(1, (command_count + 1) * sizeof(CommandId)); - if (!client_generated_command_ids) { - ESP_LOGE(TAG, "Couldn't allocate client_generated_command_ids"); + accepted_command_ids = (CommandId *)calloc(1, (command_count + 1) * sizeof(CommandId)); + if (!accepted_command_ids) { + ESP_LOGE(TAG, "Couldn't allocate accepted_command_ids"); err = ESP_ERR_NO_MEM; break; } while (command) { if (command->flags & command_flag) { - client_generated_command_ids[command_index] = command->command_id; + accepted_command_ids[command_index] = command->command_id; command_index++; } command = command->next; } - client_generated_command_ids[command_index] = kInvalidCommandId; + accepted_command_ids[command_index] = kInvalidCommandId; } /* Server Generated Commands */ - command_flag = COMMAND_FLAG_SERVER_GENERATED; + command_flag = COMMAND_FLAG_GENERATED; command = cluster->command_list; command_count = command::get_count(command, command_flag); if (command_count > 0) { command_index = 0; - server_generated_command_ids = (CommandId *)calloc(1, (command_count + 1) * sizeof(CommandId)); - if (!server_generated_command_ids) { - ESP_LOGE(TAG, "Couldn't allocate server_generated_command_ids"); + generated_command_ids = (CommandId *)calloc(1, (command_count + 1) * sizeof(CommandId)); + if (!generated_command_ids) { + ESP_LOGE(TAG, "Couldn't allocate generated_command_ids"); err = ESP_ERR_NO_MEM; break; } while (command) { if (command->flags & command_flag) { - server_generated_command_ids[command_index] = command->command_id; + generated_command_ids[command_index] = command->command_id; command_index++; } command = command->next; } - server_generated_command_ids[command_index] = kInvalidCommandId; + generated_command_ids[command_index] = kInvalidCommandId; } /* Fill up the cluster */ @@ -456,8 +490,8 @@ esp_err_t enable(endpoint_t *endpoint) matter_clusters[cluster_index].attributeCount = attribute_count; matter_clusters[cluster_index].mask = cluster->flags; matter_clusters[cluster_index].functions = (EmberAfGenericClusterFunction *)cluster->function_list; - matter_clusters[cluster_index].clientGeneratedCommandList = client_generated_command_ids; - matter_clusters[cluster_index].serverGeneratedCommandList = server_generated_command_ids; + matter_clusters[cluster_index].acceptedCommandList = accepted_command_ids; + matter_clusters[cluster_index].generatedCommandList = generated_command_ids; /* Get next cluster */ endpoint_type->endpointSize += matter_clusters[cluster_index].clusterSize; @@ -466,8 +500,8 @@ esp_err_t enable(endpoint_t *endpoint) /* This is to avoid double free in case of errors */ matter_attributes = NULL; - client_generated_command_ids = NULL; - server_generated_command_ids = NULL; + accepted_command_ids = NULL; + generated_command_ids = NULL; } if (err != ESP_OK) { goto cleanup; @@ -485,9 +519,8 @@ esp_err_t enable(endpoint_t *endpoint) /* Add Endpoint */ endpoint_index = endpoint::get_next_index(); - status = emberAfSetDynamicEndpoint(endpoint_index, current_endpoint->endpoint_id, endpoint_type, - current_endpoint->device_type_id, default_device_version, - chip::Span(data_versions)); + status = emberAfSetDynamicEndpoint(endpoint_index, current_endpoint->endpoint_id, endpoint_type, data_versions, + device_types); if (status != EMBER_ZCL_STATUS_SUCCESS) { ESP_LOGE(TAG, "Error adding dynamic endpoint %d: 0x%x", current_endpoint->endpoint_id, status); err = ESP_FAIL; @@ -503,11 +536,11 @@ esp_err_t enable(endpoint_t *endpoint) return err; cleanup: - if (server_generated_command_ids) { - free(server_generated_command_ids); + if (generated_command_ids) { + free(generated_command_ids); } - if (client_generated_command_ids) { - free(client_generated_command_ids); + if (accepted_command_ids) { + free(accepted_command_ids); } if (matter_attributes) { free(matter_attributes); @@ -519,11 +552,11 @@ cleanup: free((void *)matter_clusters[cluster_index].attributes); } /* Free commands */ - if (matter_clusters[cluster_index].clientGeneratedCommandList) { - free((void *)matter_clusters[cluster_index].clientGeneratedCommandList); + if (matter_clusters[cluster_index].acceptedCommandList) { + free((void *)matter_clusters[cluster_index].acceptedCommandList); } - if (matter_clusters[cluster_index].serverGeneratedCommandList) { - free((void *)matter_clusters[cluster_index].serverGeneratedCommandList); + if (matter_clusters[cluster_index].generatedCommandList) { + free((void *)matter_clusters[cluster_index].generatedCommandList); } } free(matter_clusters); @@ -532,6 +565,10 @@ cleanup: free(data_versions_ptr); current_endpoint->data_versions_ptr = NULL; } + if (device_types_ptr) { + free(device_types_ptr); + current_endpoint->device_types_ptr = NULL; + } if (endpoint_type) { free(endpoint_type); current_endpoint->endpoint_type = NULL; @@ -593,7 +630,13 @@ esp_err_t chip_stack_unlock() static void esp_matter_chip_init_task(intptr_t context) { xTaskHandle task_to_notify = reinterpret_cast(context); - chip::Server::GetInstance().Init(); + + static chip::CommonCaseDeviceServerInitParams initParams; + initParams.InitializeStaticResourcesBeforeServerInit(); + /** TODO: Add these callbacks and pass them on to the application */ + // initParams.appDelegate = &sCallbacks; + chip::Server::GetInstance().Init(initParams); + #if CONFIG_ESP_MATTER_USE_ESP_DAC_PROVIDER SetDeviceAttestationCredentialsProvider(esp_matter_dac_provider_get()); #else @@ -1225,7 +1268,7 @@ endpoint_t *create(node_t *node, uint8_t flags) /* Set */ endpoint->endpoint_id = current_node->current_endpoint_id++; - endpoint->device_type_id = 0xFFFF; + endpoint->device_type_id = 0xFFFF'FFFF; endpoint->flags = flags; /* Add */ @@ -1352,9 +1395,14 @@ esp_err_t set_device_type_id(endpoint_t *endpoint, int device_type_id) return ESP_OK; } -int get_device_type_id(int endpoint_id) +int get_device_type_id(endpoint_t *endpoint) { - int device_type_id = emberAfGetDeviceIdForEndpoint(endpoint_id); + if (!endpoint) { + ESP_LOGE(TAG, "Endpoint cannot be NULL"); + return ESP_ERR_INVALID_ARG; + } + _endpoint_t *current_endpoint = (_endpoint_t *)endpoint; + int device_type_id = current_endpoint->device_type_id; return device_type_id; } diff --git a/components/esp_matter/esp_matter_core.h b/components/esp_matter/esp_matter_core.h index ef9a49d4f..ec79bd6c4 100644 --- a/components/esp_matter/esp_matter_core.h +++ b/components/esp_matter/esp_matter_core.h @@ -201,12 +201,12 @@ esp_err_t set_device_type_id(endpoint_t *endpoint, int device_type_id); * * Get the device type ID for the endpoint. * - * @param[in] endpoint_id Endpoint ID for the endpoint. + * @param[in] endpoint Endpoint handle. * * @return device type ID on success. * @return 0xFFFF in case of failure or if the device type ID was not set. */ -int get_device_type_id(int endpoint_id); +int get_device_type_id(endpoint_t *endpoint); /** Enable endpoint * diff --git a/components/esp_matter/esp_matter_endpoint.cpp b/components/esp_matter/esp_matter_endpoint.cpp index 5e189db7f..cc0dc5e56 100644 --- a/components/esp_matter/esp_matter_endpoint.cpp +++ b/components/esp_matter/esp_matter_endpoint.cpp @@ -24,6 +24,7 @@ #define ESP_MATTER_ON_OFF_SWITCH_DEVICE_TYPE_ID 0x0103 #define ESP_MATTER_FAN_DEVICE_TYPE_ID 0x002B #define ESP_MATTER_THERMOSTAT_DEVICE_TYPE_ID 0x0301 +#define ESP_MATTER_BRIDGE_DEVICE_TYPE_ID 0x000E #define ESP_MATTER_BRIDGED_NODE_DEVICE_TYPE_ID 0x0013 #define ESP_MATTER_DOOR_LOCK_DEVICE_TYPE_ID 0x000A #define ESP_MATTER_TEMPERATURE_SENSOR_DEVICE_TYPE_ID 0x0302 @@ -226,6 +227,13 @@ endpoint_t *create(node_t *node, config_t *config, uint8_t flags) } } /* thermostat */ +namespace bridge { +int get_device_type_id() +{ + return ESP_MATTER_BRIDGE_DEVICE_TYPE_ID; +} +} /* bridge */ + namespace bridged_node { int get_device_type_id() { diff --git a/components/esp_matter/esp_matter_endpoint.h b/components/esp_matter/esp_matter_endpoint.h index adba5b3fc..8f9c90e33 100644 --- a/components/esp_matter/esp_matter_endpoint.h +++ b/components/esp_matter/esp_matter_endpoint.h @@ -126,6 +126,10 @@ int get_device_type_id(); endpoint_t *create(node_t *node, config_t *config, uint8_t flags); } /* thermostat */ +namespace bridge { +int get_device_type_id(); +} /* bridge */ + namespace bridged_node { typedef struct config { bridged_device_basic::config_t bridged_device_basic; diff --git a/components/esp_matter/zap_common/zap-generated/access.h b/components/esp_matter/zap_common/zap-generated/access.h new file mode 100644 index 000000000..c0fd2b722 --- /dev/null +++ b/components/esp_matter/zap_common/zap-generated/access.h @@ -0,0 +1,557 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include + +// Prevent changing generated format +// clang-format off + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, attribute, privilege) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__CLUSTER { \ + 31, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 31, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: Access Control, Attribute: SubjectsPerAccessControlEntry, Privilege: view */ \ + /* Cluster: Access Control, Attribute: TargetsPerAccessControlEntry, Privilege: view */ \ + /* Cluster: Access Control, Attribute: AccessControlEntriesPerFabric, Privilege: view */ \ + /* Cluster: Basic, Attribute: NodeLabel, Privilege: view */ \ + /* Cluster: Basic, Attribute: Location, Privilege: view */ \ + /* Cluster: Basic, Attribute: LocalConfigDisabled, Privilege: view */ \ + /* Cluster: Color Control, Attribute: white point x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: white point y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: Language, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: AutoRelockTime, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: SoundVolume, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: OperatingMode, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnableOneTouchLocking, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnableInsideStatusLED, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnablePrivacyModeButton, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: WrongCodeEntryLimit, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: UserCodeTemporaryDisableTime, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: RequirePINforRemoteOperation, Privilege: view */ \ + /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + /* Cluster: Level Control, Attribute: start up current level, Privilege: view */ \ + 49, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + 49, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + 62, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: max cool setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min setpoint dead band, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: control sequence of operation, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: system mode, Privilege: view */ \ + /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ + /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ + /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ +} + +// Parallel array data (cluster, *attribute*, privilege) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__ATTRIBUTE { \ + 0, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 1, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: Access Control, Attribute: SubjectsPerAccessControlEntry, Privilege: view */ \ + /* Cluster: Access Control, Attribute: TargetsPerAccessControlEntry, Privilege: view */ \ + /* Cluster: Access Control, Attribute: AccessControlEntriesPerFabric, Privilege: view */ \ + /* Cluster: Basic, Attribute: NodeLabel, Privilege: view */ \ + /* Cluster: Basic, Attribute: Location, Privilege: view */ \ + /* Cluster: Basic, Attribute: LocalConfigDisabled, Privilege: view */ \ + /* Cluster: Color Control, Attribute: white point x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: white point y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: Language, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: AutoRelockTime, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: SoundVolume, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: OperatingMode, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnableOneTouchLocking, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnableInsideStatusLED, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnablePrivacyModeButton, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: WrongCodeEntryLimit, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: UserCodeTemporaryDisableTime, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: RequirePINforRemoteOperation, Privilege: view */ \ + /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + /* Cluster: Level Control, Attribute: start up current level, Privilege: view */ \ + 0, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + 1, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + 5, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + 6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + 0, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: max cool setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min setpoint dead band, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: control sequence of operation, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: system mode, Privilege: view */ \ + /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ + /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ + /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ +} + +// Parallel array data (cluster, attribute, *privilege*) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: Access Control, Attribute: SubjectsPerAccessControlEntry, Privilege: view */ \ + /* Cluster: Access Control, Attribute: TargetsPerAccessControlEntry, Privilege: view */ \ + /* Cluster: Access Control, Attribute: AccessControlEntriesPerFabric, Privilege: view */ \ + /* Cluster: Basic, Attribute: NodeLabel, Privilege: view */ \ + /* Cluster: Basic, Attribute: Location, Privilege: view */ \ + /* Cluster: Basic, Attribute: LocalConfigDisabled, Privilege: view */ \ + /* Cluster: Color Control, Attribute: white point x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: white point y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point r intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point g intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b x, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b y, Privilege: view */ \ + /* Cluster: Color Control, Attribute: color point b intensity, Privilege: view */ \ + /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: Language, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: AutoRelockTime, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: SoundVolume, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: OperatingMode, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnableOneTouchLocking, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnableInsideStatusLED, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: EnablePrivacyModeButton, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: WrongCodeEntryLimit, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: UserCodeTemporaryDisableTime, Privilege: view */ \ + /* Cluster: Door Lock, Attribute: RequirePINforRemoteOperation, Privilege: view */ \ + /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + /* Cluster: Level Control, Attribute: start up current level, Privilege: view */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: view */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ + /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: max cool setpoint limit, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: min setpoint dead band, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: control sequence of operation, Privilege: view */ \ + /* Cluster: Thermostat, Attribute: system mode, Privilege: view */ \ + /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: view */ \ + /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: view */ \ + /* Cluster: User Label, Attribute: label list, Privilege: view */ \ + /* Cluster: Window Covering, Attribute: Mode, Privilege: view */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, attribute, privilege) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__CLUSTER { \ + 31, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 31, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + 40, /* Cluster: Basic, Attribute: NodeLabel, Privilege: manage */ \ + 40, /* Cluster: Basic, Attribute: Location, Privilege: administer */ \ + 40, /* Cluster: Basic, Attribute: LocalConfigDisabled, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: white point x, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: white point y, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point r x, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point r y, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point r intensity, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point g x, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point g y, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point g intensity, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point b x, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point b y, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: color point b intensity, Privilege: manage */ \ + 768, /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: Language, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: AutoRelockTime, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: SoundVolume, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: OperatingMode, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: EnableOneTouchLocking, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: EnableInsideStatusLED, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: EnablePrivacyModeButton, Privilege: manage */ \ + 257, /* Cluster: Door Lock, Attribute: WrongCodeEntryLimit, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Attribute: UserCodeTemporaryDisableTime, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Attribute: RequirePINforRemoteOperation, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ + 8, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ + 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 6, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 512, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: max cool setpoint limit, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: min setpoint dead band, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: control sequence of operation, Privilege: manage */ \ + 513, /* Cluster: Thermostat, Attribute: system mode, Privilege: manage */ \ + 516, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ + 516, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ + 65, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ + 258, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ +} + +// Parallel array data (cluster, *attribute*, privilege) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__ATTRIBUTE { \ + 0, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 1, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + 5, /* Cluster: Basic, Attribute: NodeLabel, Privilege: manage */ \ + 6, /* Cluster: Basic, Attribute: Location, Privilege: administer */ \ + 16, /* Cluster: Basic, Attribute: LocalConfigDisabled, Privilege: manage */ \ + 48, /* Cluster: Color Control, Attribute: white point x, Privilege: manage */ \ + 49, /* Cluster: Color Control, Attribute: white point y, Privilege: manage */ \ + 50, /* Cluster: Color Control, Attribute: color point r x, Privilege: manage */ \ + 51, /* Cluster: Color Control, Attribute: color point r y, Privilege: manage */ \ + 52, /* Cluster: Color Control, Attribute: color point r intensity, Privilege: manage */ \ + 54, /* Cluster: Color Control, Attribute: color point g x, Privilege: manage */ \ + 55, /* Cluster: Color Control, Attribute: color point g y, Privilege: manage */ \ + 56, /* Cluster: Color Control, Attribute: color point g intensity, Privilege: manage */ \ + 58, /* Cluster: Color Control, Attribute: color point b x, Privilege: manage */ \ + 59, /* Cluster: Color Control, Attribute: color point b y, Privilege: manage */ \ + 60, /* Cluster: Color Control, Attribute: color point b intensity, Privilege: manage */ \ + 16400, /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: manage */ \ + 4, /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: manage */ \ + 5, /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: manage */ \ + 6, /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: manage */ \ + 33, /* Cluster: Door Lock, Attribute: Language, Privilege: manage */ \ + 35, /* Cluster: Door Lock, Attribute: AutoRelockTime, Privilege: manage */ \ + 36, /* Cluster: Door Lock, Attribute: SoundVolume, Privilege: manage */ \ + 37, /* Cluster: Door Lock, Attribute: OperatingMode, Privilege: manage */ \ + 41, /* Cluster: Door Lock, Attribute: EnableOneTouchLocking, Privilege: manage */ \ + 42, /* Cluster: Door Lock, Attribute: EnableInsideStatusLED, Privilege: manage */ \ + 43, /* Cluster: Door Lock, Attribute: EnablePrivacyModeButton, Privilege: manage */ \ + 48, /* Cluster: Door Lock, Attribute: WrongCodeEntryLimit, Privilege: administer */ \ + 49, /* Cluster: Door Lock, Attribute: UserCodeTemporaryDisableTime, Privilege: administer */ \ + 51, /* Cluster: Door Lock, Attribute: RequirePINforRemoteOperation, Privilege: administer */ \ + 0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + 0, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ + 16384, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ + 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + 16387, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + 21, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + 23, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + 32, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + 33, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ + 21, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ + 22, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ + 23, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ + 24, /* Cluster: Thermostat, Attribute: max cool setpoint limit, Privilege: manage */ \ + 25, /* Cluster: Thermostat, Attribute: min setpoint dead band, Privilege: manage */ \ + 27, /* Cluster: Thermostat, Attribute: control sequence of operation, Privilege: manage */ \ + 28, /* Cluster: Thermostat, Attribute: system mode, Privilege: manage */ \ + 1, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ + 2, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ + 0, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ + 23, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ +} + +// Parallel array data (cluster, attribute, *privilege*) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Basic, Attribute: NodeLabel, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Basic, Attribute: Location, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Basic, Attribute: LocalConfigDisabled, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: white point x, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: white point y, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point r x, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point r y, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point r intensity, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point g x, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point g y, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point g intensity, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point b x, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point b y, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: color point b intensity, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: DoorOpenEvents, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: DoorClosedEvents, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: OpenPeriod, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: Language, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: AutoRelockTime, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: SoundVolume, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: OperatingMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: EnableOneTouchLocking, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: EnableInsideStatusLED, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Door Lock, Attribute: EnablePrivacyModeButton, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Attribute: WrongCodeEntryLimit, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Attribute: UserCodeTemporaryDisableTime, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Attribute: RequirePINforRemoteOperation, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Level Control, Attribute: start up current level, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: On/Off, Attribute: StartUpOnOff, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeRunningHours, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min heat setpoint limit, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: max heat setpoint limit, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min cool setpoint limit, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: max cool setpoint limit, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: min setpoint dead band, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: control sequence of operation, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat, Attribute: system mode, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat User Interface Configuration, Attribute: keypad lockout, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Thermostat User Interface Configuration, Attribute: schedule programming visibility, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: User Label, Attribute: label list, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Window Covering, Attribute: Mode, Privilege: manage */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, command, privilege) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__CLUSTER { \ + 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: SetYearDaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: GetYearDaySchedule, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: SetUser, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: GetUser, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: ClearUser, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ + 257, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 4, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ + 3, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 3, /* Cluster: Identify, Command: IdentifyQuery, Privilege: manage */ \ + 3, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ + 49, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: RemoveTrustedRootCertificate, Privilege: administer */ \ + 5, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ + 5, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ + 5, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ + 5, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ +} + +// Parallel array data (cluster, *command*, privilege) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__COMMAND { \ + 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ + 11, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ + 12, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ + 14, /* Cluster: Door Lock, Command: SetYearDaySchedule, Privilege: administer */ \ + 15, /* Cluster: Door Lock, Command: GetYearDaySchedule, Privilege: administer */ \ + 26, /* Cluster: Door Lock, Command: SetUser, Privilege: administer */ \ + 27, /* Cluster: Door Lock, Command: GetUser, Privilege: administer */ \ + 29, /* Cluster: Door Lock, Command: ClearUser, Privilege: administer */ \ + 34, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ + 36, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ + 38, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ + 0, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + 2, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + 4, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 0, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + 1, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + 3, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + 4, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ + 3, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ + 5, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ + 0, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 1, /* Cluster: Identify, Command: IdentifyQuery, Privilege: manage */ \ + 64, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ + 0, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + 2, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + 3, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \ + 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + 2, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + 4, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + 6, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + 7, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + 9, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + 10, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + 11, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + 12, /* Cluster: Operational Credentials, Command: RemoveTrustedRootCertificate, Privilege: administer */ \ + 0, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ + 2, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ + 3, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ + 4, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ +} + +// Parallel array data (cluster, command, *privilege*) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetWeekDaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetWeekDaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetYearDaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetYearDaySchedule, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetUser, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetUser, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearUser, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: SetCredential, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: GetCredentialStatus, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Door Lock, Command: ClearCredential, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: IdentifyQuery, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: TriggerEffect, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: AddOrUpdateThreadNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: RemoveTrustedRootCertificate, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, event, privilege) for read event +#define GENERATED_ACCESS_READ_EVENT__CLUSTER { \ + 31, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + 31, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ +} + +// Parallel array data (cluster, *event*, privilege) for read event +#define GENERATED_ACCESS_READ_EVENT__EVENT { \ + 0, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + 1, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ +} + +// Parallel array data (cluster, event, *privilege*) for read event +#define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// clang-format on diff --git a/components/esp_matter_bridge/esp_matter_bridge.cpp b/components/esp_matter_bridge/esp_matter_bridge.cpp index 6bb12d7e7..0d89188c6 100644 --- a/components/esp_matter_bridge/esp_matter_bridge.cpp +++ b/components/esp_matter_bridge/esp_matter_bridge.cpp @@ -28,7 +28,7 @@ esp_matter_bridge_device_t *esp_matter_bridge_create_device(node_t *node) esp_matter_bridge_device_t *dev = (esp_matter_bridge_device_t *)calloc(1, sizeof(esp_matter_bridge_device_t)); dev->node = node; bridged_node::config_t bridged_node_config; - dev->endpoint = bridged_node::create(node, &bridged_node_config, ENDPOINT_FLAG_DESTROYABLE); + dev->endpoint = bridged_node::create(node, &bridged_node_config, ENDPOINT_FLAG_DESTROYABLE | ENDPOINT_FLAG_BRIDGE); if (!(dev->endpoint)) { ESP_LOGE(TAG, "Could not create esp_matter endpoint for bridged device"); free(dev); diff --git a/components/esp_matter_ota/esp_matter_ota.cpp b/components/esp_matter_ota/esp_matter_ota.cpp index 47bcdd54c..3d4b70ac2 100644 --- a/components/esp_matter_ota/esp_matter_ota.cpp +++ b/components/esp_matter_ota/esp_matter_ota.cpp @@ -16,27 +16,30 @@ #include #include -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "OTAImageProcessorImpl.h" -#include "app/clusters/ota-requestor/GenericOTARequestorDriver.h" -#include "app/clusters/ota-requestor/OTARequestorInterface.h" +#include +#include +#include +#include +#include using chip::BDXDownloader; +using chip::DefaultOTARequestor; +using chip::DefaultOTARequestorStorage; +using chip::DeviceLayer::DefaultOTARequestorDriver; using chip::OTAImageProcessorImpl; -using chip::OTARequestor; -using chip::DeviceLayer::GenericOTARequestorDriver; using chip::Server; #if CONFIG_ENABLE_OTA_REQUESTOR -OTARequestor gRequestorCore; -GenericOTARequestorDriver gRequestorUser; +DefaultOTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; +DefaultOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; void esp_matter_ota_requestor_init(void) { chip::SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp b/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp index 482e457d8..6612cf7cc 100644 --- a/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp +++ b/components/esp_matter_rainmaker/esp_matter_rainmaker.cpp @@ -191,13 +191,11 @@ static esp_err_t custom_cluster_create() /* Create custom rainmaker cluster */ cluster_t *cluster = esp_matter::cluster::create(endpoint, cluster::rainmaker::Id, CLUSTER_FLAG_SERVER); - attribute::create(cluster, Globals::Attributes::ClusterRevision::Id, ATTRIBUTE_FLAG_NONE, - esp_matter_uint16(1)); + attribute::create(cluster, Globals::Attributes::ClusterRevision::Id, ATTRIBUTE_FLAG_NONE, esp_matter_uint16(1)); /* Create custom status attribute */ /* Update the value of the attribute after esp_rmaker_node_init() is done */ - attribute::create(cluster, cluster::rainmaker::attribute::status::Id, ATTRIBUTE_FLAG_NONE, - esp_matter_bool(false)); + attribute::create(cluster, cluster::rainmaker::attribute::status::Id, ATTRIBUTE_FLAG_NONE, esp_matter_bool(false)); /* Create custom node_id attribute */ /* Update the value of the attribute after esp_rmaker_node_init() is done */ @@ -207,7 +205,7 @@ static esp_err_t custom_cluster_create() /* Create custom configuration command */ command::create(cluster, cluster::rainmaker::command::configuration::Id, - COMMAND_FLAG_CLIENT_GENERATED | COMMAND_FLAG_CUSTOM, command_callback); + COMMAND_FLAG_ACCEPTED | COMMAND_FLAG_CUSTOM, command_callback); return ESP_OK; } diff --git a/connectedhomeip/connectedhomeip b/connectedhomeip/connectedhomeip index 10b804696..6109d1434 160000 --- a/connectedhomeip/connectedhomeip +++ b/connectedhomeip/connectedhomeip @@ -1 +1 @@ -Subproject commit 10b80469620329c204a3c59d380d14fc3e7a3bb6 +Subproject commit 6109d14348023229614227775b57b8b4c80f131a diff --git a/device_hal/light_driver/CMakeLists.txt b/device_hal/light_driver/CMakeLists.txt index 9e43186ec..7b5dd12de 100644 --- a/device_hal/light_driver/CMakeLists.txt +++ b/device_hal/light_driver/CMakeLists.txt @@ -1,5 +1,5 @@ include($ENV{ESP_MATTER_DEVICE_PATH}/esp_matter_device.cmake) -set(light_requires ) +set(light_requires driver) if ("${light_type}" STREQUAL "ws2812") list(APPEND light_requires led_strip) elseif ("${light_type}" STREQUAL "vled") diff --git a/device_hal/light_driver/include/light_driver.h b/device_hal/light_driver/include/light_driver.h index 1174ede25..62234a65f 100644 --- a/device_hal/light_driver/include/light_driver.h +++ b/device_hal/light_driver/include/light_driver.h @@ -13,6 +13,8 @@ #pragma once #include +#include +#include #ifdef __cplusplus extern "C" { diff --git a/examples/bridge_zigbee/main/zap-generated/endpoint_config.h b/examples/bridge_zigbee/main/zap-generated/endpoint_config.h index 8e03605b3..9b12ac6f1 100644 --- a/examples/bridge_zigbee/main/zap-generated/endpoint_config.h +++ b/examples/bridge_zigbee/main/zap-generated/endpoint_config.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors + * Copyright (c) 2021 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,12 +53,16 @@ #define FIXED_PROFILE_IDS \ {0} -// Array of device ids -#define FIXED_DEVICE_IDS \ +// Array of device types +#define FIXED_DEVICE_TYPES \ {0} -// Array of device versions -#define FIXED_DEVICE_VERSIONS \ +// Array of device type offsets +#define FIXED_DEVICE_TYPE_OFFSETS \ + {0} + +// Array of device type lengths +#define FIXED_DEVICE_TYPE_LENGTHS \ {0} // Array of endpoint types supported on each endpoint diff --git a/examples/bridge_zigbee/main/zigbee_bridge.cpp b/examples/bridge_zigbee/main/zigbee_bridge.cpp index 0561bb51a..93a06e6c5 100644 --- a/examples/bridge_zigbee/main/zigbee_bridge.cpp +++ b/examples/bridge_zigbee/main/zigbee_bridge.cpp @@ -31,6 +31,7 @@ static esp_err_t init_bridged_onoff_light(esp_matter_bridge_device_t *dev) } on_off::config_t config; on_off::create(dev->endpoint, &config, CLUSTER_MASK_SERVER, ESP_MATTER_NONE_FEATURE_ID); + endpoint::set_device_type_id(dev->endpoint, endpoint::on_off_light::get_device_type_id()); if (endpoint::enable(dev->endpoint) != ESP_OK) { ESP_LOGE(TAG, "ESP Matter enable dynamic endpoint failed"); endpoint::destroy(dev->node, dev->endpoint); diff --git a/examples/bridge_zigbee/sdkconfig.defaults b/examples/bridge_zigbee/sdkconfig.defaults index b83e3c80d..8ac120c37 100644 --- a/examples/bridge_zigbee/sdkconfig.defaults +++ b/examples/bridge_zigbee/sdkconfig.defaults @@ -11,6 +11,9 @@ CONFIG_BT_ENABLED=y CONFIG_BT_NIMBLE_ENABLED=y CONFIG_BT_NIMBLE_TASK_STACK_SIZE=5120 +#enable FreeRTOS legacy API +CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY=y + #enable lwip ipv6 autoconfig CONFIG_LWIP_IPV6_AUTOCONFIG=y diff --git a/examples/common/app_qrcode/app_qrcode.cpp b/examples/common/app_qrcode/app_qrcode.cpp index 070530c23..1cf7d6a99 100644 --- a/examples/common/app_qrcode/app_qrcode.cpp +++ b/examples/common/app_qrcode/app_qrcode.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -38,13 +39,13 @@ esp_err_t app_qrcode_get_payload(char **qrcode_text, char **short_manual_code_te std::string long_manual_code_payload; /* Get details */ - err = ConfigurationMgr().GetSetupDiscriminator(discriminator); + err = GetCommissionableDataProvider()->GetSetupDiscriminator(discriminator); if (err != CHIP_NO_ERROR) { ESP_LOGE(TAG, "Couldn't get discriminator: %s", ErrorStr(err)); return ESP_FAIL; } - err = ConfigurationMgr().GetSetupPinCode(setup_pin_code); + err = GetCommissionableDataProvider()->GetSetupPasscode(setup_pin_code); if (err != CHIP_NO_ERROR) { ESP_LOGE(TAG, "Couldn't get setup_pin_code: %s", ErrorStr(err)); return ESP_FAIL; diff --git a/examples/light/main/zap-generated/endpoint_config.h b/examples/light/main/zap-generated/endpoint_config.h index 7545690e4..9b12ac6f1 100644 --- a/examples/light/main/zap-generated/endpoint_config.h +++ b/examples/light/main/zap-generated/endpoint_config.h @@ -53,12 +53,16 @@ #define FIXED_PROFILE_IDS \ {0} -// Array of device ids -#define FIXED_DEVICE_IDS \ +// Array of device types +#define FIXED_DEVICE_TYPES \ {0} -// Array of device versions -#define FIXED_DEVICE_VERSIONS \ +// Array of device type offsets +#define FIXED_DEVICE_TYPE_OFFSETS \ + {0} + +// Array of device type lengths +#define FIXED_DEVICE_TYPE_LENGTHS \ {0} // Array of endpoint types supported on each endpoint diff --git a/examples/rainmaker_light/main/app_rainmaker.cpp b/examples/rainmaker_light/main/app_rainmaker.cpp index 6a4d2ca59..77e8c7acf 100644 --- a/examples/rainmaker_light/main/app_rainmaker.cpp +++ b/examples/rainmaker_light/main/app_rainmaker.cpp @@ -322,7 +322,7 @@ static esp_rmaker_device_t *app_rainmaker_device_create(const esp_rmaker_node_t return NULL; } /* Add this device only if endpoint_id has been handled */ - int device_type_id = endpoint::get_device_type_id(endpoint_id); + int device_type_id = endpoint::get_device_type_id(endpoint); const char *device_type = app_rainmaker_get_device_type_from_id(device_type_id); esp_rmaker_device_t *device = esp_rmaker_device_create(device_name, device_type, NULL); if (!device) { diff --git a/examples/rainmaker_light/main/zap-generated/endpoint_config.h b/examples/rainmaker_light/main/zap-generated/endpoint_config.h index 7545690e4..9b12ac6f1 100644 --- a/examples/rainmaker_light/main/zap-generated/endpoint_config.h +++ b/examples/rainmaker_light/main/zap-generated/endpoint_config.h @@ -53,12 +53,16 @@ #define FIXED_PROFILE_IDS \ {0} -// Array of device ids -#define FIXED_DEVICE_IDS \ +// Array of device types +#define FIXED_DEVICE_TYPES \ {0} -// Array of device versions -#define FIXED_DEVICE_VERSIONS \ +// Array of device type offsets +#define FIXED_DEVICE_TYPE_OFFSETS \ + {0} + +// Array of device type lengths +#define FIXED_DEVICE_TYPE_LENGTHS \ {0} // Array of endpoint types supported on each endpoint diff --git a/examples/switch/main/zap-generated/endpoint_config.h b/examples/switch/main/zap-generated/endpoint_config.h index 7545690e4..9b12ac6f1 100644 --- a/examples/switch/main/zap-generated/endpoint_config.h +++ b/examples/switch/main/zap-generated/endpoint_config.h @@ -53,12 +53,16 @@ #define FIXED_PROFILE_IDS \ {0} -// Array of device ids -#define FIXED_DEVICE_IDS \ +// Array of device types +#define FIXED_DEVICE_TYPES \ {0} -// Array of device versions -#define FIXED_DEVICE_VERSIONS \ +// Array of device type offsets +#define FIXED_DEVICE_TYPE_OFFSETS \ + {0} + +// Array of device type lengths +#define FIXED_DEVICE_TYPE_LENGTHS \ {0} // Array of endpoint types supported on each endpoint diff --git a/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp b/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp index ccf8e2f87..5195d5c80 100644 --- a/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp +++ b/examples/zap_light/main/zap-generated/IMClusterCommandHandler.cpp @@ -50,16 +50,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, bool wasHandled = false; { switch (aCommandPath.mCommandId) { - case Commands::OpenBasicCommissioningWindow::Id: { - Commands::OpenBasicCommissioningWindow::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = - emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::OpenCommissioningWindow::Id: { Commands::OpenCommissioningWindow::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -70,6 +60,16 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } + case Commands::OpenBasicCommissioningWindow::Id: { + Commands::OpenBasicCommissioningWindow::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfAdministratorCommissioningClusterOpenBasicCommissioningWindowCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::RevokeCommissioning::Id: { Commands::RevokeCommissioning::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -115,11 +115,11 @@ void DispatchServerCommand(CommandHandler *apCommandObj, bool wasHandled = false; { switch (aCommandPath.mCommandId) { - case Commands::MoveColor::Id: { - Commands::MoveColor::DecodableType commandData; + case Commands::MoveToHue::Id: { + Commands::MoveToHue::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterMoveColorCallback( + wasHandled = emberAfColorControlClusterMoveToHueCallback( apCommandObj, aCommandPath, commandData); } break; @@ -133,38 +133,11 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::MoveSaturation::Id: { - Commands::MoveSaturation::DecodableType commandData; + case Commands::StepHue::Id: { + Commands::StepHue::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterMoveSaturationCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::MoveToColor::Id: { - Commands::MoveToColor::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterMoveToColorCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::MoveToHue::Id: { - Commands::MoveToHue::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterMoveToHueCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::MoveToHueAndSaturation::Id: { - Commands::MoveToHueAndSaturation::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterMoveToHueAndSaturationCallback( + wasHandled = emberAfColorControlClusterStepHueCallback( apCommandObj, aCommandPath, commandData); } break; @@ -178,20 +151,11 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::StepColor::Id: { - Commands::StepColor::DecodableType commandData; + case Commands::MoveSaturation::Id: { + Commands::MoveSaturation::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterStepColorCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::StepHue::Id: { - Commands::StepHue::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfColorControlClusterStepHueCallback( + wasHandled = emberAfColorControlClusterMoveSaturationCallback( apCommandObj, aCommandPath, commandData); } break; @@ -205,6 +169,42 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } + case Commands::MoveToHueAndSaturation::Id: { + Commands::MoveToHueAndSaturation::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfColorControlClusterMoveToHueAndSaturationCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::MoveToColor::Id: { + Commands::MoveToColor::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfColorControlClusterMoveToColorCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::MoveColor::Id: { + Commands::MoveColor::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfColorControlClusterMoveColorCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StepColor::Id: { + Commands::StepColor::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfColorControlClusterStepColorCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus( @@ -249,16 +249,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::CommissioningComplete::Id: { - Commands::CommissioningComplete::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = - emberAfGeneralCommissioningClusterCommissioningCompleteCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::SetRegulatoryConfig::Id: { Commands::SetRegulatoryConfig::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -269,6 +259,16 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } + case Commands::CommissioningComplete::Id: { + Commands::CommissioningComplete::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfGeneralCommissioningClusterCommissioningCompleteCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus( @@ -304,6 +304,15 @@ void DispatchServerCommand(CommandHandler *apCommandObj, bool wasHandled = false; { switch (aCommandPath.mCommandId) { + case Commands::KeySetWrite::Id: { + Commands::KeySetWrite::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupKeyManagementClusterKeySetWriteCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::KeySetRead::Id: { Commands::KeySetRead::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -313,16 +322,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::KeySetReadAllIndices::Id: { - Commands::KeySetReadAllIndices::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = - emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::KeySetRemove::Id: { Commands::KeySetRemove::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -332,12 +331,13 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::KeySetWrite::Id: { - Commands::KeySetWrite::DecodableType commandData; + case Commands::KeySetReadAllIndices::Id: { + Commands::KeySetReadAllIndices::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupKeyManagementClusterKeySetWriteCallback( - apCommandObj, aCommandPath, commandData); + wasHandled = + emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback( + apCommandObj, aCommandPath, commandData); } break; } @@ -385,11 +385,11 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::AddGroupIfIdentifying::Id: { - Commands::AddGroupIfIdentifying::DecodableType commandData; + case Commands::ViewGroup::Id: { + Commands::ViewGroup::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterAddGroupIfIdentifyingCallback( + wasHandled = emberAfGroupsClusterViewGroupCallback( apCommandObj, aCommandPath, commandData); } break; @@ -403,15 +403,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::RemoveAllGroups::Id: { - Commands::RemoveAllGroups::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterRemoveAllGroupsCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::RemoveGroup::Id: { Commands::RemoveGroup::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -421,11 +412,20 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::ViewGroup::Id: { - Commands::ViewGroup::DecodableType commandData; + case Commands::RemoveAllGroups::Id: { + Commands::RemoveAllGroups::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfGroupsClusterViewGroupCallback( + wasHandled = emberAfGroupsClusterRemoveAllGroupsCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddGroupIfIdentifying::Id: { + Commands::AddGroupIfIdentifying::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfGroupsClusterAddGroupIfIdentifyingCallback( apCommandObj, aCommandPath, commandData); } break; @@ -518,6 +518,15 @@ void DispatchServerCommand(CommandHandler *apCommandObj, bool wasHandled = false; { switch (aCommandPath.mCommandId) { + case Commands::MoveToLevel::Id: { + Commands::MoveToLevel::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfLevelControlClusterMoveToLevelCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::Move::Id: { Commands::Move::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -527,11 +536,20 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::MoveToLevel::Id: { - Commands::MoveToLevel::DecodableType commandData; + case Commands::Step::Id: { + Commands::Step::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfLevelControlClusterMoveToLevelCallback( + wasHandled = emberAfLevelControlClusterStepCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::Stop::Id: { + Commands::Stop::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfLevelControlClusterStopCallback( apCommandObj, aCommandPath, commandData); } break; @@ -554,15 +572,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::Step::Id: { - Commands::Step::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfLevelControlClusterStepCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::StepWithOnOff::Id: { Commands::StepWithOnOff::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -572,15 +581,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::Stop::Id: { - Commands::Stop::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfLevelControlClusterStopCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::StopWithOnOff::Id: { Commands::StopWithOnOff::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -625,6 +625,15 @@ void DispatchServerCommand(CommandHandler *apCommandObj, bool wasHandled = false; { switch (aCommandPath.mCommandId) { + case Commands::ScanNetworks::Id: { + Commands::ScanNetworks::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::AddOrUpdateWiFiNetwork::Id: { Commands::AddOrUpdateWiFiNetwork::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -635,15 +644,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::ConnectNetwork::Id: { - Commands::ConnectNetwork::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterConnectNetworkCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::RemoveNetwork::Id: { Commands::RemoveNetwork::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -653,6 +653,15 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } + case Commands::ConnectNetwork::Id: { + Commands::ConnectNetwork::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfNetworkCommissioningClusterConnectNetworkCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::ReorderNetwork::Id: { Commands::ReorderNetwork::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -662,15 +671,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::ScanNetworks::Id: { - Commands::ScanNetworks::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus( @@ -768,6 +768,35 @@ void DispatchServerCommand(CommandHandler *apCommandObj, bool wasHandled = false; { switch (aCommandPath.mCommandId) { + case Commands::AttestationRequest::Id: { + Commands::AttestationRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterAttestationRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::CertificateChainRequest::Id: { + Commands::CertificateChainRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterCertificateChainRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::CSRRequest::Id: { + Commands::CSRRequest::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterCSRRequestCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::AddNOC::Id: { Commands::AddNOC::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -777,6 +806,34 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } + case Commands::UpdateNOC::Id: { + Commands::UpdateNOC::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterUpdateNOCCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpdateFabricLabel::Id: { + Commands::UpdateFabricLabel::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = + emberAfOperationalCredentialsClusterUpdateFabricLabelCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveFabric::Id: { + Commands::RemoveFabric::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfOperationalCredentialsClusterRemoveFabricCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::AddTrustedRootCertificate::Id: { Commands::AddTrustedRootCertificate::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -787,44 +844,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::AttestationRequest::Id: { - Commands::AttestationRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = - emberAfOperationalCredentialsClusterAttestationRequestCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::CSRRequest::Id: { - Commands::CSRRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterCSRRequestCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::CertificateChainRequest::Id: { - Commands::CertificateChainRequest::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = - emberAfOperationalCredentialsClusterCertificateChainRequestCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveFabric::Id: { - Commands::RemoveFabric::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterRemoveFabricCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } case Commands::RemoveTrustedRootCertificate::Id: { Commands::RemoveTrustedRootCertificate::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -835,25 +854,6 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::UpdateFabricLabel::Id: { - Commands::UpdateFabricLabel::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = - emberAfOperationalCredentialsClusterUpdateFabricLabelCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::UpdateNOC::Id: { - Commands::UpdateNOC::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfOperationalCredentialsClusterUpdateNOCCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatus( @@ -898,29 +898,11 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::GetSceneMembership::Id: { - Commands::GetSceneMembership::DecodableType commandData; + case Commands::ViewScene::Id: { + Commands::ViewScene::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfScenesClusterGetSceneMembershipCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RecallScene::Id: { - Commands::RecallScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfScenesClusterRecallSceneCallback( - apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveAllScenes::Id: { - Commands::RemoveAllScenes::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfScenesClusterRemoveAllScenesCallback( + wasHandled = emberAfScenesClusterViewSceneCallback( apCommandObj, aCommandPath, commandData); } break; @@ -934,6 +916,15 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } + case Commands::RemoveAllScenes::Id: { + Commands::RemoveAllScenes::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfScenesClusterRemoveAllScenesCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::StoreScene::Id: { Commands::StoreScene::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -943,11 +934,20 @@ void DispatchServerCommand(CommandHandler *apCommandObj, } break; } - case Commands::ViewScene::Id: { - Commands::ViewScene::DecodableType commandData; + case Commands::RecallScene::Id: { + Commands::RecallScene::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); if (TLVError == CHIP_NO_ERROR) { - wasHandled = emberAfScenesClusterViewSceneCallback( + wasHandled = emberAfScenesClusterRecallSceneCallback( + apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GetSceneMembership::Id: { + Commands::GetSceneMembership::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) { + wasHandled = emberAfScenesClusterGetSceneMembershipCallback( apCommandObj, aCommandPath, commandData); } break; diff --git a/examples/zap_light/main/zap-generated/access.h b/examples/zap_light/main/zap-generated/access.h new file mode 100644 index 000000000..35e12d26b --- /dev/null +++ b/examples/zap_light/main/zap-generated/access.h @@ -0,0 +1,260 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// THIS FILE IS GENERATED BY ZAP + +// Prevent multiple inclusion +#pragma once + +#include + +// Prevent changing generated format +// clang-format off + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, attribute, privilege) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__CLUSTER { \ + 31, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 31, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: Basic, Attribute: NodeLabel, Privilege: view */ \ + /* Cluster: Basic, Attribute: Location, Privilege: view */ \ + /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: view */ \ + /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + 49, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + 49, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ +} + +// Parallel array data (cluster, *attribute*, privilege) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__ATTRIBUTE { \ + 0, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 1, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: Basic, Attribute: NodeLabel, Privilege: view */ \ + /* Cluster: Basic, Attribute: Location, Privilege: view */ \ + /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: view */ \ + /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + 0, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + 1, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + 5, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + 6, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + 7, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + 0, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ +} + +// Parallel array data (cluster, attribute, *privilege*) for read attribute +#define GENERATED_ACCESS_READ_ATTRIBUTE__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + /* Cluster: Basic, Attribute: NodeLabel, Privilege: view */ \ + /* Cluster: Basic, Attribute: Location, Privilege: view */ \ + /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: view */ \ + /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: view */ \ + /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: view */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: MaxNetworks, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: Networks, Privilege: administer */ \ + /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: view */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkingStatus, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastNetworkID, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: LastConnectErrorValue, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Attribute: NOCs, Privilege: administer */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, attribute, privilege) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__CLUSTER { \ + 31, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 31, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + 40, /* Cluster: Basic, Attribute: NodeLabel, Privilege: manage */ \ + 40, /* Cluster: Basic, Attribute: Location, Privilege: administer */ \ + 768, /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: manage */ \ + 48, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ + 49, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ +} + +// Parallel array data (cluster, *attribute*, privilege) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__ATTRIBUTE { \ + 0, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + 1, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + 5, /* Cluster: Basic, Attribute: NodeLabel, Privilege: manage */ \ + 6, /* Cluster: Basic, Attribute: Location, Privilege: administer */ \ + 16400, /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: manage */ \ + 0, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + 0, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ + 4, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ +} + +// Parallel array data (cluster, attribute, *privilege*) for write attribute +#define GENERATED_ACCESS_WRITE_ATTRIBUTE__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: ACL, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Attribute: Extension, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Basic, Attribute: NodeLabel, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Basic, Attribute: Location, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Color Control, Attribute: start up color temperature mireds, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Attribute: Breadcrumb, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Group Key Management, Attribute: GroupKeyMap, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Attribute: InterfaceEnabled, Privilege: administer */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, command, privilege) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__CLUSTER { \ + 60, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + 60, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + 60, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + 48, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + 63, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 4, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ + 3, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 3, /* Cluster: Identify, Command: IdentifyQuery, Privilege: manage */ \ + 49, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + 49, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + 62, /* Cluster: Operational Credentials, Command: RemoveTrustedRootCertificate, Privilege: administer */ \ + 5, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ + 5, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ + 5, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ + 5, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ +} + +// Parallel array data (cluster, *command*, privilege) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__COMMAND { \ + 0, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + 1, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + 2, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ + 0, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + 2, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + 4, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + 0, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + 1, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + 3, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + 4, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + 0, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ + 3, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ + 4, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ + 5, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ + 0, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + 1, /* Cluster: Identify, Command: IdentifyQuery, Privilege: manage */ \ + 0, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + 2, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + 4, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + 6, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + 8, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + 0, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + 2, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + 4, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + 6, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + 7, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + 9, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + 10, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + 11, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + 12, /* Cluster: Operational Credentials, Command: RemoveTrustedRootCertificate, Privilege: administer */ \ + 0, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ + 2, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ + 3, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ + 4, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ +} + +// Parallel array data (cluster, command, *privilege*) for invoke command +#define GENERATED_ACCESS_INVOKE_COMMAND__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenCommissioningWindow, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: OpenBasicCommissioningWindow, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: AdministratorCommissioning, Command: RevokeCommissioning, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: ArmFailSafe, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: SetRegulatoryConfig, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: General Commissioning, Command: CommissioningComplete, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetWrite, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRead, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetRemove, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Group Key Management, Command: KeySetReadAllIndices, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: AddGroup, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveGroup, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: RemoveAllGroups, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Groups, Command: AddGroupIfIdentifying, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: Identify, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Identify, Command: IdentifyQuery, Privilege: manage */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ScanNetworks, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: AddOrUpdateWiFiNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: RemoveNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ConnectNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Network Commissioning, Command: ReorderNetwork, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AttestationRequest, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: CertificateChainRequest, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: CSRRequest, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AddNOC, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: UpdateNOC, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: UpdateFabricLabel, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: RemoveFabric, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: AddTrustedRootCertificate, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Operational Credentials, Command: RemoveTrustedRootCertificate, Privilege: administer */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: AddScene, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: RemoveScene, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: RemoveAllScenes, Privilege: manage */ \ + kMatterAccessPrivilegeManage, /* Cluster: Scenes, Command: StoreScene, Privilege: manage */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// Parallel array data (*cluster*, event, privilege) for read event +#define GENERATED_ACCESS_READ_EVENT__CLUSTER { \ + 31, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + 31, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ +} + +// Parallel array data (cluster, *event*, privilege) for read event +#define GENERATED_ACCESS_READ_EVENT__EVENT { \ + 0, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + 1, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ +} + +// Parallel array data (cluster, event, *privilege*) for read event +#define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ + kMatterAccessPrivilegeAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ +} + +//////////////////////////////////////////////////////////////////////////////// + +// clang-format on diff --git a/examples/zap_light/main/zap-generated/endpoint_config.h b/examples/zap_light/main/zap-generated/endpoint_config.h index e395011e9..ec5c44473 100644 --- a/examples/zap_light/main/zap-generated/endpoint_config.h +++ b/examples/zap_light/main/zap-generated/endpoint_config.h @@ -104,16 +104,13 @@ { (uint16_t) x } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 3 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ {(uint16_t)0x0, (uint16_t)0x0, (uint16_t)0x1}, /* HourFormat */ \ \ - /* Endpoint: 1, Cluster: Identify (server) */ \ - {(uint16_t)0x0, (uint16_t)0x0, (uint16_t)0xFE}, /* identify time */ \ - \ /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ (uint16_t)0x0, (uint16_t)0x0, (uint16_t)0xFEFF \ @@ -276,9 +273,8 @@ ZAP_SIMPLE_DEFAULT(1)}, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Identify (server) */ \ - {0x00000000, ZAP_TYPE(INT16U), 2, \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1)}, /* identify time */ \ + {0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0)}, /* identify time */ \ {0x00000001, ZAP_TYPE(ENUM8), 1, 0, \ ZAP_SIMPLE_DEFAULT(0x0)}, /* identify type */ \ {0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, \ @@ -360,7 +356,7 @@ {0x00004010, ZAP_TYPE(INT16U), 2, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX( \ - 2)}, /* start up color temperature mireds */ \ + 1)}, /* start up color temperature mireds */ \ {0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, \ ZAP_SIMPLE_DEFAULT(3)}, /* ClusterRevision */ \ } @@ -560,8 +556,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ @@ -571,8 +567,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ @@ -582,8 +578,8 @@ .clusterSize = 246, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayBasicServer, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ @@ -593,8 +589,8 @@ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayLocalizationConfigurationServer, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ @@ -604,8 +600,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayTimeFormatLocalizationServer, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ @@ -615,8 +611,8 @@ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ @@ -626,8 +622,8 @@ .clusterSize = 12, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ @@ -637,8 +633,8 @@ .clusterSize = 44, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ @@ -648,8 +644,8 @@ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ @@ -659,8 +655,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ @@ -670,8 +666,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 30 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ @@ -681,8 +677,8 @@ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ @@ -692,8 +688,8 @@ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 46 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ @@ -703,8 +699,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 55 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ @@ -714,8 +710,8 @@ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ @@ -725,8 +721,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ @@ -736,8 +732,8 @@ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ @@ -747,8 +743,8 @@ .clusterSize = 246, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayBasicServer, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = nullptr ,\ + .generatedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ @@ -758,8 +754,8 @@ .clusterSize = 13, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 88 ) ,\ - .serverGeneratedCommandList = nullptr ,\ + .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 88 ) ,\ + .generatedCommandList = nullptr ,\ },\ } @@ -797,12 +793,18 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define FIXED_PROFILE_IDS \ { 0x0103, 0x0104 } -// Array of device ids -#define FIXED_DEVICE_IDS \ - { 22, 258 } +// Array of device types +#define FIXED_DEVICE_TYPES \ + { \ + {0x0016, 1}, { 0x0102, 1 } \ + } -// Array of device versions -#define FIXED_DEVICE_VERSIONS \ +// Array of device type offsets +#define FIXED_DEVICE_TYPE_OFFSETS \ + { 0, 1 } + +// Array of device type lengths +#define FIXED_DEVICE_TYPE_LENGTHS \ { 1, 1 } // Array of endpoint types supported on each endpoint diff --git a/examples/zap_light/main/zap-generated/light.matter b/examples/zap_light/main/zap-generated/light.matter index a7f72f021..0d2e283dd 100644 --- a/examples/zap_light/main/zap-generated/light.matter +++ b/examples/zap_light/main/zap-generated/light.matter @@ -23,11 +23,11 @@ server cluster AccessControl = 31 { } struct AccessControlEntry { - fabric_idx fabricIndex = 0; Privilege privilege = 1; AuthMode authMode = 2; nullable INT64U subjects[] = 3; nullable Target targets[] = 4; + fabric_idx fabricIndex = 254; } struct Target { @@ -37,32 +37,32 @@ server cluster AccessControl = 31 { } struct ExtensionEntry { - fabric_idx fabricIndex = 0; - OCTET_STRING<254> data = 1; + OCTET_STRING<128> data = 1; + fabric_idx fabricIndex = 254; } - info event AccessControlEntryChanged = 0 { - fabric_idx adminFabricIndex = 0; + info event access(read: administer) AccessControlEntryChanged = 0 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable AccessControlEntry latestValue = 4; + fabric_idx adminFabricIndex = 254; } - info event AccessControlExtensionChanged = 1 { - fabric_idx adminFabricIndex = 0; + info event access(read: administer) AccessControlExtensionChanged = 1 { nullable node_id adminNodeID = 1; nullable INT16U adminPasscodeID = 2; ChangeTypeEnum changeType = 3; nullable ExtensionEntry latestValue = 4; + fabric_idx adminFabricIndex = 254; } - attribute AccessControlEntry acl[] = 0; - attribute ExtensionEntry extension[] = 1; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + attribute access(read: administer, write: administer) AccessControlEntry acl[] = 0; + attribute access(read: administer, write: administer) ExtensionEntry extension[] = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } server cluster AdministratorCommissioning = 60 { @@ -81,14 +81,10 @@ server cluster AdministratorCommissioning = 60 { readonly attribute int8u windowStatus = 0; readonly attribute fabric_idx adminFabricIndex = 1; readonly attribute int16u adminVendorId = 2; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; - - request struct OpenBasicCommissioningWindowRequest { - INT16U commissioningTimeout = 0; - } + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct OpenCommissioningWindowRequest { INT16U commissioningTimeout = 0; @@ -98,9 +94,13 @@ server cluster AdministratorCommissioning = 60 { OCTET_STRING salt = 4; } - timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; - timed command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; - timed command RevokeCommissioning(): DefaultSuccess = 2; + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; } server cluster Basic = 40 { @@ -123,16 +123,16 @@ server cluster Basic = 40 { readonly attribute vendor_id vendorID = 2; readonly attribute char_string<32> productName = 3; readonly attribute int16u productID = 4; - attribute char_string<32> nodeLabel = 5; - attribute char_string<2> location = 6; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; readonly attribute int16u hardwareVersion = 7; readonly attribute char_string<64> hardwareVersionString = 8; readonly attribute int32u softwareVersion = 9; readonly attribute char_string<64> softwareVersionString = 10; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } server cluster ColorControl = 768 { @@ -190,6 +190,14 @@ server cluster ColorControl = 768 { kColorTemperatureSupported = 0x10; } + bitmap ColorControlFeature : BITMAP32 { + kHueAndSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXy = 0x8; + kColorTemperature = 0x10; + } + bitmap ColorLoopUpdateFlags : BITMAP8 { kUpdateAction = 0x1; kUpdateDirection = 0x2; @@ -203,17 +211,18 @@ server cluster ColorControl = 768 { readonly attribute int16u currentY = 4; attribute bitmap8 colorControlOptions = 15; readonly attribute int16u coupleColorTempToLevelMinMireds = 16397; - attribute int16u startUpColorTemperatureMireds = 16400; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; - request struct MoveColorRequest { - INT16S rateX = 0; - INT16S rateY = 1; - BITMAP8 optionsMask = 2; - BITMAP8 optionsOverride = 3; + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; } request struct MoveHueRequest { @@ -223,6 +232,21 @@ server cluster ColorControl = 768 { BITMAP8 optionsOverride = 3; } + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + request struct MoveSaturationRequest { SaturationMoveMode moveMode = 0; INT8U rate = 1; @@ -230,18 +254,10 @@ server cluster ColorControl = 768 { BITMAP8 optionsOverride = 3; } - request struct MoveToColorRequest { - INT16U colorX = 0; - INT16U colorY = 1; - INT16U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct MoveToHueRequest { - INT8U hue = 0; - HueDirection direction = 1; - INT16U transitionTime = 2; + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; BITMAP8 optionsMask = 3; BITMAP8 optionsOverride = 4; } @@ -254,9 +270,17 @@ server cluster ColorControl = 768 { BITMAP8 optionsOverride = 4; } - request struct MoveToSaturationRequest { - INT8U saturation = 0; - INT16U transitionTime = 1; + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; BITMAP8 optionsMask = 2; BITMAP8 optionsOverride = 3; } @@ -269,32 +293,16 @@ server cluster ColorControl = 768 { BITMAP8 optionsOverride = 4; } - request struct StepHueRequest { - HueStepMode stepMode = 0; - INT8U stepSize = 1; - INT8U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - request struct StepSaturationRequest { - SaturationStepMode stepMode = 0; - INT8U stepSize = 1; - INT8U transitionTime = 2; - BITMAP8 optionsMask = 3; - BITMAP8 optionsOverride = 4; - } - - command MoveColor(MoveColorRequest): DefaultSuccess = 8; - command MoveHue(MoveHueRequest): DefaultSuccess = 1; - command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; - command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; - command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; - command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; - command StepColor(StepColorRequest): DefaultSuccess = 9; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; command StepHue(StepHueRequest): DefaultSuccess = 2; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command StepColor(StepColorRequest): DefaultSuccess = 9; } server cluster Descriptor = 29 { @@ -307,10 +315,10 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } server cluster GeneralCommissioning = 48 { @@ -332,46 +340,44 @@ server cluster GeneralCommissioning = 48 { INT16U failSafeExpiryLengthSeconds = 0; } - attribute int64u breadcrumb = 0; + attribute access(write: administer) int64u breadcrumb = 0; readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; readonly attribute RegulatoryLocationType regulatoryConfig = 2; readonly attribute RegulatoryLocationType locationCapability = 3; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct ArmFailSafeRequest { INT16U expiryLengthSeconds = 0; INT64U breadcrumb = 1; - INT32U timeoutMs = 2; } request struct SetRegulatoryConfigRequest { - RegulatoryLocationType location = 0; + RegulatoryLocationType newRegulatoryConfig = 0; CHAR_STRING countryCode = 1; INT64U breadcrumb = 2; - INT32U timeoutMs = 3; } - response struct ArmFailSafeResponse { + response struct ArmFailSafeResponse = 1 { CommissioningError errorCode = 0; CHAR_STRING debugText = 1; } - response struct CommissioningCompleteResponse { + response struct SetRegulatoryConfigResponse = 3 { CommissioningError errorCode = 0; CHAR_STRING debugText = 1; } - response struct SetRegulatoryConfigResponse { + response struct CommissioningCompleteResponse = 5 { CommissioningError errorCode = 0; CHAR_STRING debugText = 1; } - command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; - command CommissioningComplete(): CommissioningCompleteResponse = 4; - command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; } server cluster GeneralDiagnostics = 51 { @@ -456,10 +462,10 @@ server cluster GeneralDiagnostics = 51 { readonly attribute NetworkInterfaceType networkInterfaces[] = 0; readonly attribute int16u rebootCount = 1; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } server cluster GroupKeyManagement = 63 { @@ -469,16 +475,16 @@ server cluster GroupKeyManagement = 63 { } struct GroupKeyMapStruct { - fabric_idx fabricIndex = 0; group_id groupId = 1; INT16U groupKeySetID = 2; + fabric_idx fabricIndex = 254; } struct GroupInfoMapStruct { - fabric_idx fabricIndex = 0; group_id groupId = 1; endpoint_no endpoints[] = 2; optional CHAR_STRING<16> groupName = 3; + fabric_idx fabricIndex = 254; } struct GroupKeySetStruct { @@ -492,60 +498,59 @@ server cluster GroupKeyManagement = 63 { nullable epoch_us epochStartTime2 = 7; } - attribute GroupKeyMapStruct groupKeyMap[] = 0; + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; readonly attribute GroupInfoMapStruct groupTable[] = 1; readonly attribute int16u maxGroupsPerFabric = 2; readonly attribute int16u maxGroupKeysPerFabric = 3; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } request struct KeySetReadRequest { INT16U groupKeySetID = 0; } + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + request struct KeySetReadAllIndicesRequest { INT16U groupKeySetIDs[] = 0; } - request struct KeySetRemoveRequest { - INT16U groupKeySetID = 0; - } - - request struct KeySetWriteRequest { + response struct KeySetReadResponse = 2 { GroupKeySetStruct groupKeySet = 0; } - response struct KeySetReadAllIndicesResponse { + response struct KeySetReadAllIndicesResponse = 5 { INT16U groupKeySetIDs[] = 0; } - response struct KeySetReadResponse { - GroupKeySetStruct groupKeySet = 0; - } - - command KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; - command KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; - command KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; - command KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; } server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct AddGroupRequest { group_id groupId = 0; CHAR_STRING groupName = 1; } - request struct AddGroupIfIdentifyingRequest { + request struct ViewGroupRequest { group_id groupId = 0; - CHAR_STRING groupName = 1; } request struct GetGroupMembershipRequest { @@ -556,37 +561,38 @@ server cluster Groups = 4 { group_id groupId = 0; } - request struct ViewGroupRequest { + request struct AddGroupIfIdentifyingRequest { group_id groupId = 0; + CHAR_STRING groupName = 1; } - response struct AddGroupResponse { + response struct AddGroupResponse = 0 { ENUM8 status = 0; group_id groupId = 1; } - response struct GetGroupMembershipResponse { - nullable INT8U capacity = 0; - group_id groupList[] = 1; - } - - response struct RemoveGroupResponse { - ENUM8 status = 0; - group_id groupId = 1; - } - - response struct ViewGroupResponse { + response struct ViewGroupResponse = 1 { ENUM8 status = 0; group_id groupId = 1; CHAR_STRING groupName = 2; } - command AddGroup(AddGroupRequest): AddGroupResponse = 0; - command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; - command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; - command RemoveAllGroups(): DefaultSuccess = 4; - command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + response struct GetGroupMembershipResponse = 2 { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse = 3 { + ENUM8 status = 0; + group_id groupId = 1; + } + + command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; } server cluster Identify = 3 { @@ -614,21 +620,21 @@ server cluster Identify = 3 { attribute int16u identifyTime = 0; readonly attribute enum8 identifyType = 1; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct IdentifyRequest { INT16U identifyTime = 0; } - response struct IdentifyQueryResponse { + response struct IdentifyQueryResponse = 0 { INT16U timeout = 0; } - command Identify(IdentifyRequest): DefaultSuccess = 0; - command IdentifyQuery(): IdentifyQueryResponse = 1; + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + command access(invoke: manage) IdentifyQuery(): IdentifyQueryResponse = 1; } server cluster LevelControl = 8 { @@ -649,10 +655,17 @@ server cluster LevelControl = 8 { } readonly attribute int8u currentLevel = 0; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } request struct MoveRequest { MoveMode moveMode = 0; @@ -661,11 +674,17 @@ server cluster LevelControl = 8 { BITMAP8 optionOverride = 3; } - request struct MoveToLevelRequest { - INT8U level = 0; - INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; } request struct MoveToLevelWithOnOffRequest { @@ -678,42 +697,29 @@ server cluster LevelControl = 8 { INT8U rate = 1; } - request struct StepRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; - } - request struct StepWithOnOffRequest { StepMode stepMode = 0; INT8U stepSize = 1; INT16U transitionTime = 2; } - request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; - } - - command Move(MoveRequest): DefaultSuccess = 1; command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command Move(MoveRequest): DefaultSuccess = 1; + command Step(StepRequest): DefaultSuccess = 2; + command Stop(StopRequest): DefaultSuccess = 3; command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; - command Step(StepRequest): DefaultSuccess = 2; command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; - command Stop(StopRequest): DefaultSuccess = 3; command StopWithOnOff(): DefaultSuccess = 7; } server cluster LocalizationConfiguration = 43 { attribute char_string<35> activeLocale = 1; readonly attribute CHAR_STRING supportedLocales[] = 2; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } server cluster NetworkCommissioning = 49 { @@ -747,94 +753,103 @@ server cluster NetworkCommissioning = 49 { kEthernetNetworkInterface = 0x4; } + bitmap WiFiSecurity : BITMAP8 { + kUnencrypted = 0x1; + kWepPersonal = 0x2; + kWpaPersonal = 0x4; + kWpa2Personal = 0x8; + kWpa3Personal = 0x10; + } + struct NetworkInfo { - OCTET_STRING networkID = 0; + OCTET_STRING<32> networkID = 0; BOOLEAN connected = 1; } struct WiFiInterfaceScanResult { - BITMAP8 security = 0; - OCTET_STRING ssid = 1; - OCTET_STRING bssid = 2; + WiFiSecurity security = 0; + OCTET_STRING<32> ssid = 1; + OCTET_STRING<6> bssid = 2; INT16U channel = 3; WiFiBand wiFiBand = 4; INT8S rssi = 5; } struct ThreadInterfaceScanResult { - INT64U panId = 0; + INT16U panId = 0; INT64U extendedPanId = 1; - CHAR_STRING networkName = 2; + CHAR_STRING<16> networkName = 2; INT16U channel = 3; INT8U version = 4; - INT64U extendedAddress = 5; + OCTET_STRING<8> extendedAddress = 5; INT8S rssi = 6; INT8U lqi = 7; } - readonly attribute int8u maxNetworks = 0; - readonly attribute NetworkInfo networks[] = 1; + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfo networks[] = 1; readonly attribute int8u scanMaxTimeSeconds = 2; readonly attribute int8u connectMaxTimeSeconds = 3; - attribute boolean interfaceEnabled = 4; - readonly attribute nullable NetworkCommissioningStatus lastNetworkingStatus = 5; - readonly attribute nullable octet_string<32> lastNetworkID = 6; - readonly attribute nullable int32s lastConnectErrorValue = 7; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatus lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable OCTET_STRING ssid = 0; + optional INT64U breadcrumb = 1; + } request struct AddOrUpdateWiFiNetworkRequest { OCTET_STRING ssid = 0; OCTET_STRING credentials = 1; - INT64U breadcrumb = 2; - } - - request struct ConnectNetworkRequest { - OCTET_STRING networkID = 0; - INT64U breadcrumb = 1; + optional INT64U breadcrumb = 2; } request struct RemoveNetworkRequest { OCTET_STRING networkID = 0; - INT64U breadcrumb = 1; + optional INT64U breadcrumb = 1; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + optional INT64U breadcrumb = 1; } request struct ReorderNetworkRequest { OCTET_STRING networkID = 0; INT8U networkIndex = 1; - INT64U breadcrumb = 2; + optional INT64U breadcrumb = 2; } - request struct ScanNetworksRequest { - OCTET_STRING ssid = 0; - INT64U breadcrumb = 1; - } - - response struct ConnectNetworkResponse { + response struct ScanNetworksResponse = 1 { NetworkCommissioningStatus networkingStatus = 0; - CHAR_STRING debugText = 1; - INT32S errorValue = 2; - } - - response struct NetworkConfigResponse { - NetworkCommissioningStatus networkingStatus = 0; - CHAR_STRING debugText = 1; - } - - response struct ScanNetworksResponse { - NetworkCommissioningStatus networkingStatus = 0; - CHAR_STRING debugText = 1; + optional CHAR_STRING debugText = 1; optional WiFiInterfaceScanResult wiFiScanResults[] = 2; optional ThreadInterfaceScanResult threadScanResults[] = 3; } - command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; - command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; - command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; - command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; - command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + optional INT8U networkIndex = 2; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatus networkingStatus = 0; + optional CHAR_STRING debugText = 1; + nullable INT32S errorValue = 2; + } + + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; } server cluster OnOff = 6 { @@ -853,6 +868,12 @@ server cluster OnOff = 6 { kDyingLight = 1; } + enum OnOffStartUpOnOff : ENUM8 { + kOff = 0; + kOn = 1; + kTogglePreviousOnOff = 2; + } + bitmap OnOffControl : BITMAP8 { kAcceptOnlyWhenOn = 0x1; } @@ -862,10 +883,10 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; command Off(): DefaultSuccess = 0; command On(): DefaultSuccess = 1; @@ -887,30 +908,42 @@ server cluster OperationalCredentials = 62 { } struct NOCStruct { - fabric_idx fabricIndex = 0; OCTET_STRING noc = 1; nullable OCTET_STRING icac = 2; + fabric_idx fabricIndex = 254; } struct FabricDescriptor { - fabric_idx fabricIndex = 0; OCTET_STRING<65> rootPublicKey = 1; INT16U vendorId = 2; FABRIC_ID fabricId = 3; NODE_ID nodeId = 4; CHAR_STRING<32> label = 5; + fabric_idx fabricIndex = 254; } - readonly attribute NOCStruct NOCs[] = 0; + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; readonly attribute FabricDescriptor fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; readonly attribute fabric_idx currentFabricIndex = 5; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct CSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } request struct AddNOCRequest { OCTET_STRING NOCValue = 0; @@ -920,68 +953,56 @@ server cluster OperationalCredentials = 62 { INT16U adminVendorId = 4; } - request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; - } - - request struct AttestationRequestRequest { - OCTET_STRING attestationNonce = 0; - } - - request struct CSRRequestRequest { - OCTET_STRING CSRNonce = 0; - } - - request struct CertificateChainRequestRequest { - INT8U certificateType = 0; - } - - request struct RemoveFabricRequest { - fabric_idx fabricIndex = 0; - } - - request struct RemoveTrustedRootCertificateRequest { - OCTET_STRING trustedRootIdentifier = 0; + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; } request struct UpdateFabricLabelRequest { CHAR_STRING label = 0; } - request struct UpdateNOCRequest { - OCTET_STRING NOCValue = 0; - optional OCTET_STRING ICACValue = 1; + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; } - response struct AttestationResponse { + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; OCTET_STRING signature = 1; } - response struct CSRResponse { + response struct CertificateChainResponse = 3 { + OCTET_STRING certificate = 0; + } + + response struct CSRResponse = 5 { OCTET_STRING NOCSRElements = 0; OCTET_STRING attestationSignature = 1; } - response struct CertificateChainResponse { - OCTET_STRING certificate = 0; - } - - response struct NOCResponse { + response struct NOCResponse = 8 { OperationalCertStatus statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } - command AddNOC(AddNOCRequest): NOCResponse = 6; - command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; - command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; - command CSRRequest(CSRRequestRequest): CSRResponse = 4; - command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; - command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; - command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; - command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; - command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command access(invoke: administer) RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; } server cluster Scenes = 5 { @@ -1000,10 +1021,10 @@ server cluster Scenes = 5 { readonly attribute int16u currentGroup = 2; readonly attribute boolean sceneValid = 3; readonly attribute bitmap8 nameSupport = 4; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { INT16U groupId = 0; @@ -1013,8 +1034,23 @@ server cluster Scenes = 5 { SceneExtensionFieldSet extensionFieldSets[] = 4; } - request struct GetSceneMembershipRequest { + request struct ViewSceneRequest { INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; } request struct RecallSceneRequest { @@ -1023,57 +1059,17 @@ server cluster Scenes = 5 { INT16U transitionTime = 2; } - request struct RemoveAllScenesRequest { + request struct GetSceneMembershipRequest { INT16U groupId = 0; } - request struct RemoveSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - } - - request struct StoreSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - } - - request struct ViewSceneRequest { - INT16U groupId = 0; - INT8U sceneId = 1; - } - - response struct AddSceneResponse { + response struct AddSceneResponse = 0 { ENUM8 status = 0; INT16U groupId = 1; INT8U sceneId = 2; } - response struct GetSceneMembershipResponse { - ENUM8 status = 0; - INT8U capacity = 1; - INT16U groupId = 2; - INT8U sceneCount = 3; - INT8U sceneList[] = 4; - } - - response struct RemoveAllScenesResponse { - ENUM8 status = 0; - INT16U groupId = 1; - } - - response struct RemoveSceneResponse { - ENUM8 status = 0; - INT16U groupId = 1; - INT8U sceneId = 2; - } - - response struct StoreSceneResponse { - ENUM8 status = 0; - INT16U groupId = 1; - INT8U sceneId = 2; - } - - response struct ViewSceneResponse { + response struct ViewSceneResponse = 1 { ENUM8 status = 0; INT16U groupId = 1; INT8U sceneId = 2; @@ -1082,13 +1078,38 @@ server cluster Scenes = 5 { SceneExtensionFieldSet extensionFieldSets[] = 5; } - command AddScene(AddSceneRequest): AddSceneResponse = 0; - command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + response struct RemoveSceneResponse = 2 { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct RemoveAllScenesResponse = 3 { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct StoreSceneResponse = 4 { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse = 6 { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; + command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; } server cluster TimeFormatLocalization = 44 { @@ -1113,10 +1134,10 @@ server cluster TimeFormatLocalization = 44 { } attribute HourFormat hourFormat = 0; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; } server cluster UnitLocalization = 45 { @@ -1130,10 +1151,10 @@ server cluster UnitLocalization = 45 { kTemperatureUnit = 0x1; } - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; - readonly global attribute attrib_id attributeList[] = 65531; - readonly global attribute int16u clusterRevision = 65533; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute int16u clusterRevision = 65533; }