Skip to content

Commit c991d25

Browse files
authored
Merge branch 'master' into camera-webrtc-updates
2 parents aa3f666 + aba2383 commit c991d25

File tree

104 files changed

+2080
-1820
lines changed

Some content is hidden

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

104 files changed

+2080
-1820
lines changed

config/telink/chip-module/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip)
155155

156156
include(${TELINK_COMMON}/common.cmake)
157157

158+
if (CONFIG_CHIP_APP_LOG_LEVEL GREATER_EQUAL 4)
159+
include(${TELINK_COMMON}/build_info.cmake)
160+
endif()
161+
158162
# ==============================================================================
159163
# Define 'process_binaries' target for collecting final binary to flash
160164
# ==============================================================================

examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,7 @@ endpoint 1 {
18451845
server cluster PressureMeasurement {
18461846
ram attribute measuredValue default = 0xA;
18471847
ram attribute minMeasuredValue default = 1;
1848-
ram attribute maxMeasuredValue default = 0xfffe;
1848+
ram attribute maxMeasuredValue default = 32767;
18491849
callback attribute generatedCommandList;
18501850
callback attribute acceptedCommandList;
18511851
callback attribute attributeList;

examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap

+2-2
Original file line numberDiff line numberDiff line change
@@ -2721,7 +2721,7 @@
27212721
"storageOption": "RAM",
27222722
"singleton": 0,
27232723
"bounded": 0,
2724-
"defaultValue": "0xfffe",
2724+
"defaultValue": "32767",
27252725
"reportable": 1,
27262726
"minInterval": 1,
27272727
"maxInterval": 65534,
@@ -2830,4 +2830,4 @@
28302830
"parentEndpointIdentifier": null
28312831
}
28322832
]
2833-
}
2833+
}

