Skip to content

Commit b3f14ff

Browse files
authored
Merge branch 'master' into camera-webrtc-server
2 parents cbc0485 + 2af51b0 commit b3f14ff

File tree

46 files changed

+228
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+228
-74
lines changed

examples/air-quality-sensor-app/silabs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ combination with JLinkRTTClient as follows:
257257
- _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode
258258
for 30 seconds. The device will then switch to a slower interval advertisement.
259259
After 15 minutes, the advertisement stops.
260+
Additionally, it will cycle through the QR code, application status screen and device status screen, respectively.
260261

261262
- _Pressed and hold for 6 s_ : Initiates the factory reset of the device.
262263
Releasing the button within the 6-second window cancels the factory reset

examples/darwin-framework-tool/BUILD.gn

+6-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ sdk_build_dir_suffix = ""
5353
if (getenv("SDKROOT") != "") {
5454
sdk = getenv("SDKROOT")
5555
sdk_root_parts = string_split(getenv("SDKROOT"), ".")
56-
sdk_build_dir_suffix = "-${sdk_root_parts[0]}"
56+
if (sdk_root_parts[0] != "macosx") {
57+
sdk_build_dir_suffix = "-${sdk_root_parts[0]}"
58+
}
5759
}
5860
output_sdk_type = "Debug${sdk_build_dir_suffix}"
5961

@@ -134,7 +136,7 @@ action("build-darwin-framework") {
134136
"${root_out_dir}/macos_framework_output/Build",
135137
]
136138

137-
if (sdk == "macosx") {
139+
if (sdk == "macosx" || sdk_root_parts[0] == "macosx") {
138140
outputs += [ "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/lib/libCHIP.a" ]
139141
}
140142
}
@@ -285,11 +287,12 @@ executable("darwin-framework-tool") {
285287
"Foundation.framework",
286288
"CoreBluetooth.framework",
287289
"Network.framework",
290+
"IOKit.framework",
288291
]
289292

290293
# Other SDKs are linked statically to Matter.framework but the macosx SDK is linked dynamically but needs some symbols that are
291294
# not exposed by the dylib.
292-
if (sdk == "macosx") {
295+
if (sdk == "macosx" || sdk_root_parts[0] == "macosx") {
293296
libs = [ "${root_out_dir}/macos_framework_output/Build/Intermediates.noindex/Matter.build/${output_sdk_type}/Matter.build/out/lib/libCHIP.a" ]
294297
}
295298

examples/dishwasher-app/silabs/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ An example showing the use of Matter on the Silicon Labs EFR32 MG24 boards.
1010
- [Flashing the Application](#flashing-the-application)
1111
- [Viewing Logging Output](#viewing-logging-output)
1212
- [Running the Complete Example](#running-the-complete-example)
13+
- [Commissioning](#commissioning)
1314

1415
<hr>
1516

@@ -211,6 +212,7 @@ combination with JLinkRTTClient as follows:
211212
- _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode
212213
for 30 seconds. The device will then switch to a slower interval advertisement.
213214
After 15 minutes, the advertisement stops.
215+
Additionally, it will cycle through the QR code, application status screen and device status screen, respectively.
214216

215217
- _Pressed and hold for 6 s_ : Initiates the factory reset of the device.
216218
Releasing the button within the 6-second window cancels the factory reset

examples/energy-management-app/silabs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ combination with JLinkRTTClient as follows:
257257
- _Press and Release_ : Start, or restart, BLE advertisement in fast mode. It will advertise in this mode
258258
for 30 seconds. The device will then switch to a slower interval advertisement.
259259
After 15 minutes, the advertisement stops.
260+
Additionally, it will cycle through the QR code, application status screen and device status screen, respectively.
260261

261262
- _Pressed and hold for 6 s_ : Initiates the factory reset of the device.
262263
Releasing the button within the 6-second window cancels the factory reset

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ CHIP_ERROR FabricSyncAddBridgeCommand::RunCommand(NodeId remoteId)
8383
if (DeviceMgr().IsFabricSyncReady())
8484
{
8585
// print to console
86-
fprintf(stderr, "Remote Fabric Bridge has already been configured.");
86+
fprintf(stderr, "Remote Fabric Bridge has already been configured.\n");
8787
return CHIP_NO_ERROR;
8888
}
8989

@@ -126,7 +126,7 @@ CHIP_ERROR FabricSyncRemoveBridgeCommand::RunCommand()
126126
if (bridgeNodeId == kUndefinedNodeId)
127127
{
128128
// print to console
129-
fprintf(stderr, "Remote Fabric Bridge is not configured yet, nothing to remove.");
129+
fprintf(stderr, "Remote Fabric Bridge is not configured yet, nothing to remove.\n");
130130
return CHIP_NO_ERROR;
131131
}
132132

@@ -176,7 +176,7 @@ CHIP_ERROR FabricSyncAddLocalBridgeCommand::RunCommand(NodeId deviceId)
176176
if (DeviceMgr().IsLocalBridgeReady())
177177
{
178178
// print to console
179-
fprintf(stderr, "Local Fabric Bridge has already been configured.");
179+
fprintf(stderr, "Local Fabric Bridge has already been configured.\n");
180180
return CHIP_NO_ERROR;
181181
}
182182

@@ -227,7 +227,7 @@ CHIP_ERROR FabricSyncRemoveLocalBridgeCommand::RunCommand()
227227
if (bridgeNodeId == kUndefinedNodeId)
228228
{
229229
// print to console
230-
fprintf(stderr, "Local Fabric Bridge is not configured yet, nothing to remove.");
230+
fprintf(stderr, "Local Fabric Bridge is not configured yet, nothing to remove.\n");
231231
return CHIP_NO_ERROR;
232232
}
233233

@@ -292,18 +292,18 @@ void FabricSyncDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERRO
292292
}
293293
}
294294

295-
CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteId)
295+
CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteEndpointId)
296296
{
297297
if (!DeviceMgr().IsFabricSyncReady())
298298
{
299299
// print to console
300-
fprintf(stderr, "Remote Fabric Bridge is not configured yet.");
300+
fprintf(stderr, "Remote Fabric Bridge is not configured yet.\n");
301301
return CHIP_NO_ERROR;
302302
}
303303

304304
PairingManager::Instance().SetOpenCommissioningWindowDelegate(this);
305305

306-
DeviceMgr().OpenRemoteDeviceCommissioningWindow(remoteId);
306+
DeviceMgr().OpenRemoteDeviceCommissioningWindow(remoteEndpointId);
307307

308308
return CHIP_NO_ERROR;
309309
}

examples/fabric-admin/commands/fabric-sync/FabricSyncCommand.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class FabricSyncDeviceCommand : public CHIPCommand, public CommissioningWindowDe
124124
AddArgument("endpointid", 0, UINT16_MAX, &mRemoteEndpointId);
125125
}
126126

