-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Resource Monitoring Cluster Implementation #27798
Merged
mergify
merged 159 commits into
project-chip:master
from
tobiasgraf:add-replaceable-monitoring-cluster-implemenation
Jul 20, 2023
Merged
Add Resource Monitoring Cluster Implementation #27798
mergify
merged 159 commits into
project-chip:master
from
tobiasgraf:add-replaceable-monitoring-cluster-implemenation
Jul 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eMonitoring defines - using `using` - and adding by hand
…nitoringDelegate.cpp
Add cluster-objects.h / cpp instead of defining it inside the server.h / cpp
- have External Attribute Storage inside Instances - implement getters and Setters for Attributes
- also clean up some namespaces
Also add basic OnResetCondition implementation.
…e to take the required attribute information directly rather than as a EmberAfAttributeMetadata structure.
Regenerated Code
…ing of uint8 and nullable uint8
Regenerated Code
…nation # Conflicts: # src/app/zap-templates/zcl/zcl-with-test-extensions.json # src/app/zap-templates/zcl/zcl.json # zzz_generated/app-common/app-common/zap-generated/callback.h
…r-definition' into add-replaceable-monitoring-cluster-implemenation # Conflicts: # zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp # zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
… work for all uint types.
Co-authored-by: Cliff Chung <[email protected]>
Co-authored-by: Cliff Chung <[email protected]>
p0fi
approved these changes
Jul 19, 2023
…itoring-cluster-implemenation # Conflicts: # examples/all-clusters-app/linux/BUILD.gn
This reverts commit 34e6355.
…itoring-cluster-implemenation
…tivated Carbon Filter Monitoring
to avoid having to include multiple directories and source code from another example app.
mhazley
approved these changes
Jul 19, 2023
…itoring-cluster-implemenation # Conflicts: # src/app/tests/suites/certification/Test_TC_CFREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_CFREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_ESFREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_ESFREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_FTREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_FTREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_INKCREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_INKCREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_IONFREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_IONFREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_OZFREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_OZFREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_TCREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_TCREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_UVFREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_UVFREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_WTREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_WTREMON_2_1.yaml # src/app/tests/suites/certification/Test_TC_ZEOFREMON_1_1.yaml # src/app/tests/suites/certification/Test_TC_ZEOFREMON_2_1.yaml # zzz_generated/chip-tool/zap-generated/test/Commands.h
…itoring-cluster-implemenation # Conflicts: # examples/all-clusters-app/all-clusters-common/all-clusters-app.matter # examples/all-clusters-app/all-clusters-common/all-clusters-app.zap # zzz_generated/app-common/app-common/zap-generated/callback.h
erwinpan1
pushed a commit
to erwinpan1/connectedhomeip
that referenced
this pull request
Jul 21, 2023
* Add Basic Resource Monitoring Server Implementation * Add Basic Working Resource Monitoring Example App * Improve log output * Replace some HepafilterMonitoring specifics with more general ResourceMonitoring defines - using `using` - and adding by hand * Apply clang-format * More Hepa to ResourceMonitoring replacement * Add ActivatedCarbonFilterMonitoring Cluster * Rename ActivatedCarbonFilterMonitoring.cpp to ActivatedCarbonFilterMonitoringDelegate.cpp * Split delegate definitions into separate files * Cleanup some Headers * Rename member variables * Refactoring: Rename Delegate to Instance Add cluster-objects.h / cpp instead of defining it inside the server.h / cpp * Refactoring: Implement Read and Write function - have External Attribute Storage inside Instances - implement getters and Setters for Attributes * Refactoring: reorder methods to math the order in the .h file * Run Clang-Format * Add Getter for DegradationDirection Attribute - also clean up some namespaces * Add Construction Option To Set OnResetCondition To Supported Also add basic OnResetCondition implementation. * Add Default Values * Modified the AttributePersistenceProvider ReadValue function signiture to take the required attribute information directly rather than as a EmberAfAttributeMetadata structure. * Force External Storage for All Resource Monitoring Clusters * Force External Storage for All Resource Monitoring Clusters Regenerated Code * Expanded AttributePersistanceProvider API to include reading and wirting of uint8 and nullable uint8 * Add LastChangedTime to Attributes For ResourceMonitoring Clusters * Add LastChangedTime to Attributes For ResourceMonitoring Clusters Regenerated Code * Add `LastChangedTime` to Forced External Storage List For Resource Monitoring * Add LastChangedTime To Resource-Monitoring Server Implementation * Templated the AttributePersistanceProvider read and wiret function to work for all uint types. * Fixed AttributePersistanceProvider accepted types. Added read helper for type bool. * Restyled by clang-format * Formatting and some comments * Make OnResetCondition Pure Virtual And remove implementation from resource-monitor-server.cpp. It's not allowed to use the resource-monitoring-server::instance without deriving it yourself. * Set LastChangedTime In the OnResetCondition Handler * Fixed mismatched size return error of DefaultAttributePersistenceProvider * Add All Missing Aliased Clusters - CeramicFilterMonitoring - ElectrostaticFilterMonitoring - FuelTankMonitoring - InkCartridgeMonitoring - IonizingFilterMonitoring - OzoneFilterMonitoring - TonerCartridgeMonitoring - UvFilterMonitoring - WaterTankMonitoring - ZeoliteFilterMonitoring * Started work on tests for the AttributePersistenceProvider. * Add Missing Instances to resourceMonitoring Test App * Add Persistent Storage To LastChangedTime * Add README.md * Remove `ResourceMonitoringAliasesInstanceMap` as it wasn't really needed * Update Description Of Init() * Update Description of AppInit() and OnResetCondition() * Added unit tests for AttributePersistenceProvider testing the storage and retrival of all unsigned types and their nullable veriaties, bool and ByteSpan. Tested for small buffer errors. * Changed the type of aSize in ReadValue to size_t * Removed the dependancy on generated code in the AttributePersistencezprovider.h * Added static funtctions to get the KVS null representation for different types. * Fix Errors after Merge * Some Changes From Comments From The ModeBase PR * Added functions to read and write nullable bools and accompanying tests. * Incorporated boolean tests in the scalar test. * Added failure before init test * Restyled by clang-format * Move Headers To Resource-Monitoring-Common * Move Cpp files To resource-monitor-common * Remove All Unused Aliases For The Resource-Monitoring-Cluster this was decided in the AirQuality Call on 06.07.2023 * Fixed after merge. * Removed the failure on init test as it may have been causing seg faults in some tests. * Renamed GetNull -> GetNullValueForNullableType * Added the initialisation of valueReadBack and added a new templated function for nullable types to avoid the error: The left operand of '==' is a garbage value, on some platforms. * Added handline of signed ints and accompanying tests. * Added handline of nullable signed ints and accompanying tests. * Type cast null. * Restyled by clang-format * Changed shift bit to be af the same type are the return val. * Added tests got GetNull functions * Remove Aliased Clusters From Resource Monitoring Clusters except Hepa and ActivatedCarbon enable LastChangedTime for Hepa and ActivatedCarbon * Add Resource Monitoring Aliased Clusters Server implementation To Linux All-Clusters-App * Remove Todo * Remove Aliased Clusters From Resource Monitoring Clusters except Hepa and ActivatedCarbon * Remove Redundant Check apparently it's not necessary / allow to check this * Apply Restyled patch * Remove Tests For Removed Aliased Clusters - all except Hepa and ActivatedCarbon * Fix Spelling * Remove Unused / disallowed #include <maps> * Remove resource-monitoring-instances.h * Remove Unneeded Destructors * Use Default Descructor and Make Class Non copyable or moveable * Change IsAliascluster to IsValidAliasCluster * Fix Typo * Reset ChangeIndication Attribute On ResetCondition Command Spec requires this to be reset as well * Set FeatureMap To 3 For testing with Warning Feature enabled * Rename mFeature To mFeatureMap * Rewrite Some Comments From "function" to "method" * Remove Const * Update Comment Of Init() Method added the exact CHIP_ERROR_XXX that this can return. * Remove Commented Code * Added TODO For REP Feature * Change From "Next value" To "UINT8_MAX" * Use ChipLogDetail Instead Of ChipLogError * Fix Log on Some Platforms On some platforms (e.g. ASR) uint32_t seems to be a long and will produce a error if %u is used. So cast it to unsinged long on all platforms and use %lu. * Update README.md For Linux Resource-Monitoring-Example-App * Remove Aliased Clusters From Resource Monitoring Clusters except Hepa and ActivatedCarbon * Regen Code * Apply Restylerd Patch * Update Wordlist - Add HEPA * Remove PICS values For Resource Monitoring Clusters That Were Removed * Remove PICS For Resource Monitoring Clusters from PICS.yaml * Add Resource Monitoring README.md To docs/examples/index.md * Remove redundant chip::app:: prefixes * Use Bitset Instead Of Just a Number For FeatureMap * Remove Options from CHIPProjectAppConfig.h not needed or wrong * Remove network commissioning bits As of earlier today that's handled by AppInit. Which is good, because the bits here are buggy. * Make Hepa And ActivateCarbon Filter Monitoring Instances Static * Remove ClusterId From Specialized Hepa and Activated Carbon Construtors They should know their cluster ids, and now they do! * Add Getter for Endpoint * Remove Nonsense Comment * Remove Aliased Cluster IDs That Got Removed * Fix Typo * Simplify HandleResetCondition Method * Add Copyright * Sort out Includes Add what is needed using "include what you use" tool * Make Methods To Private and move private section to bottom instead of in between * Initialize All The Member Varaibles With Initializer List also updated the comment with the new parameters * Explicit Delete Move Constructors * Make More Methods To Private * Update Comment For OnResetCondition Command Handler * Add FeatureMap To Zcl*.json Files * Apply restyled Patch * Remove ResetCondtion::Type And Encode they are only needed for sending the command, it does not send the command. * Remove While Loop's Body is a very complicated no-op. Keep the while itself, it basically check if this is not malformed TLV * Move OnResetCondition Handling to Cluster Implementation - add PreResetCondition and PostResetCondition() methods to be overwritten fixes project-chip#27986 * Apply Restyled Patch * Fix Typo * Remove Init For Resource Monitoring Clusters From main-common.cpp And put it in resource-monitoring-helper.cpp. This will use the ClusterInitCallbacks to initialize the instance objects. This removes the need to have the init code in every example app, just include the helper.cpp file. * Apply Restyled Patch * Update examples/resource-monitoring-app/linux/src/main.cpp Co-authored-by: Cliff Chung <[email protected]> * Update examples/resource-monitoring-app/linux/src/main.cpp Co-authored-by: Cliff Chung <[email protected]> * Fix Some Typos * Disable Removed Test Cases * Apply Restylerd Patch * Apply Restyled Patch * Add Resource-Monitoring-Server To ESP32 All Clusters Example * Remove Test Scripts For Aliased Clusters * Revert "Disable Removed Test Cases" This reverts commit 34e6355. * Add VerifyOrDie() When More Than 1 EP gets Initialized For Hepa Or Activated Carbon Filter Monitoring * Add Resource-Monitoring Clusters To ESP32 Minimal App * Apply Restyled Patch * Move Resource-Monitoring Instances/Delegates To All-Clusters-Common to avoid having to include multiple directories and source code from another example app. * Apply Restyled Patch * Update Code Gen * Fix Zap After Merge + CodeGen --------- Co-authored-by: William Hicklin <[email protected]> Co-authored-by: William <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Cliff Chung <[email protected]> Co-authored-by: Cliff Chung <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📖 Description
This adds server implementation for the aliased resource-monitoring-cluster
HepaFilterMonitoring
andActivatedCarbonFilterMonitoring
.❗This depends on these PRs and should be merged after them ✅
LastChangedTime
to Resource Monitoring Cluster Definition #27603 ✅🔎 Details
This uses the alias concept, I tried to stay as close as possible to the mode-base implementation #27504 .
🧪 How Has This Been Tested
🔗 Links/References
Closes #27216
Closes #27986