examples/chip-tool/commands/common/Command.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ bool Command::InitArguments(int argc, char ** argv)
5555
{
5656
optionalArgsCount++;
5757
}
58+
else if (argvExtraArgsCount == 0)
59+
{
60+
mandatoryArgsCount++;
61+
}
5862
else
5963
{
6064
mandatoryArgsCount++;

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ data (e.g. fabric info).
239239

240240
## CHIP-REPL Interaction
241241

242-
- See chip-repl documentation in
243-
[Matter_REPL_Intro](../../../docs/development_controllers/chip-repl/Matter_REPL_Intro.ipynb)
242+
- See chip-repl documentation in:
243+
- [Working with Python CHIP Controller](../../../docs/development_controllers/chip-repl/python_chip_controller_building.md)
244+
- [Matter_REPL_Intro](../../../docs/development_controllers/chip-repl/Matter_REPL_Intro.ipynb)
244245

245246
### Building chip-repl:
246247

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

+2-6
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ creating real products based on the Silicon Labs platform.
108108
To build the Water Heater example you can change the args to gn gen (see
109109
BUILD.gn for arg options)
110110

111-
$ gn gen out/debug --args='chip_enable_example_evse_device=false chip_enable_example_water_heater_device=true'
111+
$ gn gen out/debug --args='sl_enable_example_evse_device=false sl_enable_example_water_heater_device=true'
112112
$ ninja -C out/debug
113113

114114
To change Device Energy Management feature support (e.g. Power forecast or
115115
State forecast reporting), you can change the args to gn gen (see BUILD.gn
116116
for arg options)
117117

118-
$ gn gen out/debug --args='chip_dem_support_state_forecast_reporting=true chip_dem_support_power_forecast_reporting=false'
118+
$ gn gen out/debug --args='sl_dem_support_state_forecast_reporting=true sl_dem_support_power_forecast_reporting=false'
119119
$ ninja -C out/debug
120120

121121
- To delete generated executable, libraries and object files use:
@@ -127,10 +127,6 @@ creating real products based on the Silicon Labs platform.
127127

128128
$ ./scripts/examples/gn_silabs_example.sh ./examples/energy-management-app/silabs/ ./out/energy-management-app_ICD BRD4187C --icd
129129

130-
or use gn as previously mentioned but adding the following arguments:
131-
132-
$ gn gen out/debug '--args=SILABS_BOARD="BRD4187C" enable_sleepy_device=true chip_openthread_ftd=false'
133-
134130
* Build the example with pigweed RPC
135131

136132
$ ./scripts/examples/gn_silabs_example.sh examples/energy-management-app/silabs/ out/energy_management_app_rpc BRD4187C 'import("//with_pw_rpc.gni")'

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

+25-24
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,22 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E
5151

5252
if (err == CHIP_NO_ERROR)
5353
{
54-
DeviceMgr().SetRemoteBridgeNodeId(mBridgeNodeId);
54+
DeviceManager::Instance().SetRemoteBridgeNodeId(mBridgeNodeId);
5555
ChipLogProgress(NotSpecified, "Successfully paired bridge device: NodeId: " ChipLogFormatX64,
5656
ChipLogValueX64(mBridgeNodeId));
5757

58-
DeviceMgr().UpdateLastUsedNodeId(mBridgeNodeId);
59-
DeviceMgr().SubscribeRemoteFabricBridge();
58+
DeviceManager::Instance().UpdateLastUsedNodeId(mBridgeNodeId);
59+
DeviceManager::Instance().SubscribeRemoteFabricBridge();
6060

61-
if (DeviceMgr().IsLocalBridgeReady())
61+
if (DeviceManager::Instance().IsLocalBridgeReady())
6262
{
6363
// After successful commissioning of the Commissionee, initiate Reverse Commissioning
6464
// via the Commissioner Control Cluster. However, we must first verify that the
6565
// remote Fabric-Bridge supports Fabric Synchronization.
6666
//
6767
// Note: The Fabric-Admin MUST NOT send the RequestCommissioningApproval command
6868
// if the remote Fabric-Bridge lacks Fabric Synchronization support.
69-
DeviceLayer::SystemLayer().ScheduleLambda([]() { DeviceMgr().ReadSupportedDeviceCategories(); });
69+
DeviceLayer::SystemLayer().ScheduleLambda([]() { DeviceManager::Instance().ReadSupportedDeviceCategories(); });
7070
}
7171
}
7272
else
@@ -80,7 +80,7 @@ void FabricSyncAddBridgeCommand::OnCommissioningComplete(NodeId deviceId, CHIP_E
8080

8181
CHIP_ERROR FabricSyncAddBridgeCommand::RunCommand(NodeId remoteId)
8282
{
83-
if (DeviceMgr().IsFabricSyncReady())
83+
if (DeviceManager::Instance().IsFabricSyncReady())
8484
{
8585
// print to console
8686
fprintf(stderr, "Remote Fabric Bridge has already been configured.\n");
@@ -91,7 +91,8 @@ CHIP_ERROR FabricSyncAddBridgeCommand::RunCommand(NodeId remoteId)
9191

9292
mBridgeNodeId = remoteId;
9393

94-
DeviceMgr().PairRemoteFabricBridge(remoteId, mSetupPINCode, reinterpret_cast<const char *>(mRemoteAddr.data()), mRemotePort);
94+
DeviceManager::Instance().PairRemoteFabricBridge(remoteId, mSetupPINCode, reinterpret_cast<const char *>(mRemoteAddr.data()),
95+
mRemotePort);
9596

9697
return CHIP_NO_ERROR;
9798
}
@@ -106,7 +107,7 @@ void FabricSyncRemoveBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR
106107

107108
if (err == CHIP_NO_ERROR)
108109
{
109-
DeviceMgr().SetRemoteBridgeNodeId(kUndefinedNodeId);
110+
DeviceManager::Instance().SetRemoteBridgeNodeId(kUndefinedNodeId);
110111
ChipLogProgress(NotSpecified, "Successfully removed bridge device: NodeId: " ChipLogFormatX64,
111112
ChipLogValueX64(mBridgeNodeId));
112113
}
@@ -121,7 +122,7 @@ void FabricSyncRemoveBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_ERROR
121122

122123
CHIP_ERROR FabricSyncRemoveBridgeCommand::RunCommand()
123124
{
124-
NodeId bridgeNodeId = DeviceMgr().GetRemoteBridgeNodeId();
125+
NodeId bridgeNodeId = DeviceManager::Instance().GetRemoteBridgeNodeId();
125126

126127
if (bridgeNodeId == kUndefinedNodeId)
127128
{
@@ -133,7 +134,7 @@ CHIP_ERROR FabricSyncRemoveBridgeCommand::RunCommand()
133134
mBridgeNodeId = bridgeNodeId;
134135

135136
PairingManager::Instance().SetPairingDelegate(this);
136-
DeviceMgr().UnpairRemoteFabricBridge();
137+
DeviceManager::Instance().UnpairRemoteFabricBridge();
137138

138139
return CHIP_NO_ERROR;
139140
}
@@ -157,8 +158,8 @@ void FabricSyncAddLocalBridgeCommand::OnCommissioningComplete(NodeId deviceId, C
157158

158159
if (err == CHIP_NO_ERROR)
159160
{
160-
DeviceMgr().SetLocalBridgeNodeId(mLocalBridgeNodeId);
161-
DeviceMgr().UpdateLastUsedNodeId(mLocalBridgeNodeId);
161+
DeviceManager::Instance().SetLocalBridgeNodeId(mLocalBridgeNodeId);
162+
DeviceManager::Instance().UpdateLastUsedNodeId(mLocalBridgeNodeId);
162163
ChipLogProgress(NotSpecified, "Successfully paired local bridge device: NodeId: " ChipLogFormatX64,
163164
ChipLogValueX64(mLocalBridgeNodeId));
164165
}
@@ -173,7 +174,7 @@ void FabricSyncAddLocalBridgeCommand::OnCommissioningComplete(NodeId deviceId, C
173174

174175
CHIP_ERROR FabricSyncAddLocalBridgeCommand::RunCommand(NodeId deviceId)
175176
{
176-
if (DeviceMgr().IsLocalBridgeReady())
177+
if (DeviceManager::Instance().IsLocalBridgeReady())
177178
{
178179
// print to console
179180
fprintf(stderr, "Local Fabric Bridge has already been configured.\n");
@@ -185,14 +186,14 @@ CHIP_ERROR FabricSyncAddLocalBridgeCommand::RunCommand(NodeId deviceId)
185186

186187
if (mSetupPINCode.HasValue())
187188
{
188-
DeviceMgr().SetLocalBridgeSetupPinCode(mSetupPINCode.Value());
189+
DeviceManager::Instance().SetLocalBridgeSetupPinCode(mSetupPINCode.Value());
189190
}
190191
if (mLocalPort.HasValue())
191192
{
192-
DeviceMgr().SetLocalBridgePort(mLocalPort.Value());
193+
DeviceManager::Instance().SetLocalBridgePort(mLocalPort.Value());
193194
}
194195

195-
DeviceMgr().PairLocalFabricBridge(deviceId);
196+
DeviceManager::Instance().PairLocalFabricBridge(deviceId);
196197

197198
return CHIP_NO_ERROR;
198199
}
@@ -207,7 +208,7 @@ void FabricSyncRemoveLocalBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_E
207208

208209
if (err == CHIP_NO_ERROR)
209210
{
210-
DeviceMgr().SetLocalBridgeNodeId(kUndefinedNodeId);
211+
DeviceManager::Instance().SetLocalBridgeNodeId(kUndefinedNodeId);
211212
ChipLogProgress(NotSpecified, "Successfully removed local bridge device: NodeId: " ChipLogFormatX64,
212213
ChipLogValueX64(mLocalBridgeNodeId));
213214
}
@@ -222,7 +223,7 @@ void FabricSyncRemoveLocalBridgeCommand::OnDeviceRemoved(NodeId deviceId, CHIP_E
222223

223224
CHIP_ERROR FabricSyncRemoveLocalBridgeCommand::RunCommand()
224225
{
225-
NodeId bridgeNodeId = DeviceMgr().GetLocalBridgeNodeId();
226+
NodeId bridgeNodeId = DeviceManager::Instance().GetLocalBridgeNodeId();
226227

227228
if (bridgeNodeId == kUndefinedNodeId)
228229
{
@@ -234,7 +235,7 @@ CHIP_ERROR FabricSyncRemoveLocalBridgeCommand::RunCommand()
234235
mLocalBridgeNodeId = bridgeNodeId;
235236

236237
PairingManager::Instance().SetPairingDelegate(this);
237-
DeviceMgr().UnpairLocalFabricBridge();
238+
DeviceManager::Instance().UnpairLocalFabricBridge();
238239

239240
return CHIP_NO_ERROR;
240241
}
@@ -250,14 +251,14 @@ void FabricSyncDeviceCommand::OnCommissioningWindowOpened(NodeId deviceId, CHIP_
250251
CHIP_ERROR error = ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(manualCode);
251252
if (error == CHIP_NO_ERROR)
252253
{
253-
NodeId nodeId = DeviceMgr().GetNextAvailableNodeId();
254+
NodeId nodeId = DeviceManager::Instance().GetNextAvailableNodeId();
254255

255256
PairingManager::Instance().SetPairingDelegate(this);
256257
mAssignedNodeId = nodeId;
257258

258259
usleep(kCommissionPrepareTimeMs * 1000);
259260

260-
DeviceMgr().PairRemoteDevice(nodeId, payloadBuffer);
261+
DeviceManager::Instance().PairRemoteDevice(nodeId, payloadBuffer);
261262
}
262263
else
263264
{
@@ -283,7 +284,7 @@ void FabricSyncDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERRO
283284

284285
if (err == CHIP_NO_ERROR)
285286
{
286-
DeviceMgr().AddSyncedDevice(Device(mAssignedNodeId, mRemoteEndpointId));
287+
DeviceManager::Instance().AddSyncedDevice(Device(mAssignedNodeId, mRemoteEndpointId));
287288
}
288289
else
289290
{
@@ -294,7 +295,7 @@ void FabricSyncDeviceCommand::OnCommissioningComplete(NodeId deviceId, CHIP_ERRO
294295

295296
CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteEndpointId)
296297
{
297-
if (!DeviceMgr().IsFabricSyncReady())
298+
if (!DeviceManager::Instance().IsFabricSyncReady())
298299
{
299300
// print to console
300301
fprintf(stderr, "Remote Fabric Bridge is not configured yet.\n");
@@ -303,7 +304,7 @@ CHIP_ERROR FabricSyncDeviceCommand::RunCommand(EndpointId remoteEndpointId)
303304

304305
PairingManager::Instance().SetOpenCommissioningWindowDelegate(this);
305306

306-
DeviceMgr().OpenRemoteDeviceCommissioningWindow(remoteEndpointId);
307+
DeviceManager::Instance().OpenRemoteDeviceCommissioningWindow(remoteEndpointId);
307308

308309
return CHIP_NO_ERROR;
309310
}

examples/fabric-admin/commands/pairing/PairingCommand.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <commands/interactive/InteractiveCommands.h>
2424
#include <controller/ExampleOperationalCredentialsIssuer.h>
2525
#include <crypto/CHIPCryptoPAL.h>
26+
#include <device_manager/DeviceManager.h>
2627
#include <device_manager/DeviceSynchronization.h>
2728
#include <lib/core/CHIPSafeCasts.h>
2829
#include <lib/support/logging/CHIPLogging.h>
@@ -33,10 +34,6 @@
3334

3435
#include <string>
3536

36-
#if defined(PW_RPC_ENABLED)
37-
#include <rpc/RpcClient.h>
38-
#endif
39-
4037
using namespace ::chip;
4138
using namespace ::chip::Controller;
4239

@@ -534,16 +531,16 @@ void PairingCommand::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E
534531
PairingCommand * command = reinterpret_cast<PairingCommand *>(context);
535532
VerifyOrReturn(command != nullptr, ChipLogError(NotSpecified, "OnCurrentFabricRemove: context is null"));
536533

534+
ChipLogProgress(NotSpecified, "PairingCommand::OnCurrentFabricRemove");
535+
537536
if (err == CHIP_NO_ERROR)
538537
{
539538
// print to console
540539
fprintf(stderr, "Device with Node ID: 0x%lx has been successfully removed.\n", nodeId);
541540

542-
#if defined(PW_RPC_ENABLED)
543541
app::InteractionModelEngine::GetInstance()->ShutdownSubscriptions(command->CurrentCommissioner().GetFabricIndex(), nodeId);
544542
ScopedNodeId scopedNodeId(nodeId, command->CurrentCommissioner().GetFabricIndex());
545-
admin::RemoveSynchronizedDevice(scopedNodeId);
546-
#endif
543+
admin::DeviceManager::Instance().RemoveSyncedDevice(scopedNodeId);
547544
}
548545
else
549546
{

examples/fabric-admin/device_manager/BridgeSubscription.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void BridgeSubscription::OnAttributeData(const ConcreteDataAttributePath & path,
8080
return;
8181
}
8282

83-
DeviceMgr().HandleAttributeData(path, *data);
83+
DeviceManager::Instance().HandleAttributeData(path, *data);
8484
}
8585

8686
void BridgeSubscription::OnEventData(const app::EventHeader & eventHeader, TLV::TLVReader * data, const app::StatusIB * status)
@@ -101,7 +101,7 @@ void BridgeSubscription::OnEventData(const app::EventHeader & eventHeader, TLV::
101101
return;
102102
}
103103

104-
DeviceMgr().HandleEventData(eventHeader, *data);
104+
DeviceManager::Instance().HandleEventData(eventHeader, *data);
105105
}
106106

107107
void BridgeSubscription::OnError(CHIP_ERROR error)

examples/fabric-admin/device_manager/CommissionerControl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void CommissionerControl::OnResponse(app::CommandSender * client, const app::Con
6666

6767
if (data != nullptr)
6868
{
69-
DeviceMgr().HandleCommandResponse(path, *data);
69+
DeviceManager::Instance().HandleCommandResponse(path, *data);
7070
}
7171
}
7272

0 commit comments

Comments
 (0)