Skip to content

Commit

Permalink
Merge branch 'master' into fix_ci_for_dm_xml
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored Oct 27, 2024
2 parents 7d150b1 + ac43b68 commit b79e11c
Show file tree
Hide file tree
Showing 537 changed files with 17,075 additions and 130,065 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/cert_test_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
pull_request:
paths:
- "src/app/tests/suites/certification/**"
permissions:
contents: read

jobs:
check-certification-tests:
Expand All @@ -30,6 +32,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run checks
run: |
python3 scripts/tests/matter_yaml_linter.py
2 changes: 1 addition & 1 deletion .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-efr32:85
image: ghcr.io/project-chip/chip-build-efr32:89
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@
path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration
url = https://github.com/Infineon/lwip-network-interface-integration.git
platforms = infineon
[submodule "third_party/lwip/repo"]
path = third_party/lwip/repo
url = https://github.com/lwip-tcpip/lwip.git
[submodule "third_party/abseil-cpp/src"]
path = third_party/abseil-cpp/src
url = https://github.com/abseil/abseil-cpp.git
Expand All @@ -340,7 +343,7 @@
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest
platforms = linux,darwin
platforms = linux,android,darwin,tizen
[submodule "third_party/re2/src"]
path = third_party/re2/src
url = https://github.com/google/re2.git
Expand Down
6 changes: 6 additions & 0 deletions .gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/googletest.gni")
import("//build_overrides/pigweed.gni")

# The location of the build configuration file.
Expand All @@ -33,6 +34,11 @@ default_args = {
# GN target to use for the default Python build venv.
pw_build_PYTHON_BUILD_VENV = "//:matter_build_venv"

# Use the GoogleTest backend for unit tests running on host.
pw_unit_test_BACKEND = "$dir_pw_unit_test:googletest"
pw_unit_test_MAIN = "$dir_pigweed/third_party/googletest:gmock_main"
dir_pw_third_party_googletest = "$dir_googletest"

# Required for pw_unit_test
pw_sys_io_BACKEND = "$dir_pw_sys_io_stdio"
pw_assert_BACKEND = "$dir_pw_assert_log"
Expand Down
3 changes: 2 additions & 1 deletion build/toolchain/pw_fuzzer/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/googletest.gni")
import("//build_overrides/pigweed.gni")

import("$dir_pigweed/targets/host/target_toolchains.gni")
Expand Down Expand Up @@ -61,7 +62,7 @@ gcc_toolchain("chip_pw_fuzztest") {

dir_pw_third_party_abseil_cpp = "//third_party/abseil-cpp/src"
dir_pw_third_party_fuzztest = "//third_party/fuzztest"
dir_pw_third_party_googletest = "//third_party/googletest"
dir_pw_third_party_googletest = "$dir_googletest"

# TODO: Seems that re2 support within FuzzTest was deprecated, keeping it defined is triggering warning
# Remove if re2 is indeed not needed
Expand Down
18 changes: 18 additions & 0 deletions build_overrides/googletest.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2024 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.

declare_args() {
# Location of the GoogleTest repository.
dir_googletest = "//third_party/googletest"
}
6 changes: 3 additions & 3 deletions config/ios/args.gni → config/darwin/args.gni
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2024 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.
Expand All @@ -14,9 +14,9 @@

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

chip_system_config_clock = "gettimeofday"
chip_device_platform = "darwin"

chip_project_config_include_dirs = [ "${chip_root}/config/ios" ]
chip_project_config_include = ""
chip_system_project_config_include = ""

pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ]
2 changes: 1 addition & 1 deletion config/esp32/components/chip/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- if: "target != esp32h2"

espressif/esp_secure_cert_mgr:
version: "^2.3.0"
version: "^2.5.0"
rules:
- if: "idf_version >=4.3"

Expand Down
52 changes: 0 additions & 52 deletions config/ios/CHIPProjectConfig.h

This file was deleted.

26 changes: 0 additions & 26 deletions config/ios/SystemProjectConfig.h

This file was deleted.

18 changes: 18 additions & 0 deletions examples/build_overrides/googletest.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2024 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.

declare_args() {
# Location of the GoogleTest repository.
dir_googletest = "//third_party/connectedhomeip/third_party/googletest"
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ const CharSpan LaundryWasherControlDelegate::spinSpeedsNameOptions[] = {
};

const NumberOfRinsesEnum LaundryWasherControlDelegate::supportRinsesOptions[] = {
NumberOfRinsesEnum::kNone,
NumberOfRinsesEnum::kNormal,
NumberOfRinsesEnum::kExtra,
NumberOfRinsesEnum::kMax,
};

LaundryWasherControlDelegate LaundryWasherControlDelegate::instance;
Expand Down
57 changes: 57 additions & 0 deletions examples/chef/common/chef-laundry-washer-mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ template <typename T>
using List = chip::app::DataModel::List<T>;
using ModeTagStructType = chip::app::Clusters::detail::Structs::ModeTagStruct::Type;

#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER
static LaundryWasherModeDelegate * gLaundryWasherModeDelegate = nullptr;
static ModeBase::Instance * gLaundryWasherModeInstance = nullptr;

Expand Down Expand Up @@ -94,6 +95,61 @@ void LaundryWasherMode::Shutdown()
}
}

