Skip to content

Commit de3e0a6

Browse files
committed
Merge branch 'master' into granbery/power_topology_all_clusters
# Conflicts: # zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp # zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h
2 parents 3f99452 + a95af94 commit de3e0a6

File tree

311 files changed

+15317
-11274
lines changed

Some content is hidden

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

311 files changed

+15317
-11274
lines changed

.github/workflows/lint.yml

+1-22
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,6 @@ jobs:
9090
--known-failure app/app-platform/ContentAppPlatform.h \
9191
--known-failure controller/ExamplePersistentStorage.cpp \
9292
--known-failure controller/ExamplePersistentStorage.h \
93-
--known-failure controller/java/GroupDeviceProxy.h \
94-
--known-failure controller/java/CHIPEventTLVValueDecoder.h \
95-
--known-failure controller/python/chip/credentials/cert.h \
96-
--known-failure controller/python/chip/server/Options.h \
97-
--known-failure controller/python/chip/crypto/p256keypair.h \
98-
--known-failure controller/python/chip/commissioning/PlaceholderOperationalCredentialsIssuer.h \
99-
--known-failure controller/python/chip/native/PyChipError.h \
10093
--known-failure app/AttributeAccessInterface.h \
10194
--known-failure app/AttributeAccessToken.h \
10295
--known-failure app/att-storage.h \
@@ -126,10 +119,6 @@ jobs:
126119
--known-failure app/reporting/tests/MockReportScheduler.h \
127120
--known-failure app/server/AppDelegate.h \
128121
--known-failure app/TestEventTriggerDelegate.h \
129-
--known-failure app/tests/integration/common.h \
130-
--known-failure app/tests/integration/MockEvents.h \
131-
--known-failure app/tests/suites/credentials/TestHarnessDACProvider.h \
132-
--known-failure app/tests/TestOperationalDeviceProxy.cpp \
133122
--known-failure app/util/af-enums.h \
134123
--known-failure app/util/af.h \
135124
--known-failure app/util/af-types.h \
@@ -163,21 +152,11 @@ jobs:
163152
--known-failure app/util/util.h \
164153
--known-failure app/WriteClient.h \
165154
--known-failure app/WriteHandler.h \
166-
--known-failure inet/tests/TestInetLayerCommon.hpp \
167155
--known-failure lib/core/CHIPVendorIdentifiers.hpp \
168-
--known-failure lib/dnssd/Constants.h \
169-
--known-failure lib/dnssd/minimal_mdns/core/FlatAllocatedQName.h \
170-
--known-failure lib/dnssd/minimal_mdns/core/HeapQName.h \
171-
--known-failure lib/dnssd/minimal_mdns/ListenIterator.h \
172-
--known-failure lib/dnssd/minimal_mdns/tests/CheckOnlyServer.h \
173-
--known-failure lib/dnssd/platform/DnssdBrowseDelegate.h \
174-
--known-failure lib/support/CHIPArgParser.hpp \
175-
--known-failure messaging/tests/echo/common.h \
176156
--known-failure platform/DeviceSafeQueue.cpp \
177157
--known-failure platform/DeviceSafeQueue.h \
178158
--known-failure platform/GLibTypeDeleter.h \
179159
--known-failure platform/SingletonConfigurationManager.cpp \
180-
--known-failure transport/retransmit/tests/TestCacheDriver.cpp \
181160
"
182161
183162
- name: Check for matter lint errors
@@ -256,7 +235,7 @@ jobs:
256235
- name: Check for use of %zu, which are not supported on some libcs.
257236
if: always()
258237
run: |
259-
git grep -n "%zu" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
238+
git grep -I -n "%zu" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
260239
261240
# Comments like '{{! ... }}' should be used in zap files
262241
- name: Do not allow TODO in generated files

.github/workflows/tests.yaml

+35-31
Large diffs are not rendered by default.

build/chip/chip_codegen.cmake

