Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of service area server (#33991)
* Add definitions for common HomeLocationStruct and types - see connectedhomeip-spec PR 8933 * Add definition for Service Area Cluster - see connectedhomeip-spec PR 8937 * Add semantic tag definitions needed for Service Area Cluster - see connectedhomeip-spec PR 8937 * Update Service Area Cluster definition of LocationInfoStruct - see connectedhomeip-spec PR 8937 * Rename SurfaceTag to FloorSurfaceTag - spec PR 8937 commit 431739b3e3996d0ef74a36b2a6b93ac0d3db9c45 * Fix Carport typo, remove IsGroundFloor field (spec change) * Update home location definitions per spec PR 8933 commit f04958166412d5b7eff4d3443273f47f12f22baf 2024-05-23 * update generated files * Update Service Area Cluster definitions per spec PR 8937 up to commit 6bf3762eb1ee733c642e79074744d1185b82a89c 2024-05-24 * update generated files * Initial implementations of service-area-cluster per spec PR 8937 up to commit 6bf3762eb1ee733c642e79074744d1185b82a89c 2024-05-24 * Regenerated zap files after merge. * Moved the AreaTypeTag namespace definition to namespaces.xml. * Moved the HomeLoc global struct into global-sturcts.xml. * Updated the AreaTypeTag namespace to match the latest spec definition. * Updated the AreaTypeTag namespace to match the latest spec definition. * Updated the matterlint rules with the changes in the xml files. * Reverted changes to the rvc zap file. * Addded global xml files to relevant lists of xmls. * Added the Position, Landmark and Floor Surface Namespaces. * Removed namespace tag definitions from the service area cluters XML. * Regenerated zap files. * Rewrite service-area-server and delegate to avoid disallowed c++ containers * Regenerated zap files. * Regenerated zap files. * Explicitly set the conformance. * Fixed typos in the service-area clusters XML from review. * Used a more feature rich method for defining the cluster's features. * Reordered data-type definitions to match the order in the spec. * Regenerated zap files. * Updated the service area type names following fixes to the XMLs. * Updated the rvc-example type names following fixes to the XMLs. * Simplified some of the logic in the service-area cluster objects. * Added an InEqual method to the LocationSturctureWrapper and simplified the Instance::IsUniqueSupportedLocation impl. * Removed the handle volotile methos as the delegate should be responsibel for updating these values as they change. * Apply editorial suggestions from code review. Includes a minor bug fix. Co-authored-by: Kiel Oleson <[email protected]> Co-authored-by: Petru Lauric <[email protected]> * Replaced Location Location in the logging text with Service Area. * Implemented some renaming and editorial changes from review. Moved some service area methods from public to private. * Added the ServicArea to the controller init.py * Moved the HandleSupportedLocationsUpdated method form the instance to the server. * Moved delegate implementations to the .cpp * Removed calling the HandleSupportedLocationsUpdate when adding a new supported location as the restrictions imposed on the SelectedLocations, CurrentLocation and Progress attributs are maintained. * Removed calling the HandleSupportedLocationsUpdate when adding a new supported map as the restrictions imposed on the SupprotedLocations attribut are maintained. * Renamed a delegate method and updated it's documentation. * Reverted a change to the darwin file for apple engineers to make. * Removed the optional cluster id prameter from the service area Instance constructor. * Removed unneeded check. * Added a way to get the Service Area instance from the delegate. Added a virtual Init method to the Service area delegate. * Moved the rvc service area delegate impl out of the rvc device class and into it's own class. * Comment chages to the service area delegate in the rvc example app. * Added github issue to a comment. * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by isort * zap regen after pull. * Updated the Service Area code documentation following a review comment. Move the IsProgressElement to the delegate and added a default implementation. * Restyled by whitespace * Restyled by clang-format * Renamed DoseNameMatch to IsNameEqual. * Replaced the multiple bool inputs of the IsEqual method with a BitMask. * Removed the use of ret_value to improve readability. * Removed redundant ; * Removed redundant use of the namespaces. * Moved the empty impl of MatterServiceAreaPluginServerInitCallback to util. * Simplified some method returns. * Updated a log level. * Removed extra logs while reading attributes. * Removed else after if return. * Fixed sizeof-array-decay warning. * Cast all std::vector.size() returns in the RVC service area delegate to uint32_t. The service area server limits the size of these lists to 255. * Change the way the Delegate and Instance classes are stopped from being copyabel. * Fixed a bug that was causing the clang-tidy CI test to seg fault. * Restyled by clang-format * Renamed namespaces.xml to semantic-tag-namespace-enums.xml. * Missed some rename locations. * Regenerated zap files after sync with upstream. * Fixed typos from review. * Fixed the termination of the Location and Map structure wrappers' name buffers. * - Replaced the use of `char *` with `MutableCharSpan`. - Removed the use of the VerifyOrExit macro. - Removed `IsSupportedMapChangeAllowed` check in the `AddSupportedMap` method as adding maps does not compromise any of the other attributes. * Restyled by clang-format * Refactored out the use of ret_value. * Removed an unused method in the rvc-app * Refactored rvc-app to use static casts. * Fixed missing ; * Restyled by clang-format * Rplaced the use of fromCharSpan with _span in the rvc-app. * Removed unneeded casting. * Removed unnecessary null terminations in the service area struct wrappers. * Fixed an error in the docs. * Restyled by clang-format * Moved the responsibility of checking for duplicates in the selected locations command attribute to the server. * Restyled by clang-format * Removed unneccessary memset. * Updated some docs. * Removed unneeded Raw() call. * Added attribute ID to reading log. * Removed the use of __func__ * Fixed incorrect command handling statuses. * Fixed some code documentation. * Fixed bug in handling of errorStatusTexts from the delegate. * Rnamed dummy vars as ignored. * Fixed the printing of map name. * Replaced use of Nullable<type> with NullNullable. * Added a log that was commented out. * Added non-list service area attributes to the list of attributeAccessInterfaceAttributes. * Fixed bug relateing to getting a null value. * Improved the readability of the logic for determining if a change to the service area's estimated end time attribute should be reported. * Do not report CurrentLocation change if it does not change. * Simplified logic returns Co-authored-by: Andrei Litvin <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-json * Changed the way the Commond Handler Interface is registered following the merge. * Made all delegate methods public. Removed the Instance class from being a friend of the Delegated class. * Restyled by clang-format * Reduced the socope of variabels to improve readability. * Regenerated zap files after sync with upstream. * Fixed name change of LocationDescriptorStruct * Restyled by clang-format * Added FeatureMap to the list of attributeAccessInterfaceAttributes. * Do not consider list of 0 as error. * Fixed attribute ID printing. * Apply suggestions from code review Co-authored-by: Boris Zbarsky <[email protected]> * Generated zap code after merge. * Fixed the logic of the ReportEstimatedEndTimeChange method. --------- Co-authored-by: [email protected] <[email protected]> Co-authored-by: Kiel Oleson <[email protected]> Co-authored-by: Petru Lauric <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
- Loading branch information