Skip to content

Commit

Permalink
[EVSE] add evse cluster and examples energy management app (project-c…
Browse files Browse the repository at this point in the history
…hip#30793)

* Fix project-chip#30665 (EVSE)
- Changed to use amperage_mA, energy_mWh
- removed max on epoch_s
- removed access for operate
- removed side for events

* Fix project-chip#30665 updates to try to get further with ZAP and autogen, but still fails with some parts of regen_all

* Added ember-compatibility-functions.cpp which was missing.

* Made all types all lowercase to resolve regen_all issues.

* Fixed lint issue (trailing whitespace).

* Fixes project-chip#30727 - Added initial EVSE cluster and Example Energy Managament app.

* Tidied up old comments.

* Restyled by whitespace

* Restyled by gn

* Restyled by prettier-markdown

* Added copy of files to all-clusters-app linux BUILD.gn and did basic test with chip-tool

* Fixed lint error (Remove PRId64)

* Fix for Documentation Build and publish checker.

* Updated all-clusters-app.zap after merge and regen_all

* Added Cluster to ESP32 CMakeLists.txt

* Fixed ESP32 compile error caused by %d

* Added missing source files to each build variant

* Restyled by gn

* Fixed incorrect uint64_t in EnableCharging/EnableDischarging command

* Fixed more issues seen on different platforms

* Removed unused mEndpointId

* Add source files to shell standalone BUILD.gn,  More %d fixes for different platforms

* Restyled by gn

* Removed unused mMinimumChargingCurrentLimitFromCommand

* Removed yet more unused variables

* Fixed missing semi-colon. How did the other compilers not pick this up?

* Capitalise function names

* PR comment - Moved PluginServerInitCallback to sdk. Capitalised more function names in energy-management-app.

* Restyled by whitespace

* Fixes project-chip#30805 Updated energy-evse-cluster.xml

* Fixes project-chip#30805 zap_regen_all commit.

* Made Fault Event allow a nullable SessionID

* Updates based on review (use kMaximumChargeCurrent instead of duplicate #define). Add HwSetVehicleID implementation

* Added RFID Event support. Removed more unnecessary chip::

* Added Feature flags, optional commands and optional attributes.

* Made command handling conditional based on features

* Added Feature support to all-clusters-app

* Restyled by clang-format

* Fix to Darwin compile error - not checking strcmp return

* Attempt to fix Darwin errors (return after else)

* Updated based on latest upstream master

* Removed unnecessary mInstance and used 'this' instead.

* Regen_all after merge to master.

* Fix review comment.

* Ensure Init() returns a failure if there is one. Aligned to mode-base-server.cpp

* Backed out Read attr check based on features.

* Fixed EnumerateAcceptedCommands to handle Loop::Break condition.

* Had missed StartDiagnostic as an optional command in InvokeCommand

* Removed extra chip:: in attr types.

* Updated HwSetVehicleID to copy the value from callee

* Fixed potential buffer overrun in HwSetVehicleID.

* Fixed simple to address comments raised by Andrei in PR 30857

* Check Delegate is initialized before calling functions.

* Ensured that mVehicleID free's any malloc'd CharSpan in destructor

* Sync EnergyEvseDelegateImpl.cpp from Example Energy Management

* Re-write of ApplicationInit to handle potential errors

* Open and saved in ZAP, then regen_all

* Updated Energy-management-app.zap / .matter after change to general-diagnostics.xml change to MS.

* Fixed types to be signed=true

* Fixed 31032 - revert removal of side="server". Also turned on Events.

* PR comment fix - remove Localization Config and Time Format Localization cluster

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and thivya-amazon committed Dec 18, 2023
1 parent 55fdb22 commit 3dad619
Show file tree
Hide file tree
Showing 25 changed files with 6,336 additions and 33 deletions.
9 changes: 9 additions & 0 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ chip-tool/README
darwin-framework-tool/README
```

## Energy Management example

```{toctree}
:glob:
:maxdepth: 1
energy-management-app/**/README
```

## Java matter controller example

```{toctree}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12148,7 +12148,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -12164,7 +12164,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -12180,7 +12180,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -12196,7 +12196,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
29 changes: 29 additions & 0 deletions examples/energy-management-app/energy-management-common/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2023 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.
# 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.

import("//build_overrides/chip.gni")
import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/app/chip_data_model.gni")

config("config") {
include_dirs = [ "include" ]
}

chip_data_model("energy-management-common") {
zap_file = "energy-management-app.zap"

zap_pregenerated_dir =
"${chip_root}/zzz_generated/energy-management-app/zap-generated"
is_server = true
}
Loading

0 comments on commit 3dad619

Please sign in to comment.