-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ endfunction()
108108
# GENERATOR "app-templates"
109109
# OUTPUTS
110110
# "zap-generated/access.h",
111-
# "zap-generated/CHIPClusters.h"
112111
# "zap-generated/endpoint_config.h",
113112
# "zap-generated/gen_config.h",
114113
# "zap-generated/IMClusterCommandHandler.cpp"
@@ -162,7 +161,6 @@ function(chip_zapgen TARGET_NAME)
162161
SET(EXTRA_DEPENDENCIES
163162
"${CHIP_ROOT}/src/app/zap-templates/partials/header.zapt"
164163
"${CHIP_ROOT}/src/app/zap-templates/templates/app/access.zapt"
165-
"${CHIP_ROOT}/src/app/zap-templates/templates/app/CHIPClusters.zapt"
166164
"${CHIP_ROOT}/src/app/zap-templates/templates/app/endpoint_config.zapt"
167165
"${CHIP_ROOT}/src/app/zap-templates/templates/app/gen_config.zapt"
168166
"${CHIP_ROOT}/src/app/zap-templates/templates/app/im-cluster-command-handler.zapt"

build/chip/chip_codegen.gni

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ template("_chip_build_time_zapgen") {
144144

145145
# Application templates, actually generating files
146146
"${_template_dir}/access.zapt",
147-
"${_template_dir}/CHIPClusters.zapt",
148147
"${_template_dir}/endpoint_config.zapt",
149148
"${_template_dir}/gen_config.zapt",
150149
"${_template_dir}/im-cluster-command-handler.zapt",

build/chip/esp32/esp32_codegen.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ macro(chip_app_component_zapgen ZAP_NAME)
6161
GENERATOR "app-templates"
6262
OUTPUTS
6363
"zap-generated/access.h"
64-
"zap-generated/CHIPClusters.h"
6564
"zap-generated/endpoint_config.h"
6665
"zap-generated/gen_config.h"
6766
"zap-generated/IMClusterCommandHandler.cpp"

docs/ERROR_CODES.md

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ This file was **AUTOMATICALLY** generated by
102102
| 121 | 0x79 | `CHIP_ERROR_INSUFFICIENT_PRIVILEGE` |
103103
| 125 | 0x7D | `CHIP_ERROR_MESSAGE_COUNTER_EXHAUSTED` |
104104
| 126 | 0x7E | `CHIP_ERROR_FABRIC_EXISTS` |
105+
| 127 | 0x7F | `CHIP_ERROR_ENDPOINT_EXISTS` |
105106
| 128 | 0x80 | `CHIP_ERROR_WRONG_ENCRYPTION_TYPE_FROM_PEER` |
106107
| 133 | 0x85 | `CHIP_ERROR_INVALID_KEY_ID` |
107108
| 134 | 0x86 | `CHIP_ERROR_INVALID_TIME` |

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

-1
Original file line numberDiff line numberDiff line change
@@ -5124,7 +5124,6 @@ cluster ContentLauncher = 1290 {
51245124
bitmap SupportedProtocolsBitmap : bitmap32 {
51255125
kDASH = 0x1;
51265126
kHLS = 0x2;
5127-
kWebRTC = 0x2;
51285127
}
51295128

51305129
struct DimensionStruct {

examples/android/CHIPTest/app/src/main/cpp/CHIPTest-JNI.cpp

+13-7
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,15 @@ jint JNI_OnLoad(JavaVM * jvm, void * reserved)
6363
ChipLogProgress(Test, "Loading Java class references.");
6464

6565
// Get various class references need by the API.
66-
err = JniReferences::GetInstance().GetClassRef(env, "com/tcl/chip/chiptest/TestEngine", sTestEngineCls);
66+
jobject testEngineCls;
67+
err = JniReferences::GetInstance().GetLocalClassRef(env, "com/tcl/chip/chiptest/TestEngine", sTestEngineCls);
6768
SuccessOrExit(err);
68-
69-
err = JniReferences::GetInstance().GetClassRef(env, "com/tcl/chip/chiptest/TestEngineException", sTestEngineExceptionCls);
69+
err = sTestEngineCls.Init(testEngineCls);
70+
SuccessOrExit(err);
71+
jobject testEngineExceptionCls;
72+
err = JniReferences::GetInstance().GetLocalClassRef(env, "com/tcl/chip/chiptest/TestEngineException", sTestEngineExceptionCls);
73+
SuccessOrExit(err);
74+
err = sTestEngineExceptionCls.Init(testEngineExceptionCls);
7075
SuccessOrExit(err);
7176
ChipLogProgress(Test, "Java class references loaded.");
7277

@@ -141,7 +146,7 @@ CHIP_ERROR N2J_Error(JNIEnv * env, CHIP_ERROR inErr, jthrowable & outEx)
141146
jmethodID constructor;
142147

143148
env->ExceptionClear();
144-
constructor = env->GetMethodID(sTestEngineExceptionCls, "<init>", "(ILjava/lang/String;)V");
149+
constructor = env->GetMethodID(sTestEngineExceptionCls.ObjectRef(), "<init>", "(ILjava/lang/String;)V");
145150
VerifyOrExit(constructor != NULL, err = CHIP_JNI_ERROR_METHOD_NOT_FOUND);
146151

147152
switch (inErr.AsInteger())
@@ -164,7 +169,8 @@ CHIP_ERROR N2J_Error(JNIEnv * env, CHIP_ERROR inErr, jthrowable & outEx)
164169
}
165170
errStrObj = (errStr != NULL) ? env->NewStringUTF(errStr) : NULL;
166171

167-
outEx = (jthrowable) env->NewObject(sTestEngineExceptionCls, constructor, static_cast<jint>(inErr.AsInteger()), errStrObj);
172+
outEx = (jthrowable) env->NewObject(sTestEngineExceptionCls.ObjectRef(), constructor, static_cast<jint>(inErr.AsInteger()),
173+
errStrObj);
168174
VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN);
169175

170176
exit:
@@ -184,7 +190,7 @@ static void onLog(const char * fmt, ...)
184190
JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread();
185191
VerifyOrExit(env != NULL, err = CHIP_JNI_ERROR_NO_ENV);
186192

187-
method = env->GetStaticMethodID(sTestEngineCls, "onTestLog", "(Ljava/lang/String;)V");
193+
method = env->GetStaticMethodID(sTestEngineCls.ObjectRef(), "onTestLog", "(Ljava/lang/String;)V");
188194
VerifyOrExit(method != NULL, err = CHIP_JNI_ERROR_NO_ENV);
189195

190196
va_start(args, fmt);
@@ -195,7 +201,7 @@ static void onLog(const char * fmt, ...)
195201
ChipLogProgress(Test, "Calling Java onTestLog");
196202

197203
env->ExceptionClear();
198-
env->CallStaticVoidMethod(sTestEngineCls, method, strObj);
204+
env->CallStaticVoidMethod(sTestEngineCls.ObjectRef(), method, strObj);
199205
VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN);
200206

201207
exit:

examples/bridge-app/asr/subdevice/SubDeviceManager.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,19 @@ int AddDeviceEndpoint(SubDevice * dev, EmberAfEndpointType * ep, const Span<cons
5656
if (NULL == gSubDevices[index])
5757
{
5858
gSubDevices[index] = dev;
59-
EmberAfStatus ret;
59+
CHIP_ERROR err;
6060
while (1)
6161
{
6262
dev->SetEndpointId(gCurrentEndpointId);
63-
ret =
63+
err =
6464
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId);
65-
if (ret == EMBER_ZCL_STATUS_SUCCESS)
65+
if (err == CHIP_NO_ERROR)
6666
{
6767
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),
6868
gCurrentEndpointId, index);
6969
return index;
7070
}
71-
else if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS)
71+
else if (err != CHIP_ERROR_ENDPOINT_EXISTS)
7272
{
7373
return -1;
7474
}

