diff --git a/examples/rvc-app/linux/RvcAppCommandDelegate.cpp b/examples/rvc-app/linux/RvcAppCommandDelegate.cpp index 791df4d482cfe8..187997f9f8bf00 100644 --- a/examples/rvc-app/linux/RvcAppCommandDelegate.cpp +++ b/examples/rvc-app/linux/RvcAppCommandDelegate.cpp @@ -216,9 +216,9 @@ void RvcAppCommandHandler::OnAddServiceAreaArea(Json::Value jsonValue) if (jsonValue.isMember("LandmarkTag")) { DataModel::Nullable relativePositionTag = DataModel::NullNullable; - if (jsonValue.isMember("PositionTag")) + if (jsonValue.isMember("RelativePositionTag")) { - relativePositionTag = Globals::RelativePositionTag(jsonValue["PositionTag"].asUInt()); + relativePositionTag = Globals::RelativePositionTag(jsonValue["RelativePositionTag"].asUInt()); } area.SetLandmarkInfo(Globals::LandmarkTag(jsonValue["LandmarkTag"].asUInt()), relativePositionTag); diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 4467c170acc6eb..29460e1f43c7a1 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1458,7 +1458,7 @@ provisional cluster ServiceArea = 336 { struct LandmarkInfoStruct { LandmarkTag landmarkTag = 0; - nullable RelativePositionTag positionTag = 1; + nullable RelativePositionTag relativePositionTag = 1; } struct AreaInfoStruct { @@ -1469,7 +1469,7 @@ provisional cluster ServiceArea = 336 { struct AreaStruct { int32u areaID = 0; nullable int32u mapID = 1; - AreaInfoStruct areaDesc = 2; + AreaInfoStruct areaInfo = 2; } struct MapStruct { 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 69a392a874f49d..470cd09c02b67d 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 @@ -68,8 +68,8 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: { areaID = aOther.areaID; mapID = aOther.mapID; - SetLocationInfo(aOther.areaDesc.locationInfo); - SetLandmarkInfo(aOther.areaDesc.landmarkInfo); + SetLocationInfo(aOther.areaInfo.locationInfo); + SetLandmarkInfo(aOther.areaInfo.landmarkInfo); return *this; } @@ -95,7 +95,7 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: AreaStructureWrapper & SetLocationInfoNull() { - areaDesc.locationInfo.SetNull(); + areaInfo.locationInfo.SetNull(); return *this; } @@ -108,15 +108,15 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: AreaStructureWrapper & SetLocationInfo(const CharSpan & locationName, const DataModel::Nullable & floorNumber, const DataModel::Nullable & areaType) { - areaDesc.locationInfo.SetNonNull(); + areaInfo.locationInfo.SetNonNull(); // Copy the name. If the name is larger than kAreaNameMaxSize, truncate it to fit. auto sizeToCopy = std::min(kAreaNameMaxSize, locationName.size()); memcpy(mAreaNameBuffer, locationName.data(), sizeToCopy); - areaDesc.locationInfo.Value().locationName = CharSpan(mAreaNameBuffer, sizeToCopy); + areaInfo.locationInfo.Value().locationName = CharSpan(mAreaNameBuffer, sizeToCopy); - areaDesc.locationInfo.Value().floorNumber = floorNumber; - areaDesc.locationInfo.Value().areaType = areaType; + areaInfo.locationInfo.Value().floorNumber = floorNumber; + areaInfo.locationInfo.Value().areaType = areaType; return *this; } @@ -138,7 +138,7 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: AreaStructureWrapper & SetLandmarkInfoNull() { - areaDesc.landmarkInfo.SetNull(); + areaInfo.landmarkInfo.SetNull(); return *this; } @@ -150,9 +150,9 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: AreaStructureWrapper & SetLandmarkInfo(const Globals::LandmarkTag & landmarkTag, const DataModel::Nullable & relativePositionTag) { - areaDesc.landmarkInfo.SetNonNull(); - areaDesc.landmarkInfo.Value().landmarkTag = landmarkTag; - areaDesc.landmarkInfo.Value().positionTag = relativePositionTag; + areaInfo.landmarkInfo.SetNonNull(); + areaInfo.landmarkInfo.Value().landmarkTag = landmarkTag; + areaInfo.landmarkInfo.Value().relativePositionTag = relativePositionTag; return *this; } @@ -167,7 +167,7 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: return SetLandmarkInfoNull(); } - return SetLandmarkInfo(landmarkInfo.Value().landmarkTag, landmarkInfo.Value().positionTag); + return SetLandmarkInfo(landmarkInfo.Value().landmarkTag, landmarkInfo.Value().relativePositionTag); } /** @@ -178,9 +178,9 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: */ bool IsNameEqual(const CharSpan & aAreaName) const { - if (!areaDesc.locationInfo.IsNull()) + if (!areaInfo.locationInfo.IsNull()) { - return areaDesc.locationInfo.Value().locationName.data_equal(aAreaName); + return areaInfo.locationInfo.Value().locationName.data_equal(aAreaName); } return false; @@ -215,43 +215,43 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: return false; } - if (areaDesc.locationInfo.IsNull() != aOther.areaDesc.locationInfo.IsNull()) + if (areaInfo.locationInfo.IsNull() != aOther.areaInfo.locationInfo.IsNull()) { return false; } - if (!areaDesc.locationInfo.IsNull()) + if (!areaInfo.locationInfo.IsNull()) { - if (!IsNameEqual(aOther.areaDesc.locationInfo.Value().locationName)) + if (!IsNameEqual(aOther.areaInfo.locationInfo.Value().locationName)) { return false; } - if (areaDesc.locationInfo.Value().floorNumber != aOther.areaDesc.locationInfo.Value().floorNumber) + if (areaInfo.locationInfo.Value().floorNumber != aOther.areaInfo.locationInfo.Value().floorNumber) { return false; } - if (areaDesc.locationInfo.Value().areaType != aOther.areaDesc.locationInfo.Value().areaType) + if (areaInfo.locationInfo.Value().areaType != aOther.areaInfo.locationInfo.Value().areaType) { return false; } } - if (areaDesc.landmarkInfo.IsNull() != aOther.areaDesc.landmarkInfo.IsNull()) + if (areaInfo.landmarkInfo.IsNull() != aOther.areaInfo.landmarkInfo.IsNull()) { return false; } - if (!areaDesc.landmarkInfo.IsNull()) + if (!areaInfo.landmarkInfo.IsNull()) { - if (areaDesc.landmarkInfo.Value().landmarkTag != aOther.areaDesc.landmarkInfo.Value().landmarkTag) + if (areaInfo.landmarkInfo.Value().landmarkTag != aOther.areaInfo.landmarkInfo.Value().landmarkTag) { return false; } - if (areaDesc.landmarkInfo.Value().positionTag != aOther.areaDesc.landmarkInfo.Value().positionTag) + if (areaInfo.landmarkInfo.Value().relativePositionTag != aOther.areaInfo.landmarkInfo.Value().relativePositionTag) { return false; } @@ -265,12 +265,12 @@ struct AreaStructureWrapper : public chip::app::Clusters::ServiceArea::Structs:: */ CharSpan GetName() { - if (areaDesc.locationInfo.IsNull()) + if (areaInfo.locationInfo.IsNull()) { return { mAreaNameBuffer, 0 }; } - return areaDesc.locationInfo.Value().locationName; + return areaInfo.locationInfo.Value().locationName; } private: 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 baf56cd4fc84be..2f2efceddd903d 100644 --- a/src/app/clusters/service-area-server/service-area-server.cpp +++ b/src/app/clusters/service-area-server/service-area-server.cpp @@ -442,7 +442,7 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea) { // 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 (aArea.areaDesc.locationInfo.IsNull() && aArea.areaDesc.landmarkInfo.IsNull()) + if (aArea.areaInfo.locationInfo.IsNull() && aArea.areaInfo.landmarkInfo.IsNull()) { ChipLogDetail(Zcl, "IsValidAsSupportedArea %" PRIu32 " - must have locationInfo and/or LandmarkInfo", aArea.areaID); return false; @@ -450,10 +450,10 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea) // 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 (!aArea.areaDesc.locationInfo.IsNull()) + if (!aArea.areaInfo.locationInfo.IsNull()) { - if (aArea.areaDesc.locationInfo.Value().locationName.empty() && aArea.areaDesc.locationInfo.Value().floorNumber.IsNull() && - aArea.areaDesc.locationInfo.Value().areaType.IsNull() && aArea.areaDesc.landmarkInfo.IsNull()) + if (aArea.areaInfo.locationInfo.Value().locationName.empty() && aArea.areaInfo.locationInfo.Value().floorNumber.IsNull() && + aArea.areaInfo.locationInfo.Value().areaType.IsNull() && aArea.areaInfo.landmarkInfo.IsNull()) { ChipLogDetail( Zcl, "IsValidAsSupportedArea %" PRIu32 " - AreaName is empty string, FloorNumber, AreaType, LandmarkInfo are 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 e2f0199209d4eb..e4457c3745e2a7 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 @@ -20,8 +20,8 @@ limitations under the License. Data types - - + + @@ -40,7 +40,7 @@ limitations under the License. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 52f43c048aed14..ede6f1117ed37f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -6483,7 +6483,7 @@ provisional cluster ServiceArea = 336 { struct LandmarkInfoStruct { LandmarkTag landmarkTag = 0; - nullable RelativePositionTag positionTag = 1; + nullable RelativePositionTag relativePositionTag = 1; } struct AreaInfoStruct { @@ -6494,7 +6494,7 @@ provisional cluster ServiceArea = 336 { struct AreaStruct { int32u areaID = 0; nullable int32u mapID = 1; - AreaInfoStruct areaDesc = 2; + AreaInfoStruct areaInfo = 2; } struct MapStruct { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 70e9ba6b1c6ef9..7ee8a88f80f64b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -9294,22 +9294,22 @@ public String toString() { } public static class ServiceAreaClusterLandmarkInfoStruct { public Integer landmarkTag; - public @Nullable Integer positionTag; + public @Nullable Integer relativePositionTag; private static final long LANDMARK_TAG_ID = 0L; - private static final long POSITION_TAG_ID = 1L; + private static final long RELATIVE_POSITION_TAG_ID = 1L; public ServiceAreaClusterLandmarkInfoStruct( Integer landmarkTag, - @Nullable Integer positionTag + @Nullable Integer relativePositionTag ) { this.landmarkTag = landmarkTag; - this.positionTag = positionTag; + this.relativePositionTag = relativePositionTag; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); 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(RELATIVE_POSITION_TAG_ID, relativePositionTag != null ? new UIntType(relativePositionTag) : new NullType())); return new StructType(values); } @@ -9319,23 +9319,23 @@ public static ServiceAreaClusterLandmarkInfoStruct decodeTlv(BaseTLVType tlvValu return null; } Integer landmarkTag = null; - @Nullable Integer positionTag = null; + @Nullable Integer relativePositionTag = null; for (StructElement element: ((StructType)tlvValue).value()) { 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); } - } else if (element.contextTagNum() == POSITION_TAG_ID) { + } else if (element.contextTagNum() == RELATIVE_POSITION_TAG_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - positionTag = castingValue.value(Integer.class); + relativePositionTag = castingValue.value(Integer.class); } } } return new ServiceAreaClusterLandmarkInfoStruct( landmarkTag, - positionTag + relativePositionTag ); } @@ -9346,8 +9346,8 @@ public String toString() { output.append("\tlandmarkTag: "); output.append(landmarkTag); output.append("\n"); - output.append("\tpositionTag: "); - output.append(positionTag); + output.append("\trelativePositionTag: "); + output.append(relativePositionTag); output.append("\n"); output.append("}\n"); return output.toString(); @@ -9417,26 +9417,26 @@ public String toString() { public static class ServiceAreaClusterAreaStruct { public Long areaID; public @Nullable Long mapID; - public ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc; + public ChipStructs.ServiceAreaClusterAreaInfoStruct areaInfo; private static final long AREA_ID_ID = 0L; private static final long MAP_ID_ID = 1L; - private static final long AREA_DESC_ID = 2L; + private static final long AREA_INFO_ID = 2L; public ServiceAreaClusterAreaStruct( Long areaID, @Nullable Long mapID, - ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc + ChipStructs.ServiceAreaClusterAreaInfoStruct areaInfo ) { this.areaID = areaID; this.mapID = mapID; - this.areaDesc = areaDesc; + this.areaInfo = areaInfo; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(AREA_ID_ID, new UIntType(areaID))); values.add(new StructElement(MAP_ID_ID, mapID != null ? new UIntType(mapID) : new NullType())); - values.add(new StructElement(AREA_DESC_ID, areaDesc.encodeTlv())); + values.add(new StructElement(AREA_INFO_ID, areaInfo.encodeTlv())); return new StructType(values); } @@ -9447,7 +9447,7 @@ public static ServiceAreaClusterAreaStruct decodeTlv(BaseTLVType tlvValue) { } Long areaID = null; @Nullable Long mapID = null; - ChipStructs.ServiceAreaClusterAreaInfoStruct areaDesc = null; + ChipStructs.ServiceAreaClusterAreaInfoStruct areaInfo = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == AREA_ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -9459,17 +9459,17 @@ public static ServiceAreaClusterAreaStruct decodeTlv(BaseTLVType tlvValue) { UIntType castingValue = element.value(UIntType.class); mapID = castingValue.value(Long.class); } - } else if (element.contextTagNum() == AREA_DESC_ID) { + } else if (element.contextTagNum() == AREA_INFO_ID) { if (element.value(BaseTLVType.class).type() == TLVType.Struct) { StructType castingValue = element.value(StructType.class); - areaDesc = ChipStructs.ServiceAreaClusterAreaInfoStruct.decodeTlv(castingValue); + areaInfo = ChipStructs.ServiceAreaClusterAreaInfoStruct.decodeTlv(castingValue); } } } return new ServiceAreaClusterAreaStruct( areaID, mapID, - areaDesc + areaInfo ); } @@ -9483,8 +9483,8 @@ public String toString() { output.append("\tmapID: "); output.append(mapID); output.append("\n"); - output.append("\tareaDesc: "); - output.append(areaDesc); + output.append("\tareaInfo: "); + output.append(areaInfo); output.append("\n"); output.append("}\n"); return output.toString(); 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 fc6405a96c2f7c..a5df845ac9c123 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 @@ -25,13 +25,13 @@ import matter.tlv.TlvWriter class ServiceAreaClusterAreaStruct( val areaID: ULong, val mapID: ULong?, - val areaDesc: ServiceAreaClusterAreaInfoStruct, + val areaInfo: ServiceAreaClusterAreaInfoStruct, ) { override fun toString(): String = buildString { append("ServiceAreaClusterAreaStruct {\n") append("\tareaID : $areaID\n") append("\tmapID : $mapID\n") - append("\tareaDesc : $areaDesc\n") + append("\tareaInfo : $areaInfo\n") append("}\n") } @@ -44,7 +44,7 @@ class ServiceAreaClusterAreaStruct( } else { putNull(ContextSpecificTag(TAG_MAP_ID)) } - areaDesc.toTlv(ContextSpecificTag(TAG_AREA_DESC), this) + areaInfo.toTlv(ContextSpecificTag(TAG_AREA_INFO), this) endStructure() } } @@ -52,7 +52,7 @@ class ServiceAreaClusterAreaStruct( companion object { private const val TAG_AREA_ID = 0 private const val TAG_MAP_ID = 1 - private const val TAG_AREA_DESC = 2 + private const val TAG_AREA_INFO = 2 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaStruct { tlvReader.enterStructure(tlvTag) @@ -64,12 +64,12 @@ class ServiceAreaClusterAreaStruct( tlvReader.getNull(ContextSpecificTag(TAG_MAP_ID)) null } - val areaDesc = - ServiceAreaClusterAreaInfoStruct.fromTlv(ContextSpecificTag(TAG_AREA_DESC), tlvReader) + val areaInfo = + ServiceAreaClusterAreaInfoStruct.fromTlv(ContextSpecificTag(TAG_AREA_INFO), tlvReader) tlvReader.exitContainer() - return ServiceAreaClusterAreaStruct(areaID, mapID, areaDesc) + return ServiceAreaClusterAreaStruct(areaID, mapID, areaInfo) } } } 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 index 04970798a28433..adf51e8e7c3f39 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt @@ -22,11 +22,11 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UInt, val positionTag: UInt?) { +class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UInt, val relativePositionTag: UInt?) { override fun toString(): String = buildString { append("ServiceAreaClusterLandmarkInfoStruct {\n") append("\tlandmarkTag : $landmarkTag\n") - append("\tpositionTag : $positionTag\n") + append("\trelativePositionTag : $relativePositionTag\n") append("}\n") } @@ -34,10 +34,10 @@ class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UInt, val positionTa tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag) - if (positionTag != null) { - put(ContextSpecificTag(TAG_POSITION_TAG), positionTag) + if (relativePositionTag != null) { + put(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG), relativePositionTag) } else { - putNull(ContextSpecificTag(TAG_POSITION_TAG)) + putNull(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG)) } endStructure() } @@ -45,22 +45,22 @@ class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UInt, val positionTa companion object { private const val TAG_LANDMARK_TAG = 0 - private const val TAG_POSITION_TAG = 1 + private const val TAG_RELATIVE_POSITION_TAG = 1 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLandmarkInfoStruct { tlvReader.enterStructure(tlvTag) val landmarkTag = tlvReader.getUInt(ContextSpecificTag(TAG_LANDMARK_TAG)) - val positionTag = + val relativePositionTag = if (!tlvReader.isNull()) { - tlvReader.getUInt(ContextSpecificTag(TAG_POSITION_TAG)) + tlvReader.getUInt(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG)) } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG)) + tlvReader.getNull(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG)) null } tlvReader.exitContainer() - return ServiceAreaClusterLandmarkInfoStruct(landmarkTag, positionTag) + return ServiceAreaClusterLandmarkInfoStruct(landmarkTag, relativePositionTag) } } } 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 d310fe5c315bf8..952623c2cf0215 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 @@ -25,13 +25,13 @@ import matter.tlv.TlvWriter class ServiceAreaClusterAreaStruct( val areaID: UInt, val mapID: UInt?, - val areaDesc: ServiceAreaClusterAreaInfoStruct, + val areaInfo: ServiceAreaClusterAreaInfoStruct, ) { override fun toString(): String = buildString { append("ServiceAreaClusterAreaStruct {\n") append("\tareaID : $areaID\n") append("\tmapID : $mapID\n") - append("\tareaDesc : $areaDesc\n") + append("\tareaInfo : $areaInfo\n") append("}\n") } @@ -44,7 +44,7 @@ class ServiceAreaClusterAreaStruct( } else { putNull(ContextSpecificTag(TAG_MAP_ID)) } - areaDesc.toTlv(ContextSpecificTag(TAG_AREA_DESC), this) + areaInfo.toTlv(ContextSpecificTag(TAG_AREA_INFO), this) endStructure() } } @@ -52,7 +52,7 @@ class ServiceAreaClusterAreaStruct( companion object { private const val TAG_AREA_ID = 0 private const val TAG_MAP_ID = 1 - private const val TAG_AREA_DESC = 2 + private const val TAG_AREA_INFO = 2 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterAreaStruct { tlvReader.enterStructure(tlvTag) @@ -64,12 +64,12 @@ class ServiceAreaClusterAreaStruct( tlvReader.getNull(ContextSpecificTag(TAG_MAP_ID)) null } - val areaDesc = - ServiceAreaClusterAreaInfoStruct.fromTlv(ContextSpecificTag(TAG_AREA_DESC), tlvReader) + val areaInfo = + ServiceAreaClusterAreaInfoStruct.fromTlv(ContextSpecificTag(TAG_AREA_INFO), tlvReader) tlvReader.exitContainer() - return ServiceAreaClusterAreaStruct(areaID, mapID, areaDesc) + return ServiceAreaClusterAreaStruct(areaID, mapID, areaInfo) } } } 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 index 119667c339d88c..84d369e9a82498 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ServiceAreaClusterLandmarkInfoStruct.kt @@ -22,11 +22,14 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UByte, val positionTag: UByte?) { +class ServiceAreaClusterLandmarkInfoStruct( + val landmarkTag: UByte, + val relativePositionTag: UByte?, +) { override fun toString(): String = buildString { append("ServiceAreaClusterLandmarkInfoStruct {\n") append("\tlandmarkTag : $landmarkTag\n") - append("\tpositionTag : $positionTag\n") + append("\trelativePositionTag : $relativePositionTag\n") append("}\n") } @@ -34,10 +37,10 @@ class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UByte, val positionT tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_LANDMARK_TAG), landmarkTag) - if (positionTag != null) { - put(ContextSpecificTag(TAG_POSITION_TAG), positionTag) + if (relativePositionTag != null) { + put(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG), relativePositionTag) } else { - putNull(ContextSpecificTag(TAG_POSITION_TAG)) + putNull(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG)) } endStructure() } @@ -45,22 +48,22 @@ class ServiceAreaClusterLandmarkInfoStruct(val landmarkTag: UByte, val positionT companion object { private const val TAG_LANDMARK_TAG = 0 - private const val TAG_POSITION_TAG = 1 + private const val TAG_RELATIVE_POSITION_TAG = 1 fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ServiceAreaClusterLandmarkInfoStruct { tlvReader.enterStructure(tlvTag) val landmarkTag = tlvReader.getUByte(ContextSpecificTag(TAG_LANDMARK_TAG)) - val positionTag = + val relativePositionTag = if (!tlvReader.isNull()) { - tlvReader.getUByte(ContextSpecificTag(TAG_POSITION_TAG)) + tlvReader.getUByte(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG)) } else { - tlvReader.getNull(ContextSpecificTag(TAG_POSITION_TAG)) + tlvReader.getNull(ContextSpecificTag(TAG_RELATIVE_POSITION_TAG)) null } tlvReader.exitContainer() - return ServiceAreaClusterLandmarkInfoStruct(landmarkTag, positionTag) + return ServiceAreaClusterLandmarkInfoStruct(landmarkTag, relativePositionTag) } } } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index db775e5d52e5c6..cacd15683ab39b 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -28647,48 +28647,48 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_mapIDCtorSignature.c_str(), jninewElement_0_mapID, newElement_0_mapID); } - jobject newElement_0_areaDesc; - jobject newElement_0_areaDesc_locationInfo; - if (entry_0.areaDesc.locationInfo.IsNull()) + jobject newElement_0_areaInfo; + jobject newElement_0_areaInfo_locationInfo; + if (entry_0.areaInfo.locationInfo.IsNull()) { - newElement_0_areaDesc_locationInfo = nullptr; + newElement_0_areaInfo_locationInfo = nullptr; } else { - jobject newElement_0_areaDesc_locationInfo_locationName; + jobject newElement_0_areaInfo_locationInfo_locationName; LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF( - entry_0.areaDesc.locationInfo.Value().locationName, newElement_0_areaDesc_locationInfo_locationName)); - jobject newElement_0_areaDesc_locationInfo_floorNumber; - if (entry_0.areaDesc.locationInfo.Value().floorNumber.IsNull()) + entry_0.areaInfo.locationInfo.Value().locationName, newElement_0_areaInfo_locationInfo_locationName)); + jobject newElement_0_areaInfo_locationInfo_floorNumber; + if (entry_0.areaInfo.locationInfo.Value().floorNumber.IsNull()) { - newElement_0_areaDesc_locationInfo_floorNumber = nullptr; + newElement_0_areaInfo_locationInfo_floorNumber = nullptr; } else { - std::string newElement_0_areaDesc_locationInfo_floorNumberClassName = "java/lang/Integer"; - std::string newElement_0_areaDesc_locationInfo_floorNumberCtorSignature = "(I)V"; - jint jninewElement_0_areaDesc_locationInfo_floorNumber = - static_cast(entry_0.areaDesc.locationInfo.Value().floorNumber.Value()); + std::string newElement_0_areaInfo_locationInfo_floorNumberClassName = "java/lang/Integer"; + std::string newElement_0_areaInfo_locationInfo_floorNumberCtorSignature = "(I)V"; + jint jninewElement_0_areaInfo_locationInfo_floorNumber = + static_cast(entry_0.areaInfo.locationInfo.Value().floorNumber.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_areaDesc_locationInfo_floorNumberClassName.c_str(), - newElement_0_areaDesc_locationInfo_floorNumberCtorSignature.c_str(), - jninewElement_0_areaDesc_locationInfo_floorNumber, newElement_0_areaDesc_locationInfo_floorNumber); + newElement_0_areaInfo_locationInfo_floorNumberClassName.c_str(), + newElement_0_areaInfo_locationInfo_floorNumberCtorSignature.c_str(), + jninewElement_0_areaInfo_locationInfo_floorNumber, newElement_0_areaInfo_locationInfo_floorNumber); } - jobject newElement_0_areaDesc_locationInfo_areaType; - if (entry_0.areaDesc.locationInfo.Value().areaType.IsNull()) + jobject newElement_0_areaInfo_locationInfo_areaType; + if (entry_0.areaInfo.locationInfo.Value().areaType.IsNull()) { - newElement_0_areaDesc_locationInfo_areaType = nullptr; + newElement_0_areaInfo_locationInfo_areaType = nullptr; } else { - std::string newElement_0_areaDesc_locationInfo_areaTypeClassName = "java/lang/Integer"; - std::string newElement_0_areaDesc_locationInfo_areaTypeCtorSignature = "(I)V"; - jint jninewElement_0_areaDesc_locationInfo_areaType = - static_cast(entry_0.areaDesc.locationInfo.Value().areaType.Value()); + std::string newElement_0_areaInfo_locationInfo_areaTypeClassName = "java/lang/Integer"; + std::string newElement_0_areaInfo_locationInfo_areaTypeCtorSignature = "(I)V"; + jint jninewElement_0_areaInfo_locationInfo_areaType = + static_cast(entry_0.areaInfo.locationInfo.Value().areaType.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_areaDesc_locationInfo_areaTypeClassName.c_str(), - newElement_0_areaDesc_locationInfo_areaTypeCtorSignature.c_str(), - jninewElement_0_areaDesc_locationInfo_areaType, newElement_0_areaDesc_locationInfo_areaType); + newElement_0_areaInfo_locationInfo_areaTypeClassName.c_str(), + newElement_0_areaInfo_locationInfo_areaTypeCtorSignature.c_str(), + jninewElement_0_areaInfo_locationInfo_areaType, newElement_0_areaInfo_locationInfo_areaType); } jclass locationDescriptorStructStructClass_4; @@ -28711,42 +28711,43 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - newElement_0_areaDesc_locationInfo = + newElement_0_areaInfo_locationInfo = env->NewObject(locationDescriptorStructStructClass_4, locationDescriptorStructStructCtor_4, - newElement_0_areaDesc_locationInfo_locationName, - newElement_0_areaDesc_locationInfo_floorNumber, newElement_0_areaDesc_locationInfo_areaType); + newElement_0_areaInfo_locationInfo_locationName, + newElement_0_areaInfo_locationInfo_floorNumber, newElement_0_areaInfo_locationInfo_areaType); } - jobject newElement_0_areaDesc_landmarkInfo; - if (entry_0.areaDesc.landmarkInfo.IsNull()) + jobject newElement_0_areaInfo_landmarkInfo; + if (entry_0.areaInfo.landmarkInfo.IsNull()) { - newElement_0_areaDesc_landmarkInfo = nullptr; + newElement_0_areaInfo_landmarkInfo = nullptr; } else { - 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(entry_0.areaDesc.landmarkInfo.Value().landmarkTag); + jobject newElement_0_areaInfo_landmarkInfo_landmarkTag; + std::string newElement_0_areaInfo_landmarkInfo_landmarkTagClassName = "java/lang/Integer"; + std::string newElement_0_areaInfo_landmarkInfo_landmarkTagCtorSignature = "(I)V"; + jint jninewElement_0_areaInfo_landmarkInfo_landmarkTag = + static_cast(entry_0.areaInfo.landmarkInfo.Value().landmarkTag); chip::JniReferences::GetInstance().CreateBoxedObject( - 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_areaInfo_landmarkInfo_landmarkTagClassName.c_str(), + newElement_0_areaInfo_landmarkInfo_landmarkTagCtorSignature.c_str(), + jninewElement_0_areaInfo_landmarkInfo_landmarkTag, newElement_0_areaInfo_landmarkInfo_landmarkTag); + jobject newElement_0_areaInfo_landmarkInfo_relativePositionTag; + if (entry_0.areaInfo.landmarkInfo.Value().relativePositionTag.IsNull()) { - newElement_0_areaDesc_landmarkInfo_positionTag = nullptr; + newElement_0_areaInfo_landmarkInfo_relativePositionTag = 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(entry_0.areaDesc.landmarkInfo.Value().positionTag.Value()); + std::string newElement_0_areaInfo_landmarkInfo_relativePositionTagClassName = "java/lang/Integer"; + std::string newElement_0_areaInfo_landmarkInfo_relativePositionTagCtorSignature = "(I)V"; + jint jninewElement_0_areaInfo_landmarkInfo_relativePositionTag = + static_cast(entry_0.areaInfo.landmarkInfo.Value().relativePositionTag.Value()); chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_areaDesc_landmarkInfo_positionTagClassName.c_str(), - newElement_0_areaDesc_landmarkInfo_positionTagCtorSignature.c_str(), - jninewElement_0_areaDesc_landmarkInfo_positionTag, newElement_0_areaDesc_landmarkInfo_positionTag); + newElement_0_areaInfo_landmarkInfo_relativePositionTagClassName.c_str(), + newElement_0_areaInfo_landmarkInfo_relativePositionTagCtorSignature.c_str(), + jninewElement_0_areaInfo_landmarkInfo_relativePositionTag, + newElement_0_areaInfo_landmarkInfo_relativePositionTag); } jclass landmarkInfoStructStructClass_4; @@ -28769,9 +28770,9 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - newElement_0_areaDesc_landmarkInfo = env->NewObject( + newElement_0_areaInfo_landmarkInfo = env->NewObject( landmarkInfoStructStructClass_4, landmarkInfoStructStructCtor_4, - newElement_0_areaDesc_landmarkInfo_landmarkTag, newElement_0_areaDesc_landmarkInfo_positionTag); + newElement_0_areaInfo_landmarkInfo_landmarkTag, newElement_0_areaInfo_landmarkInfo_relativePositionTag); } jclass areaInfoStructStructClass_2; @@ -28795,8 +28796,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } - newElement_0_areaDesc = env->NewObject(areaInfoStructStructClass_2, areaInfoStructStructCtor_2, - newElement_0_areaDesc_locationInfo, newElement_0_areaDesc_landmarkInfo); + newElement_0_areaInfo = env->NewObject(areaInfoStructStructClass_2, areaInfoStructStructCtor_2, + newElement_0_areaInfo_locationInfo, newElement_0_areaInfo_landmarkInfo); jclass areaStructStructClass_1; err = chip::JniReferences::GetInstance().GetLocalClassRef( @@ -28819,7 +28820,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } newElement_0 = env->NewObject(areaStructStructClass_1, areaStructStructCtor_1, newElement_0_areaID, - newElement_0_mapID, newElement_0_areaDesc); + newElement_0_mapID, newElement_0_areaInfo); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 624f42c8e80088..391765f3838e7b 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -31392,11 +31392,11 @@ 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]), + ClusterObjectFieldDescriptor(Label="relativePositionTag", Tag=1, Type=typing.Union[Nullable, Globals.Enums.RelativePositionTag]), ]) landmarkTag: 'Globals.Enums.LandmarkTag' = 0 - positionTag: 'typing.Union[Nullable, Globals.Enums.RelativePositionTag]' = NullValue + relativePositionTag: 'typing.Union[Nullable, Globals.Enums.RelativePositionTag]' = NullValue @dataclass class AreaInfoStruct(ClusterObject): @@ -31419,12 +31419,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ClusterObjectFieldDescriptor(Label="areaID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="mapID", Tag=1, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="areaDesc", Tag=2, Type=ServiceArea.Structs.AreaInfoStruct), + ClusterObjectFieldDescriptor(Label="areaInfo", Tag=2, Type=ServiceArea.Structs.AreaInfoStruct), ]) areaID: 'uint' = 0 mapID: 'typing.Union[Nullable, uint]' = NullValue - areaDesc: 'ServiceArea.Structs.AreaInfoStruct' = field(default_factory=lambda: ServiceArea.Structs.AreaInfoStruct()) + areaInfo: 'ServiceArea.Structs.AreaInfoStruct' = field(default_factory=lambda: ServiceArea.Structs.AreaInfoStruct()) @dataclass class MapStruct(ClusterObject): diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 472a630d93df68..4b0e0bb96389b3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -11197,37 +11197,37 @@ static id _Nullable DecodeAttributeValueForServiceAreaCluster(AttributeId aAttri } else { newElement_0.mapID = [NSNumber numberWithUnsignedInt:entry_0.mapID.Value()]; } - newElement_0.areaDesc = [MTRServiceAreaClusterAreaInfoStruct new]; - if (entry_0.areaDesc.locationInfo.IsNull()) { - newElement_0.areaDesc.locationInfo = nil; + newElement_0.areaInfo = [MTRServiceAreaClusterAreaInfoStruct new]; + if (entry_0.areaInfo.locationInfo.IsNull()) { + newElement_0.areaInfo.locationInfo = nil; } else { - newElement_0.areaDesc.locationInfo = [MTRDataTypeLocationDescriptorStruct new]; - newElement_0.areaDesc.locationInfo.locationName = AsString(entry_0.areaDesc.locationInfo.Value().locationName); - if (newElement_0.areaDesc.locationInfo.locationName == nil) { + newElement_0.areaInfo.locationInfo = [MTRDataTypeLocationDescriptorStruct new]; + newElement_0.areaInfo.locationInfo.locationName = AsString(entry_0.areaInfo.locationInfo.Value().locationName); + if (newElement_0.areaInfo.locationInfo.locationName == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } - if (entry_0.areaDesc.locationInfo.Value().floorNumber.IsNull()) { - newElement_0.areaDesc.locationInfo.floorNumber = nil; + if (entry_0.areaInfo.locationInfo.Value().floorNumber.IsNull()) { + newElement_0.areaInfo.locationInfo.floorNumber = nil; } else { - newElement_0.areaDesc.locationInfo.floorNumber = [NSNumber numberWithShort:entry_0.areaDesc.locationInfo.Value().floorNumber.Value()]; + newElement_0.areaInfo.locationInfo.floorNumber = [NSNumber numberWithShort:entry_0.areaInfo.locationInfo.Value().floorNumber.Value()]; } - if (entry_0.areaDesc.locationInfo.Value().areaType.IsNull()) { - newElement_0.areaDesc.locationInfo.areaType = nil; + if (entry_0.areaInfo.locationInfo.Value().areaType.IsNull()) { + newElement_0.areaInfo.locationInfo.areaType = nil; } else { - newElement_0.areaDesc.locationInfo.areaType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.locationInfo.Value().areaType.Value())]; + newElement_0.areaInfo.locationInfo.areaType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaInfo.locationInfo.Value().areaType.Value())]; } } - if (entry_0.areaDesc.landmarkInfo.IsNull()) { - newElement_0.areaDesc.landmarkInfo = nil; + if (entry_0.areaInfo.landmarkInfo.IsNull()) { + newElement_0.areaInfo.landmarkInfo = nil; } else { - 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; + newElement_0.areaInfo.landmarkInfo = [MTRServiceAreaClusterLandmarkInfoStruct new]; + newElement_0.areaInfo.landmarkInfo.landmarkTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaInfo.landmarkInfo.Value().landmarkTag)]; + if (entry_0.areaInfo.landmarkInfo.Value().relativePositionTag.IsNull()) { + newElement_0.areaInfo.landmarkInfo.relativePositionTag = nil; } else { - newElement_0.areaDesc.landmarkInfo.positionTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaDesc.landmarkInfo.Value().positionTag.Value())]; + newElement_0.areaInfo.landmarkInfo.relativePositionTag = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.areaInfo.landmarkInfo.Value().relativePositionTag.Value())]; } } [array_0 addObject:newElement_0]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 35df5cc3e32495..fac8e1bdf7afe8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1615,7 +1615,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_PROVISIONALLY_AVAILABLE @interface MTRServiceAreaClusterLandmarkInfoStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull landmarkTag MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nullable positionTag MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable relativePositionTag MTR_PROVISIONALLY_AVAILABLE; @end MTR_PROVISIONALLY_AVAILABLE @@ -1628,7 +1628,7 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRServiceAreaClusterAreaStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull areaID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable mapID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) MTRServiceAreaClusterAreaInfoStruct * _Nonnull areaDesc MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) MTRServiceAreaClusterAreaInfoStruct * _Nonnull areaInfo 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 6c3fc19e9b68bf..f24ca05abfb4eb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -6739,7 +6739,7 @@ - (instancetype)init _landmarkTag = @(0); - _positionTag = nil; + _relativePositionTag = nil; } return self; } @@ -6749,14 +6749,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone auto other = [[MTRServiceAreaClusterLandmarkInfoStruct alloc] init]; other.landmarkTag = self.landmarkTag; - other.positionTag = self.positionTag; + other.relativePositionTag = self.relativePositionTag; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: landmarkTag:%@; positionTag:%@; >", NSStringFromClass([self class]), _landmarkTag, _positionTag]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: landmarkTag:%@; relativePositionTag:%@; >", NSStringFromClass([self class]), _landmarkTag, _relativePositionTag]; return descriptionString; } @@ -6801,7 +6801,7 @@ - (instancetype)init _mapID = nil; - _areaDesc = [MTRServiceAreaClusterAreaInfoStruct new]; + _areaInfo = [MTRServiceAreaClusterAreaInfoStruct new]; } return self; } @@ -6812,14 +6812,14 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.areaID = self.areaID; other.mapID = self.mapID; - other.areaDesc = self.areaDesc; + other.areaInfo = self.areaInfo; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: areaID:%@; mapID:%@; areaDesc:%@; >", NSStringFromClass([self class]), _areaID, _mapID, _areaDesc]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: areaID:%@; mapID:%@; areaInfo:%@; >", NSStringFromClass([self class]), _areaID, _mapID, _areaInfo]; return descriptionString; } diff --git a/src/python_testing/TC_SEAR_1_2.py b/src/python_testing/TC_SEAR_1_2.py index 083533277a5e6d..c21e831464557e 100644 --- a/src/python_testing/TC_SEAR_1_2.py +++ b/src/python_testing/TC_SEAR_1_2.py @@ -80,7 +80,7 @@ async def read_and_validate_supported_areas(self, step): asserts.assert_less_equal(len(supported_areas), 255, "SupportedAreas should have max 255 entries") areaid_list = [] - areadesc_s = set() + areainfo_s = set() for a in supported_areas: asserts.assert_true(a.areaID not in areaid_list, "SupportedAreas must have unique AreaID values!") @@ -91,27 +91,27 @@ async def read_and_validate_supported_areas(self, step): f"SupportedAreas entry with AreaID({a.areaID}) should not have null MapID") asserts.assert_true(a.mapID in self.mapid_list, f"SupportedAreas entry with AreaID({a.areaID}) has unknown MapID({a.mapID})") - k = f"mapID:{a.mapID} areaDesc:{a.areaDesc}" - asserts.assert_true(k not in areadesc_s, - f"SupportedAreas must have unique MapID({a.mapID}) + AreaDesc({a.areaDesc}) values!") - areadesc_s.add(k) + k = f"mapID:{a.mapID} areaInfo:{a.areaInfo}" + asserts.assert_true(k not in areainfo_s, + f"SupportedAreas must have unique MapID({a.mapID}) + AreaInfo({a.areaInfo}) values!") + areainfo_s.add(k) else: # empty SupportedMaps asserts.assert_is(a.mapID, NullValue, f"SupportedAreas entry with AreaID({a.areaID}) should have null MapID") - k = f"areaDesc:{a.areaDesc}" - asserts.assert_true(k not in areadesc_s, f"SupportedAreas must have unique AreaDesc({a.areaDesc}) values!") - areadesc_s.add(k) + k = f"areaInfo:{a.areaInfo}" + asserts.assert_true(k not in areainfo_s, f"SupportedAreas must have unique AreaInfo({a.areaInfo}) values!") + areainfo_s.add(k) - if a.areaDesc.locationInfo is NullValue and a.areaDesc.landmarkInfo is NullValue: + if a.areaInfo.locationInfo is NullValue and a.areaInfo.landmarkInfo is NullValue: asserts.assert_true( f"SupportedAreas entry with AreaID({a.areaID}) should not have null LocationInfo and null LandmarkInfo") - if a.areaDesc.landmarkInfo is not NullValue: - asserts.assert_true(a.areaDesc.landmarkInfo.landmarkTag <= self.MAX_LANDMARK_ID, - f"SupportedAreas entry with AreaID({a.areaID}) has invalid LandmarkTag({a.areaDesc.landmarkInfo.landmarkTag})") - asserts.assert_true(a.areaDesc.landmarkInfo.positionTag is NullValue or a - .areaDesc.landmarkInfo.positionTag in range(0, self.MAX_RELPOS_ID), - f"SupportedAreas entry with AreaID({a.areaID}) has invalid PositionTag({a.areaDesc.landmarkInfo.positionTag})") + if a.areaInfo.landmarkInfo is not NullValue: + asserts.assert_true(a.areaInfo.landmarkInfo.landmarkTag <= self.MAX_LANDMARK_ID, + f"SupportedAreas entry with AreaID({a.areaID}) has invalid LandmarkTag({a.areaInfo.landmarkInfo.landmarkTag})") + asserts.assert_true(a.areaInfo.landmarkInfo.relativePositionTag is NullValue or a + .areaInfo.landmarkInfo.relativePositionTag in range(0, self.MAX_RELPOS_ID), + f"SupportedAreas entry with AreaID({a.areaID}) has invalid RelativePositionTag({a.areaInfo.landmarkInfo.relativePositionTag})") # save so other methods can use this if needed self.areaid_list = areaid_list 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 20fdd126514076..c2a25ed9477c2e 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 @@ -20457,7 +20457,7 @@ 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); + encoder.Encode(to_underlying(Fields::kRelativePositionTag), relativePositionTag); return encoder.Finalize(); } @@ -20479,9 +20479,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, landmarkTag); } - else if (__context_tag == to_underlying(Fields::kPositionTag)) + else if (__context_tag == to_underlying(Fields::kRelativePositionTag)) { - err = DataModel::Decode(reader, positionTag); + err = DataModel::Decode(reader, relativePositionTag); } else { @@ -20540,7 +20540,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kAreaID), areaID); encoder.Encode(to_underlying(Fields::kMapID), mapID); - encoder.Encode(to_underlying(Fields::kAreaDesc), areaDesc); + encoder.Encode(to_underlying(Fields::kAreaInfo), areaInfo); return encoder.Finalize(); } @@ -20566,9 +20566,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, mapID); } - else if (__context_tag == to_underlying(Fields::kAreaDesc)) + else if (__context_tag == to_underlying(Fields::kAreaInfo)) { - err = DataModel::Decode(reader, areaDesc); + err = DataModel::Decode(reader, areaInfo); } else { 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 c2c1697ce271f3..fc62ada8bd3fcb 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 @@ -28428,15 +28428,15 @@ namespace Structs { namespace LandmarkInfoStruct { enum class Fields : uint8_t { - kLandmarkTag = 0, - kPositionTag = 1, + kLandmarkTag = 0, + kRelativePositionTag = 1, }; struct Type { public: Globals::LandmarkTag landmarkTag = static_cast(0); - DataModel::Nullable positionTag; + DataModel::Nullable relativePositionTag; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -28476,7 +28476,7 @@ enum class Fields : uint8_t { kAreaID = 0, kMapID = 1, - kAreaDesc = 2, + kAreaInfo = 2, }; struct Type @@ -28484,7 +28484,7 @@ struct Type public: uint32_t areaID = static_cast(0); DataModel::Nullable mapID; - Structs::AreaInfoStruct::Type areaDesc; + Structs::AreaInfoStruct::Type areaInfo; CHIP_ERROR Decode(TLV::TLVReader & reader); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 202a6efcb06a01..9a1062c23b40a0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -4052,17 +4052,17 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, ReturnErrorOnFailure( ComplexArgumentParser::EnsureMemberExist("LandmarkInfoStruct.landmarkTag", "landmarkTag", value.isMember("landmarkTag"))); - ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("LandmarkInfoStruct.positionTag", "positionTag", value.isMember("positionTag"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("LandmarkInfoStruct.relativePositionTag", "relativePositionTag", + value.isMember("relativePositionTag"))); 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"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "relativePositionTag"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.relativePositionTag, value["relativePositionTag"])); + valueCopy.removeMember("relativePositionTag"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } @@ -4070,7 +4070,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs::LandmarkInfoStruct::Type & request) { ComplexArgumentParser::Finalize(request.landmarkTag); - ComplexArgumentParser::Finalize(request.positionTag); + ComplexArgumentParser::Finalize(request.relativePositionTag); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, @@ -4115,7 +4115,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.areaID", "areaID", value.isMember("areaID"))); ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.mapID", "mapID", value.isMember("mapID"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.areaDesc", "areaDesc", value.isMember("areaDesc"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("AreaStruct.areaInfo", "areaInfo", value.isMember("areaInfo"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "areaID"); @@ -4126,9 +4126,9 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.mapID, value["mapID"])); valueCopy.removeMember("mapID"); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "areaDesc"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.areaDesc, value["areaDesc"])); - valueCopy.removeMember("areaDesc"); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "areaInfo"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.areaInfo, value["areaInfo"])); + valueCopy.removeMember("areaInfo"); return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } @@ -4137,7 +4137,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::ServiceArea::Structs:: { ComplexArgumentParser::Finalize(request.areaID); ComplexArgumentParser::Finalize(request.mapID); - ComplexArgumentParser::Finalize(request.areaDesc); + ComplexArgumentParser::Finalize(request.areaInfo); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ServiceArea::Structs::MapStruct::Type & request, 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 3d40f3897e852b..16248a7ca4e157 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -3586,10 +3586,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("PositionTag", indent + 1, value.positionTag); + CHIP_ERROR err = LogValue("RelativePositionTag", indent + 1, value.relativePositionTag); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PositionTag'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'RelativePositionTag'"); return err; } } @@ -3644,10 +3644,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("AreaDesc", indent + 1, value.areaDesc); + CHIP_ERROR err = LogValue("AreaInfo", indent + 1, value.areaInfo); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AreaDesc'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AreaInfo'"); return err; } }