Skip to content

Commit db32be7

Browse files
committed
Merge remote-tracking branch 'upstream/master' into protocol-pigweed
2 parents 1e5d972 + fc3591d commit db32be7

File tree

123 files changed

+11218
-575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+11218
-575
lines changed

.github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ jobs:
333333
scripts/run_in_build_env.sh 'virtualenv pyenv'
334334
source pyenv/bin/activate
335335
pip3 install -r src/setup_payload/python/requirements.txt
336-
python3 src/setup_payload/tests/run_python_setup_payload_gen_test.py out/chip-tool
336+
python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool
337337
338338
build_linux_python_lighting_device:
339339
name: Build on Linux (python lighting-app)

.github/workflows/darwin.yaml

+4-9
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ jobs:
9797
bootstrap-logs-framework-${{ matrix.options.flavor }}
9898
- name: Build example All Clusters Server
9999
run: |
100-
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug chip_config_network_layer_ble=false
100+
scripts/examples/gn_build_example.sh examples/all-clusters-app/linux out/debug/all-clusters-app chip_config_network_layer_ble=false
101101
- name: Build example OTA Provider
102102
run: |
103-
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug chip_config_network_layer_ble=false
103+
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/debug/ota-provider-app chip_config_network_layer_ble=false
104104
- name: Build example OTA Requestor
105105
run: |
106106
scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0
@@ -113,13 +113,8 @@ jobs:
113113
run: |
114114
mkdir -p /tmp/darwin/framework-tests
115115
echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt
116-
../../../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) &
117-
../../../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) &
118-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 101 --passcode 1001 --KVS /tmp/chip-all-clusters-app-kvs101 --secured-device-port 5531 &
119-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 102 --passcode 1002 --KVS /tmp/chip-all-clusters-app-kvs102 --secured-device-port 5532 &
120-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 103 --passcode 1003 --KVS /tmp/chip-all-clusters-app-kvs103 --secured-device-port 5533 &
121-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 104 --passcode 1004 --KVS /tmp/chip-all-clusters-app-kvs104 --secured-device-port 5534 &
122-
../../../out/debug/chip-all-clusters-app --interface-id -1 --discriminator 105 --passcode 1005 --KVS /tmp/chip-all-clusters-app-kvs105 --secured-device-port 5535 &
116+
../../../out/debug/all-clusters-app/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) &
117+
../../../out/debug/all-clusters-app/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) &
123118
124119
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
125120

.github/workflows/lint.yml

-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ jobs:
9898
--known-failure controller/ExamplePersistentStorage.cpp \
9999
--known-failure controller/ExamplePersistentStorage.h \
100100
--known-failure app/AttributeAccessToken.h \
101-
--known-failure app/CommandHandler.h \
102101
--known-failure app/CommandHandlerInterface.h \
103102
--known-failure app/CommandResponseSender.h \
104103
--known-failure app/CommandSenderLegacyCallback.h \

.github/workflows/minimal-build.yaml

+23-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ concurrency:
2626
cancel-in-progress: true
2727

2828
jobs:
29-
minimal:
29+
minimal-all-clusters:
3030
name: Linux / configure build of all-clusters-app
3131

3232
if: github.actor != 'restyled-io[bot]'
@@ -47,3 +47,25 @@ jobs:
4747
- name: Configure and build All Clusters App
4848
run: |
4949
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build
50+
51+
minimal-network-manager:
52+
name: Linux / configure build of network-manager-app
53+
54+
if: github.actor != 'restyled-io[bot]'
55+
runs-on: ubuntu-latest
56+
57+
container:
58+
image: ghcr.io/project-chip/chip-build-minimal:50
59+
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Checkout submodules # but don't bootstrap!
65+
uses: ./.github/actions/checkout-submodules
66+
with:
67+
platform: linux
68+
69+
- name: Configure and build Network Manager App
70+
run: |
71+
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux && ./ninja-build

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ jobs:
189189
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
190190
src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml \
191191
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
192+
src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml \
192193
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
193194
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
194195
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \

