Skip to content

Commit 1130642

Browse files
rochaferrazpull[bot]
authored andcommitted
af-gen-event.[h|cpp] removal (#24844)
* fix: eliminate inclusion of deprecated file af-gen-event.h * chg: removed all af-gen-event.h files * chg: removed additional references to af-gen-event.h * chg: removed use_zzz option from chef * restyle * chg: removed af-gen-event.cpp * removed af-event references from the clusters' logic * chg: removed references to zzz_generated folder from build file for temperature-measurement-app esp32 * chg: removed references to zzz_generated folder from build file for lock esp32 * chg: removed unnecessary reinterpret casts to void* * chg: addressed naming issues from comments * restyle * fix: typos on barrier control server cluster * new: teardown fnc on clusters that use Matter Timers * chg: misc fixes * chg: misc fixed addressing comments * restyle * chg: logs on all shutdown functions * fix: corrected callback fcn on door lock cluster * restyle * new: include of CHIPDeviceConfig.h on color control and onoff headers * fix: door lock print msg, rebase * restyle * fix: rolledback dynamic cluster change, guard on possible overflow on door lock * zap regen * fix: efr32 workflow crept in * fix: door lock print fix * restyle
1 parent d25ca06 commit 1130642

File tree

76 files changed

+903
-1167
lines changed

Some content is hidden

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

76 files changed

+903
-1167
lines changed

examples/all-clusters-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
1818
# The list of src and include dirs must be in sync with that in all-clusters-app/esp32/main/component.mk
1919
set(PRIV_INCLUDE_DIRS_LIST
20-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app"
2120
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include"
2221
"${CMAKE_CURRENT_LIST_DIR}/include"
2322
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"

examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
1919
# The list of src and include dirs must be in sync with that in all-clusters-minimal-app/esp32/main/component.mk
2020
set(PRIV_INCLUDE_DIRS_LIST
21-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-minimal-app"
2221
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include"
2322
"${CMAKE_CURRENT_LIST_DIR}/include"
2423
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"

examples/bridge-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
# limitations under the License.
1616

1717
idf_component_register(PRIV_INCLUDE_DIRS
18-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/bridge-app"
1918
"${CMAKE_CURRENT_LIST_DIR}/include"
2019
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
2120
SRC_DIRS

examples/chef/chef.py

+4-21
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,9 @@ def main() -> int:
327327
action="store_true", dest="do_rpc_console")
328328
parser.add_option("-y", "--tty", help="Enumerated USB tty/serial interface enumerated for your physical device. E.g.: /dev/ACM0",
329329
dest="tty", metavar="TTY", default=None)
330-
parser.add_option("", "--use_zzz", help="Use pre generated output from the ZAP tool found in the zzz_generated folder. Used to decrease execution time of CI/CD jobs",
331-
dest="use_zzz", action="store_true")
332330

333331
# Build CD params.
334-
parser.add_option("", "--build_all", help="For use in CD only. Builds and bundles all chef examples for the specified platform. Uses --use_zzz. Chef exits after completion.",
332+
parser.add_option("", "--build_all", help="For use in CD only. Builds and bundles all chef examples for the specified platform. Chef exits after completion.",
335333
dest="build_all", action="store_true")
336334
parser.add_option("", "--dry_run", help="Display list of target builds of the --build_all command without building them.",
337335
dest="dry_run", action="store_true")
@@ -342,7 +340,7 @@ def main() -> int:
342340
parser.add_option("-k", "--keep_going", help="For use in CD only. Continues building all sample apps in the event of an error.",
343341
dest="keep_going", action="store_true")
344342
parser.add_option(
345-
"", "--ci", help="Builds Chef examples defined in cicd_config. Uses --use_zzz. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true")
343+
"", "--ci", help="Builds Chef examples defined in cicd_config. Uses specified target from -t. Chef exits after completion.", dest="ci", action="store_true")
346344
parser.add_option(
347345
"", "--enable_ipv4", help="Enable IPv4 mDNS. Only applicable to platforms that can support IPV4 (e.g, Linux, ESP32)",
348346
action="store_true", default=False)
@@ -367,7 +365,7 @@ def main() -> int:
367365
shell.run_cmd(
368366
"export GNUARMEMB_TOOLCHAIN_PATH=\"$PW_ARM_CIPD_INSTALL_DIR\"")
369367
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")
370-
command = f"./chef.py -cbr --use_zzz -d {device_name} -t {options.build_target}"
368+
command = f"./chef.py -cbr -d {device_name} -t {options.build_target}"
371369
flush_print(f"Building {command}", with_border=True)
372370
shell.run_cmd(command)
373371
bundle(options.build_target, device_name)
@@ -397,7 +395,7 @@ def main() -> int:
397395
if options.dry_run:
398396
flush_print(archive_name)
399397
continue
400-
command = f"./chef.py -cbr --use_zzz -d {device_name} -t {platform} "
398+
command = f"./chef.py -cbr -d {device_name} -t {platform} "
401399
command += " ".join(args)
402400
flush_print(f"Building {command}", with_border=True)
403401
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")
@@ -602,21 +600,6 @@ def main() -> int:
602600
f"""Truncate the software version string from \"{sw_ver_string}\" to \"{truncated_sw_ver_string}\" due to 64 bytes limitation""")
603601
sw_ver_string = truncated_sw_ver_string
604602

605-
if options.use_zzz:
606-
flush_print("Using pre-generated ZAP output")
607-
zzz_dir = os.path.join(_REPO_BASE_PATH,
608-
"zzz_generated",
609-
"chef-"+options.sample_device_type_name,
610-
"zap-generated")
611-
if not os.path.exists(zzz_dir):
612-
flush_print(textwrap.dedent(f"""\
613-
You have specified --use_zzz
614-
for device {options.sample_device_type_name}
615-
which does not exist in the cached ZAP output.
616-
"""))
617-
exit(1)
618-
shutil.rmtree(gen_dir, ignore_errors=True)
619-
shutil.copytree(zzz_dir, gen_dir)
620603
flush_print("Building...")
621604

622605
flush_print(

examples/chef/esp32/main/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
get_filename_component(CHIP_ROOT ../third_party/connectedhomeip REALPATH)
2020
get_filename_component(CHEF ${CMAKE_CURRENT_SOURCE_DIR}/../../ REALPATH)
21-
get_filename_component(GEN_DIR ${CHEF}/out/${SAMPLE_NAME}/zap-generated REALPATH)
2221

2322
# include(${CMAKE_CURRENT_LIST_DIR}/../../project_include.cmake)
2423

@@ -33,7 +32,6 @@ set(PRIV_INCLUDE_DIRS_LIST
3332
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/"
3433
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlio/repo/include"
3534
"${CMAKE_SOURCE_DIR}/../"
36-
"${GEN_DIR}/../"
3735
"${CMAKE_SOURCE_DIR}/main/include/"
3836
)
3937

@@ -62,7 +60,6 @@ message(STATUS "** End of Cluster List **")
6260
set(SRC_DIRS_LIST
6361
${SRC_DIRS_LIST}
6462
"${CMAKE_CURRENT_LIST_DIR}"
65-
"${GEN_DIR}"
6663
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
6764
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
6865
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"

examples/light-switch-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
1919
idf_component_register(PRIV_INCLUDE_DIRS
20-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/light-switch-app"
2120
"${CMAKE_CURRENT_LIST_DIR}/include"
2221
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
2322
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32"

examples/lighting-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
set(PRIV_INCLUDE_DIRS_LIST
2020
"${APP_GEN_DIR}"
21-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lighting-app"
2221
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
2322
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/lighting-app/lighting-common/include"
2423
"${CMAKE_CURRENT_LIST_DIR}/include"

examples/lock-app/esp32/main/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ idf_component_register(INCLUDE_DIRS
2929
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed"
3030
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/common/pigweed/esp32"
3131
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/lib/support"
32-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/"
3332
"${CMAKE_CURRENT_LIST_DIR}/include"
3433
"${IDF_PATH}/components/freertos/include/freertos"
3534
SRC_DIRS
@@ -144,7 +143,6 @@ target_compile_options(${COMPONENT_LIB} PRIVATE
144143

145144
else (CONFIG_ENABLE_PW_RPC)
146145
idf_component_register(PRIV_INCLUDE_DIRS
147-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/lock-app/"
148146
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
149147
"${CMAKE_CURRENT_LIST_DIR}/include"
150148
SRC_DIRS
@@ -203,4 +201,3 @@ include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")
203201

204202
chip_app_component_codegen("${CHIP_ROOT}/examples/lock-app/lock-common/lock-app.matter")
205203
chip_app_component_zapgen("${CHIP_ROOT}/examples/lock-app/lock-common/lock-app.zap")
206-

examples/ota-provider-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
1919
idf_component_register(PRIV_INCLUDE_DIRS
2020
"${CMAKE_CURRENT_LIST_DIR}/include"
21-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/ota-provider-app/"
2221
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/ota-provider-app"
2322
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
2423
SRC_DIRS

examples/ota-requestor-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip
2121
set(PRIV_INCLUDE_DIRS_LIST
2222
"${CMAKE_CURRENT_LIST_DIR}/include"
2323
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src"
24-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/ota-requestor-app/"
2524
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32"
2625
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
2726
)

examples/temperature-measurement-app/esp32/main/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
get_filename_component(CHIP_ROOT ${CMAKE_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
2020

2121
set(PRIV_INCLUDE_DIRS_LIST
22-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/temperature-measurement-app/"
2322
"${CMAKE_CURRENT_LIST_DIR}/include"
2423
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32"
2524
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"

scripts/examples/gn_build_test_example.sh

-6
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ function runZAP() {
3636
# Create the folder to host the generated content if needed
3737
mkdir -p "$ZAP_OUTPUT_DIR"
3838

39-
# https://github.com/project-chip/connectedhomeip/issues/3637
40-
# af-gen-event.h is not generated, but the build process needs it. Just creates an empty file for now.
41-
if [ ! -f "$ZAP_OUTPUT_DIR/af-gen-event.h" ]; then
42-
touch "$ZAP_OUTPUT_DIR"/af-gen-event.h
43-
fi
44-
4539
# Generates the generic files for the given zap configuration
4640
"$CHIP_ROOT"/scripts/tools/zap/generate.py "$ZAP_INPUT_FILE" -o "$ZAP_OUTPUT_DIR"
4741

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h

+14-7
Original file line numberDiff line numberDiff line change
@@ -1563,21 +1563,27 @@
15631563
}; \
15641564
const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \
15651565
(EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \
1566+
(EmberAfGenericClusterFunction) MatterOnOffClusterServerShutdownCallback, \
15661567
}; \
15671568
const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = { \
15681569
(EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback, \
1570+
(EmberAfGenericClusterFunction) MatterLevelControlClusterServerShutdownCallback, \
15691571
}; \
15701572
const EmberAfGenericClusterFunction chipFuncArrayModeSelectServer[] = { \
15711573
(EmberAfGenericClusterFunction) emberAfModeSelectClusterServerInitCallback, \
15721574
(EmberAfGenericClusterFunction) MatterModeSelectClusterServerPreAttributeChangedCallback, \
15731575
}; \
15741576
const EmberAfGenericClusterFunction chipFuncArrayDoorLockServer[] = { \
15751577
(EmberAfGenericClusterFunction) MatterDoorLockClusterServerAttributeChangedCallback, \
1578+
(EmberAfGenericClusterFunction) MatterDoorLockClusterServerShutdownCallback, \
15761579
(EmberAfGenericClusterFunction) MatterDoorLockClusterServerPreAttributeChangedCallback, \
15771580
}; \
15781581
const EmberAfGenericClusterFunction chipFuncArrayWindowCoveringServer[] = { \
15791582
(EmberAfGenericClusterFunction) MatterWindowCoveringClusterServerAttributeChangedCallback, \
15801583
}; \
1584+
const EmberAfGenericClusterFunction chipFuncArrayBarrierControlServer[] = { \
1585+
(EmberAfGenericClusterFunction) MatterBarrierControlClusterServerShutdownCallback, \
1586+
}; \
15811587
const EmberAfGenericClusterFunction chipFuncArrayPumpConfigurationAndControlServer[] = { \
15821588
(EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerInitCallback, \
15831589
(EmberAfGenericClusterFunction) MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback, \
@@ -1596,6 +1602,7 @@
15961602
}; \
15971603
const EmberAfGenericClusterFunction chipFuncArrayColorControlServer[] = { \
15981604
(EmberAfGenericClusterFunction) emberAfColorControlClusterServerInitCallback, \
1605+
(EmberAfGenericClusterFunction) MatterColorControlClusterServerShutdownCallback, \
15991606
}; \
16001607
const EmberAfGenericClusterFunction chipFuncArrayOccupancySensingServer[] = { \
16011608
(EmberAfGenericClusterFunction) emberAfOccupancySensingClusterServerInitCallback, \
@@ -2355,7 +2362,7 @@
23552362
.attributes = ZAP_ATTRIBUTE_INDEX(247), \
23562363
.attributeCount = 7, \
23572364
.clusterSize = 13, \
2358-
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
2365+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \
23592366
.functions = chipFuncArrayOnOffServer, \
23602367
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 109 ) ,\
23612368
.generatedCommandList = nullptr ,\
@@ -2381,7 +2388,7 @@
23812388
.attributes = ZAP_ATTRIBUTE_INDEX(258), \
23822389
.attributeCount = 16, \
23832390
.clusterSize = 27, \
2384-
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
2391+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \
23852392
.functions = chipFuncArrayLevelControlServer, \
23862393
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 116 ) ,\
23872394
.generatedCommandList = nullptr ,\
@@ -2524,7 +2531,7 @@
25242531
.attributes = ZAP_ATTRIBUTE_INDEX(324), \
25252532
.attributeCount = 33, \
25262533
.clusterSize = 55, \
2527-
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \
2534+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \
25282535
.functions = chipFuncArrayDoorLockServer, \
25292536
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 127 ) ,\
25302537
.generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 142 ) ,\
@@ -2550,8 +2557,8 @@
25502557
.attributes = ZAP_ATTRIBUTE_INDEX(381), \
25512558
.attributeCount = 6, \
25522559
.clusterSize = 11, \
2553-
.mask = ZAP_CLUSTER_MASK(SERVER), \
2554-
.functions = NULL, \
2560+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \
2561+
.functions = chipFuncArrayBarrierControlServer, \
25552562
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 156 ) ,\
25562563
.generatedCommandList = nullptr ,\
25572564
.eventList = nullptr, \
@@ -2615,7 +2622,7 @@
26152622
.attributes = ZAP_ATTRIBUTE_INDEX(446), \
26162623
.attributeCount = 54, \
26172624
.clusterSize = 345, \
2618-
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
2625+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \
26192626
.functions = chipFuncArrayColorControlServer, \
26202627
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 161 ) ,\
26212628
.generatedCommandList = nullptr ,\
@@ -2901,7 +2908,7 @@
29012908
.attributes = ZAP_ATTRIBUTE_INDEX(682), \
29022909
.attributeCount = 7, \
29032910
.clusterSize = 13, \
2904-
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \
2911+
.mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION), \
29052912
.functions = chipFuncArrayOnOffServer, \
29062913
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 237 ) ,\
29072914
.generatedCommandList = nullptr ,\

0 commit comments

Comments
 (0)