Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mode base sdk implementation (#27504)
* Added first draft of the ModeBase SDK implementation. * Fixed build files and mode base source files from mode select references. * Fixed final errors. * Removed global accessor functions in place instance attributes. * Renamed internal members to mX. Replaced the use the zap Feature map with and internally managed variable. * Added Command Types and DecodableTypes to the SDK implementation to bypass the limitations of the the current zap generation. * Added ModeBase attributes to the list of attributeAccessInterfaceAttributes to ensure that not RAM memory is allocated for these attibutes. * Merged the mode base delegate into the mode base instance due to attribute accessability following management of attributes by the mode base instance. * Added documentation and readme for the ModeBase alias. * Added the dishwasher mode cluster to the all-clusters-app example. * Added the laundry washer mode cluster to the all-clusters-app example. * Added the refrigerator and temperature controlled cabinet mode cluster to the all-clusters-app example. * Renamed the mode base alias all-clusters-app examples to the correct naming. * Implemented interaction between the ModeBase and OnOff servers. Added ModeBase attribute type infos. Updated documentation. * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Fixed copy paste issues in the mode base cluster objects. * Moved the ModeBaseAliasesInstanceMap into the ModeBase namespace and added a getter for it. * Moved OnOff server common behavior in a top-level anonymous namespace method. * Apply suggestions from code review Accepted readme suggestions. Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> * Renamed the readme * Added doc to ModeBase instance init. Removed the use of using in made-base-server.h * Added validity checking when updating attributes. * Made ModeBase functions that are required to be implemented by the user pure virtural. * Renamed constants according to the convention. * Made persistant attributes persistant. Experimented with helper accessor functions for persistent attributes. * Fixed code after merge * Regenerats all-clusters-app.matter after merge * Restyled by clang-format * Restyled by prettier-markdown * Simplified IsSupportedMode to make it more readable. * Removed the use of using from header files. * Removed the use of using from mode-base-server.h. * Enabled UpdateModeBaseCurrentModeToOnMode only when the ModeBase plugin is enabled. * Restyled by clang-format * In the OnOff server, include mode-base only when the ModeBase plugin is enabled. * Fixed AliasedCluster's type * Changed to calling of Update sttribute functions when loading persistent attributes on init. * Moved the ChangeToModeResponse command from the accepted commands to the generated commands list. * Renamed isAliasedCluster to isDerivedCluster. * Refactored the supported modes encoding to make the Read switch statement more readable. * Fixed typos in the ModeBase readme. Co-authored-by: Boris Zbarsky <[email protected]> * Simplified the encoding function and some comments. * Fixed var naming and GetModeLabelByIndex return. * Fixed incorrect version number in some ModeBase derived clusters. * Made mode base derived cluster code more readble with using * Removed unneccissary namespace paths. * Removed unneccissary size checking. * Refactored GetModeTagsByIndex to make it more readable. * Added new StatusCode. * Used chip::CharSpan::fromCharString to avoid setting the length. * Added missing function nampspace. * Made the mode-base-cluster-objects.h more readable by removing unneccessery namespace specifications. * Made the mode-base-cluster-objects.h more readable by simplifying the DecodableArgType definition. * Removed redundant processing in the Read function. * Added cluster constants to make the code more readabel. * Changed attribute write errors. * Added attribute getters and setters documentaton. * Added FeatureMap to the list of attributeAccessInterfaceAttributes. * Used std::set instead of std::map to hold the ModeBase Instances. * Removed the BuildModeOptionStruct helper function to avoid giving incorroct expectations to the SDK consumers. * Changed the Delegate's API to remove the need for the GetNumberOfModes method. * Changed checks for essetion setup in the ModeBase init to VerifyOrDie. * Moved the setting of the CurrentMode based on the StartUpMode, OnMode and OnOff cluster values to the ModeBase init function. Added some TODOs from the reviews. * Added documentation about the required lifetime of the ModeBase Instance object. * Refoctored ModeBase to separate out the Delegate functionality into a separate class. * Added generated code after merge * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Added ModeBase to the spellcheck. Allowed the use of set in mode-base-server.h * Removed the ModeBase constraint that the cluster ID given should be of an actual ModeBase derived cluster. * Changed the ModeBase derived cluster's instatiation in the all-clusters-app to make it easier to include for all platforms. * Defined EMBER_AF_PLUGIN_MODE_BASE for the linux all-clustres-app to enable OfOff cluster related code. * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-markdown * Fixed the lock app gni argument chip_project_config_include_dirs as it was pointing to the all-clusters-app's include dir. * Fixed ModeBase derived clusters version numbers in zap. * Apply suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]> * Updated the Mode Base readme afther review. * Removed ModeBase from the .github/.wordlist.txt Co-authored-by: Boris Zbarsky <[email protected]> * Unregister the AttributeAccessOverride when deconstructing a Mode Base instance. * Added // nogncheck to the Mode Base includes in the OnOff server code. * Updated Mode Base function documentatio. * Added read case for the Feature Map. * Restyled by clang-format * Restyled by prettier-markdown * used the feature map's enum instead of a literal number in the Mode Bease examples. * Restyled by clang-format * Fixed return bug in the Mode Base RVC examples. * Update .github/workflows/build.yaml Co-authored-by: Boris Zbarsky <[email protected]> * Fixed attribute get issue in the Mode Base RVC example. Co-authored-by: Petru Lauric <[email protected]> * Checkedout out-of-sync third-party repos to match what is on master. * Restyled by clang-format --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Tennessee Carmel-Veilleux <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Petru Lauric <[email protected]>
- Loading branch information