docs/testing/yaml.md

+29
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,17 @@ function can be use. See
279279
[TestEqualities](https://github.com/project-chip/connectedhomeip/blob/master/src/app/tests/suites/TestEqualities.yaml)
280280
for an example of how to use this pseudo-cluster.
281281

282+
#### Setting step timeouts
283+
284+
The timeout argument can be used for each individual test step to set the time
285+
the runner will wait for a test step to complete before reporting a failure.
286+
287+
Note that this timeout is different than the subscription report timeout and the
288+
subscription report timeout is not currently adjustable in YAML.
289+
290+
There several other options for configuring test steps as shown in the
291+
[YAML schema](./yaml_schema.md) document.
292+
282293
## Running YAML tests
283294

284295
YAML scripts are parsed and run using a python-based runner program that parses
@@ -304,6 +315,24 @@ There are several options for running tests locally. Because the YAML runner
304315
uses python, it is necessary to compile and install the chip python package
305316
before using any YAML runner script.
306317

318+
First activate the matter environment using either
319+
320+
```
321+
. ./scripts/bootstrap.sh
322+
```
323+
324+
or
325+
326+
```
327+
. ./scripts/activate.sh
328+
```
329+
330+
bootstrap.sh should be used for for the first setup, activate.sh may be used for
331+
subsequent setups as it is faster.
332+
333+
Next build the python wheels and create a venv (called `py` here, but any name
334+
may be used)
335+
307336
```
308337
./scripts/build_python.sh -i py
309338
source py/bin/activate

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Generally regenerate using one of:
112112
| 1069 | 0x42D | Pm10ConcentrationMeasurement |
113113
| 1070 | 0x42E | TotalVolatileOrganicCompoundsConcentrationMeasurement |
114114
| 1071 | 0x42F | RadonConcentrationMeasurement |
115+
| 1105 | 0x451 | WiFiNetworkManagement |
115116
| 1283 | 0x503 | WakeOnLan |
116117
| 1284 | 0x504 | Channel |
117118
| 1285 | 0x505 | TargetNavigator |

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+5-5
Original file line numberDiff line numberDiff line change
@@ -3876,7 +3876,7 @@ cluster ValveConfigurationAndControl = 129 {
38763876
}
38773877

38783878
/** This cluster provides a mechanism for querying data about electrical power as measured by the server. */
3879-
provisional cluster ElectricalPowerMeasurement = 144 {
3879+
cluster ElectricalPowerMeasurement = 144 {
38803880
revision 1;
38813881

38823882
enum MeasurementTypeEnum : enum16 {
@@ -3981,7 +3981,7 @@ provisional cluster ElectricalPowerMeasurement = 144 {
39813981
}
39823982

39833983
/** This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. */
3984-
provisional cluster ElectricalEnergyMeasurement = 145 {
3984+
cluster ElectricalEnergyMeasurement = 145 {
39853985
revision 1;
39863986

39873987
enum MeasurementTypeEnum : enum16 {
@@ -4278,7 +4278,7 @@ provisional cluster DeviceEnergyManagement = 152 {
42784278
}
42794279

42804280
/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
4281-
provisional cluster EnergyEvse = 153 {
4281+
cluster EnergyEvse = 153 {
42824282
revision 2;
42834283

42844284
enum EnergyTransferStoppedReasonEnum : enum8 {
@@ -4490,7 +4490,7 @@ provisional cluster EnergyPreference = 155 {
44904490
}
44914491

44924492
/** The Power Topology Cluster provides a mechanism for expressing how power is flowing between endpoints. */
4493-
provisional cluster PowerTopology = 156 {
4493+
cluster PowerTopology = 156 {
44944494
revision 1;
44954495

44964496
bitmap Feature : bitmap32 {
@@ -4511,7 +4511,7 @@ provisional cluster PowerTopology = 156 {
45114511
}
45124512

45134513
/** Attributes and commands for selecting a mode from a list of supported options. */
4514-
provisional cluster EnergyEvseMode = 157 {
4514+
cluster EnergyEvseMode = 157 {
45154515
revision 1;
45164516

45174517
enum ModeTag : enum16 {

examples/bridge-app/linux/main.cpp

+1-5
Original file line numberDiff line numberDiff line change
@@ -899,13 +899,11 @@ void ApplicationInit()
899899
// Setup Mock Devices
900900
Light1.SetReachable(true);
901901
Light2.SetReachable(true);
902-
903902
Light1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
904903
Light2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
905904

906905
TempSensor1.SetReachable(true);
907-
TempSensor1.SetReachable(true);
908-
906+
TempSensor2.SetReachable(true);
909907
TempSensor1.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
910908
TempSensor2.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
911909

@@ -914,7 +912,6 @@ void ApplicationInit()
914912
ActionLight2.SetReachable(true);
915913
ActionLight3.SetReachable(true);
916914
ActionLight4.SetReachable(true);
917-
918915
ActionLight1.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
919916
ActionLight2.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
920917
ActionLight3.SetChangeCallback(&HandleDeviceOnOffStatusChanged);
@@ -929,7 +926,6 @@ void ApplicationInit()
929926
ComposedTempSensor2.SetReachable(true);
930927
ComposedPowerSource.SetReachable(true);
931928
ComposedPowerSource.SetBatChargeLevel(58);
932-
933929
ComposedTempSensor1.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
934930
ComposedTempSensor2.SetChangeCallback(&HandleDeviceTempSensorStatusChanged);
935931
ComposedPowerSource.SetChangeCallback(&HandleDevicePowerSourceStatusChanged);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
*
3+
* Copyright (c) 2024 Project CHIP Authors
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#pragma once
19+
20+
// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces
21+
constexpr const uint8_t kNamespaceCommonLevel = 5;
22+
// Common Number Namespace: 5, tag 0 (Low)
23+
constexpr const uint8_t kTagCommonLow = 0;
24+
// Common Number Namespace: 5, tag 1 (Medium)
25+
constexpr const uint8_t kTagCommonMedium = 1;
26+
// Common Number Namespace: 5, tag 2 (High)
27+
constexpr const uint8_t kTagCommonHigh = 2;
28+
29+
constexpr const uint8_t kNamespaceCommonNumber = 7;
30+
// Common Number Namespace: 7, tag 0 (Zero)
31+
constexpr const uint8_t kTagCommonZero = 0;
32+
// Common Number Namespace: 7, tag 1 (One)
33+
constexpr const uint8_t kTagCommonOne = 1;
34+
// Common Number Namespace: 7, tag 2 (Two)
35+
constexpr const uint8_t kTagCommonTwo = 2;
36+
37+
constexpr const uint8_t kNamespacePosition = 8;
38+
// Common Position Namespace: 8, tag: 0 (Left)
39+
constexpr const uint8_t kTagPositionLeft = 0;
40+
// Common Position Namespace: 8, tag: 1 (Right)
41+
constexpr const uint8_t kTagPositionRight = 1;
42+
// Common Position Namespace: 8, tag: 2 (Top)
43+
constexpr const uint8_t kTagPositionTop = 2;
44+
// Common Position Namespace: 8, tag: 3 (Bottom)
45+
constexpr const uint8_t kTagPositionBottom = 3;
46+
// Common Position Namespace: 8, tag: 4 (Middle)
47+
constexpr const uint8_t kTagPositionMiddle = 4;
48+
// Common Position Namespace: 8, tag: 5 (Row)
49+
constexpr const uint8_t kTagPositionRow = 5;
50+
// Common Position Namespace: 8, tag: 6 (Column)
51+
constexpr const uint8_t kTagPositionColumn = 6;

0 commit comments

Comments
 (0)