127-
void OnCommissioningWindowOpened(NodeId deviceId, CHIP_ERROR status, chip::SetupPayload payload) override;
128-
void OnCommissioningComplete(NodeId deviceId, CHIP_ERROR err) override;
127+
void OnCommissioningWindowOpened(chip::NodeId deviceId, CHIP_ERROR status, chip::SetupPayload payload) override;
128+
void OnCommissioningComplete(chip::NodeId deviceId, CHIP_ERROR err) override;
129129

130130
/////////// CHIPCommand Interface /////////
131131
CHIP_ERROR RunCommand() override { return RunCommand(mRemoteEndpointId); }
@@ -136,7 +136,7 @@ class FabricSyncDeviceCommand : public CHIPCommand, public CommissioningWindowDe
136136
chip::EndpointId mRemoteEndpointId = chip::kInvalidEndpointId;
137137
chip::NodeId mAssignedNodeId = chip::kUndefinedNodeId;
138138

139-
CHIP_ERROR RunCommand(chip::EndpointId remoteId);
139+
CHIP_ERROR RunCommand(chip::EndpointId remoteEndpointId);
140140
};
141141

142142
} // namespace admin

examples/fabric-admin/device_manager/DeviceManager.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ void DeviceManager::UpdateLastUsedNodeId(NodeId nodeId)
7171
void DeviceManager::SetRemoteBridgeNodeId(chip::NodeId nodeId)
7272
{
7373
mRemoteBridgeNodeId = nodeId;
74-
mCommissionerControl.Init(PairingManager::Instance().CurrentCommissioner(), mRemoteBridgeNodeId, kAggregatorEndpointId);
74+
75+
if (mRemoteBridgeNodeId != kUndefinedNodeId)
76+
{
77+
mCommissionerControl.Init(PairingManager::Instance().CurrentCommissioner(), mRemoteBridgeNodeId, kAggregatorEndpointId);
78+
}
7579
}
7680

7781
void DeviceManager::AddSyncedDevice(const Device & device)

