Rename `src/util/message.cpp` to `src/util/strings.cpp` and add appropriate headers (#32379)
* Move things from message, update dependencies
* Fix lint
* Restyle
* Remove wrongly copied comment
* Add another dependency
* Vendor identifiers is not orphaned anymore
* Move strings to ember-strings to not have overlap in names
* Add include for the cpp file into its own header
* Standard ordering for attribute metadata cpp
* Update darwin framework xcode file
* Also move the copy string functions into ember strings. header af.h and implementation in util.cpp makes no sense
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index a5398cc..dca562c 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -123,12 +123,10 @@
--known-failure app/util/generic-callback-stubs.cpp \
--known-failure app/util/im-client-callbacks.h \
--known-failure app/util/MatterCallbacks.h \
- --known-failure app/util/message.cpp \
--known-failure app/util/odd-sized-integers.h \
--known-failure app/util/util.cpp \
--known-failure app/util/util.h \
--known-failure app/WriteHandler.h \
- --known-failure lib/core/CHIPVendorIdentifiers.hpp \
--known-failure platform/DeviceSafeQueue.cpp \
--known-failure platform/DeviceSafeQueue.h \
--known-failure platform/GLibTypeDeleter.h \
diff --git a/src/app/DefaultAttributePersistenceProvider.cpp b/src/app/DefaultAttributePersistenceProvider.cpp
index 3649770..5bef4c1 100644
--- a/src/app/DefaultAttributePersistenceProvider.cpp
+++ b/src/app/DefaultAttributePersistenceProvider.cpp
@@ -15,6 +15,7 @@
*/
#include <app/DefaultAttributePersistenceProvider.h>
+#include <app/util/ember-strings.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/DefaultStorageKeyAllocator.h>
#include <lib/support/SafeInt.h>
diff --git a/src/app/chip_data_model.cmake b/src/app/chip_data_model.cmake
index 610986a..6e84ce2 100644
--- a/src/app/chip_data_model.cmake
+++ b/src/app/chip_data_model.cmake
@@ -144,7 +144,6 @@
${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp
${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp
${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp
- ${CHIP_APP_BASE_DIR}/util/message.cpp
${CHIP_APP_BASE_DIR}/util/privilege-storage.cpp
${CHIP_APP_BASE_DIR}/util/util.cpp
${APP_GEN_FILES}
diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni
index 29c5f03..8131546 100644
--- a/src/app/chip_data_model.gni
+++ b/src/app/chip_data_model.gni
@@ -215,7 +215,6 @@
"${_app_root}/util/binding-table.cpp",
"${_app_root}/util/binding-table.h",
"${_app_root}/util/generic-callback-stubs.cpp",
- "${_app_root}/util/message.cpp",
"${_app_root}/util/privilege-storage.cpp",
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp",
]
@@ -418,8 +417,10 @@
":${_data_model_name}_codegen",
":${_data_model_name}_zapgen",
"${chip_root}/src/app",
+ "${chip_root}/src/app/common:attribute-type",
"${chip_root}/src/app/common:cluster-objects",
"${chip_root}/src/app/common:enums",
+ "${chip_root}/src/app/util:types",
"${chip_root}/src/controller",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
diff --git a/src/app/common/BUILD.gn b/src/app/common/BUILD.gn
index de7eef3..b1ad03e 100644
--- a/src/app/common/BUILD.gn
+++ b/src/app/common/BUILD.gn
@@ -18,6 +18,12 @@
include_dirs = [ "${chip_root}/zzz_generated/app-common" ]
}
+source_set("attribute-type") {
+ sources = [ "${chip_root}/zzz_generated/app-common/app-common/zap-generated/attribute-type.h" ]
+
+ public_configs = [ ":includes" ]
+}
+
source_set("ids") {
sources = [
"${chip_root}/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h",
diff --git a/src/app/util/BUILD.gn b/src/app/util/BUILD.gn
index 821ba51..e5e4d22 100644
--- a/src/app/util/BUILD.gn
+++ b/src/app/util/BUILD.gn
@@ -17,8 +17,18 @@
source_set("types") {
sources = [
+ "attribute-metadata.cpp",
"attribute-metadata.h",
"basic-types.h",
+ "ember-strings.cpp",
+ "ember-strings.h",
"types_stub.h",
]
+
+ deps = [
+ "${chip_root}/src/app/common:attribute-type",
+ "${chip_root}/src/lib/core:encoding",
+ "${chip_root}/src/lib/core:types",
+ ]
+ public_configs = [ "${chip_root}/src:includes" ]
}
diff --git a/src/app/util/af.h b/src/app/util/af.h
index f7f772a..1d42872 100644
--- a/src/app/util/af.h
+++ b/src/app/util/af.h
@@ -194,19 +194,6 @@
*/
bool emberAfIsTypeSigned(EmberAfAttributeType dataType);
-/*
- * @brief Function that copies a ZCL string type into a buffer. The size
- * parameter should indicate the maximum number of characters to copy to the
- * destination buffer not including the length byte.
- */
-void emberAfCopyString(uint8_t * dest, const uint8_t * src, size_t size);
-/*
- * @brief Function that copies a ZCL long string into a buffer. The size
- * parameter should indicate the maximum number of characters to copy to the
- * destination buffer not including the length bytes.
- */
-void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size);
-
/** @} END Attribute Storage */
/** @name Device Control */
diff --git a/src/app/util/attribute-metadata.cpp b/src/app/util/attribute-metadata.cpp
new file mode 100644
index 0000000..bf649a9
--- /dev/null
+++ b/src/app/util/attribute-metadata.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2024 Project CHIP Authors
+ * All rights reserved.
+ *
+ * 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.
+ */
+#include <app/util/attribute-metadata.h>
+
+#include <app-common/zap-generated/attribute-type.h>
+
+bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType)
+{
+ return (attributeType == ZCL_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
+}
+
+bool emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType)
+{
+ return (attributeType == ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE);
+}
diff --git a/src/app/util/attribute-metadata.h b/src/app/util/attribute-metadata.h
index 0f9c9b2..a380599 100644
--- a/src/app/util/attribute-metadata.h
+++ b/src/app/util/attribute-metadata.h
@@ -198,14 +198,3 @@
/** @brief Returns true if the given attribute type is a long string. */
bool emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType);
-
-/*
- * @brief Function that determines the length of a zigbee Cluster Library string
- * (where the first byte is assumed to be the length).
- */
-uint8_t emberAfStringLength(const uint8_t * buffer);
-/*
- * @brief Function that determines the length of a zigbee Cluster Library long string.
- * (where the first two bytes are assumed to be the length).
- */
-uint16_t emberAfLongStringLength(const uint8_t * buffer);
diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp
index 0b94cc8..35fd9ce 100644
--- a/src/app/util/attribute-storage.cpp
+++ b/src/app/util/attribute-storage.cpp
@@ -22,6 +22,7 @@
#include <app/reporting/reporting.h>
#include <app/util/af.h>
#include <app/util/config.h>
+#include <app/util/ember-strings.h>
#include <app/util/generic-callbacks.h>
#include <lib/core/CHIPConfig.h>
#include <lib/support/CodeUtils.h>
@@ -342,16 +343,6 @@
return (emAfEndpoints[index].bitmask.Has(EmberAfEndpointOptions::isEnabled));
}
-bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType)
-{
- return (attributeType == ZCL_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
-}
-
-bool emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType)
-{
- return (attributeType == ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE);
-}
-
bool emberAfIsThisDataTypeAListType(EmberAfAttributeType dataType)
{
return dataType == ZCL_ARRAY_ATTRIBUTE_TYPE;
diff --git a/src/app/util/ember-strings.cpp b/src/app/util/ember-strings.cpp
new file mode 100644
index 0000000..efdc0a8
--- /dev/null
+++ b/src/app/util/ember-strings.cpp
@@ -0,0 +1,83 @@
+/**
+ *
+ * Copyright (c) 2020 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.
+ */
+#include <app/util/ember-strings.h>
+
+#include <lib/core/CHIPEncoding.h>
+
+using namespace chip;
+
+uint8_t emberAfStringLength(const uint8_t * buffer)
+{
+ // The first byte specifies the length of the string. A length of 0xFF means
+ // the string is invalid and there is no character data.
+ return (buffer[0] == 0xFF ? 0 : buffer[0]);
+}
+
+uint16_t emberAfLongStringLength(const uint8_t * buffer)
+{
+ // The first two bytes specify the length of the long string. A length of
+ // 0xFFFF means the string is invalid and there is no character data.
+ uint16_t length = Encoding::LittleEndian::Get16(buffer);
+ return (length == 0xFFFF ? 0 : length);
+}
+
+void emberAfCopyString(uint8_t * dest, const uint8_t * src, size_t size)
+{
+ if (src == nullptr)
+ {
+ dest[0] = 0; // Zero out the length of string
+ }
+ else if (src[0] == 0xFF)
+ {
+ dest[0] = src[0];
+ }
+ else
+ {
+ uint8_t length = emberAfStringLength(src);
+ if (size < length)
+ {
+ // Since we have checked that size < length, size must be able to fit into the type of length.
+ length = static_cast<decltype(length)>(size);
+ }
+ memmove(dest + 1, src + 1, length);
+ dest[0] = length;
+ }
+}
+
+void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size)
+{
+ if (src == nullptr)
+ {
+ dest[0] = dest[1] = 0; // Zero out the length of string
+ }
+ else if ((src[0] == 0xFF) && (src[1] == 0xFF))
+ {
+ dest[0] = 0xFF;
+ dest[1] = 0xFF;
+ }
+ else
+ {
+ uint16_t length = emberAfLongStringLength(src);
+ if (size < length)
+ {
+ // Since we have checked that size < length, size must be able to fit into the type of length.
+ length = static_cast<decltype(length)>(size);
+ }
+ memmove(dest + 2, src + 2, length);
+ Encoding::LittleEndian::Put16(dest, length);
+ }
+}
diff --git a/src/app/util/ember-strings.h b/src/app/util/ember-strings.h
new file mode 100644
index 0000000..69c9695
--- /dev/null
+++ b/src/app/util/ember-strings.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2024 Project CHIP Authors
+ * All rights reserved.
+ *
+ * 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.
+ */
+#pragma once
+
+#include <cstddef>
+#include <cstdint>
+
+/*
+ * @brief Function that determines the length of a zigbee Cluster Library string
+ * (where the first byte is assumed to be the length).
+ */
+uint8_t emberAfStringLength(const uint8_t * buffer);
+/*
+ * @brief Function that determines the length of a zigbee Cluster Library long string.
+ * (where the first two bytes are assumed to be the length).
+ */
+uint16_t emberAfLongStringLength(const uint8_t * buffer);
+
+/*
+ * @brief Function that copies a ZCL string type into a buffer. The size
+ * parameter should indicate the maximum number of characters to copy to the
+ * destination buffer not including the length byte.
+ */
+void emberAfCopyString(uint8_t * dest, const uint8_t * src, size_t size);
+
+/*
+ * @brief Function that copies a ZCL long string into a buffer. The size
+ * parameter should indicate the maximum number of characters to copy to the
+ * destination buffer not including the length bytes.
+ */
+void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size);
diff --git a/src/app/util/message.cpp b/src/app/util/message.cpp
deleted file mode 100644
index d48b515..0000000
--- a/src/app/util/message.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- *
- * Copyright (c) 2020 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.
- */
-
-#include <app/util/af.h>
-#include <app/util/util.h>
-#include <lib/core/CHIPEncoding.h>
-
-using namespace chip;
-
-uint8_t emberAfStringLength(const uint8_t * buffer)
-{
- // The first byte specifies the length of the string. A length of 0xFF means
- // the string is invalid and there is no character data.
- return (buffer[0] == 0xFF ? 0 : buffer[0]);
-}
-
-uint16_t emberAfLongStringLength(const uint8_t * buffer)
-{
- // The first two bytes specify the length of the long string. A length of
- // 0xFFFF means the string is invalid and there is no character data.
- uint16_t length = Encoding::LittleEndian::Get16(buffer);
- return (length == 0xFFFF ? 0 : length);
-}
diff --git a/src/app/util/mock/BUILD.gn b/src/app/util/mock/BUILD.gn
index be56bc6..da44fb8 100644
--- a/src/app/util/mock/BUILD.gn
+++ b/src/app/util/mock/BUILD.gn
@@ -29,6 +29,7 @@
public_deps = [
"${chip_root}/src/app",
+ "${chip_root}/src/app/common:attribute-type",
"${chip_root}/src/lib/core",
"${chip_root}/src/lib/support",
"${chip_root}/src/lib/support:testing_nlunit",
diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp
index ec47dc0..ab3bff2 100644
--- a/src/app/util/mock/attribute-storage.cpp
+++ b/src/app/util/mock/attribute-storage.cpp
@@ -234,35 +234,6 @@
return index < GetMockNodeConfig().endpoints.size();
}
-// This duplication of basic utilities is really unfortunate, but we can't link
-// to the normal attribute-storage.cpp because we redefine some of its symbols
-// above.
-bool emberAfIsStringAttributeType(EmberAfAttributeType attributeType)
-{
- return (attributeType == ZCL_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_CHAR_STRING_ATTRIBUTE_TYPE);
-}
-
-bool emberAfIsLongStringAttributeType(EmberAfAttributeType attributeType)
-{
- return (attributeType == ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE || attributeType == ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE);
-}
-
-// And we don't have a good way to link to message.cpp either.
-uint8_t emberAfStringLength(const uint8_t * buffer)
-{
- // The first byte specifies the length of the string. A length of 0xFF means
- // the string is invalid and there is no character data.
- return (buffer[0] == 0xFF ? 0 : buffer[0]);
-}
-
-uint16_t emberAfLongStringLength(const uint8_t * buffer)
-{
- // The first two bytes specify the length of the long string. A length of
- // 0xFFFF means the string is invalid and there is no character data.
- uint16_t length = Encoding::LittleEndian::Get16(buffer);
- return (length == 0xFFFF ? 0 : length);
-}
-
// This will find the first server that has the clusterId given from the index of endpoint.
bool emberAfContainsServerFromIndex(uint16_t index, ClusterId clusterId)
{
diff --git a/src/app/util/types_stub.h b/src/app/util/types_stub.h
index dbd1ea1..fd789da 100644
--- a/src/app/util/types_stub.h
+++ b/src/app/util/types_stub.h
@@ -20,9 +20,9 @@
#include <string.h> // For mem* functions.
#include <app/util/basic-types.h>
+#include <lib/core/NodeId.h>
#include <lib/core/Optional.h>
-#include <transport/raw/MessageHeader.h>
static_assert(sizeof(chip::NodeId) == sizeof(uint64_t), "Unexpected node if size");
/**
diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp
index e816354..9c64d1b 100644
--- a/src/app/util/util.cpp
+++ b/src/app/util/util.cpp
@@ -24,6 +24,7 @@
#include <app/util/af.h>
#include <app/util/attribute-storage.h>
#include <app/util/config.h>
+#include <app/util/ember-strings.h>
#include <app/util/generic-callbacks.h>
#include <lib/core/CHIPConfig.h>
#include <lib/core/CHIPEncoding.h>
@@ -192,53 +193,6 @@
return 0xFFFF;
}
-void emberAfCopyString(uint8_t * dest, const uint8_t * src, size_t size)
-{
- if (src == nullptr)
- {
- dest[0] = 0; // Zero out the length of string
- }
- else if (src[0] == 0xFF)
- {
- dest[0] = src[0];
- }
- else
- {
- uint8_t length = emberAfStringLength(src);
- if (size < length)
- {
- // Since we have checked that size < length, size must be able to fit into the type of length.
- length = static_cast<decltype(length)>(size);
- }
- memmove(dest + 1, src + 1, length);
- dest[0] = length;
- }
-}
-
-void emberAfCopyLongString(uint8_t * dest, const uint8_t * src, size_t size)
-{
- if (src == nullptr)
- {
- dest[0] = dest[1] = 0; // Zero out the length of string
- }
- else if ((src[0] == 0xFF) && (src[1] == 0xFF))
- {
- dest[0] = 0xFF;
- dest[1] = 0xFF;
- }
- else
- {
- uint16_t length = emberAfLongStringLength(src);
- if (size < length)
- {
- // Since we have checked that size < length, size must be able to fit into the type of length.
- length = static_cast<decltype(length)>(size);
- }
- memmove(dest + 2, src + 2, length);
- Encoding::LittleEndian::Put16(dest, length);
- }
-}
-
#if (CHIP_CONFIG_BIG_ENDIAN_TARGET)
#define EM_BIG_ENDIAN true
#else
diff --git a/src/app/zap-templates/templates/app/attributes/Accessors.zapt b/src/app/zap-templates/templates/app/attributes/Accessors.zapt
index cacbc23..be70fb0 100644
--- a/src/app/zap-templates/templates/app/attributes/Accessors.zapt
+++ b/src/app/zap-templates/templates/app/attributes/Accessors.zapt
@@ -9,6 +9,7 @@
#include <app/data-model/Nullable.h>
#include <app/util/af-types.h>
+#include <app/util/ember-strings.h>
#include <app-common/zap-generated/cluster-objects.h>
#include <lib/support/Span.h>
#include <protocols/interaction_model/StatusCode.h>
diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
index 7b316d9..1fd4928 100644
--- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
+++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj
@@ -154,8 +154,6 @@
514C79F42B62ED5500DD6D7B /* attribute-storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79F22B62ED5500DD6D7B /* attribute-storage.cpp */; };
514C79F62B62F0B900DD6D7B /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79F52B62F0B900DD6D7B /* util.cpp */; };
514C79F72B62F0B900DD6D7B /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79F52B62F0B900DD6D7B /* util.cpp */; };
- 514C79F92B62F60100DD6D7B /* message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79F82B62F60100DD6D7B /* message.cpp */; };
- 514C79FA2B62F60100DD6D7B /* message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79F82B62F60100DD6D7B /* message.cpp */; };
514C79FC2B62F94C00DD6D7B /* ota-provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79FB2B62F94C00DD6D7B /* ota-provider.cpp */; };
514C79FD2B62F94C00DD6D7B /* ota-provider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 514C79FB2B62F94C00DD6D7B /* ota-provider.cpp */; };
514C7A012B64223400DD6D7B /* MTRServerAttribute_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 514C79FF2B64223400DD6D7B /* MTRServerAttribute_Internal.h */; };
@@ -259,6 +257,10 @@
75B0D01E2B71B47F002074DD /* MTRDeviceTestDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 75B0D01D2B71B47F002074DD /* MTRDeviceTestDelegate.m */; };
75B765C12A1D71BC0014719B /* MTRAttributeSpecifiedCheck.h in Headers */ = {isa = PBXBuildFile; fileRef = 75B765C02A1D71BC0014719B /* MTRAttributeSpecifiedCheck.h */; };
75B765C32A1D82D30014719B /* MTRAttributeSpecifiedCheck.mm in Sources */ = {isa = PBXBuildFile; fileRef = 75B765C22A1D82D30014719B /* MTRAttributeSpecifiedCheck.mm */; };
+ 75D532752B91194D009C64E4 /* ember-strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75D532742B91194D009C64E4 /* ember-strings.cpp */; };
+ 75D532762B91194D009C64E4 /* ember-strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75D532742B91194D009C64E4 /* ember-strings.cpp */; };
+ 75D532782B91195B009C64E4 /* attribute-metadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75D532772B91195B009C64E4 /* attribute-metadata.cpp */; };
+ 75D532792B91195B009C64E4 /* attribute-metadata.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 75D532772B91195B009C64E4 /* attribute-metadata.cpp */; };
8874C1322B69C7060084BEFD /* MTRMetricsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8874C1312B69C7060084BEFD /* MTRMetricsTests.m */; };
88E6C9462B6334ED001A1FE0 /* MTRMetrics.h in Headers */ = {isa = PBXBuildFile; fileRef = 88E6C9432B6334ED001A1FE0 /* MTRMetrics.h */; settings = {ATTRIBUTES = (Public, ); }; };
88E6C9472B6334ED001A1FE0 /* MTRMetrics_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 88E6C9442B6334ED001A1FE0 /* MTRMetrics_Internal.h */; };
@@ -549,7 +551,6 @@
514C79EF2B62ADDA00DD6D7B /* descriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = descriptor.cpp; path = clusters/descriptor/descriptor.cpp; sourceTree = "<group>"; };
514C79F22B62ED5500DD6D7B /* attribute-storage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "attribute-storage.cpp"; path = "util/attribute-storage.cpp"; sourceTree = "<group>"; };
514C79F52B62F0B900DD6D7B /* util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = util.cpp; path = util/util.cpp; sourceTree = "<group>"; };
- 514C79F82B62F60100DD6D7B /* message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = message.cpp; path = util/message.cpp; sourceTree = "<group>"; };
514C79FB2B62F94C00DD6D7B /* ota-provider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ota-provider.cpp"; path = "clusters/ota-provider/ota-provider.cpp"; sourceTree = "<group>"; };
514C79FF2B64223400DD6D7B /* MTRServerAttribute_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRServerAttribute_Internal.h; sourceTree = "<group>"; };
514C7A002B64223400DD6D7B /* MTRServerEndpoint_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRServerEndpoint_Internal.h; sourceTree = "<group>"; };
@@ -660,6 +661,8 @@
75B765BF2A1D70F80014719B /* MTRAttributeSpecifiedCheck-src.zapt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "MTRAttributeSpecifiedCheck-src.zapt"; sourceTree = "<group>"; };
75B765C02A1D71BC0014719B /* MTRAttributeSpecifiedCheck.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRAttributeSpecifiedCheck.h; sourceTree = "<group>"; };
75B765C22A1D82D30014719B /* MTRAttributeSpecifiedCheck.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRAttributeSpecifiedCheck.mm; sourceTree = "<group>"; };
+ 75D532742B91194D009C64E4 /* ember-strings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "ember-strings.cpp"; path = "util/ember-strings.cpp"; sourceTree = "<group>"; };
+ 75D532772B91195B009C64E4 /* attribute-metadata.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "attribute-metadata.cpp"; path = "util/attribute-metadata.cpp"; sourceTree = "<group>"; };
8874C1312B69C7060084BEFD /* MTRMetricsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRMetricsTests.m; sourceTree = "<group>"; };
88E6C9432B6334ED001A1FE0 /* MTRMetrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRMetrics.h; sourceTree = "<group>"; };
88E6C9442B6334ED001A1FE0 /* MTRMetrics_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRMetrics_Internal.h; sourceTree = "<group>"; };
@@ -997,13 +1000,14 @@
1E857311265519DE0050A4D9 /* app */ = {
isa = PBXGroup;
children = (
+ 75D532772B91195B009C64E4 /* attribute-metadata.cpp */,
+ 75D532742B91194D009C64E4 /* ember-strings.cpp */,
5143041F2914CED9004DC7FE /* generic-callback-stubs.cpp */,
514C79F22B62ED5500DD6D7B /* attribute-storage.cpp */,
514C79EF2B62ADDA00DD6D7B /* descriptor.cpp */,
514C79EC2B62ADCD00DD6D7B /* ember-compatibility-functions.cpp */,
516415FE2B6B132200D5CE11 /* DataModelHandler.cpp */,
514C79F52B62F0B900DD6D7B /* util.cpp */,
- 514C79F82B62F60100DD6D7B /* message.cpp */,
514C79FB2B62F94C00DD6D7B /* ota-provider.cpp */,
);
name = app;
@@ -1764,6 +1768,7 @@
B45373BD2A9FEA9100807602 /* service.c in Sources */,
0395469E2991DFC5006D42A8 /* json_writer.cpp in Sources */,
03FB93E02A46200A0048CB35 /* DiscoverCommissionablesCommand.mm in Sources */,
+ 75D532762B91194D009C64E4 /* ember-strings.cpp in Sources */,
B45373EF2A9FEBFE00807602 /* ops-raw-skt.c in Sources */,
516411332B6BF77700E67C05 /* MTRServerAccessControl.mm in Sources */,
037C3DD52991C2E200B7EEE2 /* CHIPCommandBridge.mm in Sources */,
@@ -1778,6 +1783,7 @@
B45373AA2A9FE73400807602 /* WebSocketServer.cpp in Sources */,
B45373E62A9FEBA400807602 /* header.c in Sources */,
B45374002A9FEC4F00807602 /* unix-init.c in Sources */,
+ 75D532792B91195B009C64E4 /* attribute-metadata.cpp in Sources */,
B45373DF2A9FEB6F00807602 /* system.c in Sources */,
B45373FC2A9FEC4F00807602 /* unix-caps.c in Sources */,
B4E262162AA0CF1C00DBA5BC /* RemoteDataModelLogger.mm in Sources */,
@@ -1811,7 +1817,6 @@
037C3DCF2991BD5200B7EEE2 /* MTRError.mm in Sources */,
037C3DC72991BD5100B7EEE2 /* CHIPToolKeypair.mm in Sources */,
B45373E52A9FEBA400807602 /* date.c in Sources */,
- 514C79FA2B62F60100DD6D7B /* message.cpp in Sources */,
514C79F72B62F0B900DD6D7B /* util.cpp in Sources */,
B45373DC2A9FEB5300807602 /* sha-1.c in Sources */,
B45373D12A9FEB0C00807602 /* alloc.c in Sources */,
@@ -1833,7 +1838,6 @@
files = (
2C8C8FC2253E0C2100797F05 /* MTRPersistentStorageDelegateBridge.mm in Sources */,
99AECC802798A57F00B6355B /* MTRCommissioningParameters.mm in Sources */,
- 514C79F92B62F60100DD6D7B /* message.cpp in Sources */,
2CB7163C252E8A7C0026E2BB /* MTRDeviceControllerDelegateBridge.mm in Sources */,
997DED162695343400975E97 /* MTRThreadOperationalDataset.mm in Sources */,
515C1C6F284F9FFB00A48F0C /* MTRFramework.mm in Sources */,
@@ -1844,6 +1848,7 @@
516416012B6B483C00D5CE11 /* MTRIMDispatch.mm in Sources */,
51D0B1412B61B3A4006E3511 /* MTRServerCluster.mm in Sources */,
514C79FC2B62F94C00DD6D7B /* ota-provider.cpp in Sources */,
+ 75D532752B91194D009C64E4 /* ember-strings.cpp in Sources */,
5136661428067D550025EDAE /* MTRDeviceControllerFactory.mm in Sources */,
51D0B1392B618CC6006E3511 /* MTRServerAttribute.mm in Sources */,
51B22C2A2740CB47008D5055 /* MTRCommandPayloadsObjc.mm in Sources */,
@@ -1880,6 +1885,7 @@
5A6FEC9627B5983000F25F42 /* MTRDeviceControllerXPCConnection.mm in Sources */,
511913FB28C100EF009235E9 /* MTRBaseSubscriptionCallback.mm in Sources */,
510470FB2A2F7DF60053EA7E /* MTRBackwardsCompatShims.mm in Sources */,
+ 75D532782B91195B009C64E4 /* attribute-metadata.cpp in Sources */,
5173A47629C0E2ED00F67F48 /* MTRFabricInfo.mm in Sources */,
5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */,
513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */,
diff --git a/src/lib/core/BUILD.gn b/src/lib/core/BUILD.gn
index 9163caf..fdb74c7 100644
--- a/src/lib/core/BUILD.gn
+++ b/src/lib/core/BUILD.gn
@@ -113,9 +113,14 @@
source_set("types") {
sources = [
"CHIPSafeCasts.h",
+ "CHIPVendorIdentifiers.hpp",
+ "DataModelTypes.h",
"Global.h",
+ "GroupId.h",
"InPlace.h",
+ "NodeId.h",
"Optional.h",
+ "PasscodeId.h",
"ReferenceCounted.h",
"Unchecked.h",
]
@@ -138,12 +143,8 @@
"CHIPKeyIds.h",
"CHIPPersistentStorageDelegate.h",
"ClusterEnums.h",
- "DataModelTypes.h",
- "GroupId.h",
- "NodeId.h",
"OTAImageHeader.cpp",
"OTAImageHeader.h",
- "PasscodeId.h",
"PeerId.h",
"ScopedNodeId.h",
"TLV.h",
diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
index 51e1965..3a35e35 100644
--- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
+++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
@@ -27,6 +27,7 @@
#include <app-common/zap-generated/cluster-objects.h>
#include <app/data-model/Nullable.h>
#include <app/util/af-types.h>
+#include <app/util/ember-strings.h>
#include <lib/support/Span.h>
#include <protocols/interaction_model/StatusCode.h>