Skip to content

Commit 612153f

Browse files
Sync csa branch with main (#239)
2 parents 150ad95 + fd216ec commit 612153f

File tree

31 files changed

+908
-134
lines changed

31 files changed

+908
-134
lines changed

examples/common/pigweed/rpc_services/Descriptor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Descriptor : public pw_rpc::nanopb::Descriptor::Service<Descriptor>
5252
// TODO: Need to update the Pigweed proto definition to actually represent this
5353
// as a list of device types.
5454
//
55-
chip_rpc_DeviceType out{ .device_type = deviceTypeList.data()[0].deviceId };
55+
chip_rpc_DeviceType out{ .device_type = deviceTypeList.data()[0].deviceTypeId };
5656
writer.Write(out);
5757
}
5858

examples/virtual-device-app/android/java/DeviceApp-JNI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ JNI_METHOD(void, postServerInit)(JNIEnv *, jobject app, jint deviceTypeId)
134134
chip::DeviceLayer::StackLock lock;
135135
ChipLogProgress(Zcl, "DeviceAppJNI::postServerInit");
136136

137-
gDeviceTypeIds[0].deviceId = static_cast<uint16_t>(deviceTypeId);
137+
gDeviceTypeIds[0].deviceTypeId = static_cast<uint16_t>(deviceTypeId);
138138
emberAfSetDeviceTypeList(1, Span<const EmberAfDeviceType>(gDeviceTypeIds));
139139
}
140140

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
100 : [linux] Added libpcsclite-dev package for NFC Commissioning on Linux platforms.
1+
101 : [Silabs] Update Silabs docker to support MG26 Modules.

integrations/docker/images/stage-2/chip-build-efr32/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ RUN wget https://github.com/SiliconLabs/simplicity_sdk/releases/download/v2024.1
2525
&& find /tmp/simplicity_sdk/protocol/openthread -name "*efr32mg21*" -delete \
2626
&& find /tmp/simplicity_sdk \( -name "libsl_platform_ftd_efr32mg2*" -o -name "libsl_ot_stack_mtd_efr32mg2*" \) -type f -delete \
2727
&& find /tmp/simplicity_sdk/hardware/board/config -mindepth 1 -maxdepth 1 -type d ! \( -name '*brd4186c*' -o -name '*brd4187c*' -o -name '*brd4186a*' -o -name '*brd4187a*' -o -name '*brd2601b*' -o -name '*brd2703a*' -o -name '*brd2704a*' -o -name '*component*' \
28-
-o -name '*brd4316a*' -o -name '*brd4317a*' -o -name '*brd4318a*' -o -name '*brd4319a*' -o -name '*brd4116a*' -o -name '*brd4117a*' -o -name '*brd4118a*' -o -name '*brd2608a*' \) -exec rm -rf {} + \
29-
&& find /tmp/simplicity_sdk/platform/Device/SiliconLabs -mindepth 1 -maxdepth 1 -type d ! \( -name 'EFR32MG24' -o -name 'EFR32MG26' -o -name 'MGM24' \) -exec rm -rf {} + \
28+
-o -name '*brd4316a*' -o -name '*brd4317a*' -o -name '*brd4318a*' -o -name '*brd4319a*' -o -name '*brd4116a*' -o -name '*brd4117a*' -o -name '*brd4118a*' -o -name '*brd2608a*' -o -name '*brd4350a*' -o -name '*brd4351a*' -o -name '*brd2709a*' \) -exec rm -rf {} + \
29+
&& find /tmp/simplicity_sdk/platform/Device/SiliconLabs -mindepth 1 -maxdepth 1 -type d ! \( -name 'EFR32MG24' -o -name 'EFR32MG26' -o -name 'MGM24' -o -name 'MGM26' \) -exec rm -rf {} + \
3030
&& : # last line
3131

3232
# Clone WiSeConnect Wi-Fi and Bluetooth Software 2.10.3 (b6d6cb5)