examples/fabric-admin/device_manager/PairingManager.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,12 @@ void PairingManager::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E
550550
if (err == CHIP_NO_ERROR)
551551
{
552552
// print to console
553-
fprintf(stderr, "Device with Node ID: " ChipLogFormatX64 "has been successfully removed.\n", ChipLogValueX64(nodeId));
553+
fprintf(stderr, "Device with Node ID: " ChipLogFormatX64 " has been successfully removed.\n", ChipLogValueX64(nodeId));
554+
555+
if (self->mPairingDelegate)
556+
{
557+
self->mPairingDelegate->OnDeviceRemoved(nodeId, err);
558+
}
554559

555560
#if defined(PW_RPC_ENABLED)
556561
FabricIndex fabricIndex = self->CurrentCommissioner().GetFabricIndex();

examples/fabric-admin/rpc/RpcClient.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ CHIP_ERROR WaitForResponse(CallType & call)
5959
}
6060
else
6161
{
62-
fprintf(stderr, "RPC Response timed out!");
62+
fprintf(stderr, "RPC Response timed out!\n");
6363
return CHIP_ERROR_TIMEOUT;
6464
}
6565
}

examples/fabric-sync/admin/DeviceManager.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
using namespace chip;
2828

29+
namespace admin {
2930
// Define the static member
3031
DeviceManager DeviceManager::sInstance;
3132

@@ -109,3 +110,5 @@ void DeviceManager::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR err)
109110

110111
ChipLogProgress(NotSpecified, "Synced device with NodeId:" ChipLogFormatX64 " has been removed.", ChipLogValueX64(deviceId));
111112
}
113+
114+
} // namespace admin

examples/fabric-sync/admin/DeviceManager.h

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
#include <app-common/zap-generated/cluster-objects.h>
2424
#include <platform/CHIPDeviceLayer.h>
2525

26+
namespace admin {
27+
2628
class DeviceManager : public PairingDelegate
2729
{
2830
public:
@@ -97,3 +99,5 @@ inline DeviceManager & DeviceMgr()
9799
}
98100
return DeviceManager::sInstance;
99101
}
102+
103+
} // namespace admin

examples/fabric-sync/admin/PairingManager.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
using namespace ::chip;
3030
using namespace ::chip::Controller;
3131

32+
namespace admin {
33+
3234
namespace {
3335

3436
CHIP_ERROR GetPayload(const char * setUpCode, SetupPayload & payload)
@@ -451,7 +453,7 @@ void PairingManager::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E
451453
if (err == CHIP_NO_ERROR)
452454
{
453455
// print to console
454-
fprintf(stderr, "Device with Node ID: " ChipLogFormatX64 "has been successfully removed.\n", ChipLogValueX64(nodeId));
456+
fprintf(stderr, "Device with Node ID: " ChipLogFormatX64 " has been successfully removed.\n", ChipLogValueX64(nodeId));
455457
}
456458
else
457459
{
@@ -548,3 +550,5 @@ CHIP_ERROR PairingManager::UnpairDevice(NodeId nodeId)
548550
}
549551
});
550552
}
553+
554+
} // namespace admin

examples/fabric-sync/admin/PairingManager.h

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include <controller/CurrentFabricRemover.h>
2525
#include <crypto/CHIPCryptoPAL.h>
2626

27+
namespace admin {
28+
2729
// Constants
2830
constexpr uint16_t kMaxManualCodeLength = 22;
2931

@@ -201,3 +203,5 @@ class PairingManager : public chip::Controller::DevicePairingDelegate,
201203
chip::Platform::UniquePtr<chip::Controller::CurrentFabricRemover> mCurrentFabricRemover;
202204
chip::Callback::Callback<chip::Controller::OnCurrentFabricRemove> mCurrentFabricRemoveCallback;
203205
};
206+
207+
} // namespace admin

examples/fabric-sync/bridge/include/BridgedAdministratorCommissioning.h

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#include <app-common/zap-generated/cluster-objects.h>
2121
#include <app/AttributeAccessInterfaceRegistry.h>
2222

