Skip to content

Commit

Permalink
Merge branch 'master' into python_tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Jul 24, 2023
2 parents f2f042a + b1b324e commit 0f1aeab
Show file tree
Hide file tree
Showing 422 changed files with 58,583 additions and 34,088 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build-cert-bins.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Certification Image
on:
workflow_call:
workflow_dispatch:
jobs:
build-cert-bin:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ghcr.io/project-chip/chip-cert-bins
tags: latest
dockerfile: ./integrations/docker/images/chip-cert-bins/Dockerfile
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
platforms: linux/amd64,linux/arm64,linux/arm
2 changes: 1 addition & 1 deletion .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ groups:
reviewers:
teams: [reviewers-logitech]
reviews:
request: 10
request: 0 # Requested to be only on demand
shared-reviewers-nordic:
type: optional
conditions:
Expand Down
3 changes: 2 additions & 1 deletion build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ declare_args() {
c_standard = "gnu11"

# C++ standard level (value for -std flag).
if (current_os == "linux" || current_os == "mac" || current_os == "android") {
if (current_os == "linux" || current_os == "mac" || current_os == "ios" ||
current_os == "android") {
cpp_standard = "gnu++17"
} else {
cpp_standard = "gnu++14"
Expand Down
2 changes: 1 addition & 1 deletion build/toolchain/android/android_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ template("android_clang_toolchain") {
_android_toolchain_args = {
current_os = "android"
is_clang = true

forward_variables_from(_invoker_toolchain_args, "*")
}

Expand Down Expand Up @@ -70,5 +69,6 @@ template("android_clang_toolchain") {
ar = _ndk_prefix + "llvm-ar"
cc = _ndk_prefix + _tool_name_root + "clang"
cxx = _ndk_prefix + _tool_name_root + "clang++"
link_generate_map_file = false
}
}
4 changes: 4 additions & 0 deletions build/toolchain/gcc_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ template("gcc_toolchain") {
cxx = invoker.cxx
}

if (defined(invoker.link_generate_map_file)) {
link_generate_map_file = invoker.link_generate_map_file
}

is_host_toolchain = invoker_toolchain_args.current_os == host_os
link_group = invoker_toolchain_args.current_os != "mac" &&
invoker_toolchain_args.current_os != "ios"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void emberAfActivatedCarbonFilterMonitoringClusterInitCallback(chip::EndpointId
}
void emberAfHepaFilterMonitoringClusterInitCallback(chip::EndpointId endpoint)
{
VerifyOrDie(gHepaFilterInstance == nullptr);
gHepaFilterInstance = new HepaFilterMonitoringInstance(endpoint, static_cast<uint32_t>(gHepaFilterFeatureMap.to_ulong()),
DegradationDirectionEnum::kDown, true);
gHepaFilterInstance->Init();
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ list(
APPEND ${list_chip_main_sources}

${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp
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 @@ -72,6 +72,8 @@ asr_executable("clusters_app") {

sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp",
"${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",
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ ti_simplelink_executable("all-clusters-app") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp",
"${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",
Expand Down
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 @@ -77,6 +77,8 @@ ti_simplelink_executable("all-clusters-app") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp",
"${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",
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ namespace {
class AppCallbacks : public AppDelegate
{
public:
void OnCommissioningSessionEstablishmentStarted() {}
void OnCommissioningSessionStarted() override { bluetoothLED.Set(true); }
void OnCommissioningSessionStopped() override
void OnCommissioningSessionStopped(CHIP_ERROR err) override
{
bluetoothLED.Set(false);
pairingWindowLED.Set(false);
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 @@ -108,6 +108,8 @@ psoc6_executable("clusters_app") {

sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp",
"${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",
Expand Down
3 changes: 0 additions & 3 deletions examples/all-clusters-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]
matter_enable_tracing_support = true
matter_log_json_payload_decode_full = true
matter_log_json_payload_hex = true

# Perfetto requires C++17
cpp_standard = "gnu++17"
2 changes: 2 additions & 0 deletions examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ target_sources(${APP_TARGET} PRIVATE
${MBED_COMMON}/util/LEDWidget.cpp
${MBED_COMMON}/util/DFUManager.cpp
${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp
${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp
${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
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp
${NRFCONNECT_COMMON}/util/LEDWidget.cpp)

chip_configure_data_model(app
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/nxp/mw320/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ mw320_executable("shell_mw320") {
]
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp",
"${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",
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/openiotsdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ target_sources(${APP_TARGET}
main/main_ns.cpp
${ALL_CLUSTERS_COMMON}/src/smco-stub.cpp
${ALL_CLUSTERS_COMMON}/src/bridged-actions-stub.cpp
${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON}/src/resource-monitoring-instances.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp
)
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/telink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-instances.cpp
${TELINK_COMMON}/common/src/mainCommon.cpp
${TELINK_COMMON}/common/src/AppTaskCommon.cpp
${TELINK_COMMON}/util/src/LEDWidget.cpp
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ source_set("chip-all-clusters-common") {
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-instances.cpp",
"${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",
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-minimal-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ namespace {
class AppCallbacks : public AppDelegate
{
public:
void OnCommissioningSessionEstablishmentStarted() {}
void OnCommissioningSessionStarted() override { bluetoothLED.Set(true); }
void OnCommissioningSessionStopped() override
void OnCommissioningSessionStopped(CHIP_ERROR err) override
{
bluetoothLED.Set(false);
pairingWindowLED.Set(false);
Expand Down
3 changes: 0 additions & 3 deletions examples/all-clusters-minimal-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ chip_project_config_include_dirs =
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]

matter_enable_tracing_support = true

# Perfetto requires C++17
cpp_standard = "gnu++17"
11 changes: 11 additions & 0 deletions examples/bridge-app/linux/Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,17 @@ void DevicePowerSource::SetDescription(std::string aDescription)
}
}

void DevicePowerSource::SetEndpointList(std::vector<chip::EndpointId> aEndpointList)
{
bool changed = aEndpointList != mEndpointList;
mEndpointList = aEndpointList;

if (changed && mChanged_CB)
{
mChanged_CB(this, kChanged_EndpointList);
}
}

EndpointListInfo::EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type)
{
mEndpointListId = endpointListId;
Expand Down
3 changes: 0 additions & 3 deletions examples/bridge-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ chip_project_config_include_dirs =
chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ]

matter_enable_tracing_support = true

# Perfetto requires C++17
cpp_standard = "gnu++17"
9 changes: 7 additions & 2 deletions examples/bridge-app/linux/include/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ class DevicePowerSource : public Device
public:
enum Changed_t
{
kChanged_BatLevel = kChanged_Last << 1,
kChanged_Description = kChanged_Last << 2,
kChanged_BatLevel = kChanged_Last << 1,
kChanged_Description = kChanged_Last << 2,
kChanged_EndpointList = kChanged_Last << 3,
} Changed;

DevicePowerSource(const char * szDeviceName, std::string szLocation,
Expand All @@ -189,12 +190,14 @@ class DevicePowerSource : public Device

void SetBatChargeLevel(uint8_t aBatChargeLevel);
void SetDescription(std::string aDescription);
void SetEndpointList(std::vector<chip::EndpointId> mEndpointList);

inline uint32_t GetFeatureMap() { return mFeatureMap.Raw(); };
inline uint8_t GetBatChargeLevel() { return mBatChargeLevel; };
inline uint8_t GetOrder() { return mOrder; };
inline uint8_t GetStatus() { return mStatus; };
inline std::string GetDescription() { return mDescription; };
std::vector<chip::EndpointId> & GetEndpointList() { return mEndpointList; }

private:
void HandleDeviceChange(Device * device, Device::Changed_t changeMask);
Expand All @@ -206,6 +209,8 @@ class DevicePowerSource : public Device
std::string mDescription = "Primary Battery";
chip::BitFlags<chip::app::Clusters::PowerSource::Feature> mFeatureMap;
DeviceCallback_fn mChanged_CB;
// This is linux, vector is not going to kill us here and it's easier. Plus, post c++11, storage is contiguous with .data()
std::vector<chip::EndpointId> mEndpointList;
};

class EndpointListInfo
Expand Down
Loading

0 comments on commit 0f1aeab

Please sign in to comment.