examples/bridge-app/esp32/main/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -166,19 +166,19 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
166166
if (NULL == gDevices[index])
167167
{
168168
gDevices[index] = dev;
169-
EmberAfStatus ret;
169+
CHIP_ERROR err;
170170
while (true)
171171
{
172172
dev->SetEndpointId(gCurrentEndpointId);
173-
ret =
173+
err =
174174
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId);
175-
if (ret == EMBER_ZCL_STATUS_SUCCESS)
175+
if (err == CHIP_NO_ERROR)
176176
{
177177
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),
178178
gCurrentEndpointId, index);
179179
return index;
180180
}
181-
else if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS)
181+
else if (err != CHIP_ERROR_ENDPOINT_EXISTS)
182182
{
183183
return -1;
184184
}

examples/bridge-app/linux/main.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,22 +259,22 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
259259
if (nullptr == gDevices[index])
260260
{
261261
gDevices[index] = dev;
262-
EmberAfStatus ret;
262+
CHIP_ERROR err;
263263
while (true)
264264
{
265265
// Todo: Update this to schedule the work rather than use this lock
266266
DeviceLayer::StackLock lock;
267267
dev->SetEndpointId(gCurrentEndpointId);
268268
dev->SetParentEndpointId(parentEndpointId);
269-
ret =
269+
err =
270270
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId);
271-
if (ret == EMBER_ZCL_STATUS_SUCCESS)
271+
if (err == CHIP_NO_ERROR)
272272
{
273273
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),
274274
gCurrentEndpointId, index);
275275
return index;
276276
}
277-
if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS)
277+
if (err != CHIP_ERROR_ENDPOINT_EXISTS)
278278
{
279279
return -1;
280280
}