23+
namespace bridge {
24+
2325
/**
2426
* @brief CADMIN cluster implementation for handling attribute interactions of bridged device endpoints.
2527
*
@@ -56,3 +58,5 @@ class BridgedAdministratorCommissioning : public chip::app::AttributeAccessInter
5658
// to reflect this change.
5759
chip::app::AttributeAccessInterface * mOriginalAttributeInterface = nullptr;
5860
};
61+
62+
} // namespace bridge

examples/fabric-sync/bridge/include/BridgedDevice.h

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#include <string>
2525

26+
namespace bridge {
27+
2628
class BridgedDevice
2729
{
2830
public:
@@ -90,3 +92,5 @@ class BridgedDevice
9092
BridgedAttributes mAttributes;
9193
AdminCommissioningAttributes mAdminCommissioningAttributes;
9294
};
95+
96+
} // namespace bridge

examples/fabric-sync/bridge/include/BridgedDeviceBasicInformationImpl.h

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
#include <app-common/zap-generated/ids/Clusters.h>
1919
#include <app/AttributeAccessInterface.h>
2020

21+
namespace bridge {
22+
2123
class BridgedDeviceBasicInformationImpl : public chip::app::AttributeAccessInterface
2224
{
2325
public:
@@ -30,3 +32,5 @@ class BridgedDeviceBasicInformationImpl : public chip::app::AttributeAccessInter
3032
CHIP_ERROR Read(const chip::app::ConcreteReadAttributePath & path, chip::app::AttributeValueEncoder & encoder) override;
3133
CHIP_ERROR Write(const chip::app::ConcreteDataAttributePath & path, chip::app::AttributeValueDecoder & decoder) override;
3234
};
35+
36+
} // namespace bridge

examples/fabric-sync/bridge/include/BridgedDeviceManager.h

+8-4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include <memory>
2626

27+
namespace bridge {
28+
2729
class BridgedDeviceManager
2830
{
2931
public:
@@ -52,9 +54,9 @@ class BridgedDeviceManager
5254
*
5355
* @param dev A pointer to the device to be added.
5456
* @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID.
55-
* @return int The index of the dynamic endpoint if successful, nullopt otherwise
57+
* @return uint16_t The index of the dynamic endpoint if successful, nullopt otherwise
5658
*/
57-
std::optional<unsigned> AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev,
59+
std::optional<uint16_t> AddDeviceEndpoint(std::unique_ptr<BridgedDevice> dev,
5860
chip::EndpointId parentEndpointId = chip::kInvalidEndpointId);
5961

6062
/**
@@ -100,9 +102,9 @@ class BridgedDeviceManager
100102
* found, it removes the dynamic endpoint.
101103
*
102104
* @param scopedNodeId The ScopedNodeId of the device to be removed.
103-
* @return unsigned of the index of the removed dynamic endpoint if successful, nullopt otherwise.
105+
* @return uint16_t of the index of the removed dynamic endpoint if successful, nullopt otherwise.
104106
*/
105-
std::optional<unsigned> RemoveDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId);
107+
std::optional<uint16_t> RemoveDeviceByScopedNodeId(chip::ScopedNodeId scopedNodeId);
106108

107109
/**
108110
* Finds the device with the given unique id (if any)
@@ -134,3 +136,5 @@ inline BridgedDeviceManager & BridgeDeviceMgr()
134136
{
135137
return BridgedDeviceManager::sInstance;
136138
}
139+
140+
} // namespace bridge

examples/fabric-sync/bridge/src/BridgedAdministratorCommissioning.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ using namespace chip::app;
2626
using namespace chip::app::Clusters;
2727
using namespace chip::app::Clusters::AdministratorCommissioning;
2828

29+
namespace bridge {
30+
2931
CHIP_ERROR BridgedAdministratorCommissioning::Init()
3032
{
3133
// We expect initialization after emberAfInit(). This allows us to unregister the existing
@@ -79,3 +81,5 @@ CHIP_ERROR BridgedAdministratorCommissioning::Read(const ConcreteReadAttributePa
7981

8082
return CHIP_NO_ERROR;
8183
}
84+
85+
} // namespace bridge

examples/fabric-sync/bridge/src/BridgedDevice.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
using namespace chip;
2828
using namespace chip::app::Clusters::Actions;
2929

30+
namespace bridge {
31+
3032
BridgedDevice::BridgedDevice(ScopedNodeId scopedNodeId)
3133
{
3234
mReachable = false;
@@ -116,3 +118,5 @@ void BridgedDevice::SetAdminCommissioningAttributes(const AdminCommissioningAttr
116118
}
117119
});
118120
}
121+
122+
} // namespace bridge

examples/fabric-sync/bridge/src/BridgedDeviceBasicInformationImpl.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ using namespace ::chip;
2929
using namespace ::chip::app;
3030
using namespace ::chip::app::Clusters;
3131

32+
namespace bridge {
33+
3234
CHIP_ERROR BridgedDeviceBasicInformationImpl::Read(const ConcreteReadAttributePath & path, AttributeValueEncoder & encoder)
3335
{
3436
// Registration is done for the bridged device basic information only
@@ -105,3 +107,5 @@ CHIP_ERROR BridgedDeviceBasicInformationImpl::Write(const ConcreteDataAttributeP
105107

106108
return CHIP_ERROR_INVALID_ARGUMENT;
107109
}
110+
111+
} // namespace bridge

0 commit comments

Comments
 (0)