Skip to content

Commit 080b6ae

Browse files
committed
Sync master and regen
2 parents 19a4aee + 22de5a0 commit 080b6ae

File tree

424 files changed

+339939
-34226
lines changed

Some content is hidden

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

424 files changed

+339939
-34226
lines changed

.github/workflows/java-tests.yaml

+24-2
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,12 @@ jobs:
3838

3939
env:
4040
TSAN_OPTIONS: "halt_on_error=1 suppressions=scripts/tests/chiptest/tsan-linux-suppressions.txt"
41-
JAVA_PATH: /usr/lib/jvm/java-8-openjdk-amd64
4241

4342
if: github.actor != 'restyled-io[bot]'
4443
runs-on: ubuntu-latest
4544

4645
container:
47-
image: connectedhomeip/chip-build-java:0.7.3
46+
image: connectedhomeip/chip-build-java:0.7.15
4847
options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
4948
net.ipv4.conf.all.forwarding=0 net.ipv6.conf.all.forwarding=0"
5049

@@ -79,7 +78,30 @@ jobs:
7978
path: |
8079
.environment/gn_out/.ninja_log
8180
.environment/pigweed-venv/*.log
81+
- name: Generate unit tests
82+
timeout-minutes: 1
83+
run: |
84+
scripts/run_in_build_env.sh \
85+
'./scripts/build/build_examples.py \
86+
--target linux-x64-tests \
87+
gen \
88+
'
89+
- name: Build unit tests
90+
timeout-minutes: 25
91+
run: scripts/run_in_build_env.sh 'ninja -C out/linux-x64-tests src:java_controller_tests'
8292

93+
- name: Run unit tests
94+
timeout-minutes: 10
95+
# TODO: this direct path loading is not maintainable. Our build system should define and
96+
# support test classes.
97+
run: |
98+
$JAVA_PATH/bin/java \
99+
-cp 'third_party/java_deps/artifacts/*:out/linux-x64-tests/lib/src/controller/java/*' \
100+
org.junit.runner.JUnitCore \
101+
chip.tlv.TlvWriterTest \
102+
chip.tlv.TlvReadWriteTest \
103+
chip.tlv.TlvReaderTest \
104+
chip.jsontlv.JsonToTlvToJsonTest
83105
- name: Build Java Matter Controller and all clusters app
84106
timeout-minutes: 50
85107
run: |

.github/workflows/tests.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ jobs:
136136
src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \
137137
src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \
138138
src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \
139+
src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \
139140
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
140141
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
141142
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
@@ -163,6 +164,7 @@ jobs:
163164
src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml \
164165
src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml \
165166
src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \
167+
src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \
166168
src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \
167169
src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \
168170
src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \
@@ -487,7 +489,7 @@ jobs:
487489
- name: Build Python REPL and example apps
488490
timeout-minutes: 50
489491
run: |
490-
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
492+
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env --extra_packages "mobly"'
491493
./scripts/run_in_build_env.sh \
492494
"./scripts/build/build_examples.py \
493495
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \

build/chip/java/config.gni

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
java_path = getenv("JAVA_PATH")
1616
declare_args() {
1717
java_matter_controller_dependent_paths = []
18-
build_java_matter_controller = false
19-
if (java_path != "") {
18+
matter_enable_java_compilation = false
19+
if (java_path != "" && current_os != "android") {
2020
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]
2121

2222
if (current_os == "mac") {
@@ -27,6 +27,6 @@ declare_args() {
2727
[ "${java_path}/include/linux/" ]
2828
}
2929

30-
build_java_matter_controller = true
30+
matter_enable_java_compilation = true
3131
}
3232
}

build/chip/java/rules.gni

+10-6
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ kotlinc_runner = "${chip_root}/build/chip/java/kotlinc_runner.py"
2121
jar_runner = "${chip_root}/build/chip/java/jar_runner.py"
2222
write_build_config = "${chip_root}/build/chip/java/write_build_config.py"
2323

24-
assert(android_sdk_root != "" || build_java_matter_controller,
25-
"android_sdk_root or java_path must be specified")
24+
assert(android_sdk_root != "" || matter_enable_java_compilation,
25+
"android_sdk_root must be specified or JAVA_PATH must be set.")
2626

2727
# Declare a java library target
2828
#
@@ -127,7 +127,8 @@ template("java_library") {
127127

128128
# Compiles the given files into a directory and generates a 'class list'
129129
_javac_target_name = target_name + "__javac"
130-
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
130+
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
131+
target_name + "/classes"
131132
_class_list_file = "$target_gen_dir/$target_name.classlist"
132133
action(_javac_target_name) {
133134
sources = _java_files
@@ -284,7 +285,8 @@ template("java_binary") {
284285

285286
# Compiles the given files into a directory and generates a 'class list'
286287
_javac_target_name = target_name + "__javac"
287-
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
288+
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
289+
target_name + "/classes"
288290
_class_list_file = "$target_gen_dir/$target_name.classlist"
289291
action(_javac_target_name) {
290292
sources = _java_files
@@ -441,7 +443,8 @@ template("kotlin_library") {
441443

442444
# Compiles the given files into a directory and generates a 'class list'
443445
_kotlinc_target_name = target_name + "__kotlinc"
444-
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
446+
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
447+
target_name + "/classes"
445448
_class_list_file = "$target_gen_dir/$target_name.classlist"
446449
action(_kotlinc_target_name) {
447450
sources = _kotlin_files
@@ -598,7 +601,8 @@ template("kotlin_binary") {
598601

599602
# Compiles the given files into a directory and generates a 'class list'
600603
_kotlinc_target_name = target_name + "__kotlinc"
601-
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
604+
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
605+
target_name + "/classes"
602606
_class_list_file = "$target_gen_dir/$target_name.classlist"
603607
action(_kotlinc_target_name) {
604608
sources = _kotlin_files

build/config/compiler/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ config("strict_warnings") {
253253
cflags += [ "-Wconversion" ]
254254
}
255255

256-
if (build_java_matter_controller) {
256+
if (matter_enable_java_compilation) {
257257
cflags -= [ "-Wshadow" ]
258258
}
259259

config/esp32/components/chip/CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
178178
chip_gn_arg_append("chip_enable_ble_controller" "true")
179179
endif()
180180

181+
if (CONFIG_ENABLE_ETHERNET_TELEMETRY)
182+
chip_gn_arg_append("chip_enable_ethernet" "true")
183+
endif()
184+
181185
if (CONFIG_ENABLE_MATTER_OVER_THREAD)
182186
chip_gn_arg_append("chip_enable_openthread" "true")
183187
else()
@@ -388,7 +392,7 @@ idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
388392
list(APPEND chip_libraries $<TARGET_FILE:${lwip_lib}>)
389393

390394

391-
if (CONFIG_ESP_WIFI_ENABLED)
395+
if (CONFIG_ESP32_WIFI_ENABLED)
392396
idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
393397
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
394398
list(APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib}>)

docs/guides/esp32/build_app_and_commission.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ Note: In order to commission an ethernet device, from all-clusters-app enable
200200
these config options: select `ESP32-Ethernet-Kit` under `Demo->Device Type` and
201201
select `On-Network` rendezvous mode under `Demo->Rendezvous Mode`. Currently
202202
default ethernet board supported is IP101, if you want to use other types of
203-
ethernet board then override the current implementation under
204-
`ConnectivityManagerImpl::InitEthernet`
203+
ethernet board then you can extend the `ESPEthernetDriver` class in your
204+
application and override the current implementation under
205+
`ESPEthernetDriver::Init`
205206
206207
#### Commissioning Parameters
207208

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

+53-9
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct LabelStruct {
1313

1414
/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
1515
server cluster Identify = 3 {
16-
enum IdentifyEffectIdentifier : ENUM8 {
16+
enum EffectIdentifierEnum : ENUM8 {
1717
kBlink = 0;
1818
kBreathe = 1;
1919
kOkay = 2;
@@ -22,21 +22,21 @@ server cluster Identify = 3 {
2222
kStopEffect = 255;
2323
}
2424

25-
enum IdentifyEffectVariant : ENUM8 {
25+
enum EffectVariantEnum : ENUM8 {
2626
kDefault = 0;
2727
}
2828

29-
enum IdentifyIdentifyType : ENUM8 {
29+
enum IdentifyTypeEnum : ENUM8 {
3030
kNone = 0;
31-
kVisibleLight = 1;
32-
kVisibleLED = 2;
31+
kLightOutput = 1;
32+
kVisibleIndicator = 2;
3333
kAudibleBeep = 3;
3434
kDisplay = 4;
3535
kActuator = 5;
3636
}
3737

3838
attribute int16u identifyTime = 0;
39-
readonly attribute enum8 identifyType = 1;
39+
readonly attribute IdentifyTypeEnum identifyType = 1;
4040
readonly attribute command_id generatedCommandList[] = 65528;
4141
readonly attribute command_id acceptedCommandList[] = 65529;
4242
readonly attribute event_id eventList[] = 65530;
@@ -49,8 +49,8 @@ server cluster Identify = 3 {
4949
}
5050

5151
request struct TriggerEffectRequest {
52-
IdentifyEffectIdentifier effectIdentifier = 0;
53-
IdentifyEffectVariant effectVariant = 1;
52+
EffectIdentifierEnum effectIdentifier = 0;
53+
EffectVariantEnum effectVariant = 1;
5454
}
5555

5656
command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0;
@@ -138,7 +138,7 @@ server cluster Scenes = 5 {
138138

139139
struct AttributeValuePair {
140140
optional attrib_id attributeID = 0;
141-
int8u attributeValue[] = 1;
141+
int32u attributeValue = 1;
142142
}
143143

144144
struct ExtensionFieldSet {
@@ -151,6 +151,9 @@ server cluster Scenes = 5 {
151151
readonly attribute group_id currentGroup = 2;
152152
readonly attribute boolean sceneValid = 3;
153153
readonly attribute bitmap8 nameSupport = 4;
154+
readonly attribute nullable node_id lastConfiguredBy = 5;
155+
readonly attribute int16u sceneTableSize = 6;
156+
readonly attribute int8u remainingCapacity = 7;
154157
readonly attribute command_id generatedCommandList[] = 65528;
155158
readonly attribute command_id acceptedCommandList[] = 65529;
156159
readonly attribute event_id eventList[] = 65530;
@@ -2329,6 +2332,34 @@ server cluster ModeSelect = 80 {
23292332
command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0;
23302333
}
23312334

2335+
/** Attributes for reporting air quality classification */
2336+
server cluster AirQuality = 91 {
2337+
enum AirQualityEnum : ENUM8 {
2338+
kUnknown = 0;
2339+
kGood = 1;
2340+
kFair = 2;
2341+
kModerate = 3;
2342+
kPoor = 4;
2343+
kVeryPoor = 5;
2344+
kExtremelyPoor = 6;
2345+
}
2346+
2347+
bitmap Feature : BITMAP32 {
2348+
kFair = 0x1;
2349+
kModerate = 0x2;
2350+
kVeryPoor = 0x4;
2351+
kExtremelyPoor = 0x8;
2352+
}
2353+
2354+
readonly attribute AirQualityEnum airQuality = 0;
2355+
readonly attribute command_id generatedCommandList[] = 65528;
2356+
readonly attribute command_id acceptedCommandList[] = 65529;
2357+
readonly attribute event_id eventList[] = 65530;
2358+
readonly attribute attrib_id attributeList[] = 65531;
2359+
readonly attribute bitmap32 featureMap = 65532;
2360+
readonly attribute int16u clusterRevision = 65533;
2361+
}
2362+
23322363
/** An interface to a generic way to secure a door */
23332364
server cluster DoorLock = 257 {
23342365
enum AlarmCodeEnum : ENUM8 {
@@ -5041,6 +5072,9 @@ endpoint 1 {
50415072
ram attribute currentGroup default = 0x0000;
50425073
ram attribute sceneValid default = 0x00;
50435074
ram attribute nameSupport;
5075+
ram attribute lastConfiguredBy;
5076+
ram attribute sceneTableSize;
5077+
ram attribute remainingCapacity;
50445078
ram attribute featureMap default = 0;
50455079
ram attribute clusterRevision default = 4;
50465080
}
@@ -5166,6 +5200,16 @@ endpoint 1 {
51665200
ram attribute manufacturerExtension default = 255;
51675201
}
51685202

5203+
server cluster AirQuality {
5204+
ram attribute airQuality default = 0;
5205+
callback attribute generatedCommandList;
5206+
callback attribute acceptedCommandList;
5207+
callback attribute eventList;
5208+
callback attribute attributeList;
5209+
ram attribute featureMap default = 15;
5210+
ram attribute clusterRevision default = 1;
5211+
}
5212+
51695213
server cluster DoorLock {
51705214
emits event DoorLockAlarm;
51715215
emits event LockOperation;

0 commit comments

Comments
 (0)