Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add device-energy-management cluster example app code for 1.4 #33910

Merged
merged 83 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
90ac94b
Get the EVSE app building and test TC_DEM_2_2 passing
PeterC1965 Jun 13, 2024
c683503
Get all targets building
PeterC1965 Jun 13, 2024
0ac11b7
Address JamesH review comments
PeterC1965 Jun 15, 2024
3cb089f
Rename utils.cpp to DEMUtils.cpp
PeterC1965 Jun 15, 2024
6688c42
Address JamesH review comments
PeterC1965 Jun 15, 2024
f0858e1
Restyled by whitespace
restyled-commits Jun 15, 2024
757bc1c
Restyled by clang-format
restyled-commits Jun 15, 2024
eccee31
Restyled by gn
restyled-commits Jun 15, 2024
d176136
Restyled by prettier-markdown
restyled-commits Jun 15, 2024
86d7929
Restyled by autopep8
restyled-commits Jun 15, 2024
e9c2f5f
Restyled by isort
restyled-commits Jun 15, 2024
78742f6
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jun 15, 2024
a45e6dd
Fix compilation problem by including lib/core/DataModelTypes.h
PeterC1965 Jun 15, 2024
fe103a9
Fix compilation problem by including
PeterC1965 Jun 15, 2024
a6f0b6d
Save examples/all-clusters-app/all-clusters-common/all-clusters-app.z…
PeterC1965 Jun 15, 2024
9cef023
Restyled by clang-format
restyled-commits Jun 15, 2024
2cbe9c6
Apply further code review changes
PeterC1965 Jun 19, 2024
46e8f0c
Restyled by clang-format
restyled-commits Jun 19, 2024
78e6951
Restyled by gn
restyled-commits Jun 19, 2024
73a6430
Address code review comments from AndreiL
PeterC1965 Jun 20, 2024
cfc815e
Restyled by whitespace
restyled-commits Jun 20, 2024
b2c1616
Restyled by clang-format
restyled-commits Jun 20, 2024
61cca47
Fix ESP build
PeterC1965 Jun 20, 2024
55d778e
Fix ESP build
PeterC1965 Jun 20, 2024
6c65ac4
Restyled by clang-format
restyled-commits Jun 20, 2024
c55ca01
Rename src/python_testing/TC_DEM_Utils.py src/python_testing/DEMTestB…
PeterC1965 Jun 25, 2024
d469ba0
Put time util funtions into namespace + drop the Utils prefix
PeterC1965 Jun 25, 2024
a89767f
Restyled by whitespace
restyled-commits Jun 25, 2024
2038023
Restyled by isort
restyled-commits Jun 25, 2024
4417749
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jun 25, 2024
6a76ba9
Try to address setForecast comments from Boris
PeterC1965 Jul 3, 2024
5ebaf22
Remove unnecessary SetXXX methods from the device energy management c…
PeterC1965 Jul 3, 2024
5e90f9f
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 3, 2024
afcc61f
Restyled by clang-format
restyled-commits Jul 3, 2024
78633e0
Apply code review changes suggested by Louis-Philip Beliveau
PeterC1965 Jul 13, 2024
85bae27
Document the API for GetForecast and GetPowerAdjustmentCapability
PeterC1965 Jul 15, 2024
3ed6f14
Document the GetForecast and GetPowerAdjustmentCapability APIs
PeterC1965 Jul 15, 2024
5fee7b9
Update src/app/clusters/device-energy-management-server/device-energy…
PeterC1965 Jul 18, 2024
7194f5b
Update src/app/clusters/device-energy-management-server/device-energy…
PeterC1965 Jul 18, 2024
d93a68e
Address review comments from Boris
PeterC1965 Jul 18, 2024
a1d146c
Sync up with code review comments from PR34234
PeterC1965 Jul 18, 2024
441d586
Sync up with code review comments from PR34234 that caused some retur…
PeterC1965 Jul 18, 2024
e2fff77
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 18, 2024
c984a59
Restyled by clang-format
restyled-commits Jul 18, 2024
b52bc59
modifyForecastRequest: Failure should be returned if a slot number > …
PeterC1965 Jul 18, 2024
0c48248
Update examples/energy-management-app/energy-management-common/includ…
PeterC1965 Jul 18, 2024
5f9896e
Update examples/energy-management-app/energy-management-common/includ…
PeterC1965 Jul 18, 2024
178b5a6
Update examples/energy-management-app/energy-management-common/includ…
PeterC1965 Jul 18, 2024
d2369fe
Update examples/energy-management-app/energy-management-common/includ…
PeterC1965 Jul 18, 2024
27fef24
Update examples/energy-management-app/energy-management-common/includ…
PeterC1965 Jul 18, 2024
2ed990b
Update examples/energy-management-app/energy-management-common/src/DE…
PeterC1965 Jul 18, 2024
412b2e4
Update examples/energy-management-app/energy-management-common/includ…
PeterC1965 Jul 18, 2024
cb04ca1
Update examples/energy-management-app/energy-management-common/src/DE…
PeterC1965 Jul 18, 2024
1db507a
Update examples/energy-management-app/energy-management-common/src/DE…
PeterC1965 Jul 18, 2024
083f324
Address review comments from Boris
PeterC1965 Jul 18, 2024
979353f
Update examples/energy-management-app/energy-management-common/src/De…
PeterC1965 Jul 18, 2024
3e56098
Address further review comments from Boris
PeterC1965 Jul 18, 2024
df78a95
Address further review comments from Boris
PeterC1965 Jul 18, 2024
be69ceb
Address further review comments from Boris
PeterC1965 Jul 18, 2024
3c57718
Update examples/energy-management-app/energy-management-common/src/De…
PeterC1965 Jul 18, 2024
b8d55ce
Address further review comments from Boris
PeterC1965 Jul 18, 2024
38a065e
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 18, 2024
8ad9905
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 18, 2024
7a9ded1
Update examples/energy-management-app/energy-management-common/src/DE…
PeterC1965 Jul 18, 2024
2001980
Update examples/energy-management-app/energy-management-common/src/En…
PeterC1965 Jul 18, 2024
940f102
Update examples/energy-management-app/energy-management-common/src/De…
PeterC1965 Jul 18, 2024
2cdc894
Update examples/energy-management-app/energy-management-common/src/De…
PeterC1965 Jul 18, 2024
1c5e33d
Apply further review comments from Boris
PeterC1965 Jul 20, 2024
14beb82
Used a bitmap rather than uint8_t and sync EnergyTimeUtils files from…
PeterC1965 Jul 20, 2024
fa59eb6
Update following review comments from Boris
PeterC1965 Jul 20, 2024
932c0c3
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 22, 2024
48014ef
Allow more time for forecast.startTime in test setup as tests can tak…
PeterC1965 Jul 23, 2024
6fcc1e7
Update examples/energy-management-app/energy-management-common/src/De…
PeterC1965 Jul 24, 2024
207f907
Update examples/energy-management-app/energy-management-common/src/En…
PeterC1965 Jul 24, 2024
0b1392f
Update examples/energy-management-app/energy-management-common/src/De…
PeterC1965 Jul 24, 2024
9bbcc88
Addressing further review comments from Boris
PeterC1965 Jul 24, 2024
07a172f
Fix small issue found as a result of the DEM test script review
PeterC1965 Jul 24, 2024
242b27f
Protect against forecast being null
PeterC1965 Jul 24, 2024
5d4c2b1
Remove src/python_testing/DEMTestBase.py as renamed in PR34234
PeterC1965 Jul 25, 2024
a955ceb
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 25, 2024
d924fa9
Update following review comment from Andrei
PeterC1965 Jul 25, 2024
07ed1fa
Restyled by clang-format
restyled-commits Jul 25, 2024
eecd532
Merge branch 'master' into add-dem-example-code-for-1-4
PeterC1965 Jul 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/all-clusters-app/ameba/chip_main.cmake
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ list(

${chip_dir}/examples/microwave-oven-app/microwave-oven-common/src/microwave-oven-device.cpp

${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp
PeterC1965 marked this conversation as resolved.
Show resolved Hide resolved
${chip_dir}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp
${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/asr/BUILD.gn
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ asr_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
PeterC1965 marked this conversation as resolved.
Show resolved Hide resolved
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${examples_plat_dir}/ButtonHandler.cpp",
"${examples_plat_dir}/CHIPDeviceManager.cpp",
"${examples_plat_dir}/LEDWidget.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 @@ -74,9 +74,11 @@ ti_simplelink_executable("all-clusters-app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
"${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.cpp",
"${project_dir}/main/AppTask.cpp",
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 @@ -126,9 +126,11 @@ psoc6_executable("clusters_app") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
PeterC1965 marked this conversation as resolved.
Show resolved Hide resolved
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${examples_plat_dir}/LEDWidget.cpp",
"${examples_plat_dir}/init_psoc6Platform.cpp",
"src/AppTask.cpp",
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
PeterC1965 marked this conversation as resolved.
Show resolved Hide resolved
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/device-energy-management-mode.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/energy-evse-mode.cpp",
"AllClustersCommandDelegate.cpp",
Expand Down
7 changes: 4 additions & 3 deletions examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,13 @@ target_sources(${APP_TARGET} PRIVATE
${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
${ENERGY_MANAGEMENT_COMMON}/src/EnergyTimeUtils.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EVSEManufacturerImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp

)

chip_configure_data_model(${APP_TARGET}
Expand Down
6 changes: 4 additions & 2 deletions examples/all-clusters-app/nrfconnect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ include(${CHIP_ROOT}/src/app/chip_data_model.cmake)
target_include_directories(app PRIVATE
main/include
${ALL_CLUSTERS_COMMON_DIR}/include
${ENERGY_MANAGEMENT_COMMON_DIR}/include
${ENERGY_MANAGEMENT_COMMON_DIR}/include
${GEN_DIR}/app-common
${GEN_DIR}/all-clusters-app
${NRFCONNECT_COMMON}/util/include)
Expand All @@ -65,13 +65,15 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/oven-modes.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyTimeUtils.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EVSEManufacturerImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp
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 @@ -91,9 +91,11 @@ mw320_executable("shell_mw320") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
"${chip_root}/src/lib/shell/streamer_mw320.cpp",
"binding-handler.cpp",
"include/CHIPProjectConfig.h",
Expand Down
10 changes: 6 additions & 4 deletions examples/all-clusters-app/openiotsdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ target_include_directories(${APP_TARGET}
PRIVATE
main/include
${ALL_CLUSTERS_COMMON}/include
${ENERGY_MANAGEMENT_COMMON}/include
${ENERGY_MANAGEMENT_COMMON}/include
)

target_sources(${APP_TARGET}
Expand All @@ -60,16 +60,18 @@ target_sources(${APP_TARGET}
${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp
${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON}/src/oven-modes.cpp
${ALL_CLUSTERS_COMMON}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp
${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp
${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp
${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyTimeUtils.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EVSEManufacturerImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp
)

target_link_libraries(${APP_TARGET}
Expand Down
10 changes: 6 additions & 4 deletions examples/all-clusters-app/telink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ project(chip-telink-all-clusters-app-example)
target_include_directories(app PRIVATE
include
${ALL_CLUSTERS_COMMON_DIR}/include
${ENERGY_MANAGEMENT_COMMON_DIR}/include
${ENERGY_MANAGEMENT_COMMON_DIR}/include
${GEN_DIR}/app-common
${GEN_DIR}/all-clusters-app
${TELINK_COMMON}/common/include
Expand All @@ -48,14 +48,16 @@ target_sources(app PRIVATE
${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyTimeUtils.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EVSEManufacturerImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/ElectricalPowerMeasurementDelegate.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp
${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp
${TELINK_COMMON}/common/src/mainCommon.cpp
${TELINK_COMMON}/common/src/AppTaskCommon.cpp
${TELINK_COMMON}/util/src/LEDManager.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 @@ -40,9 +40,11 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp",
PeterC1965 marked this conversation as resolved.
Show resolved Hide resolved
"${chip_root}/examples/energy-management-app/energy-management-common/src/ElectricalPowerMeasurementDelegate.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp",
"${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyTimeUtils.cpp",
]

deps = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2023 Project CHIP Authors
# Copyright (c) 2023-2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/*
*
* Copyright (c) 2024 Project CHIP Authors
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <app-common/zap-generated/cluster-objects.h>
#include <lib/core/DataModelTypes.h>

namespace chip {
namespace app {
namespace Clusters {
namespace DeviceEnergyManagement {

/**
* Class to abstract manufacturer specific functionality
*/
class DEMManufacturerDelegate
{
public:
DEMManufacturerDelegate() {}

virtual ~DEMManufacturerDelegate() {}

// The PowerAdjustEnd event needs to report the approximate energy used by the ESA during the session.
virtual int64_t GetApproxEnergyDuringSession() = 0;

virtual CHIP_ERROR HandleDeviceEnergyManagementPowerAdjustRequest(const int64_t powerMw, const uint32_t durationS,
AdjustmentCauseEnum cause)
{
return CHIP_NO_ERROR;
}

virtual CHIP_ERROR HandleDeviceEnergyManagementPowerAdjustCompletion() { return CHIP_NO_ERROR; }

virtual CHIP_ERROR HandleDeviceEnergyManagementCancelPowerAdjustRequest(CauseEnum cause) { return CHIP_NO_ERROR; }

virtual CHIP_ERROR HandleDeviceEnergyManagementStartTimeAdjustRequest(const uint32_t requestedStartTimeUtc,
AdjustmentCauseEnum cause)
{
return CHIP_NO_ERROR;
}

virtual CHIP_ERROR HandleDeviceEnergyManagementPauseRequest(const uint32_t durationS, AdjustmentCauseEnum cause)
{
return CHIP_NO_ERROR;
}

virtual CHIP_ERROR HandleDeviceEnergyManagementPauseCompletion() { return CHIP_NO_ERROR; }

virtual CHIP_ERROR HandleDeviceEnergyManagementCancelPauseRequest(CauseEnum cause) { return CHIP_NO_ERROR; }
lpbeliveau-silabs marked this conversation as resolved.
Show resolved Hide resolved

virtual CHIP_ERROR HandleDeviceEnergyManagementCancelRequest() { return CHIP_NO_ERROR; }

virtual CHIP_ERROR
HandleModifyForecastRequest(const uint32_t forecastID,
const DataModel::DecodableList<Structs::SlotAdjustmentStruct::DecodableType> & slotAdjustments,
AdjustmentCauseEnum cause)
{
return CHIP_NO_ERROR;
}

virtual CHIP_ERROR RequestConstraintBasedForecast(
const DataModel::DecodableList<DeviceEnergyManagement::Structs::ConstraintsStruct::DecodableType> & constraints,
AdjustmentCauseEnum cause)
{
return CHIP_NO_ERROR;
}
};

} // namespace DeviceEnergyManagement
} // namespace Clusters
} // namespace app
} // namespace chip
Loading
Loading