examples/bridge-app/telink/src/AppTask.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,19 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const Span<const E
189189
if (NULL == gDevices[index])
190190
{
191191
gDevices[index] = dev;
192-
EmberAfStatus ret;
192+
CHIP_ERROR err;
193193
while (true)
194194
{
195195
dev->SetEndpointId(gCurrentEndpointId);
196-
ret =
196+
err =
197197
emberAfSetDynamicEndpoint(index, gCurrentEndpointId, ep, dataVersionStorage, deviceTypeList, parentEndpointId);
198-
if (ret == EMBER_ZCL_STATUS_SUCCESS)
198+
if (err == CHIP_NO_ERROR)
199199
{
200200
ChipLogProgress(DeviceLayer, "Added device %s to dynamic endpoint %d (index=%d)", dev->GetName(),
201201
gCurrentEndpointId, index);
202202
return index;
203203
}
204-
else if (ret != EMBER_ZCL_STATUS_DUPLICATE_EXISTS)
204+
else if (err != CHIP_ERROR_ENDPOINT_EXISTS)
205205
{
206206
return -1;
207207
}

examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ void EVSEManufacturer::FakeReadingsUpdate()
232232

233233
// Update meter values
234234
// Avoid using floats - so we will do a basic rand() call which will generate a integer value between 0 and RAND_MAX
235-
// first compute power as a mean + some random value in range 0 to mPowerRandomness_mW
236-
int64_t power = (rand() % gFakeReadingsData.mPowerRandomness_mW);
235+
// first compute power as a mean + some random value in range +/- mPowerRandomness_mW
236+
int64_t power =
237+
(static_cast<int64_t>(rand()) % (2 * gFakeReadingsData.mPowerRandomness_mW)) - gFakeReadingsData.mPowerRandomness_mW;
237238
power += gFakeReadingsData.mPower_mW; // add in the base power
238239

239240
// TODO call the EPM cluster to send a power reading

examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter

+1
Original file line numberDiff line numberDiff line change
@@ -1764,6 +1764,7 @@ endpoint 0 {
17641764
callback attribute clientsSupportedPerFabric;
17651765
ram attribute userActiveModeTriggerHint default = 0x110D;
17661766
ram attribute userActiveModeTriggerInstruction default = "Restart the application";
1767+
ram attribute operatingMode default = 0;
17671768
callback attribute generatedCommandList;
17681769
callback attribute acceptedCommandList;
17691770
callback attribute eventList;

examples/lit-icd-app/lit-icd-common/lit-icd-server-app.zap

+20-4
Original file line numberDiff line numberDiff line change
@@ -1874,10 +1874,10 @@
18741874
"side": "server",
18751875
"type": "bitmap32",
18761876
"included": 1,
1877-
"storageOption": "RAM",
1877+
"storageOption": "External",
18781878
"singleton": 0,
18791879
"bounded": 0,
1880-
"defaultValue": "0",
1880+
"defaultValue": null,
18811881
"reportable": 1,
18821882
"minInterval": 1,
18831883
"maxInterval": 65534,
@@ -1890,10 +1890,10 @@
18901890
"side": "server",
18911891
"type": "int16u",
18921892
"included": 1,
1893-
"storageOption": "RAM",
1893+
"storageOption": "External",
18941894
"singleton": 0,
18951895
"bounded": 0,
1896-
"defaultValue": "2",
1896+
"defaultValue": null,
18971897
"reportable": 1,
18981898
"minInterval": 0,
18991899
"maxInterval": 65344,
@@ -3519,6 +3519,22 @@
35193519
"maxInterval": 65534,
35203520
"reportableChange": 0
35213521
},
3522+
{
3523+
"name": "OperatingMode",
3524+
"code": 8,
3525+
"mfgCode": null,
3526+
"side": "server",
3527+
"type": "OperatingModeEnum",
3528+
"included": 1,
3529+
"storageOption": "RAM",
3530+
"singleton": 0,
3531+
"bounded": 0,
3532+
"defaultValue": "0",
3533+
"reportable": 1,
3534+
"minInterval": 1,
3535+
"maxInterval": 65534,
3536+
"reportableChange": 0
3537+
},
35223538
{
35233539
"name": "GeneratedCommandList",
35243540
"code": 65528,

examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter

+1-2
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,6 @@ endpoint 0 {
13341334
ram attribute clusterRevision default = 1;
13351335

13361336
handle command OpenCommissioningWindow;
1337-
handle command OpenBasicCommissioningWindow;
13381337
handle command RevokeCommissioning;
13391338
}
13401339

@@ -1455,7 +1454,7 @@ endpoint 1 {
14551454
callback attribute eventList;
14561455
callback attribute attributeList;
14571456
ram attribute featureMap default = 0;
1458-
ram attribute clusterRevision default = 1;
1457+
ram attribute clusterRevision default = 2;
14591458

14601459
handle command Pause;
14611460
handle command Stop;

examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap

+1-9
Original file line numberDiff line numberDiff line change
@@ -2088,14 +2088,6 @@
20882088
"isIncoming": 1,
20892089
"isEnabled": 1
20902090
},
2091-
{
2092-
"name": "OpenBasicCommissioningWindow",
2093-
"code": 1,
2094-
"mfgCode": null,
2095-
"source": "client",
2096-
"isIncoming": 1,
2097-
"isEnabled": 1
2098-
},
20992091
{
21002092
"name": "RevokeCommissioning",
21012093
"code": 2,
@@ -3627,7 +3619,7 @@
36273619
"storageOption": "RAM",
36283620
"singleton": 0,
36293621
"bounded": 0,
3630-
"defaultValue": "1",
3622+
"defaultValue": "2",
36313623
"reportable": 1,
36323624
"minInterval": 1,
36333625
"maxInterval": 65534,

examples/placeholder/linux/apps/app1/config.matter

-2
Original file line numberDiff line numberDiff line change
@@ -7554,7 +7554,6 @@ cluster ContentLauncher = 1290 {
75547554
bitmap SupportedProtocolsBitmap : bitmap32 {
75557555
kDASH = 0x1;
75567556
kHLS = 0x2;
7557-
kWebRTC = 0x2;
75587557
}
75597558

75607559
struct DimensionStruct {
@@ -7708,7 +7707,6 @@ cluster ContentLauncher = 1290 {
77087707
bitmap SupportedProtocolsBitmap : bitmap32 {
77097708
kDASH = 0x1;
77107709
kHLS = 0x2;
7711-
kWebRTC = 0x2;
77127710
}
77137711

77147712
struct DimensionStruct {

0 commit comments

Comments
 (0)