Update service area xml from 07 (#34738)
* Updated the golabl data type's XMLs, removing the cluster entries.
* Zap generated after XML update.
* Fixed namespaces used of global structs.
* Restyled by clang-format
* Renamed LocationInfoStruct to AreaInfoStruct.
* Zap generated after XML update.
* Renamed LocationStruct to AreaStruct and its LocationID and LocationDesc fields.
* Zap generated after XML update.
* Updated SDK and example code to match the new naming.
* Updated the ProgressStruct's LocationID name to AreaID.
* Zap generated after XML update.
* Updated the SDK code following name changes.
* Updated the SelectLocationsStatus and SkipLocationStatus enum names and some of their enums.
* Zap generated after XML update.
* Updated the SelectLocationsStatus and SkipCurrentLocationStatus names and their enum names.
* Updated the names of the SupportedLocations, SelectedLocations and CurrentLocation attributes.
* Zap generated after XML update.
* Updated the changed names in the SDK.
* Updated the service area command names in XML.
* Zap generated after XML update.
* Updated the service area command names in the SDK.
* Updated the rvc-example zap file.
* Refactored LocationStructureWrapper to AreaStructureWrapper.
* Restyled by clang-format
* Regenerated zap files due to changes upsteram.
* Removed unused generated file.
* Updated the Service Area XML marking previously nullabel attributes as not-nullable.
* Zap generated after XML update.
* Updated the attribute encoding and some server logic following the romoval of the nullable quality for some attributes.
* Explicitly set the Service Area version.
* Zap generated after XML update.
* Updated the service area features in the XML to match the current spec.
* Zap generated after XML update.
* Updated the SupportedArea validation logic as if the MAPS feature is not supported, the Delegate may choose not to implement map related methods.
* Change the type of the MapID to uint32 to match the spec.
* Added the SkippedArea arg to the SkipArea command.
* Zap generated after XML update.
* Updated the Service Area server code to handle the new SkippedArea command arg.
* Updated the service area XML to match the current spec. This includes the addition of the LandmarkInfoStruct and updates of AreaInfoStruct, SelectAreasStatus.
* Zap generated after XML update.
* Updated SDK server code and rvc-example after changes to the XML.
* Restyled by whitespace
* added vector include.
* spacing changes form zap regen.
* Fixed minor mistake during merge.
* Restyled by clang-format
* Applied suggestions from review.
* Restyled by whitespace
* Updated the LondmarkInfoSturct PositionTag type.
* Zap generated after XML update.
* Fixed SDK following update to the position type.
* Restyled by clang-format
* Missed a submudule update.
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/examples/rvc-app/rvc-common/include/rvc-device.h b/examples/rvc-app/rvc-common/include/rvc-device.h
index 092ded9..da03422 100644
--- a/examples/rvc-app/rvc-common/include/rvc-device.h
+++ b/examples/rvc-app/rvc-common/include/rvc-device.h
@@ -44,7 +44,8 @@
mRunModeDelegate(), mRunModeInstance(&mRunModeDelegate, aRvcClustersEndpoint, RvcRunMode::Id, 0), mCleanModeDelegate(),
mCleanModeInstance(&mCleanModeDelegate, aRvcClustersEndpoint, RvcCleanMode::Id, 0), mOperationalStateDelegate(),
mOperationalStateInstance(&mOperationalStateDelegate, aRvcClustersEndpoint), mServiceAreaDelegate(),
- mServiceAreaInstance(&mServiceAreaDelegate, aRvcClustersEndpoint, BitMask<ServiceArea::Feature>(0))
+ mServiceAreaInstance(&mServiceAreaDelegate, aRvcClustersEndpoint,
+ BitMask<ServiceArea::Feature>(ServiceArea::Feature::kMaps, ServiceArea::Feature::kProgressReporting))
{
// set the current-mode at start-up
mRunModeInstance.UpdateCurrentMode(RvcRunMode::ModeIdle);
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 40f312f..759c22a 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
@@ -49,7 +49,7 @@
bool IsValidSelectAreasSet(const ServiceArea::Commands::SelectAreas::DecodableType & req,
ServiceArea::SelectAreasStatus & locationStatus, MutableCharSpan statusText) override;
- bool HandleSkipCurrentArea(MutableCharSpan skipStatusText) override;
+ bool HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan skipStatusText) override;
//*************************************************************************
// Supported Locations accessors
@@ -78,7 +78,7 @@
bool GetSupportedMapByIndex(uint32_t listIndex, ServiceArea::MapStructureWrapper & supportedMap) override;
- bool GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, ServiceArea::MapStructureWrapper & supportedMap) override;
+ bool GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, ServiceArea::MapStructureWrapper & supportedMap) override;
bool AddSupportedMap(const ServiceArea::MapStructureWrapper & newMap, 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 7a87e9e..4467c17 100644
--- a/examples/rvc-app/rvc-common/rvc-app.matter
+++ b/examples/rvc-app/rvc-common/rvc-app.matter
@@ -1424,9 +1424,9 @@
command GoHome(): OperationalCommandResponse = 128;
}
-/** The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location. */
+/** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */
provisional cluster ServiceArea = 336 {
- revision 1; // NOTE: Default/not specifically set
+ revision 1;
enum OperationalStatusEnum : enum8 {
kPending = 0;
@@ -1447,28 +1447,33 @@
kSuccess = 0;
kInvalidAreaList = 1;
kInvalidInMode = 2;
+ kInvalidSkippedArea = 3;
}
bitmap Feature : bitmap32 {
- kListOrder = 0x1;
- kSelectWhileRunning = 0x2;
+ kSelectWhileRunning = 0x1;
+ kProgressReporting = 0x2;
+ kMaps = 0x4;
+ }
+
+ struct LandmarkInfoStruct {
+ LandmarkTag landmarkTag = 0;
+ nullable RelativePositionTag positionTag = 1;
}
struct AreaInfoStruct {
nullable LocationDescriptorStruct locationInfo = 0;
- nullable LandmarkTag landmarkTag = 1;
- nullable PositionTag positionTag = 2;
- nullable FloorSurfaceTag surfaceTag = 3;
+ nullable LandmarkInfoStruct landmarkInfo = 1;
}
struct AreaStruct {
int32u areaID = 0;
- nullable int8u mapID = 1;
+ nullable int32u mapID = 1;
AreaInfoStruct areaDesc = 2;
}
struct MapStruct {
- int8u mapID = 0;
+ int32u mapID = 0;
char_string<64> name = 1;
}
@@ -1480,7 +1485,7 @@
}
readonly attribute AreaStruct supportedAreas[] = 0;
- readonly attribute MapStruct supportedMaps[] = 1;
+ readonly attribute optional MapStruct supportedMaps[] = 1;
readonly attribute int32u selectedAreas[] = 2;
readonly attribute optional nullable int32u currentArea = 3;
readonly attribute optional nullable epoch_s estimatedEndTime = 4;
@@ -1498,18 +1503,22 @@
response struct SelectAreasResponse = 1 {
SelectAreasStatus status = 0;
- optional char_string<256> statusText = 1;
+ char_string<256> statusText = 1;
+ }
+
+ request struct SkipAreaRequest {
+ int32u skippedArea = 0;
}
response struct SkipAreaResponse = 3 {
SkipAreaStatus status = 0;
- optional char_string<256> statusText = 1;
+ char_string<256> statusText = 1;
}
/** 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;
+ command SkipArea(SkipAreaRequest): SkipAreaResponse = 2;
}
endpoint 0 {
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 e46d3ea..aca96da 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
@@ -17,6 +17,7 @@
*/
#include <app-common/zap-generated/attributes/Accessors.h>
#include <rvc-service-area-delegate.h>
+#include <vector>
using namespace chip;
using namespace chip::app::Clusters;
@@ -25,8 +26,8 @@
CHIP_ERROR RvcServiceAreaDelegate::Init()
{
// hardcoded fill of SUPPORTED MAPS for prototyping
- uint8_t supportedMapId_XX = 3;
- uint8_t supportedMapId_YY = 245;
+ uint32_t supportedMapId_XX = 3;
+ uint32_t supportedMapId_YY = 245;
GetInstance()->AddSupportedMap(supportedMapId_XX, "My Map XX"_span);
GetInstance()->AddSupportedMap(supportedMapId_YY, "My Map YY"_span);
@@ -38,32 +39,29 @@
uint32_t supportedAreaID_D = 0x88888888;
// Location A has name, floor number, uses map XX
- GetInstance()->AddSupportedLocation(
- supportedAreaID_A, DataModel::Nullable<uint_fast8_t>(supportedMapId_XX), "My Location A"_span,
- DataModel::Nullable<int16_t>(4), DataModel::Nullable<Globals::AreaTypeTag>(), DataModel::Nullable<Globals::LandmarkTag>(),
- DataModel::Nullable<Globals::PositionTag>(), DataModel::Nullable<Globals::FloorSurfaceTag>());
+ GetInstance()->AddSupportedLocation(supportedAreaID_A, DataModel::Nullable<uint32_t>(supportedMapId_XX), "My Location A"_span,
+ DataModel::Nullable<int16_t>(4), DataModel::Nullable<Globals::AreaTypeTag>(),
+ DataModel::Nullable<Globals::LandmarkTag>(),
+ DataModel::Nullable<Globals::RelativePositionTag>());
// Location B has name, uses map XX
- GetInstance()->AddSupportedLocation(
- supportedAreaID_B, DataModel::Nullable<uint_fast8_t>(supportedMapId_XX), "My Location B"_span,
- DataModel::Nullable<int16_t>(), DataModel::Nullable<Globals::AreaTypeTag>(), DataModel::Nullable<Globals::LandmarkTag>(),
- DataModel::Nullable<Globals::PositionTag>(), DataModel::Nullable<Globals::FloorSurfaceTag>());
+ GetInstance()->AddSupportedLocation(supportedAreaID_B, DataModel::Nullable<uint32_t>(supportedMapId_XX), "My Location B"_span,
+ DataModel::Nullable<int16_t>(), DataModel::Nullable<Globals::AreaTypeTag>(),
+ DataModel::Nullable<Globals::LandmarkTag>(),
+ DataModel::Nullable<Globals::RelativePositionTag>());
// Location C has full SemData, no name, Map YY
- GetInstance()->AddSupportedLocation(supportedAreaID_C, DataModel::Nullable<uint_fast8_t>(supportedMapId_YY), CharSpan(),
+ GetInstance()->AddSupportedLocation(supportedAreaID_C, DataModel::Nullable<uint32_t>(supportedMapId_YY), CharSpan(),
DataModel::Nullable<int16_t>(-1),
DataModel::Nullable<Globals::AreaTypeTag>(Globals::AreaTypeTag::kPlayRoom),
DataModel::Nullable<Globals::LandmarkTag>(Globals::LandmarkTag::kBackDoor),
- DataModel::Nullable<Globals::PositionTag>(Globals::PositionTag::kLeft),
- DataModel::Nullable<Globals::FloorSurfaceTag>(Globals::FloorSurfaceTag::kConcrete));
+ DataModel::Nullable<Globals::RelativePositionTag>(Globals::RelativePositionTag::kNextTo));
// Location D has null values for all HomeLocationStruct fields, Map YY
- GetInstance()->AddSupportedLocation(supportedAreaID_D, DataModel::Nullable<uint_fast8_t>(supportedMapId_YY),
- "My Location D"_span, DataModel::Nullable<int16_t>(),
- DataModel::Nullable<Globals::AreaTypeTag>(),
+ GetInstance()->AddSupportedLocation(supportedAreaID_D, DataModel::Nullable<uint32_t>(supportedMapId_YY), "My Location D"_span,
+ DataModel::Nullable<int16_t>(), DataModel::Nullable<Globals::AreaTypeTag>(),
DataModel::Nullable<Globals::LandmarkTag>(Globals::LandmarkTag::kCouch),
- DataModel::Nullable<Globals::PositionTag>(Globals::PositionTag::kLeft),
- DataModel::Nullable<Globals::FloorSurfaceTag>(Globals::FloorSurfaceTag::kHardwood));
+ DataModel::Nullable<Globals::RelativePositionTag>(Globals::RelativePositionTag::kNextTo));
GetInstance()->SetCurrentArea(supportedAreaID_C);
@@ -86,7 +84,7 @@
return true;
};
-bool RvcServiceAreaDelegate::HandleSkipCurrentArea(MutableCharSpan skipStatusText)
+bool RvcServiceAreaDelegate::HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan skipStatusText)
{
// TODO IMPLEMENT
return true;
@@ -213,7 +211,7 @@
return false;
};
-bool RvcServiceAreaDelegate::GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap)
+bool RvcServiceAreaDelegate::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap)
{
// 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
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 4436a21..2d2694e 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
@@ -39,8 +39,7 @@
AreaStructureWrapper()
{
Set(0, 0, CharSpan(), DataModel::Nullable<int16_t>(), DataModel::Nullable<Globals::AreaTypeTag>(),
- DataModel::Nullable<Globals::LandmarkTag>(), DataModel::Nullable<Globals::PositionTag>(),
- DataModel::Nullable<Globals::FloorSurfaceTag>());
+ DataModel::Nullable<Globals::LandmarkTag>(), DataModel::Nullable<Globals::RelativePositionTag>());
}
/**
@@ -52,22 +51,20 @@
* @param[in] aAreaTypeTag A common namespace Area tag - indicates an association of the location with an indoor or outdoor area
* of a home.
* @param[in] aLandmarkTag A common namespace Landmark tag - indicates an association of the location with a home landmark.
- * @param[in] aPositionTag A common namespace Position tag - indicates the position of the location with respect to the
- * landmark.
- * @param[in] aSurfaceTag A common namespace Floor Surface tag - indicates an association of the location with a surface type.
+ * @param[in] aRelativePositionTag A common namespace Relative Position tag - indicates the position of the location with
+ * respect to the landmark.
*
* @note Requirements regarding what combinations of fields and values are valid are not checked by this class.
* @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.
*/
- AreaStructureWrapper(uint32_t aAreaID, const DataModel::Nullable<uint8_t> & aMapId, const CharSpan & aLocationName,
+ AreaStructureWrapper(uint32_t aAreaID, const DataModel::Nullable<uint32_t> & aMapId, const CharSpan & aLocationName,
const DataModel::Nullable<int16_t> & aFloorNumber,
const DataModel::Nullable<Globals::AreaTypeTag> & aAreaTypeTag,
const DataModel::Nullable<Globals::LandmarkTag> & aLandmarkTag,
- const DataModel::Nullable<Globals::PositionTag> & aPositionTag,
- const DataModel::Nullable<Globals::FloorSurfaceTag> & aSurfaceTag)
+ const DataModel::Nullable<Globals::RelativePositionTag> & aRelativePositionTag)
{
- Set(aAreaID, aMapId, aLocationName, aFloorNumber, aAreaTypeTag, aLandmarkTag, aPositionTag, aSurfaceTag);
+ Set(aAreaID, aMapId, aLocationName, aFloorNumber, aAreaTypeTag, aLandmarkTag, aRelativePositionTag);
}
/**
@@ -88,16 +85,43 @@
*/
AreaStructureWrapper & operator=(const AreaStructureWrapper & aOther)
{
+ areaID = aOther.areaID;
+ mapID = aOther.mapID;
+
if (aOther.areaDesc.locationInfo.IsNull())
{
- Set(aOther.areaID, aOther.mapID, CharSpan(), NullOptional, NullOptional, aOther.areaDesc.landmarkTag,
- aOther.areaDesc.positionTag, aOther.areaDesc.surfaceTag);
+ areaDesc.locationInfo.SetNull();
}
else
{
- 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);
+ areaDesc.locationInfo.SetNonNull();
+
+ // deep copy the name.
+ auto sizeToCopy = std::min(sizeof(mLocationNameBuffer), aOther.areaDesc.locationInfo.Value().locationName.size());
+ memcpy(mLocationNameBuffer, aOther.areaDesc.locationInfo.Value().locationName.data(), sizeToCopy);
+ areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, sizeToCopy);
+
+ areaDesc.locationInfo.Value().floorNumber = aOther.areaDesc.locationInfo.Value().floorNumber;
+ areaDesc.locationInfo.Value().areaType = aOther.areaDesc.locationInfo.Value().areaType;
+ }
+
+ if (aOther.areaDesc.landmarkInfo.IsNull())
+ {
+ areaDesc.landmarkInfo.SetNull();
+ }
+ else
+ {
+ areaDesc.landmarkInfo.SetNonNull();
+ areaDesc.landmarkInfo.Value().landmarkTag = aOther.areaDesc.landmarkInfo.Value().landmarkTag;
+ if (aOther.areaDesc.landmarkInfo.Value().positionTag.IsNull())
+ {
+ areaDesc.landmarkInfo.Value().positionTag.SetNull();
+ }
+ else
+ {
+ areaDesc.landmarkInfo.Value().positionTag.SetNonNull();
+ areaDesc.landmarkInfo.Value().positionTag.Value() = aOther.areaDesc.landmarkInfo.Value().positionTag.Value();
+ }
}
return *this;
@@ -112,19 +136,17 @@
* @param[in] aAreaTypeTag A common namespace Area tag - indicates an association of the location with an indoor or outdoor area
* of a home.
* @param[in] aLandmarkTag A common namespace Landmark tag - indicates an association of the location with a home landmark.
- * @param[in] aPositionTag A common namespace Position tag - indicates the position of the location with respect to the
- * landmark.
- * @param[in] aSurfaceTag A common namespace Floor Surface tag - indicates an association of the location with a surface type.
+ * @param[in] aRelativePositionTag A common namespace Relative Position tag - indicates the position of the location with
+ * respect to the landmark.
*
* @note Requirements regarding what combinations of fields and values are valid are not checked by this class.
* @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 aAreaID, const DataModel::Nullable<uint8_t> & aMapId, const CharSpan & aLocationName,
+ void Set(uint32_t aAreaID, const DataModel::Nullable<uint32_t> & aMapId, const CharSpan & aLocationName,
const DataModel::Nullable<int16_t> & aFloorNumber, const DataModel::Nullable<Globals::AreaTypeTag> & aAreaType,
const DataModel::Nullable<Globals::LandmarkTag> & aLandmarkTag,
- const DataModel::Nullable<Globals::PositionTag> & aPositionTag,
- const DataModel::Nullable<Globals::FloorSurfaceTag> & aSurfaceTag)
+ const DataModel::Nullable<Globals::RelativePositionTag> & aRelativePositionTag)
{
areaID = aAreaID;
mapID = aMapId;
@@ -143,29 +165,32 @@
areaDesc.locationInfo.SetNull();
}
- areaDesc.landmarkTag = aLandmarkTag;
- areaDesc.positionTag = aPositionTag;
- areaDesc.surfaceTag = aSurfaceTag;
+ // todo improve this when addressing issue https://github.com/project-chip/connectedhomeip/issues/34519
+ if (aLandmarkTag.IsNull())
+ {
+ areaDesc.landmarkInfo.SetNull();
+ }
+ else
+ {
+ areaDesc.landmarkInfo.SetNonNull();
+ areaDesc.landmarkInfo.Value().landmarkTag = aLandmarkTag.Value();
+ if (aRelativePositionTag.IsNull())
+ {
+ areaDesc.landmarkInfo.Value().positionTag.SetNull();
+ }
+ else
+ {
+ areaDesc.landmarkInfo.Value().positionTag.SetNonNull();
+ areaDesc.landmarkInfo.Value().positionTag.Value() = aRelativePositionTag.Value();
+ }
+ }
// this assumes areaDesc structure was created above, if appropriate
if (!areaDesc.locationInfo.IsNull())
{
- if (aLocationName.empty())
- {
- 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));
- areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, sizeof(mLocationNameBuffer));
- }
- else
- {
- // Save full name.
- memcpy(mLocationNameBuffer, aLocationName.data(), aLocationName.size());
- areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, aLocationName.size());
- }
+ auto sizeToCopy = std::min(sizeof(mLocationNameBuffer), aLocationName.size());
+ memcpy(mLocationNameBuffer, aLocationName.data(), sizeToCopy);
+ areaDesc.locationInfo.Value().locationName = CharSpan(mLocationNameBuffer, sizeToCopy);
}
}
@@ -238,19 +263,22 @@
}
}
- if (areaDesc.landmarkTag != aOther.areaDesc.landmarkTag)
+ if (areaDesc.landmarkInfo.IsNull() != aOther.areaDesc.landmarkInfo.IsNull())
{
return false;
}
- if (areaDesc.positionTag != aOther.areaDesc.positionTag)
+ if (!areaDesc.landmarkInfo.IsNull())
{
- return false;
- }
+ if (areaDesc.landmarkInfo.Value().landmarkTag != aOther.areaDesc.landmarkInfo.Value().landmarkTag)
+ {
+ return false;
+ }
- if (areaDesc.surfaceTag != aOther.areaDesc.surfaceTag)
- {
- return false;
+ if (areaDesc.landmarkInfo.Value().positionTag != aOther.areaDesc.landmarkInfo.Value().positionTag)
+ {
+ return false;
+ }
}
return true;
@@ -288,7 +316,7 @@
* @note Requirements regarding what combinations of fields and values are 'valid' are not checked by this class.
* @note If aMapName is larger than kMapNameMaxSize, it will be truncated.
*/
- MapStructureWrapper(uint8_t aMapId, const CharSpan & aMapName) { Set(aMapId, aMapName); }
+ MapStructureWrapper(uint32_t aMapId, const CharSpan & aMapName) { Set(aMapId, aMapName); }
/**
* @brief This is a copy constructor that initializes the map object with the values from another map object. All values are
@@ -316,7 +344,7 @@
* @note Requirements regarding what combinations of fields and values are 'valid' are not checked by this class.
* @note if aMapName is larger than kMapNameMaxSize, it will be truncated.
*/
- void Set(uint8_t aMapId, const CharSpan & aMapName)
+ void Set(uint32_t aMapId, const CharSpan & aMapName)
{
mapID = aMapId;
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 0d8c98a..262fe04 100644
--- a/src/app/clusters/service-area-server/service-area-delegate.cpp
+++ b/src/app/clusters/service-area-server/service-area-delegate.cpp
@@ -28,7 +28,7 @@
mInstance->ClearProgress();
}
-bool Delegate::GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap)
+bool Delegate::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap)
{
listIndex = 0;
@@ -88,3 +88,6 @@
return GetProgressElementById(aAreaId, index, progressElement);
}
+
+// todo: Should we add default implementations for the accessor methods of the non-mandatory attributes?
+// This is so that devices that do not support these attributes are not forced to provide an implementation.
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 1c324fe..823eaf6 100644
--- a/src/app/clusters/service-area-server/service-area-delegate.h
+++ b/src/app/clusters/service-area-server/service-area-delegate.h
@@ -49,7 +49,8 @@
virtual ~Delegate() = default;
/**
- * Stop this class objects from being copied.
+ * Due to the coupling between the Delegate and Instance classes via the references they have to each other,
+ * copying a Delegate object might make things confusing.
*/
Delegate(const Delegate &) = delete;
Delegate & operator=(const Delegate &) = delete;
@@ -96,6 +97,7 @@
/**
* @brief The server instance ensures that the SelectedAreas and CurrentArea attributes are not null before
* calling this method.
+ * @param[in] skippedArea the area ID to skip.
* @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
* device.
@@ -119,7 +121,7 @@
* 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 HandleSkipCurrentArea(MutableCharSpan skipStatusText)
+ virtual bool HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan skipStatusText)
{
// device support of this command is optional
CopyCharSpanToMutableCharSpan("Skip Current Location command not supported by device"_span, skipStatusText);
@@ -244,7 +246,7 @@
*
* @note may be overloaded in device implementation for optimization, if desired.
*/
- virtual bool GetSupportedMapById(uint8_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap);
+ virtual bool GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap);
/**
* This method is called by the server instance to add a new map to the list.
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 fa5d626..17b55d1 100644
--- a/src/app/clusters/service-area-server/service-area-server.cpp
+++ b/src/app/clusters/service-area-server/service-area-server.cpp
@@ -123,7 +123,7 @@
case Commands::SkipArea::Id:
return CommandHandlerInterface::HandleCommand<Commands::SkipArea::DecodableType>(
- handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSkipCurrentAreaCmd(ctx); });
+ handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSkipCurrentAreaCmd(ctx, req); });
}
}
@@ -217,7 +217,7 @@
auto exitResponse = [ctx](SelectAreasStatus status, CharSpan statusText) {
Commands::SelectAreasResponse::Type response{
.status = status,
- .statusText = Optional(statusText),
+ .statusText = statusText,
};
ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response);
};
@@ -358,7 +358,7 @@
exitResponse(SelectAreasStatus::kSuccess, ""_span);
}
-void Instance::HandleSkipCurrentAreaCmd(HandlerContext & ctx)
+void Instance::HandleSkipCurrentAreaCmd(HandlerContext & ctx, const Commands::SkipArea::DecodableType & req)
{
ChipLogDetail(Zcl, "Service Area: HandleSkipCurrentArea");
@@ -366,7 +366,7 @@
auto exitResponse = [ctx](SkipAreaStatus status, CharSpan statusText) {
Commands::SkipAreaResponse::Type response{
.status = status,
- .statusText = Optional(statusText),
+ .statusText = statusText,
};
ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response);
};
@@ -396,7 +396,7 @@
char skipStatusBuffer[kMaxSizeStatusText];
MutableCharSpan skipStatusText(skipStatusBuffer);
- if (!mDelegate->HandleSkipCurrentArea(skipStatusText))
+ if (!mDelegate->HandleSkipCurrentArea(req.skippedArea, skipStatusText))
{
exitResponse(SkipAreaStatus::kInvalidInMode, skipStatusText);
return;
@@ -449,39 +449,45 @@
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.areaDesc.locationInfo.IsNull() && aLocation.areaDesc.landmarkTag.IsNull())
+ // If the LocationInfo field is null, the LandmarkInfo field SHALL NOT be null.
+ // If the LandmarkInfo field is null, the LocationInfo field SHALL NOT be null.
+ if (aLocation.areaDesc.locationInfo.IsNull() && aLocation.areaDesc.landmarkInfo.IsNull())
{
- ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - must have locationInfo and/or LandmarkTag", aLocation.areaID);
+ ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - must have locationInfo and/or LandmarkInfo", 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 LocationInfo is not null, and its LocationName field is an empty string, at least one of the following SHALL NOT
+ // be null: LocationInfo's FloorNumber field, LocationInfo's AreaType field, the LandmarkInfo
if (!aLocation.areaDesc.locationInfo.IsNull())
{
if (aLocation.areaDesc.locationInfo.Value().locationName.empty() &&
aLocation.areaDesc.locationInfo.Value().floorNumber.IsNull() &&
- aLocation.areaDesc.locationInfo.Value().areaType.IsNull() && aLocation.areaDesc.landmarkTag.IsNull())
+ aLocation.areaDesc.locationInfo.Value().areaType.IsNull() && aLocation.areaDesc.landmarkInfo.IsNull())
{
ChipLogDetail(
- Zcl, "IsValidAsSupportedLocation %u - LocationName is empty string, FloorNumber, AreaType, LandmarkTag are null",
+ Zcl, "IsValidAsSupportedLocation %u - LocationName is empty string, FloorNumber, AreaType, LandmarkInfo are null",
aLocation.areaID);
return false;
}
}
- // If the LandmarkTag field is null, the PositionTag field SHALL be null.
- if (aLocation.areaDesc.landmarkTag.IsNull() && !aLocation.areaDesc.positionTag.IsNull())
+ // The mapID field SHALL be null if SupportedMaps is not supported or SupportedMaps is an empty list.
+ bool shouldMapsBeNull = false;
+ if (mFeature.Has(Feature::kMaps))
{
- ChipLogDetail(Zcl, "IsValidAsSupportedLocation %u - PositionTag with no LandmarkTag", aLocation.areaID);
- return false;
+ if (mDelegate->GetNumberOfSupportedMaps() == 0)
+ {
+ shouldMapsBeNull = true;
+ }
+ }
+ else
+ {
+ shouldMapsBeNull = true;
}
- if (mDelegate->GetNumberOfSupportedMaps() == 0)
+ if (shouldMapsBeNull)
{
- // 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.areaID,
@@ -570,15 +576,14 @@
return (aEstimatedEndTime.Value() < mEstimatedEndTime.Value());
}
-bool Instance::AddSupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint8_t> & aMapId, const CharSpan & aLocationName,
+bool Instance::AddSupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint32_t> & aMapId, const CharSpan & aLocationName,
const DataModel::Nullable<int16_t> & aFloorNumber,
const DataModel::Nullable<Globals::AreaTypeTag> & aAreaType,
const DataModel::Nullable<Globals::LandmarkTag> & aLandmarkTag,
- const DataModel::Nullable<Globals::PositionTag> & aPositionTag,
- const DataModel::Nullable<Globals::FloorSurfaceTag> & aSurfaceTag)
+ const DataModel::Nullable<Globals::RelativePositionTag> & aRelativePositionTag)
{
// Create location object for validation.
- AreaStructureWrapper aNewArea(aAreaId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aPositionTag, aSurfaceTag);
+ AreaStructureWrapper aNewArea(aAreaId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aRelativePositionTag);
// Does device mode allow this attribute to be updated?
if (!mDelegate->IsSupportedAreasChangeAllowed())
@@ -621,12 +626,11 @@
return true;
}
-bool Instance::ModifySupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint8_t> & aMapId,
+bool Instance::ModifySupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint32_t> & aMapId,
const CharSpan & aLocationName, const DataModel::Nullable<int16_t> & aFloorNumber,
const DataModel::Nullable<Globals::AreaTypeTag> & aAreaType,
const DataModel::Nullable<Globals::LandmarkTag> & aLandmarkTag,
- const DataModel::Nullable<Globals::PositionTag> & aPositionTag,
- const DataModel::Nullable<Globals::FloorSurfaceTag> & aSurfaceTag)
+ const DataModel::Nullable<Globals::RelativePositionTag> & aRelativePositionTag)
{
bool mapIDChanged = false;
uint32_t listIndex;
@@ -653,8 +657,7 @@
}
// create new location object for validation
- AreaStructureWrapper aNewArea(aAreaId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aPositionTag,
- aSurfaceTag);
+ AreaStructureWrapper aNewArea(aAreaId, aMapId, aLocationName, aFloorNumber, aAreaType, aLandmarkTag, aRelativePositionTag);
// verify cluster requirements concerning valid fields and field relationships
if (!IsValidSupportedLocation(aNewArea))
@@ -708,7 +711,7 @@
//*************************************************************************
// Supported Maps manipulators
-bool Instance::IsSupportedMap(uint8_t aMapId)
+bool Instance::IsSupportedMap(uint32_t aMapId)
{
uint32_t ignoredIndex;
MapStructureWrapper ignoredMap;
@@ -716,7 +719,7 @@
return mDelegate->GetSupportedMapById(aMapId, ignoredIndex, ignoredMap);
}
-bool Instance::AddSupportedMap(uint8_t aMapId, const CharSpan & aMapName)
+bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName)
{
// check max# of list entries
if (mDelegate->GetNumberOfSupportedMaps() >= kMaxNumSupportedMaps)
@@ -769,7 +772,7 @@
return true;
}
-bool Instance::RenameSupportedMap(uint8_t aMapId, const CharSpan & newMapName)
+bool Instance::RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName)
{
uint32_t modifiedIndex;
MapStructureWrapper modifiedMap;
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 90cf427..815ff2e 100644
--- a/src/app/clusters/service-area-server/service-area-server.h
+++ b/src/app/clusters/service-area-server/service-area-server.h
@@ -115,15 +115,16 @@
/**
* @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.
- * @param[in] req the command parameters
+ * @param[in] req the command parameters.
*/
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.
+ * @param[in] req the command parameters.
*/
- void HandleSkipCurrentAreaCmd(HandlerContext & ctx);
+ void HandleSkipCurrentAreaCmd(HandlerContext & ctx, const Commands::SkipArea::DecodableType & req);
//*************************************************************************
// attribute notifications
@@ -176,18 +177,17 @@
* @param[in] aAreaType common namespace Area tag - indicates an association of the location with an indoor or outdoor area of a
* home.
* @param[in] aLandmarkTag common namespace Landmark tag - indicates an association of the location with a home landmark.
- * @param[in] aPositionTag common namespace Position tag - indicates the position of the location with respect to the landmark.
- * @param[in] aSurfaceTag common namespace Floor Surface tag - indicates an association of the location with a surface type.
+ * @param[in] aRelativePositionTag common namespace Relative Position tag - indicates the position of the location with respect
+ * to the landmark.
* @return true if the new location passed validation checks and was successfully added to the list.
*
* @note if aLocationName is larger than kLocationNameMaxSize, it will be truncated.
*/
- bool AddSupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint8_t> & aMapId, const CharSpan & aLocationName,
+ bool AddSupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint32_t> & aMapId, const CharSpan & aLocationName,
const DataModel::Nullable<int16_t> & aFloorNumber,
const DataModel::Nullable<Globals::AreaTypeTag> & aAreaType,
const DataModel::Nullable<Globals::LandmarkTag> & aLandmarkTag,
- const DataModel::Nullable<Globals::PositionTag> & aPositionTag,
- const DataModel::Nullable<Globals::FloorSurfaceTag> & aSurfaceTag);
+ const DataModel::Nullable<Globals::RelativePositionTag> & aRelativePositionTag);
/**
* @brief Modify/replace an existing location in the supported locations list.
@@ -198,20 +198,19 @@
* @param[in] aAreaType common namespace Area tag - indicates an association of the location with an indoor or outdoor area of a
* home.
* @param[in] aLandmarkTag common namespace Landmark tag - indicates an association of the location with a home landmark.
- * @param[in] aPositionTag common namespace Position tag - indicates the position of the location with respect to the landmark.
- * @param[in] aSurfaceTag common namespace Floor Surface tag - indicates an association of the location with a surface type.
+ * @param[in] aRelativePositionTag common namespace Relative Position tag - indicates the position of the location with respect
+ * to the landmark.
* @return true if the location is a member of supported locations, the modifications pass all validation checks and the
* location was modified.
*
* @note if aLocationName is larger than kLocationNameMaxSize, it will be truncated.
* @note if mapID is changed, the delegate's HandleSupportedAreasUpdated method is called.
*/
- bool ModifySupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint8_t> & aMapId, const CharSpan & aLocationName,
+ bool ModifySupportedLocation(uint32_t aAreaId, const DataModel::Nullable<uint32_t> & aMapId, const CharSpan & aLocationName,
const DataModel::Nullable<int16_t> & aFloorNumber,
const DataModel::Nullable<Globals::AreaTypeTag> & aAreaType,
const DataModel::Nullable<Globals::LandmarkTag> & aLandmarkTag,
- const DataModel::Nullable<Globals::PositionTag> & aPositionTag,
- const DataModel::Nullable<Globals::FloorSurfaceTag> & aSurfaceTag);
+ const DataModel::Nullable<Globals::RelativePositionTag> & aRelativePositionTag);
/**
* @return true if the SupportedAreas attribute was not already null.
@@ -226,7 +225,7 @@
/**
* @return true if a map with the aMapId ID exists in the supported maps attribute. False otherwise.
*/
- bool IsSupportedMap(uint8_t aMapId);
+ bool IsSupportedMap(uint32_t aMapId);
/**
* @brief Add a new map to the supported maps list.
@@ -234,7 +233,7 @@
* @param[in] aMapName The name of the map to be added. This cannot be an empty string.
* @return true if the new map passed validation checks and was successfully added to the list.
*/
- bool AddSupportedMap(uint8_t aMapId, const CharSpan & aMapName);
+ bool AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName);
/**
* @brief Rename an existing map in the supported maps list.
@@ -244,7 +243,7 @@
*
* @note if the specified map is not a member of the supported maps list, returns false with no action taken.
*/
- bool RenameSupportedMap(uint8_t aMapId, const CharSpan & newMapName);
+ bool RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName);
/**
* @return true if the SupportedMaps attribute was not already null.
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 e7b1904..e2f0199 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,25 +18,37 @@
<domain name="CHIP"/>
Data types
+ <struct name="LandmarkInfoStruct" apiMaturity="provisional">
+ <cluster code="0x0150"/>
+ <item name="LandmarkTag" type="LandmarkTag" optional="false" isNullable="false"/>
+ <item name="PositionTag" type="RelativePositionTag" optional="false" isNullable="true"/>
+ </struct>
+
<struct name="AreaInfoStruct" apiMaturity="provisional">
<cluster code="0x0150"/>
- <item name="LocationInfo" type="LocationDescriptorStruct" optional="false" isNullable="true"/>
- <item name="LandmarkTag" type="LandmarkTag" optional="false" isNullable="true"/>
- <item name="PositionTag" type="PositionTag" optional="false" isNullable="true"/>
- <item name="SurfaceTag" type="FloorSurfaceTag" optional="false" isNullable="true"/>
+ <item name="LocationInfo" type="LocationDescriptorStruct" optional="false" isNullable="true"/>
+ <item name="LandmarkInfo" type="LandmarkInfoStruct" optional="false" isNullable="true"/>
</struct>
<struct name="MapStruct">
<cluster code="0x0150"/>
- <item name="MapID" type="int8u" optional="false"/>
- <item name="Name" type="char_string" length="64" optional="false"/>
+ <item name="MapID" type="int32u" optional="false"/>
+ <item name="Name" type="char_string" length="64" optional="false"/>
</struct>
<struct name="AreaStruct">
<cluster code="0x0150"/>
- <item name="AreaID" type="int32u" optional="false" isNullable="false"/>
- <item name="MapID" type="int8u" optional="false" isNullable="true"/>
- <item name="AreaDesc" type="AreaInfoStruct" optional="false" isNullable="false"/>
+ <item name="AreaID" type="int32u" optional="false" isNullable="false"/>
+ <item name="MapID" type="int32u" optional="false" isNullable="true"/>
+ <item name="AreaDesc" type="AreaInfoStruct" optional="false" isNullable="false"/>
+ </struct>
+
+ <struct name="ProgressStruct">
+ <cluster code="0x0150"/>
+ <item name="AreaID" type="int32u" optional="false"/>
+ <item name="Status" type="OperationalStatusEnum" optional="false"/>
+ <item name="TotalOperationalTime" type="elapsed_s" optional="true" isNullable="true"/>
+ <item name="EstimatedTime" type="elapsed_s" optional="true" isNullable="true"/>
</struct>
<enum name="OperationalStatusEnum" type="enum8">
@@ -47,14 +59,6 @@
<item value="0x03" name="Completed"/>
</enum>
- <struct name="ProgressStruct">
- <cluster code="0x0150"/>
- <item name="AreaID" type="int32u" optional="false"/>
- <item name="Status" type="OperationalStatusEnum" optional="false"/>
- <item name="TotalOperationalTime" type="elapsed_s" optional="true" isNullable="true"/>
- <item name="EstimatedTime" type="elapsed_s" optional="true" isNullable="true"/>
- </struct>
-
<enum name="SelectAreasStatus" type="enum8">
<cluster code="0x0150"/>
<item value="0x00" name="Success"/>
@@ -69,27 +73,32 @@
<item value="0x00" name="Success"/>
<item value="0x01" name="InvalidAreaList"/>
<item value="0x02" name="InvalidInMode"/>
+ <item value="0x03" name="InvalidSkippedArea"/>
</enum>
<cluster apiMaturity="provisional">
<domain>General</domain>
<name>Service Area</name>
- <description>The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location.</description>
+ <description>The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced.</description>
<code>0x0150</code>
<define>SERVICE_AREA_CLUSTER</define>
+ <globalAttribute side="either" code="0xFFFD" value="1" />
<features>
- <feature bit="0" code="LISTORDER" name="ListOrder" summary="The device operates at the selected locations in the list order">
+ <feature bit="0" code="SELRUN" name="SelectWhileRunning" summary="The device allows changing the selected areas while running">
<optionalConform/>
</feature>
- <feature bit="1" code="SELRUN" name="SelectWhileRunning" summary="The device allows changing the selected locations while running">
+ <feature bit="1" code="PROG" name="ProgressReporting" summary="The device implements the progress reporting feature">
+ <optionalConform/>
+ </feature>
+ <feature bit="2" code="MAPS" name="Maps" summary="The device has map support">
<optionalConform/>
</feature>
</features>
<!-- Attributes -->
<attribute side="server" code="0x0000" define="SupportedAreas" type="array" entryType="AreaStruct" writable="false" isNullable="false" optional="false">SupportedAreas</attribute>
- <attribute side="server" code="0x0001" define="SupportedMaps" type="array" entryType="MapStruct" writable="false" isNullable="false" optional="false">SupportedMaps</attribute>
+ <attribute side="server" code="0x0001" define="SupportedMaps" type="array" entryType="MapStruct" writable="false" isNullable="false" optional="true" >SupportedMaps</attribute>
<attribute side="server" code="0x0002" define="SelectedAreas" type="array" entryType="int32u" writable="false" isNullable="false" optional="false">SelectedAreas</attribute>
<attribute side="server" code="0x0003" define="CurrentArea" type="int32u" writable="false" isNullable="true" optional="true" >CurrentArea</attribute>
<attribute side="server" code="0x0004" define="EstimatedEndTime" type="epoch_s" writable="false" isNullable="true" optional="true" >EstimatedEndTime</attribute>
@@ -107,22 +116,23 @@
<description>
This command is sent by the device on receipt of the SelectAreas command.
</description>
- <arg name="Status" type="SelectAreasStatus" optional="false"/>
- <arg name="StatusText" type="char_string" length="256" optional="true"/>
+ <arg name="Status" type="SelectAreasStatus"/>
+ <arg name="StatusText" type="char_string" length="256"/>
</command>
<command source="client" code="0x02" name="SkipArea" response="SkipAreaResponse" optional="true">
<description>
This command is used to skip an area where the device operates.
</description>
+ <arg name="SkippedArea" type="int32u"/>
</command>
<command source="server" code="0x03" name="SkipAreaResponse" disableDefaultResponse="true" optional="true">
<description>
This command is sent by the device on receipt of the SkipArea command.
</description>
- <arg name="Status" type="SkipAreaStatus" optional="false"/>
- <arg name="StatusText" type="char_string" length="256" optional="true"/>
+ <arg name="Status" type="SkipAreaStatus"/>
+ <arg name="StatusText" type="char_string" length="256"/>
</command>
</cluster>
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index a6dad3f..158ba6d 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -6446,9 +6446,9 @@
command BarrierControlStop(): DefaultSuccess = 1;
}
-/** The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location. */
+/** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */
provisional cluster ServiceArea = 336 {
- revision 1; // NOTE: Default/not specifically set
+ revision 1;
enum OperationalStatusEnum : enum8 {
kPending = 0;
@@ -6469,28 +6469,33 @@
kSuccess = 0;
kInvalidAreaList = 1;
kInvalidInMode = 2;
+ kInvalidSkippedArea = 3;
}
bitmap Feature : bitmap32 {
- kListOrder = 0x1;
- kSelectWhileRunning = 0x2;
+ kSelectWhileRunning = 0x1;
+ kProgressReporting = 0x2;
+ kMaps = 0x4;
+ }
+
+ struct LandmarkInfoStruct {
+ LandmarkTag landmarkTag = 0;
+ nullable RelativePositionTag positionTag = 1;
}
struct AreaInfoStruct {
nullable LocationDescriptorStruct locationInfo = 0;
- nullable LandmarkTag landmarkTag = 1;
- nullable PositionTag positionTag = 2;
- nullable FloorSurfaceTag surfaceTag = 3;
+ nullable LandmarkInfoStruct landmarkInfo = 1;
}
struct AreaStruct {
int32u areaID = 0;
- nullable int8u mapID = 1;
+ nullable int32u mapID = 1;
AreaInfoStruct areaDesc = 2;
}
struct MapStruct {
- int8u mapID = 0;
+ int32u mapID = 0;
char_string<64> name = 1;
}
@@ -6502,7 +6507,7 @@
}
readonly attribute AreaStruct supportedAreas[] = 0;
- readonly attribute MapStruct supportedMaps[] = 1;
+ readonly attribute optional MapStruct supportedMaps[] = 1;
readonly attribute int32u selectedAreas[] = 2;
readonly attribute optional nullable int32u currentArea = 3;
readonly attribute optional nullable epoch_s estimatedEndTime = 4;
@@ -6520,18 +6525,22 @@
response struct SelectAreasResponse = 1 {
SelectAreasStatus status = 0;
- optional char_string<256> statusText = 1;
+ char_string<256> statusText = 1;
+ }
+
+ request struct SkipAreaRequest {
+ int32u skippedArea = 0;
}
response struct SkipAreaResponse = 3 {
SkipAreaStatus status = 0;
- optional char_string<256> statusText = 1;
+ char_string<256> statusText = 1;
}
/** 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;
+ command SkipArea(SkipAreaRequest): 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 cdb08fa..5944e05 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -39092,7 +39092,7 @@
final long statusFieldID = 0L;
Integer status = null;
final long statusTextFieldID = 1L;
- Optional<String> statusText = Optional.empty();
+ String statusText = null;
for (StructElement element: invokeStructValue.value()) {
if (element.contextTagNum() == statusFieldID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
@@ -39102,7 +39102,7 @@
} else if (element.contextTagNum() == statusTextFieldID) {
if (element.value(BaseTLVType.class).type() == TLVType.String) {
StringType castingValue = element.value(StringType.class);
- statusText = Optional.of(castingValue.value(String.class));
+ statusText = castingValue.value(String.class);
}
}
}
@@ -39110,14 +39110,18 @@
}}, commandId, commandArgs, timedInvokeTimeoutMs);
}
- public void skipArea(SkipAreaResponseCallback callback) {
- skipArea(callback, 0);
+ public void skipArea(SkipAreaResponseCallback callback, Long skippedArea) {
+ skipArea(callback, skippedArea, 0);
}
- public void skipArea(SkipAreaResponseCallback callback, int timedInvokeTimeoutMs) {
+ public void skipArea(SkipAreaResponseCallback callback, Long skippedArea, int timedInvokeTimeoutMs) {
final long commandId = 2L;
ArrayList<StructElement> elements = new ArrayList<>();
+ final long skippedAreaFieldID = 0L;
+ BaseTLVType skippedAreatlvValue = new UIntType(skippedArea);
+ elements.add(new StructElement(skippedAreaFieldID, skippedAreatlvValue));
+
StructType commandArgs = new StructType(elements);
invoke(new InvokeCallbackImpl(callback) {
@Override
@@ -39125,7 +39129,7 @@
final long statusFieldID = 0L;
Integer status = null;
final long statusTextFieldID = 1L;
- Optional<String> statusText = Optional.empty();
+ String statusText = null;
for (StructElement element: invokeStructValue.value()) {
if (element.contextTagNum() == statusFieldID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
@@ -39135,7 +39139,7 @@
} else if (element.contextTagNum() == statusTextFieldID) {
if (element.value(BaseTLVType.class).type() == TLVType.String) {
StringType castingValue = element.value(StringType.class);
- statusText = Optional.of(castingValue.value(String.class));
+ statusText = castingValue.value(String.class);
}
}
}
@@ -39144,11 +39148,11 @@
}
public interface SelectAreasResponseCallback extends BaseClusterCallback {
- void onSuccess(Integer status, Optional<String> statusText);
+ void onSuccess(Integer status, String statusText);
}
public interface SkipAreaResponseCallback extends BaseClusterCallback {
- void onSuccess(Integer status, Optional<String> statusText);
+ void onSuccess(Integer status, String statusText);
}
public interface SupportedAreasAttributeCallback extends BaseAttributeCallback {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index 9a410a6..4e07b6d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -9171,53 +9171,36 @@
return output.toString();
}
}
-public static class ServiceAreaClusterAreaInfoStruct {
- public @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo;
- public @Nullable Integer landmarkTag;
+public static class ServiceAreaClusterLandmarkInfoStruct {
+ public Integer landmarkTag;
public @Nullable Integer positionTag;
- public @Nullable Integer surfaceTag;
- private static final long LOCATION_INFO_ID = 0L;
- private static final long LANDMARK_TAG_ID = 1L;
- private static final long POSITION_TAG_ID = 2L;
- private static final long SURFACE_TAG_ID = 3L;
+ private static final long LANDMARK_TAG_ID = 0L;
+ private static final long POSITION_TAG_ID = 1L;
- public ServiceAreaClusterAreaInfoStruct(
- @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo,
- @Nullable Integer landmarkTag,
- @Nullable Integer positionTag,
- @Nullable Integer surfaceTag
+ public ServiceAreaClusterLandmarkInfoStruct(
+ Integer landmarkTag,
+ @Nullable Integer positionTag
) {
- this.locationInfo = locationInfo;
this.landmarkTag = landmarkTag;
this.positionTag = positionTag;
- this.surfaceTag = surfaceTag;
}
public StructType encodeTlv() {
ArrayList<StructElement> values = new ArrayList<>();
- values.add(new StructElement(LOCATION_INFO_ID, locationInfo != null ? locationInfo.encodeTlv() : new NullType()));
- values.add(new StructElement(LANDMARK_TAG_ID, landmarkTag != null ? new UIntType(landmarkTag) : new NullType()));
+ values.add(new StructElement(LANDMARK_TAG_ID, new UIntType(landmarkTag)));
values.add(new StructElement(POSITION_TAG_ID, positionTag != null ? new UIntType(positionTag) : new NullType()));
- values.add(new StructElement(SURFACE_TAG_ID, surfaceTag != null ? new UIntType(surfaceTag) : new NullType()));
return new StructType(values);
}
- public static ServiceAreaClusterAreaInfoStruct decodeTlv(BaseTLVType tlvValue) {
+ public static ServiceAreaClusterLandmarkInfoStruct decodeTlv(BaseTLVType tlvValue) {
if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
return null;
}
- @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo = null;
- @Nullable Integer landmarkTag = null;
+ Integer landmarkTag = null;
@Nullable Integer positionTag = null;
- @Nullable Integer surfaceTag = null;
for (StructElement element: ((StructType)tlvValue).value()) {
- if (element.contextTagNum() == LOCATION_INFO_ID) {
- if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
- StructType castingValue = element.value(StructType.class);
- locationInfo = ChipStructs.ServiceAreaClusterLocationDescriptorStruct.decodeTlv(castingValue);
- }
- } else if (element.contextTagNum() == LANDMARK_TAG_ID) {
+ if (element.contextTagNum() == LANDMARK_TAG_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
UIntType castingValue = element.value(UIntType.class);
landmarkTag = castingValue.value(Integer.class);
@@ -9227,18 +9210,72 @@
UIntType castingValue = element.value(UIntType.class);
positionTag = castingValue.value(Integer.class);
}
- } else if (element.contextTagNum() == SURFACE_TAG_ID) {
- if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
- UIntType castingValue = element.value(UIntType.class);
- surfaceTag = castingValue.value(Integer.class);
+ }
+ }
+ return new ServiceAreaClusterLandmarkInfoStruct(
+ landmarkTag,
+ positionTag
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("ServiceAreaClusterLandmarkInfoStruct {\n");
+ output.append("\tlandmarkTag: ");
+ output.append(landmarkTag);
+ output.append("\n");
+ output.append("\tpositionTag: ");
+ output.append(positionTag);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class ServiceAreaClusterAreaInfoStruct {
+ public @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo;
+ public @Nullable ChipStructs.ServiceAreaClusterLandmarkInfoStruct landmarkInfo;
+ private static final long LOCATION_INFO_ID = 0L;
+ private static final long LANDMARK_INFO_ID = 1L;
+
+ public ServiceAreaClusterAreaInfoStruct(
+ @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo,
+ @Nullable ChipStructs.ServiceAreaClusterLandmarkInfoStruct landmarkInfo
+ ) {
+ this.locationInfo = locationInfo;
+ this.landmarkInfo = landmarkInfo;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList<StructElement> values = new ArrayList<>();
+ values.add(new StructElement(LOCATION_INFO_ID, locationInfo != null ? locationInfo.encodeTlv() : new NullType()));
+ values.add(new StructElement(LANDMARK_INFO_ID, landmarkInfo != null ? landmarkInfo.encodeTlv() : new NullType()));
+
+ return new StructType(values);
+ }
+
+ public static ServiceAreaClusterAreaInfoStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ @Nullable ChipStructs.ServiceAreaClusterLocationDescriptorStruct locationInfo = null;
+ @Nullable ChipStructs.ServiceAreaClusterLandmarkInfoStruct landmarkInfo = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == LOCATION_INFO_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ locationInfo = ChipStructs.ServiceAreaClusterLocationDescriptorStruct.decodeTlv(castingValue);
+ }
+ } else if (element.contextTagNum() == LANDMARK_INFO_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
+ StructType castingValue = element.value(StructType.class);
+ landmarkInfo = ChipStructs.ServiceAreaClusterLandmarkInfoStruct.decodeTlv(castingValue);
}
}
}
return new ServiceAreaClusterAreaInfoStruct(
locationInfo,
- landmarkTag,
- positionTag,
- surfaceTag
+ landmarkInfo
);
}
@@ -9249,14 +9286,8 @@
output.append("\tlocationInfo: ");
output.append(locationInfo);
output.append("\n");
- output.append("\tlandmarkTag: ");
- output.append(landmarkTag);
- output.append("\n");
- output.append("\tpositionTag: ");
- output.append(positionTag);
- output.append("\n");
- output.append("\tsurfaceTag: ");
- output.append(surfaceTag);
+ output.append("\tlandmarkInfo: ");
+ output.append(landmarkInfo);
output.append("\n");
output.append("}\n");
return output.toString();
@@ -9264,7 +9295,7 @@
}
public static class ServiceAreaClusterAreaStruct {
public Long areaID;
- public @Nullable Integer mapID;
+ public @Nullable Long mapID;
public ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc;
private static final long AREA_I_D_ID = 0L;
private static final long MAP_I_D_ID = 1L;
@@ -9272,7 +9303,7 @@
public ServiceAreaClusterAreaStruct(
Long areaID,
- @Nullable Integer mapID,
+ @Nullable Long mapID,
ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc
) {
this.areaID = areaID;
@@ -9294,7 +9325,7 @@
return null;
}
Long areaID = null;
- @Nullable Integer mapID = null;
+ @Nullable Long mapID = null;
ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc = null;
for (StructElement element: ((StructType)tlvValue).value()) {
if (element.contextTagNum() == AREA_I_D_ID) {
@@ -9305,7 +9336,7 @@
} 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);
+ mapID = castingValue.value(Long.class);
}
} else if (element.contextTagNum() == AREA_DESC_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.Struct) {
@@ -9339,13 +9370,13 @@
}
}
public static class ServiceAreaClusterMapStruct {
- public Integer mapID;
+ public Long mapID;
public String name;
private static final long MAP_I_D_ID = 0L;
private static final long NAME_ID = 1L;
public ServiceAreaClusterMapStruct(
- Integer mapID,
+ Long mapID,
String name
) {
this.mapID = mapID;
@@ -9364,13 +9395,13 @@
if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
return null;
}
- Integer mapID = null;
+ Long mapID = null;
String name = null;
for (StructElement element: ((StructType)tlvValue).value()) {
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);
+ mapID = castingValue.value(Long.class);
}
} else if (element.contextTagNum() == NAME_ID) {
if (element.value(BaseTLVType.class).type() == TLVType.String) {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index 6859e8b..c6677b6 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -11722,6 +11722,23 @@
}
throw new NoSuchFieldError();
}
+ }public enum SkipAreaCommandField {SkippedArea(0),;
+ private final int id;
+ SkipAreaCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static SkipAreaCommandField value(int id) throws NoSuchFieldError {
+ for (SkipAreaCommandField field : SkipAreaCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
}@Override
public String getAttributeName(long id) throws NoSuchFieldError {
return Attribute.value(id).toString();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 1295c78..986d59f 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -13125,12 +13125,12 @@
}
@Override
- public void onSuccess(Integer status, Optional<String> statusText) {
+ public void onSuccess(Integer status, String statusText) {
Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer");
responseValues.put(statusResponseValue, status);
- CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional<String>");
+ CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "String");
responseValues.put(statusTextResponseValue, statusText);
callback.onSuccess(responseValues);
}
@@ -13149,12 +13149,12 @@
}
@Override
- public void onSuccess(Integer status, Optional<String> statusText) {
+ public void onSuccess(Integer status, String statusText) {
Map<CommandResponseInfo, Object> responseValues = new LinkedHashMap<>();
CommandResponseInfo statusResponseValue = new CommandResponseInfo("status", "Integer");
responseValues.put(statusResponseValue, status);
- CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "Optional<String>");
+ CommandResponseInfo statusTextResponseValue = new CommandResponseInfo("statusText", "String");
responseValues.put(statusTextResponseValue, statusText);
callback.onSuccess(responseValues);
}
@@ -26985,10 +26985,16 @@
serviceAreaClusterInteractionInfoMap.put("selectAreas", serviceAreaselectAreasInteractionInfo);
Map<String, CommandParameterInfo> serviceAreaskipAreaCommandParams = new LinkedHashMap<String, CommandParameterInfo>();
+
+ CommandParameterInfo serviceAreaskipAreaskippedAreaCommandParameterInfo = new CommandParameterInfo("skippedArea", Long.class, Long.class);
+ serviceAreaskipAreaCommandParams.put("skippedArea",serviceAreaskipAreaskippedAreaCommandParameterInfo);
InteractionInfo serviceAreaskipAreaInteractionInfo = new InteractionInfo(
(cluster, callback, commandArguments) -> {
((ChipClusters.ServiceAreaCluster) cluster)
.skipArea((ChipClusters.ServiceAreaCluster.SkipAreaResponseCallback) callback
+ , (Long)
+ commandArguments.get("skippedArea")
+
);
},
() -> new DelegatedServiceAreaClusterSkipAreaResponseCallback(),
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 1b0bd26..ca6223a 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -125,6 +125,7 @@
"${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/ServiceAreaClusterLandmarkInfoStruct.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/ServiceAreaClusterMapStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterProgressStruct.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt
index e11d561..f0c591f 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt
@@ -24,16 +24,12 @@
class ServiceAreaClusterAreaInfoStruct(
val locationInfo: ServiceAreaClusterLocationDescriptorStruct?,
- val landmarkTag: UInt?,
- val positionTag: UInt?,
- val surfaceTag: UInt?,
+ val landmarkInfo: ServiceAreaClusterLandmarkInfoStruct?,
) {
override fun toString(): String = buildString {
append("ServiceAreaClusterAreaInfoStruct {\n")
append("\tlocationInfo : $locationInfo\n")
- append("\tlandmarkTag : $landmarkTag\n")
- append("\tpositionTag : $positionTag\n")
- append("\tsurfaceTag : $surfaceTag\n")
+ append("\tlandmarkInfo : $landmarkInfo\n")
append("}\n")
}
@@ -45,20 +41,10 @@
} else {
putNull(ContextSpecificTag(TAG_LOCATION_INFO))
}
- if (landmarkTag != null) {
- put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag)
+ if (landmarkInfo != null) {
+ landmarkInfo.toTlv(ContextSpecificTag(TAG_LANDMARK_INFO), this)
} else {
- putNull(ContextSpecificTag(TAG_LANDMARK_TAG))
- }
- if (positionTag != null) {
- put(ContextSpecificTag(TAG_POSITION_TAG), positionTag)
- } else {
- putNull(ContextSpecificTag(TAG_POSITION_TAG))
- }
- if (surfaceTag != null) {
- put(ContextSpecificTag(TAG_SURFACE_TAG), surfaceTag)
- } else {
- putNull(ContextSpecificTag(TAG_SURFACE_TAG))
+ putNull(ContextSpecificTag(TAG_LANDMARK_INFO))
}
endStructure()
}
@@ -66,9 +52,7 @@
companion object {
private const val TAG_LOCATION_INFO = 0
- private const val TAG_LANDMARK_TAG = 1
- private const val TAG_POSITION_TAG = 2
- private const val TAG_SURFACE_TAG = 3
+ private const val TAG_LANDMARK_INFO = 1
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaInfoStruct {
tlvReader.enterStructure(tlvTag)
@@ -82,31 +66,20 @@
tlvReader.getNull(ContextSpecificTag(TAG_LOCATION_INFO))
null
}
- val landmarkTag =
+ val landmarkInfo =
if (!tlvReader.isNull()) {
- tlvReader.getUInt(ContextSpecificTag(TAG_LANDMARK_TAG))
+ ServiceAreaClusterLandmarkInfoStruct.fromTlv(
+ ContextSpecificTag(TAG_LANDMARK_INFO),
+ tlvReader,
+ )
} else {
- tlvReader.getNull(ContextSpecificTag(TAG_LANDMARK_TAG))
- null
- }
- val positionTag =
- if (!tlvReader.isNull()) {
- tlvReader.getUInt(ContextSpecificTag(TAG_POSITION_TAG))
- } else {
- tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG))
- null
- }
- val surfaceTag =
- if (!tlvReader.isNull()) {
- tlvReader.getUInt(ContextSpecificTag(TAG_SURFACE_TAG))
- } else {
- tlvReader.getNull(ContextSpecificTag(TAG_SURFACE_TAG))
+ tlvReader.getNull(ContextSpecificTag(TAG_LANDMARK_INFO))
null
}
tlvReader.exitContainer()
- return ServiceAreaClusterAreaInfoStruct(locationInfo, landmarkTag, positionTag, surfaceTag)
+ return ServiceAreaClusterAreaInfoStruct(locationInfo, landmarkInfo)
}
}
}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt
index 74be053..3f8365d 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterAreaStruct.kt
@@ -24,7 +24,7 @@
class ServiceAreaClusterAreaStruct(
val areaID: ULong,
- val mapID: UInt?,
+ val mapID: ULong?,
val areaDesc: ServiceAreaClusterAreaInfoStruct,
) {
override fun toString(): String = buildString {
@@ -59,7 +59,7 @@
val areaID = tlvReader.getULong(ContextSpecificTag(TAG_AREA_I_D))
val mapID =
if (!tlvReader.isNull()) {
- tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D))
+ tlvReader.getULong(ContextSpecificTag(TAG_MAP_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_MAP_I_D))
null
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt
new file mode 100644
index 0000000..0497079
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt
@@ -0,0 +1,66 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UInt, val positionTag: UInt?) {
+ override fun toString(): String = buildString {
+ append("ServiceAreaClusterLandmarkInfoStruct {\n")
+ append("\tlandmarkTag : $landmarkTag\n")
+ append("\tpositionTag : $positionTag\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag)
+ if (positionTag != null) {
+ put(ContextSpecificTag(TAG_POSITION_TAG), positionTag)
+ } else {
+ putNull(ContextSpecificTag(TAG_POSITION_TAG))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_LANDMARK_TAG = 0
+ private const val TAG_POSITION_TAG = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLandmarkInfoStruct {
+ tlvReader.enterStructure(tlvTag)
+ val landmarkTag = tlvReader.getUInt(ContextSpecificTag(TAG_LANDMARK_TAG))
+ val positionTag =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUInt(ContextSpecificTag(TAG_POSITION_TAG))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return ServiceAreaClusterLandmarkInfoStruct(landmarkTag, positionTag)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt
index 377ab13..f008773 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterMapStruct.kt
@@ -22,7 +22,7 @@
import matter.tlv.TlvReader
import matter.tlv.TlvWriter
-class ServiceAreaClusterMapStruct(val mapID: UInt, val name: String) {
+class ServiceAreaClusterMapStruct(val mapID: ULong, val name: String) {
override fun toString(): String = buildString {
append("ServiceAreaClusterMapStruct {\n")
append("\tmapID : $mapID\n")
@@ -45,7 +45,7 @@
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterMapStruct {
tlvReader.enterStructure(tlvTag)
- val mapID = tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D))
+ val mapID = tlvReader.getULong(ContextSpecificTag(TAG_MAP_I_D))
val name = tlvReader.getString(ContextSpecificTag(TAG_NAME))
tlvReader.exitContainer()
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 0837600..b526c0e 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,9 +40,9 @@
import matter.tlv.TlvWriter
class ServiceAreaCluster(private val controller: MatterController, private val endpointId: UShort) {
- class SelectAreasResponse(val status: UByte, val statusText: String?)
+ class SelectAreasResponse(val status: UByte, val statusText: String)
- class SkipAreaResponse(val status: UByte, val statusText: String?)
+ class SkipAreaResponse(val status: UByte, val statusText: String)
class SupportedAreasAttribute(val value: List<ServiceAreaClusterAreaStruct>)
@@ -55,10 +55,10 @@
object SubscriptionEstablished : SupportedAreasAttributeSubscriptionState()
}
- class SupportedMapsAttribute(val value: List<ServiceAreaClusterMapStruct>)
+ class SupportedMapsAttribute(val value: List<ServiceAreaClusterMapStruct>?)
sealed class SupportedMapsAttributeSubscriptionState {
- data class Success(val value: List<ServiceAreaClusterMapStruct>) :
+ data class Success(val value: List<ServiceAreaClusterMapStruct>?) :
SupportedMapsAttributeSubscriptionState()
data class Error(val exception: Exception) : SupportedMapsAttributeSubscriptionState()
@@ -190,17 +190,7 @@
}
if (tag == ContextSpecificTag(TAG_STATUS_TEXT)) {
- statusText_decoded =
- if (tlvReader.isNull()) {
- tlvReader.getNull(tag)
- null
- } else {
- if (tlvReader.isNextTag(tag)) {
- tlvReader.getString(tag)
- } else {
- null
- }
- }
+ statusText_decoded = tlvReader.getString(tag)
} else {
tlvReader.skipElement()
}
@@ -210,16 +200,23 @@
throw IllegalStateException("status not found in TLV")
}
+ if (statusText_decoded == null) {
+ throw IllegalStateException("statusText not found in TLV")
+ }
+
tlvReader.exitContainer()
return SelectAreasResponse(status_decoded, statusText_decoded)
}
- suspend fun skipArea(timedInvokeTimeout: Duration? = null): SkipAreaResponse {
+ suspend fun skipArea(skippedArea: UInt, timedInvokeTimeout: Duration? = null): SkipAreaResponse {
val commandId: UInt = 2u
val tlvWriter = TlvWriter()
tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_SKIPPED_AREA_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_SKIPPED_AREA_REQ), skippedArea)
tlvWriter.endStructure()
val request: InvokeRequest =
@@ -248,17 +245,7 @@
}
if (tag == ContextSpecificTag(TAG_STATUS_TEXT)) {
- statusText_decoded =
- if (tlvReader.isNull()) {
- tlvReader.getNull(tag)
- null
- } else {
- if (tlvReader.isNextTag(tag)) {
- tlvReader.getString(tag)
- } else {
- null
- }
- }
+ statusText_decoded = tlvReader.getString(tag)
} else {
tlvReader.skipElement()
}
@@ -268,6 +255,10 @@
throw IllegalStateException("status not found in TLV")
}
+ if (statusText_decoded == null) {
+ throw IllegalStateException("statusText not found in TLV")
+ }
+
tlvReader.exitContainer()
return SkipAreaResponse(status_decoded, statusText_decoded)
@@ -396,13 +387,17 @@
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
- val decodedValue: List<ServiceAreaClusterMapStruct> =
- buildList<ServiceAreaClusterMapStruct> {
- tlvReader.enterArray(AnonymousTag)
- while (!tlvReader.isEndOfContainer()) {
- add(ServiceAreaClusterMapStruct.fromTlv(AnonymousTag, tlvReader))
+ val decodedValue: List<ServiceAreaClusterMapStruct>? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ buildList<ServiceAreaClusterMapStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(ServiceAreaClusterMapStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
}
- tlvReader.exitContainer()
+ } else {
+ null
}
return SupportedMapsAttribute(decodedValue)
@@ -447,16 +442,20 @@
// Decode the TLV data into the appropriate type
val tlvReader = TlvReader(attributeData.data)
- val decodedValue: List<ServiceAreaClusterMapStruct> =
- buildList<ServiceAreaClusterMapStruct> {
- tlvReader.enterArray(AnonymousTag)
- while (!tlvReader.isEndOfContainer()) {
- add(ServiceAreaClusterMapStruct.fromTlv(AnonymousTag, tlvReader))
+ val decodedValue: List<ServiceAreaClusterMapStruct>? =
+ if (tlvReader.isNextTag(AnonymousTag)) {
+ buildList<ServiceAreaClusterMapStruct> {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(ServiceAreaClusterMapStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
}
- tlvReader.exitContainer()
+ } else {
+ null
}
- emit(SupportedMapsAttributeSubscriptionState.Success(decodedValue))
+ decodedValue?.let { emit(SupportedMapsAttributeSubscriptionState.Success(it)) }
}
SubscriptionState.SubscriptionEstablished -> {
emit(SupportedMapsAttributeSubscriptionState.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 e848af6..844c669 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -125,6 +125,7 @@
"${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/ServiceAreaClusterLandmarkInfoStruct.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/ServiceAreaClusterMapStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterProgressStruct.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt
index a440d0b..1c71c6b 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaInfoStruct.kt
@@ -24,16 +24,12 @@
class ServiceAreaClusterAreaInfoStruct(
val locationInfo: ServiceAreaClusterLocationDescriptorStruct?,
- val landmarkTag: UByte?,
- val positionTag: UByte?,
- val surfaceTag: UByte?,
+ val landmarkInfo: ServiceAreaClusterLandmarkInfoStruct?,
) {
override fun toString(): String = buildString {
append("ServiceAreaClusterAreaInfoStruct {\n")
append("\tlocationInfo : $locationInfo\n")
- append("\tlandmarkTag : $landmarkTag\n")
- append("\tpositionTag : $positionTag\n")
- append("\tsurfaceTag : $surfaceTag\n")
+ append("\tlandmarkInfo : $landmarkInfo\n")
append("}\n")
}
@@ -45,20 +41,10 @@
} else {
putNull(ContextSpecificTag(TAG_LOCATION_INFO))
}
- if (landmarkTag != null) {
- put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag)
+ if (landmarkInfo != null) {
+ landmarkInfo.toTlv(ContextSpecificTag(TAG_LANDMARK_INFO), this)
} else {
- putNull(ContextSpecificTag(TAG_LANDMARK_TAG))
- }
- if (positionTag != null) {
- put(ContextSpecificTag(TAG_POSITION_TAG), positionTag)
- } else {
- putNull(ContextSpecificTag(TAG_POSITION_TAG))
- }
- if (surfaceTag != null) {
- put(ContextSpecificTag(TAG_SURFACE_TAG), surfaceTag)
- } else {
- putNull(ContextSpecificTag(TAG_SURFACE_TAG))
+ putNull(ContextSpecificTag(TAG_LANDMARK_INFO))
}
endStructure()
}
@@ -66,9 +52,7 @@
companion object {
private const val TAG_LOCATION_INFO = 0
- private const val TAG_LANDMARK_TAG = 1
- private const val TAG_POSITION_TAG = 2
- private const val TAG_SURFACE_TAG = 3
+ private const val TAG_LANDMARK_INFO = 1
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaInfoStruct {
tlvReader.enterStructure(tlvTag)
@@ -82,31 +66,20 @@
tlvReader.getNull(ContextSpecificTag(TAG_LOCATION_INFO))
null
}
- val landmarkTag =
+ val landmarkInfo =
if (!tlvReader.isNull()) {
- tlvReader.getUByte(ContextSpecificTag(TAG_LANDMARK_TAG))
+ ServiceAreaClusterLandmarkInfoStruct.fromTlv(
+ ContextSpecificTag(TAG_LANDMARK_INFO),
+ tlvReader,
+ )
} else {
- tlvReader.getNull(ContextSpecificTag(TAG_LANDMARK_TAG))
- null
- }
- val positionTag =
- if (!tlvReader.isNull()) {
- tlvReader.getUByte(ContextSpecificTag(TAG_POSITION_TAG))
- } else {
- tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG))
- null
- }
- val surfaceTag =
- if (!tlvReader.isNull()) {
- tlvReader.getUByte(ContextSpecificTag(TAG_SURFACE_TAG))
- } else {
- tlvReader.getNull(ContextSpecificTag(TAG_SURFACE_TAG))
+ tlvReader.getNull(ContextSpecificTag(TAG_LANDMARK_INFO))
null
}
tlvReader.exitContainer()
- return ServiceAreaClusterAreaInfoStruct(locationInfo, landmarkTag, positionTag, surfaceTag)
+ return ServiceAreaClusterAreaInfoStruct(locationInfo, landmarkInfo)
}
}
}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt
index 0ffdb8c..adfe228 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterAreaStruct.kt
@@ -24,7 +24,7 @@
class ServiceAreaClusterAreaStruct(
val areaID: UInt,
- val mapID: UByte?,
+ val mapID: UInt?,
val areaDesc: ServiceAreaClusterAreaInfoStruct,
) {
override fun toString(): String = buildString {
@@ -59,7 +59,7 @@
val areaID = tlvReader.getUInt(ContextSpecificTag(TAG_AREA_I_D))
val mapID =
if (!tlvReader.isNull()) {
- tlvReader.getUByte(ContextSpecificTag(TAG_MAP_I_D))
+ tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D))
} else {
tlvReader.getNull(ContextSpecificTag(TAG_MAP_I_D))
null
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt
new file mode 100644
index 0000000..119667c
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt
@@ -0,0 +1,66 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UByte, val positionTag: UByte?) {
+ override fun toString(): String = buildString {
+ append("ServiceAreaClusterLandmarkInfoStruct {\n")
+ append("\tlandmarkTag : $landmarkTag\n")
+ append("\tpositionTag : $positionTag\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag)
+ if (positionTag != null) {
+ put(ContextSpecificTag(TAG_POSITION_TAG), positionTag)
+ } else {
+ putNull(ContextSpecificTag(TAG_POSITION_TAG))
+ }
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_LANDMARK_TAG = 0
+ private const val TAG_POSITION_TAG = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLandmarkInfoStruct {
+ tlvReader.enterStructure(tlvTag)
+ val landmarkTag = tlvReader.getUByte(ContextSpecificTag(TAG_LANDMARK_TAG))
+ val positionTag =
+ if (!tlvReader.isNull()) {
+ tlvReader.getUByte(ContextSpecificTag(TAG_POSITION_TAG))
+ } else {
+ tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG))
+ null
+ }
+
+ tlvReader.exitContainer()
+
+ return ServiceAreaClusterLandmarkInfoStruct(landmarkTag, positionTag)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterMapStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterMapStruct.kt
index 3109c9b..5288882 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterMapStruct.kt
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterMapStruct.kt
@@ -22,7 +22,7 @@
import matter.tlv.TlvReader
import matter.tlv.TlvWriter
-class ServiceAreaClusterMapStruct(val mapID: UByte, val name: String) {
+class ServiceAreaClusterMapStruct(val mapID: UInt, val name: String) {
override fun toString(): String = buildString {
append("ServiceAreaClusterMapStruct {\n")
append("\tmapID : $mapID\n")
@@ -45,7 +45,7 @@
fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterMapStruct {
tlvReader.enterStructure(tlvTag)
- val mapID = tlvReader.getUByte(ContextSpecificTag(TAG_MAP_I_D))
+ val mapID = tlvReader.getUInt(ContextSpecificTag(TAG_MAP_I_D))
val name = tlvReader.getString(ContextSpecificTag(TAG_NAME))
tlvReader.exitContainer()
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index ffa1de1..82a4a6f 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -28640,12 +28640,12 @@
}
else
{
- std::string newElement_0_mapIDClassName = "java/lang/Integer";
- std::string newElement_0_mapIDCtorSignature = "(I)V";
- jint jninewElement_0_mapID = static_cast<jint>(entry_0.mapID.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_mapIDClassName.c_str(),
- newElement_0_mapIDCtorSignature.c_str(),
- jninewElement_0_mapID, newElement_0_mapID);
+ std::string newElement_0_mapIDClassName = "java/lang/Long";
+ std::string newElement_0_mapIDCtorSignature = "(J)V";
+ jlong jninewElement_0_mapID = static_cast<jlong>(entry_0.mapID.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_mapIDClassName.c_str(),
+ newElement_0_mapIDCtorSignature.c_str(),
+ jninewElement_0_mapID, newElement_0_mapID);
}
jobject newElement_0_areaDesc;
jobject newElement_0_areaDesc_locationInfo;
@@ -28716,47 +28716,62 @@
newElement_0_areaDesc_locationInfo_locationName,
newElement_0_areaDesc_locationInfo_floorNumber, newElement_0_areaDesc_locationInfo_areaType);
}
- jobject newElement_0_areaDesc_landmarkTag;
- if (entry_0.areaDesc.landmarkTag.IsNull())
+ jobject newElement_0_areaDesc_landmarkInfo;
+ if (entry_0.areaDesc.landmarkInfo.IsNull())
{
- newElement_0_areaDesc_landmarkTag = nullptr;
+ newElement_0_areaDesc_landmarkInfo = nullptr;
}
else
{
- std::string newElement_0_areaDesc_landmarkTagClassName = "java/lang/Integer";
- std::string newElement_0_areaDesc_landmarkTagCtorSignature = "(I)V";
- jint jninewElement_0_areaDesc_landmarkTag = static_cast<jint>(entry_0.areaDesc.landmarkTag.Value());
+ jobject newElement_0_areaDesc_landmarkInfo_landmarkTag;
+ std::string newElement_0_areaDesc_landmarkInfo_landmarkTagClassName = "java/lang/Integer";
+ std::string newElement_0_areaDesc_landmarkInfo_landmarkTagCtorSignature = "(I)V";
+ jint jninewElement_0_areaDesc_landmarkInfo_landmarkTag =
+ static_cast<jint>(entry_0.areaDesc.landmarkInfo.Value().landmarkTag);
chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
- newElement_0_areaDesc_landmarkTagClassName.c_str(), newElement_0_areaDesc_landmarkTagCtorSignature.c_str(),
- jninewElement_0_areaDesc_landmarkTag, newElement_0_areaDesc_landmarkTag);
- }
- jobject newElement_0_areaDesc_positionTag;
- if (entry_0.areaDesc.positionTag.IsNull())
- {
- newElement_0_areaDesc_positionTag = nullptr;
- }
- else
- {
- std::string newElement_0_areaDesc_positionTagClassName = "java/lang/Integer";
- std::string newElement_0_areaDesc_positionTagCtorSignature = "(I)V";
- jint jninewElement_0_areaDesc_positionTag = static_cast<jint>(entry_0.areaDesc.positionTag.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
- newElement_0_areaDesc_positionTagClassName.c_str(), newElement_0_areaDesc_positionTagCtorSignature.c_str(),
- jninewElement_0_areaDesc_positionTag, newElement_0_areaDesc_positionTag);
- }
- jobject newElement_0_areaDesc_surfaceTag;
- if (entry_0.areaDesc.surfaceTag.IsNull())
- {
- newElement_0_areaDesc_surfaceTag = nullptr;
- }
- else
- {
- std::string newElement_0_areaDesc_surfaceTagClassName = "java/lang/Integer";
- std::string newElement_0_areaDesc_surfaceTagCtorSignature = "(I)V";
- jint jninewElement_0_areaDesc_surfaceTag = static_cast<jint>(entry_0.areaDesc.surfaceTag.Value());
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
- newElement_0_areaDesc_surfaceTagClassName.c_str(), newElement_0_areaDesc_surfaceTagCtorSignature.c_str(),
- jninewElement_0_areaDesc_surfaceTag, newElement_0_areaDesc_surfaceTag);
+ newElement_0_areaDesc_landmarkInfo_landmarkTagClassName.c_str(),
+ newElement_0_areaDesc_landmarkInfo_landmarkTagCtorSignature.c_str(),
+ jninewElement_0_areaDesc_landmarkInfo_landmarkTag, newElement_0_areaDesc_landmarkInfo_landmarkTag);
+ jobject newElement_0_areaDesc_landmarkInfo_positionTag;
+ if (entry_0.areaDesc.landmarkInfo.Value().positionTag.IsNull())
+ {
+ newElement_0_areaDesc_landmarkInfo_positionTag = nullptr;
+ }
+ else
+ {
+ std::string newElement_0_areaDesc_landmarkInfo_positionTagClassName = "java/lang/Integer";
+ std::string newElement_0_areaDesc_landmarkInfo_positionTagCtorSignature = "(I)V";
+ jint jninewElement_0_areaDesc_landmarkInfo_positionTag =
+ static_cast<jint>(entry_0.areaDesc.landmarkInfo.Value().positionTag.Value());
+ chip::JniReferences::GetInstance().CreateBoxedObject<jint>(
+ newElement_0_areaDesc_landmarkInfo_positionTagClassName.c_str(),
+ newElement_0_areaDesc_landmarkInfo_positionTagCtorSignature.c_str(),
+ jninewElement_0_areaDesc_landmarkInfo_positionTag, newElement_0_areaDesc_landmarkInfo_positionTag);
+ }
+
+ jclass landmarkInfoStructStructClass_4;
+ err = chip::JniReferences::GetInstance().GetLocalClassRef(
+ env, "chip/devicecontroller/ChipStructs$ServiceAreaClusterLandmarkInfoStruct",
+ landmarkInfoStructStructClass_4);
+ if (err != CHIP_NO_ERROR)
+ {
+ ChipLogError(Zcl, "Could not find class ChipStructs$ServiceAreaClusterLandmarkInfoStruct");
+ return nullptr;
+ }
+
+ jmethodID landmarkInfoStructStructCtor_4;
+ err = chip::JniReferences::GetInstance().FindMethod(env, landmarkInfoStructStructClass_4, "<init>",
+ "(Ljava/lang/Integer;Ljava/lang/Integer;)V",
+ &landmarkInfoStructStructCtor_4);
+ if (err != CHIP_NO_ERROR || landmarkInfoStructStructCtor_4 == nullptr)
+ {
+ ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterLandmarkInfoStruct constructor");
+ return nullptr;
+ }
+
+ newElement_0_areaDesc_landmarkInfo = env->NewObject(
+ landmarkInfoStructStructClass_4, landmarkInfoStructStructCtor_4,
+ newElement_0_areaDesc_landmarkInfo_landmarkTag, newElement_0_areaDesc_landmarkInfo_positionTag);
}
jclass areaInfoStructStructClass_2;
@@ -28771,8 +28786,8 @@
jmethodID areaInfoStructStructCtor_2;
err = chip::JniReferences::GetInstance().FindMethod(
env, areaInfoStructStructClass_2, "<init>",
- "(Lchip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct;Ljava/lang/Integer;Ljava/lang/"
- "Integer;Ljava/lang/Integer;)V",
+ "(Lchip/devicecontroller/ChipStructs$ServiceAreaClusterLocationDescriptorStruct;Lchip/devicecontroller/"
+ "ChipStructs$ServiceAreaClusterLandmarkInfoStruct;)V",
&areaInfoStructStructCtor_2);
if (err != CHIP_NO_ERROR || areaInfoStructStructCtor_2 == nullptr)
{
@@ -28781,8 +28796,7 @@
}
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);
+ newElement_0_areaDesc_locationInfo, newElement_0_areaDesc_landmarkInfo);
jclass areaStructStructClass_1;
err = chip::JniReferences::GetInstance().GetLocalClassRef(
@@ -28796,7 +28810,7 @@
jmethodID areaStructStructCtor_1;
err = chip::JniReferences::GetInstance().FindMethod(
env, areaStructStructClass_1, "<init>",
- "(Ljava/lang/Long;Ljava/lang/Integer;Lchip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct;)V",
+ "(Ljava/lang/Long;Ljava/lang/Long;Lchip/devicecontroller/ChipStructs$ServiceAreaClusterAreaInfoStruct;)V",
&areaStructStructCtor_1);
if (err != CHIP_NO_ERROR || areaStructStructCtor_1 == nullptr)
{
@@ -28827,12 +28841,12 @@
auto & entry_0 = iter_value_0.GetValue();
jobject newElement_0;
jobject newElement_0_mapID;
- std::string newElement_0_mapIDClassName = "java/lang/Integer";
- std::string newElement_0_mapIDCtorSignature = "(I)V";
- jint jninewElement_0_mapID = static_cast<jint>(entry_0.mapID);
- chip::JniReferences::GetInstance().CreateBoxedObject<jint>(newElement_0_mapIDClassName.c_str(),
- newElement_0_mapIDCtorSignature.c_str(),
- jninewElement_0_mapID, newElement_0_mapID);
+ std::string newElement_0_mapIDClassName = "java/lang/Long";
+ std::string newElement_0_mapIDCtorSignature = "(J)V";
+ jlong jninewElement_0_mapID = static_cast<jlong>(entry_0.mapID);
+ chip::JniReferences::GetInstance().CreateBoxedObject<jlong>(newElement_0_mapIDClassName.c_str(),
+ newElement_0_mapIDCtorSignature.c_str(),
+ jninewElement_0_mapID, newElement_0_mapID);
jobject newElement_0_name;
LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name, newElement_0_name));
@@ -28847,7 +28861,7 @@
jmethodID mapStructStructCtor_1;
err = chip::JniReferences::GetInstance().FindMethod(
- env, mapStructStructClass_1, "<init>", "(Ljava/lang/Integer;Ljava/lang/String;)V", &mapStructStructCtor_1);
+ env, mapStructStructClass_1, "<init>", "(Ljava/lang/Long;Ljava/lang/String;)V", &mapStructStructCtor_1);
if (err != CHIP_NO_ERROR || mapStructStructCtor_1 == nullptr)
{
ChipLogError(Zcl, "Could not find ChipStructs$ServiceAreaClusterMapStruct constructor");
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index 3c67676..c573d69 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -8571,6 +8571,7 @@
"commandId": 0x00000002,
"commandName": "SkipArea",
"args": {
+ "skippedArea": "int",
},
},
},
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 92ea677..774b76e 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -31144,7 +31144,7 @@
return ClusterObjectDescriptor(
Fields=[
ClusterObjectFieldDescriptor(Label="supportedAreas", Tag=0x00000000, Type=typing.List[ServiceArea.Structs.AreaStruct]),
- ClusterObjectFieldDescriptor(Label="supportedMaps", Tag=0x00000001, Type=typing.List[ServiceArea.Structs.MapStruct]),
+ ClusterObjectFieldDescriptor(Label="supportedMaps", Tag=0x00000001, Type=typing.Optional[typing.List[ServiceArea.Structs.MapStruct]]),
ClusterObjectFieldDescriptor(Label="selectedAreas", Tag=0x00000002, Type=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]),
@@ -31158,7 +31158,7 @@
])
supportedAreas: 'typing.List[ServiceArea.Structs.AreaStruct]' = None
- supportedMaps: 'typing.List[ServiceArea.Structs.MapStruct]' = None
+ supportedMaps: 'typing.Optional[typing.List[ServiceArea.Structs.MapStruct]]' = None
selectedAreas: 'typing.List[uint]' = None
currentArea: 'typing.Union[None, Nullable, uint]' = None
estimatedEndTime: 'typing.Union[None, Nullable, uint]' = None
@@ -31198,34 +31198,45 @@
kSuccess = 0x00
kInvalidAreaList = 0x01
kInvalidInMode = 0x02
+ kInvalidSkippedArea = 0x03
# 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 an unknown
# enum value. This specific value should never be transmitted.
- kUnknownEnumValue = 3,
+ kUnknownEnumValue = 4,
class Bitmaps:
class Feature(IntFlag):
- kListOrder = 0x1
- kSelectWhileRunning = 0x2
+ kSelectWhileRunning = 0x1
+ kProgressReporting = 0x2
+ kMaps = 0x4
class Structs:
@dataclass
+ class LandmarkInfoStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="landmarkTag", Tag=0, Type=Globals.Enums.LandmarkTag),
+ ClusterObjectFieldDescriptor(Label="positionTag", Tag=1, Type=typing.Union[Nullable, Globals.Enums.RelativePositionTag]),
+ ])
+
+ landmarkTag: 'Globals.Enums.LandmarkTag' = 0
+ positionTag: 'typing.Union[Nullable, Globals.Enums.RelativePositionTag]' = NullValue
+
+ @dataclass
class AreaInfoStruct(ClusterObject):
@ChipUtility.classproperty
def descriptor(cls) -> ClusterObjectDescriptor:
return ClusterObjectDescriptor(
Fields=[
ClusterObjectFieldDescriptor(Label="locationInfo", Tag=0, Type=typing.Union[Nullable, Globals.Structs.LocationDescriptorStruct]),
- ClusterObjectFieldDescriptor(Label="landmarkTag", Tag=1, Type=typing.Union[Nullable, Globals.Enums.LandmarkTag]),
- ClusterObjectFieldDescriptor(Label="positionTag", Tag=2, Type=typing.Union[Nullable, Globals.Enums.PositionTag]),
- ClusterObjectFieldDescriptor(Label="surfaceTag", Tag=3, Type=typing.Union[Nullable, Globals.Enums.FloorSurfaceTag]),
+ ClusterObjectFieldDescriptor(Label="landmarkInfo", Tag=1, Type=typing.Union[Nullable, ServiceArea.Structs.LandmarkInfoStruct]),
])
locationInfo: 'typing.Union[Nullable, Globals.Structs.LocationDescriptorStruct]' = NullValue
- landmarkTag: 'typing.Union[Nullable, Globals.Enums.LandmarkTag]' = NullValue
- positionTag: 'typing.Union[Nullable, Globals.Enums.PositionTag]' = NullValue
- surfaceTag: 'typing.Union[Nullable, Globals.Enums.FloorSurfaceTag]' = NullValue
+ landmarkInfo: 'typing.Union[Nullable, ServiceArea.Structs.LandmarkInfoStruct]' = NullValue
@dataclass
class AreaStruct(ClusterObject):
@@ -31301,11 +31312,11 @@
return ClusterObjectDescriptor(
Fields=[
ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ServiceArea.Enums.SelectAreasStatus),
- ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=str),
])
status: 'ServiceArea.Enums.SelectAreasStatus' = 0
- statusText: 'typing.Optional[str]' = None
+ statusText: 'str' = ""
@dataclass
class SkipArea(ClusterCommand):
@@ -31318,8 +31329,11 @@
def descriptor(cls) -> ClusterObjectDescriptor:
return ClusterObjectDescriptor(
Fields=[
+ ClusterObjectFieldDescriptor(Label="skippedArea", Tag=0, Type=uint),
])
+ skippedArea: 'uint' = 0
+
@dataclass
class SkipAreaResponse(ClusterCommand):
cluster_id: typing.ClassVar[int] = 0x00000150
@@ -31332,11 +31346,11 @@
return ClusterObjectDescriptor(
Fields=[
ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=ServiceArea.Enums.SkipAreaStatus),
- ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=typing.Optional[str]),
+ ClusterObjectFieldDescriptor(Label="statusText", Tag=1, Type=str),
])
status: 'ServiceArea.Enums.SkipAreaStatus' = 0
- statusText: 'typing.Optional[str]' = None
+ statusText: 'str' = ""
class Attributes:
@dataclass
@@ -31367,9 +31381,9 @@
@ChipUtility.classproperty
def attribute_type(cls) -> ClusterObjectFieldDescriptor:
- return ClusterObjectFieldDescriptor(Type=typing.List[ServiceArea.Structs.MapStruct])
+ return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[ServiceArea.Structs.MapStruct]])
- value: 'typing.List[ServiceArea.Structs.MapStruct]' = field(default_factory=lambda: [])
+ value: 'typing.Optional[typing.List[ServiceArea.Structs.MapStruct]]' = None
@dataclass
class SelectedAreas(ClusterAttributeDescriptor):
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 332c53d..f899dba 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -11195,7 +11195,7 @@
if (entry_0.mapID.IsNull()) {
newElement_0.mapID = nil;
} else {
- newElement_0.mapID = [NSNumber numberWithUnsignedChar:entry_0.mapID.Value()];
+ newElement_0.mapID = [NSNumber numberWithUnsignedInt:entry_0.mapID.Value()];
}
newElement_0.areaDesc = [MTRServiceAreaClusterAreaInfoStruct new];
if (entry_0.areaDesc.locationInfo.IsNull()) {
@@ -11219,20 +11219,16 @@
newElement_0.areaDesc.locationInfo.areaType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.locationInfo.Value().areaType.Value())];
}
}
- if (entry_0.areaDesc.landmarkTag.IsNull()) {
- newElement_0.areaDesc.landmarkTag = nil;
+ if (entry_0.areaDesc.landmarkInfo.IsNull()) {
+ newElement_0.areaDesc.landmarkInfo = nil;
} else {
- newElement_0.areaDesc.landmarkTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.landmarkTag.Value())];
- }
- if (entry_0.areaDesc.positionTag.IsNull()) {
- newElement_0.areaDesc.positionTag = nil;
- } else {
- newElement_0.areaDesc.positionTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.positionTag.Value())];
- }
- if (entry_0.areaDesc.surfaceTag.IsNull()) {
- newElement_0.areaDesc.surfaceTag = nil;
- } else {
- newElement_0.areaDesc.surfaceTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.surfaceTag.Value())];
+ newElement_0.areaDesc.landmarkInfo = [MTRServiceAreaClusterLandmarkInfoStruct new];
+ newElement_0.areaDesc.landmarkInfo.landmarkTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.landmarkInfo.Value().landmarkTag)];
+ if (entry_0.areaDesc.landmarkInfo.Value().positionTag.IsNull()) {
+ newElement_0.areaDesc.landmarkInfo.positionTag = nil;
+ } else {
+ newElement_0.areaDesc.landmarkInfo.positionTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.landmarkInfo.Value().positionTag.Value())];
+ }
}
[array_0 addObject:newElement_0];
}
@@ -11260,7 +11256,7 @@
auto & entry_0 = iter_0.GetValue();
MTRServiceAreaClusterMapStruct * newElement_0;
newElement_0 = [MTRServiceAreaClusterMapStruct new];
- newElement_0.mapID = [NSNumber numberWithUnsignedChar:entry_0.mapID];
+ newElement_0.mapID = [NSNumber numberWithUnsignedInt:entry_0.mapID];
newElement_0.name = AsString(entry_0.name);
if (newElement_0.name == nil) {
CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 5456773..c9850dd 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -9690,7 +9690,7 @@
/**
* Cluster Service Area
*
- * The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location.
+ * The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced.
*/
MTR_PROVISIONALLY_AVAILABLE
@interface MTRBaseClusterServiceArea : MTRGenericBaseCluster
@@ -9706,9 +9706,7 @@
*
* This command is used to skip an area where the device operates.
*/
-- (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)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
- (void)readAttributeSupportedAreasWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
- (void)subscribeAttributeSupportedAreasWithParams:(MTRSubscribeParams *)params
@@ -19806,11 +19804,13 @@
MTRServiceAreaSkipAreaStatusSuccess MTR_PROVISIONALLY_AVAILABLE = 0x00,
MTRServiceAreaSkipAreaStatusInvalidAreaList MTR_PROVISIONALLY_AVAILABLE = 0x01,
MTRServiceAreaSkipAreaStatusInvalidInMode MTR_PROVISIONALLY_AVAILABLE = 0x02,
+ MTRServiceAreaSkipAreaStatusInvalidSkippedArea MTR_PROVISIONALLY_AVAILABLE = 0x03,
} MTR_PROVISIONALLY_AVAILABLE;
typedef NS_OPTIONS(uint32_t, MTRServiceAreaFeature) {
- MTRServiceAreaFeatureListOrder MTR_PROVISIONALLY_AVAILABLE = 0x1,
- MTRServiceAreaFeatureSelectWhileRunning MTR_PROVISIONALLY_AVAILABLE = 0x2,
+ MTRServiceAreaFeatureSelectWhileRunning MTR_PROVISIONALLY_AVAILABLE = 0x1,
+ MTRServiceAreaFeatureProgressReporting MTR_PROVISIONALLY_AVAILABLE = 0x2,
+ MTRServiceAreaFeatureMaps MTR_PROVISIONALLY_AVAILABLE = 0x4,
} MTR_PROVISIONALLY_AVAILABLE;
typedef NS_ENUM(uint8_t, MTRPumpConfigurationAndControlControlMode) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index 992d7ce..756425b 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -65388,11 +65388,7 @@
queue:self.callbackQueue
completion:responseHandler];
}
-- (void)skipAreaWithCompletion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
-{
- [self skipAreaWithParams:nil completion:completion];
-}
-- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams * _Nullable)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
+- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
{
if (params == nil) {
params = [[MTRServiceAreaClusterSkipAreaParams
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index 4a2c3d6..9db1460 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -4505,15 +4505,13 @@
/**
* Cluster Service Area
- * The Service Area cluster provides an interface for controlling the locations where a device should operate, and for querying the current location.
+ * The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced.
*/
MTR_PROVISIONALLY_AVAILABLE
@interface MTRClusterServiceArea : MTRGenericCluster
- (void)selectAreasWithParams:(MTRServiceAreaClusterSelectAreasParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _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<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
-- (void)skipAreaWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
- MTR_PROVISIONALLY_AVAILABLE;
+- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
- (NSDictionary<NSString *, id> * _Nullable)readAttributeSupportedAreasWithParams:(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 90ff967..73ff54e 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -12864,11 +12864,7 @@
completion:responseHandler];
}
-- (void)skipAreaWithExpectedValues:(NSArray<NSDictionary<NSString *, id> *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
-{
- [self skipAreaWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion];
-}
-- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams * _Nullable)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
+- (void)skipAreaWithParams:(MTRServiceAreaClusterSkipAreaParams *)params expectedValues:(NSArray<NSDictionary<NSString *, id> *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRServiceAreaClusterSkipAreaResponseParams * _Nullable data, NSError * _Nullable error))completion
{
if (params == nil) {
params = [[MTRServiceAreaClusterSkipAreaParams
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index 79cc7d4..b276bb8 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -7671,7 +7671,7 @@
@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE;
-@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nonnull statusText MTR_PROVISIONALLY_AVAILABLE;
/**
* Initialize an MTRServiceAreaClusterSelectAreasResponseParams with a response-value dictionary
@@ -7689,6 +7689,8 @@
MTR_PROVISIONALLY_AVAILABLE
@interface MTRServiceAreaClusterSkipAreaParams : NSObject <NSCopying>
+
+@property (nonatomic, copy) NSNumber * _Nonnull skippedArea MTR_PROVISIONALLY_AVAILABLE;
/**
* Controls whether the command is a timed command (using Timed Invoke).
*
@@ -7720,7 +7722,7 @@
@property (nonatomic, copy) NSNumber * _Nonnull status MTR_PROVISIONALLY_AVAILABLE;
-@property (nonatomic, copy) NSString * _Nullable statusText MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSString * _Nonnull statusText MTR_PROVISIONALLY_AVAILABLE;
/**
* Initialize an MTRServiceAreaClusterSkipAreaResponseParams with a response-value dictionary
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
index eeb671d..7aa7362 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm
@@ -21891,7 +21891,7 @@
_status = @(0);
- _statusText = nil;
+ _statusText = @"";
}
return self;
}
@@ -21962,14 +21962,10 @@
self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)];
}
{
- if (decodableStruct.statusText.HasValue()) {
- self.statusText = AsString(decodableStruct.statusText.Value());
- if (self.statusText == nil) {
- CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
- return err;
- }
- } else {
- self.statusText = nil;
+ self.statusText = AsString(decodableStruct.statusText);
+ if (self.statusText == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
}
}
return CHIP_NO_ERROR;
@@ -21981,6 +21977,8 @@
- (instancetype)init
{
if (self = [super init]) {
+
+ _skippedArea = @(0);
_timedInvokeTimeoutMs = nil;
_serverSideProcessingTimeout = nil;
}
@@ -21991,6 +21989,7 @@
{
auto other = [[MTRServiceAreaClusterSkipAreaParams alloc] init];
+ other.skippedArea = self.skippedArea;
other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs;
other.serverSideProcessingTimeout = self.serverSideProcessingTimeout;
@@ -21999,7 +21998,7 @@
- (NSString *)description
{
- NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])];
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: skippedArea:%@; >", NSStringFromClass([self class]), _skippedArea];
return descriptionString;
}
@@ -22011,6 +22010,9 @@
{
chip::app::Clusters::ServiceArea::Commands::SkipArea::Type encodableStruct;
ListFreer listFreer;
+ {
+ encodableStruct.skippedArea = self.skippedArea.unsignedIntValue;
+ }
auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0);
if (buffer.IsNull()) {
@@ -22057,7 +22059,7 @@
_status = @(0);
- _statusText = nil;
+ _statusText = @"";
}
return self;
}
@@ -22128,14 +22130,10 @@
self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)];
}
{
- if (decodableStruct.statusText.HasValue()) {
- self.statusText = AsString(decodableStruct.statusText.Value());
- if (self.statusText == nil) {
- CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
- return err;
- }
- } else {
- self.statusText = nil;
+ self.statusText = AsString(decodableStruct.statusText);
+ if (self.statusText == nil) {
+ CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT;
+ return err;
}
}
return CHIP_NO_ERROR;
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
index db765a2..8590079 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h
@@ -1594,11 +1594,15 @@
@end
MTR_PROVISIONALLY_AVAILABLE
+@interface MTRServiceAreaClusterLandmarkInfoStruct : NSObject <NSCopying>
+@property (nonatomic, copy) NSNumber * _Nonnull landmarkTag MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) NSNumber * _Nullable positionTag MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
@interface MTRServiceAreaClusterAreaInfoStruct : NSObject <NSCopying>
@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;
-@property (nonatomic, copy) NSNumber * _Nullable surfaceTag MTR_PROVISIONALLY_AVAILABLE;
+@property (nonatomic, copy) MTRServiceAreaClusterLandmarkInfoStruct * _Nullable landmarkInfo MTR_PROVISIONALLY_AVAILABLE;
@end
MTR_PROVISIONALLY_AVAILABLE
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
index 8bcfc3a..02aac9e 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm
@@ -6640,6 +6640,36 @@
@end
+@implementation MTRServiceAreaClusterLandmarkInfoStruct
+- (instancetype)init
+{
+ if (self = [super init]) {
+
+ _landmarkTag = @(0);
+
+ _positionTag = nil;
+ }
+ return self;
+}
+
+- (id)copyWithZone:(NSZone * _Nullable)zone
+{
+ auto other = [[MTRServiceAreaClusterLandmarkInfoStruct alloc] init];
+
+ other.landmarkTag = self.landmarkTag;
+ other.positionTag = self.positionTag;
+
+ return other;
+}
+
+- (NSString *)description
+{
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: landmarkTag:%@; positionTag:%@; >", NSStringFromClass([self class]), _landmarkTag, _positionTag];
+ return descriptionString;
+}
+
+@end
+
@implementation MTRServiceAreaClusterAreaInfoStruct
- (instancetype)init
{
@@ -6647,11 +6677,7 @@
_locationInfo = nil;
- _landmarkTag = nil;
-
- _positionTag = nil;
-
- _surfaceTag = nil;
+ _landmarkInfo = nil;
}
return self;
}
@@ -6661,16 +6687,14 @@
auto other = [[MTRServiceAreaClusterAreaInfoStruct alloc] init];
other.locationInfo = self.locationInfo;
- other.landmarkTag = self.landmarkTag;
- other.positionTag = self.positionTag;
- other.surfaceTag = self.surfaceTag;
+ other.landmarkInfo = self.landmarkInfo;
return other;
}
- (NSString *)description
{
- NSString * descriptionString = [NSString stringWithFormat:@"<%@: locationInfo:%@; landmarkTag:%@; positionTag:%@; surfaceTag:%@; >", NSStringFromClass([self class]), _locationInfo, _landmarkTag, _positionTag, _surfaceTag];
+ NSString * descriptionString = [NSString stringWithFormat:@"<%@: locationInfo:%@; landmarkInfo:%@; >", NSStringFromClass([self class]), _locationInfo, _landmarkInfo];
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 8a951e2..b7305aa 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
@@ -2614,6 +2614,7 @@
case EnumType::kSuccess:
case EnumType::kInvalidAreaList:
case EnumType::kInvalidInMode:
+ case EnumType::kInvalidSkippedArea:
return val;
default:
return EnumType::kUnknownEnumValue;
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 a040751..b798620 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
@@ -3848,21 +3848,23 @@
// Enum for SkipAreaStatus
enum class SkipAreaStatus : uint8_t
{
- kSuccess = 0x00,
- kInvalidAreaList = 0x01,
- kInvalidInMode = 0x02,
+ kSuccess = 0x00,
+ kInvalidAreaList = 0x01,
+ kInvalidInMode = 0x02,
+ kInvalidSkippedArea = 0x03,
// 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
// enum value. This specific should never be transmitted.
- kUnknownEnumValue = 3,
+ kUnknownEnumValue = 4,
};
// Bitmap for Feature
enum class Feature : uint32_t
{
- kListOrder = 0x1,
- kSelectWhileRunning = 0x2,
+ kSelectWhileRunning = 0x1,
+ kProgressReporting = 0x2,
+ kMaps = 0x4,
};
} // namespace ServiceArea
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 878090f..90eddd9 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
@@ -20357,14 +20357,53 @@
namespace ServiceArea {
namespace Structs {
+namespace LandmarkInfoStruct {
+CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
+{
+ DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kLandmarkTag), landmarkTag);
+ encoder.Encode(to_underlying(Fields::kPositionTag), positionTag);
+ return encoder.Finalize();
+}
+
+CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader)
+{
+ detail::StructDecodeIterator __iterator(reader);
+ while (true)
+ {
+ auto __element = __iterator.Next();
+ if (std::holds_alternative<CHIP_ERROR>(__element))
+ {
+ return std::get<CHIP_ERROR>(__element);
+ }
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kLandmarkTag))
+ {
+ err = DataModel::Decode(reader, landmarkTag);
+ }
+ else if (__context_tag == to_underlying(Fields::kPositionTag))
+ {
+ err = DataModel::Decode(reader, positionTag);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
+ }
+}
+
+} // namespace LandmarkInfoStruct
+
namespace AreaInfoStruct {
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
encoder.Encode(to_underlying(Fields::kLocationInfo), locationInfo);
- encoder.Encode(to_underlying(Fields::kLandmarkTag), landmarkTag);
- encoder.Encode(to_underlying(Fields::kPositionTag), positionTag);
- encoder.Encode(to_underlying(Fields::kSurfaceTag), surfaceTag);
+ encoder.Encode(to_underlying(Fields::kLandmarkInfo), landmarkInfo);
return encoder.Finalize();
}
@@ -20386,17 +20425,9 @@
{
err = DataModel::Decode(reader, locationInfo);
}
- else if (__context_tag == to_underlying(Fields::kLandmarkTag))
+ else if (__context_tag == to_underlying(Fields::kLandmarkInfo))
{
- err = DataModel::Decode(reader, landmarkTag);
- }
- else if (__context_tag == to_underlying(Fields::kPositionTag))
- {
- err = DataModel::Decode(reader, positionTag);
- }
- else if (__context_tag == to_underlying(Fields::kSurfaceTag))
- {
- err = DataModel::Decode(reader, surfaceTag);
+ err = DataModel::Decode(reader, landmarkInfo);
}
else
{
@@ -20625,6 +20656,7 @@
CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const
{
DataModel::WrappedStructEncoder encoder{ aWriter, aTag };
+ encoder.Encode(to_underlying(Fields::kSkippedArea), skippedArea);
return encoder.Finalize();
}
@@ -20638,6 +20670,19 @@
{
return std::get<CHIP_ERROR>(__element);
}
+
+ CHIP_ERROR err = CHIP_NO_ERROR;
+ const uint8_t __context_tag = std::get<uint8_t>(__element);
+
+ if (__context_tag == to_underlying(Fields::kSkippedArea))
+ {
+ err = DataModel::Decode(reader, skippedArea);
+ }
+ else
+ {
+ }
+
+ ReturnErrorOnFailure(err);
}
}
} // namespace SkipArea.
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 472ce88..27ee806 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
@@ -28344,22 +28344,41 @@
} // namespace BarrierControl
namespace ServiceArea {
namespace Structs {
+namespace LandmarkInfoStruct {
+enum class Fields : uint8_t
+{
+ kLandmarkTag = 0,
+ kPositionTag = 1,
+};
+
+struct Type
+{
+public:
+ Globals::LandmarkTag landmarkTag = static_cast<Globals::LandmarkTag>(0);
+ DataModel::Nullable<Globals::RelativePositionTag> positionTag;
+
+ CHIP_ERROR Decode(TLV::TLVReader & reader);
+
+ static constexpr bool kIsFabricScoped = false;
+
+ CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
+};
+
+using DecodableType = Type;
+
+} // namespace LandmarkInfoStruct
namespace AreaInfoStruct {
enum class Fields : uint8_t
{
kLocationInfo = 0,
- kLandmarkTag = 1,
- kPositionTag = 2,
- kSurfaceTag = 3,
+ kLandmarkInfo = 1,
};
struct Type
{
public:
DataModel::Nullable<Globals::Structs::LocationDescriptorStruct::Type> locationInfo;
- DataModel::Nullable<Globals::LandmarkTag> landmarkTag;
- DataModel::Nullable<Globals::PositionTag> positionTag;
- DataModel::Nullable<Globals::FloorSurfaceTag> surfaceTag;
+ DataModel::Nullable<Structs::LandmarkInfoStruct::Type> landmarkInfo;
CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -28383,7 +28402,7 @@
{
public:
uint32_t areaID = static_cast<uint32_t>(0);
- DataModel::Nullable<uint8_t> mapID;
+ DataModel::Nullable<uint32_t> mapID;
Structs::AreaInfoStruct::Type areaDesc;
CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -28406,7 +28425,7 @@
struct Type
{
public:
- uint8_t mapID = static_cast<uint8_t>(0);
+ uint32_t mapID = static_cast<uint32_t>(0);
chip::CharSpan name;
CHIP_ERROR Decode(TLV::TLVReader & reader);
@@ -28521,7 +28540,7 @@
static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; }
SelectAreasStatus status = static_cast<SelectAreasStatus>(0);
- Optional<chip::CharSpan> statusText;
+ chip::CharSpan statusText;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
@@ -28537,13 +28556,14 @@
static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; }
SelectAreasStatus status = static_cast<SelectAreasStatus>(0);
- Optional<chip::CharSpan> statusText;
+ chip::CharSpan statusText;
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace SelectAreasResponse
namespace SkipArea {
enum class Fields : uint8_t
{
+ kSkippedArea = 0,
};
struct Type
@@ -28553,6 +28573,8 @@
static constexpr CommandId GetCommandId() { return Commands::SkipArea::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; }
+ uint32_t skippedArea = static_cast<uint32_t>(0);
+
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = Clusters::ServiceArea::Commands::SkipAreaResponse::DecodableType;
@@ -28566,6 +28588,7 @@
static constexpr CommandId GetCommandId() { return Commands::SkipArea::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; }
+ uint32_t skippedArea = static_cast<uint32_t>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace SkipArea
@@ -28584,7 +28607,7 @@
static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; }
SkipAreaStatus status = static_cast<SkipAreaStatus>(0);
- Optional<chip::CharSpan> statusText;
+ chip::CharSpan statusText;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
@@ -28600,7 +28623,7 @@
static constexpr ClusterId GetClusterId() { return Clusters::ServiceArea::Id; }
SkipAreaStatus status = static_cast<SkipAreaStatus>(0);
- Optional<chip::CharSpan> statusText;
+ chip::CharSpan statusText;
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace SkipAreaResponse
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
index 3bd7961..85a45a0 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h
@@ -9429,6 +9429,7 @@
public:
ServiceAreaSkipArea(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("skip-area", credsIssuerConfig)
{
+ AddArgument("SkippedArea", 0, UINT32_MAX, &mRequest.skippedArea);
ClusterCommand::AddArguments();
}
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
index b57db00..d4f6756 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp
@@ -3975,6 +3975,38 @@
}
CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
+ chip::app::Clusters::ServiceArea::Structs::LandmarkInfoStruct::Type & request,
+ Json::Value & value)
+{
+ VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT);
+
+ // Copy to track which members we already processed.
+ Json::Value valueCopy(value);
+
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("LandmarkInfoStruct.landmarkTag", "landmarkTag", value.isMember("landmarkTag")));
+ ReturnErrorOnFailure(
+ ComplexArgumentParser::EnsureMemberExist("LandmarkInfoStruct.positionTag", "positionTag", value.isMember("positionTag")));
+
+ char labelWithMember[kMaxLabelLength];
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "landmarkTag");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.landmarkTag, value["landmarkTag"]));
+ valueCopy.removeMember("landmarkTag");
+
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "positionTag");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.positionTag, value["positionTag"]));
+ valueCopy.removeMember("positionTag");
+
+ return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
+}
+
+void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::LandmarkInfoStruct::Type & request)
+{
+ ComplexArgumentParser::Finalize(request.landmarkTag);
+ ComplexArgumentParser::Finalize(request.positionTag);
+}
+
+CHIP_ERROR ComplexArgumentParser::Setup(const char * label,
chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::Type & request,
Json::Value & value)
{
@@ -3986,28 +4018,16 @@
ReturnErrorOnFailure(
ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.locationInfo", "locationInfo", value.isMember("locationInfo")));
ReturnErrorOnFailure(
- ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.landmarkTag", "landmarkTag", value.isMember("landmarkTag")));
- ReturnErrorOnFailure(
- ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.positionTag", "positionTag", value.isMember("positionTag")));
- ReturnErrorOnFailure(
- ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.surfaceTag", "surfaceTag", value.isMember("surfaceTag")));
+ ComplexArgumentParser::EnsureMemberExist("AreaInfoStruct.landmarkInfo", "landmarkInfo", value.isMember("landmarkInfo")));
char labelWithMember[kMaxLabelLength];
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, "landmarkTag");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.landmarkTag, value["landmarkTag"]));
- valueCopy.removeMember("landmarkTag");
-
- snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "positionTag");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.positionTag, value["positionTag"]));
- valueCopy.removeMember("positionTag");
-
- snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "surfaceTag");
- ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.surfaceTag, value["surfaceTag"]));
- valueCopy.removeMember("surfaceTag");
+ snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "landmarkInfo");
+ ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.landmarkInfo, value["landmarkInfo"]));
+ valueCopy.removeMember("landmarkInfo");
return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy);
}
@@ -4015,9 +4035,7 @@
void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::Type & request)
{
ComplexArgumentParser::Finalize(request.locationInfo);
- ComplexArgumentParser::Finalize(request.landmarkTag);
- ComplexArgumentParser::Finalize(request.positionTag);
- ComplexArgumentParser::Finalize(request.surfaceTag);
+ ComplexArgumentParser::Finalize(request.landmarkInfo);
}
CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::AreaStruct::Type & request,
diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
index b08c731..dfca56f 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h
@@ -458,6 +458,11 @@
static void Finalize(chip::app::Clusters::DoorLock::Structs::CredentialStruct::Type & request);
+static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::LandmarkInfoStruct::Type & request,
+ Json::Value & value);
+
+static void Finalize(chip::app::Clusters::ServiceArea::Structs::LandmarkInfoStruct::Type & request);
+
static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::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 51f73a1..2eddf2f 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp
@@ -3516,18 +3516,10 @@
}
CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
- const chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::DecodableType & value)
+ const chip::app::Clusters::ServiceArea::Structs::LandmarkInfoStruct::DecodableType & value)
{
DataModelLogger::LogString(label, indent, "{");
{
- CHIP_ERROR err = LogValue("LocationInfo", indent + 1, value.locationInfo);
- if (err != CHIP_NO_ERROR)
- {
- DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LocationInfo'");
- return err;
- }
- }
- {
CHIP_ERROR err = LogValue("LandmarkTag", indent + 1, value.landmarkTag);
if (err != CHIP_NO_ERROR)
{
@@ -3543,11 +3535,28 @@
return err;
}
}
+ DataModelLogger::LogString(indent, "}");
+
+ return CHIP_NO_ERROR;
+}
+
+CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent,
+ const chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::DecodableType & value)
+{
+ DataModelLogger::LogString(label, indent, "{");
{
- CHIP_ERROR err = LogValue("SurfaceTag", indent + 1, value.surfaceTag);
+ CHIP_ERROR err = LogValue("LocationInfo", indent + 1, value.locationInfo);
if (err != CHIP_NO_ERROR)
{
- DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SurfaceTag'");
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LocationInfo'");
+ return err;
+ }
+ }
+ {
+ CHIP_ERROR err = LogValue("LandmarkInfo", indent + 1, value.landmarkInfo);
+ if (err != CHIP_NO_ERROR)
+ {
+ DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LandmarkInfo'");
return err;
}
}
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 fa3fc1a..60398d0 100644
--- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
+++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h
@@ -287,6 +287,9 @@
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::LandmarkInfoStruct::DecodableType & value);
+
+static CHIP_ERROR LogValue(const char * label, size_t indent,
const chip::app::Clusters::ServiceArea::Structs::AreaInfoStruct::DecodableType & value);
static CHIP_ERROR LogValue(const char * label, size_t indent,
diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
index 3ca43d8..67f8781 100644
--- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
+++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h
@@ -103950,6 +103950,9 @@
ServiceAreaSkipArea()
: ClusterCommand("skip-area")
{
+#if MTR_ENABLE_PROVISIONAL
+ AddArgument("SkippedArea", 0, UINT32_MAX, &mRequest.skippedArea);
+#endif // MTR_ENABLE_PROVISIONAL
ClusterCommand::AddArguments();
}
@@ -103964,6 +103967,9 @@
__auto_type * cluster = [[MTRBaseClusterServiceArea alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue];
__auto_type * params = [[MTRServiceAreaClusterSkipAreaParams alloc] init];
params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil;
+#if MTR_ENABLE_PROVISIONAL
+ params.skippedArea = [NSNumber numberWithUnsignedInt:mRequest.skippedArea];
+#endif // MTR_ENABLE_PROVISIONAL
uint16_t repeatCount = mRepeatCount.ValueOr(1);
uint16_t __block responsesNeeded = repeatCount;
while (repeatCount--) {
@@ -103990,6 +103996,7 @@
}
private:
+ chip::app::Clusters::ServiceArea::Commands::SkipArea::Type mRequest;
};
#endif // MTR_ENABLE_PROVISIONAL