diff --git a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h index e170d2ffeb35ce..40f312ffb78c2f 100644 --- a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h @@ -35,39 +35,39 @@ class RvcServiceAreaDelegate : public Delegate { private: // containers for array attributes. - std::vector mSupportedLocations; + std::vector mSupportedAreas; std::vector mSupportedMaps; - std::vector mSelectedLocations; + std::vector mSelectedAreas; std::vector mProgressList; public: CHIP_ERROR Init() override; // command support - bool IsSetSelectedLocationsAllowed(MutableCharSpan statusText) override; + bool IsSetSelectedAreasAllowed(MutableCharSpan statusText) override; - bool IsValidSelectLocationsSet(const ServiceArea::Commands::SelectLocations::DecodableType & req, - ServiceArea::SelectLocationsStatus & locationStatus, MutableCharSpan statusText) override; + bool IsValidSelectAreasSet(const ServiceArea::Commands::SelectAreas::DecodableType & req, + ServiceArea::SelectAreasStatus & locationStatus, MutableCharSpan statusText) override; - bool HandleSkipCurrentLocation(MutableCharSpan skipStatusText) override; + bool HandleSkipCurrentArea(MutableCharSpan skipStatusText) override; //************************************************************************* // Supported Locations accessors - bool IsSupportedLocationsChangeAllowed() override; + bool IsSupportedAreasChangeAllowed() override; - uint32_t GetNumberOfSupportedLocations() override; + uint32_t GetNumberOfSupportedAreas() override; - bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::LocationStructureWrapper & supportedLocation) override; + bool GetSupportedLocationByIndex(uint32_t listIndex, ServiceArea::AreaStructureWrapper & supportedLocation) override; - bool GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, - ServiceArea::LocationStructureWrapper & supportedLocation) override; + bool GetSupportedLocationById(uint32_t aAreaId, uint32_t & listIndex, + ServiceArea::AreaStructureWrapper & supportedLocation) override; - bool AddSupportedLocation(const ServiceArea::LocationStructureWrapper & newLocation, uint32_t & listIndex) override; + bool AddSupportedLocation(const ServiceArea::AreaStructureWrapper & newArea, uint32_t & listIndex) override; - bool ModifySupportedLocation(uint32_t listIndex, const ServiceArea::LocationStructureWrapper & modifiedLocation) override; + bool ModifySupportedLocation(uint32_t listIndex, const ServiceArea::AreaStructureWrapper & modifiedLocation) override; - bool ClearSupportedLocations() override; + bool ClearSupportedAreas() override; //************************************************************************* // Supported Maps accessors @@ -89,15 +89,15 @@ class RvcServiceAreaDelegate : public Delegate //************************************************************************* // Selected Locations accessors - uint32_t GetNumberOfSelectedLocations() override; + uint32_t GetNumberOfSelectedAreas() override; bool GetSelectedLocationByIndex(uint32_t listIndex, uint32_t & selectedLocation) override; // IsSelectedLocation() no override - bool AddSelectedLocation(uint32_t aLocationId, uint32_t & listIndex) override; + bool AddSelectedLocation(uint32_t aAreaId, uint32_t & listIndex) override; - bool ClearSelectedLocations() override; + bool ClearSelectedAreas() override; //************************************************************************* // Progress accessors @@ -106,7 +106,7 @@ class RvcServiceAreaDelegate : public Delegate bool GetProgressElementByIndex(uint32_t listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override; - bool GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, + bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, ServiceArea::Structs::ProgressStruct::Type & aProgressElement) override; bool AddProgressElement(const ServiceArea::Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) override; diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 56eebaae7cded7..7983c155e279e6 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1421,17 +1421,17 @@ provisional cluster ServiceArea = 336 { kCompleted = 3; } - enum SelectLocationsStatus : enum8 { + enum SelectAreasStatus : enum8 { kSuccess = 0; - kUnsupportedLocation = 1; - kDuplicatedLocations = 2; + kUnsupportedArea = 1; + kDuplicatedAreas = 2; kInvalidInMode = 3; kInvalidSet = 4; } - enum SkipCurrentLocationStatus : enum8 { + enum SkipAreaStatus : enum8 { kSuccess = 0; - kInvalidLocationList = 1; + kInvalidAreaList = 1; kInvalidInMode = 2; } @@ -1440,17 +1440,17 @@ provisional cluster ServiceArea = 336 { kSelectWhileRunning = 0x2; } - struct LocationInfoStruct { + struct AreaInfoStruct { nullable LocationDescriptorStruct locationInfo = 0; nullable LandmarkTag landmarkTag = 1; nullable PositionTag positionTag = 2; nullable FloorSurfaceTag surfaceTag = 3; } - struct LocationStruct { - int32u locationID = 0; + struct AreaStruct { + int32u areaID = 0; nullable int8u mapID = 1; - LocationInfoStruct locationInfo = 2; + AreaInfoStruct areaDesc = 2; } struct MapStruct { @@ -1459,16 +1459,16 @@ provisional cluster ServiceArea = 336 { } struct ProgressStruct { - int32u locationID = 0; + int32u areaID = 0; OperationalStatusEnum status = 1; optional nullable elapsed_s totalOperationalTime = 2; optional nullable elapsed_s estimatedTime = 3; } - readonly attribute LocationStruct supportedLocations[] = 0; + readonly attribute AreaStruct supportedAreas[] = 0; readonly attribute nullable MapStruct supportedMaps[] = 1; - readonly attribute nullable int32u selectedLocations[] = 2; - readonly attribute optional nullable int32u currentLocation = 3; + readonly attribute nullable int32u selectedAreas[] = 2; + readonly attribute optional nullable int32u currentArea = 3; readonly attribute optional nullable epoch_s estimatedEndTime = 4; readonly attribute optional nullable ProgressStruct progress[] = 5; readonly attribute command_id generatedCommandList[] = 65528; @@ -1478,24 +1478,24 @@ provisional cluster ServiceArea = 336 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct SelectLocationsRequest { - nullable int32u newLocations[] = 0; + request struct SelectAreasRequest { + nullable int32u newAreas[] = 0; } - response struct SelectLocationsResponse = 1 { - SelectLocationsStatus status = 0; + response struct SelectAreasResponse = 1 { + SelectAreasStatus status = 0; optional char_string<256> statusText = 1; } - response struct SkipCurrentLocationResponse = 3 { - SkipCurrentLocationStatus status = 0; + response struct SkipAreaResponse = 3 { + SkipAreaStatus status = 0; optional char_string<256> statusText = 1; } - /** Command used to select a set of device locations, where the device is to operate */ - command SelectLocations(SelectLocationsRequest): SelectLocationsResponse = 0; - /** This command is used to skip the current location where the device operates. */ - command SkipCurrentLocation(): SkipCurrentLocationResponse = 2; + /** Command used to select a set of device areas, where the device is to operate. */ + command SelectAreas(SelectAreasRequest): SelectAreasResponse = 0; + /** This command is used to skip an area where the device operates. */ + command SkipArea(): SkipAreaResponse = 2; } endpoint 0 { @@ -1755,10 +1755,10 @@ endpoint 1 { } server cluster ServiceArea { - callback attribute supportedLocations; + callback attribute supportedAreas; callback attribute supportedMaps; - callback attribute selectedLocations; - callback attribute currentLocation; + callback attribute selectedAreas; + callback attribute currentArea; callback attribute estimatedEndTime; callback attribute progress; callback attribute generatedCommandList; @@ -1768,10 +1768,10 @@ endpoint 1 { callback attribute featureMap; ram attribute clusterRevision default = 1; - handle command SelectLocations; - handle command SelectLocationsResponse; - handle command SkipCurrentLocation; - handle command SkipCurrentLocationResponse; + handle command SelectAreas; + handle command SelectAreasResponse; + handle command SkipArea; + handle command SkipAreaResponse; } } diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index cb3ea7cc0d24c4..89fe82c64f5c21 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -2885,9 +2885,10 @@ "define": "SERVICE_AREA_CLUSTER", "side": "server", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { - "name": "SelectLocations", + "name": "SelectAreas", "code": 0, "mfgCode": null, "source": "client", @@ -2895,7 +2896,7 @@ "isEnabled": 1 }, { - "name": "SelectLocationsResponse", + "name": "SelectAreasResponse", "code": 1, "mfgCode": null, "source": "server", @@ -2903,7 +2904,7 @@ "isEnabled": 1 }, { - "name": "SkipCurrent", + "name": "SkipArea", "code": 2, "mfgCode": null, "source": "client", @@ -2911,7 +2912,7 @@ "isEnabled": 1 }, { - "name": "SkipCurrentResponse", + "name": "SkipAreaResponse", "code": 3, "mfgCode": null, "source": "server", @@ -2921,7 +2922,7 @@ ], "attributes": [ { - "name": "SupportedLocations", + "name": "SupportedAreas", "code": 0, "mfgCode": null, "side": "server", @@ -2953,7 +2954,7 @@ "reportableChange": 0 }, { - "name": "SelectedLocations", + "name": "SelectedAreas", "code": 2, "mfgCode": null, "side": "server", @@ -2969,7 +2970,7 @@ "reportableChange": 0 }, { - "name": "CurrentLocation", + "name": "CurrentArea", "code": 3, "mfgCode": null, "side": "server", @@ -2978,7 +2979,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2994,7 +2995,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3090,7 +3091,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp index d913f53d83e940..977189032b3e27 100644 --- a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp @@ -32,25 +32,25 @@ CHIP_ERROR RvcServiceAreaDelegate::Init() GetInstance()->AddSupportedMap(supportedMapId_YY, "My Map YY"_span); // hardcoded fill of SUPPORTED LOCATIONS for prototyping - uint32_t supportedLocationId_A = 7; - uint32_t supportedLocationId_B = 1234567; - uint32_t supportedLocationId_C = 10050; - uint32_t supportedLocationId_D = 0x88888888; + uint32_t supportedAreaID_A = 7; + uint32_t supportedAreaID_B = 1234567; + uint32_t supportedAreaID_C = 10050; + uint32_t supportedAreaID_D = 0x88888888; // Location A has name, floor number, uses map XX GetInstance()->AddSupportedLocation( - supportedLocationId_A, DataModel::Nullable(supportedMapId_XX), "My Location A"_span, + supportedAreaID_A, DataModel::Nullable(supportedMapId_XX), "My Location A"_span, DataModel::Nullable(4), DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable()); // Location B has name, uses map XX GetInstance()->AddSupportedLocation( - supportedLocationId_B, DataModel::Nullable(supportedMapId_XX), "My Location B"_span, + supportedAreaID_B, DataModel::Nullable(supportedMapId_XX), "My Location B"_span, DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable()); // Location C has full SemData, no name, Map YY - GetInstance()->AddSupportedLocation(supportedLocationId_C, DataModel::Nullable(supportedMapId_YY), CharSpan(), + GetInstance()->AddSupportedLocation(supportedAreaID_C, DataModel::Nullable(supportedMapId_YY), CharSpan(), DataModel::Nullable(-1), DataModel::Nullable(Globals::AreaTypeTag::kPlayRoom), DataModel::Nullable(Globals::LandmarkTag::kBackDoor), @@ -58,14 +58,14 @@ CHIP_ERROR RvcServiceAreaDelegate::Init() DataModel::Nullable(Globals::FloorSurfaceTag::kConcrete)); // Location D has null values for all HomeLocationStruct fields, Map YY - GetInstance()->AddSupportedLocation(supportedLocationId_D, DataModel::Nullable(supportedMapId_YY), + GetInstance()->AddSupportedLocation(supportedAreaID_D, DataModel::Nullable(supportedMapId_YY), "My Location D"_span, DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(Globals::LandmarkTag::kCouch), DataModel::Nullable(Globals::PositionTag::kNextTo), DataModel::Nullable(Globals::FloorSurfaceTag::kHardwood)); - GetInstance()->SetCurrentLocation(supportedLocationId_C); + GetInstance()->SetCurrentArea(supportedAreaID_C); return CHIP_NO_ERROR; } @@ -73,20 +73,20 @@ CHIP_ERROR RvcServiceAreaDelegate::Init() //************************************************************************* // command support -bool RvcServiceAreaDelegate::IsSetSelectedLocationsAllowed(MutableCharSpan statusText) +bool RvcServiceAreaDelegate::IsSetSelectedAreasAllowed(MutableCharSpan statusText) { // TODO IMPLEMENT return true; }; -bool RvcServiceAreaDelegate::IsValidSelectLocationsSet(const Commands::SelectLocations::DecodableType & req, - SelectLocationsStatus & locationStatus, MutableCharSpan statusText) +bool RvcServiceAreaDelegate::IsValidSelectAreasSet(const Commands::SelectAreas::DecodableType & req, + SelectAreasStatus & locationStatus, MutableCharSpan statusText) { // TODO IMPLEMENT return true; }; -bool RvcServiceAreaDelegate::HandleSkipCurrentLocation(MutableCharSpan skipStatusText) +bool RvcServiceAreaDelegate::HandleSkipCurrentArea(MutableCharSpan skipStatusText) { // TODO IMPLEMENT return true; @@ -95,41 +95,41 @@ bool RvcServiceAreaDelegate::HandleSkipCurrentLocation(MutableCharSpan skipStatu //************************************************************************* // Supported Locations accessors -bool RvcServiceAreaDelegate::IsSupportedLocationsChangeAllowed() +bool RvcServiceAreaDelegate::IsSupportedAreasChangeAllowed() { // TODO IMPLEMENT return true; } -uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedLocations() +uint32_t RvcServiceAreaDelegate::GetNumberOfSupportedAreas() { - return static_cast(mSupportedLocations.size()); + return static_cast(mSupportedAreas.size()); } -bool RvcServiceAreaDelegate::GetSupportedLocationByIndex(uint32_t listIndex, LocationStructureWrapper & aSupportedLocation) +bool RvcServiceAreaDelegate::GetSupportedLocationByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedLocation) { - if (listIndex < mSupportedLocations.size()) + if (listIndex < mSupportedAreas.size()) { - aSupportedLocation = mSupportedLocations[listIndex]; + aSupportedLocation = mSupportedAreas[listIndex]; return true; } return false; }; -bool RvcServiceAreaDelegate::GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, - LocationStructureWrapper & aSupportedLocation) +bool RvcServiceAreaDelegate::GetSupportedLocationById(uint32_t aAreaID, uint32_t & listIndex, + AreaStructureWrapper & aSupportedLocation) { // We do not need to reimplement this method as it's already done by the SDK. // We are reimplementing this method, still using linear search, but with some optimization on the SDK implementation // since we have direct access to the list. listIndex = 0; - while (listIndex < mSupportedLocations.size()) + while (listIndex < mSupportedAreas.size()) { - if (mSupportedLocations[listIndex].locationID == aLocationId) + if (mSupportedAreas[listIndex].areaID == aAreaID) { - aSupportedLocation = mSupportedLocations[listIndex]; + aSupportedLocation = mSupportedAreas[listIndex]; return true; } @@ -139,49 +139,49 @@ bool RvcServiceAreaDelegate::GetSupportedLocationById(uint32_t aLocationId, uint return false; }; -bool RvcServiceAreaDelegate::AddSupportedLocation(const LocationStructureWrapper & newLocation, uint32_t & listIndex) +bool RvcServiceAreaDelegate::AddSupportedLocation(const AreaStructureWrapper & newArea, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. - if (mSupportedLocations.size() < kMaxNumSupportedLocations) + if (mSupportedAreas.size() < kMaxNumSupportedAreas) { // not sorting list, number of locations normally expected to be small, max 255 - mSupportedLocations.push_back(newLocation); + mSupportedAreas.push_back(newArea); listIndex = static_cast(mSupportedMaps.size()) - 1; // new element is last in list return true; } - ChipLogError(Zcl, "AddSupportedLocation %u - supported locations list is already at maximum size %u", newLocation.locationID, - static_cast(kMaxNumSupportedLocations)); + ChipLogError(Zcl, "AddSupportedLocation %u - supported locations list is already at maximum size %u", newArea.areaID, + static_cast(kMaxNumSupportedAreas)); return false; } -bool RvcServiceAreaDelegate::ModifySupportedLocation(uint32_t listIndex, const LocationStructureWrapper & modifiedLocation) +bool RvcServiceAreaDelegate::ModifySupportedLocation(uint32_t listIndex, const AreaStructureWrapper & modifiedLocation) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. - // Double-check that locationID's match. - if (modifiedLocation.locationID != mSupportedLocations[listIndex].locationID) + // Double-check that areaID's match. + if (modifiedLocation.areaID != mSupportedAreas[listIndex].areaID) { - ChipLogError(Zcl, "ModifySupportedLocation - locationID's do not match, new locationID %u, existing locationID %u", - modifiedLocation.locationID, mSupportedLocations[listIndex].locationID); + ChipLogError(Zcl, "ModifySupportedLocation - areaID's do not match, new areaID %u, existing areaID %u", + modifiedLocation.areaID, mSupportedAreas[listIndex].areaID); return false; } // checks passed, update the attribute - mSupportedLocations[listIndex] = modifiedLocation; + mSupportedAreas[listIndex] = modifiedLocation; return true; } -bool RvcServiceAreaDelegate::ClearSupportedLocations() +bool RvcServiceAreaDelegate::ClearSupportedAreas() { - if (!mSupportedLocations.empty()) + if (!mSupportedAreas.empty()) { - mSupportedLocations.clear(); + mSupportedAreas.clear(); return true; } @@ -236,7 +236,7 @@ bool RvcServiceAreaDelegate::GetSupportedMapById(uint8_t aMapId, uint32_t & list bool RvcServiceAreaDelegate::AddSupportedMap(const MapStructureWrapper & newMap, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. @@ -255,7 +255,7 @@ bool RvcServiceAreaDelegate::AddSupportedMap(const MapStructureWrapper & newMap, bool RvcServiceAreaDelegate::ModifySupportedMap(uint32_t listIndex, const MapStructureWrapper & modifiedMap) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check that mapID's match. @@ -285,46 +285,46 @@ bool RvcServiceAreaDelegate::ClearSupportedMaps() //************************************************************************* // Selected Locations accessors -uint32_t RvcServiceAreaDelegate::GetNumberOfSelectedLocations() +uint32_t RvcServiceAreaDelegate::GetNumberOfSelectedAreas() { - return static_cast(mSelectedLocations.size()); + return static_cast(mSelectedAreas.size()); } bool RvcServiceAreaDelegate::GetSelectedLocationByIndex(uint32_t listIndex, uint32_t & aSelectedLocation) { - if (listIndex < mSelectedLocations.size()) + if (listIndex < mSelectedAreas.size()) { - aSelectedLocation = mSelectedLocations[listIndex]; + aSelectedLocation = mSelectedAreas[listIndex]; return true; } return false; }; -bool RvcServiceAreaDelegate::AddSelectedLocation(uint32_t aLocationId, uint32_t & listIndex) +bool RvcServiceAreaDelegate::AddSelectedLocation(uint32_t aAreaID, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. - if (mSelectedLocations.size() < kMaxNumSelectedLocations) + if (mSelectedAreas.size() < kMaxNumSelectedAreas) { // not sorting list, number of locations normally expected to be small, max 255 - mSelectedLocations.push_back(aLocationId); - listIndex = static_cast(mSelectedLocations.size()) - 1; // new element is last in list + mSelectedAreas.push_back(aAreaID); + listIndex = static_cast(mSelectedAreas.size()) - 1; // new element is last in list return true; } - ChipLogError(Zcl, "AddSelectedLocation %u - selected locations list is already at maximum size %u", aLocationId, - static_cast(kMaxNumSelectedLocations)); + ChipLogError(Zcl, "AddSelectedLocation %u - selected locations list is already at maximum size %u", aAreaID, + static_cast(kMaxNumSelectedAreas)); return false; } -bool RvcServiceAreaDelegate::ClearSelectedLocations() +bool RvcServiceAreaDelegate::ClearSelectedAreas() { - if (!mSelectedLocations.empty()) + if (!mSelectedAreas.empty()) { - mSelectedLocations.clear(); + mSelectedAreas.clear(); return true; } @@ -350,7 +350,7 @@ bool RvcServiceAreaDelegate::GetProgressElementByIndex(uint32_t listIndex, Struc return false; }; -bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, +bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aAreaID, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement) { // We do not need to reimplement this method as it's already done by the SDK. @@ -360,7 +360,7 @@ bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aLocationId, uint32 while (listIndex < mProgressList.size()) { - if (mProgressList[listIndex].locationID == aLocationId) + if (mProgressList[listIndex].areaID == aAreaID) { aProgressElement = mProgressList[listIndex]; return true; @@ -374,7 +374,7 @@ bool RvcServiceAreaDelegate::GetProgressElementById(uint32_t aLocationId, uint32 bool RvcServiceAreaDelegate::AddProgressElement(const Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) { - // The server instance (caller) is responsible for ensuring that there are no duplicate location IDs, list size not exceeded, + // The server instance (caller) is responsible for ensuring that there are no duplicate area IDs, list size not exceeded, // etc. // Double-check list size to ensure there no memory issues. @@ -385,7 +385,7 @@ bool RvcServiceAreaDelegate::AddProgressElement(const Structs::ProgressStruct::T listIndex = static_cast(mProgressList.size()) - 1; // new element is last in list return true; } - ChipLogError(Zcl, "AddProgressElement %u -progress list is already at maximum size %u", newProgressElement.locationID, + ChipLogError(Zcl, "AddProgressElement %u -progress list is already at maximum size %u", newProgressElement.areaID, static_cast(kMaxNumProgressElements)); return false; diff --git a/src/app/clusters/service-area-server/service-area-cluster-objects.h b/src/app/clusters/service-area-server/service-area-cluster-objects.h index 1be2918795a1f0..4436a21e284a0f 100644 --- a/src/app/clusters/service-area-server/service-area-cluster-objects.h +++ b/src/app/clusters/service-area-server/service-area-cluster-objects.h @@ -31,12 +31,12 @@ inline constexpr size_t kLocationNameMaxSize = 128u; inline constexpr size_t kMapNameMaxSize = 64u; /** - * This class is used to wrap the LocationStruct object and provide a more user-friendly interface for the data. + * This class is used to wrap the AreaStruct object and provide a more user-friendly interface for the data. * It provides a way to store the location name in a buffer, and provides a way to compare the location name with a given string. */ -struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Structs::LocationStruct::Type +struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs::AreaStruct::Type { - LocationStructureWrapper() + AreaStructureWrapper() { Set(0, 0, CharSpan(), DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(), DataModel::Nullable(), @@ -45,7 +45,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc /** * @brief This is a full constructor that initializes the location object with the given values. All values are deep copied. - * @param[in] aLocationId The unique identifier of this location. + * @param[in] aAreaID The unique identifier of this location. * @param[in] aMapId The identifier of the supported map associated with this location. * @param[in] aLocationName A human readable name for this location (empty string if not used). * @param[in] aFloorNumber The floor level of this location - use negative values for below ground. @@ -60,14 +60,14 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc * @note If aLocationName is larger than kLocationNameMaxSize, it will be truncated. * @note If aLocationName is an empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null. */ - LocationStructureWrapper(uint32_t aLocationId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, - const DataModel::Nullable & aFloorNumber, - const DataModel::Nullable & aAreaTypeTag, - const DataModel::Nullable & aLandmarkTag, - const DataModel::Nullable & aPositionTag, - const DataModel::Nullable & aSurfaceTag) + AreaStructureWrapper(uint32_t aAreaID, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, + const DataModel::Nullable & aFloorNumber, + const DataModel::Nullable & aAreaTypeTag, + const DataModel::Nullable & aLandmarkTag, + const DataModel::Nullable & aPositionTag, + const DataModel::Nullable & aSurfaceTag) { - Set(aLocationId, aMapId, aLocationName, aFloorNumber, aAreaTypeTag, aLandmarkTag, aPositionTag, aSurfaceTag); + Set(aAreaID, aMapId, aLocationName, aFloorNumber, aAreaTypeTag, aLandmarkTag, aPositionTag, aSurfaceTag); } /** @@ -77,7 +77,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc * * @note If the locationName is empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null. */ - LocationStructureWrapper(const LocationStructureWrapper & aOther) { *this = aOther; } + AreaStructureWrapper(const AreaStructureWrapper & aOther) { *this = aOther; } /** * @brief This is an assignment operator that initializes the location object with the values from another location object. All @@ -86,18 +86,18 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc * * @note If the locationName is empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null. */ - LocationStructureWrapper & operator=(const LocationStructureWrapper & aOther) + AreaStructureWrapper & operator=(const AreaStructureWrapper & aOther) { - if (aOther.locationInfo.locationInfo.IsNull()) + if (aOther.areaDesc.locationInfo.IsNull()) { - Set(aOther.locationID, aOther.mapID, CharSpan(), NullOptional, NullOptional, aOther.locationInfo.landmarkTag, - aOther.locationInfo.positionTag, aOther.locationInfo.surfaceTag); + Set(aOther.areaID, aOther.mapID, CharSpan(), NullOptional, NullOptional, aOther.areaDesc.landmarkTag, + aOther.areaDesc.positionTag, aOther.areaDesc.surfaceTag); } else { - Set(aOther.locationID, aOther.mapID, aOther.locationInfo.locationInfo.Value().locationName, - aOther.locationInfo.locationInfo.Value().floorNumber, aOther.locationInfo.locationInfo.Value().areaType, - aOther.locationInfo.landmarkTag, aOther.locationInfo.positionTag, aOther.locationInfo.surfaceTag); + Set(aOther.areaID, aOther.mapID, aOther.areaDesc.locationInfo.Value().locationName, + aOther.areaDesc.locationInfo.Value().floorNumber, aOther.areaDesc.locationInfo.Value().areaType, + aOther.areaDesc.landmarkTag, aOther.areaDesc.positionTag, aOther.areaDesc.surfaceTag); } return *this; @@ -105,7 +105,7 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc /** * @brief Set all fields of the location object. All values are deep copied. - * @param[in] aLocationId The unique identifier of this location. + * @param[in] aAreaID The unique identifier of this location. * @param[in] aMapId The identifier of the supported map associated with this location. * @param[in] aLocationName A human readable name for this location (empty string if not used). * @param[in] aFloorNumber The floor level of this location - use negative values for below ground. @@ -120,51 +120,51 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc * @note If aLocationName is larger than kLocationNameMaxSize, it will be truncated. * @note If aLocationName is an empty string and aFloorNumber and aAreaTypeTag are null, locationInfo will be set to null. */ - void Set(uint32_t aLocationId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, + void Set(uint32_t aAreaID, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, const DataModel::Nullable & aFloorNumber, const DataModel::Nullable & aAreaType, const DataModel::Nullable & aLandmarkTag, const DataModel::Nullable & aPositionTag, const DataModel::Nullable & aSurfaceTag) { - locationID = aLocationId; - mapID = aMapId; + areaID = aAreaID; + mapID = aMapId; // If there is at least one non-null value for locationInfo, add it to the location structure. if ((!aLocationName.empty()) || (!aFloorNumber.IsNull()) || (!aAreaType.IsNull())) { - // Create a home location info structure and fill it in except for the location name. This is done below. - locationInfo.locationInfo.SetNonNull(Globals::Structs::LocationDescriptorStruct::Type()); + // Create a home location desc structure and fill it in except for the location name. This is done below. + areaDesc.locationInfo.SetNonNull(Globals::Structs::LocationDescriptorStruct::Type()); - locationInfo.locationInfo.Value().floorNumber = aFloorNumber; - locationInfo.locationInfo.Value().areaType = aAreaType; + areaDesc.locationInfo.Value().floorNumber = aFloorNumber; + areaDesc.locationInfo.Value().areaType = aAreaType; } else { - locationInfo.locationInfo.SetNull(); + areaDesc.locationInfo.SetNull(); } - locationInfo.landmarkTag = aLandmarkTag; - locationInfo.positionTag = aPositionTag; - locationInfo.surfaceTag = aSurfaceTag; + areaDesc.landmarkTag = aLandmarkTag; + areaDesc.positionTag = aPositionTag; + areaDesc.surfaceTag = aSurfaceTag; - // this assumes locationInfo structure was created above, if appropriate - if (!locationInfo.locationInfo.IsNull()) + // this assumes areaDesc structure was created above, if appropriate + if (!areaDesc.locationInfo.IsNull()) { if (aLocationName.empty()) { - locationInfo.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, 0); + areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, 0); } else if (aLocationName.size() > sizeof(mLocationNameBuffer)) { // Save the truncated name that fits into available size. memcpy(mLocationNameBuffer, aLocationName.data(), sizeof(mLocationNameBuffer)); - locationInfo.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, sizeof(mLocationNameBuffer)); + areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, sizeof(mLocationNameBuffer)); } else { // Save full name. memcpy(mLocationNameBuffer, aLocationName.data(), aLocationName.size()); - locationInfo.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, aLocationName.size()); + areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, aLocationName.size()); } } } @@ -177,9 +177,9 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc */ bool IsNameEqual(const CharSpan & aLocationName) const { - if (!locationInfo.locationInfo.IsNull()) + if (!areaDesc.locationInfo.IsNull()) { - return locationInfo.locationInfo.Value().locationName.data_equal(aLocationName); + return areaDesc.locationInfo.Value().locationName.data_equal(aLocationName); } return false; @@ -187,24 +187,24 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc /** * This is used for configuring the IsEqual method. - * If kIgnoreLocationId is set, the location IDs are ignored when checking for equality. + * If kIgnoreAreaID is set, the area IDs are ignored when checking for equality. * If kIgnoreMapId is set, the map IDs are ignored when checking for equality. */ enum class IsEqualConfig : uint8_t { - kIgnoreLocationId = 0x1, - kIgnoreMapId = 0x2, + kIgnoreAreaID = 0x1, + kIgnoreMapId = 0x2, }; /** - * @brief Checks if the given LocationStructureWrapper is equal to this one. + * @brief Checks if the given AreaStructureWrapper is equal to this one. * @param aOther The location to compare with. - * @param aConfig Set if the location IDs and/or the map IDs should be ignored when checking for equality. + * @param aConfig Set if the area IDs and/or the map IDs should be ignored when checking for equality. * @return True if both locations are equal. False otherwise. */ - bool IsEqual(const LocationStructureWrapper & aOther, BitMask aConfig) const + bool IsEqual(const AreaStructureWrapper & aOther, BitMask aConfig) const { - if (!aConfig.Has(IsEqualConfig::kIgnoreLocationId) && (locationID != aOther.locationID)) + if (!aConfig.Has(IsEqualConfig::kIgnoreAreaID) && (areaID != aOther.areaID)) { return false; } @@ -214,41 +214,41 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc return false; } - if (locationInfo.locationInfo.IsNull() != aOther.locationInfo.locationInfo.IsNull()) + if (areaDesc.locationInfo.IsNull() != aOther.areaDesc.locationInfo.IsNull()) { return false; } - if (!locationInfo.locationInfo.IsNull()) + if (!areaDesc.locationInfo.IsNull()) { - if (!IsNameEqual(aOther.locationInfo.locationInfo.Value().locationName)) + if (!IsNameEqual(aOther.areaDesc.locationInfo.Value().locationName)) { return false; } - if (locationInfo.locationInfo.Value().floorNumber != aOther.locationInfo.locationInfo.Value().floorNumber) + if (areaDesc.locationInfo.Value().floorNumber != aOther.areaDesc.locationInfo.Value().floorNumber) { return false; } - if (locationInfo.locationInfo.Value().areaType != aOther.locationInfo.locationInfo.Value().areaType) + if (areaDesc.locationInfo.Value().areaType != aOther.areaDesc.locationInfo.Value().areaType) { return false; } } - if (locationInfo.landmarkTag != aOther.locationInfo.landmarkTag) + if (areaDesc.landmarkTag != aOther.areaDesc.landmarkTag) { return false; } - if (locationInfo.positionTag != aOther.locationInfo.positionTag) + if (areaDesc.positionTag != aOther.areaDesc.positionTag) { return false; } - if (locationInfo.surfaceTag != aOther.locationInfo.surfaceTag) + if (areaDesc.surfaceTag != aOther.areaDesc.surfaceTag) { return false; } @@ -261,12 +261,12 @@ struct LocationStructureWrapper : public chip::app::Clusters::ServiceArea::Struc */ CharSpan GetName() { - if (locationInfo.locationInfo.IsNull()) + if (areaDesc.locationInfo.IsNull()) { return { mLocationNameBuffer, 0 }; } - return locationInfo.locationInfo.Value().locationName; + return areaDesc.locationInfo.Value().locationName; } private: diff --git a/src/app/clusters/service-area-server/service-area-delegate.cpp b/src/app/clusters/service-area-server/service-area-delegate.cpp index 1be7d257336c94..0d8c98a16f5d24 100644 --- a/src/app/clusters/service-area-server/service-area-delegate.cpp +++ b/src/app/clusters/service-area-server/service-area-delegate.cpp @@ -3,14 +3,14 @@ using namespace chip::app::Clusters::ServiceArea; -bool Delegate::GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, LocationStructureWrapper & aSupportedLocation) +bool Delegate::GetSupportedLocationById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedLocation) { listIndex = 0; - // simple linear iteration to find the location with the desired locationID. + // simple linear iteration to find the location with the desired areaId. while (GetSupportedLocationByIndex(listIndex, aSupportedLocation)) { - if (aSupportedLocation.locationID == aLocationId) + if (aSupportedLocation.areaID == aAreaId) { return true; } @@ -21,10 +21,10 @@ bool Delegate::GetSupportedLocationById(uint32_t aLocationId, uint32_t & listInd return false; } -void Delegate::HandleSupportedLocationsUpdated() +void Delegate::HandleSupportedAreasUpdated() { - mInstance->ClearSelectedLocations(); - mInstance->SetCurrentLocation(DataModel::NullNullable); + mInstance->ClearSelectedAreas(); + mInstance->SetCurrentArea(DataModel::NullNullable); mInstance->ClearProgress(); } @@ -45,14 +45,14 @@ bool Delegate::GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, MapStru return false; } -bool Delegate::IsSelectedLocation(uint32_t aLocationId) +bool Delegate::IsSelectedLocation(uint32_t aAreaId) { uint32_t listIndex = 0; uint32_t selectedLocation; while (GetSelectedLocationByIndex(listIndex, selectedLocation)) { - if (selectedLocation == aLocationId) + if (selectedLocation == aAreaId) { return true; } @@ -63,14 +63,14 @@ bool Delegate::IsSelectedLocation(uint32_t aLocationId) return false; } -bool Delegate::GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement) +bool Delegate::GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement) { listIndex = 0; - // simple linear iteration to find the progress element with the desired locationID. + // simple linear iteration to find the progress element with the desired areaID. while (GetProgressElementByIndex(listIndex, aProgressElement)) { - if (aProgressElement.locationID == aLocationId) + if (aProgressElement.areaID == aAreaId) { return true; } @@ -81,10 +81,10 @@ bool Delegate::GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex return false; } -bool Delegate::IsProgressElement(uint32_t aLocationId) +bool Delegate::IsProgressElement(uint32_t aAreaId) { uint32_t index; Structs::ProgressStruct::Type progressElement; - return GetProgressElementById(aLocationId, index, progressElement); + return GetProgressElementById(aAreaId, index, progressElement); } diff --git a/src/app/clusters/service-area-server/service-area-delegate.h b/src/app/clusters/service-area-server/service-area-delegate.h index baf50d071b3404..1c324fe2c70bc7 100644 --- a/src/app/clusters/service-area-server/service-area-delegate.h +++ b/src/app/clusters/service-area-server/service-area-delegate.h @@ -31,10 +31,10 @@ class Instance; // ***************************************************************************** // cluster constraints -constexpr size_t kMaxNumSupportedLocations = 255; -constexpr size_t kMaxNumSupportedMaps = 255; -constexpr size_t kMaxNumSelectedLocations = 255; -constexpr size_t kMaxNumProgressElements = 255; +constexpr size_t kMaxNumSupportedAreas = 255; +constexpr size_t kMaxNumSupportedMaps = 255; +constexpr size_t kMaxNumSelectedAreas = 255; +constexpr size_t kMaxNumProgressElements = 255; constexpr size_t kMaxSizeStatusText = 256; @@ -71,10 +71,10 @@ class Delegate * @note The statusText field SHOULD indicate why the request is not allowed, given the current mode * of the device, which may involve other clusters. */ - virtual bool IsSetSelectedLocationsAllowed(MutableCharSpan statusText) = 0; + virtual bool IsSetSelectedAreasAllowed(MutableCharSpan statusText) = 0; /** - * Given a set of locations to be set to the SelectedLocations attribute, this method should check that + * Given a set of locations to be set to the SelectedAreas attribute, this method should check that * the set of locations as a whole is valid and reachable by the device. * If the set of locations is invalid, the locationStatus should be set to InvalidSet and * the statusText SHALL include a vendor-defined error description. @@ -87,14 +87,14 @@ class Delegate * @param[out] statusText text describing failure (see description above), size kMaxSizeStatusText. * @return true if success. * - * @note If the SelectLocations command is allowed when the device is operating and the selected locations change to none, the + * @note If the SelectAreas command is allowed when the device is operating and the selected locations change to none, the * device must stop. */ - virtual bool IsValidSelectLocationsSet(const Commands::SelectLocations::DecodableType & req, - SelectLocationsStatus & locationStatus, MutableCharSpan statusText) = 0; + virtual bool IsValidSelectAreasSet(const Commands::SelectAreas::DecodableType & req, SelectAreasStatus & locationStatus, + MutableCharSpan statusText) = 0; /** - * @brief The server instance ensures that the SelectedLocations and CurrentLocation attributes are not null before + * @brief The server instance ensures that the SelectedAreas and CurrentArea attributes are not null before * calling this method. * @param[out] skipStatusText text describing why current location cannot be skipped. * @return true if command is successful, false if the received skip request cannot be handled due to the current mode of the @@ -104,13 +104,13 @@ class Delegate * * @note If the device successfully accepts the request and the ListOrder feature is set to 1: * The server SHALL stop operating at the current location. - * The server SHALL attempt to operate at the remaining locations on the SelectedLocations attribute list, starting with - * the next entry. If the end of the SelectedLocations attribute list is reached, the server SHALL stop operating. + * The server SHALL attempt to operate at the remaining locations on the SelectedAreas attribute list, starting with + * the next entry. If the end of the SelectedAreas attribute list is reached, the server SHALL stop operating. * * @note If the device successfully accepts the request and the ListOrder feature is set to 0: * The server SHALL stop operating at the current location. - * The server SHALL attempt to operate at the locations on the SelectedLocations attribute list where operating has not - * been completed, using a vendor defined order. If the server has completed operating at all locations on the SelectedLocations + * The server SHALL attempt to operate at the locations on the SelectedAreas attribute list where operating has not + * been completed, using a vendor defined order. If the server has completed operating at all locations on the SelectedAreas * attribute list, the server SHALL stop operating. * * @note If the Status field is set to InvalidLocationList, the StatusText field SHALL be an empty string. @@ -119,7 +119,7 @@ class Delegate * InvalidInMode, the StatusText field SHOULD indicate why the request is not allowed, given the current mode of the device, * which may involve other clusters. */ - virtual bool HandleSkipCurrentLocation(MutableCharSpan skipStatusText) + virtual bool HandleSkipCurrentArea(MutableCharSpan skipStatusText) { // device support of this command is optional CopyCharSpanToMutableCharSpan("Skip Current Location command not supported by device"_span, skipStatusText); @@ -127,23 +127,23 @@ class Delegate } //************************************************************************* - // Supported Locations accessors + // Supported Areas accessors /** - * @return true if the current device state allows the SupportedLocations attribute to be updated. + * @return true if the current device state allows the SupportedAreas attribute to be updated. * - * @note The SupportedLocations attribute list changes (adding or deleting entries, - * changing their MapID fields, changing the LocationID fields, or nulling the entire list) + * @note The SupportedAreas attribute list changes (adding or deleting entries, + * changing their MapID fields, changing the AreaID fields, or nulling the entire list) * SHOULD NOT be allowed while the device is operating, to reduce the impact on the clients, * and the potential confusion for the users. * * @note The device implementation MAY allow supported location changes while operating if the device - * repopulates the SupportedMaps, SupportedLocations, CurrentLocation, and Progress attributes with + * repopulates the SupportedMaps, SupportedAreas, CurrentArea, and Progress attributes with * data matching the constraints listed in the requirements for each attribute. */ - virtual bool IsSupportedLocationsChangeAllowed() = 0; + virtual bool IsSupportedAreasChangeAllowed() = 0; - virtual uint32_t GetNumberOfSupportedLocations() = 0; + virtual uint32_t GetNumberOfSupportedAreas() = 0; /** * @brief Get a supported location using the position in the list. @@ -151,30 +151,29 @@ class Delegate * @param[out] aSupportedLocation copy of the location contents, if found. * @return true if location found, false otherwise. */ - virtual bool GetSupportedLocationByIndex(uint32_t listIndex, LocationStructureWrapper & aSupportedLocation) = 0; + virtual bool GetSupportedLocationByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedLocation) = 0; /** - * @brief Get a supported location that matches a locationID. - * @param[in] aLocationId the locationID to search for. + * @brief Get a supported location that matches a areaID. + * @param[in] aAreaId the areaID to search for. * @param[out] listIndex the location's index in the list, if found. * @param[out] aSupportedLocation copy of the location contents, if found. * @return true if location found, false otherwise. * * @note may be overloaded in device implementation for optimization, if desired. */ - virtual bool GetSupportedLocationById(uint32_t aLocationId, uint32_t & listIndex, - LocationStructureWrapper & aSupportedLocation); + virtual bool GetSupportedLocationById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedLocation); /** * This method is called by the server instance to add a new location to the list. - * The server instance will ensure that the newLocation is a valid, unique location. - * @param [in] newLocation new location to add. + * The server instance will ensure that the newArea is a valid, unique location. + * @param [in] newArea new location to add. * @param [out] listIndex filled with the list index for the new location, if successful. * @return true if successful, false otherwise. * @note this function SHOULD double check that the added location won't exceed the maximum list size. */ - virtual bool AddSupportedLocation(const LocationStructureWrapper & newLocation, uint32_t & listIndex) = 0; + virtual bool AddSupportedLocation(const AreaStructureWrapper & newArea, uint32_t & listIndex) = 0; /** * This method is called by the server instance to modify an existing location in the list. @@ -183,31 +182,31 @@ class Delegate * @param[in] modifiedLocation A location with the modified contents. * @return true if successful, false otherwise. * - * @note this function SHOULD double check that newLocation's locationID matches the object at listIndex. + * @note this function SHOULD double check that newArea's areaID matches the object at listIndex. */ - virtual bool ModifySupportedLocation(uint32_t listIndex, const LocationStructureWrapper & modifiedLocation) = 0; + virtual bool ModifySupportedLocation(uint32_t listIndex, const AreaStructureWrapper & modifiedLocation) = 0; /** * @return true if supported locations was not already null, false otherwise. */ - virtual bool ClearSupportedLocations() = 0; + virtual bool ClearSupportedAreas() = 0; /** - * @brief Ensure that when the Supported locations is modified, the required restrictions for the SelectedLocations, - * CurrentLocation, and Progress attributes are maintained. + * @brief Ensure that when the Supported locations is modified, the required restrictions for the SelectedAreas, + * CurrentArea, and Progress attributes are maintained. * * This method will be called by the SDK whenever the adherence to the restrictions for these attributes cannot be guaranteed. - * For example, if there are deletions in the SupportedMops or SupportedLocations attributes, or if there are changes to their - * IDs. This method will no be called if the changes made to the SupportedMops or SupportedLocations attributes, ensure that the + * For example, if there are deletions in the SupportedMops or SupportedAreas attributes, or if there are changes to their + * IDs. This method will no be called if the changes made to the SupportedMops or SupportedAreas attributes, ensure that the * restrictions are adhered. For example, if there are additions or the modifications do not involve changing IDs in the - * SupportedMops or SupportedLocations attributes. + * SupportedMops or SupportedAreas attributes. * - * The default implementation will set the SelectedLocations, CurrentLocation, and Progress attributes to null. + * The default implementation will set the SelectedAreas, CurrentArea, and Progress attributes to null. * * The user is free the redefine this method as their device may have more information on what has changed and may be able to * maintain the restrictions on these attributes by selectively editing them. */ - virtual void HandleSupportedLocationsUpdated(); + virtual void HandleSupportedAreasUpdated(); //************************************************************************* // Supported Maps accessors @@ -221,7 +220,7 @@ class Delegate * and the potential confusion for the users. * * @note The device implementation MAY allow supported maps changes while operating if the device - * repopulates the SupportedLocations, CurrentLocation, and Progress attributes with + * repopulates the SupportedAreas, CurrentArea, and Progress attributes with * data matching the constraints listed in the requirements for each attribute. */ virtual bool IsSupportedMapChangeAllowed() = 0; @@ -277,7 +276,7 @@ class Delegate //************************************************************************* // Selected Locations accessors - virtual uint32_t GetNumberOfSelectedLocations() = 0; + virtual uint32_t GetNumberOfSelectedAreas() = 0; /** * @brief Get a selected location using the position in the list. @@ -288,28 +287,28 @@ class Delegate virtual bool GetSelectedLocationByIndex(uint32_t listIndex, uint32_t & selectedLocation) = 0; /** - * @return true if the aLocationId locationID is found in the SelectedLocations list, false otherwise. + * @return true if the aAreaId areaID is found in the SelectedAreas list, false otherwise. * * @note may be overloaded in device implementation for optimization, if desired. */ - virtual bool IsSelectedLocation(uint32_t aLocationId); + virtual bool IsSelectedLocation(uint32_t aAreaId); /** * This method is called by the server instance to add a new selected location to the list. - * The server instance will ensure that the aLocationId references a SUPPORTED location, and is unique within selected + * The server instance will ensure that the aAreaId references a SUPPORTED location, and is unique within selected * locations. - * @param[in] aLocationId The new locationID to add. + * @param[in] aAreaId The new areaID to add. * @param[out] listIndex filled with the list index of the new location, if successful. * @return true if successful, false otherwise. * * @note this function SHOULD double check that the added location won't exceed the maximum list size. */ - virtual bool AddSelectedLocation(uint32_t aLocationId, uint32_t & listIndex) = 0; + virtual bool AddSelectedLocation(uint32_t aAreaId, uint32_t & listIndex) = 0; /** * @return true if selected locations was not already null, false otherwise. */ - virtual bool ClearSelectedLocations() = 0; + virtual bool ClearSelectedAreas() = 0; //************************************************************************* // Progress accessors @@ -325,23 +324,22 @@ class Delegate virtual bool GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement) = 0; /** - * @brief Get a progress element that matches a locationID. - * @param[in] aLocationId the locationID to search for. + * @brief Get a progress element that matches a areaID. + * @param[in] aAreaId the areaID to search for. * @param[out] listIndex the location's index in the list, if found. * @param[out] aProgressElement copy of the progress element contents, if found. * @return true if a progress element is found, false otherwise. * * @note may be overloaded in device implementation for optimization, if desired. */ - virtual bool GetProgressElementById(uint32_t aLocationId, uint32_t & listIndex, - Structs::ProgressStruct::Type & aProgressElement); + virtual bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement); /** * @brief Is the progress element in the progress list? - * @param[in] aLocationId location id of the progress element. + * @param[in] aAreaId location id of the progress element. * @return true if the progress element identified by Id is in the progress list. */ - virtual bool IsProgressElement(uint32_t aLocationId); + virtual bool IsProgressElement(uint32_t aAreaId); /** * This method is called by the server instance to add a new progress element to the list. @@ -361,7 +359,7 @@ class Delegate * @param[in] modifiedProgressElement modified element's contents. * @return true if successful, false otherwise. * - * @note this function SHOULD double check that modifiedProgressElement's locationID matches the object at listIndex + * @note this function SHOULD double check that modifiedProgressElement's areaID matches the object at listIndex */ virtual bool ModifyProgressElement(uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement) = 0; diff --git a/src/app/clusters/service-area-server/service-area-server.cpp b/src/app/clusters/service-area-server/service-area-server.cpp index 79837ff0bf216c..66556acd03ea0b 100644 --- a/src/app/clusters/service-area-server/service-area-server.cpp +++ b/src/app/clusters/service-area-server/service-area-server.cpp @@ -85,17 +85,17 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu switch (aPath.mAttributeId) { - case Attributes::SupportedLocations::Id: - return ReadSupportedLocations(aEncoder); + case Attributes::SupportedAreas::Id: + return ReadSupportedAreas(aEncoder); case Attributes::SupportedMaps::Id: return ReadSupportedMaps(aEncoder); - case Attributes::SelectedLocations::Id: - return ReadSelectedLocations(aEncoder); + case Attributes::SelectedAreas::Id: + return ReadSelectedAreas(aEncoder); - case Attributes::CurrentLocation::Id: - return aEncoder.Encode(GetCurrentLocation()); + case Attributes::CurrentArea::Id: + return aEncoder.Encode(GetCurrentArea()); case Attributes::EstimatedEndTime::Id: return aEncoder.Encode(GetEstimatedEndTime()); @@ -117,29 +117,29 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) { switch (handlerContext.mRequestPath.mCommandId) { - case Commands::SelectLocations::Id: - return CommandHandlerInterface::HandleCommand( - handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSelectLocationsCmd(ctx, req); }); + case Commands::SelectAreas::Id: + return CommandHandlerInterface::HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSelectAreasCmd(ctx, req); }); - case Commands::SkipCurrentLocation::Id: - return CommandHandlerInterface::HandleCommand( - handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSkipCurrentLocationCmd(ctx); }); + case Commands::SkipArea::Id: + return CommandHandlerInterface::HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSkipCurrentAreaCmd(ctx); }); } } //************************************************************************* // attribute readers -CHIP_ERROR Instance::ReadSupportedLocations(AttributeValueEncoder & aEncoder) +CHIP_ERROR Instance::ReadSupportedAreas(AttributeValueEncoder & aEncoder) { - if (mDelegate->GetNumberOfSupportedLocations() == 0) + if (mDelegate->GetNumberOfSupportedAreas() == 0) { return aEncoder.EncodeNull(); } return aEncoder.EncodeList([this](const auto & encoder) -> CHIP_ERROR { uint8_t locationIndex = 0; - LocationStructureWrapper supportedLocation; + AreaStructureWrapper supportedLocation; while (mDelegate->GetSupportedLocationByIndex(locationIndex++, supportedLocation)) { @@ -168,9 +168,9 @@ CHIP_ERROR Instance::ReadSupportedMaps(AttributeValueEncoder & aEncoder) }); } -CHIP_ERROR Instance::ReadSelectedLocations(AttributeValueEncoder & aEncoder) +CHIP_ERROR Instance::ReadSelectedAreas(AttributeValueEncoder & aEncoder) { - if (mDelegate->GetNumberOfSelectedLocations() == 0) + if (mDelegate->GetNumberOfSelectedAreas() == 0) { return aEncoder.EncodeNull(); } @@ -209,13 +209,13 @@ CHIP_ERROR Instance::ReadProgress(AttributeValueEncoder & aEncoder) //************************************************************************* // command handlers -void Instance::HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::SelectLocations::DecodableType & req) +void Instance::HandleSelectAreasCmd(HandlerContext & ctx, const Commands::SelectAreas::DecodableType & req) { - ChipLogDetail(Zcl, "Service Area: HandleSelectLocationsCmd"); + ChipLogDetail(Zcl, "Service Area: HandleSelectAreasCmd"); - // On receipt of this command the device SHALL respond with a SelectLocationsResponse command. - auto exitResponse = [ctx](SelectLocationsStatus status, CharSpan statusText) { - Commands::SelectLocationsResponse::Type response{ + // On receipt of this command the device SHALL respond with a SelectAreasResponse command. + auto exitResponse = [ctx](SelectAreasStatus status, CharSpan statusText) { + Commands::SelectAreasResponse::Type response{ .status = status, .statusText = Optional(statusText), }; @@ -224,68 +224,68 @@ void Instance::HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::Se size_t numberOfLocations = 0; // Get the number of Selected Locations in the command parameter and check that it is valid. - if (!req.newLocations.IsNull()) + if (!req.newAreas.IsNull()) { - if (CHIP_NO_ERROR != req.newLocations.Value().ComputeSize(&numberOfLocations)) + if (CHIP_NO_ERROR != req.newAreas.Value().ComputeSize(&numberOfLocations)) { ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::InvalidCommand); return; } // If the device determines that it can't operate at all locations from the list, - // the SelectLocationsResponse command's Status field SHALL indicate InvalidSet. - if (numberOfLocations > kMaxNumSelectedLocations) + // the SelectAreasResponse command's Status field SHALL indicate InvalidSet. + if (numberOfLocations > kMaxNumSelectedAreas) { - exitResponse(SelectLocationsStatus::kInvalidSet, "invalid number of locations"_span); + exitResponse(SelectAreasStatus::kInvalidSet, "invalid number of locations"_span); return; } } // if number of selected locations in parameter matches number in attribute - the locations *might* be the same - bool matchesCurrentSelectedLocations = (numberOfLocations == mDelegate->GetNumberOfSelectedLocations()); + bool matchesCurrentSelectedAreas = (numberOfLocations == mDelegate->GetNumberOfSelectedAreas()); - if (!req.newLocations.IsNull()) + if (!req.newAreas.IsNull()) { // do as much parameter validation as we can { uint32_t ignoredIndex = 0; uint32_t oldSelectedLocation; uint32_t i = 0; - auto iLocationIter = req.newLocations.Value().begin(); + auto iLocationIter = req.newAreas.Value().begin(); while (iLocationIter.Next()) { uint32_t aSelectedLocation = iLocationIter.GetValue(); - // each item in this list SHALL match the LocationID field of an entry on the SupportedLocations attribute's list + // each item in this list SHALL match the AreaID field of an entry on the SupportedAreas attribute's list // If the Status field is set to UnsupportedLocation, the StatusText field SHALL be an empty string. if (!IsSupportedLocation(aSelectedLocation)) { - exitResponse(SelectLocationsStatus::kUnsupportedLocation, ""_span); + exitResponse(SelectAreasStatus::kUnsupportedArea, ""_span); return; } // Checking for duplicate locations. uint32_t j = 0; - auto jLocationIter = req.newLocations.Value().begin(); + auto jLocationIter = req.newAreas.Value().begin(); while (j < i) { jLocationIter .Next(); // Since j < i and i is valid, we can safely call Next() without checking the return value. if (jLocationIter.GetValue() == aSelectedLocation) { - exitResponse(SelectLocationsStatus::kDuplicatedLocations, ""_span); + exitResponse(SelectAreasStatus::kDuplicatedAreas, ""_span); return; } j += 1; } // check to see if parameter list and attribute still match - if (matchesCurrentSelectedLocations) + if (matchesCurrentSelectedAreas) { if (!mDelegate->GetSelectedLocationByIndex(ignoredIndex, oldSelectedLocation) || (aSelectedLocation != oldSelectedLocation)) { - matchesCurrentSelectedLocations = false; + matchesCurrentSelectedAreas = false; } } @@ -301,12 +301,12 @@ void Instance::HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::Se } } - // If the NewLocations field is the same as the value of the SelectedLocations attribute - // the SelectLocationsResponse command SHALL have the Status field set to Success and + // If the newAreas field is the same as the value of the SelectedAreas attribute + // the SelectAreasResponse command SHALL have the Status field set to Success and // the StatusText field MAY be supplied with a human-readable string or include an empty string. - if (matchesCurrentSelectedLocations) + if (matchesCurrentSelectedAreas) { - exitResponse(SelectLocationsStatus::kSuccess, ""_span); + exitResponse(SelectAreasStatus::kSuccess, ""_span); return; } @@ -314,23 +314,23 @@ void Instance::HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::Se MutableCharSpan delegateStatusText(delegateStatusBuffer); // If the current state of the device doesn't allow for the locations to be selected, - // the SelectLocationsResponse command SHALL have the Status field set to InvalidInMode. + // the SelectAreasResponse command SHALL have the Status field set to InvalidInMode. // if the Status field is set to InvalidInMode, the StatusText field SHOULD indicate why the request is not allowed, // given the current mode of the device, which may involve other clusters. // (note - locationStatusText to be filled out by delegated function for if return value is false) - if (!mDelegate->IsSetSelectedLocationsAllowed(delegateStatusText)) + if (!mDelegate->IsSetSelectedAreasAllowed(delegateStatusText)) { - exitResponse(SelectLocationsStatus::kInvalidInMode, delegateStatusText); + exitResponse(SelectAreasStatus::kInvalidInMode, delegateStatusText); return; } // Reset in case the delegate accidentally modified this string. delegateStatusText = MutableCharSpan(delegateStatusBuffer); - // ask the device to handle SelectLocations Command + // ask the device to handle SelectAreas Command // (note - locationStatusText to be filled out by delegated function for kInvalidInMode and InvalidSet) - auto locationStatus = SelectLocationsStatus::kSuccess; - if (!mDelegate->IsValidSelectLocationsSet(req, locationStatus, delegateStatusText)) + auto locationStatus = SelectAreasStatus::kSuccess; + if (!mDelegate->IsValidSelectAreasSet(req, locationStatus, delegateStatusText)) { exitResponse(locationStatus, delegateStatusText); return; @@ -338,14 +338,14 @@ void Instance::HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::Se { // If the device successfully accepts the request, the server will attempt to operate at the location(s) - // indicated by the entries of the NewLocation field, when requested to operate, - // the SelectLocationsResponse command SHALL have the Status field set to Success, - // and the SelectedLocations attribute SHALL be set to the value of the NewLocations field. - mDelegate->ClearSelectedLocations(); + // indicated by the entries of the newArea field, when requested to operate, + // the SelectAreasResponse command SHALL have the Status field set to Success, + // and the SelectedAreas attribute SHALL be set to the value of the newAreas field. + mDelegate->ClearSelectedAreas(); - if (!req.newLocations.IsNull()) + if (!req.newAreas.IsNull()) { - auto locationIter = req.newLocations.Value().begin(); + auto locationIter = req.newAreas.Value().begin(); uint32_t ignored; while (locationIter.Next()) { @@ -353,40 +353,40 @@ void Instance::HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::Se } } - NotifySelectedLocationsChanged(); + NotifySelectedAreasChanged(); } - exitResponse(SelectLocationsStatus::kSuccess, ""_span); + exitResponse(SelectAreasStatus::kSuccess, ""_span); } -void Instance::HandleSkipCurrentLocationCmd(HandlerContext & ctx) +void Instance::HandleSkipCurrentAreaCmd(HandlerContext & ctx) { - ChipLogDetail(Zcl, "Service Area: HandleSkipCurrentLocation"); + ChipLogDetail(Zcl, "Service Area: HandleSkipCurrentArea"); - // On receipt of this command the device SHALL respond with a SkipCurrentLocationResponse command. - auto exitResponse = [ctx](SkipCurrentLocationStatus status, CharSpan statusText) { - Commands::SkipCurrentLocationResponse::Type response{ + // On receipt of this command the device SHALL respond with a SkipCurrentAreaResponse command. + auto exitResponse = [ctx](SkipAreaStatus status, CharSpan statusText) { + Commands::SkipAreaResponse::Type response{ .status = status, .statusText = Optional(statusText), }; ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); }; - // If the SelectedLocations attribute is null, the response status should be set to InvalidLocationList. + // If the SelectedAreas attribute is null, the response status should be set to InvalidLocationList. // If the Status field is set to InvalidLocationList, the StatusText field SHALL be an empty string. - if (mDelegate->GetNumberOfSelectedLocations() == 0) + if (mDelegate->GetNumberOfSelectedAreas() == 0) { ChipLogError(Zcl, "Selected Locations attribute is null"); - exitResponse(SkipCurrentLocationStatus::kInvalidLocationList, ""_span); + exitResponse(SkipAreaStatus::kInvalidAreaList, ""_span); return; } - // If the CurrentLocation attribute is null, the status should be set to InvalidInMode. + // If the CurrentArea attribute is null, the status should be set to InvalidInMode. // If the Status field is not set to Success, or InvalidLocationList, the StatusText field SHALL include a vendor defined error // description. - if (mCurrentLocation.IsNull()) + if (mCurrentArea.IsNull()) { - exitResponse(SkipCurrentLocationStatus::kInvalidInMode, "Current Location attribute is null"_span); + exitResponse(SkipAreaStatus::kInvalidInMode, "Current Location attribute is null"_span); return; } @@ -397,9 +397,9 @@ void Instance::HandleSkipCurrentLocationCmd(HandlerContext & ctx) char skipStatusBuffer[kMaxSizeStatusText]; MutableCharSpan skipStatusText(skipStatusBuffer); - if (!mDelegate->HandleSkipCurrentLocation(skipStatusText)) + if (!mDelegate->HandleSkipCurrentArea(skipStatusText)) { - exitResponse(SkipCurrentLocationStatus::kInvalidInMode, skipStatusText); + exitResponse(SkipAreaStatus::kInvalidInMode, skipStatusText); return; } } @@ -407,9 +407,9 @@ void Instance::HandleSkipCurrentLocationCmd(HandlerContext & ctx) //************************************************************************* // attribute notifications -void Instance::NotifySupportedLocationsChanged() +void Instance::NotifySupportedAreasChanged() { - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::SupportedLocations::Id); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::SupportedAreas::Id); } void Instance::NotifySupportedMapsChanged() @@ -417,14 +417,14 @@ void Instance::NotifySupportedMapsChanged() MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::SupportedMaps::Id); } -void Instance::NotifySelectedLocationsChanged() +void Instance::NotifySelectedAreasChanged() { - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::SelectedLocations::Id); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::SelectedAreas::Id); } -void Instance::NotifyCurrentLocationChanged() +void Instance::NotifyCurrentAreaChanged() { - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CurrentLocation::Id); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CurrentArea::Id); } void Instance::NotifyEstimatedEndTimeChanged() @@ -440,43 +440,43 @@ void Instance::NotifyProgressChanged() // **************************************************************************** // Supported Locations manipulators -bool Instance::IsSupportedLocation(uint32_t aLocationId) +bool Instance::IsSupportedLocation(uint32_t aAreaId) { uint32_t ignoredIndex; - LocationStructureWrapper ignoredLocation; + AreaStructureWrapper ignoredLocation; - return mDelegate->GetSupportedLocationById(aLocationId, ignoredIndex, ignoredLocation); + return mDelegate->GetSupportedLocationById(aAreaId, ignoredIndex, ignoredLocation); } -bool Instance::IsValidSupportedLocation(const LocationStructureWrapper & aLocation) +bool Instance::IsValidSupportedLocation(const AreaStructureWrapper & aLocation) { // If the HomeLocationInfo field is null, the LandmarkTag field SHALL NOT be null. // If the LandmarkTag field is null, the HomeLocationInfo field SHALL NOT be null. - if (aLocation.locationInfo.locationInfo.IsNull() && aLocation.locationInfo.landmarkTag.IsNull()) + if (aLocation.areaDesc.locationInfo.IsNull() && aLocation.areaDesc.landmarkTag.IsNull()) { - ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - must have locationInfo and/or LandmarkTag", aLocation.locationID); + ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - must have locationInfo and/or LandmarkTag", aLocation.areaID); return false; } // If HomeLocationInfo is not null, and its LocationName field is an empty string, at least one of the following SHALL NOT // be null: HomeLocationInfo's FloorNumber field, HomeLocationInfo's AreaType field, the LandmarkTag field - if (!aLocation.locationInfo.locationInfo.IsNull()) + if (!aLocation.areaDesc.locationInfo.IsNull()) { - if (aLocation.locationInfo.locationInfo.Value().locationName.empty() && - aLocation.locationInfo.locationInfo.Value().floorNumber.IsNull() && - aLocation.locationInfo.locationInfo.Value().areaType.IsNull() && aLocation.locationInfo.landmarkTag.IsNull()) + if (aLocation.areaDesc.locationInfo.Value().locationName.empty() && + aLocation.areaDesc.locationInfo.Value().floorNumber.IsNull() && + aLocation.areaDesc.locationInfo.Value().areaType.IsNull() && aLocation.areaDesc.landmarkTag.IsNull()) { ChipLogDetail( Zcl, "IsValidAsSupportedLocation %u - LocationName is empty string, FloorNumber, AreaType, LandmarkTag are null", - aLocation.locationID); + aLocation.areaID); return false; } } // If the LandmarkTag field is null, the PositionTag field SHALL be null. - if (aLocation.locationInfo.landmarkTag.IsNull() && !aLocation.locationInfo.positionTag.IsNull()) + if (aLocation.areaDesc.landmarkTag.IsNull() && !aLocation.areaDesc.positionTag.IsNull()) { - ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - PositionTag with no LandmarkTag", aLocation.locationID); + ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - PositionTag with no LandmarkTag", aLocation.areaID); return false; } @@ -485,7 +485,7 @@ bool Instance::IsValidSupportedLocation(const LocationStructureWrapper & aLocati // If the SupportedMaps attribute is null, mapid SHALL be null. if (!aLocation.mapID.IsNull()) { - ChipLogDetail(Zcl, "IsValidSupportedLocation %u - map Id %u is not in empty supported map list", aLocation.locationID, + ChipLogDetail(Zcl, "IsValidSupportedLocation %u - map Id %u is not in empty supported map list", aLocation.areaID, aLocation.mapID.Value()); return false; } @@ -495,7 +495,7 @@ bool Instance::IsValidSupportedLocation(const LocationStructureWrapper & aLocati // If the SupportedMaps attribute is not null, mapID SHALL be the ID of an entry from the SupportedMaps attribute. if (!IsSupportedMap(aLocation.mapID.Value())) { - ChipLogError(Zcl, "IsValidSupportedLocation %u - map Id %u is not in supported map list", aLocation.locationID, + ChipLogError(Zcl, "IsValidSupportedLocation %u - map Id %u is not in supported map list", aLocation.areaID, aLocation.mapID.Value()); return false; } @@ -504,13 +504,13 @@ bool Instance::IsValidSupportedLocation(const LocationStructureWrapper & aLocati return true; } -bool Instance::IsUniqueSupportedLocation(const LocationStructureWrapper & aLocation, bool ignoreLocationId) +bool Instance::IsUniqueSupportedLocation(const AreaStructureWrapper & aLocation, bool ignoreAreaId) { - BitMask config; + BitMask config; - if (ignoreLocationId) + if (ignoreAreaId) { - config.Set(LocationStructureWrapper::IsEqualConfig::kIgnoreLocationId); + config.Set(AreaStructureWrapper::IsEqualConfig::kIgnoreAreaID); } // If the SupportedMaps attribute is not null, each entry in this list SHALL have a unique value for the combination of the @@ -518,11 +518,11 @@ bool Instance::IsUniqueSupportedLocation(const LocationStructureWrapper & aLocat // the LocationInfo field. if (mDelegate->GetNumberOfSupportedMaps() == 0) { - config.Set(LocationStructureWrapper::IsEqualConfig::kIgnoreMapId); + config.Set(AreaStructureWrapper::IsEqualConfig::kIgnoreMapId); } uint8_t locationIndex = 0; - LocationStructureWrapper entry; + AreaStructureWrapper entry; while (mDelegate->GetSupportedLocationByIndex(locationIndex++, entry)) { if (aLocation.IsEqual(entry, config)) @@ -571,34 +571,33 @@ bool Instance::ReportEstimatedEndTimeChange(const DataModel::Nullable return (aEstimatedEndTime.Value() < mEstimatedEndTime.Value()); } -bool Instance::AddSupportedLocation(uint32_t aLocationId, const DataModel::Nullable & aMapId, - const CharSpan & aLocationName, const DataModel::Nullable & aFloorNumber, +bool Instance::AddSupportedLocation(uint32_t aAreaId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, + const DataModel::Nullable & aFloorNumber, const DataModel::Nullable & aAreaType, const DataModel::Nullable & aLandmarkTag, const DataModel::Nullable & aPositionTag, const DataModel::Nullable & aSurfaceTag) { // Create location object for validation. - LocationStructureWrapper aNewLocation(aLocationId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aPositionTag, - aSurfaceTag); + AreaStructureWrapper aNewArea(aAreaId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aPositionTag, aSurfaceTag); // Does device mode allow this attribute to be updated? - if (!mDelegate->IsSupportedLocationsChangeAllowed()) + if (!mDelegate->IsSupportedAreasChangeAllowed()) { return false; } // Check there is space for the entry. - if (mDelegate->GetNumberOfSupportedLocations() >= kMaxNumSupportedLocations) + if (mDelegate->GetNumberOfSupportedAreas() >= kMaxNumSupportedAreas) { - ChipLogError(Zcl, "AddSupportedLocation %u - too many entries", aLocationId); + ChipLogError(Zcl, "AddSupportedLocation %u - too many entries", aAreaId); return false; } // Verify cluster requirements concerning valid fields and field relationships. - if (!IsValidSupportedLocation(aNewLocation)) + if (!IsValidSupportedLocation(aNewArea)) { - ChipLogError(Zcl, "AddSupportedLocation %u - not a valid location object", aNewLocation.locationID); + ChipLogError(Zcl, "AddSupportedLocation %u - not a valid location object", aNewArea.areaID); return false; } @@ -606,24 +605,24 @@ bool Instance::AddSupportedLocation(uint32_t aLocationId, const DataModel::Nulla // If the SupportedMaps attribute is not null, each entry in this list SHALL have a unique value for the combination of the // MapID and LocationInfo fields. If the SupportedMaps attribute is null, each entry in this list SHALL have a unique value for // the LocationInfo field. - if (!IsUniqueSupportedLocation(aNewLocation, false)) + if (!IsUniqueSupportedLocation(aNewArea, false)) { - ChipLogError(Zcl, "AddSupportedLocation %u - not a unique location object", aNewLocation.locationID); + ChipLogError(Zcl, "AddSupportedLocation %u - not a unique location object", aNewArea.areaID); return false; } - // Add the SupportedLocation to the SupportedLocations attribute. + // Add the SupportedLocation to the SupportedAreas attribute. uint32_t ignoredIndex; - if (!mDelegate->AddSupportedLocation(aNewLocation, ignoredIndex)) + if (!mDelegate->AddSupportedLocation(aNewArea, ignoredIndex)) { return false; } - NotifySupportedLocationsChanged(); + NotifySupportedAreasChanged(); return true; } -bool Instance::ModifySupportedLocation(uint32_t aLocationId, const DataModel::Nullable & aMapId, +bool Instance::ModifySupportedLocation(uint32_t aAreaId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, const DataModel::Nullable & aFloorNumber, const DataModel::Nullable & aAreaType, const DataModel::Nullable & aLandmarkTag, @@ -634,10 +633,10 @@ bool Instance::ModifySupportedLocation(uint32_t aLocationId, const DataModel::Nu uint32_t listIndex; // get existing supported location to modify - LocationStructureWrapper supportedLocation; - if (!mDelegate->GetSupportedLocationById(aLocationId, listIndex, supportedLocation)) + AreaStructureWrapper supportedLocation; + if (!mDelegate->GetSupportedLocationById(aAreaId, listIndex, supportedLocation)) { - ChipLogError(Zcl, "ModifySupportedLocation %u - not a supported locationID", aLocationId); + ChipLogError(Zcl, "ModifySupportedLocation %u - not a supported areaID", aAreaId); return false; } @@ -647,7 +646,7 @@ bool Instance::ModifySupportedLocation(uint32_t aLocationId, const DataModel::Nu (!aMapId.IsNull() && !supportedLocation.mapID.IsNull() && (aMapId.Value() != supportedLocation.mapID.Value()))) { // does device mode allow this attribute to be updated? - if (!mDelegate->IsSupportedLocationsChangeAllowed()) + if (!mDelegate->IsSupportedAreasChangeAllowed()) { return false; } @@ -655,26 +654,26 @@ bool Instance::ModifySupportedLocation(uint32_t aLocationId, const DataModel::Nu } // create new location object for validation - LocationStructureWrapper aNewLocation(aLocationId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, - aPositionTag, aSurfaceTag); + AreaStructureWrapper aNewArea(aAreaId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aPositionTag, + aSurfaceTag); // verify cluster requirements concerning valid fields and field relationships - if (!IsValidSupportedLocation(aNewLocation)) + if (!IsValidSupportedLocation(aNewArea)) { - ChipLogError(Zcl, "ModifySupportedLocation %u - not a valid location object", aNewLocation.locationID); + ChipLogError(Zcl, "ModifySupportedLocation %u - not a valid location object", aNewArea.areaID); return false; } // Updated location description must not match another existing location description. - // We ignore comparing the location ID as one of the locations will match this one. - if (!IsUniqueSupportedLocation(aNewLocation, true)) + // We ignore comparing the area ID as one of the locations will match this one. + if (!IsUniqueSupportedLocation(aNewArea, true)) { - ChipLogError(Zcl, "ModifySupportedLocation %u - not a unique location object", aNewLocation.locationID); + ChipLogError(Zcl, "ModifySupportedLocation %u - not a unique location object", aNewArea.areaID); return false; } // Replace the supported location with the modified location. - if (!mDelegate->ModifySupportedLocation(listIndex, aNewLocation)) + if (!mDelegate->ModifySupportedLocation(listIndex, aNewArea)) { return false; } @@ -682,25 +681,25 @@ bool Instance::ModifySupportedLocation(uint32_t aLocationId, const DataModel::Nu if (mapIDChanged) { - mDelegate->HandleSupportedLocationsUpdated(); + mDelegate->HandleSupportedAreasUpdated(); } - NotifySupportedLocationsChanged(); + NotifySupportedAreasChanged(); return true; } -bool Instance::ClearSupportedLocations() +bool Instance::ClearSupportedAreas() { // does device mode allow this attribute to be updated? - if (!mDelegate->IsSupportedLocationsChangeAllowed()) + if (!mDelegate->IsSupportedAreasChangeAllowed()) { return false; } - if (mDelegate->ClearSupportedLocations()) + if (mDelegate->ClearSupportedAreas()) { - mDelegate->HandleSupportedLocationsUpdated(); - NotifySupportedLocationsChanged(); + mDelegate->HandleSupportedAreasUpdated(); + NotifySupportedAreasChanged(); return true; } @@ -834,7 +833,7 @@ bool Instance::ClearSupportedMaps() if (mDelegate->ClearSupportedMaps()) { - ClearSupportedLocations(); + ClearSupportedAreas(); NotifySupportedMapsChanged(); return true; } @@ -848,13 +847,13 @@ bool Instance::ClearSupportedMaps() bool Instance::AddSelectedLocation(uint32_t & aSelectedLocation) { // check max# of list entries - if (mDelegate->GetNumberOfSelectedLocations() >= kMaxNumSelectedLocations) + if (mDelegate->GetNumberOfSelectedAreas() >= kMaxNumSelectedAreas) { ChipLogError(Zcl, "AddSelectedLocation %u - maximum number of entries", aSelectedLocation); return false; } - // each item in this list SHALL match the LocationID field of an entry on the SupportedLocations attribute's list + // each item in this list SHALL match the AreaID field of an entry on the SupportedAreas attribute's list if (!IsSupportedLocation(aSelectedLocation)) { ChipLogError(Zcl, "AddSelectedLocation %u - not a supported location", aSelectedLocation); @@ -872,7 +871,7 @@ bool Instance::AddSelectedLocation(uint32_t & aSelectedLocation) char locationStatusBuffer[kMaxSizeStatusText]; MutableCharSpan locationStatusText(locationStatusBuffer); - if (!mDelegate->IsSetSelectedLocationsAllowed(locationStatusText)) + if (!mDelegate->IsSetSelectedAreasAllowed(locationStatusText)) { ChipLogError(Zcl, "AddSelectedLocation %u - %.*s", aSelectedLocation, static_cast(locationStatusText.size()), locationStatusText.data()); @@ -883,11 +882,11 @@ bool Instance::AddSelectedLocation(uint32_t & aSelectedLocation) return mDelegate->AddSelectedLocation(aSelectedLocation, ignoredIndex); } -bool Instance::ClearSelectedLocations() +bool Instance::ClearSelectedAreas() { - if (mDelegate->ClearSelectedLocations()) + if (mDelegate->ClearSelectedAreas()) { - NotifySelectedLocationsChanged(); + NotifySelectedAreasChanged(); return true; } @@ -897,31 +896,31 @@ bool Instance::ClearSelectedLocations() //************************************************************************* // Current Location manipulators -DataModel::Nullable Instance::GetCurrentLocation() +DataModel::Nullable Instance::GetCurrentArea() { - return mCurrentLocation; + return mCurrentArea; } -bool Instance::SetCurrentLocation(const DataModel::Nullable & aCurrentLocation) +bool Instance::SetCurrentArea(const DataModel::Nullable & aCurrentArea) { - // If not null, the value of this attribute SHALL match the LocationID field of an entry on the SupportedLocations attribute's + // If not null, the value of this attribute SHALL match the AreaID field of an entry on the SupportedAreas attribute's // list. - if ((!aCurrentLocation.IsNull()) && (!IsSupportedLocation(aCurrentLocation.Value()))) + if ((!aCurrentArea.IsNull()) && (!IsSupportedLocation(aCurrentArea.Value()))) { - ChipLogError(Zcl, "SetCurrentLocation %u - location is not supported", aCurrentLocation.Value()); + ChipLogError(Zcl, "SetCurrentArea %u - location is not supported", aCurrentArea.Value()); return false; } - bool notifyChange = mCurrentLocation != aCurrentLocation; + bool notifyChange = mCurrentArea != aCurrentArea; - mCurrentLocation = aCurrentLocation; + mCurrentArea = aCurrentArea; if (notifyChange) { - NotifyCurrentLocationChanged(); + NotifyCurrentAreaChanged(); } - // EstimatedEndTime SHALL be null if the CurrentLocation attribute is null. - if (mCurrentLocation.IsNull()) + // EstimatedEndTime SHALL be null if the CurrentArea attribute is null. + if (mCurrentArea.IsNull()) { SetEstimatedEndTime(DataModel::NullNullable); } @@ -939,8 +938,8 @@ DataModel::Nullable Instance::GetEstimatedEndTime() bool Instance::SetEstimatedEndTime(const DataModel::Nullable & aEstimatedEndTime) { - // EstimatedEndTime SHALL be null if the CurrentLocation attribute is null. - if (mCurrentLocation.IsNull() && !aEstimatedEndTime.IsNull()) + // EstimatedEndTime SHALL be null if the CurrentArea attribute is null. + if (mCurrentArea.IsNull() && !aEstimatedEndTime.IsNull()) { ChipLogError(Zcl, "SetEstimatedEndTime - must be null if Current Location is null"); return false; @@ -962,10 +961,10 @@ bool Instance::SetEstimatedEndTime(const DataModel::Nullable & aEstima //************************************************************************* // Progress list manipulators -bool Instance::AddPendingProgressElement(uint32_t aLocationId) +bool Instance::AddPendingProgressElement(uint32_t aAreaId) { // create progress element - Structs::ProgressStruct::Type inactiveProgress = { aLocationId, OperationalStatusEnum::kPending }; + Structs::ProgressStruct::Type inactiveProgress = { aAreaId, OperationalStatusEnum::kPending }; // check max# of list entries if (mDelegate->GetNumberOfProgressElements() >= kMaxNumProgressElements) @@ -974,17 +973,17 @@ bool Instance::AddPendingProgressElement(uint32_t aLocationId) return false; } - // For each entry in this list, the LocationID field SHALL match an entry on the SupportedLocations attribute's list. - if (!IsSupportedLocation(aLocationId)) + // For each entry in this list, the AreaID field SHALL match an entry on the SupportedAreas attribute's list. + if (!IsSupportedLocation(aAreaId)) { - ChipLogError(Zcl, "AddPendingProgressElement - not a supported location %u", aLocationId); + ChipLogError(Zcl, "AddPendingProgressElement - not a supported location %u", aAreaId); return false; } - // Each entry in this list SHALL have a unique value for the LocationID field. - if (mDelegate->IsProgressElement(aLocationId)) + // Each entry in this list SHALL have a unique value for the AreaID field. + if (mDelegate->IsProgressElement(aAreaId)) { - ChipLogError(Zcl, "AddPendingProgressElement - progress element already exists for location %u", aLocationId); + ChipLogError(Zcl, "AddPendingProgressElement - progress element already exists for location %u", aAreaId); return false; } @@ -999,14 +998,14 @@ bool Instance::AddPendingProgressElement(uint32_t aLocationId) return true; } -bool Instance::SetProgressStatus(uint32_t aLocationId, OperationalStatusEnum opStatus) +bool Instance::SetProgressStatus(uint32_t aAreaId, OperationalStatusEnum opStatus) { uint32_t listIndex; Structs::ProgressStruct::Type progressElement; - if (!mDelegate->GetProgressElementById(aLocationId, listIndex, progressElement)) + if (!mDelegate->GetProgressElementById(aAreaId, listIndex, progressElement)) { - ChipLogError(Zcl, "SetProgressStatus - progress element does not exist for location %u", aLocationId); + ChipLogError(Zcl, "SetProgressStatus - progress element does not exist for location %u", aAreaId); return false; } @@ -1035,14 +1034,14 @@ bool Instance::SetProgressStatus(uint32_t aLocationId, OperationalStatusEnum opS return true; } -bool Instance::SetProgressTotalOperationalTime(uint32_t aLocationId, const DataModel::Nullable & aTotalOperationalTime) +bool Instance::SetProgressTotalOperationalTime(uint32_t aAreaId, const DataModel::Nullable & aTotalOperationalTime) { uint32_t listIndex; Structs::ProgressStruct::Type progressElement; - if (!mDelegate->GetProgressElementById(aLocationId, listIndex, progressElement)) + if (!mDelegate->GetProgressElementById(aAreaId, listIndex, progressElement)) { - ChipLogError(Zcl, "SetProgressTotalOperationalTime - progress element does not exist for location %u", aLocationId); + ChipLogError(Zcl, "SetProgressTotalOperationalTime - progress element does not exist for location %u", aAreaId); return false; } @@ -1060,7 +1059,7 @@ bool Instance::SetProgressTotalOperationalTime(uint32_t aLocationId, const DataM ChipLogError(Zcl, "SetProgressTotalOperationalTime - location %u opStatus value %u - can be non-null only if opStatus is " "Completed or Skipped", - aLocationId, to_underlying(progressElement.status)); + aAreaId, to_underlying(progressElement.status)); return false; } @@ -1077,14 +1076,14 @@ bool Instance::SetProgressTotalOperationalTime(uint32_t aLocationId, const DataM return true; } -bool Instance::SetProgressEstimatedTime(uint32_t aLocationId, const DataModel::Nullable & aEstimatedTime) +bool Instance::SetProgressEstimatedTime(uint32_t aAreaId, const DataModel::Nullable & aEstimatedTime) { uint32_t listIndex; Structs::ProgressStruct::Type progressElement; - if (!mDelegate->GetProgressElementById(aLocationId, listIndex, progressElement)) + if (!mDelegate->GetProgressElementById(aAreaId, listIndex, progressElement)) { - ChipLogError(Zcl, "SetProgressEstimatedTime - progress element does not exist for location %u", aLocationId); + ChipLogError(Zcl, "SetProgressEstimatedTime - progress element does not exist for location %u", aAreaId); return false; } diff --git a/src/app/clusters/service-area-server/service-area-server.h b/src/app/clusters/service-area-server/service-area-server.h index d781987c8d26dd..90cf4275cf3871 100644 --- a/src/app/clusters/service-area-server/service-area-server.h +++ b/src/app/clusters/service-area-server/service-area-server.h @@ -79,7 +79,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface ClusterId mClusterId; // Attribute Data Store - DataModel::Nullable mCurrentLocation; + DataModel::Nullable mCurrentArea; DataModel::Nullable mEstimatedEndTime; BitMask mFeature; @@ -101,11 +101,11 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface //************************************************************************* // attribute readers - CHIP_ERROR ReadSupportedLocations(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadSupportedAreas(chip::app::AttributeValueEncoder & aEncoder); CHIP_ERROR ReadSupportedMaps(chip::app::AttributeValueEncoder & aEncoder); - CHIP_ERROR ReadSelectedLocations(chip::app::AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadSelectedAreas(chip::app::AttributeValueEncoder & aEncoder); CHIP_ERROR ReadProgress(chip::app::AttributeValueEncoder & aEncoder); @@ -117,21 +117,21 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface * If the input value is invalid, returns the Interaction Model status code of INVALID_COMMAND. * @param[in] req the command parameters */ - void HandleSelectLocationsCmd(HandlerContext & ctx, const Commands::SelectLocations::DecodableType & req); + void HandleSelectAreasCmd(HandlerContext & ctx, const Commands::SelectAreas::DecodableType & req); /** * @param[in, out] ctx Returns the Interaction Model status code which was user determined in the business logic. * If the input value is invalid, returns the Interaction Model status code of INVALID_COMMAND. */ - void HandleSkipCurrentLocationCmd(HandlerContext & ctx); + void HandleSkipCurrentAreaCmd(HandlerContext & ctx); //************************************************************************* // attribute notifications - void NotifySupportedLocationsChanged(); + void NotifySupportedAreasChanged(); void NotifySupportedMapsChanged(); - void NotifySelectedLocationsChanged(); - void NotifyCurrentLocationChanged(); + void NotifySelectedAreasChanged(); + void NotifyCurrentAreaChanged(); void NotifyEstimatedEndTimeChanged(); void NotifyProgressChanged(); @@ -139,25 +139,25 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface // Supported Locations manipulators /** - * @return true if a location with the aLocationId ID exists in the supported locations attribute. False otherwise. + * @return true if a location with the aAreaId ID exists in the supported locations attribute. False otherwise. */ - bool IsSupportedLocation(uint32_t aLocationId); + bool IsSupportedLocation(uint32_t aAreaId); /** * @brief Check if the given location adheres to the restrictions required by the supported locations attribute. * @return true if the aLocation meets all checks. */ - bool IsValidSupportedLocation(const LocationStructureWrapper & aLocation); + bool IsValidSupportedLocation(const AreaStructureWrapper & aLocation); /** * @brief check if aLocation is unique with regard to supported locations. * @param[in] aLocation the location to check. - * @param[out] ignoreLocationId if true, we do not check if the location ID is unique. + * @param[out] ignoreAreaId if true, we do not check if the area ID is unique. * @return true if there isn't a location in supported locations that matches aLocation. * * @note This method may ignore checking the MapId uniqueness. This depends on whether the SupportedMaps attribute is null. */ - bool IsUniqueSupportedLocation(const LocationStructureWrapper & aLocation, bool ignoreLocationId); + bool IsUniqueSupportedLocation(const AreaStructureWrapper & aLocation, bool ignoreAreaId); /** * @brief Check if changing the estimated end time attribute to aEstimatedEndTime requires the change to be reported. @@ -169,7 +169,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface public: /** * @brief Add new location to the supported locations list. - * @param[in] aLocationId unique identifier of this location. + * @param[in] aAreaId unique identifier of this location. * @param[in] aMapId identifier of supported map. * @param[in] aLocationName human readable name for this location (empty string if not used). * @param[in] aFloorNumber represents floor level - negative values for below ground. @@ -182,7 +182,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface * * @note if aLocationName is larger than kLocationNameMaxSize, it will be truncated. */ - bool AddSupportedLocation(uint32_t aLocationId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, + bool AddSupportedLocation(uint32_t aAreaId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, const DataModel::Nullable & aFloorNumber, const DataModel::Nullable & aAreaType, const DataModel::Nullable & aLandmarkTag, @@ -191,7 +191,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface /** * @brief Modify/replace an existing location in the supported locations list. - * @param[in] aLocationId unique identifier of this location. + * @param[in] aAreaId unique identifier of this location. * @param[in] aMapId identifier of supported map (will not be modified). * @param[in] aLocationName human readable name for this location (empty string if not used). * @param[in] aFloorNumber represents floor level - negative values for below ground. @@ -204,9 +204,9 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface * location was modified. * * @note if aLocationName is larger than kLocationNameMaxSize, it will be truncated. - * @note if mapID is changed, the delegate's HandleSupportedLocationsUpdated method is called. + * @note if mapID is changed, the delegate's HandleSupportedAreasUpdated method is called. */ - bool ModifySupportedLocation(uint32_t aLocationId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, + bool ModifySupportedLocation(uint32_t aAreaId, const DataModel::Nullable & aMapId, const CharSpan & aLocationName, const DataModel::Nullable & aFloorNumber, const DataModel::Nullable & aAreaType, const DataModel::Nullable & aLandmarkTag, @@ -214,11 +214,11 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface const DataModel::Nullable & aSurfaceTag); /** - * @return true if the SupportedLocations attribute was not already null. + * @return true if the SupportedAreas attribute was not already null. * - * @note if SupportedLocations is cleared, the delegate's HandleSupportedLocationsUpdated method is called. + * @note if SupportedAreas is cleared, the delegate's HandleSupportedAreasUpdated method is called. */ - bool ClearSupportedLocations(); + bool ClearSupportedAreas(); //************************************************************************* // Supported Maps manipulators @@ -249,7 +249,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface /** * @return true if the SupportedMaps attribute was not already null. * - * @note if SupportedMaps is cleared, the delegate's HandleSupportedLocationsUpdated method is called. + * @note if SupportedMaps is cleared, the delegate's HandleSupportedAreasUpdated method is called. */ bool ClearSupportedMaps(); @@ -258,42 +258,42 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface /** * @brief Add a selected location. - * @param[in] aSelectedLocation The locationID to add. + * @param[in] aSelectedLocation The areaID to add. * @bool true if successfully added. */ bool AddSelectedLocation(uint32_t & aSelectedLocation); /** - * @return true if the SelectedLocations attribute was not already null. + * @return true if the SelectedAreas attribute was not already null. */ - bool ClearSelectedLocations(); + bool ClearSelectedAreas(); //************************************************************************* // Current Location manipulators - DataModel::Nullable GetCurrentLocation(); + DataModel::Nullable GetCurrentArea(); /** - * @param[in] aCurrentLocation The location ID that the CurrentLocation attribute should be set to. Must be a supported location + * @param[in] aCurrentArea The area ID that the CurrentArea attribute should be set to. Must be a supported location * or NULL. * @return true if the current location is set, false otherwise. * * @note if current location is set to null, estimated end time will be set to null. */ - bool SetCurrentLocation(const DataModel::Nullable & aCurrentLocation); + bool SetCurrentArea(const DataModel::Nullable & aCurrentArea); //************************************************************************* // Estimated End Time manipulators /** - * @return The estimated epoch time in seconds when operation at the location indicated by the CurrentLocation attribute will be + * @return The estimated epoch time in seconds when operation at the location indicated by the CurrentArea attribute will be * completed. */ DataModel::Nullable GetEstimatedEndTime(); /** * @param[in] aEstimatedEndTime The estimated epoch time in seconds when operation at the location indicated by the - * CurrentLocation attribute will be completed. + * CurrentArea attribute will be completed. * @return true if attribute is set, false otherwise. */ bool SetEstimatedEndTime(const DataModel::Nullable & aEstimatedEndTime); @@ -303,36 +303,36 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface /** * @brief Add a progress element in a pending status to the progress list. - * @param[in] aLocationId location id of the progress element. + * @param[in] aAreaId location id of the progress element. * @return true if the new progress element passed validation checks and was successfully added to the list, false otherwise. */ - bool AddPendingProgressElement(uint32_t aLocationId); + bool AddPendingProgressElement(uint32_t aAreaId); /** - * @brief Set the status of progress element identified by locationID. - * @param[in] aLocationId The locationID of the progress element to update. + * @brief Set the status of progress element identified by areaID. + * @param[in] aAreaId The areaID of the progress element to update. * @param[in] status The location cluster operation status for this location. * @return true if progress element is found and status is set, false otherwise. * * @note TotalOperationalTime is set to null if resulting opStatus is not equal to Completed or Skipped. */ - bool SetProgressStatus(uint32_t aLocationId, OperationalStatusEnum opStatus); + bool SetProgressStatus(uint32_t aAreaId, OperationalStatusEnum opStatus); /** - * @brief Set the total operational time for the progress element identified by locationID. - * @param[in] aLocationId The locationID of the progress element to update. + * @brief Set the total operational time for the progress element identified by areaID. + * @param[in] aAreaId The areaID of the progress element to update. * @param[in] aTotalOperationalTime The total operational time for this location. * @return true if progress element is found and operational time is set, false otherwise. */ - bool SetProgressTotalOperationalTime(uint32_t aLocationId, const DataModel::Nullable & aTotalOperationalTime); + bool SetProgressTotalOperationalTime(uint32_t aAreaId, const DataModel::Nullable & aTotalOperationalTime); /** - * @brief Set the estimated time for the progress element identified by locationID. - * @param[in] aLocationId The locationID of the progress element to update. + * @brief Set the estimated time for the progress element identified by areaID. + * @param[in] aAreaId The areaID of the progress element to update. * @param[in] aEstimatedTime The estimated time for this location. * @return true if progress element is found and estimated time is set, false otherwise. */ - bool SetProgressEstimatedTime(uint32_t aLocationId, const DataModel::Nullable & aEstimatedTime); + bool SetProgressEstimatedTime(uint32_t aAreaId, const DataModel::Nullable & aEstimatedTime); /** * @return true if the progress list was not already null, false otherwise. diff --git a/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml index 3332172500e451..f78e8966a11b94 100644 --- a/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/service-area-cluster.xml @@ -18,7 +18,7 @@ limitations under the License. Data types - + @@ -32,11 +32,11 @@ limitations under the License. - + - - - + + + @@ -49,25 +49,25 @@ limitations under the License. - + - + - - + + - + - + @@ -88,41 +88,41 @@ limitations under the License. - SupportedLocations + SupportedAreas SupportedMaps - SelectedLocations - CurrentLocation + SelectedAreas + CurrentArea EstimatedEndTime - Progress + Progress - + - Command used to select a set of device locations, where the device is to operate + Command used to select a set of device areas, where the device is to operate. - + - + - This command is sent by the device on receipt of the SelectLocations command. + This command is sent by the device on receipt of the SelectAreas command. - + - + - This command is used to skip the current location where the device operates. + This command is used to skip an area where the device operates. - + - This command is sent by the device on receipt of the SelectLocations command. + This command is sent by the device on receipt of the SkipArea command. - - + + diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index d826188bbfd700..3a19eba34b745a 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -681,7 +681,7 @@ "ThreadNetworks", "ThreadNetworkTableSize" ], - "Service Area": ["CurrentLocation", "EstimatedEndTime", "FeatureMap"] + "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index a5d48c88b540a0..4714e240bbf3a3 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -679,7 +679,7 @@ "ThreadNetworks", "ThreadNetworkTableSize" ], - "Service Area": ["CurrentLocation", "EstimatedEndTime", "FeatureMap"] + "Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"] }, "defaultReportingPolicy": "mandatory", "ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"], diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 62cb544805beff..c32f6412acdee0 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6443,17 +6443,17 @@ provisional cluster ServiceArea = 336 { kCompleted = 3; } - enum SelectLocationsStatus : enum8 { + enum SelectAreasStatus : enum8 { kSuccess = 0; - kUnsupportedLocation = 1; - kDuplicatedLocations = 2; + kUnsupportedArea = 1; + kDuplicatedAreas = 2; kInvalidInMode = 3; kInvalidSet = 4; } - enum SkipCurrentLocationStatus : enum8 { + enum SkipAreaStatus : enum8 { kSuccess = 0; - kInvalidLocationList = 1; + kInvalidAreaList = 1; kInvalidInMode = 2; } @@ -6462,17 +6462,17 @@ provisional cluster ServiceArea = 336 { kSelectWhileRunning = 0x2; } - struct LocationInfoStruct { + struct AreaInfoStruct { nullable LocationDescriptorStruct locationInfo = 0; nullable LandmarkTag landmarkTag = 1; nullable PositionTag positionTag = 2; nullable FloorSurfaceTag surfaceTag = 3; } - struct LocationStruct { - int32u locationID = 0; + struct AreaStruct { + int32u areaID = 0; nullable int8u mapID = 1; - LocationInfoStruct locationInfo = 2; + AreaInfoStruct areaDesc = 2; } struct MapStruct { @@ -6481,16 +6481,16 @@ provisional cluster ServiceArea = 336 { } struct ProgressStruct { - int32u locationID = 0; + int32u areaID = 0; OperationalStatusEnum status = 1; optional nullable elapsed_s totalOperationalTime = 2; optional nullable elapsed_s estimatedTime = 3; } - readonly attribute LocationStruct supportedLocations[] = 0; + readonly attribute AreaStruct supportedAreas[] = 0; readonly attribute nullable MapStruct supportedMaps[] = 1; - readonly attribute nullable int32u selectedLocations[] = 2; - readonly attribute optional nullable int32u currentLocation = 3; + readonly attribute nullable int32u selectedAreas[] = 2; + readonly attribute optional nullable int32u currentArea = 3; readonly attribute optional nullable epoch_s estimatedEndTime = 4; readonly attribute optional nullable ProgressStruct progress[] = 5; readonly attribute command_id generatedCommandList[] = 65528; @@ -6500,24 +6500,24 @@ provisional cluster ServiceArea = 336 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - request struct SelectLocationsRequest { - nullable int32u newLocations[] = 0; + request struct SelectAreasRequest { + nullable int32u newAreas[] = 0; } - response struct SelectLocationsResponse = 1 { - SelectLocationsStatus status = 0; + response struct SelectAreasResponse = 1 { + SelectAreasStatus status = 0; optional char_string<256> statusText = 1; } - response struct SkipCurrentLocationResponse = 3 { - SkipCurrentLocationStatus status = 0; + response struct SkipAreaResponse = 3 { + SkipAreaStatus status = 0; optional char_string<256> statusText = 1; } - /** Command used to select a set of device locations, where the device is to operate */ - command SelectLocations(SelectLocationsRequest): SelectLocationsResponse = 0; - /** This command is used to skip the current location where the device operates. */ - command SkipCurrentLocation(): SkipCurrentLocationResponse = 2; + /** Command used to select a set of device areas, where the device is to operate. */ + command SelectAreas(SelectAreasRequest): SelectAreasResponse = 0; + /** This command is used to skip an area where the device operates. */ + command SkipArea(): SkipAreaResponse = 2; } /** An interface for configuring and controlling pumps. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index e8ba5badd39616..2ae10832fd10da 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -39050,10 +39050,10 @@ public void onSuccess(byte[] tlv) { public static class ServiceAreaCluster extends BaseChipCluster { public static final long CLUSTER_ID = 336L; - private static final long SUPPORTED_LOCATIONS_ATTRIBUTE_ID = 0L; + private static final long SUPPORTED_AREAS_ATTRIBUTE_ID = 0L; private static final long SUPPORTED_MAPS_ATTRIBUTE_ID = 1L; - private static final long SELECTED_LOCATIONS_ATTRIBUTE_ID = 2L; - private static final long CURRENT_LOCATION_ATTRIBUTE_ID = 3L; + private static final long SELECTED_AREAS_ATTRIBUTE_ID = 2L; + private static final long CURRENT_AREA_ATTRIBUTE_ID = 3L; private static final long ESTIMATED_END_TIME_ATTRIBUTE_ID = 4L; private static final long PROGRESS_ATTRIBUTE_ID = 5L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; @@ -39073,17 +39073,17 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void selectLocations(SelectLocationsResponseCallback callback, @Nullable ArrayList newLocations) { - selectLocations(callback, newLocations, 0); + public void selectAreas(SelectAreasResponseCallback callback, @Nullable ArrayList newAreas) { + selectAreas(callback, newAreas, 0); } - public void selectLocations(SelectLocationsResponseCallback callback, @Nullable ArrayList newLocations, int timedInvokeTimeoutMs) { + public void selectAreas(SelectAreasResponseCallback callback, @Nullable ArrayList newAreas, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long newLocationsFieldID = 0L; - BaseTLVType newLocationstlvValue = newLocations != null ? ArrayType.generateArrayType(newLocations, (elementnewLocations) -> new UIntType(elementnewLocations)) : new NullType(); - elements.add(new StructElement(newLocationsFieldID, newLocationstlvValue)); + final long newAreasFieldID = 0L; + BaseTLVType newAreastlvValue = newAreas != null ? ArrayType.generateArrayType(newAreas, (elementnewAreas) -> new UIntType(elementnewAreas)) : new NullType(); + elements.add(new StructElement(newAreasFieldID, newAreastlvValue)); StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @@ -39110,11 +39110,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void skipCurrentLocation(SkipCurrentLocationResponseCallback callback) { - skipCurrentLocation(callback, 0); + public void skipArea(SkipAreaResponseCallback callback) { + skipArea(callback, 0); } - public void skipCurrentLocation(SkipCurrentLocationResponseCallback callback, int timedInvokeTimeoutMs) { + public void skipArea(SkipAreaResponseCallback callback, int timedInvokeTimeoutMs) { final long commandId = 2L; ArrayList elements = new ArrayList<>(); @@ -39143,27 +39143,27 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public interface SelectLocationsResponseCallback extends BaseClusterCallback { + public interface SelectAreasResponseCallback extends BaseClusterCallback { void onSuccess(Integer status, Optional statusText); } - public interface SkipCurrentLocationResponseCallback extends BaseClusterCallback { + public interface SkipAreaResponseCallback extends BaseClusterCallback { void onSuccess(Integer status, Optional statusText); } - public interface SupportedLocationsAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface SupportedAreasAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); } public interface SupportedMapsAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable List value); } - public interface SelectedLocationsAttributeCallback extends BaseAttributeCallback { + public interface SelectedAreasAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable List value); } - public interface CurrentLocationAttributeCallback extends BaseAttributeCallback { + public interface CurrentAreaAttributeCallback extends BaseAttributeCallback { void onSuccess(@Nullable Long value); } @@ -39191,30 +39191,30 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readSupportedLocationsAttribute( - SupportedLocationsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_LOCATIONS_ATTRIBUTE_ID); + public void readSupportedAreasAttribute( + SupportedAreasAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_AREAS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_LOCATIONS_ATTRIBUTE_ID, true); + }, SUPPORTED_AREAS_ATTRIBUTE_ID, true); } - public void subscribeSupportedLocationsAttribute( - SupportedLocationsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_LOCATIONS_ATTRIBUTE_ID); + public void subscribeSupportedAreasAttribute( + SupportedAreasAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_AREAS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SUPPORTED_LOCATIONS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SUPPORTED_AREAS_ATTRIBUTE_ID, minInterval, maxInterval); } public void readSupportedMapsAttribute( @@ -39243,9 +39243,9 @@ public void onSuccess(byte[] tlv) { }, SUPPORTED_MAPS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readSelectedLocationsAttribute( - SelectedLocationsAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_LOCATIONS_ATTRIBUTE_ID); + public void readSelectedAreasAttribute( + SelectedAreasAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_AREAS_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -39253,12 +39253,12 @@ public void onSuccess(byte[] tlv) { @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SELECTED_LOCATIONS_ATTRIBUTE_ID, true); + }, SELECTED_AREAS_ATTRIBUTE_ID, true); } - public void subscribeSelectedLocationsAttribute( - SelectedLocationsAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_LOCATIONS_ATTRIBUTE_ID); + public void subscribeSelectedAreasAttribute( + SelectedAreasAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_AREAS_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -39266,12 +39266,12 @@ public void onSuccess(byte[] tlv) { @Nullable List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, SELECTED_LOCATIONS_ATTRIBUTE_ID, minInterval, maxInterval); + }, SELECTED_AREAS_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readCurrentLocationAttribute( - CurrentLocationAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LOCATION_ATTRIBUTE_ID); + public void readCurrentAreaAttribute( + CurrentAreaAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_AREA_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -39279,12 +39279,12 @@ public void onSuccess(byte[] tlv) { @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_LOCATION_ATTRIBUTE_ID, true); + }, CURRENT_AREA_ATTRIBUTE_ID, true); } - public void subscribeCurrentLocationAttribute( - CurrentLocationAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_LOCATION_ATTRIBUTE_ID); + public void subscribeCurrentAreaAttribute( + CurrentAreaAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_AREA_ATTRIBUTE_ID); subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -39292,7 +39292,7 @@ public void onSuccess(byte[] tlv) { @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, CURRENT_LOCATION_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_AREA_ATTRIBUTE_ID, minInterval, maxInterval); } public void readEstimatedEndTimeAttribute( diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 9e32eaab03ffac..330ee797fb6ecb 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -9171,7 +9171,7 @@ public String toString() { return output.toString(); } } -public static class ServiceAreaClusterLocationInfoStruct { +public static class ServiceAreaClusterAreaInfoStruct { public @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo; public @Nullable Integer landmarkTag; public @Nullable Integer positionTag; @@ -9181,7 +9181,7 @@ public static class ServiceAreaClusterLocationInfoStruct { private static final long POSITION_TAG_ID = 2L; private static final long SURFACE_TAG_ID = 3L; - public ServiceAreaClusterLocationInfoStruct( + public ServiceAreaClusterAreaInfoStruct( @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo, @Nullable Integer landmarkTag, @Nullable Integer positionTag, @@ -9203,7 +9203,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static ServiceAreaClusterLocationInfoStruct decodeTlv(BaseTLVType tlvValue) { + public static ServiceAreaClusterAreaInfoStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -9234,7 +9234,7 @@ public static ServiceAreaClusterLocationInfoStruct decodeTlv(BaseTLVType tlvValu } } } - return new ServiceAreaClusterLocationInfoStruct( + return new ServiceAreaClusterAreaInfoStruct( locationInfo, landmarkTag, positionTag, @@ -9245,7 +9245,7 @@ public static ServiceAreaClusterLocationInfoStruct decodeTlv(BaseTLVType tlvValu @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ServiceAreaClusterLocationInfoStruct {\n"); + output.append("ServiceAreaClusterAreaInfoStruct {\n"); output.append("\tlocationInfo: "); output.append(locationInfo); output.append("\n"); @@ -9262,77 +9262,77 @@ public String toString() { return output.toString(); } } -public static class ServiceAreaClusterLocationStruct { - public Long locationID; +public static class ServiceAreaClusterAreaStruct { + public Long areaID; public @Nullable Integer mapID; - public ChipStructs.ServiceAreaClusterLocationInfoStruct locationInfo; - private static final long LOCATION_I_D_ID = 0L; + public ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc; + private static final long AREA_I_D_ID = 0L; private static final long MAP_I_D_ID = 1L; - private static final long LOCATION_INFO_ID = 2L; + private static final long AREA_DESC_ID = 2L; - public ServiceAreaClusterLocationStruct( - Long locationID, + public ServiceAreaClusterAreaStruct( + Long areaID, @Nullable Integer mapID, - ChipStructs.ServiceAreaClusterLocationInfoStruct locationInfo + ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc ) { - this.locationID = locationID; + this.areaID = areaID; this.mapID = mapID; - this.locationInfo = locationInfo; + this.areaDesc = areaDesc; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(LOCATION_I_D_ID, new UIntType(locationID))); + values.add(new StructElement(AREA_I_D_ID, new UIntType(areaID))); values.add(new StructElement(MAP_I_D_ID, mapID != null ? new UIntType(mapID) : new NullType())); - values.add(new StructElement(LOCATION_INFO_ID, locationInfo.encodeTlv())); + values.add(new StructElement(AREA_DESC_ID, areaDesc.encodeTlv())); return new StructType(values); } - public static ServiceAreaClusterLocationStruct decodeTlv(BaseTLVType tlvValue) { + public static ServiceAreaClusterAreaStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Long locationID = null; + Long areaID = null; @Nullable Integer mapID = null; - ChipStructs.ServiceAreaClusterLocationInfoStruct locationInfo = null; + ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc = null; for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == LOCATION_I_D_ID) { + if (element.contextTagNum() == AREA_I_D_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - locationID = castingValue.value(Long.class); + areaID = castingValue.value(Long.class); } } else if (element.contextTagNum() == MAP_I_D_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); mapID = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == LOCATION_INFO_ID) { + } else if (element.contextTagNum() == AREA_DESC_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - locationInfo = ChipStructs.ServiceAreaClusterLocationInfoStruct.decodeTlv(castingValue); + areaDesc = ChipStructs.ServiceAreaClusterAreaInfoStruct.decodeTlv(castingValue); } } } - return new ServiceAreaClusterLocationStruct( - locationID, + return new ServiceAreaClusterAreaStruct( + areaID, mapID, - locationInfo + areaDesc ); } @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ServiceAreaClusterLocationStruct {\n"); - output.append("\tlocationID: "); - output.append(locationID); + output.append("ServiceAreaClusterAreaStruct {\n"); + output.append("\tareaID: "); + output.append(areaID); output.append("\n"); output.append("\tmapID: "); output.append(mapID); output.append("\n"); - output.append("\tlocationInfo: "); - output.append(locationInfo); + output.append("\tareaDesc: "); + output.append(areaDesc); output.append("\n"); output.append("}\n"); return output.toString(); @@ -9400,22 +9400,22 @@ public String toString() { } } public static class ServiceAreaClusterProgressStruct { - public Long locationID; + public Long areaID; public Integer status; public @Nullable Optional totalOperationalTime; public @Nullable Optional estimatedTime; - private static final long LOCATION_I_D_ID = 0L; + private static final long AREA_I_D_ID = 0L; private static final long STATUS_ID = 1L; private static final long TOTAL_OPERATIONAL_TIME_ID = 2L; private static final long ESTIMATED_TIME_ID = 3L; public ServiceAreaClusterProgressStruct( - Long locationID, + Long areaID, Integer status, @Nullable Optional totalOperationalTime, @Nullable Optional estimatedTime ) { - this.locationID = locationID; + this.areaID = areaID; this.status = status; this.totalOperationalTime = totalOperationalTime; this.estimatedTime = estimatedTime; @@ -9423,7 +9423,7 @@ public ServiceAreaClusterProgressStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(LOCATION_I_D_ID, new UIntType(locationID))); + values.add(new StructElement(AREA_I_D_ID, new UIntType(areaID))); values.add(new StructElement(STATUS_ID, new UIntType(status))); values.add(new StructElement(TOTAL_OPERATIONAL_TIME_ID, totalOperationalTime != null ? totalOperationalTime.map((nonOptionaltotalOperationalTime) -> new UIntType(nonOptionaltotalOperationalTime)).orElse(new EmptyType()) : new NullType())); values.add(new StructElement(ESTIMATED_TIME_ID, estimatedTime != null ? estimatedTime.map((nonOptionalestimatedTime) -> new UIntType(nonOptionalestimatedTime)).orElse(new EmptyType()) : new NullType())); @@ -9435,15 +9435,15 @@ public static ServiceAreaClusterProgressStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Long locationID = null; + Long areaID = null; Integer status = null; @Nullable Optional totalOperationalTime = null; @Nullable Optional estimatedTime = null; for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == LOCATION_I_D_ID) { + if (element.contextTagNum() == AREA_I_D_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - locationID = castingValue.value(Long.class); + areaID = castingValue.value(Long.class); } } else if (element.contextTagNum() == STATUS_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9463,7 +9463,7 @@ public static ServiceAreaClusterProgressStruct decodeTlv(BaseTLVType tlvValue) { } } return new ServiceAreaClusterProgressStruct( - locationID, + areaID, status, totalOperationalTime, estimatedTime @@ -9474,8 +9474,8 @@ public static ServiceAreaClusterProgressStruct decodeTlv(BaseTLVType tlvValue) { public String toString() { StringBuilder output = new StringBuilder(); output.append("ServiceAreaClusterProgressStruct {\n"); - output.append("\tlocationID: "); - output.append(locationID); + output.append("\tareaID: "); + output.append(areaID); output.append("\n"); output.append("\tstatus: "); output.append(status); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index bad71209a40272..0f5e910682a659 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -11634,10 +11634,10 @@ public long getID() { } public enum Attribute { - SupportedLocations(0L), + SupportedAreas(0L), SupportedMaps(1L), - SelectedLocations(2L), - CurrentLocation(3L), + SelectedAreas(2L), + CurrentArea(3L), EstimatedEndTime(4L), Progress(5L), GeneratedCommandList(65528L), @@ -11686,8 +11686,8 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - SelectLocations(0L), - SkipCurrentLocation(2L),; + SelectAreas(0L), + SkipArea(2L),; private final long id; Command(long id) { this.id = id; @@ -11705,17 +11705,17 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SelectLocationsCommandField {NewLocations(0),; + }public enum SelectAreasCommandField {NewAreas(0),; private final int id; - SelectLocationsCommandField(int id) { + SelectAreasCommandField(int id) { this.id = id; } public int getID() { return id; } - public static SelectLocationsCommandField value(int id) throws NoSuchFieldError { - for (SelectLocationsCommandField field : SelectLocationsCommandField.values()) { + public static SelectAreasCommandField value(int id) throws NoSuchFieldError { + for (SelectAreasCommandField field : SelectAreasCommandField.values()) { if (field.getID() == id) { return field; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 1d398ff42e2c9d..44faa837ffff66 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -13117,7 +13117,7 @@ public void onError(Exception ex) { } - public static class DelegatedServiceAreaClusterSelectLocationsResponseCallback implements ChipClusters.ServiceAreaCluster.SelectLocationsResponseCallback, DelegatedClusterCallback { + public static class DelegatedServiceAreaClusterSelectAreasResponseCallback implements ChipClusters.ServiceAreaCluster.SelectAreasResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13141,7 +13141,7 @@ public void onError(Exception error) { } } - public static class DelegatedServiceAreaClusterSkipCurrentLocationResponseCallback implements ChipClusters.ServiceAreaCluster.SkipCurrentLocationResponseCallback, DelegatedClusterCallback { + public static class DelegatedServiceAreaClusterSkipAreaResponseCallback implements ChipClusters.ServiceAreaCluster.SkipAreaResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13164,7 +13164,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedServiceAreaClusterSupportedLocationsAttributeCallback implements ChipClusters.ServiceAreaCluster.SupportedLocationsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedServiceAreaClusterSupportedAreasAttributeCallback implements ChipClusters.ServiceAreaCluster.SupportedAreasAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13172,9 +13172,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(List valueList) { + public void onSuccess(List valueList) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -13206,7 +13206,7 @@ public void onError(Exception ex) { } } - public static class DelegatedServiceAreaClusterSelectedLocationsAttributeCallback implements ChipClusters.ServiceAreaCluster.SelectedLocationsAttributeCallback, DelegatedClusterCallback { + public static class DelegatedServiceAreaClusterSelectedAreasAttributeCallback implements ChipClusters.ServiceAreaCluster.SelectedAreasAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -13227,7 +13227,7 @@ public void onError(Exception ex) { } } - public static class DelegatedServiceAreaClusterCurrentLocationAttributeCallback implements ChipClusters.ServiceAreaCluster.CurrentLocationAttributeCallback, DelegatedClusterCallback { + public static class DelegatedServiceAreaClusterCurrentAreaAttributeCallback implements ChipClusters.ServiceAreaCluster.CurrentAreaAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -26918,35 +26918,35 @@ public Map> getCommandMap() { Map serviceAreaClusterInteractionInfoMap = new LinkedHashMap<>(); - Map serviceAreaselectLocationsCommandParams = new LinkedHashMap(); + Map serviceAreaselectAreasCommandParams = new LinkedHashMap(); - CommandParameterInfo serviceAreaselectLocationsnewLocationsCommandParameterInfo = new CommandParameterInfo("newLocations", ArrayList.class, ArrayList.class); - serviceAreaselectLocationsCommandParams.put("newLocations",serviceAreaselectLocationsnewLocationsCommandParameterInfo); - InteractionInfo serviceAreaselectLocationsInteractionInfo = new InteractionInfo( + CommandParameterInfo serviceAreaselectAreasnewAreasCommandParameterInfo = new CommandParameterInfo("newAreas", ArrayList.class, ArrayList.class); + serviceAreaselectAreasCommandParams.put("newAreas",serviceAreaselectAreasnewAreasCommandParameterInfo); + InteractionInfo serviceAreaselectAreasInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ServiceAreaCluster) cluster) - .selectLocations((ChipClusters.ServiceAreaCluster.SelectLocationsResponseCallback) callback + .selectAreas((ChipClusters.ServiceAreaCluster.SelectAreasResponseCallback) callback , (ArrayList) - commandArguments.get("newLocations") + commandArguments.get("newAreas") ); }, - () -> new DelegatedServiceAreaClusterSelectLocationsResponseCallback(), - serviceAreaselectLocationsCommandParams + () -> new DelegatedServiceAreaClusterSelectAreasResponseCallback(), + serviceAreaselectAreasCommandParams ); - serviceAreaClusterInteractionInfoMap.put("selectLocations", serviceAreaselectLocationsInteractionInfo); + serviceAreaClusterInteractionInfoMap.put("selectAreas", serviceAreaselectAreasInteractionInfo); - Map serviceAreaskipCurrentLocationCommandParams = new LinkedHashMap(); - InteractionInfo serviceAreaskipCurrentLocationInteractionInfo = new InteractionInfo( + Map serviceAreaskipAreaCommandParams = new LinkedHashMap(); + InteractionInfo serviceAreaskipAreaInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.ServiceAreaCluster) cluster) - .skipCurrentLocation((ChipClusters.ServiceAreaCluster.SkipCurrentLocationResponseCallback) callback + .skipArea((ChipClusters.ServiceAreaCluster.SkipAreaResponseCallback) callback ); }, - () -> new DelegatedServiceAreaClusterSkipCurrentLocationResponseCallback(), - serviceAreaskipCurrentLocationCommandParams + () -> new DelegatedServiceAreaClusterSkipAreaResponseCallback(), + serviceAreaskipAreaCommandParams ); - serviceAreaClusterInteractionInfoMap.put("skipCurrentLocation", serviceAreaskipCurrentLocationInteractionInfo); + serviceAreaClusterInteractionInfoMap.put("skipArea", serviceAreaskipAreaInteractionInfo); commandMap.put("serviceArea", serviceAreaClusterInteractionInfoMap); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 32d3d4f1a51756..64c2ae23902025 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -11863,17 +11863,17 @@ private static Map readBarrierControlInteractionInfo() return result; } private static Map readServiceAreaInteractionInfo() { - Map result = new LinkedHashMap<>();Map readServiceAreaSupportedLocationsCommandParams = new LinkedHashMap(); - InteractionInfo readServiceAreaSupportedLocationsAttributeInteractionInfo = new InteractionInfo( + Map result = new LinkedHashMap<>();Map readServiceAreaSupportedAreasCommandParams = new LinkedHashMap(); + InteractionInfo readServiceAreaSupportedAreasAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ServiceAreaCluster) cluster).readSupportedLocationsAttribute( - (ChipClusters.ServiceAreaCluster.SupportedLocationsAttributeCallback) callback + ((ChipClusters.ServiceAreaCluster) cluster).readSupportedAreasAttribute( + (ChipClusters.ServiceAreaCluster.SupportedAreasAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedServiceAreaClusterSupportedLocationsAttributeCallback(), - readServiceAreaSupportedLocationsCommandParams + () -> new ClusterInfoMapping.DelegatedServiceAreaClusterSupportedAreasAttributeCallback(), + readServiceAreaSupportedAreasCommandParams ); - result.put("readSupportedLocationsAttribute", readServiceAreaSupportedLocationsAttributeInteractionInfo); + result.put("readSupportedAreasAttribute", readServiceAreaSupportedAreasAttributeInteractionInfo); Map readServiceAreaSupportedMapsCommandParams = new LinkedHashMap(); InteractionInfo readServiceAreaSupportedMapsAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -11885,28 +11885,28 @@ private static Map readServiceAreaInteractionInfo() { readServiceAreaSupportedMapsCommandParams ); result.put("readSupportedMapsAttribute", readServiceAreaSupportedMapsAttributeInteractionInfo); - Map readServiceAreaSelectedLocationsCommandParams = new LinkedHashMap(); - InteractionInfo readServiceAreaSelectedLocationsAttributeInteractionInfo = new InteractionInfo( + Map readServiceAreaSelectedAreasCommandParams = new LinkedHashMap(); + InteractionInfo readServiceAreaSelectedAreasAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ServiceAreaCluster) cluster).readSelectedLocationsAttribute( - (ChipClusters.ServiceAreaCluster.SelectedLocationsAttributeCallback) callback + ((ChipClusters.ServiceAreaCluster) cluster).readSelectedAreasAttribute( + (ChipClusters.ServiceAreaCluster.SelectedAreasAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedServiceAreaClusterSelectedLocationsAttributeCallback(), - readServiceAreaSelectedLocationsCommandParams + () -> new ClusterInfoMapping.DelegatedServiceAreaClusterSelectedAreasAttributeCallback(), + readServiceAreaSelectedAreasCommandParams ); - result.put("readSelectedLocationsAttribute", readServiceAreaSelectedLocationsAttributeInteractionInfo); - Map readServiceAreaCurrentLocationCommandParams = new LinkedHashMap(); - InteractionInfo readServiceAreaCurrentLocationAttributeInteractionInfo = new InteractionInfo( + result.put("readSelectedAreasAttribute", readServiceAreaSelectedAreasAttributeInteractionInfo); + Map readServiceAreaCurrentAreaCommandParams = new LinkedHashMap(); + InteractionInfo readServiceAreaCurrentAreaAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { - ((ChipClusters.ServiceAreaCluster) cluster).readCurrentLocationAttribute( - (ChipClusters.ServiceAreaCluster.CurrentLocationAttributeCallback) callback + ((ChipClusters.ServiceAreaCluster) cluster).readCurrentAreaAttribute( + (ChipClusters.ServiceAreaCluster.CurrentAreaAttributeCallback) callback ); }, - () -> new ClusterInfoMapping.DelegatedServiceAreaClusterCurrentLocationAttributeCallback(), - readServiceAreaCurrentLocationCommandParams + () -> new ClusterInfoMapping.DelegatedServiceAreaClusterCurrentAreaAttributeCallback(), + readServiceAreaCurrentAreaCommandParams ); - result.put("readCurrentLocationAttribute", readServiceAreaCurrentLocationAttributeInteractionInfo); + result.put("readCurrentAreaAttribute", readServiceAreaCurrentAreaAttributeInteractionInfo); Map readServiceAreaEstimatedEndTimeCommandParams = new LinkedHashMap(); InteractionInfo readServiceAreaEstimatedEndTimeAttributeInteractionInfo = 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 3cbd5cb52ce17a..df66c2aa0e51aa 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -123,9 +123,9 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterAttributeValuePairStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationDescriptorStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt similarity index 92% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt index 3d3938fdbedf2b..e11d56110d37cf 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt @@ -22,14 +22,14 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLocationInfoStruct( +class ServiceAreaClusterAreaInfoStruct( val locationInfo: ServiceAreaClusterLocationDescriptorStruct?, val landmarkTag: UInt?, val positionTag: UInt?, val surfaceTag: UInt?, ) { override fun toString(): String = buildString { - append("ServiceAreaClusterLocationInfoStruct {\n") + append("ServiceAreaClusterAreaInfoStruct {\n") append("\tlocationInfo : $locationInfo\n") append("\tlandmarkTag : $landmarkTag\n") append("\tpositionTag : $positionTag\n") @@ -70,7 +70,7 @@ class ServiceAreaClusterLocationInfoStruct( private const val TAG_POSITION_TAG = 2 private const val TAG_SURFACE_TAG = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLocationInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaInfoStruct { tlvReader.enterStructure(tlvTag) val locationInfo = if (!tlvReader.isNull()) { @@ -106,12 +106,7 @@ class ServiceAreaClusterLocationInfoStruct( tlvReader.exitContainer() - return ServiceAreaClusterLocationInfoStruct( - locationInfo, - landmarkTag, - positionTag, - surfaceTag, - ) + return ServiceAreaClusterAreaInfoStruct(locationInfo, landmarkTag, positionTag, surfaceTag) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt similarity index 67% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt index f77ae437cad74c..74be0531c61dc5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLocationStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt @@ -22,41 +22,41 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLocationStruct( - val locationID: ULong, +class ServiceAreaClusterAreaStruct( + val areaID: ULong, val mapID: UInt?, - val locationInfo: ServiceAreaClusterLocationInfoStruct, + val areaDesc: ServiceAreaClusterAreaInfoStruct, ) { override fun toString(): String = buildString { - append("ServiceAreaClusterLocationStruct {\n") - append("\tlocationID : $locationID\n") + append("ServiceAreaClusterAreaStruct {\n") + append("\tareaID : $areaID\n") append("\tmapID : $mapID\n") - append("\tlocationInfo : $locationInfo\n") + append("\tareaDesc : $areaDesc\n") append("}\n") } fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_LOCATION_I_D), locationID) + put(ContextSpecificTag(TAG_AREA_I_D), areaID) if (mapID != null) { put(ContextSpecificTag(TAG_MAP_I_D), mapID) } else { putNull(ContextSpecificTag(TAG_MAP_I_D)) } - locationInfo.toTlv(ContextSpecificTag(TAG_LOCATION_INFO), this) + areaDesc.toTlv(ContextSpecificTag(TAG_AREA_DESC), this) endStructure() } } companion object { - private const val TAG_LOCATION_I_D = 0 + private const val TAG_AREA_I_D = 0 private const val TAG_MAP_I_D = 1 - private const val TAG_LOCATION_INFO = 2 + private const val TAG_AREA_DESC = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLocationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaStruct { tlvReader.enterStructure(tlvTag) - val locationID = tlvReader.getULong(ContextSpecificTag(TAG_LOCATION_I_D)) + val areaID = tlvReader.getULong(ContextSpecificTag(TAG_AREA_I_D)) val mapID = if (!tlvReader.isNull()) { tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D)) @@ -64,15 +64,12 @@ class ServiceAreaClusterLocationStruct( tlvReader.getNull(ContextSpecificTag(TAG_MAP_I_D)) null } - val locationInfo = - ServiceAreaClusterLocationInfoStruct.fromTlv( - ContextSpecificTag(TAG_LOCATION_INFO), - tlvReader, - ) + val areaDesc = + ServiceAreaClusterAreaInfoStruct.fromTlv(ContextSpecificTag(TAG_AREA_DESC), tlvReader) tlvReader.exitContainer() - return ServiceAreaClusterLocationStruct(locationID, mapID, locationInfo) + return ServiceAreaClusterAreaStruct(areaID, mapID, areaDesc) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt index b601af531e103d..ddc8238168981d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt @@ -24,14 +24,14 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ServiceAreaClusterProgressStruct( - val locationID: ULong, + val areaID: ULong, val status: UInt, val totalOperationalTime: Optional?, val estimatedTime: Optional?, ) { override fun toString(): String = buildString { append("ServiceAreaClusterProgressStruct {\n") - append("\tlocationID : $locationID\n") + append("\tareaID : $areaID\n") append("\tstatus : $status\n") append("\ttotalOperationalTime : $totalOperationalTime\n") append("\testimatedTime : $estimatedTime\n") @@ -41,7 +41,7 @@ class ServiceAreaClusterProgressStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_LOCATION_I_D), locationID) + put(ContextSpecificTag(TAG_AREA_I_D), areaID) put(ContextSpecificTag(TAG_STATUS), status) if (totalOperationalTime != null) { if (totalOperationalTime.isPresent) { @@ -64,14 +64,14 @@ class ServiceAreaClusterProgressStruct( } companion object { - private const val TAG_LOCATION_I_D = 0 + private const val TAG_AREA_I_D = 0 private const val TAG_STATUS = 1 private const val TAG_TOTAL_OPERATIONAL_TIME = 2 private const val TAG_ESTIMATED_TIME = 3 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterProgressStruct { tlvReader.enterStructure(tlvTag) - val locationID = tlvReader.getULong(ContextSpecificTag(TAG_LOCATION_I_D)) + val areaID = tlvReader.getULong(ContextSpecificTag(TAG_AREA_I_D)) val status = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS)) val totalOperationalTime = if (!tlvReader.isNull()) { @@ -98,12 +98,7 @@ class ServiceAreaClusterProgressStruct( tlvReader.exitContainer() - return ServiceAreaClusterProgressStruct( - locationID, - status, - totalOperationalTime, - estimatedTime, - ) + return ServiceAreaClusterProgressStruct(areaID, status, totalOperationalTime, estimatedTime) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/ServiceAreaCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ServiceAreaCluster.kt index 75e608837b40f0..3f7aad29ed5a42 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ServiceAreaCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ServiceAreaCluster.kt @@ -40,19 +40,19 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ServiceAreaCluster(private val controller: MatterController, private val endpointId: UShort) { - class SelectLocationsResponse(val status: UByte, val statusText: String?) + class SelectAreasResponse(val status: UByte, val statusText: String?) - class SkipCurrentLocationResponse(val status: UByte, val statusText: String?) + class SkipAreaResponse(val status: UByte, val statusText: String?) - class SupportedLocationsAttribute(val value: List) + class SupportedAreasAttribute(val value: List) - sealed class SupportedLocationsAttributeSubscriptionState { - data class Success(val value: List) : - SupportedLocationsAttributeSubscriptionState() + sealed class SupportedAreasAttributeSubscriptionState { + data class Success(val value: List) : + SupportedAreasAttributeSubscriptionState() - data class Error(val exception: Exception) : SupportedLocationsAttributeSubscriptionState() + data class Error(val exception: Exception) : SupportedAreasAttributeSubscriptionState() - object SubscriptionEstablished : SupportedLocationsAttributeSubscriptionState() + object SubscriptionEstablished : SupportedAreasAttributeSubscriptionState() } class SupportedMapsAttribute(val value: List?) @@ -66,24 +66,24 @@ class ServiceAreaCluster(private val controller: MatterController, private val e object SubscriptionEstablished : SupportedMapsAttributeSubscriptionState() } - class SelectedLocationsAttribute(val value: List?) + class SelectedAreasAttribute(val value: List?) - sealed class SelectedLocationsAttributeSubscriptionState { - data class Success(val value: List?) : SelectedLocationsAttributeSubscriptionState() + sealed class SelectedAreasAttributeSubscriptionState { + data class Success(val value: List?) : SelectedAreasAttributeSubscriptionState() - data class Error(val exception: Exception) : SelectedLocationsAttributeSubscriptionState() + data class Error(val exception: Exception) : SelectedAreasAttributeSubscriptionState() - object SubscriptionEstablished : SelectedLocationsAttributeSubscriptionState() + object SubscriptionEstablished : SelectedAreasAttributeSubscriptionState() } - class CurrentLocationAttribute(val value: UInt?) + class CurrentAreaAttribute(val value: UInt?) - sealed class CurrentLocationAttributeSubscriptionState { - data class Success(val value: UInt?) : CurrentLocationAttributeSubscriptionState() + sealed class CurrentAreaAttributeSubscriptionState { + data class Success(val value: UInt?) : CurrentAreaAttributeSubscriptionState() - data class Error(val exception: Exception) : CurrentLocationAttributeSubscriptionState() + data class Error(val exception: Exception) : CurrentAreaAttributeSubscriptionState() - object SubscriptionEstablished : CurrentLocationAttributeSubscriptionState() + object SubscriptionEstablished : CurrentAreaAttributeSubscriptionState() } class EstimatedEndTimeAttribute(val value: UInt?) @@ -147,19 +147,19 @@ class ServiceAreaCluster(private val controller: MatterController, private val e object SubscriptionEstablished : AttributeListAttributeSubscriptionState() } - suspend fun selectLocations( - newLocations: List?, + suspend fun selectAreas( + newAreas: List?, timedInvokeTimeout: Duration? = null, - ): SelectLocationsResponse { + ): SelectAreasResponse { val commandId: UInt = 0u val tlvWriter = TlvWriter() tlvWriter.startStructure(AnonymousTag) - val TAG_NEW_LOCATIONS_REQ: Int = 0 - newLocations?.let { - tlvWriter.startArray(ContextSpecificTag(TAG_NEW_LOCATIONS_REQ)) - for (item in newLocations.iterator()) { + val TAG_NEW_AREAS_REQ: Int = 0 + newAreas?.let { + tlvWriter.startArray(ContextSpecificTag(TAG_NEW_AREAS_REQ)) + for (item in newAreas.iterator()) { tlvWriter.put(AnonymousTag, item) } tlvWriter.endArray() @@ -214,12 +214,10 @@ class ServiceAreaCluster(private val controller: MatterController, private val e tlvReader.exitContainer() - return SelectLocationsResponse(status_decoded, statusText_decoded) + return SelectAreasResponse(status_decoded, statusText_decoded) } - suspend fun skipCurrentLocation( - timedInvokeTimeout: Duration? = null - ): SkipCurrentLocationResponse { + suspend fun skipArea(timedInvokeTimeout: Duration? = null): SkipAreaResponse { val commandId: UInt = 2u val tlvWriter = TlvWriter() @@ -274,10 +272,10 @@ class ServiceAreaCluster(private val controller: MatterController, private val e tlvReader.exitContainer() - return SkipCurrentLocationResponse(status_decoded, statusText_decoded) + return SkipAreaResponse(status_decoded, statusText_decoded) } - suspend fun readSupportedLocationsAttribute(): SupportedLocationsAttribute { + suspend fun readSupportedAreasAttribute(): SupportedAreasAttribute { val ATTRIBUTE_ID: UInt = 0u val attributePath = @@ -299,26 +297,26 @@ class ServiceAreaCluster(private val controller: MatterController, private val e it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Supportedlocations attribute not found in response" } + requireNotNull(attributeData) { "Supportedareas attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: List = - buildList { + val decodedValue: List = + buildList { tlvReader.enterArray(AnonymousTag) while (!tlvReader.isEndOfContainer()) { - add(ServiceAreaClusterLocationStruct.fromTlv(AnonymousTag, tlvReader)) + add(ServiceAreaClusterAreaStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } - return SupportedLocationsAttribute(decodedValue) + return SupportedAreasAttribute(decodedValue) } - suspend fun subscribeSupportedLocationsAttribute( + suspend fun subscribeSupportedAreasAttribute( minInterval: Int, maxInterval: Int, - ): Flow { + ): Flow { val ATTRIBUTE_ID: UInt = 0u val attributePaths = listOf( @@ -337,7 +335,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e when (subscriptionState) { is SubscriptionState.SubscriptionErrorNotification -> { emit( - SupportedLocationsAttributeSubscriptionState.Error( + SupportedAreasAttributeSubscriptionState.Error( Exception( "Subscription terminated with error code: ${subscriptionState.terminationCause}" ) @@ -351,24 +349,24 @@ class ServiceAreaCluster(private val controller: MatterController, private val e .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } requireNotNull(attributeData) { - "Supportedlocations attribute not found in Node State update" + "Supportedareas attribute not found in Node State update" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: List = - buildList { + val decodedValue: List = + buildList { tlvReader.enterArray(AnonymousTag) while (!tlvReader.isEndOfContainer()) { - add(ServiceAreaClusterLocationStruct.fromTlv(AnonymousTag, tlvReader)) + add(ServiceAreaClusterAreaStruct.fromTlv(AnonymousTag, tlvReader)) } tlvReader.exitContainer() } - emit(SupportedLocationsAttributeSubscriptionState.Success(decodedValue)) + emit(SupportedAreasAttributeSubscriptionState.Success(decodedValue)) } SubscriptionState.SubscriptionEstablished -> { - emit(SupportedLocationsAttributeSubscriptionState.SubscriptionEstablished) + emit(SupportedAreasAttributeSubscriptionState.SubscriptionEstablished) } } } @@ -479,7 +477,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e } } - suspend fun readSelectedLocationsAttribute(): SelectedLocationsAttribute { + suspend fun readSelectedAreasAttribute(): SelectedAreasAttribute { val ATTRIBUTE_ID: UInt = 2u val attributePath = @@ -501,7 +499,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Selectedlocations attribute not found in response" } + requireNotNull(attributeData) { "Selectedareas attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -519,13 +517,13 @@ class ServiceAreaCluster(private val controller: MatterController, private val e null } - return SelectedLocationsAttribute(decodedValue) + return SelectedAreasAttribute(decodedValue) } - suspend fun subscribeSelectedLocationsAttribute( + suspend fun subscribeSelectedAreasAttribute( minInterval: Int, maxInterval: Int, - ): Flow { + ): Flow { val ATTRIBUTE_ID: UInt = 2u val attributePaths = listOf( @@ -544,7 +542,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e when (subscriptionState) { is SubscriptionState.SubscriptionErrorNotification -> { emit( - SelectedLocationsAttributeSubscriptionState.Error( + SelectedAreasAttributeSubscriptionState.Error( Exception( "Subscription terminated with error code: ${subscriptionState.terminationCause}" ) @@ -557,9 +555,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e .filterIsInstance() .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { - "Selectedlocations attribute not found in Node State update" - } + requireNotNull(attributeData) { "Selectedareas attribute not found in Node State update" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -577,16 +573,16 @@ class ServiceAreaCluster(private val controller: MatterController, private val e null } - decodedValue?.let { emit(SelectedLocationsAttributeSubscriptionState.Success(it)) } + decodedValue?.let { emit(SelectedAreasAttributeSubscriptionState.Success(it)) } } SubscriptionState.SubscriptionEstablished -> { - emit(SelectedLocationsAttributeSubscriptionState.SubscriptionEstablished) + emit(SelectedAreasAttributeSubscriptionState.SubscriptionEstablished) } } } } - suspend fun readCurrentLocationAttribute(): CurrentLocationAttribute { + suspend fun readCurrentAreaAttribute(): CurrentAreaAttribute { val ATTRIBUTE_ID: UInt = 3u val attributePath = @@ -608,7 +604,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { "Currentlocation attribute not found in response" } + requireNotNull(attributeData) { "Currentarea attribute not found in response" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -624,13 +620,13 @@ class ServiceAreaCluster(private val controller: MatterController, private val e null } - return CurrentLocationAttribute(decodedValue) + return CurrentAreaAttribute(decodedValue) } - suspend fun subscribeCurrentLocationAttribute( + suspend fun subscribeCurrentAreaAttribute( minInterval: Int, maxInterval: Int, - ): Flow { + ): Flow { val ATTRIBUTE_ID: UInt = 3u val attributePaths = listOf( @@ -649,7 +645,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e when (subscriptionState) { is SubscriptionState.SubscriptionErrorNotification -> { emit( - CurrentLocationAttributeSubscriptionState.Error( + CurrentAreaAttributeSubscriptionState.Error( Exception( "Subscription terminated with error code: ${subscriptionState.terminationCause}" ) @@ -662,9 +658,7 @@ class ServiceAreaCluster(private val controller: MatterController, private val e .filterIsInstance() .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - requireNotNull(attributeData) { - "Currentlocation attribute not found in Node State update" - } + requireNotNull(attributeData) { "Currentarea attribute not found in Node State update" } // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) @@ -680,10 +674,10 @@ class ServiceAreaCluster(private val controller: MatterController, private val e null } - decodedValue?.let { emit(CurrentLocationAttributeSubscriptionState.Success(it)) } + decodedValue?.let { emit(CurrentAreaAttributeSubscriptionState.Success(it)) } } SubscriptionState.SubscriptionEstablished -> { - emit(CurrentLocationAttributeSubscriptionState.SubscriptionEstablished) + emit(CurrentAreaAttributeSubscriptionState.SubscriptionEstablished) } } } 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 021d82d5e5b25a..31d51e53f76758 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -123,9 +123,9 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterAttributeValuePairStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterExtensionFieldSet.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ScenesManagementClusterSceneInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationDescriptorStruct.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterMapStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterProgressStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt similarity index 92% rename from src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt rename to src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt index d61927fb7ec852..a440d0b2ec4116 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationInfoStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt @@ -22,14 +22,14 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLocationInfoStruct( +class ServiceAreaClusterAreaInfoStruct( val locationInfo: ServiceAreaClusterLocationDescriptorStruct?, val landmarkTag: UByte?, val positionTag: UByte?, val surfaceTag: UByte?, ) { override fun toString(): String = buildString { - append("ServiceAreaClusterLocationInfoStruct {\n") + append("ServiceAreaClusterAreaInfoStruct {\n") append("\tlocationInfo : $locationInfo\n") append("\tlandmarkTag : $landmarkTag\n") append("\tpositionTag : $positionTag\n") @@ -70,7 +70,7 @@ class ServiceAreaClusterLocationInfoStruct( private const val TAG_POSITION_TAG = 2 private const val TAG_SURFACE_TAG = 3 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLocationInfoStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaInfoStruct { tlvReader.enterStructure(tlvTag) val locationInfo = if (!tlvReader.isNull()) { @@ -106,12 +106,7 @@ class ServiceAreaClusterLocationInfoStruct( tlvReader.exitContainer() - return ServiceAreaClusterLocationInfoStruct( - locationInfo, - landmarkTag, - positionTag, - surfaceTag, - ) + return ServiceAreaClusterAreaInfoStruct(locationInfo, landmarkTag, positionTag, surfaceTag) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt similarity index 67% rename from src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationStruct.kt rename to src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt index 42dc672d5c51fe..0ffdb8c9416d01 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLocationStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt @@ -22,41 +22,41 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLocationStruct( - val locationID: UInt, +class ServiceAreaClusterAreaStruct( + val areaID: UInt, val mapID: UByte?, - val locationInfo: ServiceAreaClusterLocationInfoStruct, + val areaDesc: ServiceAreaClusterAreaInfoStruct, ) { override fun toString(): String = buildString { - append("ServiceAreaClusterLocationStruct {\n") - append("\tlocationID : $locationID\n") + append("ServiceAreaClusterAreaStruct {\n") + append("\tareaID : $areaID\n") append("\tmapID : $mapID\n") - append("\tlocationInfo : $locationInfo\n") + append("\tareaDesc : $areaDesc\n") append("}\n") } fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_LOCATION_I_D), locationID) + put(ContextSpecificTag(TAG_AREA_I_D), areaID) if (mapID != null) { put(ContextSpecificTag(TAG_MAP_I_D), mapID) } else { putNull(ContextSpecificTag(TAG_MAP_I_D)) } - locationInfo.toTlv(ContextSpecificTag(TAG_LOCATION_INFO), this) + areaDesc.toTlv(ContextSpecificTag(TAG_AREA_DESC), this) endStructure() } } companion object { - private const val TAG_LOCATION_I_D = 0 + private const val TAG_AREA_I_D = 0 private const val TAG_MAP_I_D = 1 - private const val TAG_LOCATION_INFO = 2 + private const val TAG_AREA_DESC = 2 - fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLocationStruct { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaStruct { tlvReader.enterStructure(tlvTag) - val locationID = tlvReader.getUInt(ContextSpecificTag(TAG_LOCATION_I_D)) + val areaID = tlvReader.getUInt(ContextSpecificTag(TAG_AREA_I_D)) val mapID = if (!tlvReader.isNull()) { tlvReader.getUByte(ContextSpecificTag(TAG_MAP_I_D)) @@ -64,15 +64,12 @@ class ServiceAreaClusterLocationStruct( tlvReader.getNull(ContextSpecificTag(TAG_MAP_I_D)) null } - val locationInfo = - ServiceAreaClusterLocationInfoStruct.fromTlv( - ContextSpecificTag(TAG_LOCATION_INFO), - tlvReader, - ) + val areaDesc = + ServiceAreaClusterAreaInfoStruct.fromTlv(ContextSpecificTag(TAG_AREA_DESC), tlvReader) tlvReader.exitContainer() - return ServiceAreaClusterLocationStruct(locationID, mapID, locationInfo) + return ServiceAreaClusterAreaStruct(areaID, mapID, areaDesc) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterProgressStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterProgressStruct.kt index 3dd3eb1e412260..4421bb606a7466 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterProgressStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterProgressStruct.kt @@ -24,14 +24,14 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class ServiceAreaClusterProgressStruct( - val locationID: UInt, + val areaID: UInt, val status: UByte, val totalOperationalTime: Optional?, val estimatedTime: Optional?, ) { override fun toString(): String = buildString { append("ServiceAreaClusterProgressStruct {\n") - append("\tlocationID : $locationID\n") + append("\tareaID : $areaID\n") append("\tstatus : $status\n") append("\ttotalOperationalTime : $totalOperationalTime\n") append("\testimatedTime : $estimatedTime\n") @@ -41,7 +41,7 @@ class ServiceAreaClusterProgressStruct( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_LOCATION_I_D), locationID) + put(ContextSpecificTag(TAG_AREA_I_D), areaID) put(ContextSpecificTag(TAG_STATUS), status) if (totalOperationalTime != null) { if (totalOperationalTime.isPresent) { @@ -64,14 +64,14 @@ class ServiceAreaClusterProgressStruct( } companion object { - private const val TAG_LOCATION_I_D = 0 + private const val TAG_AREA_I_D = 0 private const val TAG_STATUS = 1 private const val TAG_TOTAL_OPERATIONAL_TIME = 2 private const val TAG_ESTIMATED_TIME = 3 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterProgressStruct { tlvReader.enterStructure(tlvTag) - val locationID = tlvReader.getUInt(ContextSpecificTag(TAG_LOCATION_I_D)) + val areaID = tlvReader.getUInt(ContextSpecificTag(TAG_AREA_I_D)) val status = tlvReader.getUByte(ContextSpecificTag(TAG_STATUS)) val totalOperationalTime = if (!tlvReader.isNull()) { @@ -98,12 +98,7 @@ class ServiceAreaClusterProgressStruct( tlvReader.exitContainer() - return ServiceAreaClusterProgressStruct( - locationID, - status, - totalOperationalTime, - estimatedTime, - ) + return ServiceAreaClusterProgressStruct(areaID, status, totalOperationalTime, estimatedTime) } } } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 81e24a4bc9dcd7..090428ca3fe7eb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -28610,8 +28610,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR using namespace app::Clusters::ServiceArea; switch (aPath.mAttributeId) { - case Attributes::SupportedLocations::Id: { - using TypeInfo = Attributes::SupportedLocations::TypeInfo; + case Attributes::SupportedAreas::Id: { + using TypeInfo = Attributes::SupportedAreas::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -28626,13 +28626,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_locationID; - std::string newElement_0_locationIDClassName = "java/lang/Long"; - std::string newElement_0_locationIDCtorSignature = "(J)V"; - jlong jninewElement_0_locationID = static_cast(entry_0.locationID); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_locationIDClassName.c_str(), - newElement_0_locationIDCtorSignature.c_str(), - jninewElement_0_locationID, newElement_0_locationID); + jobject newElement_0_areaID; + std::string newElement_0_areaIDClassName = "java/lang/Long"; + std::string newElement_0_areaIDCtorSignature = "(J)V"; + jlong jninewElement_0_areaID = static_cast(entry_0.areaID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_areaIDClassName.c_str(), + newElement_0_areaIDCtorSignature.c_str(), + jninewElement_0_areaID, newElement_0_areaID); jobject newElement_0_mapID; if (entry_0.mapID.IsNull()) { @@ -28647,50 +28647,48 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_mapIDCtorSignature.c_str(), jninewElement_0_mapID, newElement_0_mapID); } - jobject newElement_0_locationInfo; - jobject newElement_0_locationInfo_locationInfo; - if (entry_0.locationInfo.locationInfo.IsNull()) + jobject newElement_0_areaDesc; + jobject newElement_0_areaDesc_locationInfo; + if (entry_0.areaDesc.locationInfo.IsNull()) { - newElement_0_locationInfo_locationInfo = nullptr; + newElement_0_areaDesc_locationInfo = nullptr; } else { - jobject newElement_0_locationInfo_locationInfo_locationName; - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(entry_0.locationInfo.locationInfo.Value().locationName, - newElement_0_locationInfo_locationInfo_locationName)); - jobject newElement_0_locationInfo_locationInfo_floorNumber; - if (entry_0.locationInfo.locationInfo.Value().floorNumber.IsNull()) + jobject newElement_0_areaDesc_locationInfo_locationName; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( + entry_0.areaDesc.locationInfo.Value().locationName, newElement_0_areaDesc_locationInfo_locationName)); + jobject newElement_0_areaDesc_locationInfo_floorNumber; + if (entry_0.areaDesc.locationInfo.Value().floorNumber.IsNull()) { - newElement_0_locationInfo_locationInfo_floorNumber = nullptr; + newElement_0_areaDesc_locationInfo_floorNumber = nullptr; } else { - std::string newElement_0_locationInfo_locationInfo_floorNumberClassName = "java/lang/Integer"; - std::string newElement_0_locationInfo_locationInfo_floorNumberCtorSignature = "(I)V"; - jint jninewElement_0_locationInfo_locationInfo_floorNumber = - static_cast(entry_0.locationInfo.locationInfo.Value().floorNumber.Value()); + std::string newElement_0_areaDesc_locationInfo_floorNumberClassName = "java/lang/Integer"; + std::string newElement_0_areaDesc_locationInfo_floorNumberCtorSignature = "(I)V"; + jint jninewElement_0_areaDesc_locationInfo_floorNumber = + static_cast(entry_0.areaDesc.locationInfo.Value().floorNumber.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_locationInfo_locationInfo_floorNumberClassName.c_str(), - newElement_0_locationInfo_locationInfo_floorNumberCtorSignature.c_str(), - jninewElement_0_locationInfo_locationInfo_floorNumber, - newElement_0_locationInfo_locationInfo_floorNumber); + newElement_0_areaDesc_locationInfo_floorNumberClassName.c_str(), + newElement_0_areaDesc_locationInfo_floorNumberCtorSignature.c_str(), + jninewElement_0_areaDesc_locationInfo_floorNumber, newElement_0_areaDesc_locationInfo_floorNumber); } - jobject newElement_0_locationInfo_locationInfo_areaType; - if (entry_0.locationInfo.locationInfo.Value().areaType.IsNull()) + jobject newElement_0_areaDesc_locationInfo_areaType; + if (entry_0.areaDesc.locationInfo.Value().areaType.IsNull()) { - newElement_0_locationInfo_locationInfo_areaType = nullptr; + newElement_0_areaDesc_locationInfo_areaType = nullptr; } else { - std::string newElement_0_locationInfo_locationInfo_areaTypeClassName = "java/lang/Integer"; - std::string newElement_0_locationInfo_locationInfo_areaTypeCtorSignature = "(I)V"; - jint jninewElement_0_locationInfo_locationInfo_areaType = - static_cast(entry_0.locationInfo.locationInfo.Value().areaType.Value()); + std::string newElement_0_areaDesc_locationInfo_areaTypeClassName = "java/lang/Integer"; + std::string newElement_0_areaDesc_locationInfo_areaTypeCtorSignature = "(I)V"; + jint jninewElement_0_areaDesc_locationInfo_areaType = + static_cast(entry_0.areaDesc.locationInfo.Value().areaType.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_locationInfo_locationInfo_areaTypeClassName.c_str(), - newElement_0_locationInfo_locationInfo_areaTypeCtorSignature.c_str(), - jninewElement_0_locationInfo_locationInfo_areaType, newElement_0_locationInfo_locationInfo_areaType); + newElement_0_areaDesc_locationInfo_areaTypeClassName.c_str(), + newElement_0_areaDesc_locationInfo_areaTypeCtorSignature.c_str(), + jninewElement_0_areaDesc_locationInfo_areaType, newElement_0_areaDesc_locationInfo_areaType); } jclass locationDescriptorStructStructClass_4; @@ -28713,105 +28711,101 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - newElement_0_locationInfo_locationInfo = env->NewObject( - locationDescriptorStructStructClass_4, locationDescriptorStructStructCtor_4, - newElement_0_locationInfo_locationInfo_locationName, newElement_0_locationInfo_locationInfo_floorNumber, - newElement_0_locationInfo_locationInfo_areaType); + newElement_0_areaDesc_locationInfo = + env->NewObject(locationDescriptorStructStructClass_4, locationDescriptorStructStructCtor_4, + newElement_0_areaDesc_locationInfo_locationName, + newElement_0_areaDesc_locationInfo_floorNumber, newElement_0_areaDesc_locationInfo_areaType); } - jobject newElement_0_locationInfo_landmarkTag; - if (entry_0.locationInfo.landmarkTag.IsNull()) + jobject newElement_0_areaDesc_landmarkTag; + if (entry_0.areaDesc.landmarkTag.IsNull()) { - newElement_0_locationInfo_landmarkTag = nullptr; + newElement_0_areaDesc_landmarkTag = nullptr; } else { - std::string newElement_0_locationInfo_landmarkTagClassName = "java/lang/Integer"; - std::string newElement_0_locationInfo_landmarkTagCtorSignature = "(I)V"; - jint jninewElement_0_locationInfo_landmarkTag = static_cast(entry_0.locationInfo.landmarkTag.Value()); + std::string newElement_0_areaDesc_landmarkTagClassName = "java/lang/Integer"; + std::string newElement_0_areaDesc_landmarkTagCtorSignature = "(I)V"; + jint jninewElement_0_areaDesc_landmarkTag = static_cast(entry_0.areaDesc.landmarkTag.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_locationInfo_landmarkTagClassName.c_str(), - newElement_0_locationInfo_landmarkTagCtorSignature.c_str(), jninewElement_0_locationInfo_landmarkTag, - newElement_0_locationInfo_landmarkTag); + newElement_0_areaDesc_landmarkTagClassName.c_str(), newElement_0_areaDesc_landmarkTagCtorSignature.c_str(), + jninewElement_0_areaDesc_landmarkTag, newElement_0_areaDesc_landmarkTag); } - jobject newElement_0_locationInfo_positionTag; - if (entry_0.locationInfo.positionTag.IsNull()) + jobject newElement_0_areaDesc_positionTag; + if (entry_0.areaDesc.positionTag.IsNull()) { - newElement_0_locationInfo_positionTag = nullptr; + newElement_0_areaDesc_positionTag = nullptr; } else { - std::string newElement_0_locationInfo_positionTagClassName = "java/lang/Integer"; - std::string newElement_0_locationInfo_positionTagCtorSignature = "(I)V"; - jint jninewElement_0_locationInfo_positionTag = static_cast(entry_0.locationInfo.positionTag.Value()); + std::string newElement_0_areaDesc_positionTagClassName = "java/lang/Integer"; + std::string newElement_0_areaDesc_positionTagCtorSignature = "(I)V"; + jint jninewElement_0_areaDesc_positionTag = static_cast(entry_0.areaDesc.positionTag.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_locationInfo_positionTagClassName.c_str(), - newElement_0_locationInfo_positionTagCtorSignature.c_str(), jninewElement_0_locationInfo_positionTag, - newElement_0_locationInfo_positionTag); + newElement_0_areaDesc_positionTagClassName.c_str(), newElement_0_areaDesc_positionTagCtorSignature.c_str(), + jninewElement_0_areaDesc_positionTag, newElement_0_areaDesc_positionTag); } - jobject newElement_0_locationInfo_surfaceTag; - if (entry_0.locationInfo.surfaceTag.IsNull()) + jobject newElement_0_areaDesc_surfaceTag; + if (entry_0.areaDesc.surfaceTag.IsNull()) { - newElement_0_locationInfo_surfaceTag = nullptr; + newElement_0_areaDesc_surfaceTag = nullptr; } else { - std::string newElement_0_locationInfo_surfaceTagClassName = "java/lang/Integer"; - std::string newElement_0_locationInfo_surfaceTagCtorSignature = "(I)V"; - jint jninewElement_0_locationInfo_surfaceTag = static_cast(entry_0.locationInfo.surfaceTag.Value()); + std::string newElement_0_areaDesc_surfaceTagClassName = "java/lang/Integer"; + std::string newElement_0_areaDesc_surfaceTagCtorSignature = "(I)V"; + jint jninewElement_0_areaDesc_surfaceTag = static_cast(entry_0.areaDesc.surfaceTag.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_locationInfo_surfaceTagClassName.c_str(), - newElement_0_locationInfo_surfaceTagCtorSignature.c_str(), jninewElement_0_locationInfo_surfaceTag, - newElement_0_locationInfo_surfaceTag); + newElement_0_areaDesc_surfaceTagClassName.c_str(), newElement_0_areaDesc_surfaceTagCtorSignature.c_str(), + jninewElement_0_areaDesc_surfaceTag, newElement_0_areaDesc_surfaceTag); } - jclass locationInfoStructStructClass_2; + jclass areaInfoStructStructClass_2; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLocationInfoStruct", locationInfoStructStructClass_2); + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct", areaInfoStructStructClass_2); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLocationInfoStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaInfoStruct"); return nullptr; } - jmethodID locationInfoStructStructCtor_2; + jmethodID areaInfoStructStructCtor_2; err = chip::JniReferences::GetInstance().FindMethod( - env, locationInfoStructStructClass_2, "", + env, areaInfoStructStructClass_2, "", "(Lchip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct;Ljava/lang/Integer;Ljava/lang/" "Integer;Ljava/lang/Integer;)V", - &locationInfoStructStructCtor_2); - if (err != CHIP_NO_ERROR || locationInfoStructStructCtor_2 == nullptr) + &areaInfoStructStructCtor_2); + if (err != CHIP_NO_ERROR || areaInfoStructStructCtor_2 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLocationInfoStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaInfoStruct constructor"); return nullptr; } - newElement_0_locationInfo = - env->NewObject(locationInfoStructStructClass_2, locationInfoStructStructCtor_2, - newElement_0_locationInfo_locationInfo, newElement_0_locationInfo_landmarkTag, - newElement_0_locationInfo_positionTag, newElement_0_locationInfo_surfaceTag); + newElement_0_areaDesc = env->NewObject(areaInfoStructStructClass_2, areaInfoStructStructCtor_2, + newElement_0_areaDesc_locationInfo, newElement_0_areaDesc_landmarkTag, + newElement_0_areaDesc_positionTag, newElement_0_areaDesc_surfaceTag); - jclass locationStructStructClass_1; + jclass areaStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLocationStruct", locationStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterAreaStruct", areaStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLocationStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterAreaStruct"); return nullptr; } - jmethodID locationStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, locationStructStructClass_1, "", - "(Ljava/lang/Long;Ljava/lang/Integer;Lchip/devicecontroller/" - "ChipStructs$ServiceAreaClusterLocationInfoStruct;)V", - &locationStructStructCtor_1); - if (err != CHIP_NO_ERROR || locationStructStructCtor_1 == nullptr) + jmethodID areaStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, areaStructStructClass_1, "", + "(Ljava/lang/Long;Ljava/lang/Integer;Lchip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct;)V", + &areaStructStructCtor_1); + if (err != CHIP_NO_ERROR || areaStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLocationStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterAreaStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(locationStructStructClass_1, locationStructStructCtor_1, newElement_0_locationID, - newElement_0_mapID, newElement_0_locationInfo); + newElement_0 = env->NewObject(areaStructStructClass_1, areaStructStructCtor_1, newElement_0_areaID, + newElement_0_mapID, newElement_0_areaDesc); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; @@ -28873,8 +28867,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::SelectedLocations::Id: { - using TypeInfo = Attributes::SelectedLocations::TypeInfo; + case Attributes::SelectedAreas::Id: { + using TypeInfo = Attributes::SelectedAreas::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -28905,8 +28899,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::CurrentLocation::Id: { - using TypeInfo = Attributes::CurrentLocation::TypeInfo; + case Attributes::CurrentArea::Id: { + using TypeInfo = Attributes::CurrentArea::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -28973,13 +28967,13 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_1 = iter_value_1.GetValue(); jobject newElement_1; - jobject newElement_1_locationID; - std::string newElement_1_locationIDClassName = "java/lang/Long"; - std::string newElement_1_locationIDCtorSignature = "(J)V"; - jlong jninewElement_1_locationID = static_cast(entry_1.locationID); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_locationIDClassName.c_str(), newElement_1_locationIDCtorSignature.c_str(), - jninewElement_1_locationID, newElement_1_locationID); + jobject newElement_1_areaID; + std::string newElement_1_areaIDClassName = "java/lang/Long"; + std::string newElement_1_areaIDCtorSignature = "(J)V"; + jlong jninewElement_1_areaID = static_cast(entry_1.areaID); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_areaIDClassName.c_str(), + newElement_1_areaIDCtorSignature.c_str(), + jninewElement_1_areaID, newElement_1_areaID); jobject newElement_1_status; std::string newElement_1_statusClassName = "java/lang/Integer"; std::string newElement_1_statusCtorSignature = "(I)V"; @@ -29062,7 +29056,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } newElement_1 = - env->NewObject(progressStructStructClass_2, progressStructStructCtor_2, newElement_1_locationID, + env->NewObject(progressStructStructClass_2, progressStructStructCtor_2, newElement_1_areaID, newElement_1_status, newElement_1_totalOperationalTime, newElement_1_estimatedTime); chip::JniReferences::GetInstance().AddToList(value, newElement_1); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 5ab0ac895b659b..c8fe72913b6b67 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -8562,21 +8562,21 @@ class ChipClusters: "commands": { 0x00000000: { "commandId": 0x00000000, - "commandName": "SelectLocations", + "commandName": "SelectAreas", "args": { - "newLocations": "int", + "newAreas": "int", }, }, 0x00000002: { "commandId": 0x00000002, - "commandName": "SkipCurrentLocation", + "commandName": "SkipArea", "args": { }, }, }, "attributes": { 0x00000000: { - "attributeName": "SupportedLocations", + "attributeName": "SupportedAreas", "attributeId": 0x00000000, "type": "", "reportable": True, @@ -8588,13 +8588,13 @@ class ChipClusters: "reportable": True, }, 0x00000002: { - "attributeName": "SelectedLocations", + "attributeName": "SelectedAreas", "attributeId": 0x00000002, "type": "int", "reportable": True, }, 0x00000003: { - "attributeName": "CurrentLocation", + "attributeName": "CurrentArea", "attributeId": 0x00000003, "type": "int", "reportable": True, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 1a110f1bc09b74..72364de4be6410 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -31113,10 +31113,10 @@ class ServiceArea(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="supportedLocations", Tag=0x00000000, Type=typing.List[ServiceArea.Structs.LocationStruct]), + ClusterObjectFieldDescriptor(Label="supportedAreas", Tag=0x00000000, Type=typing.List[ServiceArea.Structs.AreaStruct]), ClusterObjectFieldDescriptor(Label="supportedMaps", Tag=0x00000001, Type=typing.Union[Nullable, typing.List[ServiceArea.Structs.MapStruct]]), - ClusterObjectFieldDescriptor(Label="selectedLocations", Tag=0x00000002, Type=typing.Union[Nullable, typing.List[uint]]), - ClusterObjectFieldDescriptor(Label="currentLocation", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="selectedAreas", Tag=0x00000002, Type=typing.Union[Nullable, typing.List[uint]]), + ClusterObjectFieldDescriptor(Label="currentArea", Tag=0x00000003, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="estimatedEndTime", Tag=0x00000004, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="progress", Tag=0x00000005, Type=typing.Union[None, Nullable, typing.List[ServiceArea.Structs.ProgressStruct]]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), @@ -31127,10 +31127,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - supportedLocations: 'typing.List[ServiceArea.Structs.LocationStruct]' = None + supportedAreas: 'typing.List[ServiceArea.Structs.AreaStruct]' = None supportedMaps: 'typing.Union[Nullable, typing.List[ServiceArea.Structs.MapStruct]]' = None - selectedLocations: 'typing.Union[Nullable, typing.List[uint]]' = None - currentLocation: 'typing.Union[None, Nullable, uint]' = None + selectedAreas: 'typing.Union[Nullable, typing.List[uint]]' = None + currentArea: 'typing.Union[None, Nullable, uint]' = None estimatedEndTime: 'typing.Union[None, Nullable, uint]' = None progress: 'typing.Union[None, Nullable, typing.List[ServiceArea.Structs.ProgressStruct]]' = None generatedCommandList: 'typing.List[uint]' = None @@ -31152,10 +31152,10 @@ class OperationalStatusEnum(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 4, - class SelectLocationsStatus(MatterIntEnum): + class SelectAreasStatus(MatterIntEnum): kSuccess = 0x00 - kUnsupportedLocation = 0x01 - kDuplicatedLocations = 0x02 + kUnsupportedArea = 0x01 + kDuplicatedAreas = 0x02 kInvalidInMode = 0x03 kInvalidSet = 0x04 # All received enum values that are not listed above will be mapped @@ -31164,9 +31164,9 @@ class SelectLocationsStatus(MatterIntEnum): # enum value. This specific value should never be transmitted. kUnknownEnumValue = 5, - class SkipCurrentLocationStatus(MatterIntEnum): + class SkipAreaStatus(MatterIntEnum): kSuccess = 0x00 - kInvalidLocationList = 0x01 + kInvalidAreaList = 0x01 kInvalidInMode = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only @@ -31181,7 +31181,7 @@ class Feature(IntFlag): class Structs: @dataclass - class LocationInfoStruct(ClusterObject): + class AreaInfoStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -31198,19 +31198,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: surfaceTag: 'typing.Union[Nullable, Globals.Enums.FloorSurfaceTag]' = NullValue @dataclass - class LocationStruct(ClusterObject): + class AreaStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="locationID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="areaID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="mapID", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="locationInfo", Tag=2, Type=ServiceArea.Structs.LocationInfoStruct), + ClusterObjectFieldDescriptor(Label="areaDesc", Tag=2, Type=ServiceArea.Structs.AreaInfoStruct), ]) - locationID: 'uint' = 0 + areaID: 'uint' = 0 mapID: 'typing.Union[Nullable, uint]' = NullValue - locationInfo: 'ServiceArea.Structs.LocationInfoStruct' = field(default_factory=lambda: ServiceArea.Structs.LocationInfoStruct()) + areaDesc: 'ServiceArea.Structs.AreaInfoStruct' = field(default_factory=lambda: ServiceArea.Structs.AreaInfoStruct()) @dataclass class MapStruct(ClusterObject): @@ -31231,36 +31231,36 @@ class ProgressStruct(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="locationID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="areaID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="status", Tag=1, Type=ServiceArea.Enums.OperationalStatusEnum), ClusterObjectFieldDescriptor(Label="totalOperationalTime", Tag=2, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="estimatedTime", Tag=3, Type=typing.Union[None, Nullable, uint]), ]) - locationID: 'uint' = 0 + areaID: 'uint' = 0 status: 'ServiceArea.Enums.OperationalStatusEnum' = 0 totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None estimatedTime: 'typing.Union[None, Nullable, uint]' = None class Commands: @dataclass - class SelectLocations(ClusterCommand): + class SelectAreas(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000150 command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'SelectLocationsResponse' + response_type: typing.ClassVar[str] = 'SelectAreasResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="newLocations", Tag=0, Type=typing.Union[Nullable, typing.List[uint]]), + ClusterObjectFieldDescriptor(Label="newAreas", Tag=0, Type=typing.Union[Nullable, typing.List[uint]]), ]) - newLocations: 'typing.Union[Nullable, typing.List[uint]]' = NullValue + newAreas: 'typing.Union[Nullable, typing.List[uint]]' = NullValue @dataclass - class SelectLocationsResponse(ClusterCommand): + class SelectAreasResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000150 command_id: typing.ClassVar[int] = 0x00000001 is_client: typing.ClassVar[bool] = False @@ -31270,19 +31270,19 @@ class SelectLocationsResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ServiceArea.Enums.SelectLocationsStatus), + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ServiceArea.Enums.SelectAreasStatus), ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'ServiceArea.Enums.SelectLocationsStatus' = 0 + status: 'ServiceArea.Enums.SelectAreasStatus' = 0 statusText: 'typing.Optional[str]' = None @dataclass - class SkipCurrentLocation(ClusterCommand): + class SkipArea(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000150 command_id: typing.ClassVar[int] = 0x00000002 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'SkipCurrentLocationResponse' + response_type: typing.ClassVar[str] = 'SkipAreaResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -31291,7 +31291,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) @dataclass - class SkipCurrentLocationResponse(ClusterCommand): + class SkipAreaResponse(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000150 command_id: typing.ClassVar[int] = 0x00000003 is_client: typing.ClassVar[bool] = False @@ -31301,16 +31301,16 @@ class SkipCurrentLocationResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ServiceArea.Enums.SkipCurrentLocationStatus), + ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ServiceArea.Enums.SkipAreaStatus), ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]), ]) - status: 'ServiceArea.Enums.SkipCurrentLocationStatus' = 0 + status: 'ServiceArea.Enums.SkipAreaStatus' = 0 statusText: 'typing.Optional[str]' = None class Attributes: @dataclass - class SupportedLocations(ClusterAttributeDescriptor): + class SupportedAreas(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000150 @@ -31321,9 +31321,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[ServiceArea.Structs.LocationStruct]) + return ClusterObjectFieldDescriptor(Type=typing.List[ServiceArea.Structs.AreaStruct]) - value: 'typing.List[ServiceArea.Structs.LocationStruct]' = field(default_factory=lambda: []) + value: 'typing.List[ServiceArea.Structs.AreaStruct]' = field(default_factory=lambda: []) @dataclass class SupportedMaps(ClusterAttributeDescriptor): @@ -31342,7 +31342,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[Nullable, typing.List[ServiceArea.Structs.MapStruct]]' = NullValue @dataclass - class SelectedLocations(ClusterAttributeDescriptor): + class SelectedAreas(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000150 @@ -31358,7 +31358,7 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Union[Nullable, typing.List[uint]]' = NullValue @dataclass - class CurrentLocation(ClusterAttributeDescriptor): + class CurrentArea(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x00000150 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index d0ea9a364af749..ce8cbd7a5621f0 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3861,16 +3861,16 @@ static BOOL AttributeIsSpecifiedInServiceAreaCluster(AttributeId aAttributeId) { using namespace Clusters::ServiceArea; switch (aAttributeId) { - case Attributes::SupportedLocations::Id: { + case Attributes::SupportedAreas::Id: { return YES; } case Attributes::SupportedMaps::Id: { return YES; } - case Attributes::SelectedLocations::Id: { + case Attributes::SelectedAreas::Id: { return YES; } - case Attributes::CurrentLocation::Id: { + case Attributes::CurrentArea::Id: { return YES; } case Attributes::EstimatedEndTime::Id: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 6e9fa8aa333a59..2a2cf4f84cb44d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -11176,8 +11176,8 @@ static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttri { using namespace Clusters::ServiceArea; switch (aAttributeId) { - case Attributes::SupportedLocations::Id: { - using TypeInfo = Attributes::SupportedLocations::TypeInfo; + case Attributes::SupportedAreas::Id: { + using TypeInfo = Attributes::SupportedAreas::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11189,50 +11189,50 @@ static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttri auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRServiceAreaClusterLocationStruct * newElement_0; - newElement_0 = [MTRServiceAreaClusterLocationStruct new]; - newElement_0.locationID = [NSNumber numberWithUnsignedInt:entry_0.locationID]; + MTRServiceAreaClusterAreaStruct * newElement_0; + newElement_0 = [MTRServiceAreaClusterAreaStruct new]; + newElement_0.areaID = [NSNumber numberWithUnsignedInt:entry_0.areaID]; if (entry_0.mapID.IsNull()) { newElement_0.mapID = nil; } else { newElement_0.mapID = [NSNumber numberWithUnsignedChar:entry_0.mapID.Value()]; } - newElement_0.locationInfo = [MTRServiceAreaClusterLocationInfoStruct new]; - if (entry_0.locationInfo.locationInfo.IsNull()) { - newElement_0.locationInfo.locationInfo = nil; + newElement_0.areaDesc = [MTRServiceAreaClusterAreaInfoStruct new]; + if (entry_0.areaDesc.locationInfo.IsNull()) { + newElement_0.areaDesc.locationInfo = nil; } else { - newElement_0.locationInfo.locationInfo = [MTRDataTypeLocationDescriptorStruct new]; - newElement_0.locationInfo.locationInfo.locationName = AsString(entry_0.locationInfo.locationInfo.Value().locationName); - if (newElement_0.locationInfo.locationInfo.locationName == nil) { + newElement_0.areaDesc.locationInfo = [MTRDataTypeLocationDescriptorStruct new]; + newElement_0.areaDesc.locationInfo.locationName = AsString(entry_0.areaDesc.locationInfo.Value().locationName); + if (newElement_0.areaDesc.locationInfo.locationName == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } - if (entry_0.locationInfo.locationInfo.Value().floorNumber.IsNull()) { - newElement_0.locationInfo.locationInfo.floorNumber = nil; + if (entry_0.areaDesc.locationInfo.Value().floorNumber.IsNull()) { + newElement_0.areaDesc.locationInfo.floorNumber = nil; } else { - newElement_0.locationInfo.locationInfo.floorNumber = [NSNumber numberWithShort:entry_0.locationInfo.locationInfo.Value().floorNumber.Value()]; + newElement_0.areaDesc.locationInfo.floorNumber = [NSNumber numberWithShort:entry_0.areaDesc.locationInfo.Value().floorNumber.Value()]; } - if (entry_0.locationInfo.locationInfo.Value().areaType.IsNull()) { - newElement_0.locationInfo.locationInfo.areaType = nil; + if (entry_0.areaDesc.locationInfo.Value().areaType.IsNull()) { + newElement_0.areaDesc.locationInfo.areaType = nil; } else { - newElement_0.locationInfo.locationInfo.areaType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.locationInfo.locationInfo.Value().areaType.Value())]; + newElement_0.areaDesc.locationInfo.areaType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.locationInfo.Value().areaType.Value())]; } } - if (entry_0.locationInfo.landmarkTag.IsNull()) { - newElement_0.locationInfo.landmarkTag = nil; + if (entry_0.areaDesc.landmarkTag.IsNull()) { + newElement_0.areaDesc.landmarkTag = nil; } else { - newElement_0.locationInfo.landmarkTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.locationInfo.landmarkTag.Value())]; + newElement_0.areaDesc.landmarkTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.landmarkTag.Value())]; } - if (entry_0.locationInfo.positionTag.IsNull()) { - newElement_0.locationInfo.positionTag = nil; + if (entry_0.areaDesc.positionTag.IsNull()) { + newElement_0.areaDesc.positionTag = nil; } else { - newElement_0.locationInfo.positionTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.locationInfo.positionTag.Value())]; + newElement_0.areaDesc.positionTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.positionTag.Value())]; } - if (entry_0.locationInfo.surfaceTag.IsNull()) { - newElement_0.locationInfo.surfaceTag = nil; + if (entry_0.areaDesc.surfaceTag.IsNull()) { + newElement_0.areaDesc.surfaceTag = nil; } else { - newElement_0.locationInfo.surfaceTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.locationInfo.surfaceTag.Value())]; + newElement_0.areaDesc.surfaceTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.surfaceTag.Value())]; } [array_0 addObject:newElement_0]; } @@ -11282,8 +11282,8 @@ static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttri } return value; } - case Attributes::SelectedLocations::Id: { - using TypeInfo = Attributes::SelectedLocations::TypeInfo; + case Attributes::SelectedAreas::Id: { + using TypeInfo = Attributes::SelectedAreas::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11312,8 +11312,8 @@ static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttri } return value; } - case Attributes::CurrentLocation::Id: { - using TypeInfo = Attributes::CurrentLocation::TypeInfo; + case Attributes::CurrentArea::Id: { + using TypeInfo = Attributes::CurrentArea::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -11360,7 +11360,7 @@ static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttri auto & entry_1 = iter_1.GetValue(); MTRServiceAreaClusterProgressStruct * newElement_1; newElement_1 = [MTRServiceAreaClusterProgressStruct new]; - newElement_1.locationID = [NSNumber numberWithUnsignedInt:entry_1.locationID]; + newElement_1.areaID = [NSNumber numberWithUnsignedInt:entry_1.areaID]; newElement_1.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.status)]; if (entry_1.totalOperationalTime.HasValue()) { if (entry_1.totalOperationalTime.Value().IsNull()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index b151fcea89b3cc..fe78478449ad36 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -9696,25 +9696,25 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRBaseClusterServiceArea : MTRGenericBaseCluster /** - * Command SelectLocations + * Command SelectAreas * - * Command used to select a set of device locations, where the device is to operate + * Command used to select a set of device areas, where the device is to operate. */ -- (void)selectLocationsWithParams:(MTRServiceAreaClusterSelectLocationsParams *)params completion:(void (^)(MTRServiceAreaClusterSelectLocationsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; /** - * Command SkipCurrentLocation + * Command SkipArea * - * This command is used to skip the current location where the device operates. + * This command is used to skip an area where the device operates. */ -- (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationParams * _Nullable)params completion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)skipCurrentLocationWithCompletion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams * _Nullable)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)skipAreaWithCompletion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeSupportedLocationsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeSupportedLocationsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSupportedLocationsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedAreasWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeSupportedMapsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeSupportedMapsWithParams:(MTRSubscribeParams *)params @@ -9722,17 +9722,17 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeSupportedMapsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeSelectedLocationsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeSelectedLocationsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeSelectedLocationsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSelectedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSelectedAreasWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSelectedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeCurrentLocationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeCurrentLocationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeCurrentLocationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeCurrentAreaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeCurrentAreaWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeCurrentAreaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeEstimatedEndTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeEstimatedEndTimeWithParams:(MTRSubscribeParams *)params @@ -19801,18 +19801,18 @@ typedef NS_ENUM(uint8_t, MTRServiceAreaOperationalStatus) { MTRServiceAreaOperationalStatusCompleted MTR_PROVISIONALLY_AVAILABLE = 0x03, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRServiceAreaSelectLocationsStatus) { - MTRServiceAreaSelectLocationsStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRServiceAreaSelectLocationsStatusUnsupportedLocation MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRServiceAreaSelectLocationsStatusDuplicatedLocations MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRServiceAreaSelectLocationsStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRServiceAreaSelectLocationsStatusInvalidSet MTR_PROVISIONALLY_AVAILABLE = 0x04, +typedef NS_ENUM(uint8_t, MTRServiceAreaSelectAreasStatus) { + MTRServiceAreaSelectAreasStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRServiceAreaSelectAreasStatusUnsupportedArea MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRServiceAreaSelectAreasStatusDuplicatedAreas MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRServiceAreaSelectAreasStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRServiceAreaSelectAreasStatusInvalidSet MTR_PROVISIONALLY_AVAILABLE = 0x04, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_ENUM(uint8_t, MTRServiceAreaSkipCurrentLocationStatus) { - MTRServiceAreaSkipCurrentLocationStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRServiceAreaSkipCurrentLocationStatusInvalidLocationList MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRServiceAreaSkipCurrentLocationStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02, +typedef NS_ENUM(uint8_t, MTRServiceAreaSkipAreaStatus) { + MTRServiceAreaSkipAreaStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRServiceAreaSkipAreaStatusInvalidAreaList MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRServiceAreaSkipAreaStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02, } MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint32_t, MTRServiceAreaFeature) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 3ca3bfe55708dd..7a94c0954e1683 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -65364,10 +65364,10 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @implementation MTRBaseClusterServiceArea -- (void)selectLocationsWithParams:(MTRServiceAreaClusterSelectLocationsParams *)params completion:(void (^)(MTRServiceAreaClusterSelectLocationsResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRServiceAreaClusterSelectLocationsParams + params = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; } @@ -65377,25 +65377,25 @@ - (void)selectLocationsWithParams:(MTRServiceAreaClusterSelectLocationsParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ServiceArea::Commands::SelectLocations::Type; + using RequestType = ServiceArea::Commands::SelectAreas::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSelectLocationsResponseParams.class + responseClass:MTRServiceAreaClusterSelectAreasResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)skipCurrentLocationWithCompletion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipAreaWithCompletion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self skipCurrentLocationWithParams:nil completion:completion]; + [self skipAreaWithParams:nil completion:completion]; } -- (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationParams * _Nullable)params completion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams * _Nullable)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRServiceAreaClusterSkipCurrentLocationParams + params = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; } @@ -65405,21 +65405,21 @@ - (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ServiceArea::Commands::SkipCurrentLocation::Type; + using RequestType = ServiceArea::Commands::SkipArea::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSkipCurrentLocationResponseParams.class + responseClass:MTRServiceAreaClusterSkipAreaResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeSupportedLocationsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ServiceArea::Attributes::SupportedLocations::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65428,11 +65428,11 @@ - (void)readAttributeSupportedLocationsWithCompletion:(void (^)(NSArray * _Nulla completion:completion]; } -- (void)subscribeAttributeSupportedLocationsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedAreasWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ServiceArea::Attributes::SupportedLocations::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65442,9 +65442,9 @@ - (void)subscribeAttributeSupportedLocationsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedLocationsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ServiceArea::Attributes::SupportedLocations::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SupportedAreas::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65489,9 +65489,9 @@ + (void)readAttributeSupportedMapsWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeSelectedLocationsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ServiceArea::Attributes::SelectedLocations::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65500,11 +65500,11 @@ - (void)readAttributeSelectedLocationsWithCompletion:(void (^)(NSArray * _Nullab completion:completion]; } -- (void)subscribeAttributeSelectedLocationsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSelectedAreasWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ServiceArea::Attributes::SelectedLocations::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65514,9 +65514,9 @@ - (void)subscribeAttributeSelectedLocationsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSelectedLocationsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedAreasWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ServiceArea::Attributes::SelectedLocations::TypeInfo; + using TypeInfo = ServiceArea::Attributes::SelectedAreas::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65525,9 +65525,9 @@ + (void)readAttributeSelectedLocationsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCurrentLocationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentAreaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ServiceArea::Attributes::CurrentLocation::TypeInfo; + using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; [self.device _readKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65536,11 +65536,11 @@ - (void)readAttributeCurrentLocationWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentLocationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentAreaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ServiceArea::Attributes::CurrentLocation::TypeInfo; + using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65550,9 +65550,9 @@ - (void)subscribeAttributeCurrentLocationWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentLocationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentAreaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ServiceArea::Attributes::CurrentLocation::TypeInfo; + using TypeInfo = ServiceArea::Attributes::CurrentArea::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index f920a8e336cd92..36ba74c1b9867a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3139,10 +3139,10 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBarrierControlAttributeClusterRevisionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster ServiceArea attributes - MTRAttributeIDTypeClusterServiceAreaAttributeSupportedLocationsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterServiceAreaAttributeSupportedAreasID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterServiceAreaAttributeSupportedMapsID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterServiceAreaAttributeSelectedLocationsID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterServiceAreaAttributeCurrentLocationID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterServiceAreaAttributeSelectedAreasID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterServiceAreaAttributeCurrentAreaID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterServiceAreaAttributeEstimatedEndTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterServiceAreaAttributeProgressID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, MTRAttributeIDTypeClusterServiceAreaAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, @@ -6595,10 +6595,10 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterBarrierControlCommandBarrierControlStopID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, // Cluster ServiceArea commands - MTRCommandIDTypeClusterServiceAreaCommandSelectLocationsID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRCommandIDTypeClusterServiceAreaCommandSelectLocationsResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRCommandIDTypeClusterServiceAreaCommandSkipCurrentLocationID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTRCommandIDTypeClusterServiceAreaCommandSkipCurrentLocationResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRCommandIDTypeClusterServiceAreaCommandSelectAreasID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterServiceAreaCommandSelectAreasResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterServiceAreaCommandSkipAreaID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRCommandIDTypeClusterServiceAreaCommandSkipAreaResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, // Cluster Thermostat deprecated command id names MTRClusterThermostatCommandSetpointRaiseLowerID diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 6191e7c60d53eb..d7c40ca085b628 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -5450,20 +5450,20 @@ switch (attributeID) { // Cluster ServiceArea attributes - case MTRAttributeIDTypeClusterServiceAreaAttributeSupportedLocationsID: - result = @"SupportedLocations"; + case MTRAttributeIDTypeClusterServiceAreaAttributeSupportedAreasID: + result = @"SupportedAreas"; break; case MTRAttributeIDTypeClusterServiceAreaAttributeSupportedMapsID: result = @"SupportedMaps"; break; - case MTRAttributeIDTypeClusterServiceAreaAttributeSelectedLocationsID: - result = @"SelectedLocations"; + case MTRAttributeIDTypeClusterServiceAreaAttributeSelectedAreasID: + result = @"SelectedAreas"; break; - case MTRAttributeIDTypeClusterServiceAreaAttributeCurrentLocationID: - result = @"CurrentLocation"; + case MTRAttributeIDTypeClusterServiceAreaAttributeCurrentAreaID: + result = @"CurrentArea"; break; case MTRAttributeIDTypeClusterServiceAreaAttributeEstimatedEndTimeID: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 44ecc1e0119c46..373a873d859389 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -4510,18 +4510,18 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_PROVISIONALLY_AVAILABLE @interface MTRClusterServiceArea : MTRGenericCluster -- (void)selectLocationsWithParams:(MTRServiceAreaClusterSelectLocationsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSelectLocationsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)skipCurrentLocationWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)skipAreaWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSupportedLocationsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedAreasWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeSupportedMapsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeSelectedLocationsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSelectedAreasWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; -- (NSDictionary * _Nullable)readAttributeCurrentLocationWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeCurrentAreaWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeEstimatedEndTimeWithParams:(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 8e06c4d288084f..d0944234c6fbed 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -12837,10 +12837,10 @@ - (void)barrierControlStopWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSelectLocationsResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRServiceAreaClusterSelectLocationsParams + params = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; } @@ -12850,7 +12850,7 @@ - (void)selectLocationsWithParams:(MTRServiceAreaClusterSelectLocationsParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ServiceArea::Commands::SelectLocations::Type; + using RequestType = ServiceArea::Commands::SelectAreas::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -12859,19 +12859,19 @@ - (void)selectLocationsWithParams:(MTRServiceAreaClusterSelectLocationsParams *) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSelectLocationsResponseParams.class + responseClass:MTRServiceAreaClusterSelectAreasResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)skipCurrentLocationWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipAreaWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self skipCurrentLocationWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; + [self skipAreaWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; } -- (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRServiceAreaClusterSkipCurrentLocationParams + params = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; } @@ -12881,7 +12881,7 @@ - (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = ServiceArea::Commands::SkipCurrentLocation::Type; + using RequestType = ServiceArea::Commands::SkipArea::Type; [self.device _invokeKnownCommandWithEndpointID:self.endpointID clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -12890,14 +12890,14 @@ - (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationP expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRServiceAreaClusterSkipCurrentLocationResponseParams.class + responseClass:MTRServiceAreaClusterSkipAreaResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (NSDictionary * _Nullable)readAttributeSupportedLocationsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSupportedAreasWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedLocationsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedAreasID) params:params]; } - (NSDictionary * _Nullable)readAttributeSupportedMapsWithParams:(MTRReadParams * _Nullable)params @@ -12905,14 +12905,14 @@ - (void)skipCurrentLocationWithParams:(MTRServiceAreaClusterSkipCurrentLocationP return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSupportedMapsID) params:params]; } -- (NSDictionary * _Nullable)readAttributeSelectedLocationsWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSelectedAreasWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSelectedLocationsID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeSelectedAreasID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentLocationWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeCurrentAreaWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeCurrentLocationID) params:params]; + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeServiceAreaID) attributeID:@(MTRAttributeIDTypeClusterServiceAreaAttributeCurrentAreaID) params:params]; } - (NSDictionary * _Nullable)readAttributeEstimatedEndTimeWithParams:(MTRReadParams * _Nullable)params diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 62f200fe8623f7..a1255fd62f2d23 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7637,9 +7637,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRServiceAreaClusterSelectLocationsParams : NSObject +@interface MTRServiceAreaClusterSelectAreasParams : NSObject -@property (nonatomic, copy, getter=getNewLocations) NSArray * _Nullable newLocations MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy, getter=getNewAreas) NSArray * _Nullable newAreas MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7667,14 +7667,14 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRServiceAreaClusterSelectLocationsResponseParams : NSObject +@interface MTRServiceAreaClusterSelectAreasResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRServiceAreaClusterSelectLocationsResponseParams with a response-value dictionary + * Initialize an MTRServiceAreaClusterSelectAreasResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not @@ -7688,7 +7688,7 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRServiceAreaClusterSkipCurrentLocationParams : NSObject +@interface MTRServiceAreaClusterSkipAreaParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -7716,14 +7716,14 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRServiceAreaClusterSkipCurrentLocationResponseParams : NSObject +@interface MTRServiceAreaClusterSkipAreaResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE; /** - * Initialize an MTRServiceAreaClusterSkipCurrentLocationResponseParams with a response-value dictionary + * Initialize an MTRServiceAreaClusterSkipAreaResponseParams with a response-value dictionary * of the sort that MTRDeviceResponseHandler would receive. * * Will return nil and hand out an error if the response-value dictionary is not diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 6b10028ec18d78..efeaaa5aa5f50f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -21784,12 +21784,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRServiceAreaClusterSelectLocationsParams +@implementation MTRServiceAreaClusterSelectAreasParams - (instancetype)init { if (self = [super init]) { - _newLocations = nil; + _newAreas = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21798,9 +21798,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRServiceAreaClusterSelectLocationsParams alloc] init]; + auto other = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; - other.newLocations = self.newLocations; + other.newAreas = self.newAreas; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21809,41 +21809,41 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newLocations:%@; >", NSStringFromClass([self class]), _newLocations]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newAreas:%@; >", NSStringFromClass([self class]), _newAreas]; return descriptionString; } @end -@implementation MTRServiceAreaClusterSelectLocationsParams (InternalMethods) +@implementation MTRServiceAreaClusterSelectAreasParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ServiceArea::Commands::SelectLocations::Type encodableStruct; + chip::app::Clusters::ServiceArea::Commands::SelectAreas::Type encodableStruct; ListFreer listFreer; { - if (self.newLocations == nil) { - encodableStruct.newLocations.SetNull(); + if (self.newAreas == nil) { + encodableStruct.newAreas.SetNull(); } else { - auto & nonNullValue_0 = encodableStruct.newLocations.SetNonNull(); + auto & nonNullValue_0 = encodableStruct.newAreas.SetNonNull(); { using ListType_1 = std::remove_reference_t; using ListMemberType_1 = ListMemberTypeGetter::Type; - if (self.newLocations.count != 0) { - auto * listHolder_1 = new ListHolder(self.newLocations.count); + if (self.newAreas.count != 0) { + auto * listHolder_1 = new ListHolder(self.newAreas.count); if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { return CHIP_ERROR_INVALID_ARGUMENT; } listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < self.newLocations.count; ++i_1) { - if (![self.newLocations[i_1] isKindOfClass:[NSNumber class]]) { + for (size_t i_1 = 0; i_1 < self.newAreas.count; ++i_1) { + if (![self.newAreas[i_1] isKindOfClass:[NSNumber class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_1 = (NSNumber *) self.newLocations[i_1]; + auto element_1 = (NSNumber *) self.newAreas[i_1]; listHolder_1->mList[i_1] = element_1.unsignedIntValue; } - nonNullValue_0 = ListType_1(listHolder_1->mList, self.newLocations.count); + nonNullValue_0 = ListType_1(listHolder_1->mList, self.newAreas.count); } else { nonNullValue_0 = ListType_1(); } @@ -21889,7 +21889,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRServiceAreaClusterSelectLocationsResponseParams +@implementation MTRServiceAreaClusterSelectAreasResponseParams - (instancetype)init { if (self = [super init]) { @@ -21903,7 +21903,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRServiceAreaClusterSelectLocationsResponseParams alloc] init]; + auto other = [[MTRServiceAreaClusterSelectAreasResponseParams alloc] init]; other.status = self.status; other.statusText = self.statusText; @@ -21924,7 +21924,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::ServiceArea::Commands::SelectLocationsResponse::DecodableType; + using DecodableType = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -21959,9 +21959,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRServiceAreaClusterSelectLocationsResponseParams (InternalMethods) +@implementation MTRServiceAreaClusterSelectAreasResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SelectLocationsResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; @@ -21982,7 +21982,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceA @end -@implementation MTRServiceAreaClusterSkipCurrentLocationParams +@implementation MTRServiceAreaClusterSkipAreaParams - (instancetype)init { if (self = [super init]) { @@ -21994,7 +21994,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRServiceAreaClusterSkipCurrentLocationParams alloc] init]; + auto other = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -22010,11 +22010,11 @@ - (NSString *)description @end -@implementation MTRServiceAreaClusterSkipCurrentLocationParams (InternalMethods) +@implementation MTRServiceAreaClusterSkipAreaParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocation::Type encodableStruct; + chip::app::Clusters::ServiceArea::Commands::SkipArea::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -22055,7 +22055,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRServiceAreaClusterSkipCurrentLocationResponseParams +@implementation MTRServiceAreaClusterSkipAreaResponseParams - (instancetype)init { if (self = [super init]) { @@ -22069,7 +22069,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRServiceAreaClusterSkipCurrentLocationResponseParams alloc] init]; + auto other = [[MTRServiceAreaClusterSkipAreaResponseParams alloc] init]; other.status = self.status; other.statusText = self.statusText; @@ -22090,7 +22090,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType; + using DecodableType = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -22125,9 +22125,9 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRServiceAreaClusterSkipCurrentLocationResponseParams (InternalMethods) +@implementation MTRServiceAreaClusterSkipAreaResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::DecodableType &)decodableStruct { { self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 93191eb3caa64d..4504aefdfc4e91 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1432,27 +1432,27 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRServiceAreaClusterSelectLocationsParams (InternalMethods) +@interface MTRServiceAreaClusterSelectAreasParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTRServiceAreaClusterSelectLocationsResponseParams (InternalMethods) +@interface MTRServiceAreaClusterSelectAreasResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SelectLocationsResponse::DecodableType &)decodableStruct; +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::DecodableType &)decodableStruct; @end -@interface MTRServiceAreaClusterSkipCurrentLocationParams (InternalMethods) +@interface MTRServiceAreaClusterSkipAreaParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @end -@interface MTRServiceAreaClusterSkipCurrentLocationResponseParams (InternalMethods) +@interface MTRServiceAreaClusterSkipAreaResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType &)decodableStruct; +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::DecodableType &)decodableStruct; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 6535195be109c9..27d774ef5cc31d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1588,7 +1588,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRServiceAreaClusterLocationInfoStruct : NSObject +@interface MTRServiceAreaClusterAreaInfoStruct : NSObject @property (nonatomic, copy) MTRDataTypeLocationDescriptorStruct * _Nullable locationInfo MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable landmarkTag MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable positionTag MTR_PROVISIONALLY_AVAILABLE; @@ -1596,10 +1596,10 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRServiceAreaClusterLocationStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull locationID MTR_PROVISIONALLY_AVAILABLE; +@interface MTRServiceAreaClusterAreaStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull areaID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable mapID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) MTRServiceAreaClusterLocationInfoStruct * _Nonnull locationInfo MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRServiceAreaClusterAreaInfoStruct * _Nonnull areaDesc MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -1610,7 +1610,7 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRServiceAreaClusterProgressStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull locationID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull areaID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable totalOperationalTime MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable estimatedTime MTR_PROVISIONALLY_AVAILABLE; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 6cafc8a4b50270..5821b104376d5a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -6610,7 +6610,7 @@ - (NSString *)description @end -@implementation MTRServiceAreaClusterLocationInfoStruct +@implementation MTRServiceAreaClusterAreaInfoStruct - (instancetype)init { if (self = [super init]) { @@ -6628,7 +6628,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRServiceAreaClusterLocationInfoStruct alloc] init]; + auto other = [[MTRServiceAreaClusterAreaInfoStruct alloc] init]; other.locationInfo = self.locationInfo; other.landmarkTag = self.landmarkTag; @@ -6646,34 +6646,34 @@ - (NSString *)description @end -@implementation MTRServiceAreaClusterLocationStruct +@implementation MTRServiceAreaClusterAreaStruct - (instancetype)init { if (self = [super init]) { - _locationID = @(0); + _areaID = @(0); _mapID = nil; - _locationInfo = [MTRServiceAreaClusterLocationInfoStruct new]; + _areaDesc = [MTRServiceAreaClusterAreaInfoStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRServiceAreaClusterLocationStruct alloc] init]; + auto other = [[MTRServiceAreaClusterAreaStruct alloc] init]; - other.locationID = self.locationID; + other.areaID = self.areaID; other.mapID = self.mapID; - other.locationInfo = self.locationInfo; + other.areaDesc = self.areaDesc; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: locationID:%@; mapID:%@; locationInfo:%@; >", NSStringFromClass([self class]), _locationID, _mapID, _locationInfo]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: areaID:%@; mapID:%@; areaDesc:%@; >", NSStringFromClass([self class]), _areaID, _mapID, _areaDesc]; return descriptionString; } @@ -6714,7 +6714,7 @@ - (instancetype)init { if (self = [super init]) { - _locationID = @(0); + _areaID = @(0); _status = @(0); @@ -6729,7 +6729,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRServiceAreaClusterProgressStruct alloc] init]; - other.locationID = self.locationID; + other.areaID = self.areaID; other.status = self.status; other.totalOperationalTime = self.totalOperationalTime; other.estimatedTime = self.estimatedTime; @@ -6739,7 +6739,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: locationID:%@; status:%@; totalOperationalTime:%@; estimatedTime:%@; >", NSStringFromClass([self class]), _locationID, _status, _totalOperationalTime, _estimatedTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: areaID:%@; status:%@; totalOperationalTime:%@; estimatedTime:%@; >", NSStringFromClass([self class]), _areaID, _status, _totalOperationalTime, _estimatedTime]; return descriptionString; } diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 8a55a7680596c8..811352a6d38f7e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2566,14 +2566,14 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ServiceArea::Operationa return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ServiceArea::SelectLocationsStatus val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ServiceArea::SelectAreasStatus val) { - using EnumType = ServiceArea::SelectLocationsStatus; + using EnumType = ServiceArea::SelectAreasStatus; switch (val) { case EnumType::kSuccess: - case EnumType::kUnsupportedLocation: - case EnumType::kDuplicatedLocations: + case EnumType::kUnsupportedArea: + case EnumType::kDuplicatedAreas: case EnumType::kInvalidInMode: case EnumType::kInvalidSet: return val; @@ -2581,13 +2581,13 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(ServiceArea::SelectLoca return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(ServiceArea::SkipCurrentLocationStatus val) +static auto __attribute__((unused)) EnsureKnownEnumValue(ServiceArea::SkipAreaStatus val) { - using EnumType = ServiceArea::SkipCurrentLocationStatus; + using EnumType = ServiceArea::SkipAreaStatus; switch (val) { case EnumType::kSuccess: - case EnumType::kInvalidLocationList: + case EnumType::kInvalidAreaList: case EnumType::kInvalidInMode: return val; default: diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index e375b394871e69..3c8d52d0bed54d 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -3807,14 +3807,14 @@ enum class OperationalStatusEnum : uint8_t kUnknownEnumValue = 4, }; -// Enum for SelectLocationsStatus -enum class SelectLocationsStatus : uint8_t +// Enum for SelectAreasStatus +enum class SelectAreasStatus : uint8_t { - kSuccess = 0x00, - kUnsupportedLocation = 0x01, - kDuplicatedLocations = 0x02, - kInvalidInMode = 0x03, - kInvalidSet = 0x04, + kSuccess = 0x00, + kUnsupportedArea = 0x01, + kDuplicatedAreas = 0x02, + kInvalidInMode = 0x03, + kInvalidSet = 0x04, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown @@ -3822,12 +3822,12 @@ enum class SelectLocationsStatus : uint8_t kUnknownEnumValue = 5, }; -// Enum for SkipCurrentLocationStatus -enum class SkipCurrentLocationStatus : uint8_t +// Enum for SkipAreaStatus +enum class SkipAreaStatus : uint8_t { - kSuccess = 0x00, - kInvalidLocationList = 0x01, - kInvalidInMode = 0x02, + kSuccess = 0x00, + kInvalidAreaList = 0x01, + kInvalidInMode = 0x02, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown 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 b725407b284118..916d5ed27457ab 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 @@ -20316,7 +20316,7 @@ namespace Events {} // namespace Events namespace ServiceArea { namespace Structs { -namespace LocationInfoStruct { +namespace AreaInfoStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -20365,15 +20365,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace LocationInfoStruct +} // namespace AreaInfoStruct -namespace LocationStruct { +namespace AreaStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLocationID), locationID); + encoder.Encode(to_underlying(Fields::kAreaID), areaID); encoder.Encode(to_underlying(Fields::kMapID), mapID); - encoder.Encode(to_underlying(Fields::kLocationInfo), locationInfo); + encoder.Encode(to_underlying(Fields::kAreaDesc), areaDesc); return encoder.Finalize(); } @@ -20391,17 +20391,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kLocationID)) + if (__context_tag == to_underlying(Fields::kAreaID)) { - err = DataModel::Decode(reader, locationID); + err = DataModel::Decode(reader, areaID); } else if (__context_tag == to_underlying(Fields::kMapID)) { err = DataModel::Decode(reader, mapID); } - else if (__context_tag == to_underlying(Fields::kLocationInfo)) + else if (__context_tag == to_underlying(Fields::kAreaDesc)) { - err = DataModel::Decode(reader, locationInfo); + err = DataModel::Decode(reader, areaDesc); } else { @@ -20411,7 +20411,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace LocationStruct +} // namespace AreaStruct namespace MapStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const @@ -20458,7 +20458,7 @@ namespace ProgressStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kLocationID), locationID); + encoder.Encode(to_underlying(Fields::kAreaID), areaID); encoder.Encode(to_underlying(Fields::kStatus), status); encoder.Encode(to_underlying(Fields::kTotalOperationalTime), totalOperationalTime); encoder.Encode(to_underlying(Fields::kEstimatedTime), estimatedTime); @@ -20479,9 +20479,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kLocationID)) + if (__context_tag == to_underlying(Fields::kAreaID)) { - err = DataModel::Decode(reader, locationID); + err = DataModel::Decode(reader, areaID); } else if (__context_tag == to_underlying(Fields::kStatus)) { @@ -20507,11 +20507,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } // namespace Structs namespace Commands { -namespace SelectLocations { +namespace SelectAreas { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kNewLocations), newLocations); + encoder.Encode(to_underlying(Fields::kNewAreas), newAreas); return encoder.Finalize(); } @@ -20529,9 +20529,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kNewLocations)) + if (__context_tag == to_underlying(Fields::kNewAreas)) { - err = DataModel::Decode(reader, newLocations); + err = DataModel::Decode(reader, newAreas); } else { @@ -20540,8 +20540,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SelectLocations. -namespace SelectLocationsResponse { +} // namespace SelectAreas. +namespace SelectAreasResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -20579,8 +20579,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SelectLocationsResponse. -namespace SkipCurrentLocation { +} // namespace SelectAreasResponse. +namespace SkipArea { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -20599,8 +20599,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace SkipCurrentLocation. -namespace SkipCurrentLocationResponse { +} // namespace SkipArea. +namespace SkipAreaResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -20638,7 +20638,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SkipCurrentLocationResponse. +} // namespace SkipAreaResponse. } // namespace Commands namespace Attributes { @@ -20646,14 +20646,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::SupportedLocations::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, supportedLocations); + case Attributes::SupportedAreas::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedAreas); case Attributes::SupportedMaps::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, supportedMaps); - case Attributes::SelectedLocations::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, selectedLocations); - case Attributes::CurrentLocation::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, currentLocation); + case Attributes::SelectedAreas::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, selectedAreas); + case Attributes::CurrentArea::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, currentArea); case Attributes::EstimatedEndTime::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, estimatedEndTime); case Attributes::Progress::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 7ecd2334890ad8..a32e7aed4a13de 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 @@ -28320,7 +28320,7 @@ struct TypeInfo } // namespace BarrierControl namespace ServiceArea { namespace Structs { -namespace LocationInfoStruct { +namespace AreaInfoStruct { enum class Fields : uint8_t { kLocationInfo = 0, @@ -28346,21 +28346,21 @@ struct Type using DecodableType = Type; -} // namespace LocationInfoStruct -namespace LocationStruct { +} // namespace AreaInfoStruct +namespace AreaStruct { enum class Fields : uint8_t { - kLocationID = 0, - kMapID = 1, - kLocationInfo = 2, + kAreaID = 0, + kMapID = 1, + kAreaDesc = 2, }; struct Type { public: - uint32_t locationID = static_cast(0); + uint32_t areaID = static_cast(0); DataModel::Nullable mapID; - Structs::LocationInfoStruct::Type locationInfo; + Structs::AreaInfoStruct::Type areaDesc; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -28371,7 +28371,7 @@ struct Type using DecodableType = Type; -} // namespace LocationStruct +} // namespace AreaStruct namespace MapStruct { enum class Fields : uint8_t { @@ -28398,7 +28398,7 @@ using DecodableType = Type; namespace ProgressStruct { enum class Fields : uint8_t { - kLocationID = 0, + kAreaID = 0, kStatus = 1, kTotalOperationalTime = 2, kEstimatedTime = 3, @@ -28407,7 +28407,7 @@ enum class Fields : uint8_t struct Type { public: - uint32_t locationID = static_cast(0); + uint32_t areaID = static_cast(0); OperationalStatusEnum status = static_cast(0); Optional> totalOperationalTime; Optional> estimatedTime; @@ -28427,47 +28427,47 @@ using DecodableType = Type; namespace Commands { // Forward-declarations so we can reference these later. -namespace SelectLocations { +namespace SelectAreas { struct Type; struct DecodableType; -} // namespace SelectLocations +} // namespace SelectAreas -namespace SelectLocationsResponse { +namespace SelectAreasResponse { struct Type; struct DecodableType; -} // namespace SelectLocationsResponse +} // namespace SelectAreasResponse -namespace SkipCurrentLocation { +namespace SkipArea { struct Type; struct DecodableType; -} // namespace SkipCurrentLocation +} // namespace SkipArea -namespace SkipCurrentLocationResponse { +namespace SkipAreaResponse { struct Type; struct DecodableType; -} // namespace SkipCurrentLocationResponse +} // namespace SkipAreaResponse } // namespace Commands namespace Commands { -namespace SelectLocations { +namespace SelectAreas { enum class Fields : uint8_t { - kNewLocations = 0, + kNewAreas = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SelectLocations::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelectAreas::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - DataModel::Nullable> newLocations; + DataModel::Nullable> newAreas; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ServiceArea::Commands::SelectLocationsResponse::DecodableType; + using ResponseType = Clusters::ServiceArea::Commands::SelectAreasResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -28475,14 +28475,14 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SelectLocations::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelectAreas::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - DataModel::Nullable> newLocations; + DataModel::Nullable> newAreas; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SelectLocations -namespace SelectLocationsResponse { +}; // namespace SelectAreas +namespace SelectAreasResponse { enum class Fields : uint8_t { kStatus = 0, @@ -28493,10 +28493,10 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SelectLocationsResponse::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelectAreasResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - SelectLocationsStatus status = static_cast(0); + SelectAreasStatus status = static_cast(0); Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -28509,15 +28509,15 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SelectLocationsResponse::Id; } + static constexpr CommandId GetCommandId() { return Commands::SelectAreasResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - SelectLocationsStatus status = static_cast(0); + SelectAreasStatus status = static_cast(0); Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SelectLocationsResponse -namespace SkipCurrentLocation { +}; // namespace SelectAreasResponse +namespace SkipArea { enum class Fields : uint8_t { }; @@ -28526,12 +28526,12 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SkipCurrentLocation::Id; } + static constexpr CommandId GetCommandId() { return Commands::SkipArea::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType; + using ResponseType = Clusters::ServiceArea::Commands::SkipAreaResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -28539,13 +28539,13 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SkipCurrentLocation::Id; } + static constexpr CommandId GetCommandId() { return Commands::SkipArea::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SkipCurrentLocation -namespace SkipCurrentLocationResponse { +}; // namespace SkipArea +namespace SkipAreaResponse { enum class Fields : uint8_t { kStatus = 0, @@ -28556,10 +28556,10 @@ struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SkipCurrentLocationResponse::Id; } + static constexpr CommandId GetCommandId() { return Commands::SkipAreaResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - SkipCurrentLocationStatus status = static_cast(0); + SkipAreaStatus status = static_cast(0); Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -28572,32 +28572,31 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SkipCurrentLocationResponse::Id; } + static constexpr CommandId GetCommandId() { return Commands::SkipAreaResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - SkipCurrentLocationStatus status = static_cast(0); + SkipAreaStatus status = static_cast(0); Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SkipCurrentLocationResponse +}; // namespace SkipAreaResponse } // namespace Commands namespace Attributes { -namespace SupportedLocations { +namespace SupportedAreas { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; using DecodableArgType = - const chip::app::DataModel::DecodableList &; + const chip::app::DataModel::DecodableList &; static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedLocations::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedAreas::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedLocations +} // namespace SupportedAreas namespace SupportedMaps { struct TypeInfo { @@ -28613,7 +28612,7 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace SupportedMaps -namespace SelectedLocations { +namespace SelectedAreas { struct TypeInfo { using Type = chip::app::DataModel::Nullable>; @@ -28621,11 +28620,11 @@ struct TypeInfo using DecodableArgType = const chip::app::DataModel::Nullable> &; static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SelectedLocations::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedAreas::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SelectedLocations -namespace CurrentLocation { +} // namespace SelectedAreas +namespace CurrentArea { struct TypeInfo { using Type = chip::app::DataModel::Nullable; @@ -28633,10 +28632,10 @@ struct TypeInfo using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentLocation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentArea::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentLocation +} // namespace CurrentArea namespace EstimatedEndTime { struct TypeInfo { @@ -28709,10 +28708,10 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SupportedLocations::TypeInfo::DecodableType supportedLocations; + Attributes::SupportedAreas::TypeInfo::DecodableType supportedAreas; Attributes::SupportedMaps::TypeInfo::DecodableType supportedMaps; - Attributes::SelectedLocations::TypeInfo::DecodableType selectedLocations; - Attributes::CurrentLocation::TypeInfo::DecodableType currentLocation; + Attributes::SelectedAreas::TypeInfo::DecodableType selectedAreas; + Attributes::CurrentArea::TypeInfo::DecodableType currentArea; Attributes::EstimatedEndTime::TypeInfo::DecodableType estimatedEndTime; Attributes::Progress::TypeInfo::DecodableType progress; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; 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 5deab64ef504fc..7bd5d877f69897 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 @@ -4798,21 +4798,21 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace ServiceArea { namespace Attributes { -namespace SupportedLocations { +namespace SupportedAreas { static constexpr AttributeId Id = 0x00000000; -} // namespace SupportedLocations +} // namespace SupportedAreas namespace SupportedMaps { static constexpr AttributeId Id = 0x00000001; } // namespace SupportedMaps -namespace SelectedLocations { +namespace SelectedAreas { static constexpr AttributeId Id = 0x00000002; -} // namespace SelectedLocations +} // namespace SelectedAreas -namespace CurrentLocation { +namespace CurrentArea { static constexpr AttributeId Id = 0x00000003; -} // namespace CurrentLocation +} // namespace CurrentArea namespace EstimatedEndTime { static constexpr AttributeId Id = 0x00000004; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index e9210638315112..e5948484cb568a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1298,21 +1298,21 @@ static constexpr CommandId Id = 0x00000001; namespace ServiceArea { namespace Commands { -namespace SelectLocations { +namespace SelectAreas { static constexpr CommandId Id = 0x00000000; -} // namespace SelectLocations +} // namespace SelectAreas -namespace SelectLocationsResponse { +namespace SelectAreasResponse { static constexpr CommandId Id = 0x00000001; -} // namespace SelectLocationsResponse +} // namespace SelectAreasResponse -namespace SkipCurrentLocation { +namespace SkipArea { static constexpr CommandId Id = 0x00000002; -} // namespace SkipCurrentLocation +} // namespace SkipArea -namespace SkipCurrentLocationResponse { +namespace SkipAreaResponse { static constexpr CommandId Id = 0x00000003; -} // namespace SkipCurrentLocationResponse +} // namespace SkipAreaResponse } // namespace Commands } // namespace ServiceArea diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index a48a4b5376f2b7..1fb3e0ccaab559 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -9362,14 +9362,14 @@ class BarrierControlBarrierControlStop : public ClusterCommand | Cluster ServiceArea | 0x0150 | |------------------------------------------------------------------------------| | Commands: | | -| * SelectLocations | 0x00 | -| * SkipCurrentLocation | 0x02 | +| * SelectAreas | 0x00 | +| * SkipArea | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedLocations | 0x0000 | +| * SupportedAreas | 0x0000 | | * SupportedMaps | 0x0001 | -| * SelectedLocations | 0x0002 | -| * CurrentLocation | 0x0003 | +| * SelectedAreas | 0x0002 | +| * CurrentArea | 0x0003 | | * EstimatedEndTime | 0x0004 | | * Progress | 0x0005 | | * GeneratedCommandList | 0xFFF8 | @@ -9383,22 +9383,22 @@ class BarrierControlBarrierControlStop : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command SelectLocations + * Command SelectAreas */ -class ServiceAreaSelectLocations : public ClusterCommand +class ServiceAreaSelectAreas : public ClusterCommand { public: - ServiceAreaSelectLocations(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("select-locations", credsIssuerConfig), mComplex_NewLocations(&mRequest.newLocations) + ServiceAreaSelectAreas(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("select-areas", credsIssuerConfig), mComplex_NewAreas(&mRequest.newAreas) { - AddArgument("NewLocations", &mComplex_NewLocations); + AddArgument("NewAreas", &mComplex_NewAreas); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectLocations::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9408,7 +9408,7 @@ class ServiceAreaSelectLocations : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectLocations::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9417,18 +9417,17 @@ class ServiceAreaSelectLocations : public ClusterCommand } private: - chip::app::Clusters::ServiceArea::Commands::SelectLocations::Type mRequest; - TypedComplexArgument>> mComplex_NewLocations; + chip::app::Clusters::ServiceArea::Commands::SelectAreas::Type mRequest; + TypedComplexArgument>> mComplex_NewAreas; }; /* - * Command SkipCurrentLocation + * Command SkipArea */ -class ServiceAreaSkipCurrentLocation : public ClusterCommand +class ServiceAreaSkipArea : public ClusterCommand { public: - ServiceAreaSkipCurrentLocation(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("skip-current-location", credsIssuerConfig) + ServiceAreaSkipArea(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-area", credsIssuerConfig) { ClusterCommand::AddArguments(); } @@ -9436,7 +9435,7 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipArea::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9446,7 +9445,7 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipArea::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9455,7 +9454,7 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand } private: - chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocation::Type mRequest; + chip::app::Clusters::ServiceArea::Commands::SkipArea::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -22846,17 +22845,17 @@ void registerClusterServiceArea(Commands & commands, CredentialIssuerCommands * // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-locations", Attributes::SupportedLocations::Id, credsIssuerConfig), // + make_unique(Id, "supported-areas", Attributes::SupportedAreas::Id, credsIssuerConfig), // make_unique(Id, "supported-maps", Attributes::SupportedMaps::Id, credsIssuerConfig), // - make_unique(Id, "selected-locations", Attributes::SelectedLocations::Id, credsIssuerConfig), // - make_unique(Id, "current-location", Attributes::CurrentLocation::Id, credsIssuerConfig), // + make_unique(Id, "selected-areas", Attributes::SelectedAreas::Id, credsIssuerConfig), // + make_unique(Id, "current-area", Attributes::CurrentArea::Id, credsIssuerConfig), // make_unique(Id, "estimated-end-time", Attributes::EstimatedEndTime::Id, credsIssuerConfig), // make_unique(Id, "progress", Attributes::Progress::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -22866,17 +22865,16 @@ void registerClusterServiceArea(Commands & commands, CredentialIssuerCommands * make_unique(Id, "feature-map", Attributes::FeatureMap::Id, credsIssuerConfig), // make_unique(Id, "cluster-revision", Attributes::ClusterRevision::Id, credsIssuerConfig), // make_unique>(Id, credsIssuerConfig), // - make_unique>>( - Id, "supported-locations", Attributes::SupportedLocations::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique< + WriteAttributeAsComplex>>( + Id, "supported-areas", Attributes::SupportedAreas::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>>( Id, "supported-maps", Attributes::SupportedMaps::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>>( - Id, "selected-locations", Attributes::SelectedLocations::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>>(Id, "current-location", 0, UINT32_MAX, - Attributes::CurrentLocation::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + Id, "selected-areas", Attributes::SelectedAreas::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "current-area", 0, UINT32_MAX, Attributes::CurrentArea::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>(Id, "estimated-end-time", 0, UINT32_MAX, Attributes::EstimatedEndTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -22897,10 +22895,10 @@ void registerClusterServiceArea(Commands & commands, CredentialIssuerCommands * make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "supported-locations", Attributes::SupportedLocations::Id, credsIssuerConfig), // + make_unique(Id, "supported-areas", Attributes::SupportedAreas::Id, credsIssuerConfig), // make_unique(Id, "supported-maps", Attributes::SupportedMaps::Id, credsIssuerConfig), // - make_unique(Id, "selected-locations", Attributes::SelectedLocations::Id, credsIssuerConfig), // - make_unique(Id, "current-location", Attributes::CurrentLocation::Id, credsIssuerConfig), // + make_unique(Id, "selected-areas", Attributes::SelectedAreas::Id, credsIssuerConfig), // + make_unique(Id, "current-area", Attributes::CurrentArea::Id, credsIssuerConfig), // make_unique(Id, "estimated-end-time", Attributes::EstimatedEndTime::Id, credsIssuerConfig), // make_unique(Id, "progress", Attributes::Progress::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 32b3967affe64e..51a2d775b6e94c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -3943,7 +3943,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::DoorLock::Structs::Cre } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ServiceArea::Structs::LocationInfoStruct::Type & request, + chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); @@ -3951,14 +3951,14 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LocationInfoStruct.locationInfo", "locationInfo", - value.isMember("locationInfo"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("LocationInfoStruct.landmarkTag", "landmarkTag", value.isMember("landmarkTag"))); + ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.locationInfo", "locationInfo", value.isMember("locationInfo"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("LocationInfoStruct.positionTag", "positionTag", value.isMember("positionTag"))); + ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.landmarkTag", "landmarkTag", value.isMember("landmarkTag"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("LocationInfoStruct.surfaceTag", "surfaceTag", value.isMember("surfaceTag"))); + ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.positionTag", "positionTag", value.isMember("positionTag"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.surfaceTag", "surfaceTag", value.isMember("surfaceTag"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "locationInfo"); @@ -3980,7 +3980,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } -void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::LocationInfoStruct::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::Type & request) { ComplexArgumentParser::Finalize(request.locationInfo); ComplexArgumentParser::Finalize(request.landmarkTag); @@ -3988,8 +3988,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs:: ComplexArgumentParser::Finalize(request.surfaceTag); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::ServiceArea::Structs::LocationStruct::Type & request, +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::AreaStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); @@ -3997,33 +3996,31 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("LocationStruct.locationID", "locationID", value.isMember("locationID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LocationStruct.mapID", "mapID", value.isMember("mapID"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("LocationStruct.locationInfo", "locationInfo", value.isMember("locationInfo"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.areaID", "areaID", value.isMember("areaID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.mapID", "mapID", value.isMember("mapID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.areaDesc", "areaDesc", value.isMember("areaDesc"))); char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "locationID"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.locationID, value["locationID"])); - valueCopy.removeMember("locationID"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "areaID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.areaID, value["areaID"])); + valueCopy.removeMember("areaID"); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "mapID"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.mapID, value["mapID"])); valueCopy.removeMember("mapID"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "locationInfo"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.locationInfo, value["locationInfo"])); - valueCopy.removeMember("locationInfo"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "areaDesc"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.areaDesc, value["areaDesc"])); + valueCopy.removeMember("areaDesc"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } -void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::LocationStruct::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::AreaStruct::Type & request) { - ComplexArgumentParser::Finalize(request.locationID); + ComplexArgumentParser::Finalize(request.areaID); ComplexArgumentParser::Finalize(request.mapID); - ComplexArgumentParser::Finalize(request.locationInfo); + ComplexArgumentParser::Finalize(request.areaDesc); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::MapStruct::Type & request, @@ -4064,14 +4061,13 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ProgressStruct.locationID", "locationID", value.isMember("locationID"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProgressStruct.areaID", "areaID", value.isMember("areaID"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ProgressStruct.status", "status", value.isMember("status"))); char labelWithMember[kMaxLabelLength]; - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "locationID"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.locationID, value["locationID"])); - valueCopy.removeMember("locationID"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "areaID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.areaID, value["areaID"])); + valueCopy.removeMember("areaID"); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "status"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.status, value["status"])); @@ -4097,7 +4093,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::ProgressStruct::Type & request) { - ComplexArgumentParser::Finalize(request.locationID); + ComplexArgumentParser::Finalize(request.areaID); ComplexArgumentParser::Finalize(request.status); ComplexArgumentParser::Finalize(request.totalOperationalTime); ComplexArgumentParser::Finalize(request.estimatedTime); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 82c9b590eb2920..14d10ae89ba82b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -453,15 +453,15 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::DoorLock::Struc static void Finalize(chip::app::Clusters::DoorLock::Structs::CredentialStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::LocationInfoStruct::Type & request, +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::ServiceArea::Structs::LocationInfoStruct::Type & request); +static void Finalize(chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::LocationStruct::Type & request, +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::AreaStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::ServiceArea::Structs::LocationStruct::Type & request); +static void Finalize(chip::app::Clusters::ServiceArea::Structs::AreaStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::MapStruct::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 c0b553ca7103bb..de22cae0e0346c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3490,7 +3490,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ServiceArea::Structs::LocationInfoStruct::DecodableType & value) + const chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -3531,14 +3531,14 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::ServiceArea::Structs::LocationStruct::DecodableType & value) + const chip::app::Clusters::ServiceArea::Structs::AreaStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("LocationID", indent + 1, value.locationID); + CHIP_ERROR err = LogValue("AreaID", indent + 1, value.areaID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LocationID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AreaID'"); return err; } } @@ -3551,10 +3551,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("LocationInfo", indent + 1, value.locationInfo); + CHIP_ERROR err = LogValue("AreaDesc", indent + 1, value.areaDesc); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LocationInfo'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AreaDesc'"); return err; } } @@ -3593,10 +3593,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("LocationID", indent + 1, value.locationID); + CHIP_ERROR err = LogValue("AreaID", indent + 1, value.areaID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LocationID'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AreaID'"); return err; } } @@ -8442,7 +8442,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ServiceArea::Commands::SelectLocationsResponse::DecodableType & value) + const ServiceArea::Commands::SelectAreasResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); @@ -8451,7 +8451,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType & value) + const ServiceArea::Commands::SkipAreaResponse::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); @@ -14697,10 +14697,10 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP case ServiceArea::Id: { switch (path.mAttributeId) { - case ServiceArea::Attributes::SupportedLocations::Id: { - chip::app::DataModel::DecodableList value; + case ServiceArea::Attributes::SupportedAreas::Id: { + chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SupportedLocations", 1, value); + return DataModelLogger::LogValue("SupportedAreas", 1, value); } case ServiceArea::Attributes::SupportedMaps::Id: { chip::app::DataModel::Nullable< @@ -14709,15 +14709,15 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SupportedMaps", 1, value); } - case ServiceArea::Attributes::SelectedLocations::Id: { + case ServiceArea::Attributes::SelectedAreas::Id: { chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SelectedLocations", 1, value); + return DataModelLogger::LogValue("SelectedAreas", 1, value); } - case ServiceArea::Attributes::CurrentLocation::Id: { + case ServiceArea::Attributes::CurrentArea::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("CurrentLocation", 1, value); + return DataModelLogger::LogValue("CurrentArea", 1, value); } case ServiceArea::Attributes::EstimatedEndTime::Id: { chip::app::DataModel::Nullable value; @@ -19775,15 +19775,15 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa case ServiceArea::Id: { switch (path.mCommandId) { - case ServiceArea::Commands::SelectLocationsResponse::Id: { - ServiceArea::Commands::SelectLocationsResponse::DecodableType value; + case ServiceArea::Commands::SelectAreasResponse::Id: { + ServiceArea::Commands::SelectAreasResponse::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SelectLocationsResponse", 1, value); + return DataModelLogger::LogValue("SelectAreasResponse", 1, value); } - case ServiceArea::Commands::SkipCurrentLocationResponse::Id: { - ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType value; + case ServiceArea::Commands::SkipAreaResponse::Id: { + ServiceArea::Commands::SkipAreaResponse::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("SkipCurrentLocationResponse", 1, value); + return DataModelLogger::LogValue("SkipAreaResponse", 1, value); } } break; 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 c7a0a925fc11f3..7d7e961dcb16d3 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -284,10 +284,10 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ServiceArea::Structs::LocationInfoStruct::DecodableType & value); + const chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ServiceArea::Structs::LocationStruct::DecodableType & value); + const chip::app::Clusters::ServiceArea::Structs::AreaStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::ServiceArea::Structs::MapStruct::DecodableType & value); @@ -793,9 +793,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ServiceArea::Commands::SelectLocationsResponse::DecodableType & value); + const chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::DecodableType & value); + const chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & value); static CHIP_ERROR 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 e226d87a19aec8..0643c1f99d09e4 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -103852,14 +103852,14 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut | Cluster ServiceArea | 0x0150 | |------------------------------------------------------------------------------| | Commands: | | -| * SelectLocations | 0x00 | -| * SkipCurrentLocation | 0x02 | +| * SelectAreas | 0x00 | +| * SkipArea | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedLocations | 0x0000 | +| * SupportedAreas | 0x0000 | | * SupportedMaps | 0x0001 | -| * SelectedLocations | 0x0002 | -| * CurrentLocation | 0x0003 | +| * SelectedAreas | 0x0002 | +| * CurrentArea | 0x0003 | | * EstimatedEndTime | 0x0004 | | * Progress | 0x0005 | | * GeneratedCommandList | 0xFFF8 | @@ -103874,16 +103874,16 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Command SelectLocations + * Command SelectAreas */ -class ServiceAreaSelectLocations : public ClusterCommand { +class ServiceAreaSelectAreas : public ClusterCommand { public: - ServiceAreaSelectLocations() - : ClusterCommand("select-locations") - , mComplex_NewLocations(&mRequest.newLocations) + ServiceAreaSelectAreas() + : ClusterCommand("select-areas") + , mComplex_NewAreas(&mRequest.newAreas) { #if MTR_ENABLE_PROVISIONAL - AddArgument("NewLocations", &mComplex_NewLocations); + AddArgument("NewAreas", &mComplex_NewAreas); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -103891,68 +103891,68 @@ class ServiceAreaSelectLocations : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectLocations::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SelectAreas::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRServiceAreaClusterSelectLocationsParams alloc] init]; + __auto_type * params = [[MTRServiceAreaClusterSelectAreasParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - if (mRequest.newLocations.IsNull()) { - params.newLocations = nil; + if (mRequest.newAreas.IsNull()) { + params.newAreas = nil; } else { { // Scope for our temporary variables auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.newLocations.Value()) { + for (auto & entry_1 : mRequest.newAreas.Value()) { NSNumber * newElement_1; newElement_1 = [NSNumber numberWithUnsignedInt:entry_1]; [array_1 addObject:newElement_1]; } - params.newLocations = array_1; + params.newAreas = array_1; } } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster selectLocationsWithParams:params completion: - ^(MTRServiceAreaClusterSelectLocationsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectLocationsResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectLocationsResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster selectAreasWithParams:params completion: + ^(MTRServiceAreaClusterSelectAreasResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SelectAreasResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ServiceArea::Commands::SelectLocations::Type mRequest; - TypedComplexArgument>> mComplex_NewLocations; + chip::app::Clusters::ServiceArea::Commands::SelectAreas::Type mRequest; + TypedComplexArgument>> mComplex_NewAreas; }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Command SkipCurrentLocation + * Command SkipArea */ -class ServiceAreaSkipCurrentLocation : public ClusterCommand { +class ServiceAreaSkipArea : public ClusterCommand { public: - ServiceAreaSkipCurrentLocation() - : ClusterCommand("skip-current-location") + ServiceAreaSkipArea() + : ClusterCommand("skip-area") { ClusterCommand::AddArguments(); } @@ -103960,35 +103960,35 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand { CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocation::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ServiceArea::Commands::SkipArea::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRServiceAreaClusterSkipCurrentLocationParams alloc] init]; + __auto_type * params = [[MTRServiceAreaClusterSkipAreaParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster skipCurrentLocationWithParams:params completion: - ^(MTRServiceAreaClusterSkipCurrentLocationResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipCurrentLocationResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster skipAreaWithParams:params completion: + ^(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::ServiceArea::Commands::SkipAreaResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -104001,34 +104001,34 @@ class ServiceAreaSkipCurrentLocation : public ClusterCommand { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedLocations + * Attribute SupportedAreas */ -class ReadServiceAreaSupportedLocations : public ReadAttribute { +class ReadServiceAreaSupportedAreas : public ReadAttribute { public: - ReadServiceAreaSupportedLocations() - : ReadAttribute("supported-locations") + ReadServiceAreaSupportedAreas() + : ReadAttribute("supported-areas") { } - ~ReadServiceAreaSupportedLocations() + ~ReadServiceAreaSupportedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedLocations::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedAreas::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 = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedLocationsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SupportedLocations response %@", [value description]); + [cluster readAttributeSupportedAreasWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SupportedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea SupportedLocations read Error", error); + LogNSError("ServiceArea SupportedAreas read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104037,21 +104037,21 @@ class ReadServiceAreaSupportedLocations : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaSupportedLocations : public SubscribeAttribute { +class SubscribeAttributeServiceAreaSupportedAreas : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaSupportedLocations() - : SubscribeAttribute("supported-locations") + SubscribeAttributeServiceAreaSupportedAreas() + : SubscribeAttribute("supported-areas") { } - ~SubscribeAttributeServiceAreaSupportedLocations() + ~SubscribeAttributeServiceAreaSupportedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedLocations::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SupportedAreas::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); @@ -104066,10 +104066,10 @@ class SubscribeAttributeServiceAreaSupportedLocations : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedLocationsWithParams:params + [cluster subscribeAttributeSupportedAreasWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SupportedLocations response %@", [value description]); + NSLog(@"ServiceArea.SupportedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104171,34 +104171,34 @@ class SubscribeAttributeServiceAreaSupportedMaps : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedLocations + * Attribute SelectedAreas */ -class ReadServiceAreaSelectedLocations : public ReadAttribute { +class ReadServiceAreaSelectedAreas : public ReadAttribute { public: - ReadServiceAreaSelectedLocations() - : ReadAttribute("selected-locations") + ReadServiceAreaSelectedAreas() + : ReadAttribute("selected-areas") { } - ~ReadServiceAreaSelectedLocations() + ~ReadServiceAreaSelectedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedLocations::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedAreas::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 = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSelectedLocationsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SelectedLocations response %@", [value description]); + [cluster readAttributeSelectedAreasWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.SelectedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea SelectedLocations read Error", error); + LogNSError("ServiceArea SelectedAreas read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104207,21 +104207,21 @@ class ReadServiceAreaSelectedLocations : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaSelectedLocations : public SubscribeAttribute { +class SubscribeAttributeServiceAreaSelectedAreas : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaSelectedLocations() - : SubscribeAttribute("selected-locations") + SubscribeAttributeServiceAreaSelectedAreas() + : SubscribeAttribute("selected-areas") { } - ~SubscribeAttributeServiceAreaSelectedLocations() + ~SubscribeAttributeServiceAreaSelectedAreas() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedLocations::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::SelectedAreas::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); @@ -104236,10 +104236,10 @@ class SubscribeAttributeServiceAreaSelectedLocations : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedLocationsWithParams:params + [cluster subscribeAttributeSelectedAreasWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.SelectedLocations response %@", [value description]); + NSLog(@"ServiceArea.SelectedAreas response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -104256,34 +104256,34 @@ class SubscribeAttributeServiceAreaSelectedLocations : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentLocation + * Attribute CurrentArea */ -class ReadServiceAreaCurrentLocation : public ReadAttribute { +class ReadServiceAreaCurrentArea : public ReadAttribute { public: - ReadServiceAreaCurrentLocation() - : ReadAttribute("current-location") + ReadServiceAreaCurrentArea() + : ReadAttribute("current-area") { } - ~ReadServiceAreaCurrentLocation() + ~ReadServiceAreaCurrentArea() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentLocation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentArea::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 = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentLocationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.CurrentLocation response %@", [value description]); + [cluster readAttributeCurrentAreaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ServiceArea.CurrentArea response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ServiceArea CurrentLocation read Error", error); + LogNSError("ServiceArea CurrentArea read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -104292,21 +104292,21 @@ class ReadServiceAreaCurrentLocation : public ReadAttribute { } }; -class SubscribeAttributeServiceAreaCurrentLocation : public SubscribeAttribute { +class SubscribeAttributeServiceAreaCurrentArea : public SubscribeAttribute { public: - SubscribeAttributeServiceAreaCurrentLocation() - : SubscribeAttribute("current-location") + SubscribeAttributeServiceAreaCurrentArea() + : SubscribeAttribute("current-area") { } - ~SubscribeAttributeServiceAreaCurrentLocation() + ~SubscribeAttributeServiceAreaCurrentArea() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ServiceArea::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentLocation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ServiceArea::Attributes::CurrentArea::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); @@ -104321,10 +104321,10 @@ class SubscribeAttributeServiceAreaCurrentLocation : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentLocationWithParams:params + [cluster subscribeAttributeCurrentAreaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ServiceArea.CurrentLocation response %@", [value description]); + NSLog(@"ServiceArea.CurrentArea response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -196261,29 +196261,29 @@ void registerClusterServiceArea(Commands & commands) commands_list clusterCommands = { make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // + make_unique(), // + make_unique(), // #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), //