-
Notifications
You must be signed in to change notification settings - Fork 2.2k
EVSE Delegate callbacks to user application #30999
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
Merged
mergify
merged 97 commits into
project-chip:master
from
jamesharrow:30997-complete-evse-delegate-implementation
Dec 20, 2023
Merged
Changes from all commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
874d750
Fix #30665 (EVSE)
jamesharrow 35a06a7
Fix #30665 updates to try to get further with ZAP and autogen, but st…
jamesharrow c3aef3a
Added ember-compatibility-functions.cpp which was missing.
jamesharrow a71bef8
Made all types all lowercase to resolve regen_all issues.
jamesharrow 41acd01
Fixed lint issue (trailing whitespace).
jamesharrow d7636ea
Merge branch '30665-13-updates-needed-on-evse-xml-device-energy-manag…
jamesharrow e12cf09
Fixes #30727 - Added initial EVSE cluster and Example Energy Managame…
jamesharrow f27b036
Tidied up old comments.
jamesharrow c0651fe
Restyled by whitespace
restyled-commits 557f7c5
Restyled by gn
restyled-commits 6763533
Restyled by prettier-markdown
restyled-commits 53fa295
Added copy of files to all-clusters-app linux BUILD.gn and did basic …
jamesharrow e47f734
Fixed lint error (Remove PRId64)
jamesharrow 7434ae8
Fix for Documentation Build and publish checker.
jamesharrow d9c3550
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow b88e826
Updated all-clusters-app.zap after merge and regen_all
jamesharrow 8b92700
Added Cluster to ESP32 CMakeLists.txt
jamesharrow a368a5d
Fixed ESP32 compile error caused by %d
jamesharrow c96744a
Added missing source files to each build variant
jamesharrow 68479cc
Restyled by gn
restyled-commits 919fafb
Fixed incorrect uint64_t in EnableCharging/EnableDischarging command
jamesharrow 2cab312
Fixed more issues seen on different platforms
jamesharrow 293cdbf
Removed unused mEndpointId
jamesharrow f44f52a
Add source files to shell standalone BUILD.gn, More %d fixes for dif…
jamesharrow 43b98d4
Restyled by gn
restyled-commits fc54724
Removed unused mMinimumChargingCurrentLimitFromCommand
jamesharrow d3752ba
Removed yet more unused variables
jamesharrow a14846a
Fixed missing semi-colon. How did the other compilers not pick this up?
jamesharrow 04a12f7
Capitalise function names
jamesharrow 49acb7f
PR comment - Moved PluginServerInitCallback to sdk. Capitalised more …
jamesharrow a2240c5
Restyled by whitespace
restyled-commits ee824c0
Fixes #30805 Updated energy-evse-cluster.xml
jamesharrow 2947b9b
Fixes #30805 zap_regen_all commit.
jamesharrow 0015eb8
Merge branch 'project-chip:master' into 30727-add-evse-to-examplesene…
jamesharrow 271031c
Made Fault Event allow a nullable SessionID
jamesharrow b886c71
Updates based on review (use kMaximumChargeCurrent instead of duplica…
jamesharrow adbb15e
Added RFID Event support. Removed more unnecessary chip::
jamesharrow a2917b6
Added Feature flags, optional commands and optional attributes.
jamesharrow e34b523
Made command handling conditional based on features
jamesharrow 3b97de1
Added Feature support to all-clusters-app
jamesharrow da7a3fb
Restyled by clang-format
restyled-commits e2652ec
Fix to Darwin compile error - not checking strcmp return
jamesharrow a9a7e8f
Attempt to fix Darwin errors (return after else)
jamesharrow f719610
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow 2ff5a27
Updated based on latest upstream master
jamesharrow 11b0151
Removed unnecessary mInstance and used 'this' instead.
jamesharrow 774790d
Merge remote-tracking branch 'upstream/master' into 30727-add-evse-to…
jamesharrow 893c6e5
Regen_all after merge to master.
jamesharrow 68d3ea6
Merge branch 'master' into 30727-add-evse-to-examplesenergy-managemen…
jamesharrow 30e6e8b
Fix review comment.
jamesharrow 98f5d2a
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow 51dd8cc
Ensure Init() returns a failure if there is one. Aligned to mode-base…
jamesharrow 48dd130
Backed out Read attr check based on features.
8000
jamesharrow f5928e7
Fixed EnumerateAcceptedCommands to handle Loop::Break condition.
jamesharrow 2fba294
Had missed StartDiagnostic as an optional command in InvokeCommand
jamesharrow 70d9cbe
Removed extra chip:: in attr types.
jamesharrow 2feb493
Updated HwSetVehicleID to copy the value from callee
jamesharrow ebe0d14
Fixed potential buffer overrun in HwSetVehicleID.
jamesharrow bd0461c
Merge branch 'master' into 30727-add-evse-to-examplesenergy-managemen…
jamesharrow 90d5c0f
Fixed simple to address comments raised by Andrei in PR 30857
jamesharrow 3f7560d
Fixed simple to address comments raised by Andrei in PR 30857
jamesharrow 50cad61
Check Delegate is initialized before calling functions.
jamesharrow 848fb88
Check Delegate is initialized before calling functions.
jamesharrow 5a97d39
Added callbacks into Application code
jamesharrow eaa65f9
Restyled by whitespace
restyled-commits e00f848
Ensured that mVehicleID free's any malloc'd CharSpan in destructor
jamesharrow 0939d3b
Sync EnergyEvseDelegateImpl.cpp from Example Energy Management
jamesharrow 0fdf9cc
Ensured that mVehicleID free's any malloc'd CharSpan in destructor
jamesharrow c92a4e2
Sync EnergyEvseDelegateImpl.cpp from Example Energy Management
jamesharrow 5bda642
Sync'd changes from example energy management app, and commits from #…
jamesharrow 339196c
Added namespace to avoid global namespace error in header file.
jamesharrow ab1ae6a
Merge branch 'master' into 30727-add-evse-to-examplesenergy-managemen…
jamesharrow 6ab439b
Re-write of ApplicationInit to handle potential errors
jamesharrow 58cc794
Re-write of ApplicationInit to handle potential errors
jamesharrow 67fb025
Merge branch 'upstream-master' into 30997-complete-evse-delegate-impl…
jamesharrow c832208
Removed unnecessary void in function decl.
jamesharrow 34dd424
Open and saved in ZAP, then regen_all
jamesharrow 4903b29
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow 23910e2
Updated Energy-management-app.zap / .matter after change to general-d…
jamesharrow a375a52
Merge branch 'upstream-master' into 30997-complete-evse-delegate-impl…
jamesharrow 2822b3e
Updated Energy-management-app.zap / .matter after change to general-d…
jamesharrow 4793eb1
Restyled by whitespace
restyled-commits 7385acd
Merge branch 'upstream-master' into 30727-add-evse-to-examplesenergy-…
jamesharrow ee510f4
Fixed types to be signed=true
jamesharrow be39a66
Fixed 31032 - revert removal of side="server". Also turned on Events.
jamesharrow 49f39b5
PR comment fix - remove Localization Config and Time Format Localizat…
jamesharrow 55eedc3
Merge branch '30727-add-evse-to-examplesenergy-management-app' into 3…
jamesharrow 2acee39
Removed EVSE commands from ZAP to avoid emberAf linker errors since t…
jamesharrow a133b95
Merge branch 'master' into 30997-complete-evse-delegate-implementation
jamesharrow 192e834
Merge branch 'upstream-master' into 30997-complete-evse-delegate-impl…
jamesharrow ba7e436
Regen_all to update energy-management.matter file to remove commands …
jamesharrow 73ecb1b
Minor changes to align all-clusters and energy-management common.
jamesharrow 3f62fea
Apply suggestions from code review
jamesharrow feaa006
Addressed comment and replicated into example energy management copies.
jamesharrow e8833d9
Added documentation to EVSE Callbacks as to which struct in the union…
jamesharrow 4701102
Added Energy EVSE and Device Energy Management to config-data.yml und…
jamesharrow 4c93db2
Merge branch 'master' into 30997-complete-evse-delegate-implementation
jamesharrow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
examples/all-clusters-app/all-clusters-common/include/EVSECallbacks.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* | ||
* | ||
* Copyright (c) 2023 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 | ||
|
||
namespace chip { | ||
namespace app { | ||
namespace Clusters { | ||
|
||
using namespace chip::app::Clusters::EnergyEvse; | ||
|
||
/* This callbacks mechanism is intended to allow different delegates to | ||
* dispatch notifications that something has changed. | ||
* | ||
* This is not specific to the EnergyEVSE cluster, but includes DeviceEnergyManagement | ||
* and potential future clusters. | ||
*/ | ||
enum EVSECallbackType | ||
{ | ||
/* | ||
* The State has changed (e.g. from Disabled to Charging, or vice-versa) | ||
*/ | ||
StateChanged, | ||
/* | ||
* ChargeCurrent has changed | ||
*/ | ||
ChargeCurrentChanged, | ||
/* | ||
* Charging Preferences have changed | ||
*/ | ||
ChargingPreferencesChanged, | ||
/* | ||
* DeviceEnergyManagement has changed | ||
*/ | ||
DeviceEnergyManagementChanged, | ||
}; | ||
|
||
struct EVSECbInfo | ||
{ | ||
EVSECallbackType type; | ||
|
||
union | ||
{ | ||
/* for type = StateChanged */ | ||
struct | ||
{ | ||
StateEnum state; | ||
SupplyStateEnum supplyState; | ||
} StateChange; | ||
|
||
/* for type = ChargeCurrentChanged */ | ||
struct | ||
{ | ||
int64_t maximumChargeCurrent; | ||
} ChargingCurrent; | ||
}; | ||
}; | ||
|
||
typedef void (*EVSECallbackFunc)(const EVSECbInfo * cb, intptr_t arg); | ||
|
||
struct EVSECallbackWrapper | ||
{ | ||
EVSECallbackFunc handler; | ||
intptr_t arg; | ||
}; | ||
|
||
} // namespace Clusters | ||
} // namespace app | ||
} // namespace chip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.