EVSE update zap xml to reflect latest spec (ChargingTargetStruct) and removed 2 attributes (#31406)
* Fix #30665 (EVSE)
- Changed to use amperage_mA, energy_mWh
- removed max on epoch_s
- removed access for operate
- removed side for events
* Fix #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).
* Added Device Energy Management server.cpp, added to all-clusters-app.zap and regen_all
* Restyled by whitespace
* Restyled by clang-format
* Fixes based on similar conversations on EVSE review. Made Forecast and PowerAdjustmentCapability Nullable attributes. Added feature support.
* Added delegate class to all-clusters-app
* Changed ChipLogProgress to Error. Better handling of EnumerateCommands
* Aligned EVSE XML to same state as PR#30857 (includes SessionID being Nullable etc and in Fault Event).
* Updated Device Energy Management XML to use power_mw, energy_mwh per spec definition.
* Updated controller-clusters.zap
* regen_all.py
* Restyled by whitespace
* Regen_all after merging in changes for XML
* Fixed types to be signed=true
* Fixed 31032 - revert removal of side="server".
* regen_all.py
* Added Device Energy Management cluster back into all-clusters.zap and regen_all after merging from master.
* Compiles but doesn't work. Needs stub to instantiate class
* Fixed EnumerateCommands to allow optional ModifyForecastRequest and RequestConstraintBasedForecast commands
* Fixed InvokeCommand issues to allow optional commands.
* Improved HandleModifyForecastRequest and HandleRequestConstraintBasedForecast in sdk
* Updates to add DeviceEnergyManagement to all-clusters.
* Compiles and links
* Sync file in energy-management-app
* Updated DEM to support SetPowerAdjustmentCapability and SetForecast methods.
* Updated based on review comments. Changed Epoch to be Matter 2000 based epochs.
* Turned on commands in DEM. Added DEM cluster server to energy-management-app.
* Added more comments to Delegate to describe expected behaviour.
* Updated BUILD.gn to remove duplicated files from all-clusters-common and energy-management-common
* Aim to fix compile issues on other platforms due to logging of %d
* Restyled by gn
* Updated build files to remove duplicate copies from all-clusters-common to energy-management-common
* Fixed ESP32 include path
* Added DEM into energy-management-app - refactored main.cpp.
* Added DEM into EVSEManufacturerImpl.h
* Fix - avoid using global namespace in header file
* Restyled by gn
* Updated CMakeLists.txt to remove duplicate energy-management files.
* Added device-energy-management-server to ESP32 all-clusters CMakeLists.txt
* Removed return at end of void function.
* Added include to all-clusters-minimal in ESP32
* Removed __FUNCTION__ from logs
* Removed stray %s
* Added FeatureMap handling in sdk (not in ember)
* Removed extra chip::
* Used CHIP_ERROR_FORMAT, err.Format() mechanism
* Refactored StartTimeAdjust based on review comments.
* Removed unnecessary Write Attributes function
* Beginnings of Session handling
* Added beginnings of EVConnected,EVNotDetected,EnergyTransferStarted,EnergyTransferStopped handling. State machine is not finished. Callback to read Energy Meter added
* Added framework for EVSE Test Event triggers
* Added EnergyEvseTestEventTrigger delegates
* Restyled by whitespace
* Restyled by gn
* Added :energy-evse-test-event-trigger to public_deps to see if it resolves build errors
* Restyled by gn
* Fixed Darwin compile error - do not use else after return
* Refactored code so that the EvseManufacturer instance could be retrieved for Test Event triggers
* Started adding TC_EEVSE_2_2.py
* Updated TC_EEVSE_2_2.py to support test events. Still needs to handle reading of Logged Events and verifying they are correct.
* Refactored Handling of TestEvents to allow clear, and better error handling.
* Refactored state handling by decomposing into state machine events where similar functions are performed based on state transition. Fixed TC chargingEnabledUntil cast to int. Note gets to step 6e
* Fixed step 6e caused by not setting the cable limit / maxHardwareCurrentLimit in test events
* Added comment to clarify purpose and definition of test eventtrigger field values.
* Fixed several bugs in test script
* Made SetChargingEnabledUntil take a nullable type.
* Removed Reference to step 5c, and moved reading of SessionID to step 4b.
More TC_EEVSE_2_2 bug fixes. Added event checking. Still fails at step 14.
Does not have enable timeout timer implemented
* Fixed issue with not detecting 2nd plug in event, and session ID not incrementing. Now test case passes all the way.
* Restyled by isort
* Made some attributes persisted per spec.
* Added attributes to zcl.json to mark them as implemented in attributeAccessInterfaceAttributes
* Ran regen_all.py after changing zcl.json
* Fixed incorrect type - not picked up by all compilers.
* Re-ran bootstrap, and then regen-all - to pick up more zap generated fixes
* Added provisional handling for Faults
* Added new test event triggers to help test Fault and Diagnostics
* Added TC_EEVSE_2_4
* Fix lint issue - unused datetime modules.
* Committed suggested change to comment
* Added TC_EEVSE_2_5.py to support DiagnosticsCommand testing. Also changed the SupplyState reverting to Disabled once diagnostics is complete to match the spec.
* Created a helper EEVSE base class to avoid repetition in the different test cases.
* Restyled by isort
* Fixed Lint issues
* Revamped TC_EEVSE_2_5 to match spec behaviour (cannot start diagnostics unless Disabled). Also removed hard-coded endpoint ids in Utils
* Implemented timer to disable the EVSE automatically.
* Added documentation to cover concern about long-lived bytespan in enableKey
* Fixed Lint and build issues on other platforms
* Restyled by isort
* Implemented some of the feedback on PR
* Refactored HwSetState to use nested switch statements to be clear that all enums are caught.
* Fixed error messages
* Test scripts: Removed hardcoded endpoint 1 (use --endpoint 1 in args), allowed the enableKey to be passed in using --hex-arg enableKey:000102030405060708090a0b0c0d0e0f
* Made enum class for callbacks and improved documentation comments based on feedback.
* Fixed another python lint issue.
* Updated README.md with help on how to build for test event triggers, using chip-repl and python testing.
* Tweaks to README.md to avoid Myst syntax highlighting issues.
* Improved error logging around GetEpochTS()
* Made main use std::unique_ptr instead of using new/delete per PR comments. Also moved GetEVSEManufacturer declaration to header file.
* Fixing MISSPELL issues in README.md
* Small change missed in main.cpp missed in unique_ptr change.
* Changed all-clusters app stubs to use unique_ptr style instead of new/delete.
* Removed unhelpful comment
* Restyled by whitespace
* Fixes #31061 Updated DEVICE_TYPE to 0x050C now this has been allocated
* Fixes #31061 Updated DEVICE_TYPE to 0x050C now this has been allocated
* Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands
* Removed min/max for Randomisation window due to ZAP bug that doesn't allow more than 2 bytes.
* Added missing new Java files
* Changed DayOfWeekforSequence -> DayOfWeekForSequence in XML. Regen-all
* Python testing: Add helper functions for marking steps as skipped in the TH (#31373)
* Add two new helper functions for marking steps skipped
* python testing: Add helper functions for skipped steps
* Do not use gen_config.h directly. (#31401)
* Do not use gen_config.h directly.
Apparently the right file is config.h, which includes the gen file.
* Restyled by clang-format
---------
Co-authored-by: Restyled.io <commits@restyled.io>
* Bump third_party/ot-br-posix/repo from `657e775` to `58822dc` (#31420)
Bumps [third_party/ot-br-posix/repo](https://github.com/openthread/ot-br-posix) from `657e775` to `58822dc`.
- [Release notes](https://github.com/openthread/ot-br-posix/releases)
- [Commits](https://github.com/openthread/ot-br-posix/compare/657e775cd9ca757af7487da2fb039aee645c3d65...58822dce1934568523bf1389c039f249e1d979ad)
---
updated-dependencies:
- dependency-name: third_party/ot-br-posix/repo
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump third_party/imgui/repo from `240ab58` to `6228c2e` (#31418)
Bumps [third_party/imgui/repo](https://github.com/ocornut/imgui) from `240ab58` to `6228c2e`.
- [Release notes](https://github.com/ocornut/imgui/releases)
- [Commits](https://github.com/ocornut/imgui/compare/240ab5890b2e8da294937a1710b021ac3f271472...6228c2e1ec7ef21ca1809579c055ed34540dedb0)
---
updated-dependencies:
- dependency-name: third_party/imgui/repo
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump third_party/pigweed/repo from `cbbc73d` to `9640cde` (#31414)
Bumps [third_party/pigweed/repo](https://github.com/google/pigweed) from `cbbc73d` to `9640cde`.
- [Commits](https://github.com/google/pigweed/compare/cbbc73dc4d56bc201e9d50c4b10db974aff82754...9640cdef100f87d7987875d3a418931d6500e5b2)
---
updated-dependencies:
- dependency-name: third_party/pigweed/repo
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [Chef] Fix variable may be used without initialization (#31413)
* Fix variable may be used without initialization
* Restyled by clang-format
---------
Co-authored-by: Restyled.io <commits@restyled.io>
* Bump third_party/nanopb/repo from `cf26d28` to `423c03b` (#31421)
Bumps [third_party/nanopb/repo](https://github.com/nanopb/nanopb) from `cf26d28` to `423c03b`.
- [Commits](https://github.com/nanopb/nanopb/compare/cf26d28b88010dd3ac94e0cba64d4a71522154bc...423c03b626a861a7b3a08a2d411e23aefd58827b)
---
updated-dependencies:
- dependency-name: third_party/nanopb/repo
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Test_TC_DGWIFI_2_1 WiFiVersion enum8 maxValue should be 6 (#31364)
* WiFiVersion enum8 maxValue should be 6
Matter Spec 1.2 Section 11.14.5.2. WiFiVersionEnum Type
ranges from 0 (802.11a) to 6 (802.11ah)
* Update command.h darwin zap-genersated WiFiVersion
* Handle energy type naming in data model xml handlers (#31344)
* Correct case names for enerty types in data model handlers.
* Add unit test
* restyle
* [nrfconnect] Switch unit tests to PSA crypto (#31408)
* [nrfconnect] Switch unit tests to PSA crypto
Switch nRF Connect unit tests to PSA crypto backend since
legacy mbedTLS is already tested on many platforms.
Additionally, clean the configuration of nRF Connect test
runner by removing some redundant configurations and better
grouping the items.
* Restyled by gn
---------
Co-authored-by: Restyled.io <commits@restyled.io>
* Bump third_party/libwebsockets/repo from `f18fc23` to `49bfef2` (#31417)
Bumps [third_party/libwebsockets/repo](https://github.com/warmcat/libwebsockets) from `f18fc23` to `49bfef2`.
- [Commits](https://github.com/warmcat/libwebsockets/compare/f18fc2316f9743624ced9ba934595f7b9ba8cd05...49bfef2ecd51b854b63e35d913849b6bb518a7f6)
---
updated-dependencies:
- dependency-name: third_party/libwebsockets/repo
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add initial valve cluster implementation (#30562)
* added first version of valve configuration and control cluster
* added first version of boolean sensor configuration cluster XML and
updated event descriptions for valve config and control cluster
* fixed wrong attribute name
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
* fixed typo
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
* removed StartUpLevel attribute and added optional OpenDuration command args
* use allocated cluster ID
* added code generating bits
* added new device types
* restyle
* added BooleanSensorConfiguration and ValveConfigurationAndControl clusters
to all-clusters-app
* - fixed wrong attribute name caused by copy paste
- min/max is not allowed for attributes with size larger than 2 bytes
* regenerate all
* added initial implementation for the new clusters
* apply provisional property to new clusters
* fixed typo
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
* removed empty implementation, removed clusters from all-clusters-app
* added a skeleton implementation
* fixed typo
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
* fixed typos and regen all
* fixes based on PR comments
* added descriptor cluster to valve device type
* updated zap and idl files to fixed typo in command name
* close to final implementation, needs careful going through
* activate alarms if enabled, added API for sensor fault event, clean-up
* WIP
* Implemented open command
* finalize initial implementation
* added all-clusters-app example for valve device
* added null checking
* added attribute changed callback and fixed some bugs after testing
* did a regen and fixed rebase issue
* restyle
* added missed generated code by previous commits
* attempt to fix failing CI
* restyle
* add a missed zap gen output
* removed redundant return
* update valve configuration and control cluster according to latest spec
* remove boolean sensor config cluster implementation and into a separate PR
* DefaultOpenDuration is writable and updated device type name to Water Valve
* updated code to latest spec
* changed RemainingDuration to be handled by AttributeAccessInterface
* WIP RemainingDuration
* moved domain to be the first element
* update to the latest spec changes, removed attribute changed callback,
handle remainingduration in AAI
* added LevelStep attribute in all-clusters-app
* removed unused code
* set default null values in ZAP
* Added transition handling in Delegate
* Reworked AutoTimeClose handling in SetValveLevel
* Changed include
* added mechanism to signal UTCTime change in timesync cluster
---------
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Co-authored-by: fessehat <fishtse@gmail.com>
Co-authored-by: René Josefsen <rjosefsen@grundfos.com>
Co-authored-by: René Josefsen <69624991+ReneJosefsen@users.noreply.github.com>
* Bump third_party/mbedtls/repo from `ffb18d2` to `56fd26c` (#31422)
Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `ffb18d2` to `56fd26c`.
- [Release notes](https://github.com/ARMmbed/mbedtls/releases)
- [Commits](https://github.com/ARMmbed/mbedtls/compare/ffb18d2012909c05277a1e16dc6ba23dc8ba2854...56fd26cee97531f223071b91ed108dc1e22e7a85)
---
updated-dependencies:
- dependency-name: third_party/mbedtls/repo
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* [K32W0] SDK 2.6.13 additional changes (#31382)
* [K32W] Fix a corner case when switching the TLV processors
After the current block is processed, if the block size is 0, it means
that the processed data was a multiple of received BDX block size (e.g.
8 blocks of 1024 bytes were transferred). After state for selecting next
processor is reset, a request for fetching next data must be sent.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W] Make Validate public
Change access modifier of Validate to public, to be used by K32W0
for factory data validation after factory data OTA.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Add CRC validation during factory data OTA
After factory data is copied into internal flash, call Validate to ensure
the CRC of factory data matches the CRC in the header. If the check fails,
then OTA is aborted and factory data is restored to previous version.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Add additional check for provider pointer
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Change root node revision to 2
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W] Expose SearchForId in factory data provider public API
Removed additional checks on tags with the assumption that factory data is
strictly checked at manufacturing time.
Applications can now use the public API to search the factory data section
for an id, e.g. in the case of custom factory data provider, where the app
has additional factory data information besides the default one.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Refactor custom factory data provider
The example now leverages the actual factory data provider API to
search the factory data section for some custom ids.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W] Add platform support for Product Appearance
Implement GetProductFinish and GetProductPrimaryColor defined in DeviceInstanceInfoProvider.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W] Remove maxLengths array
This array was used to store the maximum length of factory data fields.
It's no longer used, with the assumption that the factory data is strictly
checked in manufacturing.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Remove usage of maxLength array
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] remove unused code in LowPowerHook.cpp file
* [K32W0] use Encoding::HexToBytes to parse the ota encryption key
* [K32W0] remove extra PWR_DisallowDeviceToSleep() which will cause unsleep after commissioning
* [K32W] Revert removal of disallow to sleep and enclose it in specific tag
Only call disallow to sleep when the platform is K32W1.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Update reference app readme files
This is a minor improvement to the building instructions.
It aims to clarify the usage of west SDK or package SDK.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W0] Fix ICD parameters
Name of the ICD parameters were updated according with the latest stack updates.
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
* Restyled by clang-format
* Restyled by gn
* Restyled by prettier-markdown
* [K32W0] Fix gn check error
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by gn
* [K32W1] Fix gn check errors
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by gn
* [K32W1] Fix another gn error
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by gn
* [K32W] Send a report before resetting the device during OTA
State-transition event from Downloading to Applying was not successfully sent
to a subscriber during OTA because the device would reset before actually sending
the ReportData message.
Added an explicit call to handle server shutting down, which will sync send all events.
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by clang-format
* [K32W0] Remove deprecated dependency
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* [K32W1] Remove deprecated dependency
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
* Restyled by gn
---------
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Co-authored-by: Damien Vagner <damien.vagner@nxp.com>
Co-authored-by: tanyue518 <ethan.tan@nxp.com>
Co-authored-by: Ethan Tan <nxf42555@lsvm11u0000160.swis.ap-northeast-2.aws.nxp.com>
Co-authored-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
* For CFFI in chip-repl, remove variadic arguments (#31159)
* Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands
* Removed optional=true in xml for DayOfWeekForSequence & ChargingTargets in ChargingTargetScheduleStruct
* Small correction to description in test case.
* Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands
* Removed min/max for Randomisation window due to ZAP bug that doesn't allow more than 2 bytes.
* Added missing new Java files
* Changed DayOfWeekforSequence -> DayOfWeekForSequence in XML. Regen-all
* Updated energy-evse-cluster.xml to use latest EnergyEVSE.adoc which removes numberOfWeeklyTargets, numberOfDailyTargets, and adds new ChargingTargetScheduleStruct in Get/Set/Clear Target commands
* Removed optional=true in xml for DayOfWeekForSequence & ChargingTargets in ChargingTargetScheduleStruct
* Update examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
* Touched file to retrigger restyled job
* Removed whitespace which was added to trigger restyled to rerun
* Removed potentially unsafe code before merging into PR #30957
* Renamed variable and replaced auto with type so it is clearer to reader.
* Restyled by clang-format
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: marius-alex-tache <marius.tache@nxp.com>
Signed-off-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: C Freeman <cecille@google.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Erwin Pan <erwinpan1@gmail.com>
Co-authored-by: simonhmorris1 <112178216+simonhmorris1@users.noreply.github.com>
Co-authored-by: Andrei Litvin <andy314@gmail.com>
Co-authored-by: Damian Królik <66667989+Damian-Nordic@users.noreply.github.com>
Co-authored-by: fesseha-eve <88329315+fessehaeve@users.noreply.github.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
Co-authored-by: fessehat <fishtse@gmail.com>
Co-authored-by: René Josefsen <rjosefsen@grundfos.com>
Co-authored-by: René Josefsen <69624991+ReneJosefsen@users.noreply.github.com>
Co-authored-by: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com>
Co-authored-by: Damien Vagner <damien.vagner@nxp.com>
Co-authored-by: tanyue518 <ethan.tan@nxp.com>
Co-authored-by: Ethan Tan <nxf42555@lsvm11u0000160.swis.ap-northeast-2.aws.nxp.com>
Co-authored-by: Andrei Menzopol <andrei.menzopol@nxp.com>
Co-authored-by: Terence Hampson <thampson@google.com>
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
index d414bb9..076c291 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter
@@ -4239,6 +4239,11 @@
optional energy_mwh addedEnergy = 2;
}
+ struct ChargingTargetScheduleStruct {
+ TargetDayOfWeekBitmap dayOfWeekForSequence = 0;
+ ChargingTargetStruct chargingTargets[] = 1;
+ }
+
info event EVConnected = 0 {
int32u sessionID = 0;
}
@@ -4286,8 +4291,6 @@
readonly attribute optional amperage_ma maximumDischargeCurrent = 8;
attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9;
attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10;
- readonly attribute optional int8u numberOfWeeklyTargets = 33;
- readonly attribute optional int8u numberOfDailyTargets = 34;
readonly attribute optional nullable epoch_s nextChargeStartTime = 35;
readonly attribute optional nullable epoch_s nextChargeTargetTime = 36;
readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37;
@@ -4308,8 +4311,7 @@
readonly attribute int16u clusterRevision = 65533;
response struct GetTargetsResponse = 0 {
- TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
- ChargingTargetStruct chargingTargets[] = 1;
+ ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}
request struct EnableChargingRequest {
@@ -4324,12 +4326,7 @@
}
request struct SetTargetsRequest {
- TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
- ChargingTargetStruct chargingTargets[] = 1;
- }
-
- request struct GetTargetsRequest {
- TargetDayOfWeekBitmap daysToReturn = 0;
+ ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}
/** Allows a client to disable the EVSE from charging and discharging. */
@@ -4343,7 +4340,7 @@
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
- timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6;
+ timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
}
@@ -8029,6 +8026,12 @@
}
server cluster EnergyEvse {
+ emits event EVConnected;
+ emits event EVNotDetected;
+ emits event EnergyTransferStarted;
+ emits event EnergyTransferStopped;
+ emits event Fault;
+ emits event RFID;
callback attribute state;
callback attribute supplyState;
callback attribute faultState;
@@ -8040,8 +8043,6 @@
callback attribute maximumDischargeCurrent;
callback attribute userMaximumChargeCurrent;
callback attribute randomizationDelayWindow;
- callback attribute numberOfWeeklyTargets default = 0;
- callback attribute numberOfDailyTargets default = 1;
callback attribute nextChargeStartTime;
callback attribute nextChargeTargetTime;
callback attribute nextChargeRequiredEnergy;
diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
index 2586260..1d0d205 100644
--- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
+++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
@@ -2572,7 +2572,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -12083,7 +12083,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "2",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -12912,7 +12912,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -12928,7 +12928,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -12944,7 +12944,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -12960,7 +12960,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -12976,7 +12976,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13088,7 +13088,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13227,7 +13227,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13243,7 +13243,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13259,7 +13259,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13275,7 +13275,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13291,7 +13291,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13307,7 +13307,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13323,7 +13323,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "6000",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13339,7 +13339,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13355,7 +13355,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13371,7 +13371,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13387,39 +13387,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "600",
- "reportable": 1,
- "minInterval": 1,
- "maxInterval": 65534,
- "reportableChange": 0
- },
- {
- "name": "NumberOfWeeklyTargets",
- "code": 33,
- "mfgCode": null,
- "side": "server",
- "type": "int8u",
- "included": 1,
- "storageOption": "External",
- "singleton": 0,
- "bounded": 0,
- "defaultValue": "0",
- "reportable": 1,
- "minInterval": 1,
- "maxInterval": 65534,
- "reportableChange": 0
- },
- {
- "name": "NumberOfDailyTargets",
- "code": 34,
- "mfgCode": null,
- "side": "server",
- "type": "int8u",
- "included": 1,
- "storageOption": "External",
- "singleton": 0,
- "bounded": 0,
- "defaultValue": "1",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13435,7 +13403,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13451,7 +13419,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13467,7 +13435,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13483,7 +13451,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13499,7 +13467,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0xFFFF",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13515,7 +13483,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13531,7 +13499,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13547,7 +13515,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13563,7 +13531,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13579,7 +13547,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13595,7 +13563,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13611,7 +13579,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13691,7 +13659,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -13713,6 +13681,50 @@
"maxInterval": 65534,
"reportableChange": 0
}
+ ],
+ "events": [
+ {
+ "name": "EVConnected",
+ "code": 0,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "EVNotDetected",
+ "code": 1,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "EnergyTransferStarted",
+ "code": 2,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "EnergyTransferStopped",
+ "code": 3,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "Fault",
+ "code": 4,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ },
+ {
+ "name": "RFID",
+ "code": 5,
+ "mfgCode": null,
+ "side": "server",
+ "included": 1
+ }
]
},
{
@@ -15002,7 +15014,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -15018,7 +15030,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -15114,7 +15126,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -15130,7 +15142,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -15194,7 +15206,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter
index 753c428..6fff020 100644
--- a/examples/energy-management-app/energy-management-common/energy-management-app.matter
+++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter
@@ -1151,6 +1151,11 @@
optional energy_mwh addedEnergy = 2;
}
+ struct ChargingTargetScheduleStruct {
+ TargetDayOfWeekBitmap dayOfWeekForSequence = 0;
+ ChargingTargetStruct chargingTargets[] = 1;
+ }
+
info event EVConnected = 0 {
int32u sessionID = 0;
}
@@ -1198,8 +1203,6 @@
readonly attribute optional amperage_ma maximumDischargeCurrent = 8;
attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9;
attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10;
- readonly attribute optional int8u numberOfWeeklyTargets = 33;
- readonly attribute optional int8u numberOfDailyTargets = 34;
readonly attribute optional nullable epoch_s nextChargeStartTime = 35;
readonly attribute optional nullable epoch_s nextChargeTargetTime = 36;
readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37;
@@ -1220,8 +1223,7 @@
readonly attribute int16u clusterRevision = 65533;
response struct GetTargetsResponse = 0 {
- TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
- ChargingTargetStruct chargingTargets[] = 1;
+ ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}
request struct EnableChargingRequest {
@@ -1236,12 +1238,7 @@
}
request struct SetTargetsRequest {
- TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
- ChargingTargetStruct chargingTargets[] = 1;
- }
-
- request struct GetTargetsRequest {
- TargetDayOfWeekBitmap daysToReturn = 0;
+ ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}
/** Allows a client to disable the EVSE from charging and discharging. */
@@ -1255,7 +1252,7 @@
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
- timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6;
+ timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
}
@@ -1515,8 +1512,6 @@
callback attribute maximumDischargeCurrent;
callback attribute userMaximumChargeCurrent;
callback attribute randomizationDelayWindow;
- callback attribute numberOfWeeklyTargets default = 0;
- callback attribute numberOfDailyTargets default = 1;
callback attribute nextChargeStartTime;
callback attribute nextChargeTargetTime;
callback attribute nextChargeRequiredEnergy;
diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap
index 8ed4aa6..92430d7 100644
--- a/examples/energy-management-app/energy-management-common/energy-management-app.zap
+++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap
@@ -2594,7 +2594,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2610,7 +2610,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2626,7 +2626,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2642,7 +2642,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2658,7 +2658,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2770,7 +2770,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2909,7 +2909,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2925,7 +2925,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2941,7 +2941,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2957,7 +2957,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2973,7 +2973,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -2989,7 +2989,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3005,7 +3005,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "6000",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3021,7 +3021,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3037,7 +3037,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3053,7 +3053,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3069,39 +3069,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "600",
- "reportable": 1,
- "minInterval": 1,
- "maxInterval": 65534,
- "reportableChange": 0
- },
- {
- "name": "NumberOfWeeklyTargets",
- "code": 33,
- "mfgCode": null,
- "side": "server",
- "type": "int8u",
- "included": 1,
- "storageOption": "External",
- "singleton": 0,
- "bounded": 0,
- "defaultValue": "0",
- "reportable": 1,
- "minInterval": 1,
- "maxInterval": 65534,
- "reportableChange": 0
- },
- {
- "name": "NumberOfDailyTargets",
- "code": 34,
- "mfgCode": null,
- "side": "server",
- "type": "int8u",
- "included": 1,
- "storageOption": "External",
- "singleton": 0,
- "bounded": 0,
- "defaultValue": "1",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3117,7 +3085,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3133,7 +3101,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3149,7 +3117,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3165,7 +3133,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3181,7 +3149,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0xFFFF",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3197,7 +3165,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3213,7 +3181,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3229,7 +3197,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3245,7 +3213,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3261,7 +3229,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3277,7 +3245,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3293,7 +3261,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "0",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
@@ -3373,7 +3341,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
- "defaultValue": "1",
+ "defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
diff --git a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h
index d27f35e..558f7c1 100644
--- a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h
+++ b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h
@@ -208,8 +208,6 @@
CHIP_ERROR SetRandomizationDelayWindow(uint32_t) override;
/* PREF attributes */
- uint8_t GetNumberOfWeeklyTargets() override;
- uint8_t GetNumberOfDailyTargets() override;
DataModel::Nullable<uint32_t> GetNextChargeStartTime() override;
DataModel::Nullable<uint32_t> GetNextChargeTargetTime() override;
DataModel::Nullable<int64_t> GetNextChargeRequiredEnergy() override;
@@ -293,8 +291,6 @@
int64_t mUserMaximumChargeCurrent = kDefaultUserMaximumChargeCurrent; // TODO update spec
uint32_t mRandomizationDelayWindow = kDefaultRandomizationDelayWindow;
/* PREF attributes */
- uint8_t mNumberOfWeeklyTargets = 0;
- uint8_t mNumberOfDailyTargets = 1;
DataModel::Nullable<uint32_t> mNextChargeStartTime;
DataModel::Nullable<uint32_t> mNextChargeTargetTime;
DataModel::Nullable<int64_t> mNextChargeRequiredEnergy;
diff --git a/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp
index 2b4a6e4..dc60d74 100644
--- a/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp
+++ b/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp
@@ -1374,14 +1374,6 @@
}
/* PREF attributes */
-uint8_t EnergyEvseDelegate::GetNumberOfWeeklyTargets()
-{
- return mNumberOfWeeklyTargets;
-}
-uint8_t EnergyEvseDelegate::GetNumberOfDailyTargets()
-{
- return mNumberOfDailyTargets;
-}
DataModel::Nullable<uint32_t> EnergyEvseDelegate::GetNextChargeStartTime()
{
return mNextChargeStartTime;
diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.cpp b/src/app/clusters/energy-evse-server/energy-evse-server.cpp
index 019aead..b3cbbf3 100644
--- a/src/app/clusters/energy-evse-server/energy-evse-server.cpp
+++ b/src/app/clusters/energy-evse-server/energy-evse-server.cpp
@@ -95,10 +95,6 @@
/* Optional */
return aEncoder.Encode(mDelegate.GetRandomizationDelayWindow());
/* PREF - ChargingPreferences attributes */
- case NumberOfWeeklyTargets::Id:
- return aEncoder.Encode(mDelegate.GetNumberOfWeeklyTargets());
- case NumberOfDailyTargets::Id:
- return aEncoder.Encode(mDelegate.GetNumberOfDailyTargets());
case NextChargeStartTime::Id:
return aEncoder.Encode(mDelegate.GetNextChargeStartTime());
case NextChargeTargetTime::Id:
diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.h b/src/app/clusters/energy-evse-server/energy-evse-server.h
index a194551..dfead37 100644
--- a/src/app/clusters/energy-evse-server/energy-evse-server.h
+++ b/src/app/clusters/energy-evse-server/energy-evse-server.h
@@ -94,8 +94,6 @@
virtual int64_t GetUserMaximumChargeCurrent() = 0;
virtual uint32_t GetRandomizationDelayWindow() = 0;
/* PREF attributes */
- virtual uint8_t GetNumberOfWeeklyTargets() = 0;
- virtual uint8_t GetNumberOfDailyTargets() = 0;
virtual DataModel::Nullable<uint32_t> GetNextChargeStartTime() = 0;
virtual DataModel::Nullable<uint32_t> GetNextChargeTargetTime() = 0;
virtual DataModel::Nullable<int64_t> GetNextChargeRequiredEnergy() = 0;
diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml
index 2e58fb3..a95a5ad 100644
--- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml
+++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-cluster.xml
@@ -13,6 +13,7 @@
-->
<configurator>
<domain name="Energy Management"/>
+
<enum name="StateEnum" type="enum8" apiMaturity="provisional">
<cluster code="0x0099"/>
<item name="NotPluggedIn" value="0x00"/>
@@ -23,6 +24,7 @@
<item name="SessionEnding" value="0x05"/>
<item name="Fault" value="0x06"/>
</enum>
+
<enum name="SupplyStateEnum" type="enum8" apiMaturity="provisional">
<cluster code="0x0099"/>
<item name="Disabled" value="0x00"/>
@@ -31,6 +33,7 @@
<item name="DisabledError" value="0x03"/>
<item name="DisabledDiagnostics" value="0x04"/>
</enum>
+
<enum name="FaultStateEnum" type="enum8" apiMaturity="provisional">
<cluster code="0x0099"/>
<item name="NoError" value="0x00"/>
@@ -51,12 +54,14 @@
<item name="OverTemperature" value="0x0F"/>
<item name="Other" value="0xFF"/>
</enum>
+
<enum name="EnergyTransferStoppedReasonEnum" type="enum8" apiMaturity="provisional">
<cluster code="0x0099"/>
<item name="EVStopped" value="0x00"/>
<item name="EVSEStopped" value="0x01"/>
<item name="Other" value="0x02"/>
</enum>
+
<bitmap name="TargetDayOfWeekBitmap" type="bitmap8" apiMaturity="provisional">
<cluster code="0x0099"/>
<field name="Sunday" mask="0x01"/>
@@ -67,12 +72,20 @@
<field name="Friday" mask="0x20"/>
<field name="Saturday" mask="0x40"/>
</bitmap>
+
<struct name="ChargingTargetStruct" apiMaturity="provisional">
<cluster code="0x0099"/>
- <item fieldId="0" name="TargetTimeMinutesPastMidnight" type="int16u" min="0" max="1439"/>
- <item fieldId="1" name="TargetSoC" type="percent" optional="true"/>
- <item fieldId="2" name="AddedEnergy" type="energy_mwh" min="0" optional="true"/>
+ <item fieldId="0" name="TargetTimeMinutesPastMidnight" type="int16u" min="0" max="1439" default="0"/>
+ <item fieldId="1" name="TargetSoC" type="percent" optional="true" default="0"/>
+ <item fieldId="2" name="AddedEnergy" type="energy_mwh" min="0" optional="true" default="0"/>
</struct>
+
+ <struct name="ChargingTargetScheduleStruct" apiMaturity="provisional">
+ <cluster code="0x0099"/>
+ <item fieldId="0" name="DayOfWeekForSequence" type="TargetDayOfWeekBitmap" min="0x00" max="0x7F"/>
+ <item fieldId="1" name="ChargingTargets" array="true" type="ChargingTargetStruct" length="10"/>
+ </struct>
+
<cluster apiMaturity="provisional">
<name>Energy EVSE</name>
<domain>Energy Management</domain>
@@ -81,92 +94,97 @@
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management.</description>
-
- <globalAttribute side="either" code="0xFFFD" value="2" />
+ <globalAttribute side="either" code="0xFFFD" value="2"/>
<!--Attributes-->
- <attribute code="0x0000" side="server" type="StateEnum" define="STATE" isNullable="true" writable="false" optional="false">State</attribute>
- <attribute code="0x0001" side="server" type="SupplyStateEnum" define="SUPPLY_STATE" writable="false" optional="false">SupplyState</attribute>
- <attribute code="0x0002" side="server" type="FaultStateEnum" define="FAULT_STATE" writable="false" optional="false">FaultState</attribute>
+
+ <attribute code="0x0000" side="server" type="StateEnum" define="STATE" isNullable="true" writable="false" optional="false" min="0x00" max="0x06">State</attribute>
+ <attribute code="0x0001" side="server" type="SupplyStateEnum" define="SUPPLY_STATE" writable="false" optional="false" min="0x00" max="0x04">SupplyState</attribute>
+ <attribute code="0x0002" side="server" type="FaultStateEnum" define="FAULT_STATE" writable="false" optional="false" min="0x00" max="0xFF">FaultState</attribute>
<attribute code="0x0003" side="server" type="epoch_s" define="CHARGING_ENABLED_UNTIL" isNullable="true" default="0" writable="false" optional="false">ChargingEnabledUntil</attribute>
<!--Conformance feature V2X - for now optional-->
+
<attribute code="0x0004" side="server" type="epoch_s" define="DISCHARGING_ENABLED_UNTIL" isNullable="true" default="0" writable="false" optional="true">DischargingEnabledUntil</attribute>
<attribute code="0x0005" side="server" type="amperage_ma" define="CIRCUIT_CAPACITY" default="0" min="0" max="80000" writable="false" optional="false">CircuitCapacity</attribute>
<attribute code="0x0006" side="server" type="amperage_ma" define="MINIMUM_CHARGE_CURRENT" default="6000" min="0" max="80000" writable="false" optional="false">MinimumChargeCurrent</attribute>
<attribute code="0x0007" side="server" type="amperage_ma" define="MAXIMUM_CHARGE_CURRENT" default="0" min="0" max="80000" writable="false" optional="false">MaximumChargeCurrent</attribute>
<!--Conformance feature V2X - for now optional-->
+
<attribute code="0x0008" side="server" type="amperage_ma" define="MAXIMUM_DISCHARGE_CURRENT" default="0" min="0" max="80000" writable="false" optional="true">MaximumDischargeCurrent</attribute>
<attribute code="0x0009" side="server" type="amperage_ma" define="USER_MAXIMUM_CHARGE_CURRENT" default="0" writable="true" optional="true">
- <access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
<description>UserMaximumChargeCurrent</description>
</attribute>
<attribute code="0x000A" side="server" type="elapsed_s" define="RANDOMIZATION_DELAY_WINDOW" default="600" writable="true" optional="true">
- <access op="read" privilege="view"/>
<access op="write" privilege="manage"/>
<description>RandomizationDelayWindow</description>
</attribute>
<!--Conformance feature PREF - for now optional-->
- <attribute code="0x0021" side="server" type="int8u" define="NUMBER_OF_WEEKLY_TARGETS" default="0" writable="false" optional="true">NumberOfWeeklyTargets</attribute>
+
<!--Conformance feature PREF - for now optional-->
- <attribute code="0x0022" side="server" type="int8u" define="NUMBER_OF_DAILY_TARGETS" default="1" writable="false" optional="true">NumberOfDailyTargets</attribute>
+
<!--Conformance feature PREF - for now optional-->
- <attribute code="0x0023" side="server" type="epoch_s" define="NEXT_CHARGE_START_TIME" isNullable="true" max="0xFFFFFFFE" writable="false" optional="true">NextChargeStartTime</attribute>
+
+ <attribute code="0x0023" side="server" type="epoch_s" define="NEXT_CHARGE_START_TIME" isNullable="true" writable="false" optional="true">NextChargeStartTime</attribute>
<!--Conformance feature PREF - for now optional-->
- <attribute code="0x0024" side="server" type="epoch_s" define="NEXT_CHARGE_TARGET_TIME" isNullable="true" max="0xFFFFFFFE" writable="false" optional="true">NextChargeTargetTime</attribute>
+
+ <attribute code="0x0024" side="server" type="epoch_s" define="NEXT_CHARGE_TARGET_TIME" isNullable="true" writable="false" optional="true">NextChargeTargetTime</attribute>
<!--Conformance feature PREF - for now optional-->
+
<attribute code="0x0025" side="server" type="energy_mwh" define="NEXT_CHARGE_REQUIRED_ENERGY" isNullable="true" min="0" writable="false" optional="true">NextChargeRequiredEnergy</attribute>
<!--Conformance feature PREF - for now optional-->
- <attribute code="0x0026" side="server" type="percent" define="NEXT_CHARGE_TARGET_SOC" isNullable="true" max="100" writable="false" optional="true">NextChargeTargetSoC</attribute>
+
+ <attribute code="0x0026" side="server" type="percent" define="NEXT_CHARGE_TARGET_SOC" isNullable="true" writable="false" optional="true">NextChargeTargetSoC</attribute>
<!--Conformance feature [PREF] - for now optional-->
- <attribute code="0x0027" side="server" type="int16u" define="APPROXIMATE_EV_EFFICIENCY" isNullable="true" default="0xFFFF" max="0xFFFE" writable="true" optional="true">
- <access op="read" privilege="view"/>
+
+ <attribute code="0x0027" side="server" type="int16u" define="APPROXIMATE_EV_EFFICIENCY" isNullable="true" writable="true" optional="true">
<access op="write" privilege="manage"/>
<description>ApproximateEVEfficiency</description>
</attribute>
<!--Conformance feature SOC - for now optional-->
- <attribute code="0x0030" side="server" type="percent" define="STATE_OF_CHARGE" isNullable="true" max="100" writable="false" optional="true">StateOfCharge</attribute>
+
+ <attribute code="0x0030" side="server" type="percent" define="STATE_OF_CHARGE" isNullable="true" writable="false" optional="true">StateOfCharge</attribute>
<!--Conformance feature SOC - for now optional-->
+
<attribute code="0x0031" side="server" type="energy_mwh" define="BATTERY_CAPACITY" isNullable="true" min="0" writable="false" optional="true">BatteryCapacity</attribute>
<!--Conformance feature PNC - for now optional-->
+
<attribute code="0x0032" side="server" type="char_string" define="VEHICLE_ID" isNullable="true" length="32" writable="false" optional="true">VehicleID</attribute>
<attribute code="0x0040" side="server" type="int32u" define="SESSION_ID" isNullable="true" writable="false" optional="false">SessionID</attribute>
<attribute code="0x0041" side="server" type="elapsed_s" define="SESSION_DURATION" isNullable="true" writable="false" optional="false">SessionDuration</attribute>
<attribute code="0x0042" side="server" type="energy_mwh" define="SESSION_ENERGY_CHARGED" isNullable="true" min="0" writable="false" optional="false">SessionEnergyCharged</attribute>
<!--Conformance feature V2X - for now optional-->
+
<attribute code="0x0043" side="server" type="energy_mwh" define="SESSION_ENERGY_DISCHARGED" isNullable="true" min="0" writable="false" optional="true">SessionEnergyDischarged</attribute>
- <command source="client" code="0x0001" name="Disable" optional="false" mustUseTimedInvoke="true" apiMaturity="provisional">
+ <command source="client" code="0x01" name="Disable" optional="false" mustUseTimedInvoke="true" apiMaturity="provisional">
<description>Allows a client to disable the EVSE from charging and discharging.</description>
</command>
- <command source="client" code="0x0002" name="EnableCharging" optional="false" mustUseTimedInvoke="true" apiMaturity="provisional">
- <arg name="ChargingEnabledUntil" type="epoch_s" max="0xFFFFFFFE" isNullable="true"/>
+ <command source="client" code="0x02" name="EnableCharging" optional="false" mustUseTimedInvoke="true" apiMaturity="provisional">
+ <arg name="ChargingEnabledUntil" type="epoch_s" isNullable="true"/>
<arg name="MinimumChargeCurrent" type="amperage_ma" min="0" max="80000"/>
<arg name="MaximumChargeCurrent" type="amperage_ma" min="0" max="80000"/>
<description>Allows a client to enable the EVSE to charge an EV.</description>
</command>
- <command source="client" code="0x0003" name="EnableDischarging" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
- <arg name="DischargingEnabledUntil" type="epoch_s" max="0xFFFFFFFE" isNullable="true"/>
+ <command source="client" code="0x03" name="EnableDischarging" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
+ <arg name="DischargingEnabledUntil" type="epoch_s" isNullable="true"/>
<arg name="MaximumDischargeCurrent" type="amperage_ma" min="0" max="80000"/>
<description>Allows a client to enable the EVSE to discharge an EV.</description>
</command>
- <command source="client" code="0x0004" name="StartDiagnostics" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
+ <command source="client" code="0x04" name="StartDiagnostics" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
<description>Allows a client to put the EVSE into a self-diagnostics mode.</description>
</command>
- <command source="client" code="0x0005" name="SetTargets" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
- <arg name="DayOfWeekforSequence" type="TargetDayOfWeekBitmap"/>
- <arg name="ChargingTargets" array="true" type="ChargingTargetStruct"/>
+ <command source="client" code="0x05" name="SetTargets" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
+ <arg name="ChargingTargetSchedules" type="ChargingTargetScheduleStruct" array="true" length="7"/>
<description>Allows a client to set the user specified charging targets.</description>
</command>
- <command source="client" code="0x0006" name="GetTargets" optional="true" response="GetTargetsResponse" mustUseTimedInvoke="true" apiMaturity="provisional">
- <arg name="DaysToReturn" type="TargetDayOfWeekBitmap"/>
+ <command source="client" code="0x06" name="GetTargets" optional="true" response="GetTargetsResponse" mustUseTimedInvoke="true" apiMaturity="provisional">
<description>Allows a client to retrieve the user specified charging targets.</description>
</command>
- <command source="client" code="0x0007" name="ClearTargets" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
+ <command source="client" code="0x07" name="ClearTargets" optional="true" mustUseTimedInvoke="true" apiMaturity="provisional">
<description>Allows a client to clear all stored charging targets.</description>
</command>
- <command source="server" code="0x0000" name="GetTargetsResponse" optional="true" apiMaturity="provisional">
- <arg name="DayOfWeekforSequence" type="TargetDayOfWeekBitmap"/>
- <arg name="ChargingTargets" array="true" type="ChargingTargetStruct"/>
+ <command source="server" code="0x00" name="GetTargetsResponse" optional="true" apiMaturity="provisional">
+ <arg name="ChargingTargetSchedules" type="ChargingTargetScheduleStruct" array="true" length="7"/>
<description>The GetTargetsResponse is sent in response to the GetTargets Command.</description>
</command>
<event side="server" code="0x0000" name="EVConnected" priority="info" apiMaturity="provisional">
@@ -176,30 +194,30 @@
<event side="server" code="0x0001" name="EVNotDetected" priority="info" apiMaturity="provisional">
<description>EVNotDetected</description>
<field id="0" name="SessionID" type="int32u" apiMaturity="provisional"/>
- <field id="1" name="State" type="StateEnum" apiMaturity="provisional"/>
+ <field id="1" name="State" type="StateEnum" apiMaturity="provisional" min="0x00" max="0x06"/>
<field id="2" name="SessionDuration" type="elapsed_s" apiMaturity="provisional"/>
<field id="3" name="SessionEnergyCharged" type="energy_mwh" min="0" apiMaturity="provisional"/>
- <field id="4" name="SessionEnergyDischarged" type="energy_mwh" min="0" optional="true" apiMaturity="provisional"/>
+ <field id="4" name="SessionEnergyDischarged" type="energy_mwh" min="0" optional="true" apiMaturity="provisional"/>
</event>
<event side="server" code="0x0002" name="EnergyTransferStarted" priority="info" apiMaturity="provisional">
<description>EnergyTransferStarted</description>
<field id="0" name="SessionID" type="int32u" apiMaturity="provisional"/>
- <field id="1" name="State" type="StateEnum" apiMaturity="provisional"/>
+ <field id="1" name="State" type="StateEnum" apiMaturity="provisional" min="0x00" max="0x06"/>
<field id="2" name="MaximumCurrent" type="amperage_ma" min="0" max="80000" apiMaturity="provisional"/>
</event>
<event side="server" code="0x0003" name="EnergyTransferStopped" priority="info" apiMaturity="provisional">
<description>EnergyTransferStopped</description>
<field id="0" name="SessionID" type="int32u" apiMaturity="provisional"/>
- <field id="1" name="State" type="StateEnum" apiMaturity="provisional"/>
- <field id="2" name="Reason" type="EnergyTransferStoppedReasonEnum" apiMaturity="provisional"/>
+ <field id="1" name="State" type="StateEnum" apiMaturity="provisional" min="0x00" max="0x06"/>
+ <field id="2" name="Reason" type="EnergyTransferStoppedReasonEnum" apiMaturity="provisional" min="0x00" max="0x02"/>
<field id="4" name="EnergyTransferred" type="energy_mwh" min="0" apiMaturity="provisional"/>
</event>
<event side="server" code="0x0004" name="Fault" priority="critical" apiMaturity="provisional">
<description>Fault</description>
<field id="0" name="SessionID" type="int32u" isNullable="true" apiMaturity="provisional"/>
- <field id="1" name="State" type="StateEnum" apiMaturity="provisional"/>
- <field id="2" name="FaultStatePreviousState" type="FaultStateEnum" apiMaturity="provisional"/>
- <field id="4" name="FaultStateCurrentState" type="FaultStateEnum" apiMaturity="provisional"/>
+ <field id="1" name="State" type="StateEnum" apiMaturity="provisional" min="0x00" max="0x06"/>
+ <field id="2" name="FaultStatePreviousState" type="FaultStateEnum" apiMaturity="provisional" min="0x00" max="0xFF"/>
+ <field id="4" name="FaultStateCurrentState" type="FaultStateEnum" apiMaturity="provisional" min="0x00" max="0xFF"/>
</event>
<event side="server" code="0x0005" name="RFID" priority="info" apiMaturity="provisional" optional="true">
<description>RFID</description>
@@ -208,10 +226,11 @@
</cluster>
<bitmap name="Feature" type="bitmap32">
<cluster code="0x0099"/>
- <field name="ChargingPreferences" mask="0x1"/>
- <field name="SoCReporting" mask="0x2"/>
- <field name="PlugAndCharge" mask="0x4"/>
- <field name="RFID" mask="0x8"/>
+ <field name="ChargingPreferences" mask="0x01"/>
+ <field name="SoCReporting" mask="0x02"/>
+ <field name="PlugAndCharge" mask="0x04"/>
+ <field name="RFID" mask="0x08"/>
<field name="V2X" mask="0x10"/>
</bitmap>
+
</configurator>
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index d1bd05a..0a2bc77 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -4670,6 +4670,11 @@
optional energy_mwh addedEnergy = 2;
}
+ struct ChargingTargetScheduleStruct {
+ TargetDayOfWeekBitmap dayOfWeekForSequence = 0;
+ ChargingTargetStruct chargingTargets[] = 1;
+ }
+
info event EVConnected = 0 {
int32u sessionID = 0;
}
@@ -4717,8 +4722,6 @@
readonly attribute optional amperage_ma maximumDischargeCurrent = 8;
attribute access(write: manage) optional amperage_ma userMaximumChargeCurrent = 9;
attribute access(write: manage) optional elapsed_s randomizationDelayWindow = 10;
- readonly attribute optional int8u numberOfWeeklyTargets = 33;
- readonly attribute optional int8u numberOfDailyTargets = 34;
readonly attribute optional nullable epoch_s nextChargeStartTime = 35;
readonly attribute optional nullable epoch_s nextChargeTargetTime = 36;
readonly attribute optional nullable energy_mwh nextChargeRequiredEnergy = 37;
@@ -4739,8 +4742,7 @@
readonly attribute int16u clusterRevision = 65533;
response struct GetTargetsResponse = 0 {
- TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
- ChargingTargetStruct chargingTargets[] = 1;
+ ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}
request struct EnableChargingRequest {
@@ -4755,12 +4757,7 @@
}
request struct SetTargetsRequest {
- TargetDayOfWeekBitmap dayOfWeekforSequence = 0;
- ChargingTargetStruct chargingTargets[] = 1;
- }
-
- request struct GetTargetsRequest {
- TargetDayOfWeekBitmap daysToReturn = 0;
+ ChargingTargetScheduleStruct chargingTargetSchedules[] = 0;
}
/** Allows a client to disable the EVSE from charging and discharging. */
@@ -4774,7 +4771,7 @@
/** Allows a client to set the user specified charging targets. */
timed command SetTargets(SetTargetsRequest): DefaultSuccess = 5;
/** Allows a client to retrieve the user specified charging targets. */
- timed command GetTargets(GetTargetsRequest): GetTargetsResponse = 6;
+ timed command GetTargets(): GetTargetsResponse = 6;
/** Allows a client to clear all stored charging targets. */
timed command ClearTargets(): DefaultSuccess = 7;
}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index 8cd5cc1..0bbc57d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -29984,8 +29984,6 @@
private static final long MAXIMUM_DISCHARGE_CURRENT_ATTRIBUTE_ID = 8L;
private static final long USER_MAXIMUM_CHARGE_CURRENT_ATTRIBUTE_ID = 9L;
private static final long RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID = 10L;
- private static final long NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID = 33L;
- private static final long NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID = 34L;
private static final long NEXT_CHARGE_START_TIME_ATTRIBUTE_ID = 35L;
private static final long NEXT_CHARGE_TARGET_TIME_ATTRIBUTE_ID = 36L;
private static final long NEXT_CHARGE_REQUIRED_ENERGY_ATTRIBUTE_ID = 37L;
@@ -30088,17 +30086,13 @@
}
- public void setTargets(DefaultClusterCallback callback, Integer dayOfWeekforSequence, ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets, int timedInvokeTimeoutMs) {
+ public void setTargets(DefaultClusterCallback callback, ArrayList<ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct> chargingTargetSchedules, int timedInvokeTimeoutMs) {
final long commandId = 5L;
ArrayList<StructElement> elements = new ArrayList<>();
- final long dayOfWeekforSequenceFieldID = 0L;
- BaseTLVType dayOfWeekforSequencetlvValue = new UIntType(dayOfWeekforSequence);
- elements.add(new StructElement(dayOfWeekforSequenceFieldID, dayOfWeekforSequencetlvValue));
-
- final long chargingTargetsFieldID = 1L;
- BaseTLVType chargingTargetstlvValue = ArrayType.generateArrayType(chargingTargets, (elementchargingTargets) -> elementchargingTargets.encodeTlv());
- elements.add(new StructElement(chargingTargetsFieldID, chargingTargetstlvValue));
+ final long chargingTargetSchedulesFieldID = 0L;
+ BaseTLVType chargingTargetSchedulestlvValue = ArrayType.generateArrayType(chargingTargetSchedules, (elementchargingTargetSchedules) -> elementchargingTargetSchedules.encodeTlv());
+ elements.add(new StructElement(chargingTargetSchedulesFieldID, chargingTargetSchedulestlvValue));
StructType value = new StructType(elements);
invoke(new InvokeCallbackImpl(callback) {
@@ -30109,36 +30103,25 @@
}
- public void getTargets(GetTargetsResponseCallback callback, Integer daysToReturn, int timedInvokeTimeoutMs) {
+ public void getTargets(GetTargetsResponseCallback callback, int timedInvokeTimeoutMs) {
final long commandId = 6L;
ArrayList<StructElement> elements = new ArrayList<>();
- final long daysToReturnFieldID = 0L;
- BaseTLVType daysToReturntlvValue = new UIntType(daysToReturn);
- elements.add(new StructElement(daysToReturnFieldID, daysToReturntlvValue));
-
StructType value = new StructType(elements);
invoke(new InvokeCallbackImpl(callback) {
@Override
public void onResponse(StructType invokeStructValue) {
- final long dayOfWeekforSequenceFieldID = 0L;
- Integer dayOfWeekforSequence = null;
- final long chargingTargetsFieldID = 1L;
- ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets = null;
+ final long chargingTargetSchedulesFieldID = 0L;
+ ArrayList<ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct> chargingTargetSchedules = null;
for (StructElement element: invokeStructValue.value()) {
- if (element.contextTagNum() == dayOfWeekforSequenceFieldID) {
- if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
- UIntType castingValue = element.value(UIntType.class);
- dayOfWeekforSequence = castingValue.value(Integer.class);
- }
- } else if (element.contextTagNum() == chargingTargetsFieldID) {
+ if (element.contextTagNum() == chargingTargetSchedulesFieldID) {
if (element.value(BaseTLVType.class).type() == TLVType.Array) {
ArrayType castingValue = element.value(ArrayType.class);
- chargingTargets = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetStruct.decodeTlv(elementcastingValue));
+ chargingTargetSchedules = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct.decodeTlv(elementcastingValue));
}
}
}
- callback.onSuccess(dayOfWeekforSequence, chargingTargets);
+ callback.onSuccess(chargingTargetSchedules);
}}, commandId, value, timedInvokeTimeoutMs);
}
@@ -30156,7 +30139,7 @@
}
public interface GetTargetsResponseCallback extends BaseClusterCallback {
- void onSuccess(Integer dayOfWeekforSequence, ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets);
+ void onSuccess(ArrayList<ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct> chargingTargetSchedules);
}
public interface StateAttributeCallback extends BaseAttributeCallback {
@@ -30528,56 +30511,6 @@
}, RANDOMIZATION_DELAY_WINDOW_ATTRIBUTE_ID, minInterval, maxInterval);
}
- public void readNumberOfWeeklyTargetsAttribute(
- IntegerAttributeCallback callback) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID);
-
- readAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- callback.onSuccess(value);
- }
- }, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID, true);
- }
-
- public void subscribeNumberOfWeeklyTargetsAttribute(
- IntegerAttributeCallback callback, int minInterval, int maxInterval) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID);
-
- subscribeAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- }
- }, NUMBER_OF_WEEKLY_TARGETS_ATTRIBUTE_ID, minInterval, maxInterval);
- }
-
- public void readNumberOfDailyTargetsAttribute(
- IntegerAttributeCallback callback) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID);
-
- readAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- callback.onSuccess(value);
- }
- }, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID, true);
- }
-
- public void subscribeNumberOfDailyTargetsAttribute(
- IntegerAttributeCallback callback, int minInterval, int maxInterval) {
- ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID);
-
- subscribeAttribute(new ReportCallbackImpl(callback, path) {
- @Override
- public void onSuccess(byte[] tlv) {
- Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
- }
- }, NUMBER_OF_DAILY_TARGETS_ATTRIBUTE_ID, minInterval, maxInterval);
- }
-
public void readNextChargeStartTimeAttribute(
NextChargeStartTimeAttributeCallback callback) {
ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NEXT_CHARGE_START_TIME_ATTRIBUTE_ID);
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 9e36acc..c676d02 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -7351,6 +7351,67 @@
return output.toString();
}
}
+public static class EnergyEvseClusterChargingTargetScheduleStruct {
+ public Integer dayOfWeekForSequence;
+ public ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets;
+ private static final long DAY_OF_WEEK_FOR_SEQUENCE_ID = 0L;
+ private static final long CHARGING_TARGETS_ID = 1L;
+
+ public EnergyEvseClusterChargingTargetScheduleStruct(
+ Integer dayOfWeekForSequence,
+ ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets
+ ) {
+ this.dayOfWeekForSequence = dayOfWeekForSequence;
+ this.chargingTargets = chargingTargets;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(DAY_OF_WEEK_FOR_SEQUENCE_ID, new UIntType(dayOfWeekForSequence)));
+ values.add(new StructElement(CHARGING_TARGETS_ID, ArrayType.generateArrayType(chargingTargets, (elementchargingTargets) -> elementchargingTargets.encodeTlv())));
+
+ return new StructType(values);
+ }
+
+ public static EnergyEvseClusterChargingTargetScheduleStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer dayOfWeekForSequence = null;
+ ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == DAY_OF_WEEK_FOR_SEQUENCE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ dayOfWeekForSequence = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CHARGING_TARGETS_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ chargingTargets = castingValue.map((elementcastingValue) -> ChipStructs.EnergyEvseClusterChargingTargetStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ return new EnergyEvseClusterChargingTargetScheduleStruct(
+ dayOfWeekForSequence,
+ chargingTargets
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("EnergyEvseClusterChargingTargetScheduleStruct {\n");
+ output.append("\tdayOfWeekForSequence: ");
+ output.append(dayOfWeekForSequence);
+ output.append("\n");
+ output.append("\tchargingTargets: ");
+ output.append(chargingTargets);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class EnergyPreferenceClusterBalanceStruct {
public Integer step;
public Optional<String> label;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 2c7843a..cb21688 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -9566,8 +9566,6 @@
MaximumDischargeCurrent(8L),
UserMaximumChargeCurrent(9L),
RandomizationDelayWindow(10L),
- NumberOfWeeklyTargets(33L),
- NumberOfDailyTargets(34L),
NextChargeStartTime(35L),
NextChargeTargetTime(36L),
NextChargeRequiredEnergy(37L),
@@ -9690,7 +9688,7 @@
}
throw new NoSuchFieldError();
}
- }public enum SetTargetsCommandField {DayOfWeekforSequence(0),ChargingTargets(1),;
+ }public enum SetTargetsCommandField {ChargingTargetSchedules(0),;
private final int id;
SetTargetsCommandField(int id) {
this.id = id;
@@ -9707,23 +9705,6 @@
}
throw new NoSuchFieldError();
}
- }public enum GetTargetsCommandField {DaysToReturn(0),;
- private final int id;
- GetTargetsCommandField(int id) {
- this.id = id;
- }
-
- public int getID() {
- return id;
- }
- public static GetTargetsCommandField value(int id) throws NoSuchFieldError {
- for (GetTargetsCommandField field : GetTargetsCommandField.values()) {
- if (field.getID() == id) {
- return field;
- }
- }
- throw new NoSuchFieldError();
- }
}@Override
public String getAttributeName(long id) throws NoSuchFieldError {
return Attribute.value(id).toString();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 8bd7d3a..a030b14 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -10500,12 +10500,10 @@
}
@Override
- public void onSuccess(Integer dayOfWeekforSequence, ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct> chargingTargets) {
+ public void onSuccess(ArrayList<ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct> chargingTargetSchedules) {
Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
- CommandResponseInfo dayOfWeekforSequenceResponseValue = new CommandResponseInfo("dayOfWeekforSequence", "Integer");
- responseValues.put(dayOfWeekforSequenceResponseValue, dayOfWeekforSequence);
- // chargingTargets: ChargingTargetStruct
+ // chargingTargetSchedules: ChargingTargetScheduleStruct
// Conversion from this type to Java is not properly implemented yet
callback.onSuccess(responseValues);
@@ -23535,17 +23533,12 @@
Map<String, CommandParameterInfo> energyEvsesetTargetsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
- CommandParameterInfo energyEvsesetTargetsdayOfWeekforSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekforSequence", Integer.class, Integer.class);
- energyEvsesetTargetsCommandParams.put("dayOfWeekforSequence",energyEvsesetTargetsdayOfWeekforSequenceCommandParameterInfo);
-
InteractionInfo energyEvsesetTargetsInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.EnergyEvseCluster) cluster)
.setTargets((DefaultClusterCallback) callback
- , (Integer)
- commandArguments.get("dayOfWeekforSequence")
- , (ArrayList<ChipStructs.EnergyEvseClusterChargingTargetStruct>)
- commandArguments.get("chargingTargets"), 10000
+ , (ArrayList<ChipStructs.EnergyEvseClusterChargingTargetScheduleStruct>)
+ commandArguments.get("chargingTargetSchedules"), 10000
);
},
() -> new DelegatedDefaultClusterCallback(),
@@ -23554,16 +23547,10 @@
energyEvseClusterInteractionInfoMap.put("setTargets", energyEvsesetTargetsInteractionInfo);
Map<String, CommandParameterInfo> energyEvsegetTargetsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
-
- CommandParameterInfo energyEvsegetTargetsdaysToReturnCommandParameterInfo = new CommandParameterInfo("daysToReturn", Integer.class, Integer.class);
- energyEvsegetTargetsCommandParams.put("daysToReturn",energyEvsegetTargetsdaysToReturnCommandParameterInfo);
InteractionInfo energyEvsegetTargetsInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.EnergyEvseCluster) cluster)
.getTargets((ChipClusters.EnergyEvseCluster.GetTargetsResponseCallback) callback
- , (Integer)
- commandArguments.get("daysToReturn")
-
, 10000);
},
() -> new DelegatedEnergyEvseClusterGetTargetsResponseCallback(),
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index 64a4a7a..95880d5 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -9527,28 +9527,6 @@
readEnergyEvseRandomizationDelayWindowCommandParams
);
result.put("readRandomizationDelayWindowAttribute", readEnergyEvseRandomizationDelayWindowAttributeInteractionInfo);
- Map<String, CommandParameterInfo> readEnergyEvseNumberOfWeeklyTargetsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
- InteractionInfo readEnergyEvseNumberOfWeeklyTargetsAttributeInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.EnergyEvseCluster) cluster).readNumberOfWeeklyTargetsAttribute(
- (ChipClusters.IntegerAttributeCallback) callback
- );
- },
- () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
- readEnergyEvseNumberOfWeeklyTargetsCommandParams
- );
- result.put("readNumberOfWeeklyTargetsAttribute", readEnergyEvseNumberOfWeeklyTargetsAttributeInteractionInfo);
- Map<String, CommandParameterInfo> readEnergyEvseNumberOfDailyTargetsCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
- InteractionInfo readEnergyEvseNumberOfDailyTargetsAttributeInteractionInfo = new InteractionInfo(
- (cluster, callback, commandArguments) -> {
- ((ChipClusters.EnergyEvseCluster) cluster).readNumberOfDailyTargetsAttribute(
- (ChipClusters.IntegerAttributeCallback) callback
- );
- },
- () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
- readEnergyEvseNumberOfDailyTargetsCommandParams
- );
- result.put("readNumberOfDailyTargetsAttribute", readEnergyEvseNumberOfDailyTargetsAttributeInteractionInfo);
Map<String, CommandParameterInfo> readEnergyEvseNextChargeStartTimeCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
InteractionInfo readEnergyEvseNextChargeStartTimeAttributeInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index 1cbd4a3..57b30e5 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -56,6 +56,7 @@
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/FixedLabelClusterLabelStruct.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt
new file mode 100644
index 0000000..bddc256
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt
@@ -0,0 +1,71 @@
+/*
+ *
+ * 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.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class EnergyEvseClusterChargingTargetScheduleStruct(
+ val dayOfWeekForSequence: UInt,
+ val chargingTargets: List<EnergyEvseClusterChargingTargetStruct>
+) {
+ override fun toString(): String = buildString {
+ append("EnergyEvseClusterChargingTargetScheduleStruct {\n")
+ append("\tdayOfWeekForSequence : $dayOfWeekForSequence\n")
+ append("\tchargingTargets : $chargingTargets\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE), dayOfWeekForSequence)
+ startArray(ContextSpecificTag(TAG_CHARGING_TARGETS))
+ for (item in chargingTargets.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DAY_OF_WEEK_FOR_SEQUENCE = 0
+ private const val TAG_CHARGING_TARGETS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterChargingTargetScheduleStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dayOfWeekForSequence = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE))
+ val chargingTargets =
+ buildList<EnergyEvseClusterChargingTargetStruct> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_CHARGING_TARGETS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return EnergyEvseClusterChargingTargetScheduleStruct(dayOfWeekForSequence, chargingTargets)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt
index c2a269e..20363bf 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/EnergyEvseCluster.kt
@@ -46,8 +46,7 @@
class EnergyEvseCluster(private val controller: MatterController, private val endpointId: UShort) {
class GetTargetsResponse(
- val dayOfWeekforSequence: UByte,
- val chargingTargets: List<EnergyEvseClusterChargingTargetStruct>
+ val chargingTargetSchedules: List<EnergyEvseClusterChargingTargetScheduleStruct>
)
class StateAttribute(val value: UByte?)
@@ -345,8 +344,7 @@
}
suspend fun setTargets(
- dayOfWeekforSequence: UByte,
- chargingTargets: List<EnergyEvseClusterChargingTargetStruct>,
+ chargingTargetSchedules: List<EnergyEvseClusterChargingTargetScheduleStruct>,
timedInvokeTimeout: Duration
) {
val commandId: UInt = 5u
@@ -354,12 +352,9 @@
val tlvWriter = TlvWriter()
tlvWriter.startStructure(AnonymousTag)
- val TAG_DAY_OF_WEEKFOR_SEQUENCE_REQ: Int = 0
- tlvWriter.put(ContextSpecificTag(TAG_DAY_OF_WEEKFOR_SEQUENCE_REQ), dayOfWeekforSequence)
-
- val TAG_CHARGING_TARGETS_REQ: Int = 1
- tlvWriter.startArray(ContextSpecificTag(TAG_CHARGING_TARGETS_REQ))
- for (item in chargingTargets.iterator()) {
+ val TAG_CHARGING_TARGET_SCHEDULES_REQ: Int = 0
+ tlvWriter.startArray(ContextSpecificTag(TAG_CHARGING_TARGET_SCHEDULES_REQ))
+ for (item in chargingTargetSchedules.iterator()) {
item.toTlv(AnonymousTag, tlvWriter)
}
tlvWriter.endArray()
@@ -376,14 +371,11 @@
logger.log(Level.FINE, "Invoke command succeeded: ${response}")
}
- suspend fun getTargets(daysToReturn: UByte, timedInvokeTimeout: Duration): GetTargetsResponse {
+ suspend fun getTargets(timedInvokeTimeout: Duration): GetTargetsResponse {
val commandId: UInt = 6u
val tlvWriter = TlvWriter()
tlvWriter.startStructure(AnonymousTag)
-
- val TAG_DAYS_TO_RETURN_REQ: Int = 0
- tlvWriter.put(ContextSpecificTag(TAG_DAYS_TO_RETURN_REQ), daysToReturn)
tlvWriter.endStructure()
val request: InvokeRequest =
@@ -398,25 +390,18 @@
val tlvReader = TlvReader(response.payload)
tlvReader.enterStructure(AnonymousTag)
- val TAG_DAY_OF_WEEKFOR_SEQUENCE: Int = 0
- var dayOfWeekforSequence_decoded: UByte? = null
-
- val TAG_CHARGING_TARGETS: Int = 1
- var chargingTargets_decoded: List<EnergyEvseClusterChargingTargetStruct>? = null
+ val TAG_CHARGING_TARGET_SCHEDULES: Int = 0
+ var chargingTargetSchedules_decoded: List<EnergyEvseClusterChargingTargetScheduleStruct>? = null
while (!tlvReader.isEndOfContainer()) {
val tag = tlvReader.peekElement().tag
- if (tag == ContextSpecificTag(TAG_DAY_OF_WEEKFOR_SEQUENCE)) {
- dayOfWeekforSequence_decoded = tlvReader.getUByte(tag)
- }
-
- if (tag == ContextSpecificTag(TAG_CHARGING_TARGETS)) {
- chargingTargets_decoded =
- buildList<EnergyEvseClusterChargingTargetStruct> {
+ if (tag == ContextSpecificTag(TAG_CHARGING_TARGET_SCHEDULES)) {
+ chargingTargetSchedules_decoded =
+ buildList<EnergyEvseClusterChargingTargetScheduleStruct> {
tlvReader.enterArray(tag)
while (!tlvReader.isEndOfContainer()) {
- add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader))
+ add(EnergyEvseClusterChargingTargetScheduleStruct.fromTlv(AnonymousTag, tlvReader))
}
tlvReader.exitContainer()
}
@@ -425,17 +410,13 @@
}
}
- if (dayOfWeekforSequence_decoded == null) {
- throw IllegalStateException("dayOfWeekforSequence not found in TLV")
- }
-
- if (chargingTargets_decoded == null) {
- throw IllegalStateException("chargingTargets not found in TLV")
+ if (chargingTargetSchedules_decoded == null) {
+ throw IllegalStateException("chargingTargetSchedules not found in TLV")
}
tlvReader.exitContainer()
- return GetTargetsResponse(dayOfWeekforSequence_decoded, chargingTargets_decoded)
+ return GetTargetsResponse(chargingTargetSchedules_decoded)
}
suspend fun clearTargets(timedInvokeTimeout: Duration) {
@@ -1523,192 +1504,6 @@
}
}
- suspend fun readNumberOfWeeklyTargetsAttribute(): UByte? {
- val ATTRIBUTE_ID: UInt = 33u
-
- val attributePath =
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
-
- val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
-
- val response = controller.read(readRequest)
-
- if (response.successes.isEmpty()) {
- logger.log(Level.WARNING, "Read command failed")
- throw IllegalStateException("Read command failed with failures: ${response.failures}")
- }
-
- logger.log(Level.FINE, "Read command succeeded")
-
- val attributeData =
- response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
- it.path.attributeId == ATTRIBUTE_ID
- }
-
- requireNotNull(attributeData) { "Numberofweeklytargets attribute not found in response" }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
-
- return decodedValue
- }
-
- suspend fun subscribeNumberOfWeeklyTargetsAttribute(
- minInterval: Int,
- maxInterval: Int
- ): Flow<UByteSubscriptionState> {
- val ATTRIBUTE_ID: UInt = 33u
- val attributePaths =
- listOf(
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
- )
-
- val subscribeRequest: SubscribeRequest =
- SubscribeRequest(
- eventPaths = emptyList(),
- attributePaths = attributePaths,
- minInterval = Duration.ofSeconds(minInterval.toLong()),
- maxInterval = Duration.ofSeconds(maxInterval.toLong())
- )
-
- return controller.subscribe(subscribeRequest).transform { subscriptionState ->
- when (subscriptionState) {
- is SubscriptionState.SubscriptionErrorNotification -> {
- emit(
- UByteSubscriptionState.Error(
- Exception(
- "Subscription terminated with error code: ${subscriptionState.terminationCause}"
- )
- )
- )
- }
- is SubscriptionState.NodeStateUpdate -> {
- val attributeData =
- subscriptionState.updateState.successes
- .filterIsInstance<ReadData.Attribute>()
- .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
-
- requireNotNull(attributeData) {
- "Numberofweeklytargets attribute not found in Node State update"
- }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
-
- decodedValue?.let { emit(UByteSubscriptionState.Success(it)) }
- }
- SubscriptionState.SubscriptionEstablished -> {
- emit(UByteSubscriptionState.SubscriptionEstablished)
- }
- }
- }
- }
-
- suspend fun readNumberOfDailyTargetsAttribute(): UByte? {
- val ATTRIBUTE_ID: UInt = 34u
-
- val attributePath =
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
-
- val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
-
- val response = controller.read(readRequest)
-
- if (response.successes.isEmpty()) {
- logger.log(Level.WARNING, "Read command failed")
- throw IllegalStateException("Read command failed with failures: ${response.failures}")
- }
-
- logger.log(Level.FINE, "Read command succeeded")
-
- val attributeData =
- response.successes.filterIsInstance<ReadData.Attribute>().firstOrNull {
- it.path.attributeId == ATTRIBUTE_ID
- }
-
- requireNotNull(attributeData) { "Numberofdailytargets attribute not found in response" }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
-
- return decodedValue
- }
-
- suspend fun subscribeNumberOfDailyTargetsAttribute(
- minInterval: Int,
- maxInterval: Int
- ): Flow<UByteSubscriptionState> {
- val ATTRIBUTE_ID: UInt = 34u
- val attributePaths =
- listOf(
- AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
- )
-
- val subscribeRequest: SubscribeRequest =
- SubscribeRequest(
- eventPaths = emptyList(),
- attributePaths = attributePaths,
- minInterval = Duration.ofSeconds(minInterval.toLong()),
- maxInterval = Duration.ofSeconds(maxInterval.toLong())
- )
-
- return controller.subscribe(subscribeRequest).transform { subscriptionState ->
- when (subscriptionState) {
- is SubscriptionState.SubscriptionErrorNotification -> {
- emit(
- UByteSubscriptionState.Error(
- Exception(
- "Subscription terminated with error code: ${subscriptionState.terminationCause}"
- )
- )
- )
- }
- is SubscriptionState.NodeStateUpdate -> {
- val attributeData =
- subscriptionState.updateState.successes
- .filterIsInstance<ReadData.Attribute>()
- .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
-
- requireNotNull(attributeData) {
- "Numberofdailytargets attribute not found in Node State update"
- }
-
- // Decode the TLV data into the appropriate type
- val tlvReader = TlvReader(attributeData.data)
- val decodedValue: UByte? =
- if (tlvReader.isNextTag(AnonymousTag)) {
- tlvReader.getUByte(AnonymousTag)
- } else {
- null
- }
-
- decodedValue?.let { emit(UByteSubscriptionState.Success(it)) }
- }
- SubscriptionState.SubscriptionEstablished -> {
- emit(UByteSubscriptionState.SubscriptionEstablished)
- }
- }
- }
- }
-
suspend fun readNextChargeStartTimeAttribute(): NextChargeStartTimeAttribute {
val ATTRIBUTE_ID: UInt = 35u
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index 83ff5cb..635cff6 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -56,6 +56,7 @@
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ElectricalEnergyMeasurementClusterEnergyMeasurementStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyPreferenceClusterBalanceStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/FixedLabelClusterLabelStruct.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt
new file mode 100644
index 0000000..eaa06f5
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/EnergyEvseClusterChargingTargetScheduleStruct.kt
@@ -0,0 +1,72 @@
+/*
+ *
+ * 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.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class EnergyEvseClusterChargingTargetScheduleStruct(
+ val dayOfWeekForSequence: UByte,
+ val chargingTargets: List<EnergyEvseClusterChargingTargetStruct>
+) {
+ override fun toString(): String = buildString {
+ append("EnergyEvseClusterChargingTargetScheduleStruct {\n")
+ append("\tdayOfWeekForSequence : $dayOfWeekForSequence\n")
+ append("\tchargingTargets : $chargingTargets\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE), dayOfWeekForSequence)
+ startArray(ContextSpecificTag(TAG_CHARGING_TARGETS))
+ for (item in chargingTargets.iterator()) {
+ item.toTlv(AnonymousTag, this)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_DAY_OF_WEEK_FOR_SEQUENCE = 0
+ private const val TAG_CHARGING_TARGETS = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): EnergyEvseClusterChargingTargetScheduleStruct {
+ tlvReader.enterStructure(tlvTag)
+ val dayOfWeekForSequence =
+ tlvReader.getUByte(ContextSpecificTag(TAG_DAY_OF_WEEK_FOR_SEQUENCE))
+ val chargingTargets =
+ buildList<EnergyEvseClusterChargingTargetStruct> {
+ tlvReader.enterArray(ContextSpecificTag(TAG_CHARGING_TARGETS))
+ while (!tlvReader.isEndOfContainer()) {
+ add(EnergyEvseClusterChargingTargetStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return EnergyEvseClusterChargingTargetScheduleStruct(dayOfWeekForSequence, chargingTargets)
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index 5891092..1ca2a96 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -22884,38 +22884,6 @@
jnivalue, value);
return value;
}
- case Attributes::NumberOfWeeklyTargets::Id: {
- using TypeInfo = Attributes::NumberOfWeeklyTargets::TypeInfo;
- TypeInfo::DecodableType cppValue;
- *aError = app::DataModel::Decode(aReader, cppValue);
- if (*aError != CHIP_NO_ERROR)
- {
- return nullptr;
- }
- jobject value;
- std::string valueClassName = "java/lang/Integer";
- std::string valueCtorSignature = "(I)V";
- jint jnivalue = static_cast<jint>(cppValue);
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
- value);
- return value;
- }
- case Attributes::NumberOfDailyTargets::Id: {
- using TypeInfo = Attributes::NumberOfDailyTargets::TypeInfo;
- TypeInfo::DecodableType cppValue;
- *aError = app::DataModel::Decode(aReader, cppValue);
- if (*aError != CHIP_NO_ERROR)
- {
- return nullptr;
- }
- jobject value;
- std::string valueClassName = "java/lang/Integer";
- std::string valueCtorSignature = "(I)V";
- jint jnivalue = static_cast<jint>(cppValue);
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
- value);
- return value;
- }
case Attributes::NextChargeStartTime::Id: {
using TypeInfo = Attributes::NextChargeStartTime::TypeInfo;
TypeInfo::DecodableType cppValue;
diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
index 0a1171e..7568ccc 100644
--- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
+++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp
@@ -3978,92 +3978,126 @@
// Java callback is allowed to be null, exit early if this is the case.
VerifyOrReturn(javaCallbackRef != nullptr);
- err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;Ljava/util/ArrayList;)V",
- &javaMethod);
+ err = JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/util/ArrayList;)V", &javaMethod);
VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err)));
- jobject DayOfWeekforSequence;
- std::string DayOfWeekforSequenceClassName = "java/lang/Integer";
- std::string DayOfWeekforSequenceCtorSignature = "(I)V";
- jint jniDayOfWeekforSequence = static_cast<jint>(dataResponse.dayOfWeekforSequence.Raw());
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(DayOfWeekforSequenceClassName.c_str(),
- DayOfWeekforSequenceCtorSignature.c_str(), jniDayOfWeekforSequence,
- DayOfWeekforSequence);
- jobject ChargingTargets;
- chip::JniReferences::GetInstance().CreateArrayList(ChargingTargets);
+ jobject ChargingTargetSchedules;
+ chip::JniReferences::GetInstance().CreateArrayList(ChargingTargetSchedules);
- auto iter_ChargingTargets_0 = dataResponse.chargingTargets.begin();
- while (iter_ChargingTargets_0.Next())
+ auto iter_ChargingTargetSchedules_0 = dataResponse.chargingTargetSchedules.begin();
+ while (iter_ChargingTargetSchedules_0.Next())
{
- auto & entry_0 = iter_ChargingTargets_0.GetValue();
+ auto & entry_0 = iter_ChargingTargetSchedules_0.GetValue();
jobject newElement_0;
- jobject newElement_0_targetTimeMinutesPastMidnight;
- std::string newElement_0_targetTimeMinutesPastMidnightClassName = "java/lang/Integer";
- std::string newElement_0_targetTimeMinutesPastMidnightCtorSignature = "(I)V";
- jint jninewElement_0_targetTimeMinutesPastMidnight = static_cast<jint>(entry_0.targetTimeMinutesPastMidnight);
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_targetTimeMinutesPastMidnightClassName.c_str(),
- newElement_0_targetTimeMinutesPastMidnightCtorSignature.c_str(),
- jninewElement_0_targetTimeMinutesPastMidnight,
- newElement_0_targetTimeMinutesPastMidnight);
- jobject newElement_0_targetSoC;
- if (!entry_0.targetSoC.HasValue())
+ jobject newElement_0_dayOfWeekForSequence;
+ std::string newElement_0_dayOfWeekForSequenceClassName = "java/lang/Integer";
+ std::string newElement_0_dayOfWeekForSequenceCtorSignature = "(I)V";
+ jint jninewElement_0_dayOfWeekForSequence = static_cast<jint>(entry_0.dayOfWeekForSequence.Raw());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_0_dayOfWeekForSequenceClassName.c_str(), newElement_0_dayOfWeekForSequenceCtorSignature.c_str(),
+ jninewElement_0_dayOfWeekForSequence, newElement_0_dayOfWeekForSequence);
+ jobject newElement_0_chargingTargets;
+ chip::JniReferences::GetInstance().CreateArrayList(newElement_0_chargingTargets);
+
+ auto iter_newElement_0_chargingTargets_2 = entry_0.chargingTargets.begin();
+ while (iter_newElement_0_chargingTargets_2.Next())
{
- chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_targetSoC);
- }
- else
- {
- jobject newElement_0_targetSoCInsideOptional;
- std::string newElement_0_targetSoCInsideOptionalClassName = "java/lang/Integer";
- std::string newElement_0_targetSoCInsideOptionalCtorSignature = "(I)V";
- jint jninewElement_0_targetSoCInsideOptional = static_cast<jint>(entry_0.targetSoC.Value());
+ auto & entry_2 = iter_newElement_0_chargingTargets_2.GetValue();
+ jobject newElement_2;
+ jobject newElement_2_targetTimeMinutesPastMidnight;
+ std::string newElement_2_targetTimeMinutesPastMidnightClassName = "java/lang/Integer";
+ std::string newElement_2_targetTimeMinutesPastMidnightCtorSignature = "(I)V";
+ jint jninewElement_2_targetTimeMinutesPastMidnight = static_cast<jint>(entry_2.targetTimeMinutesPastMidnight);
chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
- newElement_0_targetSoCInsideOptionalClassName.c_str(), newElement_0_targetSoCInsideOptionalCtorSignature.c_str(),
- jninewElement_0_targetSoCInsideOptional, newElement_0_targetSoCInsideOptional);
- chip::JniReferences::GetInstance().CreateOptional(newElement_0_targetSoCInsideOptional, newElement_0_targetSoC);
- }
- jobject newElement_0_addedEnergy;
- if (!entry_0.addedEnergy.HasValue())
- {
- chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_addedEnergy);
- }
- else
- {
- jobject newElement_0_addedEnergyInsideOptional;
- std::string newElement_0_addedEnergyInsideOptionalClassName = "java/lang/Long";
- std::string newElement_0_addedEnergyInsideOptionalCtorSignature = "(J)V";
- jlong jninewElement_0_addedEnergyInsideOptional = static_cast<jlong>(entry_0.addedEnergy.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_addedEnergyInsideOptionalClassName.c_str(),
- newElement_0_addedEnergyInsideOptionalCtorSignature.c_str(),
- jninewElement_0_addedEnergyInsideOptional,
- newElement_0_addedEnergyInsideOptional);
- chip::JniReferences::GetInstance().CreateOptional(newElement_0_addedEnergyInsideOptional, newElement_0_addedEnergy);
+ newElement_2_targetTimeMinutesPastMidnightClassName.c_str(),
+ newElement_2_targetTimeMinutesPastMidnightCtorSignature.c_str(), jninewElement_2_targetTimeMinutesPastMidnight,
+ newElement_2_targetTimeMinutesPastMidnight);
+ jobject newElement_2_targetSoC;
+ if (!entry_2.targetSoC.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_targetSoC);
+ }
+ else
+ {
+ jobject newElement_2_targetSoCInsideOptional;
+ std::string newElement_2_targetSoCInsideOptionalClassName = "java/lang/Integer";
+ std::string newElement_2_targetSoCInsideOptionalCtorSignature = "(I)V";
+ jint jninewElement_2_targetSoCInsideOptional = static_cast<jint>(entry_2.targetSoC.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_2_targetSoCInsideOptionalClassName.c_str(),
+ newElement_2_targetSoCInsideOptionalCtorSignature.c_str(), jninewElement_2_targetSoCInsideOptional,
+ newElement_2_targetSoCInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_2_targetSoCInsideOptional, newElement_2_targetSoC);
+ }
+ jobject newElement_2_addedEnergy;
+ if (!entry_2.addedEnergy.HasValue())
+ {
+ chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_addedEnergy);
+ }
+ else
+ {
+ jobject newElement_2_addedEnergyInsideOptional;
+ std::string newElement_2_addedEnergyInsideOptionalClassName = "java/lang/Long";
+ std::string newElement_2_addedEnergyInsideOptionalCtorSignature = "(J)V";
+ jlong jninewElement_2_addedEnergyInsideOptional = static_cast<jlong>(entry_2.addedEnergy.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(
+ newElement_2_addedEnergyInsideOptionalClassName.c_str(),
+ newElement_2_addedEnergyInsideOptionalCtorSignature.c_str(), jninewElement_2_addedEnergyInsideOptional,
+ newElement_2_addedEnergyInsideOptional);
+ chip::JniReferences::GetInstance().CreateOptional(newElement_2_addedEnergyInsideOptional, newElement_2_addedEnergy);
+ }
+
+ jclass chargingTargetStructStructClass_3;
+ err = chip::JniReferences::GetInstance().GetClassRef(
+ env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetStruct", chargingTargetStructStructClass_3);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetStruct");
+ return;
+ }
+
+ jmethodID chargingTargetStructStructCtor_3;
+ err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetStructStructClass_3, "<init>",
+ "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
+ &chargingTargetStructStructCtor_3);
+ if (err != CHIP_NO_ERROR || chargingTargetStructStructCtor_3 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetStruct constructor");
+ return;
+ }
+
+ newElement_2 =
+ env->NewObject(chargingTargetStructStructClass_3, chargingTargetStructStructCtor_3,
+ newElement_2_targetTimeMinutesPastMidnight, newElement_2_targetSoC, newElement_2_addedEnergy);
+ chip::JniReferences::GetInstance().AddToList(newElement_0_chargingTargets, newElement_2);
}
- jclass chargingTargetStructStructClass_1;
+ jclass chargingTargetScheduleStructStructClass_1;
err = chip::JniReferences::GetInstance().GetClassRef(
- env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetStruct", chargingTargetStructStructClass_1);
+ env, "chip/devicecontroller/ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct",
+ chargingTargetScheduleStructStructClass_1);
if (err != CHIP_NO_ERROR)
{
- ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetStruct");
+ ChipLogError(Zcl, "Could not find class ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct");
return;
}
- jmethodID chargingTargetStructStructCtor_1;
- err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetStructStructClass_1, "<init>",
- "(Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;)V",
- &chargingTargetStructStructCtor_1);
- if (err != CHIP_NO_ERROR || chargingTargetStructStructCtor_1 == nullptr)
+ jmethodID chargingTargetScheduleStructStructCtor_1;
+ err = chip::JniReferences::GetInstance().FindMethod(env, chargingTargetScheduleStructStructClass_1, "<init>",
+ "(Ljava/lang/Integer;Ljava/util/ArrayList;)V",
+ &chargingTargetScheduleStructStructCtor_1);
+ if (err != CHIP_NO_ERROR || chargingTargetScheduleStructStructCtor_1 == nullptr)
{
- ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetStruct constructor");
+ ChipLogError(Zcl, "Could not find ChipStructs$EnergyEvseClusterChargingTargetScheduleStruct constructor");
return;
}
- newElement_0 = env->NewObject(chargingTargetStructStructClass_1, chargingTargetStructStructCtor_1,
- newElement_0_targetTimeMinutesPastMidnight, newElement_0_targetSoC, newElement_0_addedEnergy);
- chip::JniReferences::GetInstance().AddToList(ChargingTargets, newElement_0);
+ newElement_0 = env->NewObject(chargingTargetScheduleStructStructClass_1, chargingTargetScheduleStructStructCtor_1,
+ newElement_0_dayOfWeekForSequence, newElement_0_chargingTargets);
+ chip::JniReferences::GetInstance().AddToList(ChargingTargetSchedules, newElement_0);
}
- env->CallVoidMethod(javaCallbackRef, javaMethod, DayOfWeekforSequence, ChargingTargets);
+ env->CallVoidMethod(javaCallbackRef, javaMethod, ChargingTargetSchedules);
}
CHIPDoorLockClusterGetWeekDayScheduleResponseCallback::CHIPDoorLockClusterGetWeekDayScheduleResponseCallback(jobject javaCallback) :
Callback::Callback<CHIPDoorLockClusterGetWeekDayScheduleResponseCallbackType>(CallbackFn, this)
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index afe5190..d599bd7 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -6781,15 +6781,13 @@
"commandId": 0x00000005,
"commandName": "SetTargets",
"args": {
- "dayOfWeekforSequence": "int",
- "chargingTargets": "ChargingTargetStruct",
+ "chargingTargetSchedules": "ChargingTargetScheduleStruct",
},
},
0x00000006: {
"commandId": 0x00000006,
"commandName": "GetTargets",
"args": {
- "daysToReturn": "int",
},
},
0x00000007: {
@@ -6868,18 +6866,6 @@
"reportable": True,
"writable": True,
},
- 0x00000021: {
- "attributeName": "NumberOfWeeklyTargets",
- "attributeId": 0x00000021,
- "type": "int",
- "reportable": True,
- },
- 0x00000022: {
- "attributeName": "NumberOfDailyTargets",
- "attributeId": 0x00000022,
- "type": "int",
- "reportable": True,
- },
0x00000023: {
"attributeName": "NextChargeStartTime",
"attributeId": 0x00000023,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 4a1c6a0..6a2d53d 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -24009,8 +24009,6 @@
ClusterObjectFieldDescriptor(Label="maximumDischargeCurrent", Tag=0x00000008, Type=typing.Optional[int]),
ClusterObjectFieldDescriptor(Label="userMaximumChargeCurrent", Tag=0x00000009, Type=typing.Optional[int]),
ClusterObjectFieldDescriptor(Label="randomizationDelayWindow", Tag=0x0000000A, Type=typing.Optional[uint]),
- ClusterObjectFieldDescriptor(Label="numberOfWeeklyTargets", Tag=0x00000021, Type=typing.Optional[uint]),
- ClusterObjectFieldDescriptor(Label="numberOfDailyTargets", Tag=0x00000022, Type=typing.Optional[uint]),
ClusterObjectFieldDescriptor(Label="nextChargeStartTime", Tag=0x00000023, Type=typing.Union[None, Nullable, uint]),
ClusterObjectFieldDescriptor(Label="nextChargeTargetTime", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]),
ClusterObjectFieldDescriptor(Label="nextChargeRequiredEnergy", Tag=0x00000025, Type=typing.Union[None, Nullable, int]),
@@ -24042,8 +24040,6 @@
maximumDischargeCurrent: 'typing.Optional[int]' = None
userMaximumChargeCurrent: 'typing.Optional[int]' = None
randomizationDelayWindow: 'typing.Optional[uint]' = None
- numberOfWeeklyTargets: 'typing.Optional[uint]' = None
- numberOfDailyTargets: 'typing.Optional[uint]' = None
nextChargeStartTime: 'typing.Union[None, Nullable, uint]' = None
nextChargeTargetTime: 'typing.Union[None, Nullable, uint]' = None
nextChargeRequiredEnergy: 'typing.Union[None, Nullable, int]' = None
@@ -24157,6 +24153,19 @@
targetSoC: 'typing.Optional[uint]' = None
addedEnergy: 'typing.Optional[int]' = None
+ @dataclass
+ class ChargingTargetScheduleStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]),
+ ])
+
+ dayOfWeekForSequence: 'uint' = 0
+ chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: [])
+
class Commands:
@dataclass
class GetTargetsResponse(ClusterCommand):
@@ -24169,12 +24178,10 @@
def descriptor(cls) -> ClusterObjectDescriptor:
return ClusterObjectDescriptor(
Fields=[
- ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=0, Type=uint),
- ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]),
+ ClusterObjectFieldDescriptor(Label="chargingTargetSchedules", Tag=0, Type=typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]),
])
- dayOfWeekforSequence: 'uint' = 0
- chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: [])
+ chargingTargetSchedules: 'typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]' = field(default_factory=lambda: [])
@dataclass
class Disable(ClusterCommand):
@@ -24267,16 +24274,14 @@
def descriptor(cls) -> ClusterObjectDescriptor:
return ClusterObjectDescriptor(
Fields=[
- ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=0, Type=uint),
- ClusterObjectFieldDescriptor(Label="chargingTargets", Tag=1, Type=typing.List[EnergyEvse.Structs.ChargingTargetStruct]),
+ ClusterObjectFieldDescriptor(Label="chargingTargetSchedules", Tag=0, Type=typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]),
])
@ChipUtility.classproperty
def must_use_timed_invoke(cls) -> bool:
return True
- dayOfWeekforSequence: 'uint' = 0
- chargingTargets: 'typing.List[EnergyEvse.Structs.ChargingTargetStruct]' = field(default_factory=lambda: [])
+ chargingTargetSchedules: 'typing.List[EnergyEvse.Structs.ChargingTargetScheduleStruct]' = field(default_factory=lambda: [])
@dataclass
class GetTargets(ClusterCommand):
@@ -24289,15 +24294,12 @@
def descriptor(cls) -> ClusterObjectDescriptor:
return ClusterObjectDescriptor(
Fields=[
- ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint),
])
@ChipUtility.classproperty
def must_use_timed_invoke(cls) -> bool:
return True
- daysToReturn: 'uint' = 0
-
@dataclass
class ClearTargets(ClusterCommand):
cluster_id: typing.ClassVar[int] = 0x00000099
@@ -24493,38 +24495,6 @@
value: 'typing.Optional[uint]' = None
@dataclass
- class NumberOfWeeklyTargets(ClusterAttributeDescriptor):
- @ChipUtility.classproperty
- def cluster_id(cls) -> int:
- return 0x00000099
-
- @ChipUtility.classproperty
- def attribute_id(cls) -> int:
- return 0x00000021
-
- @ChipUtility.classproperty
- def attribute_type(cls) -> ClusterObjectFieldDescriptor:
- return ClusterObjectFieldDescriptor(Type=typing.Optional[uint])
-
- value: 'typing.Optional[uint]' = None
-
- @dataclass
- class NumberOfDailyTargets(ClusterAttributeDescriptor):
- @ChipUtility.classproperty
- def cluster_id(cls) -> int:
- return 0x00000099
-
- @ChipUtility.classproperty
- def attribute_id(cls) -> int:
- return 0x00000022
-
- @ChipUtility.classproperty
- def attribute_type(cls) -> ClusterObjectFieldDescriptor:
- return ClusterObjectFieldDescriptor(Type=typing.Optional[uint])
-
- value: 'typing.Optional[uint]' = None
-
- @dataclass
class NextChargeStartTime(ClusterAttributeDescriptor):
@ChipUtility.classproperty
def cluster_id(cls) -> int:
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index 61c9966..d7d9849 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -3123,12 +3123,6 @@
case Attributes::RandomizationDelayWindow::Id: {
return YES;
}
- case Attributes::NumberOfWeeklyTargets::Id: {
- return YES;
- }
- case Attributes::NumberOfDailyTargets::Id: {
- return YES;
- }
case Attributes::NextChargeStartTime::Id: {
return YES;
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 6308eac..acf7707 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -8679,28 +8679,6 @@
value = [NSNumber numberWithUnsignedInt:cppValue];
return value;
}
- case Attributes::NumberOfWeeklyTargets::Id: {
- using TypeInfo = Attributes::NumberOfWeeklyTargets::TypeInfo;
- TypeInfo::DecodableType cppValue;
- *aError = DataModel::Decode(aReader, cppValue);
- if (*aError != CHIP_NO_ERROR) {
- return nil;
- }
- NSNumber * _Nonnull value;
- value = [NSNumber numberWithUnsignedChar:cppValue];
- return value;
- }
- case Attributes::NumberOfDailyTargets::Id: {
- using TypeInfo = Attributes::NumberOfDailyTargets::TypeInfo;
- TypeInfo::DecodableType cppValue;
- *aError = DataModel::Decode(aReader, cppValue);
- if (*aError != CHIP_NO_ERROR) {
- return nil;
- }
- NSNumber * _Nonnull value;
- value = [NSNumber numberWithUnsignedChar:cppValue];
- return value;
- }
case Attributes::NextChargeStartTime::Id: {
using TypeInfo = Attributes::NextChargeStartTime::TypeInfo;
TypeInfo::DecodableType cppValue;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 741bca2..f484ada 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -7734,7 +7734,9 @@
*
* Allows a client to retrieve the user specified charging targets.
*/
-- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getTargetsWithCompletion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
+ MTR_PROVISIONALLY_AVAILABLE;
/**
* Command ClearTargets
*
@@ -7814,18 +7816,6 @@
reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
+ (void)readAttributeRandomizationDelayWindowWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)readAttributeNumberOfWeeklyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)subscribeAttributeNumberOfWeeklyTargetsWithParams:(MTRSubscribeParams *)params
- subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
- reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
-+ (void)readAttributeNumberOfWeeklyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-
-- (void)readAttributeNumberOfDailyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)subscribeAttributeNumberOfDailyTargetsWithParams:(MTRSubscribeParams *)params
- subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
- reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
-+ (void)readAttributeNumberOfDailyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-
- (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
- (void)subscribeAttributeNextChargeStartTimeWithParams:(MTRSubscribeParams *)params
subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 2f8a214..aa248a5 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -52030,7 +52030,11 @@
queue:self.callbackQueue
completion:responseHandler];
}
-- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
+- (void)getTargetsWithCompletion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ [self getTargetsWithParams:nil completion:completion];
+}
+- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
{
if (params == nil) {
params = [[MTREnergyEVSEClusterGetTargetsParams
@@ -52541,78 +52545,6 @@
completion:completion];
}
-- (void)readAttributeNumberOfWeeklyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
-{
- using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo;
- [self.device _readKnownAttributeWithEndpointID:@(self.endpoint)
- clusterID:@(TypeInfo::GetClusterId())
- attributeID:@(TypeInfo::GetAttributeId())
- params:nil
- queue:self.callbackQueue
- completion:completion];
-}
-
-- (void)subscribeAttributeNumberOfWeeklyTargetsWithParams:(MTRSubscribeParams * _Nonnull)params
- subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
- reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
-{
- using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo;
- [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint)
- clusterID:@(TypeInfo::GetClusterId())
- attributeID:@(TypeInfo::GetAttributeId())
- params:params
- queue:self.callbackQueue
- reportHandler:reportHandler
- subscriptionEstablished:subscriptionEstablished];
-}
-
-+ (void)readAttributeNumberOfWeeklyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
-{
- using TypeInfo = EnergyEvse::Attributes::NumberOfWeeklyTargets::TypeInfo;
- [clusterStateCacheContainer
- _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
- clusterID:TypeInfo::GetClusterId()
- attributeID:TypeInfo::GetAttributeId()
- queue:queue
- completion:completion];
-}
-
-- (void)readAttributeNumberOfDailyTargetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
-{
- using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo;
- [self.device _readKnownAttributeWithEndpointID:@(self.endpoint)
- clusterID:@(TypeInfo::GetClusterId())
- attributeID:@(TypeInfo::GetAttributeId())
- params:nil
- queue:self.callbackQueue
- completion:completion];
-}
-
-- (void)subscribeAttributeNumberOfDailyTargetsWithParams:(MTRSubscribeParams * _Nonnull)params
- subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
- reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
-{
- using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo;
- [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint)
- clusterID:@(TypeInfo::GetClusterId())
- attributeID:@(TypeInfo::GetAttributeId())
- params:params
- queue:self.callbackQueue
- reportHandler:reportHandler
- subscriptionEstablished:subscriptionEstablished];
-}
-
-+ (void)readAttributeNumberOfDailyTargetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
-{
- using TypeInfo = EnergyEvse::Attributes::NumberOfDailyTargets::TypeInfo;
- [clusterStateCacheContainer
- _readKnownCachedAttributeWithEndpointID:static_cast<chip::EndpointId>([endpoint unsignedShortValue])
- clusterID:TypeInfo::GetClusterId()
- attributeID:TypeInfo::GetAttributeId()
- queue:queue
- completion:completion];
-}
-
- (void)readAttributeNextChargeStartTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
{
using TypeInfo = EnergyEvse::Attributes::NextChargeStartTime::TypeInfo;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index 4f9fdb3..fedd4aa 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -2637,8 +2637,6 @@
MTRAttributeIDTypeClusterEnergyEVSEAttributeMaximumDischargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000008,
MTRAttributeIDTypeClusterEnergyEVSEAttributeUserMaximumChargeCurrentID MTR_PROVISIONALLY_AVAILABLE = 0x00000009,
MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A,
- MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfWeeklyTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000021,
- MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfDailyTargetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000022,
MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000023,
MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeTargetTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000024,
MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeRequiredEnergyID MTR_PROVISIONALLY_AVAILABLE = 0x00000025,
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index c1d6782..a102f15 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -3643,7 +3643,9 @@
- (void)startDiagnosticsWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
MTR_PROVISIONALLY_AVAILABLE;
- (void)setTargetsWithParams:(MTREnergyEVSEClusterSetTargetsParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)getTargetsWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
+ MTR_PROVISIONALLY_AVAILABLE;
- (void)clearTargetsWithParams:(MTREnergyEVSEClusterClearTargetsParams * _Nullable)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
- (void)clearTargetsWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
MTR_PROVISIONALLY_AVAILABLE;
@@ -3674,10 +3676,6 @@
- (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary<NSString *, id> *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE;
- (void)writeAttributeRandomizationDelayWindowWithValue:(NSDictionary<NSString *, id> *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
-- (NSDictionary<NSString *, id> * _Nullable)readAttributeNumberOfWeeklyTargetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
-
-- (NSDictionary<NSString *, id> * _Nullable)readAttributeNumberOfDailyTargetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
-
- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextChargeTargetTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index bff98af..11ca8e1 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -9962,7 +9962,11 @@
completion:responseHandler];
}
-- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
+- (void)getTargetsWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ [self getTargetsWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion];
+}
+- (void)getTargetsWithParams:(MTREnergyEVSEClusterGetTargetsParams * _Nullable)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTREnergyEVSEClusterGetTargetsResponseParams * _Nullable data, NSError * _Nullable error))completion
{
if (params == nil) {
params = [[MTREnergyEVSEClusterGetTargetsParams
@@ -10103,16 +10107,6 @@
[self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeRandomizationDelayWindowID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout];
}
-- (NSDictionary<NSString *, id> * _Nullable)readAttributeNumberOfWeeklyTargetsWithParams:(MTRReadParams * _Nullable)params
-{
- return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfWeeklyTargetsID) params:params];
-}
-
-- (NSDictionary<NSString *, id> * _Nullable)readAttributeNumberOfDailyTargetsWithParams:(MTRReadParams * _Nullable)params
-{
- return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNumberOfDailyTargetsID) params:params];
-}
-
- (NSDictionary<NSString *, id> * _Nullable)readAttributeNextChargeStartTimeWithParams:(MTRReadParams * _Nullable)params
{
return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeEnergyEVSEID) attributeID:@(MTRAttributeIDTypeClusterEnergyEVSEAttributeNextChargeStartTimeID) params:params];
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index f617ffc..1656beb 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -5846,9 +5846,7 @@
MTR_PROVISIONALLY_AVAILABLE
@interface MTREnergyEVSEClusterGetTargetsResponseParams : NSObject <NSCopying>
-@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE;
-
-@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull chargingTargetSchedules MTR_PROVISIONALLY_AVAILABLE;
/**
* Initialize an MTREnergyEVSEClusterGetTargetsResponseParams with a response-value dictionary
@@ -5989,9 +5987,7 @@
MTR_PROVISIONALLY_AVAILABLE
@interface MTREnergyEVSEClusterSetTargetsParams : NSObject <NSCopying>
-@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE;
-
-@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull chargingTargetSchedules MTR_PROVISIONALLY_AVAILABLE;
/**
* Controls whether the command is a timed command (using Timed Invoke).
*
@@ -6020,8 +6016,6 @@
MTR_PROVISIONALLY_AVAILABLE
@interface MTREnergyEVSEClusterGetTargetsParams : NSObject <NSCopying>
-
-@property (nonatomic, copy) NSNumber * _Nonnull daysToReturn MTR_PROVISIONALLY_AVAILABLE;
/**
* Controls whether the command is a timed command (using Timed Invoke).
*
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index 2a48639..a1e41d3 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -16510,9 +16510,7 @@
{
if (self = [super init]) {
- _dayOfWeekforSequence = @(0);
-
- _chargingTargets = [NSArray array];
+ _chargingTargetSchedules = [NSArray array];
}
return self;
}
@@ -16521,15 +16519,14 @@
{
auto other = [[MTREnergyEVSEClusterGetTargetsResponseParams alloc] init];
- other.dayOfWeekforSequence = self.dayOfWeekforSequence;
- other.chargingTargets = self.chargingTargets;
+ other.chargingTargetSchedules = self.chargingTargetSchedules;
return other;
}
- (NSString *)description
{
- NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets];
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingTargetSchedules:%@; >", NSStringFromClass([self class]), _chargingTargetSchedules];
return descriptionString;
}
@@ -16580,26 +16577,39 @@
- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType &)decodableStruct
{
{
- self.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()];
- }
- {
{ // Scope for our temporary variables
auto * array_0 = [NSMutableArray new];
- auto iter_0 = decodableStruct.chargingTargets.begin();
+ auto iter_0 = decodableStruct.chargingTargetSchedules.begin();
while (iter_0.Next()) {
auto & entry_0 = iter_0.GetValue();
- MTREnergyEVSEClusterChargingTargetStruct * newElement_0;
- newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new];
- newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight];
- if (entry_0.targetSoC.HasValue()) {
- newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()];
- } else {
- newElement_0.targetSoC = nil;
- }
- if (entry_0.addedEnergy.HasValue()) {
- newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()];
- } else {
- newElement_0.addedEnergy = nil;
+ MTREnergyEVSEClusterChargingTargetScheduleStruct * newElement_0;
+ newElement_0 = [MTREnergyEVSEClusterChargingTargetScheduleStruct new];
+ newElement_0.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeekForSequence.Raw()];
+ { // Scope for our temporary variables
+ auto * array_2 = [NSMutableArray new];
+ auto iter_2 = entry_0.chargingTargets.begin();
+ while (iter_2.Next()) {
+ auto & entry_2 = iter_2.GetValue();
+ MTREnergyEVSEClusterChargingTargetStruct * newElement_2;
+ newElement_2 = [MTREnergyEVSEClusterChargingTargetStruct new];
+ newElement_2.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_2.targetTimeMinutesPastMidnight];
+ if (entry_2.targetSoC.HasValue()) {
+ newElement_2.targetSoC = [NSNumber numberWithUnsignedChar:entry_2.targetSoC.Value()];
+ } else {
+ newElement_2.targetSoC = nil;
+ }
+ if (entry_2.addedEnergy.HasValue()) {
+ newElement_2.addedEnergy = [NSNumber numberWithLongLong:entry_2.addedEnergy.Value()];
+ } else {
+ newElement_2.addedEnergy = nil;
+ }
+ [array_2 addObject:newElement_2];
+ }
+ CHIP_ERROR err = iter_2.GetStatus();
+ if (err != CHIP_NO_ERROR) {
+ return err;
+ }
+ newElement_0.chargingTargets = array_2;
}
[array_0 addObject:newElement_0];
}
@@ -16607,7 +16617,7 @@
if (err != CHIP_NO_ERROR) {
return err;
}
- self.chargingTargets = array_0;
+ self.chargingTargetSchedules = array_0;
}
}
return CHIP_NO_ERROR;
@@ -16952,9 +16962,7 @@
{
if (self = [super init]) {
- _dayOfWeekforSequence = @(0);
-
- _chargingTargets = [NSArray array];
+ _chargingTargetSchedules = [NSArray array];
_timedInvokeTimeoutMs = nil;
_serverSideProcessingTimeout = nil;
}
@@ -16965,8 +16973,7 @@
{
auto other = [[MTREnergyEVSEClusterSetTargetsParams alloc] init];
- other.dayOfWeekforSequence = self.dayOfWeekforSequence;
- other.chargingTargets = self.chargingTargets;
+ other.chargingTargetSchedules = self.chargingTargetSchedules;
other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
@@ -16975,7 +16982,7 @@
- (NSString *)description
{
- NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets];
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingTargetSchedules:%@; >", NSStringFromClass([self class]), _chargingTargetSchedules];
return descriptionString;
}
@@ -16988,37 +16995,56 @@
chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type encodableStruct;
ListFreer listFreer;
{
- encodableStruct.dayOfWeekforSequence = static_cast<std::remove_reference_t<decltype(encodableStruct.dayOfWeekforSequence)>>(self.dayOfWeekforSequence.unsignedCharValue);
- }
- {
{
- using ListType_0 = std::remove_reference_t<decltype(encodableStruct.chargingTargets)>;
+ using ListType_0 = std::remove_reference_t<decltype(encodableStruct.chargingTargetSchedules)>;
using ListMemberType_0 = ListMemberTypeGetter<ListType_0>::Type;
- if (self.chargingTargets.count != 0) {
- auto * listHolder_0 = new ListHolder<ListMemberType_0>(self.chargingTargets.count);
+ if (self.chargingTargetSchedules.count != 0) {
+ auto * listHolder_0 = new ListHolder<ListMemberType_0>(self.chargingTargetSchedules.count);
if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) {
return CHIP_ERROR_INVALID_ARGUMENT;
}
listFreer.add(listHolder_0);
- for (size_t i_0 = 0; i_0 < self.chargingTargets.count; ++i_0) {
- if (![self.chargingTargets[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) {
+ for (size_t i_0 = 0; i_0 < self.chargingTargetSchedules.count; ++i_0) {
+ if (![self.chargingTargetSchedules[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetScheduleStruct class]]) {
// Wrong kind of value.
return CHIP_ERROR_INVALID_ARGUMENT;
}
- auto element_0 = (MTREnergyEVSEClusterChargingTargetStruct *) self.chargingTargets[i_0];
- listHolder_0->mList[i_0].targetTimeMinutesPastMidnight = element_0.targetTimeMinutesPastMidnight.unsignedShortValue;
- if (element_0.targetSoC != nil) {
- auto & definedValue_2 = listHolder_0->mList[i_0].targetSoC.Emplace();
- definedValue_2 = element_0.targetSoC.unsignedCharValue;
- }
- if (element_0.addedEnergy != nil) {
- auto & definedValue_2 = listHolder_0->mList[i_0].addedEnergy.Emplace();
- definedValue_2 = element_0.addedEnergy.longLongValue;
+ auto element_0 = (MTREnergyEVSEClusterChargingTargetScheduleStruct *) self.chargingTargetSchedules[i_0];
+ listHolder_0->mList[i_0].dayOfWeekForSequence = static_cast<std::remove_reference_t<decltype(listHolder_0->mList[i_0].dayOfWeekForSequence)>>(element_0.dayOfWeekForSequence.unsignedCharValue);
+ {
+ using ListType_2 = std::remove_reference_t<decltype(listHolder_0->mList[i_0].chargingTargets)>;
+ using ListMemberType_2 = ListMemberTypeGetter<ListType_2>::Type;
+ if (element_0.chargingTargets.count != 0) {
+ auto * listHolder_2 = new ListHolder<ListMemberType_2>(element_0.chargingTargets.count);
+ if (listHolder_2 == nullptr || listHolder_2->mList == nullptr) {
+ return CHIP_ERROR_INVALID_ARGUMENT;
+ }
+ listFreer.add(listHolder_2);
+ for (size_t i_2 = 0; i_2 < element_0.chargingTargets.count; ++i_2) {
+ if (![element_0.chargingTargets[i_2] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) {
+ // Wrong kind of value.
+ return CHIP_ERROR_INVALID_ARGUMENT;
+ }
+ auto element_2 = (MTREnergyEVSEClusterChargingTargetStruct *) element_0.chargingTargets[i_2];
+ listHolder_2->mList[i_2].targetTimeMinutesPastMidnight = element_2.targetTimeMinutesPastMidnight.unsignedShortValue;
+ if (element_2.targetSoC != nil) {
+ auto & definedValue_4 = listHolder_2->mList[i_2].targetSoC.Emplace();
+ definedValue_4 = element_2.targetSoC.unsignedCharValue;
+ }
+ if (element_2.addedEnergy != nil) {
+ auto & definedValue_4 = listHolder_2->mList[i_2].addedEnergy.Emplace();
+ definedValue_4 = element_2.addedEnergy.longLongValue;
+ }
+ }
+ listHolder_0->mList[i_0].chargingTargets = ListType_2(listHolder_2->mList, element_0.chargingTargets.count);
+ } else {
+ listHolder_0->mList[i_0].chargingTargets = ListType_2();
+ }
}
}
- encodableStruct.chargingTargets = ListType_0(listHolder_0->mList, self.chargingTargets.count);
+ encodableStruct.chargingTargetSchedules = ListType_0(listHolder_0->mList, self.chargingTargetSchedules.count);
} else {
- encodableStruct.chargingTargets = ListType_0();
+ encodableStruct.chargingTargetSchedules = ListType_0();
}
}
}
@@ -17065,8 +17091,6 @@
- (instancetype)init
{
if (self = [super init]) {
-
- _daysToReturn = @(0);
_timedInvokeTimeoutMs = nil;
_serverSideProcessingTimeout = nil;
}
@@ -17077,7 +17101,6 @@
{
auto other = [[MTREnergyEVSEClusterGetTargetsParams alloc] init];
- other.daysToReturn = self.daysToReturn;
other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
@@ -17086,7 +17109,7 @@
- (NSString *)description
{
- NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn];
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])];
return descriptionString;
}
@@ -17098,9 +17121,6 @@
{
chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type encodableStruct;
ListFreer listFreer;
- {
- encodableStruct.daysToReturn = static_cast<std::remove_reference_t<decltype(encodableStruct.daysToReturn)>>(self.daysToReturn.unsignedCharValue);
- }
auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
if (buffer.IsNull()) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index 064bd1f..d57f138 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -1284,6 +1284,12 @@
@end
MTR_PROVISIONALLY_AVAILABLE
+@interface MTREnergyEVSEClusterChargingTargetScheduleStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSArray * _Nonnull chargingTargets MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTREnergyEVSEClusterEVConnectedEvent : NSObject <NSCopying>
@property (nonatomic, copy) NSNumber * _Nonnull sessionID MTR_PROVISIONALLY_AVAILABLE;
@end
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index d8b97ec..810e778 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -5241,6 +5241,36 @@
@end
+@implementation MTREnergyEVSEClusterChargingTargetScheduleStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _dayOfWeekForSequence = @(0);
+
+ _chargingTargets = [NSArray array];
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTREnergyEVSEClusterChargingTargetScheduleStruct alloc] init];
+
+ other.dayOfWeekForSequence = self.dayOfWeekForSequence;
+ other.chargingTargets = self.chargingTargets;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekForSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekForSequence, _chargingTargets];
+ return descriptionString;
+}
+
+@end
+
@implementation MTREnergyEVSEClusterEVConnectedEvent
- (instancetype)init
{
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
index 6f3fba5..8d4b8ed 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp
@@ -10437,68 +10437,6 @@
namespace EnergyEvse {
namespace Attributes {
-namespace NumberOfWeeklyTargets {
-
-EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value)
-{
- using Traits = NumericAttributeTraits<uint8_t>;
- Traits::StorageType temp;
- uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
- EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp));
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
- if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
- {
- return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
- }
- *value = Traits::StorageToWorking(temp);
- return status;
-}
-EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value)
-{
- using Traits = NumericAttributeTraits<uint8_t>;
- if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
- {
- return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
- }
- Traits::StorageType storageValue;
- Traits::WorkingToStorage(value, storageValue);
- uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
- return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
-}
-
-} // namespace NumberOfWeeklyTargets
-
-namespace NumberOfDailyTargets {
-
-EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value)
-{
- using Traits = NumericAttributeTraits<uint8_t>;
- Traits::StorageType temp;
- uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp);
- EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp));
- VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status);
- if (!Traits::CanRepresentValue(/* isNullable = */ false, temp))
- {
- return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
- }
- *value = Traits::StorageToWorking(temp);
- return status;
-}
-EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value)
-{
- using Traits = NumericAttributeTraits<uint8_t>;
- if (!Traits::CanRepresentValue(/* isNullable = */ false, value))
- {
- return EMBER_ZCL_STATUS_CONSTRAINT_ERROR;
- }
- Traits::StorageType storageValue;
- Traits::WorkingToStorage(value, storageValue);
- uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue);
- return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE);
-}
-
-} // namespace NumberOfDailyTargets
-
namespace ClusterRevision {
EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value)
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index 2fed842..bee14fa 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -2033,16 +2033,6 @@
namespace EnergyEvse {
namespace Attributes {
-namespace NumberOfWeeklyTargets {
-EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u
-EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value);
-} // namespace NumberOfWeeklyTargets
-
-namespace NumberOfDailyTargets {
-EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u
-EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value);
-} // namespace NumberOfDailyTargets
-
namespace ClusterRevision {
EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // int16u
EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value);
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
index 3e74123..a0d28f1 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp
@@ -15895,14 +15895,12 @@
}
} // namespace ChargingTargetStruct
-} // namespace Structs
-namespace Commands {
-namespace GetTargetsResponse {
+namespace ChargingTargetScheduleStruct {
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
- encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence);
+ encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence);
encoder.Encode(to_underlying(Fields::kChargingTargets), chargingTargets);
return encoder.Finalize();
}
@@ -15921,9 +15919,9 @@
CHIP_ERROR err = CHIP_NO_ERROR;
const uint8_t __context_tag = std::get<uint8_t>(__element);
- if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence))
+ if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence))
{
- err = DataModel::Decode(reader, dayOfWeekforSequence);
+ err = DataModel::Decode(reader, dayOfWeekForSequence);
}
else if (__context_tag == to_underlying(Fields::kChargingTargets))
{
@@ -15936,6 +15934,44 @@
ReturnErrorOnFailure(err);
}
}
+
+} // namespace ChargingTargetScheduleStruct
+} // namespace Structs
+
+namespace Commands {
+namespace GetTargetsResponse {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kChargingTargetSchedules), chargingTargetSchedules);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kChargingTargetSchedules))
+ {
+ err = DataModel::Decode(reader, chargingTargetSchedules);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
} // namespace GetTargetsResponse.
namespace Disable {
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
@@ -16064,8 +16100,7 @@
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
- encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence);
- encoder.Encode(to_underlying(Fields::kChargingTargets), chargingTargets);
+ encoder.Encode(to_underlying(Fields::kChargingTargetSchedules), chargingTargetSchedules);
return encoder.Finalize();
}
@@ -16083,13 +16118,9 @@
CHIP_ERROR err = CHIP_NO_ERROR;
const uint8_t __context_tag = std::get<uint8_t>(__element);
- if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence))
+ if (__context_tag == to_underlying(Fields::kChargingTargetSchedules))
{
- err = DataModel::Decode(reader, dayOfWeekforSequence);
- }
- else if (__context_tag == to_underlying(Fields::kChargingTargets))
- {
- err = DataModel::Decode(reader, chargingTargets);
+ err = DataModel::Decode(reader, chargingTargetSchedules);
}
else
{
@@ -16103,7 +16134,6 @@
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
- encoder.Encode(to_underlying(Fields::kDaysToReturn), daysToReturn);
return encoder.Finalize();
}
@@ -16117,19 +16147,6 @@
{
return std::get<CHIP_ERROR>(__element);
}
-
- CHIP_ERROR err = CHIP_NO_ERROR;
- const uint8_t __context_tag = std::get<uint8_t>(__element);
-
- if (__context_tag == to_underlying(Fields::kDaysToReturn))
- {
- err = DataModel::Decode(reader, daysToReturn);
- }
- else
- {
- }
-
- ReturnErrorOnFailure(err);
}
}
} // namespace GetTargets.
@@ -16182,10 +16199,6 @@
return DataModel::Decode(reader, userMaximumChargeCurrent);
case Attributes::RandomizationDelayWindow::TypeInfo::GetAttributeId():
return DataModel::Decode(reader, randomizationDelayWindow);
- case Attributes::NumberOfWeeklyTargets::TypeInfo::GetAttributeId():
- return DataModel::Decode(reader, numberOfWeeklyTargets);
- case Attributes::NumberOfDailyTargets::TypeInfo::GetAttributeId():
- return DataModel::Decode(reader, numberOfDailyTargets);
case Attributes::NextChargeStartTime::TypeInfo::GetAttributeId():
return DataModel::Decode(reader, nextChargeStartTime);
case Attributes::NextChargeTargetTime::TypeInfo::GetAttributeId():
diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
index 69683f0..f85e033 100644
--- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
+++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h
@@ -22096,6 +22096,36 @@
using DecodableType = Type;
} // namespace ChargingTargetStruct
+namespace ChargingTargetScheduleStruct {
+enum class Fields : uint8_t
+{
+ kDayOfWeekForSequence = 0,
+ kChargingTargets = 1,
+};
+
+struct Type
+{
+public:
+ chip::BitMask<TargetDayOfWeekBitmap> dayOfWeekForSequence = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
+ DataModel::List<const Structs::ChargingTargetStruct::Type> chargingTargets;
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+struct DecodableType
+{
+public:
+ chip::BitMask<TargetDayOfWeekBitmap> dayOfWeekForSequence = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
+ DataModel::DecodableList<Structs::ChargingTargetStruct::DecodableType> chargingTargets;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+};
+
+} // namespace ChargingTargetScheduleStruct
} // namespace Structs
namespace Commands {
@@ -22147,8 +22177,7 @@
namespace GetTargetsResponse {
enum class Fields : uint8_t
{
- kDayOfWeekforSequence = 0,
- kChargingTargets = 1,
+ kChargingTargetSchedules = 0,
};
struct Type
@@ -22158,8 +22187,7 @@
static constexpr CommandId GetCommandId() { return Commands::GetTargetsResponse::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- chip::BitMask<TargetDayOfWeekBitmap> dayOfWeekforSequence = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
- DataModel::List<const Structs::ChargingTargetStruct::Type> chargingTargets;
+ DataModel::List<const Structs::ChargingTargetScheduleStruct::Type> chargingTargetSchedules;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
@@ -22174,8 +22202,7 @@
static constexpr CommandId GetCommandId() { return Commands::GetTargetsResponse::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- chip::BitMask<TargetDayOfWeekBitmap> dayOfWeekforSequence = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
- DataModel::DecodableList<Structs::ChargingTargetStruct::DecodableType> chargingTargets;
+ DataModel::DecodableList<Structs::ChargingTargetScheduleStruct::DecodableType> chargingTargetSchedules;
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace GetTargetsResponse
@@ -22311,8 +22338,7 @@
namespace SetTargets {
enum class Fields : uint8_t
{
- kDayOfWeekforSequence = 0,
- kChargingTargets = 1,
+ kChargingTargetSchedules = 0,
};
struct Type
@@ -22322,8 +22348,7 @@
static constexpr CommandId GetCommandId() { return Commands::SetTargets::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- chip::BitMask<TargetDayOfWeekBitmap> dayOfWeekforSequence = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
- DataModel::List<const Structs::ChargingTargetStruct::Type> chargingTargets;
+ DataModel::List<const Structs::ChargingTargetScheduleStruct::Type> chargingTargetSchedules;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
@@ -22338,15 +22363,13 @@
static constexpr CommandId GetCommandId() { return Commands::SetTargets::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- chip::BitMask<TargetDayOfWeekBitmap> dayOfWeekforSequence = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
- DataModel::DecodableList<Structs::ChargingTargetStruct::DecodableType> chargingTargets;
+ DataModel::DecodableList<Structs::ChargingTargetScheduleStruct::DecodableType> chargingTargetSchedules;
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace SetTargets
namespace GetTargets {
enum class Fields : uint8_t
{
- kDaysToReturn = 0,
};
struct Type
@@ -22356,8 +22379,6 @@
static constexpr CommandId GetCommandId() { return Commands::GetTargets::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- chip::BitMask<TargetDayOfWeekBitmap> daysToReturn = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
-
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType;
@@ -22371,7 +22392,6 @@
static constexpr CommandId GetCommandId() { return Commands::GetTargets::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- chip::BitMask<TargetDayOfWeekBitmap> daysToReturn = static_cast<chip::BitMask<TargetDayOfWeekBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace GetTargets
@@ -22539,30 +22559,6 @@
static constexpr bool MustUseTimedWrite() { return false; }
};
} // namespace RandomizationDelayWindow
-namespace NumberOfWeeklyTargets {
-struct TypeInfo
-{
- using Type = uint8_t;
- using DecodableType = uint8_t;
- using DecodableArgType = uint8_t;
-
- static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfWeeklyTargets::Id; }
- static constexpr bool MustUseTimedWrite() { return false; }
-};
-} // namespace NumberOfWeeklyTargets
-namespace NumberOfDailyTargets {
-struct TypeInfo
-{
- using Type = uint8_t;
- using DecodableType = uint8_t;
- using DecodableArgType = uint8_t;
-
- static constexpr ClusterId GetClusterId() { return Clusters::EnergyEvse::Id; }
- static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfDailyTargets::Id; }
- static constexpr bool MustUseTimedWrite() { return false; }
-};
-} // namespace NumberOfDailyTargets
namespace NextChargeStartTime {
struct TypeInfo
{
@@ -22766,8 +22762,6 @@
Attributes::MaximumDischargeCurrent::TypeInfo::DecodableType maximumDischargeCurrent = static_cast<int64_t>(0);
Attributes::UserMaximumChargeCurrent::TypeInfo::DecodableType userMaximumChargeCurrent = static_cast<int64_t>(0);
Attributes::RandomizationDelayWindow::TypeInfo::DecodableType randomizationDelayWindow = static_cast<uint32_t>(0);
- Attributes::NumberOfWeeklyTargets::TypeInfo::DecodableType numberOfWeeklyTargets = static_cast<uint8_t>(0);
- Attributes::NumberOfDailyTargets::TypeInfo::DecodableType numberOfDailyTargets = static_cast<uint8_t>(0);
Attributes::NextChargeStartTime::TypeInfo::DecodableType nextChargeStartTime;
Attributes::NextChargeTargetTime::TypeInfo::DecodableType nextChargeTargetTime;
Attributes::NextChargeRequiredEnergy::TypeInfo::DecodableType nextChargeRequiredEnergy;
diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
index 6278537..f2ce8f9 100644
--- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
+++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h
@@ -3886,14 +3886,6 @@
static constexpr AttributeId Id = 0x0000000A;
} // namespace RandomizationDelayWindow
-namespace NumberOfWeeklyTargets {
-static constexpr AttributeId Id = 0x00000021;
-} // namespace NumberOfWeeklyTargets
-
-namespace NumberOfDailyTargets {
-static constexpr AttributeId Id = 0x00000022;
-} // namespace NumberOfDailyTargets
-
namespace NextChargeStartTime {
static constexpr AttributeId Id = 0x00000023;
} // namespace NextChargeStartTime
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index df30640..12c9198 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -7217,8 +7217,6 @@
| * MaximumDischargeCurrent | 0x0008 |
| * UserMaximumChargeCurrent | 0x0009 |
| * RandomizationDelayWindow | 0x000A |
-| * NumberOfWeeklyTargets | 0x0021 |
-| * NumberOfDailyTargets | 0x0022 |
| * NextChargeStartTime | 0x0023 |
| * NextChargeTargetTime | 0x0024 |
| * NextChargeRequiredEnergy | 0x0025 |
@@ -7405,10 +7403,9 @@
{
public:
EnergyEvseSetTargets(CredentialIssuerCommands * credsIssuerConfig) :
- ClusterCommand("set-targets", credsIssuerConfig), mComplex_ChargingTargets(&mRequest.chargingTargets)
+ ClusterCommand("set-targets", credsIssuerConfig), mComplex_ChargingTargetSchedules(&mRequest.chargingTargetSchedules)
{
- AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence);
- AddArgument("ChargingTargets", &mComplex_ChargingTargets);
+ AddArgument("ChargingTargetSchedules", &mComplex_ChargingTargetSchedules);
ClusterCommand::AddArguments();
}
@@ -7435,8 +7432,9 @@
private:
chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest;
- TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::Type>>
- mComplex_ChargingTargets;
+ TypedComplexArgument<
+ chip::app::DataModel::List<const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type>>
+ mComplex_ChargingTargetSchedules;
};
/*
@@ -7447,7 +7445,6 @@
public:
EnergyEvseGetTargets(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-targets", credsIssuerConfig)
{
- AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn);
ClusterCommand::AddArguments();
}
@@ -20253,11 +20250,9 @@
make_unique<ReadAttribute>(Id, "user-maximum-charge-current", Attributes::UserMaximumChargeCurrent::Id,
credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "randomization-delay-window", Attributes::RandomizationDelayWindow::Id,
- credsIssuerConfig), //
- make_unique<ReadAttribute>(Id, "number-of-weekly-targets", Attributes::NumberOfWeeklyTargets::Id, credsIssuerConfig), //
- make_unique<ReadAttribute>(Id, "number-of-daily-targets", Attributes::NumberOfDailyTargets::Id, credsIssuerConfig), //
- make_unique<ReadAttribute>(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), //
- make_unique<ReadAttribute>(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), //
+ credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), //
+ make_unique<ReadAttribute>(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "next-charge-required-energy", Attributes::NextChargeRequiredEnergy::Id,
credsIssuerConfig), //
make_unique<ReadAttribute>(Id, "next-charge-target-so-c", Attributes::NextChargeTargetSoC::Id, credsIssuerConfig), //
@@ -20305,10 +20300,6 @@
make_unique<WriteAttribute<uint32_t>>(Id, "randomization-delay-window", 0, UINT32_MAX,
Attributes::RandomizationDelayWindow::Id, WriteCommandType::kWrite,
credsIssuerConfig), //
- make_unique<WriteAttribute<uint8_t>>(Id, "number-of-weekly-targets", 0, UINT8_MAX, Attributes::NumberOfWeeklyTargets::Id,
- WriteCommandType::kForceWrite, credsIssuerConfig), //
- make_unique<WriteAttribute<uint8_t>>(Id, "number-of-daily-targets", 0, UINT8_MAX, Attributes::NumberOfDailyTargets::Id,
- WriteCommandType::kForceWrite, credsIssuerConfig), //
make_unique<WriteAttribute<chip::app::DataModel::Nullable<uint32_t>>>(Id, "next-charge-start-time", 0, UINT32_MAX,
Attributes::NextChargeStartTime::Id,
WriteCommandType::kForceWrite, credsIssuerConfig), //
@@ -20371,10 +20362,7 @@
make_unique<SubscribeAttribute>(Id, "user-maximum-charge-current", Attributes::UserMaximumChargeCurrent::Id,
credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "randomization-delay-window", Attributes::RandomizationDelayWindow::Id,
- credsIssuerConfig), //
- make_unique<SubscribeAttribute>(Id, "number-of-weekly-targets", Attributes::NumberOfWeeklyTargets::Id,
credsIssuerConfig), //
- make_unique<SubscribeAttribute>(Id, "number-of-daily-targets", Attributes::NumberOfDailyTargets::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "next-charge-start-time", Attributes::NextChargeStartTime::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "next-charge-target-time", Attributes::NextChargeTargetTime::Id, credsIssuerConfig), //
make_unique<SubscribeAttribute>(Id, "next-charge-required-energy", Attributes::NextChargeRequiredEnergy::Id,
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
index a408c65..2d016ac 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
@@ -3252,6 +3252,39 @@
}
CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChargingTargetScheduleStruct.dayOfWeekForSequence",
+ "dayOfWeekForSequence", value.isMember("dayOfWeekForSequence")));
+ ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ChargingTargetScheduleStruct.chargingTargets", "chargingTargets",
+ value.isMember("chargingTargets")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayOfWeekForSequence");
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::Setup(labelWithMember, request.dayOfWeekForSequence, value["dayOfWeekForSequence"]));
+ valueCopy.removeMember("dayOfWeekForSequence");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "chargingTargets");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.chargingTargets, value["chargingTargets"]));
+ valueCopy.removeMember("chargingTargets");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.dayOfWeekForSequence);
+ ComplexArgumentParser::Finalize(request.chargingTargets);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::Type & request,
Json::Value & value)
{
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
index 3af522e..a05d064 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
@@ -378,6 +378,11 @@
static void Finalize(chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::Type & request,
Json::Value & value);
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
index d38c78e..4026dc9 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -2891,6 +2891,32 @@
return CHIP_NO_ERROR;
}
+CHIP_ERROR
+DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
+ {
+ CHIP_ERROR err = LogValue("DayOfWeekForSequence", indent + 1, value.dayOfWeekForSequence);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayOfWeekForSequence'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("ChargingTargets", indent + 1, value.chargingTargets);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ChargingTargets'");
+ return err;
+ }
+ }
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
const chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::DecodableType & value)
{
@@ -7228,8 +7254,7 @@
const EnergyEvse::Commands::GetTargetsResponse::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
- ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekforSequence", indent + 1, value.dayOfWeekforSequence));
- ReturnErrorOnFailure(DataModelLogger::LogValue("chargingTargets", indent + 1, value.chargingTargets));
+ ReturnErrorOnFailure(DataModelLogger::LogValue("chargingTargetSchedules", indent + 1, value.chargingTargetSchedules));
DataModelLogger::LogString(indent, "}");
return CHIP_NO_ERROR;
}
@@ -12347,16 +12372,6 @@
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
return DataModelLogger::LogValue("RandomizationDelayWindow", 1, value);
}
- case EnergyEvse::Attributes::NumberOfWeeklyTargets::Id: {
- uint8_t value;
- ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
- return DataModelLogger::LogValue("NumberOfWeeklyTargets", 1, value);
- }
- case EnergyEvse::Attributes::NumberOfDailyTargets::Id: {
- uint8_t value;
- ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
- return DataModelLogger::LogValue("NumberOfDailyTargets", 1, value);
- }
case EnergyEvse::Attributes::NextChargeStartTime::Id: {
chip::app::DataModel::Nullable<uint32_t> value;
ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value));
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
index 559b6e7..434ee6e 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -239,6 +239,9 @@
const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index 6747149..85d892b 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -81217,8 +81217,6 @@
| * MaximumDischargeCurrent | 0x0008 |
| * UserMaximumChargeCurrent | 0x0009 |
| * RandomizationDelayWindow | 0x000A |
-| * NumberOfWeeklyTargets | 0x0021 |
-| * NumberOfDailyTargets | 0x0022 |
| * NextChargeStartTime | 0x0023 |
| * NextChargeTargetTime | 0x0024 |
| * NextChargeRequiredEnergy | 0x0025 |
@@ -81479,13 +81477,10 @@
public:
EnergyEvseSetTargets()
: ClusterCommand("set-targets")
- , mComplex_ChargingTargets(&mRequest.chargingTargets)
+ , mComplex_ChargingTargetSchedules(&mRequest.chargingTargetSchedules)
{
#if MTR_ENABLE_PROVISIONAL
- AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence);
-#endif // MTR_ENABLE_PROVISIONAL
-#if MTR_ENABLE_PROVISIONAL
- AddArgument("ChargingTargets", &mComplex_ChargingTargets);
+ AddArgument("ChargingTargetSchedules", &mComplex_ChargingTargetSchedules);
#endif // MTR_ENABLE_PROVISIONAL
ClusterCommand::AddArguments();
}
@@ -81502,28 +81497,35 @@
__auto_type * params = [[MTREnergyEVSEClusterSetTargetsParams alloc] init];
params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
#if MTR_ENABLE_PROVISIONAL
- params.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekforSequence.Raw()];
-#endif // MTR_ENABLE_PROVISIONAL
-#if MTR_ENABLE_PROVISIONAL
{ // Scope for our temporary variables
auto * array_0 = [NSMutableArray new];
- for (auto & entry_0 : mRequest.chargingTargets) {
- MTREnergyEVSEClusterChargingTargetStruct * newElement_0;
- newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new];
- newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight];
- if (entry_0.targetSoC.HasValue()) {
- newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()];
- } else {
- newElement_0.targetSoC = nil;
- }
- if (entry_0.addedEnergy.HasValue()) {
- newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()];
- } else {
- newElement_0.addedEnergy = nil;
+ for (auto & entry_0 : mRequest.chargingTargetSchedules) {
+ MTREnergyEVSEClusterChargingTargetScheduleStruct * newElement_0;
+ newElement_0 = [MTREnergyEVSEClusterChargingTargetScheduleStruct new];
+ newElement_0.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:entry_0.dayOfWeekForSequence.Raw()];
+ { // Scope for our temporary variables
+ auto * array_2 = [NSMutableArray new];
+ for (auto & entry_2 : entry_0.chargingTargets) {
+ MTREnergyEVSEClusterChargingTargetStruct * newElement_2;
+ newElement_2 = [MTREnergyEVSEClusterChargingTargetStruct new];
+ newElement_2.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_2.targetTimeMinutesPastMidnight];
+ if (entry_2.targetSoC.HasValue()) {
+ newElement_2.targetSoC = [NSNumber numberWithUnsignedChar:entry_2.targetSoC.Value()];
+ } else {
+ newElement_2.targetSoC = nil;
+ }
+ if (entry_2.addedEnergy.HasValue()) {
+ newElement_2.addedEnergy = [NSNumber numberWithLongLong:entry_2.addedEnergy.Value()];
+ } else {
+ newElement_2.addedEnergy = nil;
+ }
+ [array_2 addObject:newElement_2];
+ }
+ newElement_0.chargingTargets = array_2;
}
[array_0 addObject:newElement_0];
}
- params.chargingTargets = array_0;
+ params.chargingTargetSchedules = array_0;
}
#endif // MTR_ENABLE_PROVISIONAL
uint16_t repeatCount = mRepeatCount.ValueOr(1);
@@ -81547,7 +81549,7 @@
private:
chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type mRequest;
- TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::Type>> mComplex_ChargingTargets;
+ TypedComplexArgument<chip::app::DataModel::List<const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetScheduleStruct::Type>> mComplex_ChargingTargetSchedules;
};
#endif // MTR_ENABLE_PROVISIONAL
@@ -81560,9 +81562,6 @@
EnergyEvseGetTargets()
: ClusterCommand("get-targets")
{
-#if MTR_ENABLE_PROVISIONAL
- AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn);
-#endif // MTR_ENABLE_PROVISIONAL
ClusterCommand::AddArguments();
}
@@ -81577,9 +81576,6 @@
__auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
__auto_type * params = [[MTREnergyEVSEClusterGetTargetsParams alloc] init];
params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
-#if MTR_ENABLE_PROVISIONAL
- params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()];
-#endif // MTR_ENABLE_PROVISIONAL
uint16_t repeatCount = mRepeatCount.ValueOr(1);
uint16_t __block responsesNeeded = repeatCount;
while (repeatCount--) {
@@ -81606,7 +81602,6 @@
}
private:
- chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type mRequest;
};
#endif // MTR_ENABLE_PROVISIONAL
@@ -82677,176 +82672,6 @@
#if MTR_ENABLE_PROVISIONAL
/*
- * Attribute NumberOfWeeklyTargets
- */
-class ReadEnergyEvseNumberOfWeeklyTargets : public ReadAttribute {
-public:
- ReadEnergyEvseNumberOfWeeklyTargets()
- : ReadAttribute("number-of-weekly-targets")
- {
- }
-
- ~ReadEnergyEvseNumberOfWeeklyTargets()
- {
- }
-
- CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
- {
- constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id;
- constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfWeeklyTargets::Id;
-
- ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
-
- dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
- __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
- [cluster readAttributeNumberOfWeeklyTargetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
- NSLog(@"EnergyEVSE.NumberOfWeeklyTargets response %@", [value description]);
- if (error == nil) {
- RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
- } else {
- LogNSError("EnergyEVSE NumberOfWeeklyTargets read Error", error);
- RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
- }
- SetCommandExitStatus(error);
- }];
- return CHIP_NO_ERROR;
- }
-};
-
-class SubscribeAttributeEnergyEvseNumberOfWeeklyTargets : public SubscribeAttribute {
-public:
- SubscribeAttributeEnergyEvseNumberOfWeeklyTargets()
- : SubscribeAttribute("number-of-weekly-targets")
- {
- }
-
- ~SubscribeAttributeEnergyEvseNumberOfWeeklyTargets()
- {
- }
-
- CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
- {
- constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id;
- constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfWeeklyTargets::Id;
-
- ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
- dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
- __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
- __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
- if (mKeepSubscriptions.HasValue()) {
- params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
- }
- if (mFabricFiltered.HasValue()) {
- params.filterByFabric = mFabricFiltered.Value();
- }
- if (mAutoResubscribe.HasValue()) {
- params.resubscribeAutomatically = mAutoResubscribe.Value();
- }
- [cluster subscribeAttributeNumberOfWeeklyTargetsWithParams:params
- subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
- reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
- NSLog(@"EnergyEVSE.NumberOfWeeklyTargets response %@", [value description]);
- if (error == nil) {
- RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
- } else {
- RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
- }
- SetCommandExitStatus(error);
- }];
-
- return CHIP_NO_ERROR;
- }
-};
-
-#endif // MTR_ENABLE_PROVISIONAL
-#if MTR_ENABLE_PROVISIONAL
-
-/*
- * Attribute NumberOfDailyTargets
- */
-class ReadEnergyEvseNumberOfDailyTargets : public ReadAttribute {
-public:
- ReadEnergyEvseNumberOfDailyTargets()
- : ReadAttribute("number-of-daily-targets")
- {
- }
-
- ~ReadEnergyEvseNumberOfDailyTargets()
- {
- }
-
- CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
- {
- constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id;
- constexpr chip::AttributeId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfDailyTargets::Id;
-
- ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId);
-
- dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
- __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
- [cluster readAttributeNumberOfDailyTargetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) {
- NSLog(@"EnergyEVSE.NumberOfDailyTargets response %@", [value description]);
- if (error == nil) {
- RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
- } else {
- LogNSError("EnergyEVSE NumberOfDailyTargets read Error", error);
- RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
- }
- SetCommandExitStatus(error);
- }];
- return CHIP_NO_ERROR;
- }
-};
-
-class SubscribeAttributeEnergyEvseNumberOfDailyTargets : public SubscribeAttribute {
-public:
- SubscribeAttributeEnergyEvseNumberOfDailyTargets()
- : SubscribeAttribute("number-of-daily-targets")
- {
- }
-
- ~SubscribeAttributeEnergyEvseNumberOfDailyTargets()
- {
- }
-
- CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override
- {
- constexpr chip::ClusterId clusterId = chip::app::Clusters::EnergyEvse::Id;
- constexpr chip::CommandId attributeId = chip::app::Clusters::EnergyEvse::Attributes::NumberOfDailyTargets::Id;
-
- ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId);
- dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL);
- __auto_type * cluster = [[MTRBaseClusterEnergyEVSE alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
- __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)];
- if (mKeepSubscriptions.HasValue()) {
- params.replaceExistingSubscriptions = !mKeepSubscriptions.Value();
- }
- if (mFabricFiltered.HasValue()) {
- params.filterByFabric = mFabricFiltered.Value();
- }
- if (mAutoResubscribe.HasValue()) {
- params.resubscribeAutomatically = mAutoResubscribe.Value();
- }
- [cluster subscribeAttributeNumberOfDailyTargetsWithParams:params
- subscriptionEstablished:^() { mSubscriptionEstablished = YES; }
- reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) {
- NSLog(@"EnergyEVSE.NumberOfDailyTargets response %@", [value description]);
- if (error == nil) {
- RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value);
- } else {
- RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error);
- }
- SetCommandExitStatus(error);
- }];
-
- return CHIP_NO_ERROR;
- }
-};
-
-#endif // MTR_ENABLE_PROVISIONAL
-#if MTR_ENABLE_PROVISIONAL
-
-/*
* Attribute NextChargeStartTime
*/
class ReadEnergyEvseNextChargeStartTime : public ReadAttribute {
@@ -181653,14 +181478,6 @@
make_unique<SubscribeAttributeEnergyEvseRandomizationDelayWindow>(), //
#endif // MTR_ENABLE_PROVISIONAL
#if MTR_ENABLE_PROVISIONAL
- make_unique<ReadEnergyEvseNumberOfWeeklyTargets>(), //
- make_unique<SubscribeAttributeEnergyEvseNumberOfWeeklyTargets>(), //
-#endif // MTR_ENABLE_PROVISIONAL
-#if MTR_ENABLE_PROVISIONAL
- make_unique<ReadEnergyEvseNumberOfDailyTargets>(), //
- make_unique<SubscribeAttributeEnergyEvseNumberOfDailyTargets>(), //
-#endif // MTR_ENABLE_PROVISIONAL
-#if MTR_ENABLE_PROVISIONAL
make_unique<ReadEnergyEvseNextChargeStartTime>(), //
make_unique<SubscribeAttributeEnergyEvseNextChargeStartTime>(), //
#endif // MTR_ENABLE_PROVISIONAL