integrations/docker/images/stage-2/chip-build-nuttx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN set -x \
1414
# Download and build g++-13
1515
RUN set -x \
1616
&& ! test -d /opt/nuttx/gcc-13 \
17-
&& wget -P gcc_build https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-13.1.0/gcc-13.1.0.tar.gz \
17+
&& wget -P gcc_build https://mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-13.1.0/gcc-13.1.0.tar.gz \
1818
&& cd gcc_build \
1919
&& tar xzf gcc-13.1.0.tar.gz \
2020
&& cd gcc-13.1.0 \

src/app/data-model-provider/BUILD.gn

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414
import("//build_overrides/chip.gni")
1515
import("//build_overrides/pigweed.gni")
1616

17+
source_set("metadata") {
18+
sources = [ "MetadataTypes.h" ]
19+
20+
public_deps = [
21+
"${chip_root}/src/access:types",
22+
"${chip_root}/src/lib/core:types",
23+
"${chip_root}/src/lib/support",
24+
]
25+
}
26+
1727
source_set("data-model-provider") {
1828
sources = [
1929
"ActionContext.h",
@@ -25,15 +35,15 @@ source_set("data-model-provider") {
2535
"MetadataList.h",
2636
"MetadataLookup.cpp",
2737
"MetadataLookup.h",
28-
"MetadataTypes.cpp",
29-
"MetadataTypes.h",
3038
"OperationTypes.h",
3139
"Provider.h",
3240
"ProviderChangeListener.h",
41+
"ProviderMetadataTree.cpp",
42+
"ProviderMetadataTree.h",
3343
]
3444

3545
public_deps = [
36-
"${chip_root}/src/access:types",
46+
":metadata",
3747
"${chip_root}/src/app:attribute-access",
3848
"${chip_root}/src/app:command-handler-interface",
3949
"${chip_root}/src/app:events",

src/app/data-model-provider/MetadataLookup.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <app/ConcreteClusterPath.h>
2222
#include <app/data-model-provider/MetadataList.h>
2323
#include <app/data-model-provider/MetadataTypes.h>
24+
#include <app/data-model-provider/ProviderMetadataTree.h>
2425
#include <lib/core/DataModelTypes.h>
2526
#include <lib/support/CodeUtils.h>
2627

src/app/data-model-provider/MetadataTypes.h

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,8 @@
2020
#include <optional>
2121

2222
#include <access/Privilege.h>
23-
#include <app-common/zap-generated/cluster-objects.h>
24-
#include <app/AttributePathParams.h>
25-
#include <app/ConcreteAttributePath.h>
26-
#include <app/ConcreteClusterPath.h>
27-
#include <app/ConcreteCommandPath.h>
28-
#include <app/data-model-provider/MetadataList.h>
29-
#include <app/data-model/List.h>
3023
#include <lib/core/DataModelTypes.h>
3124
#include <lib/support/BitFlags.h>
32-
#include <lib/support/BitMask.h>
33-
#include <lib/support/Span.h>
3425

3526
namespace chip {
3627
namespace app {
@@ -135,65 +126,6 @@ struct DeviceTypeEntry
135126
}
136127
};
137128

138-
/// Provides metadata information for a data model
139-
///
140-
/// The data model can be viewed as a tree of endpoint/cluster/(attribute+commands+events)
141-
/// where each element can be iterated through independently.
142-
///
143-
/// Iteration rules:
144-
/// - Invalid paths will be returned when iteration ends (IDs will be kInvalid* and in particular
145-
/// mEndpointId will be kInvalidEndpointId). See `::kInvalid` constants for entries and
146-
/// can use ::IsValid() to determine if the entry is valid or not.
147-
/// - Global Attributes are NOT returned since they are implied
148-
/// - Any internal iteration errors are just logged (callers do not handle iteration CHIP_ERROR)
149-
/// - Iteration order is NOT guaranteed globally. Only the following is guaranteed:
150-
/// - Complete tree iteration (e.g. when iterating an endpoint, ALL clusters of that endpoint
151-
/// are returned, when iterating over a cluster, all attributes/commands are iterated over)
152-
/// - uniqueness and completeness (iterate over all possible distinct values as long as no
153-
/// internal structural changes occur)
154-
class ProviderMetadataTree
155-
{
156-
public:
157-
virtual ~ProviderMetadataTree() = default;
158-
159-
using SemanticTag = Clusters::Descriptor::Structs::SemanticTagStruct::Type;
160-
161-
virtual CHIP_ERROR Endpoints(ListBuilder<EndpointEntry> & builder) = 0;
162-
163-
virtual CHIP_ERROR SemanticTags(EndpointId endpointId, ListBuilder<SemanticTag> & builder) = 0;
164-
virtual CHIP_ERROR DeviceTypes(EndpointId endpointId, ListBuilder<DeviceTypeEntry> & builder) = 0;
165-
virtual CHIP_ERROR ClientClusters(EndpointId endpointId, ListBuilder<ClusterId> & builder) = 0;
166-
virtual CHIP_ERROR ServerClusters(EndpointId endpointId, ListBuilder<ServerClusterEntry> & builder) = 0;
167-
168-
virtual CHIP_ERROR Attributes(const ConcreteClusterPath & path, ListBuilder<AttributeEntry> & builder) = 0;
169-
virtual CHIP_ERROR GeneratedCommands(const ConcreteClusterPath & path, ListBuilder<CommandId> & builder) = 0;
170-
virtual CHIP_ERROR AcceptedCommands(const ConcreteClusterPath & path, ListBuilder<AcceptedCommandEntry> & builder) = 0;
171-
172-
/// Workaround function to report attribute change.
173-
///
174-
/// When this is invoked, the caller is expected to increment the cluster data version, and the attribute path
175-
/// should be marked as `dirty` by the data model provider listener so that the reporter can notify the subscriber
176-
/// of attribute changes.
177-
/// This function should be invoked when attribute managed by attribute access interface is modified but not
178-
/// through an actual Write interaction.
179-
/// For example, if the LastNetworkingStatus attribute changes because the NetworkCommissioning driver detects a
180-
/// network connection status change and calls SetLastNetworkingStatusValue(). The data model provider can recognize
181-
/// this change by invoking this function at the point of change.
182-
///
183-
/// This is a workaround function as we cannot notify the attribute change to the data model provider. The provider
184-
/// should own its data and versions.
185-
///
186-
/// TODO: We should remove this function when the AttributeAccessInterface/CommandHandlerInterface is able to report
187-
/// the attribute changes.
188-
virtual void Temporary_ReportAttributeChanged(const AttributePathParams & path) = 0;
189-
190-
// "convenience" functions that just return the data and ignore the error
191-
// This returns the builder as-is even after the error (e.g. not found would return empty data)
192-
ReadOnlyBuffer<EndpointEntry> EndpointsIgnoreError();
193-
ReadOnlyBuffer<ServerClusterEntry> ServerClustersIgnoreError(EndpointId endpointId);
194-
ReadOnlyBuffer<AttributeEntry> AttributesIgnoreError(const ConcreteClusterPath & path);
195-
};
196-
197129
} // namespace DataModel
198130
} // namespace app
199131
} // namespace chip

src/app/data-model-provider/Provider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
#include <app/data-model-provider/ActionReturnStatus.h>
2929
#include <app/data-model-provider/Context.h>
30-
#include <app/data-model-provider/MetadataTypes.h>
3130
#include <app/data-model-provider/OperationTypes.h>
31+
#include <app/data-model-provider/ProviderMetadataTree.h>
3232

3333
namespace chip {
3434
namespace app {

src/app/data-model-provider/MetadataTypes.cpp renamed to src/app/data-model-provider/ProviderMetadataTree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <app/data-model-provider/MetadataTypes.h>
18+
#include <app/data-model-provider/ProviderMetadataTree.h>
1919

2020
#include <app/data-model-provider/MetadataList.h>
2121

0 commit comments

Comments
 (0)