Skip to content

Commit

Permalink
Merge branch 'master' into feature/fix-cdc-passcode-cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov authored Jul 26, 2024
2 parents 9bfc296 + 9ef5bbf commit 1b882bc
Show file tree
Hide file tree
Showing 58 changed files with 4,983 additions and 151 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,21 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DRLK_2_3.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DeviceBasicComposition.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DeviceConformance.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_2.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_3.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_4.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_5.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_6.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_7.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_8.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_DEM_2_9.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_1.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_2.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_3.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_4.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEM_2_5.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_2.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_3.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_4.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EEVSE_2_5.py'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_EPM_2_1.py'
Expand Down
2 changes: 2 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (chip_build_tests) {
deps += [ "//src:tests" ]
deps += [ "//examples:example_tests" ]

if (current_os == "android" && current_toolchain == default_toolchain) {
deps += [ "${chip_root}/build/chip/java/tests:java_build_test" ]
}
Expand Down
3 changes: 3 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ endif()

if (CONFIG_ENABLE_MATTER_OVER_THREAD)
chip_gn_arg_append("chip_enable_openthread" "true")
if (CONFIG_THREAD_NETWORK_COMMISSIONING_DRIVER)
chip_gn_arg_append("chip_device_config_thread_network_endpoint_id" ${CONFIG_THREAD_NETWORK_ENDPOINT_ID})
endif()
else()
chip_gn_arg_append("chip_enable_openthread" "false")
endif()
Expand Down
54 changes: 54 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ menu "CHIP Core"
help
Option to enable/disable CHIP log level filtering APIs.

config ENABLE_CHIP_DATA_MODEL
bool "Enable CHIP data model"
default y
help
Option to enable/disable CHIP data model.

endmenu # "General Options"

menu "Networking Options"
Expand Down Expand Up @@ -1289,4 +1295,52 @@ menu "CHIP Device Layer"

endmenu

menu "Network Commissioning Driver Endpoint Id"
config THREAD_NETWORK_COMMISSIONING_DRIVER
bool "Use the generic Thread network commissioning driver"
depends on ENABLE_MATTER_OVER_THREAD && ENABLE_CHIP_DATA_MODEL
default y
help
Option to enable/disable the use of generic Thread network commissioning driver.

config THREAD_NETWORK_ENDPOINT_ID
int "Endpoint Id for Thread network"
depends on THREAD_NETWORK_COMMISSIONING_DRIVER
range 0 65534
default 0
help
The endpoint id for the generic Thread network commissioning driver.

config WIFI_NETWORK_COMMISSIONING_DRIVER
bool "Use ESP Wi-Fi network commissioning driver"
depends on (ENABLE_WIFI_STATION || ENABLE_WIFI_AP) && ENABLE_CHIP_DATA_MODEL
default y
help
Option to enable/disable the use of ESP Wi-Fi network commissioning driver.

config WIFI_NETWORK_ENDPOINT_ID
int "Endpoint Id for Wi-Fi network"
depends on WIFI_NETWORK_COMMISSIONING_DRIVER
range 0 65534
default 0
help
The endpoint id for the ESP Wi-Fi network commissioning driver.

config ETHERNET_NETWORK_COMMISSIONING_DRIVER
bool "Use ESP Ethernet network commissioning driver"
depends on ENABLE_ETHERNET_TELEMETRY && ENABLE_CHIP_DATA_MODEL
default y
help
Option to enable/disable the use of ESP Ethernet network commissioning driver.

config ETHERNET_NETWORK_ENDPOINT_ID
int "Endpoint Id for Ethernet network"
depends on ETHERNET_NETWORK_COMMISSIONING_DRIVER
range 0 65534
default 0
help
The endpoint id for the ESP Ethernet network commissioning driver.

endmenu

endmenu
32 changes: 32 additions & 0 deletions examples/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2020-2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${build_root}/config/compiler/compiler.gni")
import("${chip_root}/build/chip/tests.gni")
import("${chip_root}/src/platform/device.gni")

if (chip_build_tests) {
import("${chip_root}/build/chip/chip_test_group.gni")

chip_test_group("example_tests") {
deps = []
tests = []
if (chip_device_platform == "linux" && current_os == "linux") {
tests += [ "${chip_root}/examples/energy-management-app/energy-management-common/tests" ]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,24 @@ using namespace chip::app::Clusters;
using namespace chip::app::Clusters::EnergyEvse;

static std::unique_ptr<EnergyEvseDelegate> gDelegate;
static std::unique_ptr<EvseTargetsDelegate> gEvseTargetsDelegate;
static std::unique_ptr<EnergyEvseManager> gInstance;

void emberAfEnergyEvseClusterInitCallback(chip::EndpointId endpointId)
{
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
VerifyOrDie(!gDelegate);
VerifyOrDie(!gEvseTargetsDelegate);
VerifyOrDie(!gInstance);

gDelegate = std::make_unique<EnergyEvseDelegate>();
gEvseTargetsDelegate = std::make_unique<EvseTargetsDelegate>();
if (!gEvseTargetsDelegate)
{
ChipLogError(AppServer, "Failed to allocate memory for EvseTargetsDelegate");
return;
}

gDelegate = std::make_unique<EnergyEvseDelegate>(*gEvseTargetsDelegate);
if (gDelegate)
{
gInstance = std::make_unique<EnergyEvseManager>(
Expand Down
4 changes: 3 additions & 1 deletion examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,15 @@ list(

${chip_dir}/examples/microwave-oven-app/microwave-oven-common/src/microwave-oven-device.cpp

${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/ChargingTargetsMemMgr.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseTargetsStore.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp

${chip_dir}/examples/platform/ameba/route_hook/ameba_route_hook.c
${chip_dir}/examples/platform/ameba/route_hook/ameba_route_table.c
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/asr/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ asr_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ChargingTargetsMemMgr.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseTargetsStore.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${examples_plat_dir}/ButtonHandler.cpp",
"${examples_plat_dir}/CHIPDeviceManager.cpp",
Expand Down
Empty file.
2 changes: 2 additions & 0 deletions examples/all-clusters-app/cc13x4_26x4/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ ti_simplelink_executable("all-clusters-app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ChargingTargetsMemMgr.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseTargetsStore.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
"${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.cpp",
Expand Down
18 changes: 12 additions & 6 deletions examples/all-clusters-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@ NetworkCommissioning Endpoint can be used to manage the driver of extra network
interface.

For ESP32-C6 DevKits, if `CHIP_DEVICE_CONFIG_ENABLE_WIFI` and
`CHIP_DEVICE_CONFIG_ENABLE_THREAD` are both enabled, the NetworkCommissioning
cluster in Endpoint 0 will be used for Thread network driver and the same
cluster on Endpoint 65534 will be used for Wi-Fi network driver.
`CHIP_DEVICE_CONFIG_ENABLE_THREAD` are both enabled, please set
`CONFIG_THREAD_NETWORK_ENDPOINT_ID` to 0 and set
`CONFIG_WIFI_NETWORK_ENDPOINT_ID` to 65534, which presents that the
NetworkCommissioning cluster in Endpoint 0 will be used for Thread network
driver and the same cluster on Endpoint 65534 will be used for Wi-Fi network
driver. Or vice versa.

For ESP32-Ethernet-Kits, if `CHIP_DEVICE_CONFIG_ENABLE_WIFI` and
`CHIP_DEVICE_CONFIG_ENABLE_ETHERNET` are both enabled, the NetworkCommissioning
cluster in Endpoint 0 will be used for Ethernet network driver and the same
cluster on Endpoint 65534 will be used for Wi-Fi network driver.
`CHIP_DEVICE_CONFIG_ENABLE_ETHERNET` are both enabled, please set
`CONFIG_ETHERNET_NETWORK_ENDPOINT_ID` to 0 and set
`CONFIG_WIFI_NETWORK_ENDPOINT_ID` to 65534, which presents that the
NetworkCommissioning cluster in Endpoint 0 will be used for Ethernet network
driver and the same cluster on Endpoint 65534 will be used for Wi-Fi network
driver. Or vice versa.

---

Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/infineon/psoc6/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ psoc6_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ChargingTargetsMemMgr.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseTargetsStore.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${examples_plat_dir}/LEDWidget.cpp",
"${examples_plat_dir}/init_psoc6Platform.cpp",
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,14 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/water-heater-mode.cpp",
"${chip_root}/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ChargingTargetsMemMgr.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseTargetsStore.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/device-energy-management-mode.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/energy-evse-mode.cpp",
Expand Down
4 changes: 3 additions & 1 deletion examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,15 @@ target_sources(${APP_TARGET} PRIVATE
${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-temperature-levels.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyTimeUtils.cpp
${ENERGY_MANAGEMENT_COMMON}/src/ChargingTargetsMemMgr.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EVSEManufacturerImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseTargetsStore.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyTimeUtils.cpp
)

chip_configure_data_model(${APP_TARGET}
Expand Down
4 changes: 3 additions & 1 deletion examples/all-clusters-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyTimeUtils.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/ChargingTargetsMemMgr.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EVSEManufacturerImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseTargetsStore.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyTimeUtils.cpp
${NRFCONNECT_COMMON}/util/LEDWidget.cpp)

chip_configure_data_model(app
Expand Down
Loading

0 comments on commit 1b882bc

Please sign in to comment.