Skip to content

Commit

Permalink
Merge branch 'master' into update_zap_files_to_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak-Shaha authored Feb 26, 2024
2 parents d8e77b0 + d899019 commit c5d88dc
Show file tree
Hide file tree
Showing 82 changed files with 1,155 additions and 327 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ jobs:
# target versions instead?
run: |
mkdir -p /tmp/darwin/framework-tests
../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
../../../out/debug/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ jobs:
--known-failure app/util/attribute-table.h \
--known-failure app/util/binding-table.cpp \
--known-failure app/util/binding-table.h \
--known-failure app/util/common.h \
--known-failure app/util/config.h \
--known-failure app/util/DataModelHandler.cpp \
--known-failure app/util/DataModelHandler.h \
Expand Down
55 changes: 3 additions & 52 deletions build/chip/chip_codegen.gni
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ template("_chip_build_time_zapgen") {
_output_subdir = "zap-generated"
}

pw_python_action("${_name}_zap_pregen") {
pw_python_action("${_name}_zap") {
script = "${chip_root}/scripts/tools/zap/generate.py"

# TODO: this seems to touch internals. Is this ok? speeds up builds!
Expand All @@ -165,7 +165,7 @@ template("_chip_build_time_zapgen") {
"--templates",
_template_path,
"--output-dir",
rebase_path(target_gen_dir) + "/zap_pregen/" + _output_subdir,
rebase_path(target_gen_dir) + "/zapgen/" + _output_subdir,

# TODO: lock file support should be removed as this serializes zap
# (slower), however this is currently done because on Darwin zap startup
Expand All @@ -188,54 +188,10 @@ template("_chip_build_time_zapgen") {

sources = [ _idl_file ]

outputs = []
foreach(name, invoker.outputs) {
outputs += [ "${target_gen_dir}/zap_pregen/${name}" ]
}

forward_variables_from(invoker, [ "prune_outputs" ])
if (defined(prune_outputs)) {
foreach(name, prune_outputs) {
outputs += [ "${target_gen_dir}/zap_pregen/${name}" ]
}
}
}

# This action ensures that any "extra" files generated by zap codegen
# are actually deleted.
#
# This is to avoid double-codegen of configurations like endpoint config
# or access credentials being generated for both "controller client" and
# application-specific
pw_python_action("${_name}_files") {
# TODO: this seems to touch internals. Is this ok? speeds up builds!
_pw_internal_run_in_venv = false

script = "${chip_root}/scripts/tools/zap/prune_outputs.py"

_keep_file = rebase_path("${target_gen_dir}/${_name}.keep.outputs")
write_file(_keep_file, invoker.outputs, "list lines")

args = [
"--keep",
_keep_file,
"--input-dir",
rebase_path("${target_gen_dir}/zap_pregen/"),
"--output-dir",
rebase_path("${target_gen_dir}/zapgen/"),
]

inputs = []
foreach(name, invoker.outputs) {
inputs += [ "${target_gen_dir}/zap_pregen/${name}" ]
}

outputs = []
foreach(name, invoker.outputs) {
outputs += [ "${target_gen_dir}/zapgen/${name}" ]
}

deps = [ ":${_name}_zap_pregen" ]
}

source_set(_name) {
Expand All @@ -255,10 +211,7 @@ template("_chip_build_time_zapgen") {
if (!defined(public_deps)) {
public_deps = []
}
public_deps += [
":${_name}_files",
":${_name}_zap_pregen",
]
public_deps += [ ":${_name}_zap" ]
}
}

Expand Down Expand Up @@ -420,7 +373,6 @@ template("chip_zapgen") {
"input",
"outputs",
"public_configs",
"prune_outputs",
])
}
} else {
Expand Down Expand Up @@ -482,7 +434,6 @@ template("chip_zapgen") {
[
"deps",
"public_configs",
"prune_outputs",
])
if (!defined(public_configs)) {
public_configs = []
Expand Down
18 changes: 18 additions & 0 deletions examples/air-quality-sensor-app/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,21 @@ value.
```
$ echo '{"Name":"NitrogenDioxideConcentrationMeasurement","NewValue":1}' > /tmp/chip_air_quality_fifo_<PID>
```

Generate event `Pm1ConcentrationMeasurement`, to change the PM1 value.

```
echo '{"Name":"Pm1ConcentrationMeasurement","NewValue":1}' > /tmp/chip_air_quality_fifo_<PID>
```

Generate event `Pm25ConcentrationMeasurement`, to change the PM2.5 value.

```
echo '{"Name":"Pm25ConcentrationMeasurement","NewValue":2.5}' > /tmp/chip_air_quality_fifo_<PID>
```

Generate event `Pm10ConcentrationMeasurement`, to change the PM10 value.

```
echo '{"Name":"Pm10ConcentrationMeasurement","NewValue":10}' > /tmp/chip_air_quality_fifo_<PID>
```
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1346,7 +1350,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

endpoint 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1346,7 +1350,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

endpoint 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ChipLogProgress(chipTool, "Downloading logs from node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId));

MTRDeviceController * commissioner = CurrentCommissioner();
auto * device = [MTRDevice deviceWithNodeID:@(mNodeId) controller:commissioner];
auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner];

auto logType = static_cast<MTRDiagnosticLogType>(mLogType);
auto queue = dispatch_queue_create("com.chip.bdx.downloader", DISPATCH_QUEUE_SERIAL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -2042,7 +2046,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

/** Attributes and commands for scene configuration and manipulation. */
Expand Down
6 changes: 5 additions & 1 deletion examples/light-switch-app/qpg/zap/switch.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1813,7 +1817,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

/** Attributes and commands for scene configuration and manipulation. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1474,7 +1478,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

endpoint 0 {
Expand Down
6 changes: 5 additions & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1878,7 +1882,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

/** An interface to a generic way to secure a door */
Expand Down
1 change: 1 addition & 0 deletions examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5069,6 +5069,7 @@
"define": "ICD_MANAGEMENT_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "IdleModeDuration",
Expand Down
6 changes: 5 additions & 1 deletion examples/lock-app/qpg/zap/lock.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1481,6 +1481,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1490,7 +1494,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

/** An interface to a generic way to secure a door */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1810,7 +1814,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

/** This cluster provides an interface for observing and managing the state of smoke and CO alarms. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "AppConfig.h"
#include "AppTask.h"
#include "app/util/common.h"

#include <app-common/zap-generated/attributes/Accessors.h>
#include <lib/support/logging/CHIPLogging.h>

Expand Down
6 changes: 5 additions & 1 deletion examples/window-app/common/window-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,10 @@ cluster IcdManagement = 70 {
optional octet_string<16> verificationKey = 1;
}

request struct StayActiveRequestRequest {
int32u stayActiveDuration = 0;
}

response struct StayActiveResponse = 4 {
int32u promisedActiveDuration = 0;
}
Expand All @@ -1908,7 +1912,7 @@ cluster IcdManagement = 70 {
/** Unregister a client from an end device */
fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2;
/** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */
command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3;
command access(invoke: manage) StayActiveRequest(StayActiveRequestRequest): StayActiveResponse = 3;
}

/** Provides an interface for controlling and adjusting automatic window coverings. */
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
37 : [NXP] Update Docker image for RW61X SDK
38 : [NXP] Update Docker image for K32W1 SDK
6 changes: 3 additions & 3 deletions integrations/docker/images/stage-2/chip-build-k32w/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ RUN set -x \

RUN set -x \
&& mkdir -p k32w1 \
&& wget https://cache.nxp.com/lgfiles/bsps/SDK_2_12_6_K32W148-EVK.zip \
&& unzip SDK_2_12_6_K32W148-EVK.zip -d k32w1 \
&& rm -rf SDK_2_12_6_K32W148-EVK.zip
&& wget https://cache.nxp.com/lgfiles/bsps/SDK_2_12_7_K32W148-EVK.zip \
&& unzip SDK_2_12_7_K32W148-EVK.zip -d k32w1 \
&& rm -rf SDK_2_12_7_K32W148-EVK.zip

FROM ghcr.io/project-chip/chip-build:${VERSION}

Expand Down
11 changes: 11 additions & 0 deletions scripts/py_matter_yamltests/matter_yamltests/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Optional

from .parser import TestStep


Expand Down Expand Up @@ -213,6 +215,15 @@ async def step_manual(self):
"""
pass

def show_prompt(self,
msg: str,
placeholder: Optional[str] = None,
default_value: Optional[str] = None) -> None:
"""
This method is called when the step needs to ask the user to perform some action or provide some value.
"""
pass


class WebSocketRunnerHooks():
def connecting(self, url: str):
Expand Down
Loading

0 comments on commit c5d88dc

Please sign in to comment.