chip::Protocols::InteractionModel::Status chefLaundryWasherModeWriteCallback(chip::EndpointId endpointId, chip::ClusterId clusterId,
const EmberAfAttributeMetadata * attributeMetadata,
uint8_t * buffer)
{
VerifyOrReturnError(endpointId == 1 || gLaundryWasherModeInstance != nullptr,
chip::Protocols::InteractionModel::Status::Failure);

chip::Protocols::InteractionModel::Status ret;
chip::AttributeId attributeId = attributeMetadata->attributeId;

switch (attributeId)
{
case chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id: {
uint8_t m = buffer[0];
ret = gLaundryWasherModeInstance->UpdateCurrentMode(m);
if (chip::Protocols::InteractionModel::Status::Success != ret)
{
ChipLogError(DeviceLayer, "Invalid Attribute Update status: %d", static_cast<int>(ret));
}
}
break;
default:
ret = chip::Protocols::InteractionModel::Status::UnsupportedWrite;
ChipLogError(DeviceLayer, "Unsupported Attribute ID: %d", static_cast<int>(attributeId));
break;
}

return ret;
}

chip::Protocols::InteractionModel::Status chefLaundryWasherModeReadCallback(chip::EndpointId endpointId, chip::ClusterId clusterId,
const EmberAfAttributeMetadata * attributeMetadata,
uint8_t * buffer, uint16_t maxReadLength)
{
VerifyOrReturnValue(maxReadLength > 0, chip::Protocols::InteractionModel::Status::ResourceExhausted);

chip::Protocols::InteractionModel::Status ret = chip::Protocols::InteractionModel::Status::Success;
chip::AttributeId attributeId = attributeMetadata->attributeId;

switch (attributeId)
{
case chip::app::Clusters::LaundryWasherMode::Attributes::CurrentMode::Id: {
*buffer = gLaundryWasherModeInstance->GetCurrentMode();
ChipLogDetail(DeviceLayer, "Reading LaundryWasherMode CurrentMode : %d", static_cast<int>(attributeId));
}
break;
default:
ret = chip::Protocols::InteractionModel::Status::UnsupportedRead;
ChipLogDetail(DeviceLayer, "Unsupported attributeId %d from reading RvcCleanMode", static_cast<int>(attributeId));
break;
}

return ret;
}

void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId)
{
VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1.
Expand All @@ -103,3 +159,4 @@ void emberAfLaundryWasherModeClusterInitCallback(chip::EndpointId endpointId)
new ModeBase::Instance(gLaundryWasherModeDelegate, 0x1, LaundryWasherMode::Id, chip::to_underlying(Feature::kOnOff));
gLaundryWasherModeInstance->Init();
}
#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER
9 changes: 9 additions & 0 deletions examples/chef/common/chef-laundry-washer-mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,12 @@ void Shutdown();
} // namespace Clusters
} // namespace app
} // namespace chip

#ifdef MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER
chip::Protocols::InteractionModel::Status chefLaundryWasherModeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
const EmberAfAttributeMetadata * attributeMetadata,
uint8_t * buffer);
chip::Protocols::InteractionModel::Status chefLaundryWasherModeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId,
const EmberAfAttributeMetadata * attributeMetadata,
uint8_t * buffer, uint16_t maxReadLength);
#endif // MATTER_DM_PLUGIN_LAUNDRY_WASHER_MODE_SERVER
Loading

0 comments on commit b79e11c

Please sign in to comment.